Anti-counterfeiting code and generation method, identification method
By designing the diameter and distribution strategy of the printing dots, and combining positioning graphics and perspective correction technology, the problems of the existing anti-counterfeiting codes being invisible to the human eye, having insufficient compatibility with mobile phones, and being unsuitable for curved surface recognition have been solved, thus achieving efficient and reliable anti-counterfeiting code recognition.
Patent Information
- Application Number
- CN202510651371.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-20
- Publication Date
- 2025-11-25
- Estimated Expiration
- 2045-05-20
AI Technical Summary
Existing anti-counterfeiting code technologies struggle to balance invisibility to the human eye with mobile phone compatibility, and their recognition algorithms are not sufficiently adaptable to curved or bent substrates.
Design an anti-counterfeiting code with a dot diameter of 23 to 80 micrometers, and the distance between the edges of any two adjacent dots is greater than 80 micrometers. Set positioning graphics and randomly or pseudo-randomly distributed dots, adopt a strip structure with an aspect ratio greater than 2, and adjust the dot area through a redundant coding strategy, combined with a quadrilateral perspective restoration area for correction.
It achieves efficient recognition of anti-counterfeiting codes in complex printing scenarios, improves concealment and recognition reliability, is suitable for curved and bent substrates, and balances anti-counterfeiting strength with practical adaptability.
Smart Images

