Factory anti-counterfeiting code generation method based on cloud collaboration
Through the factory anti-counterfeiting code generation method based on cloud collaboration, the docking of the cloud management system and the one-object-one-code management system is used to achieve efficient and accurate generation of anti-counterfeiting codes, solving the problem of random code generation in traditional methods that lack systematicity and regularity, complex verification and error-prone nature in the traditional method, enhance the uniqueness and reliability of the anti-counterfeiting code, and optimize resource configuration and reduce costs.
Patent Information
- Application Number
- CN202510071125.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-16
- Publication Date
- 2025-06-20
AI Technical Summary
The traditional anti-counterfeiting code generation method lacks systematicity and regularity in random code generation, which leads to complex verification and error-proneness, and lacks an effective repeated verification mechanism, which affects the uniqueness and reliability of the anti-counterfeiting code. At the same time, traditional methods are limited to local computing and cannot achieve effective integration and optimized configuration of resources, resulting in inefficient generation and high cost.
The factory anti-counterfeiting code generation method based on cloud collaboration is adopted, and the cloud management system is connected with the one-item and one-code management system to achieve efficient and accurate generation of anti-counterfeiting codes. The method includes order acquisition, one-time encoding, quadratic encoding and coding verification steps, using encryption algorithm to generate random codes, quadratic encoding through identification code encoding rules, and repeated verification to ensure the uniqueness of the anti-counterfeiting code.
Through cloud collaboration, the efficiency and accuracy of anti-counterfeiting code generation is improved, the randomness and uniqueness of anti-counterfeiting codes are enhanced, the risks of imitation and fraud are reduced, and resource allocation is optimized and costs are reduced.
Smart Images

