Anti-counterfeiting code, generation method thereof and recognition method thereof

The anti-counterfeiting code with specific dot sizes and patterns addresses the challenge of concealment and scannability, enabling efficient recognition on devices and adapting to complex surfaces by employing a redundant coding strategy and geometric correction.

US20260377679A1Pending Publication Date: 2026-11-26BOA SHEN PAPER & PLASTIC PROD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
US19/681123
Authority / Receiving Office
US · United States
Patent Type
Applications(United States)
Current Assignee / Owner
Priority Date
2025-05-20
Filing Date
2026-05-19
Publication Date
2026-11-26

AI Technical Summary

Technical Problem

Existing anti-counterfeiting codes face challenges in balancing concealment from the human eye and scannability by mobile devices, particularly due to limitations in dot size and layout, leading to decoding failures and incompatibility with curved or bent substrates.

Method used

An anti-counterfeiting code design with printed dots of 23-80 µm diameter, edge-to-edge spacing greater than 80 µm, and a positioning pattern featuring a circle with omitted recognition dots, along with a random dot distribution and redundant coding strategy, ensuring an aspect ratio greater than 2, to enhance concealment and adaptability.

Benefits of technology

The solution provides efficient recognition on devices, including curved surfaces, with improved concealment and resistance to printing errors, ensuring high decoding accuracy and adaptability across various printing scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure US20260377679A1-D00000_ABST
    Figure US20260377679A1-D00000_ABST
Patent Text Reader

Abstract

An anti-counterfeiting code, and a generation method and a recognition method thereof are provided. The anti-counterfeiting code includes a plurality of printed dots, where an average diameter of all printed dots is 23-80 µm, and the edge-to-edge distance between any two adjacent printed dots is greater than 80 µm; at least one positioning pattern is arranged in the anti-counterfeiting code. The positioning pattern includes a center of a circle and a plurality of recognition printed dots uniformly distributed around the center of the circle and located on a circumference with a predetermined radius, and an orientation is determined according to an omission of one of the recognition printed dots; and a region defined by the predetermined radius from the center of the circle is free of other printed dots. The anti-counterfeiting code facilitates efficient recognition by a device and provides substantial anti-counterfeiting strength and strong practical adaptability.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application is based upon and claims priority to Chinese Patent Application No. 202510651371.4, filed on May 20, 2025, the entire contents of which are incorporated herein by reference.TECHNICAL FIELD

[0002] The present disclosure relates to the technical field of digital anti-counterfeiting, and more particularly to an anti-counterfeiting code, a generation method thereof and a recognition method thereof.BACKGROUND

[0003] At present, mainstream dot-matrix anti-counterfeiting code technologies on the market generally suffer from a contradiction between concealment and scannability. Conventional invisible anti-counterfeiting codes mostly rely on special dyes or microscopic printed dots. Although such solutions can avoid direct detection by the human eye, they are limited by the device characteristics of mobile phone cameras. Most mobile phones only support visible light, and only a very small number of models support macro photography and the like, making them difficult to support direct terminal-based scanning. In contrast, for a quick-response (QR) code designed to be readable by a mobile phone, a dot diameter is usually greater than 80 µm, such that dots are easily discernible to the naked eye at a normal reading distance, thereby significantly compromising both the aesthetic appeal of printed matter and the concealment of the anti-counterfeiting code. In addition, existing anti-counterfeiting codes mostly adopt nearly square or approximately circular arrangements, making them difficult to adapt to narrow and elongated regions such as label edges and gaps between characters, thereby limiting flexibility of application scenarios.

[0004] Existing technologies have attempted to optimize dot size or layout, but have failed to effectively balance invisibility to the human eye and compatibility with mobile phones. For example, a solution employing micrometer-scale printed dots is theoretically compatible with a high-resolution camera, but generally lacks an error-tolerance mechanism for printing errors. As a result, in practical applications, the solution is prone to decoding failure due to printing deviations. Furthermore, existing recognition algorithms of anti-counterfeiting codes are insufficiently adaptable to curved or bent substrates. Conventional perspective transformation relies on single-region correction, and is difficult to handle geometric distortion of elongated codes on deformable substrates.SUMMARY

[0005] In view of the aforesaid deficiencies in the prior art, the present disclosure provides an anti-counterfeiting code, a generation method, and a recognition method, so as to facilitate efficient recognition by a device and provide substantial anti-counterfeiting strength and strong practical adaptability.

[0006] In order to solve the above technical problems, in a first aspect, the present disclosure provides an anti-counterfeiting code, where the anti-counterfeiting code includes a plurality of printed dots, an average diameter of all printed dots is 23-80 µm, and the edge-to-edge distance between any two adjacent printed dots is greater than 80 µm; and

