Anti-counterfeiting code generation method, system and equipment based on multiple label carriers and medium
By generating composite encryption seeds and dynamically adjusting the length of the anti-counterfeiting code, the problem of fixed data capacity and security strength of the tag carrier in the prior art is solved, and the flexibility and security of the anti-counterfeiting code is realized to meet the anti-counterfeiting needs of different products.
Patent Information
- Application Number
- CN202510568300.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-30
- Publication Date
- 2025-08-19
- Estimated Expiration
- 2045-04-30
AI Technical Summary
The existing anti-counterfeiting code generation methods cannot dynamically adjust data capacity and security strength according to the type of tag carrier, resulting in waste of resources from high-cost tag carriers or insufficient security levels of low-cost carriers, making it difficult to adapt to complex and changeable market environments.
Compound encryption seeds are generated based on product cost level and unique identifier of the coding device, the anti-counterfeiting code length is dynamically adjusted, and the final anti-counterfeiting code is generated through multiple rounds of encryption, and stored in the cloud blockchain node to achieve traceability and security of the anti-counterfeiting code.
It improves the security and adaptability of anti-counterfeiting codes, balances production costs and security needs, realizes the flexibility and traceability of anti-counterfeiting codes, and avoids the problems of waste of resources and insufficient security.
Smart Images