Figure CN120181868A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of anti-counterfeiting codes, and in particular to a method for generating factory anti-counterfeiting codes based on cloud collaboration. Background Art
[0002] In the current field of anti-counterfeiting code technology, factories often face many challenges when generating anti-counterfeiting codes. Most traditional anti-counterfeiting code generation methods adopt a simple random code generation strategy. Although this method is simple and easy to implement, it has obvious deficiencies in anti-counterfeiting effect. Due to the lack of systematicity and regularity in the generation of random codes, the verification of anti-counterfeiting codes becomes complicated and prone to errors. At the same time, the traditional anti-counterfeiting code generation method lacks an effective repetition verification mechanism, resulting in repeated code phenomena from time to time, which seriously affects the uniqueness and reliability of anti-counterfeiting codes. In addition, with the rapid development of cloud computing technology, how to make full use of the advantages of cloud collaboration to improve the efficiency of anti-counterfeiting code generation and anti-counterfeiting effect has become an important issue that needs to be urgently solved in the current field of anti-counterfeiting code technology. Most traditional anti-counterfeiting code generation methods are limited to local computing, and cannot achieve effective integration and optimal configuration of resources, resulting in low efficiency and high cost of anti-counterfeiting code generation.
[0003] Therefore, in view of the shortcomings of the prior art, the present invention proposes a factory anti-counterfeiting code generation method based on cloud collaboration, aiming to achieve efficient and accurate generation of anti-counterfeiting codes through cloud collaboration to meet the urgent needs of modern factories for anti-counterfeiting code technology. Summary of the invention
[0004] In view of the shortcomings of the prior art, the purpose of the present invention is to provide a factory anti-counterfeiting code generation method based on cloud collaboration.
[0005] To achieve the above object, the present invention provides the following technical solutions: A method for generating factory anti-counterfeiting codes based on cloud collaboration includes the following steps: An order acquisition step is to acquire order information, wherein the order information includes product type and code package quantity; A primary encoding step, determining the anti-counterfeiting code length according to the product type, and calling a corresponding number of random codes in the database according to the number of code packages to perform the first encoding to obtain an initial anti-counterfeiting code; A secondary encoding step, obtaining an identification code encoding rule according to the product type, and secondary encoding the initial anti-counterfeiting code according to the identification code encoding rule to obtain a final anti-counterfeiting code; The coding verification step is to repeat the final anti-counterfeiting code according to the verification rule, and when a duplicate code appears, the duplicate final anti-counterfeiting code is removed and re-encoded.
[0006] As a further improvement of the present invention, the primary encoding step further includes generating a random code through an encryption algorithm according to the anti-counterfeiting code length, and combining to generate a random code database. The number of random codes in the random code database is several times the number of code packets. The random codes in the database are called according to the number of code packets as the initial anti-counterfeiting codes.
[0007] As a further improvement of the present invention, the secondary encoding step further includes calling the corresponding identification code encoding rule according to the product type, generating a fixed identification code according to the identification code encoding rule, the length of the identification code being the same as the anti-counterfeiting code length. After aligning the initial code positions of the identification code and the initial anti-counterfeiting code, the identification code is fused and encoded based on the initial anti-counterfeiting code to obtain the final anti-counterfeiting code. The code positions with repeated encoding in the fusion encoding are marked with repeated encoding.
[0008] As a further improvement of the present invention, when the final anti-counterfeiting code is sprayed with anti-counterfeiting codes, when a repeated encoding mark is recognized, the code positions with repeated encoding marks are repeatedly sprayed.
[0009] As a further improvement of the present invention, it further includes a two-dimensional code encoding conversion step, converting the final anti-counterfeiting code to generate a corresponding two-dimensional code to obtain the anti-counterfeiting two-dimensional code for spraying.
[0010] As a further improvement of the present invention, there is also an anti-counterfeiting code verification strategy. The anti-counterfeiting code verification strategy includes splitting and verifying the anti-counterfeiting two-dimensional code for duplication according to the identification code. After converting the identification code into a two-dimensional code, this two-dimensional code is extracted from the anti-counterfeiting two-dimensional code, and the verification two-dimensional code is obtained by deleting the extracted two-dimensional code from the anti-counterfeiting two-dimensional code. The code obtained by decoding the verification two-dimensional code is compared with the random code stored in the database. If the decoded code is the same as the random code stored in the database, it means that the anti-counterfeiting two-dimensional code is genuine; otherwise, if the decoded code is different from the random code stored in the database, it means that the anti-counterfeiting two-dimensional code is fake.
[0011] As a further improvement of the present invention, the encoding verification step includes directly comparing whether the pixel patterns of the anti-counterfeiting two-dimensional codes are the same. If they are the same, the anti-counterfeiting two-dimensional code with a later generation time is deleted and the anti-counterfeiting code generation is performed again.
[0012] As a further improvement of the present invention, when splitting and verifying for duplication, the pixels with repeated spraying in the anti-counterfeiting two-dimensional code are retained in the verification two-dimensional code according to the repeated encoding mark.
[0013] A factory anti-counterfeiting code generation system based on cloud collaboration includes: An order acquisition module that acquires order information, where the order information includes product type and the number of code packets; The primary encoding module determines the length of the anti-counterfeiting code according to the product type, and calls the corresponding number of random codes in the database according to the number of code packages for the first encoding to obtain the initial anti-counterfeiting code; The secondary encoding module obtains the encoding rule of the identification code according to the product type, and performs secondary encoding on the initial anti-counterfeiting code according to the encoding rule of the identification code to obtain the final anti-counterfeiting code; The encoding duplicate-checking module performs duplicate checking on the final anti-counterfeiting code according to the duplicate-checking rule. When duplicate codes appear, the duplicate final anti-counterfeiting codes are removed and re-encoded.
[0014] The beneficial effects of the present invention are as follows: Through the docking of the cloud management system and the one-item-one-code management system, the present invention realizes the efficient management of the packaging anti-counterfeiting code printing and packaging production process. By using the method of secondary encoding for encoding the anti-counterfeiting code, the randomness of the anti-counterfeiting code generation can be improved, avoiding the possibility of easy imitation and forgery of two-dimensional codes. Moreover, by using the means of secondary encoding, unified encoding is performed according to the product type during the second encoding, which also enables the authenticity verification of the anti-counterfeiting code, enhancing the practicability and efficiency of the anti-counterfeiting code. At the same time, by using the method of detecting the thickness of the anti-counterfeiting code, the recognition difficulty during the decoding process of the anti-counterfeiting code can be increased, raising the counterfeiting threshold and enhancing the security of the anti-counterfeiting code. Description of the Drawings
[0015] Figure 1 is the flowchart of the method for generating the factory anti-counterfeiting code based on cloud collaboration in the present invention. Detailed Embodiments
[0016] The present invention will be further described in detail below in conjunction with the drawings and embodiments. The same components are denoted by the same reference numerals. It should be noted that the terms "front", "rear", "left", "right", "upper" and "lower" used in the following description refer to the directions in the drawings, and the terms "bottom surface" and "top surface", "inner" and "outer" refer to the directions towards or away from the geometric center of a specific component respectively.
[0017] The present invention designs a method for generating the factory anti-counterfeiting code based on cloud collaboration, as Figure 1 shown, including: The order acquisition step, which acquires order information, and the order information includes the product type and the number of code packages; the product type is used to determine the subsequent encoding rule of the identification code, and the number of code packages is used to determine the number of random codes selected for generating the anti-counterfeiting code. Different product types correspond to different lengths of anti-counterfeiting codes, including different product information. By determining the encoding rule of the identification code through the product type in the order information, the consistency of the same product during different batch productions can be guaranteed, ensuring the verifiability of the anti-counterfeiting code of the same product in the subsequent production process.
[0018] A primary encoding step. In the anti-counterfeiting code generation phase, the anti-counterfeiting code consists of an encoded data string. The length of the anti-counterfeiting code is determined according to the product type. After confirming the length of the anti-counterfeiting code, a random code is generated through an encryption algorithm according to the length of the anti-counterfeiting code. The number of random codes is 1.5 to 2 times the actual number of code packets, and a random code database is combined and generated to ensure that there are enough random codes for selection and replacement to generate the initial anti-counterfeiting code, thereby increasing the security of the anti-counterfeiting code. A code packet application is sent to the database storing the random codes, and after the application is successful, the corresponding number of random codes are called in the database according to the number of code packets for the first encoding to obtain the initial anti-counterfeiting code. The system will call the corresponding number of random codes in the pre-established random code database according to the number of code packets for the first encoding of the anti-counterfeiting code to obtain the initial anti-counterfeiting code. Among them, when generating the random code according to the encryption algorithm, the random code is an encoded data string represented by binary digits 0 and 1 within the length of the anti-counterfeiting code, and the number of binary digits is consistent with the encoding length.
[0019] After the generation of the initial anti-counterfeiting code is completed, it enters the secondary encoding step. The secondary encoding needs to first identify and call the corresponding identification code encoding rule according to the specific product type of the product, and perform the secondary encoding of the initial anti-counterfeiting code according to the identification code encoding rule to obtain the final anti-counterfeiting code, specifically including: According to the specific product type of the product, identify and call the corresponding identification code encoding rule. The identification code encoding rule is preset and unchanged. This way that the identification code generated for each product type is a preset and unchanged encoded data string can ensure that when the same product is produced in different batches, the encoding rule of the secondary encoding does not change, that is, the encoding logic does not change. Thus, the generation of the anti-counterfeiting code has a certain regularity and can be verified for authenticity, so as to ensure the verifiability of the same type of products, thereby increasing the complexity and security of the anti-counterfeiting code. Even under the condition of mass-producing products, the present invention can quickly and accurately verify the authenticity of each product through a consistent encoding logic. Generate a fixed identification code according to the identification code encoding rule. The length of the identification code is the same as the length of the anti-counterfeiting code. The identification code is also an encoded data string represented by binary digits 0 and 1 within the length of the anti-counterfeiting code, and the length of the identification code is the same as the length of the anti-counterfeiting code. Through such a setting, the anti-counterfeiting code can be encoded twice, namely the initial encoding and the secondary encoding. When there are repeated encoding bits in the anti-counterfeiting code, it is necessary to repeatedly spray the bit during the anti-counterfeiting code inkjet printing stage, so that the anti-counterfeiting code has a thickness that can be recognized. According to the thickness of the anti-counterfeiting code after inkjet printing, information recognition can be performed on the inkjet printing area to obtain a signal that the area has been repeatedly encoded. After aligning the identification code with the initial bit of the initial anti-counterfeiting code, fuse and encode the identification code based on the initial anti-counterfeiting code to obtain the final anti-counterfeiting code, that is, encode the identification code obtained after the secondary encoding onto the initial anti-counterfeiting code again through the encoding rule, and perform repeated encoding marking on the repeated encoding bits in the fused encoding. Through the preset and unchanged encoding rule, the present invention can ensure that when the same product is produced in different batches, the encoding rule of the secondary encoding does not change. This consistency ensures the logic and regularity of the generation of the anti-counterfeiting code, so that the final anti-counterfeiting code can be accurately verified for authenticity, thereby effectively preventing forgery and counterfeiting. The secondary encoding step not only increases the complexity and security of the anti-counterfeiting code, but also ensures the verifiability of the anti-counterfeiting code through the preset encoding rule. Even in the face of mass production of products, the present invention can quickly and accurately verify the authenticity of each product through a consistent encoding logic.
[0020] Encoding duplicate check step: Repeatedly check the final anti-counterfeiting code according to the duplicate check rules. When duplicate codes appear, eliminate the duplicate final anti-counterfeiting codes and re-encode. After generating the final anti-counterfeiting code, start the encoding duplicate check step. Through repeated checking, ensure the uniqueness of each generated anti-counterfeiting code. Since the primary encoding and secondary encoding are performed for secondary encoding and secondary spraying on the same section of the anti-counterfeiting code, even if the initial anti-counterfeiting code selected for the primary encoding itself has uniqueness, the final anti-counterfeiting code obtained after secondary encoding may have duplicate problems due to the existence of duplicate encoding parts. The comprehensive check of the final anti-counterfeiting code through duplicate check includes comparing with the existing anti-counterfeiting code database, checking the format and length of the code, and verifying the randomness and uniqueness of the code, etc. During the checking process, if duplicate final anti-counterfeiting codes are found, immediately eliminate these duplicate codes from the valid code list. After elimination, call the primary encoding and secondary encoding steps again to generate new codes.
[0021] Specifically, when spraying the anti-counterfeiting code for the final anti-counterfeiting code, when a duplicate coding mark is recognized, repeat the spraying on the code position with the duplicate coding mark. When repeating the spraying on the code position with the duplicate coding mark, this code position has two spraying thicknesses and can be recognized during anti-counterfeiting code verification, so that the anti-counterfeiting code with spraying can be decoded and verified according to the spraying thickness.
[0022] Specifically, it also includes a two-dimensional code encoding conversion step. Generate a corresponding two-dimensional code according to the final anti-counterfeiting code to obtain the anti-counterfeiting two-dimensional code for spraying. After completing the final encoding, generate a corresponding two-dimensional code according to the final anti-counterfeiting code, and convert the anti-counterfeiting code in the form of a digital data string into a machine-readable two-dimensional code format.
[0023] Specifically, an anti-counterfeiting code verification strategy is also provided. The anti-counterfeiting code verification strategy includes splitting and verifying the anti-counterfeiting QR code according to the identification code. After converting the identification code into a QR code, the QR code is extracted from the anti-counterfeiting QR code, and the verification QR code is obtained by deleting the extracted QR code from the anti-counterfeiting QR code. The code obtained after decoding the verification QR code is compared with the random code stored in the database. If the decoded code is the same as the random code stored in the database, it means that the anti-counterfeiting QR code is genuine; otherwise, if the decoded code is different from the random code stored in the database, it means that the anti-counterfeiting QR code is fake. Specifically, when splitting and verifying, the pixels with repeated spraying in the anti-counterfeiting QR code are retained in the verification QR code according to the repeated coding mark. Splitting and verifying is to first split the QR code and restore it to the anti-counterfeiting code. During the splitting process, the system will identify the spraying area with repeated spraying marks and decode it twice during the decoding process. That is, according to the identification code corresponding to the product type, the corresponding part of the identification code in the final anti-counterfeiting code obtained by decoding the QR code is removed, and the anti-counterfeiting code bits obtained by decoding the repeated spraying mark area are used to complete the filling. The decoded verification anti-counterfeiting code is compared with the initial anti-counterfeiting code stored in the database. If the comparison is consistent, the anti-counterfeiting QR code is output as genuine. If the comparison is inconsistent, the anti-counterfeiting QR code is output as fake.
[0024] Specifically, the code verification and duplication checking step includes directly comparing whether the pixel patterns of the anti-counterfeiting QR codes are the same. If they are the same, the anti-counterfeiting QR code with a later generation time is deleted and the anti-counterfeiting code is generated again. That is, the duplicate QR codes are directly deleted by comparing the pixel patterns of the anti-counterfeiting QR codes, and the corresponding number of new QR codes are obtained again.
[0025] A factory anti-counterfeiting code generation system based on cloud collaboration includes: An order acquisition module that acquires order information, where the order information includes product type and code package quantity; A primary coding module that determines the anti-counterfeiting code length according to the product type and calls the corresponding number of random codes in the database according to the code package quantity for the first coding to obtain the initial anti-counterfeiting code; A secondary coding module that obtains the identification code coding rule according to the product type and performs secondary coding on the initial anti-counterfeiting code according to the identification code coding rule to obtain the final anti-counterfeiting code; A code verification and duplication checking module that performs repeated verification on the final anti-counterfeiting code according to the verification and duplication checking rule. When duplicate codes appear, the duplicate final anti-counterfeiting codes are removed and coding is performed again.
[0026] The basic features, principles, and advantages of the present invention have been shown and described above. It should be noted that the present invention is not limited by the above embodiments, which are only partial embodiments. Without departing from the spirit and scope of the present invention, several improvements and supplements made are regarded as within the protection scope of the present invention.
Claims
1. A method for generating factory anti-counterfeiting codes based on cloud collaboration, characterized in that: The steps include: An order acquisition step, acquiring order information, wherein the order information includes product type and code package quantity; A primary encoding step, determining the anti-counterfeiting code length according to the product type, and calling a corresponding number of random codes in the database according to the number of code packages to perform the first encoding to obtain an initial anti-counterfeiting code; A secondary encoding step, obtaining an identification code encoding rule according to the product type, and secondary encoding the initial anti-counterfeiting code according to the identification code encoding rule to obtain a final anti-counterfeiting code; The coding verification step is to repeat the final anti-counterfeiting code according to the verification rule, and when a duplicate code appears, the duplicate final anti-counterfeiting code is removed and re-encoded.
2. The method for generating factory anti-counterfeiting codes based on cloud collaboration according to claim 1, characterized in that: The one-time encoding step also includes generating a random code through an encryption algorithm according to the length of the anti-counterfeiting code, and combining to generate a random code database, wherein the number of random codes in the random code database is several times the number of code packages, and the random code in the database is called as the initial anti-counterfeiting code according to the number of code packages.
3. The method for generating factory anti-counterfeiting codes based on cloud collaboration according to claim 1, characterized in that: The secondary encoding step also includes calling the corresponding identification code encoding rules according to the product type, generating a fixed identification code according to the identification code encoding rules, the length of the identification code is the same as the length of the anti-counterfeiting code, aligning the identification code with the initial code position of the initial anti-counterfeiting code, and then fusing the identification code based on the initial anti-counterfeiting code to obtain the final anti-counterfeiting code, and marking the repeated coded code positions in the fused code with repeated coding marks.
4. The method for generating factory anti-counterfeiting codes based on cloud collaboration according to claim 3 is characterized in that: When the final anti-counterfeiting code is sprayed, if a repeated coding mark is identified, the code position with the repeated coding mark is repeatedly sprayed.
5. The method for generating factory anti-counterfeiting codes based on cloud collaboration according to claim 1, characterized in that: The method also includes a two-dimensional code conversion step, in which a corresponding two-dimensional code is generated according to the final anti-counterfeiting code conversion to obtain an anti-counterfeiting two-dimensional code for coding.
6. The method for generating factory anti-counterfeiting codes based on cloud collaboration according to claim 1, characterized in that: An anti-counterfeiting code verification strategy is also provided, which includes splitting the anti-counterfeiting two-dimensional code for weight verification according to the identification code, converting the identification code into a two-dimensional code, extracting the two-dimensional code from the anti-counterfeiting two-dimensional code, and deleting the extracted two-dimensional code on the basis of the anti-counterfeiting two-dimensional code to obtain a verification two-dimensional code, and comparing the code obtained after decoding the verification two-dimensional code with the random code stored in the database. If the code obtained after decoding is the same as the random code stored in the database, it indicates that the anti-counterfeiting two-dimensional code is true; otherwise, if the code obtained after decoding is different from the random code stored in the database, it indicates that the anti-counterfeiting two-dimensional code is false.
7. The method for generating factory anti-counterfeiting codes based on cloud collaboration according to claim 1, characterized in that: The code verification step includes directly comparing the pixel patterns of the anti-counterfeiting two-dimensional codes to see if they are consistent. If they are consistent, the anti-counterfeiting two-dimensional code with a later generation time is deleted and the anti-counterfeiting code is regenerated.
8. The method for generating factory anti-counterfeiting codes based on cloud collaboration according to claim 6, characterized in that: When the code is split for weight verification, the pixels with repeated coding in the anti-counterfeiting two-dimensional code are retained in the verification two-dimensional code according to the repeated coding mark.
9. A factory anti-counterfeiting code generation system based on cloud collaboration, applicable to a factory anti-counterfeiting code generation method based on cloud collaboration as claimed in any one of claims 1 to 8, characterized in that: include: An order acquisition module acquires order information, including product type and code package quantity; A one-time encoding module determines the length of the anti-counterfeiting code according to the product type, and calls a corresponding number of random codes in the database according to the number of code packages to perform the first encoding to obtain an initial anti-counterfeiting code; A secondary encoding module, which obtains the identification code encoding rule according to the product type, and secondary encodes the initial anti-counterfeiting code according to the identification code encoding rule to obtain a final anti-counterfeiting code; The code weight verification module performs a repeated check on the final anti-counterfeiting code according to the weight verification rule, and when a repeated code appears, the repeated final anti-counterfeiting code is removed and the code is re-encoded.