[0007] at least one positioning pattern is arranged in the anti-counterfeiting code; where the positioning pattern includes a center of a circle and a plurality of recognition printed dots uniformly distributed around the center of the circle and located on a circumference with a predetermined radius, and an orientation is determined according to an omission of one of the recognition printed dots; and a region defined by the predetermined radius from the center of the circle is free of other printed dots.

[0008] In some embodiments, the anti-counterfeiting code has an aspect ratio greater than 2.

[0009] In some embodiments, the printed dots are populated in an outer peripheral region of the positioning pattern according to a random or pseudo-random algorithm, such that a ratio of a total printed dot area to a total area of the anti-counterfeiting code does not exceed 10%.

[0010] In some embodiments, an average diameter of all printed dots is 59-80 µm.

[0011] In some embodiments, a number of the recognition printed dots is 6, and one of the recognition printed dots is omitted.

[0012] In a second aspect, the present disclosure provides a generation method of an anti-counterfeiting code for generating the anti-counterfeiting code as described above. The anti-counterfeiting code includes a plurality of printed dots, where an average diameter of all printed dots is 23-80 µm, and the edge-to-edge distance between any two adjacent printed dots is greater than 80 µm; and at least one positioning pattern is arranged in the anti-counterfeiting code; where the positioning pattern includes a center of a circle and a plurality of recognition printed dots uniformly distributed around the center of the circle and located on a circumference with a predetermined radius, and an orientation is determined according to an omission of one of the recognition printed dots; and a region defined by the predetermined radius from the center of the circle is free of other printed dots. The method includes:

[0013] selecting a printed dot diameter according to an expected reading distance;

[0014] determining a center of a circle and recognition printed dots, and arranging at least one set of positioning patterns;

[0015] arranging printed dots in a random or pseudo-random manner, and controlling a center-to-center distance between adjacent printed dots;

[0016] calculating a ratio of a total printed dot area, and adjusting the printed dots based on a redundant coding strategy, such that the total printed dot area does not exceed 10% of a total area of the anti-counterfeiting code; and

[0017] arranging a resulting printed dot array into a strip-shaped structure having an aspect ratio greater than 2 to generate the anti-counterfeiting code.

[0018] In some embodiments, the adjusting the printed dots based on a redundant coding strategy includes:

[0019] controlling an average diameter of all printed dots in the anti-counterfeiting code to be 59-80 µm;

[0020] a number of printed dots having a diameter greater than 88 µm does not exceed 5% of a total number of printed dots, and a number of printed dots having a diameter lower than 46 µm does not exceed 10% of the total number of printed dots; and

[0021] when a ratio of the printed dots having a diameter lower than 46 µm reaches 10%, a coding error-correction rate of the anti-counterfeiting code is not lower than 20%.

[0022] In a third aspect, the present disclosure provides a recognition method of an anti-counterfeiting code for recognizing the anti-counterfeiting code as described above.

[0023] acquiring an image containing the anti-counterfeiting code, detecting a center of a circle and recognition printed dots of a positioning pattern, and determining a spatial position and orientation of the anti-counterfeiting code;

[0024] performing segmented perspective correction on the anti-counterfeiting code according to a pre-stored quadrilateral perspective restoration region;

[0025] performing binarization and decoding on a printed dot array after perspective correction to obtain original data information; and

[0026] completing anti-counterfeiting verification or traceability based on the original data information.

[0027] In some embodiments, the performing segmented perspective correction on the anti-counterfeiting code according to a pre-stored quadrilateral perspective restoration region includes:

[0028] dividing a strip-shaped structure of the anti-counterfeiting code into a plurality of quadrilateral perspective restoration regions in a length direction, where each quadrilateral perspective restoration region covers a segment of the anti-counterfeiting code;

[0029] extracting vertex coordinates of each quadrilateral perspective restoration region, respectively, and mapping each quadrilateral perspective restoration region to a standard plane according to predetermined correction parameters; and

[0030] stitching corrected images of the quadrilateral perspective restoration regions sequentially to reconstruct the printed dot array.

[0031] In some embodiments, the acquiring an image containing the anti-counterfeiting code, detecting a center of a circle and recognition printed dots of a positioning pattern, and determining a spatial position and orientation of the anti-counterfeiting code includes:

[0032] determining the orientation of the anti-counterfeiting code through central angles of the recognition printed dots combined with an omission location of the recognition printed dot.

[0033] Compared with the prior art, the present disclosure has the following beneficial effects:

[0034] The present disclosure provides an anti-counterfeiting code, and a generation method and a recognition method thereof, which significantly improves concealment and recognition reliability through the design of positioning pattern and the printed dot distribution strategy. The blank area in the region around the center of the circle combined with uniformly distributed recognition printed dots enables rapid and accurate positioning of spatial coordinates of the anti-counterfeiting code, while an asymmetric orientation mark formed by omission of a specific printed dot effectively avoids orientation misjudgment. The anti-counterfeiting code can be efficiently recognized by devices, and is suitable for complex printing scenarios such as curved surfaces and bending, thereby balancing anti-counterfeiting strength and practical adaptability.BRIEF DESCRIPTION OF THE DRAWINGS