Figure CN120579568B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of digital anti-counterfeiting technology, and in particular to anti-counterfeiting codes, their generation methods, and identification methods. Background Technology
[0002] Currently, mainstream dot-matrix anti-counterfeiting code technologies generally suffer from a contradiction between concealment and scannability. Traditional invisible anti-counterfeiting codes mostly rely on special dyes or extremely small dots. While these solutions avoid direct human observation, they are limited by the characteristics of mobile phone cameras. Most mobile phones only support visible light, and only a very few models support macro photography, making direct scanning on the terminal difficult. On the other hand, QR codes that support mobile phone reading typically have dots with a diameter greater than 80 micrometers, making them easily detectable to the naked eye at normal reading distances, significantly affecting the aesthetics of printed materials and the concealment of the anti-counterfeiting code. In addition, existing anti-counterfeiting codes mostly use near-square or near-circular arrangements, making it difficult to adapt to narrow areas such as label edges and text gaps, limiting the flexibility of application scenarios.
[0003] Existing technologies have attempted to optimize the size or layout of printed dots, but have failed to effectively balance the invisibility to the human eye with mobile phone compatibility. For example, while solutions using micron-level printed dots are theoretically compatible with high-resolution cameras, they generally lack a fault-tolerance mechanism for printing errors, making them prone to decoding failures due to printing deviations in practical applications. Furthermore, existing anti-counterfeiting code recognition algorithms are insufficiently adaptable to curved or bent substrates; conventional perspective transformations rely on single-area correction, making it difficult to cope with the geometric distortion of long barcodes on deformed substrates. Summary of the Invention
[0004] Based on the shortcomings of the existing technology, the present invention provides an anti-counterfeiting code and its generation and identification methods, which facilitates efficient identification by equipment, has a certain anti-counterfeiting strength and strong practical adaptability.
[0005] To solve the above-mentioned technical problems, the first aspect of the present invention discloses an anti-counterfeiting code, which includes a plurality of printed dots, the diameter of which is 23 micrometers to 80 micrometers, and the edge distance between any two adjacent printed dots is greater than 80 micrometers.
[0006] The anti-counterfeiting code contains at least one positioning pattern, which includes a center and several uniformly distributed identification dots around the center on a circle with a preset radius. The direction is determined by the default of the identification dots. There are no other dots distributed within the preset radius of the center.
[0007] In some implementations, the aspect ratio of the anti-counterfeiting code is greater than 2.
[0008] In some implementations, the periphery of the positioning pattern is filled with printed dots using a random or pseudo-random algorithm, such that the total area of printed dots accounts for no more than 10% of the total area of the anti-counterfeiting code.
[0009] In some embodiments, the average diameter of the imprinted dots is 59 to 80 micrometers.
[0010] In some implementations, the number of identification dots is 6, and one of the identification dots is omitted.
[0011] Secondly, the present invention provides a method for generating anti-counterfeiting codes, used to generate anti-counterfeiting codes as described above, comprising:
[0012] Select the dot diameter based on the expected reading distance;
[0013] Determine the center of the circle and identify the imprint points, and set at least one set of positioning graphics;
[0014] Set the printing dots in a random or pseudo-random manner to control the center distance between adjacent printing dots;
[0015] Calculate the total area ratio of the printed dots, and adjust the printed dots based on the redundancy coding strategy so that the total area of the printed dots does not exceed 10% of the total area of the anti-counterfeiting code.
[0016] The obtained dot array is arranged into a strip structure with an aspect ratio greater than 2 to generate the anti-counterfeiting code.
[0017] In some implementations, adjusting the imprinted points based on a redundancy coding strategy includes:
[0018] The average diameter of all printed dots in the anti-counterfeiting code is controlled to be between 59 and 80 micrometers.
[0019] The number of printed dots with a diameter greater than 88 micrometers shall not exceed 5% of the total number of printed dots, and the number of printed dots with a diameter less than 46 micrometers shall not exceed 10% of the total number of printed dots;
[0020] When the proportion of printed dots with a diameter of less than 46 micrometers reaches 10%, the coding error correction rate of the anti-counterfeiting code is not less than 20%.
[0021] Thirdly, the present invention provides a method for identifying anti-counterfeiting codes, used to identify the anti-counterfeiting codes as described above, comprising:
[0022] Acquire an image containing the anti-counterfeiting code, detect and locate the center of the graphic and identify the imprint point to determine the spatial position and orientation of the anti-counterfeiting code;
[0023] The anti-counterfeiting code is divided into sections for perspective correction according to the pre-stored quadrilateral perspective restoration area;
[0024] The perspective-corrected dot array is binarized and decoded to obtain the original data information;
[0025] Anti-counterfeiting verification or traceability is completed based on the original data information.
[0026] In some implementations, the anti-counterfeiting code is subjected to zonal perspective correction according to a pre-stored quadrilateral perspective restoration area, including:
[0027] The anti-counterfeiting code's strip structure is divided into multiple quadrilateral perspective restoration areas along its length, with each quadrilateral perspective restoration area covering a segment of the anti-counterfeiting code.
[0028] The vertex coordinates of each quadrilateral perspective restoration area are extracted; the quadrilateral perspective restoration area is mapped to a standard plane according to preset correction parameters;
[0029] The images after correction of the perspective restoration areas of each quadrilateral are stitched together in sequence to restore the imprint array.
[0030] In some implementations, detecting the center of the positioning pattern and the identification dots to determine the spatial position and orientation of the anti-counterfeiting code includes:
[0031] The orientation of the anti-counterfeiting code is determined by identifying the central angle of the printed dot and combining this with the default position of the printed dot.
[0032] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0033] This application provides an anti-counterfeiting code and its generation and recognition methods. Through positioning graphic design and dot distribution strategies, it significantly improves concealment and recognition reliability. The blank central area combined with evenly distributed recognition dots enables rapid and accurate positioning of the anti-counterfeiting code's spatial coordinates. Simultaneously, the asymmetrical directional markings formed by default specific dots effectively avoid directional misjudgment. This ensures efficient device recognition and is suitable for complex printing scenarios such as curved surfaces and bends, balancing anti-counterfeiting strength with practical adaptability. Attached Figure Description
[0034] Figure 1 A schematic diagram of the anti-counterfeiting code provided by this invention;
[0035] Figure 2 This is a schematic diagram of the positioning pattern provided by the present invention;
[0036] Figure 3 This is another schematic diagram of the positioning pattern provided by the present invention;
[0037] Figure 4 This is a schematic diagram illustrating the determination of the anti-counterfeiting code direction using the positioning pattern provided by the present invention.
[0038] Figure 5 A schematic diagram illustrating the application of the anti-counterfeiting code provided by this invention to a label;
[0039] Figure 6 A schematic diagram illustrating the application of the anti-counterfeiting code provided by this invention to a brand;
[0040] Figure 7This is a flowchart illustrating the method for generating anti-counterfeiting codes provided by the present invention.
[0041] Figure 8 This is a flowchart illustrating the anti-counterfeiting code identification method provided by the present invention.
[0042] Figure 9 This is a flowchart illustrating step S72 of the anti-counterfeiting code identification method provided by the present invention.
[0043] Figure 10 A perspective transformation diagram of the anti-counterfeiting code recognition method provided by the present invention.
[0044] Figure 11 This is another perspective transformation diagram of the anti-counterfeiting code recognition method provided by the present invention. Detailed Implementation
[0045] To better understand and implement this invention, the technical solutions in the embodiments of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this invention, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.
[0046] The terms “comprising” and “having” and any variations thereof in this invention are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device that includes a series of steps or modules is not necessarily limited to those steps or modules that are explicitly listed, but may include other steps or modules that are not explicitly listed or that are inherent to such processes, methods, products or devices.
[0047] The embodiments of the present invention disclose anti-counterfeiting codes and their generation and identification methods, which facilitate efficient identification by devices and have a certain anti-counterfeiting strength and practical adaptability.
[0048] like Figure 1 As shown, the anti-counterfeiting code includes several imprinted dots, the diameter of which is between 23 micrometers and 80 micrometers, and the edge distance between any two adjacent imprinted dots is greater than 80 micrometers; a positioning pattern is set inside the anti-counterfeiting code, the positioning pattern includes a center and several uniformly distributed identification imprinted dots around the center and located on a circle with a radius r, the direction of which is determined by the default of the identification imprinted dots; there are no other imprinted dots distributed within the radius r of the center.
[0049] The anti-counterfeiting code contains at least one positioning pattern, such as... Figure 2As shown, the anti-counterfeiting code is composed of uniformly distributed identification dots around a circle with a center and radius r. By actively omitting a particular identification dot—that is, creating a gap in a preset direction—a directional marker is formed, resolving the ambiguity problem of rotation in traditional symmetrical graphics. In this application, "omitting" refers to actively omitting a specific element, such as a particular identification dot in a positioning graphic, within a preset rule or graphic structure to create an asymmetrical or unique identifier. In the outer area of the positioning graphic, data dots are filled using a random or pseudo-random algorithm. The distribution density is dynamically optimized by monitoring the total area ratio of the dots in real time, ensuring that the total dot area does not exceed 10% of the total area of the anti-counterfeiting code.
[0050] The positioning pattern has a unique dot matrix distribution, with the imprinted dots discretely distributed across the vertices of several approximately equilateral triangles. Within a preset radius *r* of the central region, no other imprinted dots are set, forming an isolated reference point. This facilitates the rapid locking of the center coordinates using an isolated point detection algorithm, thereby achieving overall positioning of the anti-counterfeiting code. The number of identification dots can be set to 4, 6, or 9, and is not limited in this application. The setting of the identification dots can utilize the fact that the presentation of one identification dot differs from the others. The asymmetric feature formed by the gap created by this default dot and the other identification dots allows for rapid determination of the anti-counterfeiting code's orientation.
[0051] In this embodiment, on an extended circumference with a preset radius r, such as Figure 3 , 4 The five identification points, B, C, D, and E, are distributed at 60° central angle intervals, i.e., ∠AOB = ∠BOC = ∠COD = ∠DOE = 60°. Simultaneously, a sixth identification point, F, is automatically omitted, forming a 120° notch, ∠AOE = 120°. This default design constructs directional markers through angular differences. Without additional auxiliary graphics, only the central angle between three adjacent points needs to be calculated to determine a unique direction, thus clearly defining the spatial orientation of the anti-counterfeiting code. This blocks optical interference from surrounding data points on the positioning pattern and completely eliminates the rotational ambiguity problem of the traditional six-point symmetrical layout.
[0052] Modern cameras typically use a 24-28mm wide-angle lens as the main camera, with a minimum focusing distance of 100mm or more and a resolution of 4000×3000. The field of view of a wide-angle lens is usually 60 to 84°. At a 100mm object distance, the length of an object seen by the lens is approximately 115 to 180mm. A 4000×3000 resolution lens has 5000 diagonal pixels, and each pixel sees an object width of 23 to 36 micrometers. Since most cameras use a Bayer array for pixel arrangement, lenses often exhibit some distortion, and individual pixels may be discarded by various algorithms during processing. Therefore, using the precision of a single pixel is insufficient. For a small object to be stably captured on a mobile phone camera, 2×2 pixels are needed. Since a single pixel corresponds to an object length of 23 to 36 micrometers, 2×2 pixels would see an object width of 46 to 72 micrometers. For most mobile phones on the market to be able to scan the image, the image diameter should be no less than 72 micrometers. In this application, when the average value is 59 micrometers, that is, when the imprinted dot is greater than 59 micrometers, most mobile phones can capture the imprinted dot at the closest focusing distance.
[0053] According to Rayleigh's criterion, the minimum resolvable angle of the human eye under sufficient illumination is approximately 2.64 × 10⁻⁶. -4 Based on the curvature, it can be deduced that at an observation distance of 30 centimeters, objects with a diameter of less than 80 micrometers are difficult to detect with the naked eye. Therefore, the diameter of the printed dots on this anti-counterfeiting code is controlled within the range of 23 to 80 micrometers. Dots between 59 and 80 micrometers are compatible with ordinary mobile phone cameras, while ultra-micro dots at the 23-micrometer level require a macro lens for identification, ensuring both concealment and device compatibility.
[0054] The edge distance between any two adjacent imprinted dots is greater than 80 micrometers to prevent the human eye from perceiving the anti-counterfeiting code through the dot matrix arrangement. When the distance between objects is less than the minimum resolving distance of the human eye, the human eye will perceive it as a continuous pattern. At a viewing distance of 30 centimeters, the 80-micrometer spacing prevents adjacent imprinted dots from forming visible textures due to visual fusion, thus avoiding the exposure of the anti-counterfeiting code. At the same time, this spacing provides sufficient pixel spacing for the mobile phone camera, ensuring that each imprinted dot can be independently identified, avoiding signal confusion caused by excessively dense dot matrix during imaging, thereby improving decoding accuracy and anti-interference capability.
[0055] In terms of physical structure design, the anti-counterfeiting code adopts a long strip layout with an aspect ratio greater than 2. Compared to the traditional QR code's near-circular or square arrangement, it can be flexibly embedded into the label edges, text gaps, and even the lines of the brand logo. The shape with an aspect ratio greater than 2 not only reduces interference with printing design but also facilitates solving the problem of curved surface recognition through area correction technology. For example... Figure 5As shown, the area indicated by the arrow at the top is an anti-counterfeiting code, which can be embedded in the blank space of the label; while the area indicated by the arrow on the left contains an anti-counterfeiting code set on the same line, which can be placed between two lines of text on the label without affecting the normal use of the label. Figure 6 As shown, in the image of the label brand "alo", multiple anti-counterfeiting codes are embedded in the letter "l" without requiring any corresponding modifications to the label.
[0056] Based on the same inventive concept, this application also provides a method for generating the aforementioned anti-counterfeiting code. For example... Figure 7 As shown, this method includes the following steps:
[0057] Step S71: Select the dot diameter based on the expected reading distance.
[0058] The dot diameter should be selected based on the characteristics of the substrate, such as the ink absorption of paper, the reflectivity of plastic film, or the type of imaging equipment. Choosing the dot diameter according to the expected reading distance is a crucial step in balancing concealment and device compatibility. The reading distance directly affects the machine's or human eye's ability to distinguish the dot. For example, at a typical viewing distance of 30 cm, calculations based on the Rayleigh criterion show that dots with a diameter ≤ 80 micrometers cannot be recognized by the human eye. Furthermore, the physical resolution of a mobile phone camera, such as a typical 4000×3000 pixel device, corresponds to approximately 25 micrometers per pixel at a 100 mm object distance, requiring the dot diameter to cover at least a 2×2 pixel area to ensure reliable imaging. Therefore, the dot diameter needs to be dynamically adjusted within the range of 23-80 micrometers. For example, a lower limit of 23-59 micrometers is chosen for short-distance, high-precision scenarios, while 59-80 micrometers is preferred for general scenarios to adapt to mainstream devices.
[0059] Step S72: Determine the center of the circle and identify the imprint point, and set at least one set of positioning graphics.
[0060] The positioning graphic can provide a spatial reference and directional indicator for the anti-counterfeiting code. By maintaining a blank area within a preset radius *r* around the center, the coordinates of the center can be quickly located using isolated point detection algorithms such as Hough transform or methods that determine isolated points using integral images, thus establishing a coordinate system for subsequent image processing. This application employs a method that uses integral images to determine isolated points, which is one to two orders of magnitude faster than the Hough transform, allowing for more rapid identification of isolated points.
[0061] In this embodiment, six identification dots are evenly distributed on the outer circumference, with each dot spaced 60° apart by a central angle. The sixth identification dot is omitted, and a blank graphic can be used directly, thus forming a 120° notch. Geometric asymmetry is used to eliminate directional ambiguity. For example, in the scenario of flexible packaging bending, traditional six-point symmetrical graphics require multiple rotations for matching due to mirror symmetry, while the default design directly determines the direction by the angle difference, reducing the direction recognition time from 10 milliseconds to less than 1 millisecond, significantly improving efficiency.
[0062] Step S73: On the positioning pattern, set the printing dots in a random or pseudo-random manner to control the center distance between adjacent printing dots;
[0063] This design ensures the unpredictability of the anti-counterfeiting code to resist copying attacks, while also preventing visual fusion effects caused by excessively dense dot matrix. Random distribution breaks the regularity of the texture, preventing the human eye from detecting anomalies through contrast; spacing control is based on the principle of the minimum resolving angle of the human eye, preventing adjacent dots from forming continuous light spots on the retina.
[0064] Step S74: Calculate the total area ratio of the printed dots and adjust the printed dots based on the redundancy coding strategy so that the total area of the printed dots does not exceed 10% of the area of the anti-counterfeiting code.
[0065] Real-time monitoring of printing dots with diameters exceeding the limit; adjustment of printing dots based on a redundancy coding strategy; control of the average diameter of all printing dots in the anti-counterfeiting code to be between 59 micrometers and 80 micrometers; the proportion of diameters exceeding 88 micrometers does not exceed 5%; and the proportion of diameters below 46 micrometers does not exceed 10%.
[0066] In some implementations, Reed-Solomon error correction codes can be automatically embedded, increasing the error correction rate to 20% and repairing data bit loss caused by printing diffusion or printing defects. For example, in high-speed inkjet printing, where the diameter fluctuation range is approximately ±5 micrometers, the error correction mechanism can increase the decoding success rate from 85% to over 97%. Real-time monitoring of printing errors ensures decoding stability.
[0067] The total area is calculated in real time during data filling. When the area approaches a threshold, new dots are automatically paused or a size compression strategy is activated, such as fine-tuning the diameter of some dots to the lower limit. This control mechanism balances concealment and recognizability, avoiding visual texture abnormalities caused by excessive dot density. On glossy metallic labels, an excessively high area ratio may create visible light spots due to reflection, while a 10% threshold can suppress the intensity of these light spots below the background noise level. These settings significantly improve the tolerance for printing errors. Even with minor deviations in high-speed inkjet printing, dynamic error correction during decoding ensures recognition stability.
[0068] Step S75: Arrange the obtained imprint array into a strip structure with an aspect ratio greater than 2 to generate the anti-counterfeiting code.
[0069] The printed dots are arranged into a strip structure with an aspect ratio greater than 2, and the deformation resistance is enhanced through shape adaptation and regional correction. The elongated strip layout can be embedded into the label edge or the gap between logo lines, reducing the impact on the printing design, and further adapting to narrow spaces such as label edges and text gaps, expanding practical application scenarios.
[0070] Based on the same inventive idea, such as Figure 8As shown, this application also provides a method for identifying anti-counterfeiting codes, including:
[0071] Step S81: Obtain an image containing the anti-counterfeiting code, detect the center of the positioning graphic and the identification mark, and determine the spatial position and orientation of the anti-counterfeiting code.
[0072] By rapidly detecting image-captured and positioned patterns, a spatial coordinate system and directional reference for anti-counterfeiting codes are established. After acquiring images via a mobile phone camera or industrial vision equipment, the center and five identification points on the circumference are first located. The direction is determined using the gaps formed by default identification points. For example, the absolute blankness of the center region can be quickly determined using an isolated point detection algorithm using integral images, completing the location within 0.01 seconds. The asymmetric angular features of the default points eliminate the need for complex geometric calculations in direction determination, reducing time consumption. This provides a spatial alignment basis for subsequent processing, especially in curved or tilted shooting scenarios, where direction correction can eliminate the interference of rotational deviations on decoding.
[0073] Step S82: Perform perspective correction on the anti-counterfeiting code according to the pre-stored quadrilateral perspective restoration area. For example... Figure 9 As shown, it includes:
[0074] Step S821: Divide the strip structure of the anti-counterfeiting code into multiple quadrilateral perspective restoration areas along the length direction, and each quadrilateral perspective restoration area covers the anti-counterfeiting code segment.
[0075] The problem of geometric distortion caused by the curvature and bending of the substrate in anti-counterfeiting codes is solved by dividing the code into quadrilateral perspective restoration areas. The long barcode is divided into multiple quadrilateral sub-regions along its length, such as HIJK and IVWJ in the figure. Each quadrilateral perspective restoration area covers a local code segment of about 3 mm, decomposing the global nonlinear deformation into multiple linearly processable units.
[0076] Step S822: Extract the vertex coordinates of each quadrilateral perspective restoration area; map the quadrilateral perspective restoration area to a standard plane according to the preset correction parameters;
[0077] like Figure 10 As shown, using A, B, C, and D in the left image as perspective transformation restoration points, after perspective transformation, they become A', B', C', and D' in the right image. Perspective transformation only supports the restoration of linear changes. The four vertices of a long strip are relatively far apart. If the anti-counterfeiting code undergoes some surface deformation, the result of the perspective transformation will be poor. For a curve, if the length is small, it can be approximated as a straight line, which satisfies the linear requirement of perspective transformation. The anti-counterfeiting area containing the anti-counterfeiting code is divided into one or more perspective transformation restoration areas, and perspective transformation is performed on these quadrilateral perspective restoration areas respectively, thereby reducing the influence of surface deformation.
[0078] By using the vertex coordinates of the quadrilateral perspective restoration area, such as Figure 11 As shown, the dividing point J is the intersection of the extensions of line segment BC and line segment ED, and point H is a point on the extension of line segment OB, with length r for HA. Similarly, points I, K, U, V, W, and X can be obtained. Quadrilaterals HIJK, IVWJ, and HKXU are formed, representing quadrilateral perspective restoration zones. Each quadrilateral perspective restoration zone is independently mapped to a standard plane through perspective transformation to eliminate stretching or distortion. By analogy, more quadrilateral perspective restoration zones can be constructed on both sides to further distinguish perspective changes, thereby reducing the influence of surface deformation.
[0079] The geometric coordinates and perspective transformation parameters of each unit vertex are recorded and written into the metadata layer of the layout file to provide a deformation correction benchmark for subsequent recognition. At the same time, the pre-stored vertex coordinates and transformation matrices eliminate the need for real-time calculation of geometric parameters during the recognition stage, thus shortening the decoding time.
[0080] Step S823: Separately stitch together the corrected images of each quadrilateral perspective restoration area to restore the dot array.
[0081] The corrected quadrilateral perspective restoration area is reassembled in sequence using an image stitching algorithm to restore the complete planar dot matrix and ensure data continuity.
[0082] Step S83: Binarize and decode the perspective-corrected dot array to obtain the original data information.
[0083] Binarization and decoding are crucial steps in converting the corrected image into parsable data. A local adaptive threshold segmentation algorithm is used to binarize the grayscale image, distinguishing the printed dots from the background and generating a binary dot matrix. For example, in reflective metal label scenarios, dynamic threshold adjustment can suppress light spot interference and improve the accuracy of dot contour extraction. The dot matrix is parsed according to preset encoding rules to extract anti-counterfeiting identifiers and redundant check codes. When anomalies are detected, the Reed-Solomon error correction algorithm is automatically invoked, with an error correction capacity ≥20%, converting the physical dot matrix into digital information and providing a data foundation for the verification process.
[0084] Step S84: Complete anti-counterfeiting verification or traceability based on the original data information.
[0085] Authenticity verification and traceability are achieved through data comparison and blockchain technology. In this embodiment, the decoded identifier can be matched with a cloud database or distributed ledger to verify the product's uniqueness and legitimacy. For example, in luxury goods anti-counterfeiting scenarios, production batch, logistics route, and dealer information are returned, and blockchain storage ensures the data's immutability. Simultaneously, the verification results are fed back to the user's terminal in real time; for example, the app interface displays a "genuine product" or "risk" warning, combined with digital signature technology to prevent man-in-the-middle attacks. This step not only completes anti-counterfeiting verification but also supports supply chain transparency and consumer rights protection.
[0086] This application significantly improves concealment and recognition reliability through a strategic approach to positioning graphics and dot distribution. The blank central area, combined with evenly distributed identification dots, enables rapid and accurate positioning of the anti-counterfeiting code's spatial coordinates. Simultaneously, the asymmetrical directional markings formed by default specific dots effectively prevent directional misjudgment. The overall layout ensures both imperceptibility to the human eye and efficient device recognition, making it particularly suitable for complex printing scenarios such as curved surfaces and bends, balancing anti-counterfeiting strength with practical adaptability.
[0087] Based on the same inventive concept, the present invention also provides a computer device, comprising: a processor and a memory; wherein the memory stores a computer program adapted to be loaded by the processor and executed the steps of the above-described method for generating or identifying an anti-counterfeiting code.
[0088] The processing methods for computer devices can be referred to the description of the methods above, and will not be repeated here.
[0089] This application also provides a non-transitory machine-readable storage medium storing an executable program. When the executable program is run by a microprocessor, the processor executes a method for generating or identifying anti-counterfeiting codes as provided in the above embodiments.
[0090] This invention discloses a computer-readable storage medium storing a computer program for electronic data interchange, wherein the computer program causes a computer to execute a described method for generating or identifying an anti-counterfeiting code.
[0091] This invention discloses a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to cause a computer to execute a described method for generating or identifying an anti-counterfeiting code.
[0092] The embodiments described above are merely illustrative. The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical modules; that is, they may be located in one place or distributed across multiple network modules. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0093] Through the detailed description of the above embodiments, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, including read-only memory (ROM), random access memory (RAM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), one-time programmable read-only memory (OTPROM), electrically-erasable programmable read-only memory (EEPROM), compact disc read-only memory (CD-ROM) or other optical disc storage, disk storage, magnetic tape storage, or any other computer-readable medium that can be used to carry or store data.
[0094] Finally, it should be noted that the embodiments disclosed in this invention are merely preferred embodiments of this invention and are only used to illustrate the technical solutions of this invention, not to limit it. Although this invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this invention.
Claims
1. A security code, characterized in that The anti-fake code comprises a plurality of printing dots, the diameter of the printing dots is 23-80 microns, and the edge distance between any two adjacent printing dots is greater than 80 microns; At least one positioning pattern is arranged in the anti-fake code, the positioning pattern comprises a center and a plurality of evenly distributed identification printing dots on the circumference of a preset radius around the center, and the default direction is determined according to the identification printing dots; and no other printing dots are distributed within the preset radius range of the center.
2. The security code of claim 1, wherein, The width-to-height ratio of the anti-fake code is greater than 2.
3. The security code of claim 2, wherein, The periphery of the positioning pattern is filled with printing dots in a random or pseudo-random algorithm, so that the total printing dot area accounts for no more than 10% of the total area of the anti-fake code.
4. The security code of claim 3, wherein, The average value of the diameter of the printing dots is 59-80 microns.
5. The anti-pseudocode according to claim 3, characterized in that, The number of the identification printing dots is 6, and one of the identification printing dots is missing.
6. A method for generating a forgery-proof code, characterized in that A method for generating the anti-fake code of any one of claims 1-5 comprises: Selecting the diameter of the printing dots according to the expected reading distance; Determining the center and the identification printing dots, and arranging at least one positioning pattern; Arranging the printing dots in a random or pseudo-random manner to control the center distance between adjacent printing dots; Calculating the total printing dot area ratio, and adjusting the printing dots based on a redundancy coding strategy so that the total printing dot area is no more than 10% of the total area of the anti-fake code; Arranging the obtained printing dot array into a strip-shaped structure with a width-to-height ratio greater than 2 to generate the anti-fake code.
7. The method of claim 6, wherein the step of generating the anti-forgery code comprises the steps of: generating a random number; and generating the anti-forgery code by using the random number. Adjusting the printing dots based on a redundancy coding strategy comprises: Controlling the average value of the diameter of all printing dots in the anti-fake code to be 59-80 microns; The number of printing dots with a diameter greater than 88 microns is no more than 5% of the total number of printing dots, and the number of printing dots with a diameter less than 46 microns is no more than 10% of the total number of printing dots; When the proportion of printing dots with a diameter less than 46 microns reaches 10%, the error correction rate of the anti-fake code is no less than 20%.
8. A method of identifying an anti-counterfeit code, characterized in that A method for identifying the anti-fake code of any one of claims 1-5 comprises: Obtaining an image containing the anti-fake code, detecting the center of the positioning pattern and the identification printing dots, and determining the spatial position and direction of the anti-fake code; Dividing the anti-fake code into sub-regions for perspective correction according to the pre-stored quadrilateral perspective restoration region; Binaryzing and decoding the printing dot array after perspective correction to obtain original data information; Completing anti-fake verification or tracing based on the original data information.
9. The method of claim 8, wherein the step of generating the pseudo random number sequence is performed by a pseudo random number generator. Dividing the anti-fake code into sub-regions for perspective correction according to the pre-stored quadrilateral perspective restoration region comprises: Dividing the strip-shaped structure of the anti-fake code into a plurality of quadrilateral perspective restoration regions along the length direction, each quadrilateral perspective restoration region covering a segment of the anti-fake code; Extracting the vertex coordinates of each quadrilateral perspective restoration region, and mapping the quadrilateral perspective restoration region to a standard plane according to a preset correction parameter; Splicing the images of the corrected quadrilateral perspective restoration regions in sequence to restore the printing dot array.
10. The method for identifying anti-counterfeiting codes as described in claim 8, characterized in that, Detecting the center of the positioning pattern and the identification printing dots to determine the spatial position and direction of the anti-fake code comprises: Determining the direction of the anti-fake code by identifying the center angle of the identification printing dots and combining the default position of the identification printing dots.
Citation Information
Patent Citations
Anti-fake method, anti-fake system and anti-fake marker
CN103729767A
Code generating, decoding and anti-counterfeiting method of dot matrix code
CN118569289A