Anti-counterfeiting mark generation and verification method

By introducing dynamic attribute parameter encryption conversion and fill-in rules in the traditional anti-counterfeiting code generation method, complex and difficult to crack anti-counterfeiting logos are generated, which solves the problem of insufficient number and complexity of anti-counterfeiting codes in the traditional method, and achieves efficient anti-counterfeiting code generation and verification.

CN120218959AActive Publication Date: 2025-06-27SHAANXI LIBANG SOFTWARE CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202510688111.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-27
Publication Date
2025-06-27
Estimated Expiration
2045-05-27

AI Technical Summary

Technical Problem

Traditional anti-counterfeiting code generation methods are difficult to generate a sufficient number of anti-counterfeiting codes in a short time, and the generated anti-counterfeiting codes lack complexity and diversity, and are easily forged.

Method used

By generating plaintext identifiers based on dynamic attribute parameters in the product production process, encrypted and converted, the first and second encryption segments are generated, and length adapted through independent complement rules are performed, and the final anti-counterfeiting identifier is finally generated according to the predefined combination strategy.

Benefits of technology

The generated anti-counterfeiting logo combination rules are complex and difficult to crack. They can meet the generation needs of a large number of anti-counterfeiting codes and realize "one thing, one code", which is suitable before January 2100.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120218959A_ABST
    Figure CN120218959A_ABST
Patent Text Reader

Abstract

The invention discloses an anti-counterfeiting mark generation and verification method. The core of the anti-counterfeiting mark generation and verification method is to improve the anti-counterfeiting efficiency through combination of multi-dimensional dynamic parameter fusion and an encryption mechanism. The method comprises the following steps: a) generating a plaintext identifier containing a first identification section and a second identification section based on a dynamic attribute parameter in a product production process; b) respectively carrying out encryption conversion on the first identification section and the second identification section to generate a first encryption section and a second encryption section, and carrying out length adaptation on the second encryption section through an independent bit covering rule; and c) generating a final anti-counterfeiting mark from the first encryption section and the second encryption section according to a predefined combination strategy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of product anti-counterfeiting, and particularly to a method for generating and verifying anti-counterfeiting labels. Background Art

[0002] With the continuous expansion of the commodity market and the increasing demand of consumers for the authenticity identification of commodities, the demand for the quantity of anti-counterfeiting codes is also increasing rapidly. However, traditional anti-counterfeiting code generation methods, such as inkjet printing, are limited by their technical characteristics and production efficiency, and often it is difficult to generate a sufficient number of anti-counterfeiting codes in a short time to meet the needs of large-scale commodity circulation. This not only leads to a shortage of anti-counterfeiting codes, but also may cause some commodities to face the risk of being counterfeited due to the lack of effective anti-counterfeiting labels.

[0003] In addition, traditional anti-counterfeiting code generation methods also have obvious shortcomings in terms of anti-counterfeiting level. Anti-counterfeiting codes generated by simple technologies such as inkjet printing often lack sufficient complexity and diversity, and are easily replicated and counterfeited by forgers through technical means, thus bringing great troubles and losses to consumers and merchants.

[0004] Therefore, it is necessary to provide a method for generating and verifying anti-counterfeiting labels to solve the problems mentioned in the above background art. Summary of the Invention

[0005] To achieve the above object, the present invention provides the following technical solution: A method for generating and verifying anti-counterfeiting labels, comprising: a) Generating a plaintext identifier containing a first identification segment and a second identification segment based on dynamic attribute parameters in the product production process; b) Performing encryption conversion on the first identification segment and the second identification segment respectively to generate a first encrypted segment and a second encrypted segment, wherein the second encrypted segment is length-adapted through an independent padding rule; c) Generating a final anti-counterfeiting label by combining the first encrypted segment and the second encrypted segment according to a predefined combination strategy.

[0006] Preferably, the dynamic attribute parameters include a first sub-parameter associated with the time dimension and a second sub-parameter associated with the production process dimension.

[0007] Preferably, the first sub-parameter is generated by extracting the hash feature of the production timestamp, and the second sub-parameter is generated by the association logic between the production serial number and the station identifier.

