CN-122022838-A - Two-dimensional code anti-counterfeiting processing method, device, medium and product
Abstract
The invention discloses a two-dimensional code anti-counterfeiting processing method, a device, a medium and a product, relates to the technical fields of information security and two-dimensional code anti-counterfeiting, and can be used in the financial and technological field. The method comprises the steps of obtaining target Landon ant rules corresponding to an object to be anti-counterfeiting from a local or server according to object identification of the object to be anti-counterfeiting based on an identification rule mapping relation, carrying out path deduction again based on the target Landon ant rules to obtain a standard periodic pattern, obtaining a two-dimensional code to be anti-counterfeiting of the object, extracting the periodic pattern to be anti-counterfeiting from the two-dimensional code to be anti-counterfeiting, carrying out anti-counterfeiting verification on the periodic pattern to be anti-counterfeiting according to the standard periodic pattern to obtain a verification result, or carrying out anti-counterfeiting verification on the two-dimensional code to be anti-counterfeiting according to the target Landon ant rules to obtain the verification result. Through the technical scheme, the anti-counterfeiting safety of the two-dimensional code can be improved.
Inventors
- Hu Tianxie
Assignees
- 中国工商银行股份有限公司
Dates
- Publication Date
- 20260512
- Application Date
- 20260126
Claims (10)
- 1. The two-dimensional code anti-counterfeiting processing method is characterized by comprising the following steps of: based on the mapping relation of the identification rules, according to the object identification of the object to be anti-counterfeiting, acquiring the target Landon ant rule corresponding to the object to be anti-counterfeiting from a local or server; carrying out path deduction again based on the target Landon ant rule to obtain a standard periodic pattern; Acquiring a two-dimensional code to be identified of the object to be anti-counterfeiting; Extracting a periodic pattern to be identified from the two-dimensional code to be identified; And carrying out anti-counterfeiting verification on the periodic pattern to be identified according to the standard periodic pattern to obtain a verification result, or carrying out anti-counterfeiting verification on the two-dimensional code to be identified according to the target Landon ant rule to obtain a verification result.
- 2. The method according to claim 1, wherein performing anti-counterfeit verification on the periodic pattern to be identified according to the standard periodic pattern to obtain a verification result comprises: And carrying out global comparison on the standard periodic pattern and the periodic pattern to be identified to obtain a verification result.
- 3. The method according to claim 1, wherein performing anti-counterfeit verification on the periodic pattern to be identified according to the standard periodic pattern to obtain a verification result comprises: The method comprises the steps of respectively obtaining a set number of local grid area patterns from the standard periodic pattern and the periodic pattern to be identified, wherein the local grid area patterns comprise local standard patterns and local patterns to be identified; And carrying out texture comparison on the local standard pattern and the local pattern to be identified to obtain a verification result.
- 4. The method of claim 1, wherein the performing anti-counterfeit verification on the two-dimensional code to be identified according to the target Landon ant rule to obtain a verification result comprises: reversely pushing the two-dimensional code to be identified to obtain ant rules to be confirmed; And comparing the ant rule to be confirmed with the target Landon ant rule to obtain a verification result.
- 5. The method of claim 1, wherein the identification rule mapping relationship is determined by the following formula: obtaining an object unique identifier of an object to be anti-counterfeiting; Generating a target Landon ant rule corresponding to the object to be anti-fake, wherein the target Landon ant rule refers to an initial condition that Landon ants finally generate stable expressway patterns under the condition of double colors or multiple colors, and the initial condition comprises an initial direction of the ants, a grid possibile state number, a left turn state number, a right turn state number, a left turn sequence, a right turn sequence and an initial network; According to the target Landon ant rule, a periodic pattern grid is obtained; determining a pattern mapping area from the two-dimensional code of the object to be anti-counterfeiting; And filling the periodic pattern grid into the pattern mapping area, and mapping the object unique identifier and the target Landon ant convergence rule to obtain an identifier rule mapping relation.
- 6. The method of claim 5, wherein obtaining a periodic pattern grid according to the target Landon ant rule comprises: running Landon ants according to the target Landon ant rule, and determining the basic step number of the Landon ants going out of the chaos period; Continuously controlling Landon ants to walk according to the target Landon ants under a reference coordinate system, and recording the running states of the Landon ants, wherein the running states comprise a state sequence, a displacement vector and a direction sequence; Determining a circulation time according to the running state; step number difference between adjacent cycle moments is used as a cycle step length; Determining a displacement direction vector by using a coordinate difference between a start point and an end point of a periodic pattern; According to the cycle step length and the displacement direction vector, carrying out deduction for a set number of cycles, and determining whether the corresponding cycle patterns of each cycle are consistent; if the two patterns are consistent, a minimum square matrix grid containing the complete period is intercepted as a periodic pattern grid.
- 7. The method of claim 5, wherein determining a pattern mapping area from the two-dimensional code of the object to be anti-counterfeit comprises: determining a locator from the two-dimensional code of the object to be anti-counterfeiting; And performing grid expansion on the periphery of the locator to obtain a pattern mapping area.
- 8. The utility model provides a two-dimensional code anti-fake processing apparatus which characterized in that includes: The rule acquisition module is used for acquiring target Landon ant rules corresponding to the object to be anti-counterfeiting from a local or server according to the object identifier of the object to be anti-counterfeiting based on the identifier rule mapping relation; the standard pattern determining module is used for carrying out path deduction again based on the target Landon ant rule to obtain a standard periodic pattern; The two-dimensional code to be identified acquisition module is used for acquiring the two-dimensional code to be identified of the object to be anti-counterfeiting; The pattern extraction module to be identified is used for extracting the periodic pattern to be identified from the two-dimensional code to be identified; and the anti-counterfeiting verification module is used for carrying out anti-counterfeiting verification on the periodic pattern to be identified according to the standard periodic pattern to obtain a verification result, or carrying out anti-counterfeiting verification on the two-dimensional code to be identified according to the target Landon ant rule to obtain a verification result.
- 9. A computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions for causing a processor to implement the two-dimensional code anti-counterfeit processing method of any of claims 1-7 when executed.
- 10. A computer program product, characterized in that the computer program product comprises a computer program which, when executed by a processor, implements the two-dimensional code anti-counterfeit processing method according to any of claims 1-7.
Description
Two-dimensional code anti-counterfeiting processing method, device, medium and product Technical Field The invention relates to the technical fields of information security and two-dimension code anti-counterfeiting, which can be used in the field of financial science and technology, in particular to a two-dimension code anti-counterfeiting processing method, a device, a medium and a product. Background In the field of commodity anti-counterfeiting, the traditional technology such as laser marking, fluorescent marking, physical scratch cards and the like can realize the anti-counterfeiting function to a certain extent, but has the defects of insufficient dynamic updating capability, limited information bearing capacity, easiness in cracking and imitation and the like, and is difficult to cope with increasingly complex counterfeiting means. With the development of information technology, early digital anti-counterfeiting technology realizes basic traceability by combining one-dimensional bar codes with database inquiry, but has the problems of small information capacity, single anti-counterfeiting level and the like. In recent years, the two-dimensional code anti-counterfeiting technology constructs a closed-loop traceability system of 'one object and one code' by endowing each commodity with a unique encrypted digital code and combining a database cloud platform real-time verification mechanism. The technology utilizes the graphical coding characteristic of the two-dimension code, can bear full life cycle data such as production batch, logistics track, quality detection and the like, and can realize authenticity verification and information tracing through code scanning of the smart phone. However, the common two-dimensional code has the risk of easy copying, and partial counterfeiters misguide consumers through counterfeiting the matched query system, so that false anti-counterfeiting codes are in disorder in the market. Therefore, an effective and real two-dimensional code anti-counterfeiting method is needed. Disclosure of Invention The invention provides a two-dimensional code anti-counterfeiting processing method, a device, a medium and a product, which are used for improving the anti-counterfeiting effectiveness of a two-dimensional code. According to an aspect of the invention, there is provided a two-dimensional code anti-counterfeiting processing method, which includes: based on the mapping relation of the identification rules, according to the object identification of the object to be anti-counterfeiting, acquiring the target Landon ant rule corresponding to the object to be anti-counterfeiting from a local or server; carrying out path deduction again based on the target Landon ant rule to obtain a standard periodic pattern; Acquiring a two-dimensional code to be identified of the object to be anti-counterfeiting; Extracting a periodic pattern to be identified from the two-dimensional code to be identified; And carrying out anti-counterfeiting verification on the periodic pattern to be identified according to the standard periodic pattern to obtain a verification result, or carrying out anti-counterfeiting verification on the two-dimensional code to be identified according to the target Landon ant rule to obtain a verification result. According to another aspect of the present invention, there is provided a two-dimensional code anti-counterfeit processing device, the device comprising: The rule acquisition module is used for acquiring target Landon ant rules corresponding to the object to be anti-counterfeiting from a local or server according to the object identifier of the object to be anti-counterfeiting based on the identifier rule mapping relation; the standard pattern determining module is used for carrying out path deduction again based on the target Landon ant rule to obtain a standard periodic pattern; The two-dimensional code to be identified acquisition module is used for acquiring the two-dimensional code to be identified of the object to be anti-counterfeiting; The pattern extraction module to be identified is used for extracting the periodic pattern to be identified from the two-dimensional code to be identified; and the anti-counterfeiting verification module is used for carrying out anti-counterfeiting verification on the periodic pattern to be identified according to the standard periodic pattern to obtain a verification result, or carrying out anti-counterfeiting verification on the two-dimensional code to be identified according to the target Landon ant rule to obtain a verification result. According to another aspect of the present invention, there is provided an electronic apparatus including: at least one processor, and A memory communicatively coupled to the at least one processor, wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor, so that the at least one processor can e