[0035] FIG. 1 is a schematic diagram of an anti-counterfeiting code according to the present disclosure.

[0036] FIG. 2 is one schematic diagram of a positioning pattern according to the present disclosure.

[0037] FIG. 3 is another schematic diagram of a positioning pattern according to the present disclosure.

[0038] FIG. 4 is a schematic diagram illustrating the determination of an orientation of an anti-counterfeiting using a positioning pattern according to the present disclosure.

[0039] FIG. 5 is a schematic diagram illustrating the application of an anti-counterfeiting code to a label according to the present disclosure.

[0040] FIG. 6 is a schematic diagram illustrating the application of an anti-counterfeiting code to a brand according to the present disclosure.

[0041] FIG. 7 is a flowchart illustrating a generation method of an anti-counterfeiting code according to the present disclosure.

[0042] FIG. 8 is a flowchart illustrating a recognition method of an anti-counterfeiting code according to the present disclosure.

[0043] FIG. 9 is a flowchart illustrating step S82 of a recognition method of an anti-counterfeiting code according to the present disclosure.

[0044] FIG. 10 is a schematic diagram of one perspective transformation for a recognition method of an anti-counterfeiting code according to the present disclosure.

[0045] FIG. 11 is a schematic diagram of another perspective transformation for a recognition method of an anti-counterfeiting code according to the present disclosure.DETAILED DESCRIPTIONS OF THE EMBODIMENTS

[0046] For better understanding and implementation, the technical solution in the embodiments of the present disclosure will be described clearly and completely with reference to the accompanying drawings in the embodiments of the present disclosure. It is obvious that the embodiments described are merely some embodiments rather than all embodiments of the present disclosure. Based on the embodiments of the present disclosure, all the other embodiments obtained by those of ordinary skill in the art without making creative efforts shall fall within the scope of protection of the present disclosure.

[0047] In addition, the terms “including / comprising” and “having”, as well as any other variations used in the embodiments of the present disclosure, are intended to cover non-exclusive inclusions. 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 clearly listed, but may also include other steps or modules that are clearly listed or inherent to these processes, methods, products, or devices.

[0048] The embodiments of the present disclosure provide an anti-counterfeiting code, a generation method, and a recognition method, so as to facilitate efficient recognition by a device and provide substantial anti-counterfeiting strength and practical adaptability.

[0049] As shown in FIG. 1, the anti-counterfeiting code includes a plurality of printed dots, where an average diameter of all printed dots is 23-80 µm, and the edge-to-edge distance between any two adjacent printed dots is greater than 80 µm; a positioning pattern is arranged in the anti-counterfeiting code. The positioning pattern includes a center of a circle and a plurality of recognition printed dots uniformly distributed around the center of the circle and located on a circumference having a radius r, and an orientation is determined according to an omission of one of the recognition printed dots; and a region defined by the predetermined radius r from the center of the circle is free of other printed dots.

[0050] At least one positioning pattern is arranged in the anti-counterfeiting code. As shown in FIG. 2, the positioning pattern is composed of the center of the circle and the recognition printed dots uniformly distributed on the circumference having the radius r. By actively omitting one recognition printed dot, that is, forming a gap in a predetermined orientation, an orientation mark is formed, thereby solving the rotational ambiguity problem of conventional symmetrical patterns. In the present disclosure, “omission” refers to active omission of one specific element in a predetermined rule or pattern structure, such as one recognition printed dot in the positioning pattern, to form asymmetry or a unique identifier. In an outer peripheral region of the positioning pattern, data printed dots are populated according to a random or pseudo-random algorithm. A total area ratio of the printed dots is monitored in real time, a distribution density is dynamically optimized to ensure that a ratio of a total printed dot area to a total area of the anti-counterfeiting code does not exceed 10%.

[0051] The positioning pattern features a special dot-matrix distribution. The printed dots of the positioning pattern are discretely distributed and scattered at vertices of a plurality of approximately equilateral triangles. Within the region around the center of the circle defined by the predetermined radius r, no other printed dots are arranged, thereby forming an isolated reference point, such that coordinates of the center of the circle may be rapidly located by an isolated-point detection algorithm, and overall positioning of the anti-counterfeiting code is thus realized. A number of the recognition printed dots may be set to 4, 6, or 9, and is not limited in the present disclosure. For the configuration of the recognition printed dots, one of the recognition printed dots may have a form of appearance different from that of the other recognition printed dots. A gap formed by the omitted printed dot and an asymmetric feature formed with the other recognition printed dots may rapidly determine an orientation of the anti-counterfeiting code.

