The present invention relates to a method,
system, device and storage medium for generating an anti-counterfeiting code from a product number, and belongs to the technical field of anti-counterfeiting
code generation methods. The method comprises step S1, generating a unique number P for the product number according to a predetermined rule, and taking a value N for the product sequence number within a predetermined length range; step S2, performing an AES
encryption operation on the product number P and the product sequence number N, and obtaining an
authentication code after a modulo
algorithm; step S3, combining the product number, the product sequence number and the
authentication code into a plain code; step S4, performing a full
code conversion on the plain code to obtain an anti-counterfeiting code array; step S5, converting the anti-counterfeiting code array into an anti-counterfeiting code; the
system comprises a character
string generation module, an
authentication code generation module, a plain
code generation module, an anti-counterfeiting code array generation module, and an anti-counterfeiting code generation module; the device comprises a memory and a processor; a
computer program is stored on a readable storage medium, and when executed, the steps of the method are implemented; the
encryption strength is high and the program is not easy to crack.