| CPC G06K 19/06037 (2013.01) | 19 Claims |

|
1. A two-dimensional code generation method, comprising:
obtaining M colors input by a user and a characteristic value of each color in a target color path, wherein the M colors comprise at least one chromatic color, and M is an integer greater than 1;
determining a target mapping relationship based on a magnitude relationship between characteristic values of the M colors in the target color path, wherein the target mapping relationship comprises element information corresponding to each of the M colors;
obtaining a target link, and generating a bitstream corresponding to the target link, wherein the bitstream comprises a plurality of pieces of element information; and
determining, based on the target mapping relationship, a color corresponding to each piece of element information in the bitstream, and generating a target two-dimensional code based on the color corresponding to each piece of element information in the bitstream.
|