[0052] In this embodiment, along an extended circumference of the predetermined radius r, as shown in FIGS. 3 and 4, five recognition printed dots A, B, C, D, and E are distributed at intervals of a 60° central angle, that is, ∠AOB =∠BOC =∠COD =∠DOE = 60°. In addition, a sixth recognition printed dot F is actively omitted to form a 120° gap, resulting in ∠AOE = 120°. The omission design constructs the orientation mark through an angular difference, and without requiring any additional auxiliary pattern, a unique orientation may be determined by merely calculating central angles between three adjacent points, thereby clearly determining a spatial orientation of the anti-counterfeiting code. This blocks optical interference from surrounding data dots on the positioning pattern, and completely eliminates the rotational ambiguity problem of the conventional six-dot symmetrical layout.

[0053] A modern camera usually has a wide-angle focal length of 24-28 mm as a main lens focal length, with a minimum focusing distance of greater than 100 mm, and a resolution of 4,000×3,000, and a field of view of a wide-angle lens is usually 60°-84°. At an object distance of 100 mm, a length of an object visible to the lens is about 115-180 mm. For a 4,000×3,000 resolution, a diagonal pixel count is 5,000, and a width of an actual object corresponding to each pixel is 23-36 µm. Since most cameras use a Bayer pattern to arrange pixels, and camera lenses often exhibit a certain degree of distortion, and individual pixels may also be discarded by various algorithms during processing. Therefore, the precision of a single pixel is insufficient. For a small object to be stably captured by a mobile phone camera, 2×2 pixels are required. Since an actual object length corresponding to the single pixel is 23-36 µm, the object width visible to 2×2 pixels is 46-72 µm. When printed dots are to be scannable by most mobile phones on the market, a diameter of the printed dots should be no less than 72 µm. In the present disclosure, when a mean value of 59 µm is selected, that is, when the printed dot is greater than 59 µm, most mobile phones may capture the printed dots at the minimum focusing distance.

[0054] According to a Rayleigh criterion, a minimum angular resolution of the human eye under sufficient illumination is approximately 2.64×10-4 radians. Accordingly, it may be deduced that, at a viewing distance of 30 cm, an object having a diameter of less than 80 µm is difficult to be perceived by the naked eye. Based on this, the diameter of the printed dots of the anti-counterfeiting code is controlled within a range of 23-80 µm, where printed dots of 59-80 µm are compatible with ordinary mobile phone cameras, while ultra-micro printed dots at a 23-micrometer level may only be recognized by a macro lens, thereby ensuring both concealment and device compatibility.

[0055] The edge-to-edge distance between any two adjacent printed dots is greater than 80 µm, to prevent the human eye from perceiving the presence of the anti-counterfeiting code through a dot-matrix arrangement pattern. When a spacing between objects is less than a minimum resolvable distance of the human eye, the human eye will regard the objects as a continuous pattern. At a viewing distance of 30 cm, a spacing of 80 µm may prevent adjacent printed dots from forming visible textures due to visual fusion, thereby avoiding exposure of the anti-counterfeiting code. In addition, this spacing provides a sufficient pixel interval for a mobile phone camera, ensuring that each printed dot can be independently recognized, avoiding signal confusion caused by an excessively dense dot matrix during imaging, thereby improving decoding accuracy and anti-interference capability.

[0056] In terms of physical structural design, the anti-counterfeiting code adopts an elongated strip-shaped layout having an aspect ratio greater than 2. Compared with the approximately circular or square arrangement of conventional QR codes, the anti-counterfeiting code may be flexibly embedded into label edges, gaps between characters, and even inside lines of a brand logo. By using a shape having an aspect ratio greater than 2, it not only reduces interference with printing design, but also helps solve the problem of curved-surface recognition through regional correction technology. As shown in FIG. 5, a region indicated by an arrow at a top is one anti-counterfeiting code, which may be embedded in a blank area of a label; and a region indicated by an arrow on the left includes an anti-counterfeiting code arranged in the same row, which may be arranged between two rows of text of the label without affecting normal use of the label. As shown in FIG. 6, in an image of a label brand “alo”, a plurality of anti-counterfeiting codes are embedded in the letter “l” without making corresponding modifications to the label.

[0057] Based on the same inventive concept, the present disclosure further provides a generation method of the above anti-counterfeiting code. As shown in FIG. 7, the method includes the following steps:

[0058] Step S71: selecting a printed dot diameter according to an expected reading distance. The printed dot diameter is selected according to the characteristics of a substrate, such as ink absorption of paper, reflectivity of plastic film, or type of imaging device. Selecting the printed dot diameter according to the expected reading distance is a core step for balancing concealment and device compatibility. The reading distance directly affects the capability of a machine or the human eye to distinguish the printed dots. For example, at a conventional viewing distance of 30 cm, printed dots having a diameter ≤80 µm cannot be recognized by the human eye according to the Rayleigh criterion. In addition, for a physical resolution of a mobile phone camera, such as an ordinary device having 4000×3000 pixels, a single pixel corresponds to about 25 µm at an object distance of 100 mm. Therefore, the printed dot diameter needs to cover at least a 2×2 pixel region to ensure reliable imaging. Therefore, the printed dot diameter needs to be dynamically adjusted within a range of 23-80 µm. For example, a lower-limit value of 23-59 µm is selected for short-distance high-precision scenarios, while 59-80 µm is preferred for ordinary scenarios to adapt to mainstream devices.

[0059] Step S72: determining a center of a circle and recognition printed dots, and arranging at least one set of positioning patterns.

[0060] The positioning pattern may provide a spatial reference and orientation marker for the anti-counterfeiting code. A blank area is maintained within the region defined by the predetermined radius r from the center of the circle. Coordinates of the center of the circle may be rapidly positioned using isolated-point detection algorithms such as Hough transform or a method for determining an isolated point using an integral image, thereby establishing a coordinate system for subsequent image processing. In the present disclosure, the method for determining an isolated point using an integral image is adopted, and a processing speed of the method is one to two orders of magnitude faster than that of the Hough transform, enabling quicker recognition of an isolated point.

[0061] In this embodiment, six recognition printed dots are uniformly distributed on an outer circumference, and every two adjacent recognition printed dots are spaced by a 60° central angle. Specifically, the sixth recognition printed dot is omitted, and a blank pattern may be directly adopted, thereby forming a 120° gap and eliminating orientation ambiguity by geometric asymmetry. For example, in a flexible-package bending scenario, a conventional six-dot symmetrical pattern requires multiple rotation matching operations due to mirror symmetry. However, the omission design directly determines an orientation through an angular difference, which reduces orientation recognition time from 10 ms to less than 1 ms, significantly improving recognition efficiency.

[0062] Step S73: arranging printed dots in a random or pseudo-random manner, and controlling a center-to-center distance between adjacent printed dots.

[0063] This not only ensures unpredictability of the anti-counterfeiting code to resist copying attacks, but also avoids a visual fusion effect caused by an excessively dense dot matrix. Random distribution breaks regular textures, preventing the human eye from discovering abnormalities through light-dark contrast. Spacing control prevents adjacent printed dots from forming continuous light spots on a retina based on the principle of a minimum angular resolution of the human eye.

[0064] Step S74: calculating a ratio of a total printed dot area, and adjusting the printed dots based on a redundant coding strategy, such that the total printed dot area does not exceed 10% of a total area of the anti-counterfeiting code.

[0065] Printed dots whose diameters exceed the limits are monitored in real time, and the printed dots are adjusted based on the redundant coding strategy, so as to control an average diameter of all printed dots in the anti-counterfeiting code to be 59-80 µm, with a ratio of the printed dots having a diameter exceeding 88 µm not exceeding 5%, and a ratio of the printed dots having a diameter lower than 46 µm not exceeding 10%.

[0066] In some embodiments, a Reed-Solomon error-correcting code may also be automatically embedded, such that a coding error-correction rate is increased to 20%, and data-bit loss caused by printing diffusion or poor printing is repaired. For example, in high-speed inkjet printing, a diameter fluctuation range is approximately ±5 µm, and an error-correction mechanism may increase a decoding success rate from 85% to more than 97%. Real-time monitoring of printing errors ensures the decoding stability.

[0067] When the data printed dots are populated, the total area is calculated in real time. When the total area approaches a threshold, addition of new printed dots is automatically suspended or a size compression strategy is implemented, such as finely adjusting diameters of some printed dots to a lower limit. The control mechanism balances concealment and recognizability, and avoids visual texture abnormalities caused by an excessively dense dot matrix. When applied on a glossy metal label, an excessively high area ratio may form visible light spots due to reflection, while a 10% threshold may suppress an intensity of light spots below a background noise level. The above configurations significantly improve the tolerance to printing errors. When slight deviations occur in high-speed inkjet printing, recognition stability may still be ensured through dynamic error correction during decoding.

[0068] Step S75: arranging a resulting printed dot array into a strip-shaped structure having an aspect ratio greater than 2 to generate the anti-counterfeiting code.

[0069] The printed dot array is arranged in a strip-shaped structure having the aspect ratio greater than 2, the anti-deformation capability is enhanced through shape adaptation and regional correction. The elongated strip-shaped layout may be embedded into edges of the label or gaps between logo lines, reducing the impact on printing design, further adapting to narrow elongated spaces such as label edges and gaps between characters, and expanding practical application scenarios.