[0008] Preferably, the encryption conversion includes performing an asymmetric algorithm process on the first identification segment and the second identification segment by using mutually independent multi-base mapping tables.

[0009] Preferably, the character set of the multi - base mapping table is user - defined, and the mapping tables corresponding to the first identification segment and the second identification segment have a set base - number.

[0010] Preferably, the independent padding rule includes: i) Pre - define a padding character set, whose character elements have no intersection with the character set of the encryption mapping table; ii) Dynamically select the insertion position and quantity of padding characters according to the length defect value of the second encrypted segment.

[0011] Preferably, the version identifier of the padding character set forms a binding relationship with the pre - defined combination strategy.

[0012] Preferably, the pre - defined combination strategy includes character - level cross - recombination or segment - order permutation of the first encrypted segment and the second encrypted segment.

[0013] Preferably, it further includes an anti - counterfeiting label verification step: d) Analyze the anti - counterfeiting label and separate the first encrypted segment and the second encrypted segment; e) Restore the first identification segment and the second identification segment based on the reverse mapping rule and the padding character set; f) Verify the spatio - temporal uniqueness and logical consistency of the restored plaintext identifier.

[0014] Preferably, the step e) includes: i) Perform a padding character stripping operation on the second encrypted segment; ii) Convert the remaining characters into the original numerical format through multi - base inverse mapping.

[0015] Preferably, the encryption conversion process uses a dynamically generated encryption key, and the key is associated with the production batch or time period.

[0016] Preferably, the generation of the first identification segment includes intercepting and modulo - operation on the image feature hash value to output a feature code with a fixed length.

[0017] Preferably, the generation of the second identification segment includes compound - encoding the station identification, quality inspection identification and random factor to form a traceable production process identification.

[0018] Preferably, the lengths of the first encrypted segment and the second encrypted segment are respectively constrained to pre - defined fixed values.

[0019] Preferably, when the length of the first encrypted segment after encryption conversion is insufficient, a leading - character filling operation is performed to meet the length constraint.

[0020] Compared with the prior art, the present invention provides an anti - counterfeiting label generation and verification method, which has the following beneficial effects: In the present invention, by allowing the user to define the encryption mapping table used in the generation algorithm and setting the padding rule, the dynamic characteristic parameter part of product production and the preset identification part related to the production process are split, and two completely different anti-counterfeiting logics are set. Through multiple anti-counterfeiting encryption means such as logic integration, base conversion, and padding, the combination rule of the anti-counterfeiting result is complex and difficult to crack. It is applicable before January 2100, and the operation algorithm is a mathematical algorithm. The anti-counterfeiting code capacity can generate 10 million per year, and the total capacity reaches 700 million, which can meet the generation requirements of a large number of anti-counterfeiting codes. Moreover, it can achieve 100% non-repetition of anti-counterfeiting codes without relying on a database, facilitating the implementation of "one code for one item". BRIEF DESCRIPTION OF THE DRAWINGS

[0021] Figure 1 It is a schematic flow diagram of a method for generating an anti-counterfeiting identifier. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0022] Please refer to Figure 1 , the present invention provides a method for generating and verifying an anti-counterfeiting identifier, including the following steps: a) Generating a plaintext identifier including a first identifier segment and a second identifier segment based on the dynamic attribute parameters in the product production process. The character length of the first identifier segment is four digits, and the character length of the second identifier segment is 6 or 7 digits; the dynamic attribute parameters include a first sub-parameter associated with the time dimension and a second sub-parameter associated with the production process dimension; the first sub-parameter is generated by extracting the hash feature of the production timestamp, and the second sub-parameter is generated by the association logic between the production serial number and the station identifier.

[0023] Further, the generation of the first identifier segment includes intercepting and modulo operation on the image feature hash value to output a feature code with a fixed length. Specifically, the local hash value of a set area can be extracted from the product image feature, and the hash value of a preset length is intercepted for modulo operation to output a character with a fixed length as the feature code of the first identifier segment.

[0024] Further, the generation of the second identifier segment includes composite encoding of the station identifier, quality inspection identifier, and random factor to form a traceable production process identifier. Specifically, the station identifier is the station number, and the quality inspection identifier is the quality inspector ID.