Figure CN120509428A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of anti-counterfeiting code generation, and in particular to a method, system, device and medium for generating anti-counterfeiting codes based on multiple label carriers. Background Art
[0002] In today's market, counterfeit and shoddy products are rampant, severely damaging consumer rights and corporate brand image. The development of anti-counterfeiting technology plays a crucial role in maintaining market order, protecting consumer rights, and enhancing corporate brand image. Currently, a variety of anti-counterfeiting technologies have emerged on the market, each ensuring product uniqueness and authenticity through different approaches, providing a certain degree of security for consumers and businesses.
[0003] To address anti-counterfeiting needs, existing technologies typically use static algorithms to generate fixed-length QR code security codes and embed the plaintext information directly into the label. While this system reduces label printing costs, the fixed length and encryption rules of the security code make it impossible to dynamically adjust the data capacity and security strength based on the label carrier type. Furthermore, the single encryption strength cannot adapt to the security requirements of different industries, resulting in inefficient utilization of high-cost label carriers or insufficient security levels for low-cost carriers.
[0004] However, existing methods for generating anti-counterfeiting codes suffer from significant drawbacks: The code length and encryption rules are fixed, making it impossible to dynamically adjust the data capacity and security strength based on the label carrier type. Furthermore, a single encryption strength makes it difficult to adapt to the diverse security requirements of different industries, resulting in wasted resources on high-cost label carriers or insufficient security levels on low-cost carriers. This makes the anti-counterfeiting system inflexible in the complex and volatile market environment, making it difficult to meet the anti-counterfeiting needs of different product types. Summary of the Invention
[0005] The first purpose of this application is to provide a method for generating anti-counterfeiting codes based on multiple label carriers, which can flexibly set the length of the anti-counterfeiting code according to the security requirements and information storage capacity of different products, thereby improving the security and adaptability of the anti-counterfeiting code.
[0006] In the first aspect, the present application provides a method for generating an anti-counterfeiting code based on multiple label carriers, which adopts the following technical solution: A method for generating anti-counterfeiting codes based on multiple label carriers, comprising: Matching the label carrier type from a preset carrier type database based on the product's cost level, where the cost level is calculated by combining the product's market unit price and the cost of counterfeiting; Obtaining a unique identifier for the betting device, the unique identifier including the industry type parameter, device serial number, betting time, and geographic region code bound when the betting device was registered; generating an encryption seed by combining the cost level and the unique identifier to generate a composite encryption seed; Based on the data capacity limit of the label carrier, the initial length of the anti-counterfeiting code is dynamically adjusted to generate a basic anti-counterfeiting code sequence; Determine the encryption algorithm combination and encryption rounds according to the security threshold corresponding to the product cost level, perform multiple rounds of encryption on the basic anti-counterfeiting code sequence, and generate the final anti-counterfeiting code; The anti-counterfeiting code is written into a matching label carrier, and the encryption seed, encryption rounds and industry type parameters are stored in association with the cloud blockchain node.
[0007] By adopting the above technical solution, the corresponding label carrier type is matched according to the cost level of the product, and the initial length of the anti-counterfeiting code is dynamically adjusted based on the data capacity limit of the label carrier, so as to balance the production cost of the anti-counterfeiting code and the security requirements for protecting the product. At the same time, the appropriate encryption algorithm combination and encryption rounds are selected according to the security threshold corresponding to the product cost level, which effectively improves the security strength of the anti-counterfeiting code; the final generated anti-counterfeiting code is written into the label carrier that matches the security requirements, and the relevant encryption information is stored in the cloud blockchain node, thereby realizing the full traceability and security protection of the anti-counterfeiting code.
[0008] In a preferred example, the present application may be further configured as follows: the step of dynamically adjusting the initial length of the anti-counterfeiting code based on the data capacity limitation of the label carrier and generating the basic anti-counterfeiting code sequence includes: The initial code length is set to L0 according to the maximum data capacity of the tag carrier; The final code length is calculated using the formula L = L0 + k×S, where S is the counterfeit case investigation rate and k is the capacity expansion factor. When L exceeds the carrier capacity, the data compression algorithm is enabled to compress the encryption result.
[0009] By adopting the above technical solution, the counterfeit case investigation rate and capacity expansion coefficient are introduced to calculate the final code length, thereby enhancing the security and flexibility of the generated anti-counterfeiting code; when the code length exceeds the carrier capacity, the data compression algorithm is enabled to effectively solve the data overflow problem, thereby realizing dynamic code length adjustment based on the data capacity of the label carrier, so that the anti-counterfeiting code length matches the security requirements.
[0010] In a preferred example, the present application may be further configured as follows: the step of obtaining a unique identifier of the injection device, wherein the unique identifier includes the industry type parameter, device serial number, injection time, and geographic area code bound when the injection device is registered, includes: Concatenate the serial number of the injection device and the industry type parameter to generate a string, perform a hash operation on the string, and generate a device identification code; The device identification code, injection time and geographic area code are embedded in the end of the hash result in binary form to generate a unique identifier.
[0011] By adopting the above technical solution, the serial number of the injection device and the industry type parameters are concatenated to generate a string and a hash operation is performed to generate a device identity code, making the identifier unique and tamper-proof; at the same time, the device identity code, injection time and geographic area code are combined to generate a unique identifier, which further increases the information capacity of the identifier and facilitates differentiated management according to different geographic areas.
[0012] In a preferred example, the present application may be further configured as follows: the step of matching the label carrier type from a preset carrier type database according to the cost level of the product, wherein the cost level is calculated by combining the market unit price of the product and the counterfeit cost, includes: Set the cost level of the product to several levels from high to low, and set the value range of each cost level; Based on the technical complexity level of product counterfeiting and the regional risk level of the target sales area, the counterfeit risk parameters are evaluated according to preset weights, and the counterfeit cost value corresponding to the counterfeit risk parameters is obtained; The cost level of the product is obtained by matching according to the product's market unit price in the target sales area and the counterfeit cost value.
[0013] By adopting the above technical solution, the product cost level is divided into several levels and a value range is set. The counterfeit risk parameter is evaluated in combination with the technical complexity level of product counterfeiting and the regional risk level, and the counterfeit cost value is calculated accordingly, further improving the accuracy of the cost level evaluation; the cost level is then determined based on the product market unit price and the counterfeit cost value, thereby providing suitable label carrier types for products with different security requirements, effectively improving the flexibility and security of the anti-counterfeiting system, and achieving the effect of accurately matching the label carrier type according to the product cost level and counterfeit risk parameter.
[0014] In a preferred example, the present application may be further configured as follows: the step of evaluating the counterfeit risk parameters according to the technical complexity level of product counterfeiting and the geographical risk level of the target sales area according to preset weights, and matching and obtaining the counterfeit cost value of the counterfeit risk parameters includes: Determine the level of technical complexity based on the production cost of the product in question; Determine the regional risk level based on the counterfeit case detection rate in the target sales area of the product.
[0015] By adopting the above technical solution, the technical complexity level is determined according to the production cost of the product, and the regional risk level is determined in combination with the counterfeit case investigation rate in the target sales area. This not only achieves a refined assessment of product counterfeit risk parameters and improves the accuracy of risk assessment, but also provides a scientific basis for the subsequent matching of counterfeit cost values, thereby improving the pertinence and effectiveness of the anti-counterfeiting code generation method.
[0016] In a preferred embodiment, the present application may be further configured as follows: before the step of matching the label carrier type from a preset carrier type database based on the cost level of the product, wherein the cost level is calculated by combining the market unit price of the product and the counterfeit cost, the method further includes: Set the cost level of the product from high to low as the first-level cost level, the second-level cost level, the third-level cost level, and the fourth-level cost level, and set the value range of each cost level; The NFC chip is set as the tag carrier of the first-level cost level matching, the RFID chip is set as the tag carrier of the second-level cost level matching, and the QR code is set as the tag carrier of the third-level cost level matching.
[0017] By adopting the above technical solution, the value range of each cost level is clarified, and then the appropriate label carrier type is matched for products of different cost levels. This not only ensures that the anti-counterfeiting needs of high-cost products are fully met, but also effectively reduces the anti-counterfeiting costs of low-cost products, improves the economy and applicability of the overall anti-counterfeiting system, and realizes refined label carrier matching for products of different cost levels.
[0018] In a preferred example, the present application may be further configured as follows: after the step of writing the anti-counterfeiting code into a matching label carrier and associating and storing the encryption seed, encryption rounds, and industry type parameters in a cloud blockchain node, the following steps may also be included: In response to the anti-counterfeiting code verification operation, the anti-counterfeiting code is destroyed and only the cloud encrypted log is retained.
[0019] By adopting the above technical solution, the anti-counterfeiting code is destroyed after verification, and only the cloud-encrypted log is retained, so that the anti-counterfeiting code can only be used once, minimizing the security risks brought by repeated verification. At the same time, by using the cloud-based blockchain node to store relevant information, the traceability and non-tamperability of the anti-counterfeiting information can be achieved.
[0020] In a second aspect, the present application provides an anti-counterfeiting code generation system based on multiple label carriers, which adopts the following technical solutions: A system for generating anti-counterfeiting codes based on multiple label carriers, comprising: Carrier matching module: used to match the label carrier type from a preset carrier type database according to the product's cost level, where the cost level is calculated by combining the product's market unit price and the counterfeit cost; Identification acquisition module: used to obtain the unique identifier of the injection device, which includes the industry type parameter, device serial number, injection time and geographical area code bound when the injection device is registered; A seed generation module: configured to generate an encryption seed by combining the cost level and the unique identifier to generate a composite encryption seed; Capacity adaptation module: used to dynamically adjust the initial length of the anti-counterfeiting code based on the data capacity limit of the label carrier and generate the basic anti-counterfeiting code sequence; Multi-level encryption module: used to determine the encryption algorithm combination and encryption rounds according to the security threshold corresponding to the product cost level, perform multiple rounds of encryption on the basic anti-counterfeiting code sequence, and generate the final anti-counterfeiting code; Anti-counterfeiting code writing module: used to write the anti-counterfeiting code into the matching label carrier, and associate and store the encryption seed, encryption round and industry type parameters to the cloud blockchain node.
[0021] In a third aspect, the present application provides an electronic device, which adopts the following technical solution: An electronic device includes a memory, a processor, and a computer program stored in the memory and runnable on the processor. When the processor executes the computer program, the steps of the above-mentioned method for generating an anti-counterfeiting code based on multiple label carriers are implemented.
[0022] In a fourth aspect, the present application provides a computer storage medium, including the following technical solutions: A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of the above-mentioned method for generating an anti-counterfeiting code based on multiple label carriers.
[0023] In summary, this application has the following beneficial technical effects: This application improves the security and adaptability of anti-counterfeiting code generation by matching the label carrier type according to the cost level of the product and generating a composite encryption seed in combination with the unique identifier of the coding device. It also dynamically adjusts the initial length of the anti-counterfeiting code to adapt to the data capacity limitations of different label carriers. At the same time, it determines the encryption algorithm combination and encryption rounds according to the security threshold, effectively solving the problem of fixed anti-counterfeiting code length and encryption strength. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] Figure 1 This is a flowchart of a method for generating an anti-counterfeiting code based on multiple label carriers in one embodiment of the present application.
[0025] Figure 2 This is a flowchart of the sub-steps of step S4 in one embodiment of the present application.
[0026] Figure 3 This is a flowchart of the sub-steps of step S2 in one embodiment of the present application.
[0027] Figure 4 This is a flowchart of the sub-steps of step S1 in one embodiment of the present application.
[0028] Figure 5 This is a flowchart of the sub-steps of step S11 in one embodiment of the present application.
[0029] Figure 6 This is a flowchart of the steps added before step S1 in one embodiment of the present application.
[0030] Figure 7 This is a flowchart of the steps added after step S6 in one embodiment of the present application.
[0031] Figure 8 This is a structural diagram of an anti-counterfeiting code generation system based on multiple label carriers according to one embodiment of the present application.
[0032] Figure 9 It is a principle block diagram of an electronic device in one embodiment of the present application.
[0033] Figure numerals: 1. Carrier matching module; 2. Identification acquisition module 3. Seed generation module; 4. Capacity adaptation module; 5. Multi-level encryption module; 6. Anti-counterfeiting code writing module. DETAILED DESCRIPTION
[0034] The following is combined with Figure 1-9 This application is described in further detail.
[0035] It should be noted that all actions of obtaining data or information or data in this application are carried out in compliance with the relevant data protection laws and policies of the country where they are located and with the authorization of the corresponding users.
[0036] refer to Figure 1 , a method for generating anti-counterfeiting codes based on multiple label carriers, specifically comprising: S1. Match the label carrier type from a preset carrier type database according to the cost level of the product. The cost level is calculated by combining the market unit price of the product and the counterfeit cost.
[0037] Specifically, generally speaking, the higher the production cost of a product, the greater the loss to consumers who purchased the product if it is counterfeited. Therefore, it is necessary to improve the anti-counterfeiting ability to determine whether a product is legitimate and authentic. Consequently, it is necessary to configure more costly products with more secure anti-counterfeiting codes. When producing anti-counterfeiting codes, production costs must also be considered, including the purchase or production costs of the label carrier. Similarly, generally speaking, the higher the security level of the label carrier, the higher the purchase or production cost required. Therefore, selecting the label carrier based on the product production cost achieves a balance between the production cost of the anti-counterfeiting code and the security requirements required to protect the product.
[0038] S2. Obtain a unique identifier for the coding device. The unique identifier includes the industry type parameter, device serial number, coding time, and geographic area code bound when the coding device is registered.
[0039] Specifically, in this embodiment, the industry type parameter can be set by the user in the cloud, and the geocoding is set to the GB / T2260 administrative division code. The industry type parameter, the coding time, the geographical coding setting of the production location, and the device serial number are combined to form a unique device identifier, thus overcoming the limitation that a single device is easily counterfeited. In addition, the industry parameter limits the device usage scenario, while the geocoding enables regional traceability, strongly tying the anti-counterfeiting code to the production source. The addition of the precise coding time further increases the difficulty of other counterfeit coding devices being copied across industries or regions on the coding device side.
[0040] S3. Generate an encryption seed by combining the cost level and the unique identifier to generate a composite encryption seed.
[0041] Specifically, the product cost level is combined with the multi-dimensional identification of the device to generate an irreversible encrypted seed. The seed value is dynamically reconstructed and recorded in the cloud as the cost level changes, thereby improving the security of the anti-counterfeiting code.
[0042] S4. Based on the data capacity limitation of the label carrier, the initial length of the anti-counterfeiting code is dynamically adjusted to generate a basic anti-counterfeiting code sequence.
[0043] Specifically, the length of the anti-counterfeiting code is flexibly set according to the security requirements of different products and the information storage capacity of the label carrier, thereby improving the security and adaptability of the anti-counterfeiting code.
[0044] S5. Determine the encryption algorithm combination and encryption rounds based on the security threshold corresponding to the product cost level, perform multiple rounds of encryption on the basic anti-counterfeiting code sequence, and generate the final anti-counterfeiting code.
[0045] Specifically, higher cost levels require higher security thresholds, and the number of encryption rounds is positively correlated with the security threshold. This means that higher cost levels require higher security thresholds, necessitating more complex encryption algorithm combinations and requiring higher encryption rounds. By dynamically adjusting the security thresholds based on product cost levels, we can improve the resistance of high-value product security codes to brute-force attacks and improve the efficiency of security code production while controlling the production costs of low-value product security codes.
[0046] S6. Write the anti-counterfeiting code into the matching label carrier, and store the encryption seed, encryption rounds, and industry type parameters in association with the cloud blockchain node.
[0047] Specifically, the final anti-counterfeiting code is written into a label carrier that matches the security requirements, and the relevant encrypted information is stored in the cloud blockchain node, thereby improving the security of the anti-counterfeiting code and realizing the traceability of the anti-counterfeiting code during the code injection process.
[0048] refer to Figure 2 Furthermore, in one embodiment, step S4 is further divided into the following sub-steps: S40: Set the initial code length to L0 according to the maximum data capacity of the tag carrier.
[0049] Specifically, the initial code length L0 is determined by presetting the maximum data capacity of the label carrier, and a basic length benchmark is established to minimize the risk of data overflow due to the physical limitations of the label carrier, so that the anti-counterfeiting code can adapt to the carrier storage space and provide a security benchmark for subsequent dynamic expansion.
[0050] S41. Calculate the final code length using the formula L = L0 + k × S, where S is the counterfeit case investigation rate and k is the capacity expansion coefficient.
[0051] Specifically, the code length is dynamically calculated based on the counterfeiting risk across the sales region and quantified using the counterfeit investigation rate. The counterfeit investigation rate S = total sales in the target region / number of counterfeit products * 100%. Then, the code length is elastically scaled using the capacity expansion factor k, which is calculated by rounding up to a non-negative integer to obtain the result of k × S.
[0052] Moreover, after obtaining the increased code length, the code length is matched to the increased code preset in the cloud and added to the encryption algorithm for encryption.
[0053] S42. When L exceeds the carrier capacity, a data compression algorithm is enabled to compress the encryption result.
[0054] Specifically, when the code length exceeds the capacity of the label carrier, a data compression algorithm is enabled to solve the problem of data overflow, thereby realizing dynamic code length adjustment based on the data capacity of the label carrier, so that the anti-counterfeiting code length matches the security requirements.
[0055] In addition, reference Figure 3 Furthermore, in one embodiment, step S2 is further divided into the following sub-steps: S20: Concatenate the serial number of the coding device and the industry type parameter to generate a character string, perform a hash operation on the character string, and generate a device identification code.
[0056] Specifically, the serial number of the injection device and the industry type parameter are concatenated to generate a string and hashed to generate the device identification code, making the identifier of the injection device unique and tamper-proof. The industry type parameter is set by the user and stored in the cloud, and each industry type parameter is unique.
[0057] S21. Embed the device identification code, injection time, and geographic area code in binary form at the end of the hash result to generate a unique identifier.
[0058] Specifically, the unique identifier generated by combining the device identification code, injection time and geographic area code can facilitate differentiated management according to different geographic areas, while increasing the information capacity of the identifier, making the composition of the anti-counterfeiting code more complex, thereby improving the security of the anti-counterfeiting code.
[0059] In addition, reference Figure 4 Furthermore, in one embodiment, step S1 is further divided into the following sub-steps: S10. Set the cost level of the product to several levels from high to low, and set the value range of each cost level.
[0060] Specifically, product cost levels are divided into several tiers to determine security thresholds. Higher cost levels elevate security thresholds, requiring more complex encryption algorithms and increasing the number of encryption rounds. The cost level range is determined based on the production costs of several products recorded in the cloud.
[0061] S11. Based on the technical complexity level of product counterfeiting and the geographical risk level of the target sales area, the counterfeit risk parameters are evaluated according to the preset weights, and the counterfeit cost values of the counterfeit risk parameters are matched.
[0062] Specifically, the more technically complex a product is, the greater the investment cost and the higher the technical complexity level. The higher the geographic risk of the target sales area, the higher the risk of counterfeiting the product in that area. Combining the product's technical complexity level and geographic risk level to assess counterfeit risk parameters and calculate the counterfeit cost value accordingly further improves the accuracy of cost level assessment. Preset weights are user-defined. In this embodiment, the weight for the technical complexity level is 0.7, and the weight for the geographic risk level is 0.3.
[0063] S12. According to the product value of the market unit price of the product in the target sales area and the counterfeit cost value, the cost level of the product is matched and obtained.
[0064] Specifically, the market unit price varies in each sales region, and the losses incurred by consumers after purchasing counterfeit products also vary. By calculating the product of the market unit price in the target sales region and the counterfeit cost value, combined with transaction data between buyers and sellers, a more accurate assessment of the product's cost tier can be made. This product value is then matched to the range of values for each cost tier. The market unit price of the product in the target sales region is obtained from sales data uploaded to the cloud by distributors of various tiers in the target sales region.
[0065] Therefore, determining the cost level based on the product market unit price and the counterfeit cost value can provide an adaptive label carrier type for products with different security requirements, thereby improving the flexibility and security of the anti-counterfeiting system.
[0066] In addition, reference Figure 5 Furthermore, in one embodiment, step S11 is further divided into the following sub-steps: S110. Determine the technical complexity level based on the production cost of the product.
[0067] Specifically, product production costs change dynamically based on real-time market fluctuations. Therefore, the determination of the technical complexity level will also change at any time. Ultimately, the product security codes generated at different time periods will also change, and the generation of product security codes will also be more diverse. Furthermore, the higher the product's production cost, the higher the technical complexity level and the larger the corresponding quantitative value.
[0068] S111. Determine the regional risk level based on the counterfeit case investigation rate in the target sales area of the product.
[0069] Specifically, the regional risk level is determined based on the counterfeit case detection rate within the target sales area. Counterfeit case detection rate = total sales volume in the target area / number of counterfeit products * 100%. Counterfeit cases are collected through complaints and reports from consumers within each sales area who scan the product's security code and identify it as a counterfeit. Furthermore, the higher the counterfeit case detection rate, the greater the regional risk level and the corresponding quantitative value.
[0070] In addition, reference Figure 6 Furthermore, in one embodiment, before step S1, steps S13 and S14 are added: S13. Set the cost level of the product from high to low as the first-level cost level, the second-level cost level, the third-level cost level, and the fourth-level cost level, and set the value range of each cost level.
[0071] Specifically, by obtaining the value range of each cost level and then matching label carrier types of different costs to products of different cost levels, the anti-counterfeiting needs of high-cost products can be fully met while reducing the anti-counterfeiting costs of low-cost products.
[0072] S14. Set the NFC chip as a label carrier matching the first-level cost level, set the RFID chip as a label carrier matching the second-level cost level, and set the QR code as a label carrier matching the third-level cost level.
[0073] Specifically, NFC chips set to a level 1 cost have a storage capacity of 4KB-64KB and support storage of multiple layers of encrypted data, digital certificates, and traceability information. They also support hardware-level encryption (such as SE security elements), two-way authentication, and dynamic data updates. These chips are suitable for high-value products such as luxury goods and precision instruments, which must resist professional-level counterfeiting attacks. RFID chips set to a level 2 cost match have a storage capacity of 96 bits to 2KB and can store basic encrypted data and batch information. Through static data encryption and low-frequency passive communication, they are resistant to common copying attacks and are suitable for mid-range products such as home appliances and branded apparel, which require a balance between cost and anti-counterfeiting requirements. QR codes set to a level 3 cost have a storage capacity of tens to hundreds of bytes and are suitable for storing short encrypted strings. They rely on visual anti-counterfeiting (holographic layers) and algorithmic encryption, making them vulnerable to batch copying attacks. They are suitable for low-priced products such as fast-moving consumer goods and daily necessities, meeting basic anti-counterfeiting requirements.
[0074] In addition, reference Figure 7 Furthermore, in one embodiment, after step S6, a step S60 is added: S60: In response to the security code verification operation, the security code is destroyed, and only the cloud encrypted log is retained.
[0075] Specifically, the anti-counterfeiting code is destroyed in the cloud after verification by the consumer, and only the cloud encrypted log is retained, indicating that the current anti-counterfeiting code has been verified, so that the anti-counterfeiting code can only be used once, reducing the security risks brought by repeated verification.
[0076] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0077] The embodiment of the present application further provides an anti-counterfeiting code generation system based on multiple label carriers. The anti-counterfeiting code generation system based on multiple label carriers corresponds one-to-one to the anti-counterfeiting code generation method based on multiple label carriers in the embodiment.
[0078] refer to Figure 8 A system for generating anti-counterfeiting codes based on multiple label carriers includes: a carrier matching module 1, an identification acquisition module 2, a seed generation module 3, a capacity adaptation module 4, a multi-level encryption module 5, and an anti-counterfeiting code writing module 6. The functional modules are described in detail as follows: Carrier matching module 1: used to match the label carrier type from the preset carrier type database according to the cost level of the product. The cost level is calculated by combining the market unit price of the product and the counterfeit cost.
[0079] Identification collection module 2: used to obtain the unique identifier of the injection device. The unique identifier includes the industry type parameters, device serial number, injection time and geographical area code bound when the injection device is registered.
[0080] Seed generation module 3: used to generate an encryption seed by combining the cost level and the unique identifier to generate a composite encryption seed.
[0081] Capacity adaptation module 4: used to dynamically adjust the initial length of the anti-counterfeiting code based on the data capacity limit of the label carrier and generate a basic anti-counterfeiting code sequence.
[0082] Multi-level encryption module 5: used to determine the encryption algorithm combination and encryption rounds according to the security threshold corresponding to the product cost level, perform multiple rounds of encryption on the basic anti-counterfeiting code sequence, and generate the final anti-counterfeiting code.
[0083] Anti-counterfeiting code writing module 6: used to write the anti-counterfeiting code into the matching label carrier, and associate and store the encryption seed, encryption round and industry type parameters to the cloud blockchain node.
[0084] Among them, the carrier matching module 1 matches the label carrier type from the preset database according to the cost level of the product, calculates the cost level in combination with the product market unit price and the counterfeit cost, so that the label carrier matches the product value, and tries to avoid the problem of high-cost labels being inefficiently used or low-cost labels being insufficiently secure; the identification acquisition module 2 obtains the unique identifier of the code injection device, which enhances the traceability of the anti-counterfeiting code generation process and the device identity authentication capability; the seed generation module 3 generates a composite encryption seed based on the cost level and the unique identifier, which improves the basic security of the anti-counterfeiting code generation and provides stronger randomness and unpredictability for the subsequent encryption process; the capacity adaptation module 4 is based on the label The data capacity limit of the carrier dynamically adjusts the initial length of the anti-counterfeiting code to generate a basic anti-counterfeiting code sequence, allowing the anti-counterfeiting code to be optimally stored in label carriers of different capacities while meeting security and data integrity requirements. The multi-level encryption module 5 determines the encryption algorithm combination and encryption rounds based on the security threshold corresponding to the product cost level, performs multiple rounds of encryption on the basic anti-counterfeiting code sequence, and generates the final anti-counterfeiting code, achieving multi-layered security protection and increasing the difficulty of cracking the anti-counterfeiting code. The anti-counterfeiting code writing module 6 writes the anti-counterfeiting code to the matching label carrier and associates and stores the encryption seed, encryption rounds, and industry type parameters to the cloud blockchain node, improving the immutability and verifiability of the anti-counterfeiting code information. Through the combination of these modules, when encoding different products, the appropriate label carrier type can be flexibly selected based on the product's cost level and security requirements, effectively improving the security and adaptability of the anti-counterfeiting code.
[0085] For the specific definition of the anti-counterfeiting code generation system based on multiple label carriers, please refer to the definition of the anti-counterfeiting code generation method based on multiple label carriers in the context, which will not be repeated here. Each module in the above-mentioned anti-counterfeiting code generation system based on multiple label carriers can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the electronic device in the form of hardware, or can be stored in the memory of the electronic device in the form of software, so that the processor can call and execute the operations corresponding to the above modules. In one embodiment, an electronic device is provided, which is a user terminal. Reference Figure 9 The electronic device includes a processor, a memory, a network interface and a database connected through a system bus. The processor of the electronic device is used to provide computing and control capabilities. The memory of the electronic device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the electronic device is used to store a detection data table. The network interface of the electronic device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a method for generating an anti-counterfeiting code based on multiple label carriers is implemented.
[0086] In one embodiment, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the following steps are performed: S1. Match the label carrier type from a preset carrier type database according to the cost level of the product. The cost level is calculated by combining the market unit price of the product and the counterfeit cost.
[0087] S2. Obtain a unique identifier for the coding device. The unique identifier includes the industry type parameter, device serial number, coding time, and geographic area code bound when the coding device is registered.
[0088] S3. Generate an encryption seed by combining the cost level and the unique identifier to generate a composite encryption seed.
[0089] S4. Based on the data capacity limitation of the label carrier, the initial length of the anti-counterfeiting code is dynamically adjusted to generate a basic anti-counterfeiting code sequence.
[0090] S5. Determine the encryption algorithm combination and encryption rounds based on the security threshold corresponding to the product cost level, perform multiple rounds of encryption on the basic anti-counterfeiting code sequence, and generate the final anti-counterfeiting code.
[0091] S6. Write the anti-counterfeiting code into the matching label carrier, and store the encryption seed, encryption rounds, and industry type parameters in association with the cloud blockchain node.
[0092] In one embodiment, the sub-steps of step S4 include: S40: Set the initial code length to L0 according to the maximum data capacity of the tag carrier.
[0093] S41. Calculate the final code length using the formula L = L0 + k×S, where S is the counterfeit case investigation rate and k is the capacity expansion factor.
[0094] S42. When L exceeds the carrier capacity, a data compression algorithm is enabled to compress the encryption result.
[0095] In one embodiment, the sub-steps of step S2 include: S20: Concatenate the serial number of the coding device and the industry type parameter to generate a character string, perform a hash operation on the character string, and generate a device identification code.
[0096] S21. Embed the device identification code, injection time, and geographic area code in binary form at the end of the hash result to generate a unique identifier.
[0097] In one embodiment, the sub-steps of step S1 include: S10. Set the cost level of the product to several levels from high to low, and set the value range of each cost level.
[0098] S11. Based on the technical complexity level of product counterfeiting and the geographical risk level of the target sales area, the counterfeit risk parameters are evaluated according to the preset weights, and the counterfeit cost values of the counterfeit risk parameters are matched.
[0099] S12. According to the product value of the market unit price of the product in the target sales area and the counterfeit cost value, the cost level of the product is matched and obtained.
[0100] In one embodiment, the detailed sub-steps of step S11 include: S110. Determine the technical complexity level based on the production cost of the product.
[0101] S111. Determine the regional risk level based on the counterfeit case investigation rate in the target sales area of the product.
[0102] In one embodiment, the steps added before step S1 include: S13. Set the cost level of the product from high to low as the first-level cost level, the second-level cost level, the third-level cost level, and the fourth-level cost level, and set the value range of each cost level.
[0103] S14. Set the NFC chip as a label carrier matching the first-level cost level, set the RFID chip as a label carrier matching the second-level cost level, and set the QR code as a label carrier matching the third-level cost level.
[0104] In one embodiment, the steps added after step S6 include: S60: In response to the security code verification operation, the security code is destroyed, and only the cloud encrypted log is retained.
[0105] Those skilled in the art will appreciate that all or part of the processes in the above-described method embodiments can be implemented by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the above-described method embodiments. Any reference to memory, storage, database, or other media used in the various embodiments provided herein may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct RAMbus dynamic RAM (DRDRAM), and RAMbus dynamic RAM (RDRAM).
[0106] Those skilled in the art will clearly understand that for the sake of convenience and brevity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.
Claims
1. A method for generating anti-counterfeiting codes based on multiple label carriers, characterized in that: include: Matching the label carrier type from a preset carrier type database based on the product's cost level, where the cost level is calculated by combining the product's market unit price and the cost of counterfeiting; Obtaining a unique identifier for the betting device, which includes the industry type parameter, device serial number, betting time, and geographic region code bound when the betting device was registered; generating an encryption seed by combining the cost level and the unique identifier to generate a composite encryption seed; Based on the data capacity limit of the label carrier, the initial length of the anti-counterfeiting code is dynamically adjusted to generate a basic anti-counterfeiting code sequence; Determine the encryption algorithm combination and encryption rounds according to the security threshold corresponding to the product cost level, perform multiple rounds of encryption on the basic anti-counterfeiting code sequence, and generate the final anti-counterfeiting code; The anti-counterfeiting code is written into a matching label carrier, and the encryption seed, encryption rounds and industry type parameters are stored in association with the cloud blockchain node.
2. The method according to claim 1, characterized in that The step of dynamically adjusting the initial length of the anti-counterfeiting code based on the data capacity limitation of the label carrier and generating a basic anti-counterfeiting code sequence includes: The initial code length is set to L0 according to the maximum data capacity of the tag carrier; The final code length is calculated using the formula L = L0 + k×S, where S is the counterfeit case detection rate and k is the capacity expansion factor. When L exceeds the carrier capacity, the data compression algorithm is enabled to compress the encryption result.
3. The method according to claim 2, characterized in that The step of obtaining a unique identifier of the injection device, wherein the unique identifier includes the industry type parameter, device serial number, injection time, and geographic area code bound when the injection device is registered, includes: Concatenate the serial number of the injection device and the industry type parameter to generate a string, perform a hash operation on the string, and generate a device identification code; The device identification code, injection time and geographic area code are embedded in the end of the hash result in binary form to generate a unique identifier.
4. The method according to claim 1, wherein The step of matching the label carrier type from a preset carrier type database according to the cost level of the product, wherein the cost level is calculated by combining the market unit price of the product and the counterfeit cost, includes: Set the cost level of the product to several levels from high to low, and set the value range of each cost level; Based on the technical complexity level of product counterfeiting and the regional risk level of the target sales area, the counterfeit risk parameters are evaluated according to preset weights, and the counterfeit cost value corresponding to the counterfeit risk parameters is obtained; The cost level of the product is obtained by matching according to the product's market unit price in the target sales area and the counterfeit cost value.
5. The method according to claim 4, characterized in that The step of evaluating the counterfeit risk parameters according to the technical complexity level of product counterfeiting and the regional risk level of the target sales area according to preset weights, and matching and obtaining the counterfeit cost value of the counterfeit risk parameters includes: Determine the level of technical complexity based on the production cost of the product in question; Determine the regional risk level based on the counterfeit case detection rate in the target sales area of the product.
6. The method according to claim 4, characterized in that Before the step of matching the label carrier type from a preset carrier type database according to the cost level of the product, wherein the cost level is calculated by combining the market unit price of the product and the counterfeit cost, the method further includes: Set the cost level of the product from high to low as the first-level cost level, the second-level cost level, the third-level cost level, and the fourth-level cost level, and set the value range of each cost level; The NFC chip is set as the tag carrier of the first-level cost level matching, the RFID chip is set as the tag carrier of the second-level cost level matching, and the QR code is set as the tag carrier of the third-level cost level matching.
7. The method according to claim 1, characterized in that After the step of writing the anti-counterfeiting code into a matching label carrier and associating and storing the encryption seed, encryption round and industry type parameters in a cloud blockchain node, the method further includes: In response to the anti-counterfeiting code verification operation, the anti-counterfeiting code is destroyed and only the cloud encrypted log is retained.
8. A system for generating anti-counterfeiting codes based on multiple label carriers, characterized in that: include: Carrier matching module (1): used for matching the label carrier type from a preset carrier type database according to the cost level of the product, wherein the cost level is calculated by combining the market unit price of the product and the counterfeit cost; Identification acquisition module (2): used to obtain a unique identifier of the betting device, wherein the unique identifier includes the industry type parameter, device serial number, betting time and geographic area code bound when the betting device is registered; A seed generation module (3) is used to generate an encryption seed by combining the cost level and the unique identifier to generate a composite encryption seed; Capacity adaptation module (4): used to dynamically adjust the initial length of the anti-counterfeiting code based on the data capacity limit of the label carrier and generate a basic anti-counterfeiting code sequence; Multi-level encryption module (5): used to determine the encryption algorithm combination and encryption rounds according to the security threshold corresponding to the product cost level, perform multiple rounds of encryption on the basic anti-counterfeiting code sequence, and generate the final anti-counterfeiting code; Anti-counterfeiting code writing module (6): used for writing the anti-counterfeiting code into a matching label carrier, and associating and storing the encryption seed, encryption round and industry type parameters to the cloud blockchain node.
9. An electronic device, characterized in that: The method comprises a memory and a processor, wherein the memory stores a computer program that can be loaded by the processor and executes the method for generating an anti-counterfeiting code based on multiple label carriers according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that The device stores a computer program that can be loaded by a processor and executes the method for generating an anti-counterfeiting code based on a variety of label carriers according to any one of claims 1 to 7.
Citation Information
Patent Citations
Goods tracing anti-counterfeiting method for active digital circuit board with encrypted radio frequency identifier
CN107665414A
Article traceability code system
CN115099834A
Manufacturing industry anti-counterfeiting code application method and device and electronic equipment
CN117291218A
System and Method for Verifying Authenticity of Physical Goods
US20220398601A1
Cited By
Smart park data secure transmission method based on encryption algorithm
CN121567373A