[0070] Based on the same inventive concept, as shown in FIG. 8, the present disclosure further provides a recognition method of the anti-counterfeiting code, including:

[0071] Step S81: acquiring an image containing the anti-counterfeiting code, detecting a center of a circle and recognition printed dots of a positioning pattern, and determining a spatial position and orientation of the anti-counterfeiting code.

[0072] Through image acquisition and rapid detection of the positioning pattern, a spatial coordinate system and an orientation reference of the anti-counterfeiting code are established. After an image is acquired by a mobile phone camera or an industrial vision device, the center of the circle and five recognition printed dots on the circumference are first located, and the orientation is determined by using the gap formed by the omitted printed dot. For example, the absolute blankness of region around the center of the circle may enable positioning to be completed within 0.01 s using the isolated-point detection algorithm for rapidly determining an isolated point through an integral image, while asymmetric angular features of the omitted point enable orientation determination without complicated geometric calculations, thereby reducing time consumption. This provides a spatial alignment basis for subsequent processing, especially in curved-surface or inclined image-capturing scenarios, orientation correction may eliminate interference of rotational deviation on decoding.Step S82: performing segmented perspective correction on the anti-counterfeiting code according to a pre-stored quadrilateral perspective restoration region, as shown in FIG. 9, including:

[0074] Step S821: dividing a strip-shaped structure of the anti-counterfeiting code into a plurality of quadrilateral perspective restoration regions in a length direction, where each quadrilateral perspective restoration region covers a segment of the anti-counterfeiting code; and

[0075] by dividing the quadrilateral perspective restoration regions, the problem of geometric distortion of the anti-counterfeiting code caused by deformation of the substrate due to curved surfaces, bending, and the like is solved. The elongated code is divided into a plurality of quadrilateral sub-regions in the length direction, such as HIJK and IVWJ in FIG. 10, such that each quadrilateral perspective restoration region covers a local code segment of approximately 3 mm, global nonlinear deformation is decomposed into a plurality of linearly processable units.

[0076] Step S822: extracting vertex coordinates of each quadrilateral perspective restoration region, respectively, and mapping each quadrilateral perspective restoration region to a standard plane according to predetermined correction parameters.

[0077] As shown in FIGS. 11, A, B, C, and D in the left image are used as perspective transformation restoration points, and become A′, B′, C′, and D′ in the right image after perspective transformation. Perspective transformation only supports restoration of linear changes. Since the four vertices of the elongated shape are relatively far apart, the results of perspective transformation will be poor when the anti-counterfeiting code undergoes a certain curved-surface deformation. A curve segment with a relatively short length may be approximately regarded as a straight line, that is, satisfying the linear requirements of perspective transformation. An anti-counterfeiting region where the anti-counterfeiting code is located is divided into one or more perspective transformation restoration regions, and perspective transformation is performed on the quadrilateral perspective restoration regions, respectively, thereby reducing the influence of curved-surface deformation.

[0078] Through the vertex coordinates of the quadrilateral perspective restoration regions, as shown in FIG. 10, a division point J is an intersection point of extensions of line segments BC and ED, a point H is a point on an extension of a line segment OA, and a length of a line segment HA is r; similarly, points I, K, U, V, W, and X may be obtained. Quadrilaterals HIJK, IVWJ, and HKXU are accordingly constructed, representing the quadrilateral perspective restoration regions, and each quadrilateral perspective restoration region is subjected to perspective transformation and is independently mapped to the standard plane, thereby eliminating stretching or distortion. Similarly, more quadrilateral perspective restoration regions may further be constructed on both sides, with each region independently subjected to perspective transformation, thereby further mitigating the impact of curved-surface deformation.

[0079] Geometric coordinates of vertices and perspective transformation parameters of each unit are recorded and written into a metadata layer of a fixed-layout file, thereby providing a deformation-correction reference for subsequent recognition. In addition, the pre-stored vertex coordinates and transformation matrices eliminate the need for real-time calculation of geometric parameters in the recognition stage, thereby shortening decoding time.

[0080] Step S823: stitching corrected images of the quadrilateral perspective restoration regions sequentially to reconstruct the printed dot array.

[0081] The corrected quadrilateral perspective restoration regions are sequentially recombined to restore a complete planar dot matrix using an image stitching algorithm, thereby ensuring data continuity.

[0082] Step S83: performing binarization and decoding on a printed dot array after perspective correction to obtain original data information.

[0083] Binarization and decoding are key links for converting a corrected image into decodable data information. Binarization processing is performed on a grayscale image using a local adaptive thresholding segmentation algorithm, distinguishing the printed dots from a background, and generating a binary dot matrix. For example, in a reflective metal label scenario, dynamic threshold adjustment may suppress light-spot interference and improve accuracy of printed dot contour extraction. The dot matrix is parsed according to predetermined coding rules, and an anti-counterfeiting identifier and a redundancy check code are extracted. When an abnormal point is detected, a Reed-Solomon error-correction algorithm is automatically invoked, with an error-correction capacity of ≥20%, thereby converting the physical dot matrix into digital information and providing a data foundation for a verification step.