[0025] b) Performing encryption conversion on the first identifier segment and the second identifier segment respectively to generate a first encrypted segment and a second encrypted segment, where the second encrypted segment is length-adapted through an independent padding rule; Further, the encryption transformation includes performing an asymmetric algorithm process on the first identification segment and the second identification segment by using mutually independent multi - base mapping tables. The character set of the multi - base mapping table is user - defined and configured, and the mapping tables corresponding to the first identification segment and the second identification segment have set base radixes.

[0026] Further, the independent padding rule includes: i) Pre - define a padding character set whose character elements have no intersection with the character set of the encryption mapping table; ii) Dynamically select the insertion position and quantity of padding characters according to the length defect value of the second encrypted segment.

[0027] The lengths of the first encrypted segment and the second encrypted segment are respectively constrained to pre - defined fixed values. The encryption transformation process uses a dynamically generated encryption key, and the key is associated with the production batch or time period. When the length of the first encrypted segment after encryption transformation is insufficient, a leading - character filling operation is performed to meet the length constraint.

[0028] In this implementation, taking the production timestamp as the first sub - parameter to generate the first identification segment (taking 4 - digit fixed length as an example), for example, when converting March 2019 into the first identification segment, it is written as 1903; taking the single production serial number parameter as the second sub - parameter to generate the second identification segment (taking 7 - digit set length as an example), its numbering specification is: prefix 0 + serial number. When the serial number is less than 7 digits, fill zeros on the left to 7 digits, such as 0000001, 0000022, 0000333, etc., which respectively represent products with production serial numbers of 1, 22, 333; Specifically, the first identification segment is encrypted using base - 62, and the second identification segment is encrypted using base - 57. Set the first encryption mapping table, the second encryption mapping table, and the padding password table (not less than 5 digits) respectively. Both the first encryption mapping table and the second encryption mapping table include uppercase letters, lowercase letters, and Arabic numerals. The specific examples are as follows: First encryption mapping table (base - 62): 0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ.

[0029] Second encryption mapping table (base - 57): 0abc1ABCDEFGdefg2HIJKLMNhij3OPQRSTklm4nop5qru6vwx7yzUVWXYZ.

[0030] Padding password table: 89stZ.

[0031] In this embodiment, the initial anti-counterfeiting label generation date is set to December 2018. Taking the product plaintext identifier as 19030000001 (the product production date is March 2019, the serial number is 1, and the serial number length is set to 7 digits) as an example, the product with the product plaintext identifier of 19030000001 is anti-counterfeiting encrypted according to the above encryption mapping table; The encryption process of the plaintext identifier 19030000001 includes: encrypting the first identifier segment and the second identifier segment. The encryption of the first identifier segment specifically includes: ① Extract the time parameter 1903 and the serial number parameter 0000001 respectively. ② Take the integer part of the last two digits of the extracted product serial number parameter 0000001, divide it by three, take the remainder, and add one to get D1. D1 is equal to 2. ③ Calculate the month difference D2 between the time parameter 1903 and the initial anti-counterfeiting label generation time. It can be calculated that D2 is 3. When D2 is less than three digits, pad zeros on the left, that is, D2 is equal to 003. ④ Combine the D1 and D2 in sequence to form the first sub-parameter.

[0032] From the above content, it can be seen that the first sub-parameter is 2003. Convert the first sub-parameter to base sixty-two according to the above first encryption mapping table (base sixty-two), and get the first encrypted segment equal to z8.

[0033] The encryption of the second identifier segment specifically includes: Extract the serial number parameter 0000001, and convert it to base fifty-seven according to the above second encryption mapping table to get the second encrypted segment as a. Since the second encrypted segment does not meet the predefined fixed value length, the padding operation is performed according to the padding rule, which specifically includes: ① Take the integer part of the last two digits of the serial number parameter 0000001, divide it by three, and take the remainder to get B1. B1 is equal to 1.

[0034] ② Calculate the length B2 that needs to be padded according to the set length of the second encrypted segment and the actually calculated length of the second encrypted segment. From the above content, it can be seen that the set length is 4 and the actual length is 1. Therefore, it can be known that B2 is equal to 3. ③ Sequentially take B2 characters from behind the B1-th position in the padding password table to output the padding string B3. According to the padding password table, the padding string B3 is 9st. ④ Combine the padding string B3 and the actual second encrypted segment in sequence to get the second encrypted segment 9sta of the product.

