1. A method for generating a barcode, the method comprising: obtaining an operation identification corresponding to a specific operation; determining an area where a barcode is to be generated; obtaining an image characteristic of a surrounding image that is within a preset range adjacent to the area, the image characteristic of the surrounding image including a color characteristic of the surrounding image, the surrounding image being distinct from the area; and generating the barcode at least based on the operation identification and the image characteristic of the surrounding image, the barcode including information of the operation identification and the color characteristic of the surrounding image.