[0084] Step S84: completing anti-counterfeiting verification or traceability based on the original data information.

[0085] Authenticity verification and traceability tracking are implemented through data comparison and blockchain technology. In this embodiment, the decoded identifier may be matched against a cloud database or a distributed ledger to verify uniqueness and legitimacy of a product having the anti-counterfeiting code. For example, in a luxury-goods anti-counterfeiting scenario, production batch, logistics route, and dealer information are returned, and data immutability is ensured through blockchain-based evidence preservation. In addition, verification results are fed back to a user terminal in real time, for example, an APP interface displays a prompt of “Genuine Product” or “Risk”, and digital signature technology is combined to prevent man-in-the-middle attacks. This step not only completes anti-counterfeiting verification, but also provides support for supply chain transparency and protection of consumer rights and interests.

[0086] The present disclosure improves concealment and recognition reliability through the design of positioning pattern and the printed dot distribution strategy. The blank area in the region around the center of the circle combined with uniformly distributed recognition printed dots enables rapid and accurate positioning of spatial coordinates of the anti-counterfeiting code, while an asymmetric orientation mark formed by omission of a specific printed dot effectively avoids orientation misjudgment. The overall layout not only ensures that the anti-counterfeiting code is difficult for the human eye to perceive, but also ensures efficient recognition by devices, and is particularly suitable for complex printing scenarios such as curved surfaces and bending, thereby balancing anti-counterfeiting strength and practical adaptability.

[0087] Based on the same inventive concept, the present disclosure further provides a computer device, including: a processor and a memory; where the memory stores a computer program, and the computer program is adapted to be loaded and executed by the processor to execute the steps of the above generation method or the recognition method of the anti-counterfeiting code.

[0088] For a processing method of the computer device, reference may be made to the description of the above method, and will not be repeated herein.

[0089] An embodiment of the present disclosure further provides a non-transitory machine-readable storage medium, where an executable program is stored on the non-transitory machine-readable storage medium. When the executable program is executed by a microprocessor, the processor is caused to execute the generation method or recognition method of the anti-counterfeiting code provided in the above embodiments.

[0090] An embodiment of the present disclosure provides a computer-readable storage medium storing a computer program for electronic data exchange, where the computer program causes a computer to execute the generation method or recognition method of the anti-counterfeiting code.

[0091] An embodiment of the present disclosure provides a computer program product, where the computer program product includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to cause a computer to execute the generation method or recognition method of the anti-counterfeiting code.

[0092] The embodiments described above are merely illustrative, where modules described as separate components may or may not be physically separated, and components shown as modules may or may not be physical modules, that is, they may be located at a single location or distributed across a plurality of network modules. Part or all of the modules may be selected according to actual requirements to achieve the objective of the solution of the embodiments. Those of ordinary skill in the art may understand and implement the present disclosure without making the inventive effort.

[0093] From the description of the above embodiments, it may be apparent to those skilled in the art that each implementation may be achieved by means of software plus a general-purpose hardware platform, and certainly may also be achieved by means of hardware. Based on the understanding, the above technical solutions, in essence or in other words, contributing to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, and the storage medium includes a read-only memory (ROM), a random access memory (RAM), a programmable read-only memory (PROM), an erasable programmable read only memory (EPROM), a one-time programmable read-only memory (OTPROM), an electrically-erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disk memories, a magnetic disk memory, a magnetic tape memory, or any other medium capable of carrying or storing data.

[0094] Finally, it should be noted that the content of the embodiments of the present disclosure are merely preferred embodiments of the present disclosure and are merely intended to illustrate the technical solution of the present disclosure, but not to limit the same; although the present disclosure has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that the technical solutions described in the foregoing embodiments may be modified or equivalents may be substituted for some of the technical features thereof; and the modification or substitution does not make the essence of the corresponding technical solution deviate from the spirit and scope of the technical solution of each embodiment of the present disclosure.

Claims

1. An anti-counterfeiting code, comprising a plurality of printed dots, wherein an average diameter of all printed dots is 23-80 µm, and an edge-to-edge distance between any two adjacent printed dots is greater than 80µm; andat least one positioning pattern is arranged in the anti-counterfeiting code; wherein the positioning pattern comprises a center of a circle and a plurality of recognition printed dots uniformly distributed around the center of the circle and located on a circumference with a predetermined radius, and an orientation is determined according to an omission of one of the recognition printed dots; and a region defined by the predetermined radius from the center of the circle is free of other printed dots.

2. The anti-counterfeiting code according to claim 1, wherein the anti-counterfeiting code has an aspect ratio greater than 2.