[0035] c) Generate the final anti-counterfeiting label according to the predefined combination strategy for the first encrypted segment and the second encrypted segment, that is, the anti-counterfeiting label of the product with the plaintext identifier of 19030000001 is z89sta.

[0036] Further, the predefined combination strategy includes character-level cross-recombination or segment order permutation of the first encrypted segment and the second encrypted segment. The anti-counterfeiting identifier z89sta is a sorting combination with the first encrypted segment in the front and the second encrypted segment in the back.

[0037] Further, a version identifier of the padding character set forms a binding relationship with the predefined combination strategy.

[0038] It should be noted that in the present invention, the encryption mapping table used in the generation algorithm is defined by the user himself, and a padding password table is set. The dynamic characteristic parameter part of product production and the preset identification part related to the production process are split, and two completely different anti-counterfeiting logics are set. Through multiple anti-counterfeiting encryption means such as logic integration, base conversion, and padding, the combination rule of the anti-counterfeiting result is complex and difficult to crack. It is applicable before January 2100, and the operation algorithm is a mathematical algorithm. The capacity of the anti-counterfeiting identifier can generate 10 million per year, and the total capacity reaches 700 million, which can meet the generation requirements of a large number of anti-counterfeiting identifiers, and can achieve 100% non-repetition of anti-counterfeiting identifiers without relying on a database, facilitating the implementation of "one code for one item".

[0039] Further, it also includes an anti-counterfeiting identifier verification step: d) Analyze the anti-counterfeiting identifier and separate the first encrypted segment and the second encrypted segment; e) Restore the first identification segment and the second identification segment based on the reverse mapping rule and the padding character set; The step e) includes: i) Perform a padding character stripping operation on the second encrypted segment; ii) Convert the remaining characters into the original numerical format through multi-base inverse mapping.

[0040] f) Verify the spatio-temporal uniqueness and logical consistency of the restored plaintext identifier.

[0041] In this embodiment, taking the anti-counterfeiting identifier z89sta as an example, the anti-counterfeiting identifier is verified by inverse calculation.

[0042] Specifically, ① According to the predefined combination strategy, the first encrypted segment and the second encrypted segment of the anti-counterfeiting identifier z89sta are split to obtain the first encrypted segment and the second encrypted segment before combination. It can be seen that the first encrypted segment is z8 and the second encrypted segment is 9sta; ② Convert the first encrypted segment z8 to decimal, take the last three digits as an integer, and obtain that the difference between the product time parameter and the month of the initial anti-counterfeiting identifier generation date is 3; ③Based on the set initial anti-counterfeiting identification generation date, calculate the first identification segment of the product. According to the above initial anti-counterfeiting identification generation date, the calculated production date of the product is March 2019, written as 1903; ④Strip and remove the padding characters representing the padding code C in the second encrypted segment, and convert the remaining characters to decimal to obtain the actual calculated second encrypted segment of the product; According to the padding password table: 89stZ, remove 9st from the second encrypted segment of the product, and the remaining is a. Convert a from base fifty-seven to decimal to obtain the second identification segment (production serial number) of the product equal to 0000001.

[0043] ⑤Combine the first identification segment and the second identification segment to obtain the product plaintext identifier. That is, the product plaintext identifier of the anti-counterfeiting identification z89sta is 19030000001.

[0044] Among them, when the second identification segment of the product is less than the set length, pad with zeros on the left to ensure that the length of the product plaintext identifier is the same, which is convenient for identification and circulation.

[0045] It should be noted that in the present invention, only in a simplified scenario, a single production timestamp and a single serial number are used as the first identification segment and the second identification segment for the encryption and decryption examples of the anti-counterfeiting identification. However, when an intercepted image feature hip-hop value (such as a production timestamp + an intercepted image feature hip-hop value forming a fixed-length feature code) is incorporated into the single production timestamp, or digital elements such as a station identifier, a quality inspection identifier, and a random factor are incorporated into the single serial number (such as a station identifier + a quality inspection identifier + a random factor + a serial number forming a fixed length), the same anti-counterfeiting identification generation method is applicable. Among them, the introduction of the image feature hip-hop value, the station identifier, the quality inspection identifier, and the random factor only increases the complexity of encryption and decryption. When the above encryption and decryption methods are used, only extract the corresponding character segments according to the above algorithm for operation, and it is also applicable.

[0046] The above-mentioned is only the preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art within the technical scope disclosed by the present invention, according to the technical solution and inventive concept of the present invention, makes equivalent substitutions or changes, and should be covered within the protection scope of the present invention.

Claims

1. A method for generating and verifying anti-counterfeiting labels, characterized in that, Including the following steps: a) Generating a plaintext identifier containing a first identification segment and a second identification segment based on dynamic attribute parameters in the product production process; b) Performing encryption conversions on the first identification segment and the second identification segment respectively to generate a first encrypted segment and a second encrypted segment, wherein the second encrypted segment is length-adapted by an independent padding rule; c) Generating a final anti-counterfeiting identifier by combining the first encrypted segment and the second encrypted segment according to a predefined combination strategy.

2. The method according to claim 1, wherein The dynamic attribute parameters include a first sub-parameter associated with the time dimension and a second sub-parameter associated with the production process dimension.

3. The method according to claim 2, characterized in that, The first sub-parameter is generated by extracting the hash feature of the production timestamp, and the second sub-parameter is generated by the association logic between the production serial number and the station identifier.

4. The method according to claim 1, characterized in that, The encryption conversion includes performing an asymmetric algorithm process on the first identification segment and the second identification segment using mutually independent multi-base mapping tables.

5. The method according to claim 4, wherein The character set of the multi-base mapping table is user-defined and configured, and the mapping tables corresponding to the first identification segment and the second identification segment have set base radices.

6. The method according to claim 1, characterized in that, The independent padding rule includes: i) Predefining a padding character set, the character elements of which have no intersection with the character set of the encryption mapping table; ii) Dynamically selecting the insertion position and quantity of padding characters according to the length defect value of the second encrypted segment.

7. The method according to claim 6, characterized in that The version identifier of the padding character set forms a binding relationship with the predefined combination strategy.

8. The method according to claim 1, wherein The predefined combination strategy includes performing character-level cross recombination or segment order permutation on the first encrypted segment and the second encrypted segment.

9. The method according to claim 1, wherein Also including an anti-counterfeiting identifier verification step: d) Parsing the anti-counterfeiting identifier and separating the first encrypted segment and the second encrypted segment; e) Restoring the first identification segment and the second identification segment based on the reverse mapping rule and the padding character set; f) Verifying the spatio-temporal uniqueness and logical consistency of the restored plaintext identifier.

10. The method according to claim 9, characterized in that, The step e) includes: i) Performing a padding character stripping operation on the second encrypted segment; ii) Converting the remaining characters into the original numerical format through multi-base inverse mapping.

11. The method according to claim 1, wherein The encryption conversion process uses a dynamically generated encryption key, and the key is associated with the production batch or time period.

12. The method according to claim 3, wherein The generation of the first identification segment includes intercepting and modulo operations on the image feature hash value to output a feature code with a fixed length.

13. The method according to claim 3, wherein The generation of the second identification segment includes composite encoding of the station identifier, quality inspection identifier, and random factor to form a traceable production process identifier.

14. The method according to claim 1, characterized in that, The lengths of the first encrypted segment and the second encrypted segment are respectively constrained to predefined fixed values.

15. The method according to claim 14, wherein When the length of the first encrypted segment after encryption conversion is insufficient, a leading character filling operation is performed to meet the length constraint.

Citation Information

Patent Citations

  • Product anti-counterfeiting method based on digital signature and public key system and verifying method

    CN102004986A

  • Encryption system for commodity anti-counterfeiting

    CN108830619A

  • Chip serial number encoding method and system, storage medium and terminal

    CN109714163A

  • Encryption and decryption method and device and computer equipment for exchange code

    CN111967026A

  • Authorization code generation method and device, equipment and readable storage medium

    CN117609964A