3. The anti-counterfeiting code according to claim 2, wherein the printed dots are populated in an outer peripheral region of the positioning pattern according to a random or pseudo-random algorithm, such that a ratio of a total printed dot area to a total area of the anti-counterfeiting code does not exceed 10%.

4. The anti-counterfeiting code according to claim 3, wherein an average diameter of all printed dots is 59-80 µm.

5. The anti-counterfeiting code according to claim 3, wherein a number of the recognition printed dots is 6, and one of the recognition printed dots is omitted.

6. A generation method of an anti-counterfeiting code, wherein the generation method is used to generate the anti-counterfeiting code according to claim 1, and comprises:selecting a printed dot diameter according to an expected reading distance;determining the center of the circle and the recognition printed dots, and arranging at least one set of positioning patterns;arranging the printed dots in a random or pseudo-random manner, and controlling a center-to-center distance between adjacent printed dots;calculating a ratio of a total printed dot area, and adjusting the printed dots based on a redundant coding strategy, such that the total printed dot area does not exceed 10% of a total area of the anti-counterfeiting code; andarranging a resulting printed dot array into a strip-shaped structure having an aspect ratio greater than 2 to generate the anti-counterfeiting code.

7. The generation method of the anti-counterfeiting code according to claim 6, wherein the adjusting the printed dots based on the redundant coding strategy comprises:controlling the average diameter of all printed dots in the anti-counterfeiting code to be 59-80 µm; whereina number of printed dots having a diameter greater than 88 µm does not exceed 5% of a total number of printed dots, and a number of printed dots having a diameter lower than 46 µm does not exceed 10% of the total number of printed dots; andwhen a ratio of the printed dots having a diameter lower than 46 µm reaches 10%, a coding error-correction rate of the anti-counterfeiting code is not lower than 20%.

8. A recognition method of an anti-counterfeiting code, wherein the recognition method is used to recognize the anti-counterfeiting code according to claim 1, and comprises:acquiring an image containing the anti-counterfeiting code, detecting the center of the circle and the recognition printed dots of the positioning pattern, and determining a spatial position and an orientation of the anti-counterfeiting code;performing segmented perspective correction on the anti-counterfeiting code according to a pre-stored quadrilateral perspective restoration region;performing binarization and decoding on a printed dot array after perspective correction to obtain original data information; andcompleting anti-counterfeiting verification or traceability based on the original data information.

9. The recognition method of the anti-counterfeiting code according to claim 8, wherein the performing segmented perspective correction on the anti-counterfeiting code according to the pre-stored quadrilateral perspective restoration region comprises:dividing a strip-shaped structure of the anti-counterfeiting code into a plurality of quadrilateral perspective restoration regions in a length direction, wherein each quadrilateral perspective restoration region covers a segment of the anti-counterfeiting code;extracting vertex coordinates of each quadrilateral perspective restoration region, respectively, and mapping each quadrilateral perspective restoration region to a standard plane according to predetermined correction parameters; andstitching corrected images of the quadrilateral perspective restoration regions sequentially to reconstruct the printed dot array.

10. The recognition method of the anti-counterfeiting code according to claim 8, wherein detecting the center of the circle and the recognition printed dots of the positioning pattern, and determining the spatial position and the orientation of the anti-counterfeiting code comprises:determining the orientation of the anti-counterfeiting code through central angles of the recognition printed dots combined with an omission location of the recognition printed dot.

11. The generation method of the anti-counterfeiting code according to claim 6, wherein the anti-counterfeiting code has an aspect ratio greater than 2.

12. The generation method of the anti-counterfeiting code according to claim 11, wherein the printed dots are populated in an outer peripheral region of the positioning pattern according to a random or pseudo-random algorithm, such that the ratio of the total printed dot area to the total area of the anti-counterfeiting code does not exceed 10%.

13. The generation method of the anti-counterfeiting code according to claim 12, wherein the average diameter of all printed dots is 59-80 µm.

14. The generation method of the anti-counterfeiting code according to claim 12, wherein a number of the recognition printed dots is 6, and one of the recognition printed dots is omitted.

15. The recognition method of the anti-counterfeiting code according to claim 8, wherein the anti-counterfeiting code has an aspect ratio greater than 2.

16. The recognition method of the anti-counterfeiting code according to claim 15, wherein the printed dots are populated in an outer peripheral region of the positioning pattern according to a random or pseudo-random algorithm, such that the ratio of the total printed dot area to the total area of the anti-counterfeiting code does not exceed 10%.

17. Therecognition method of the anti-counterfeiting code according to claim 16, wherein the average diameter of all printed dots is 59-80 µm.

18. The recognition method of the anti-counterfeiting code according to claim 16, wherein a number of the recognition printed dots is 6, and one of the recognition printed dots is omitted.