Logo grid complementary color anti-counterfeiting label generation method and system

CN122655818APending Publication Date: 2026-08-28GUANGZHOU LIMA ANTI-COUNTERFEITING TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610804982.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-05
Publication Date
2026-08-28

AI Technical Summary

Technical Problem

[0004]针对现有技术的不足,本发明提供了一种logo网格互补色防伪标签生成方法及系统,解决了现有技术中微差结构无法与数字编码关联、易被仿制的问题

Benefits of technology

本发明通过以logo网格作为统一的编码与定位基准,将尺寸差从标签整体外轮廓转移至网格级笔画结构,实现微米级尺寸差的可视化呈现,同时将尺寸特征、色彩特征与数字编码深度融合,形成不可逆的绑定关系,有效解决了现有技术中微差结构无法与数字编码关联、易被仿制的问题,提升了防伪标签的仿制壁垒。本方案采用带企业密钥的伪随机算法为每个网格单元分配基础色与尺寸差值,保证相同企业相同坐标生成结果一致,不同企业结果不同,确保标签生成的一致性与唯一性,借助亚像素级轮廓偏移技术实现高精度的尺寸差控制,结合哈希算法生成防伪校验码,任何特征数据的改变都会导致校验码完全不同,进一步保障防伪编码的不可伪造性,同时设置多尺度分级验证模式,能够同时满足普通消费者快速验证与企业高精度专业验证的不同需求。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122655818A_ABST
    Figure CN122655818A_ABST
Patent Text Reader

Abstract

The application discloses a logo grid complementary color anti-fake label generation method and system, and relates to the technical fields of digital image processing and anti-fake label generation. The method comprises the following steps: S1. receiving a logo vector diagram, an enterprise key and an anti-fake level parameter, determining the unit side length of the logo grid according to the anti-fake level, determining the size difference value interval according to the printing process type, and loading the complementary color wheel customized by the enterprise; and S2. dynamically generating an orthogonal logo grid with m rows and n columns according to the overall size and the length-width ratio of the logo font. The application takes the logo grid as a unified coding and positioning reference, transfers the size difference from the overall outer contour of the label to the grid-level stroke structure, realizes the visual presentation of the micron-level size difference, deeply integrates the size features, the color features and the digital coding, forms an encrypted binding relationship, and effectively solves the problems that the micro-difference structure cannot be associated with the digital coding and is easy to be imitated in the prior art.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of digital image processing and anti-counterfeiting label generation technology, specifically to a method and system for generating logo grid complementary color anti-counterfeiting labels. Background Technology

[0002] Complementary color anti-counterfeiting labels are a type of anti-counterfeiting product that combines color science principles with printing technology. They achieve authenticity through the specific color effect presented by the superposition of two label images, and are widely used in the packaging and labeling of various products requiring anti-counterfeiting measures. The core advantage of these labels lies in their simple and intuitive verification process; consumers can quickly complete the verification without the need for specialized equipment. Furthermore, they can be combined with digital coding technology to further enhance anti-counterfeiting strength. With continuous improvements in printing precision, micro-difference structure design has gradually been introduced into complementary color anti-counterfeiting labels. By controlling the minute dimensional differences between the two label images, the technical difficulty of counterfeiting is increased, thus enhancing the label's anti-counterfeiting performance.

[0003] However, existing complementary color anti-counterfeiting labels, when employing a micro-difference structure design, still suffer from the following problems: they cannot achieve micron-level dimensional accuracy while simultaneously establishing an irreversible binding relationship between the visual features generated by the dimensional difference and the digital code. Current technologies generally place the dimensional difference at the overall outer contour level of the label. Micron-level dimensional differences cannot produce a visible anti-counterfeiting effect, while magnifying the dimensional difference would make the dimensional features too obvious, making them easily replicated by ordinary printing equipment. Furthermore, the dimensional difference exists only as an independent physical feature, unrelated to the label's digital code. Counterfeiters can obtain the code by scanning and then print fake labels with the same code, making it impossible to verify the authenticity of the dimensional feature through the code. This renders the anti-counterfeiting function of the micro-difference structure completely ineffective. Summary of the Invention

[0004] To address the shortcomings of existing technologies, this invention provides a method and system for generating logo grid complementary color anti-counterfeiting labels, which solves the problem that the micro-difference structure cannot be associated with digital codes and is easily counterfeited in existing technologies.

[0005] To achieve the above objectives, the present invention provides the following technical solution: a method for generating a logo grid complementary color anti-counterfeiting label, comprising: S1. Receive the logo vector image, enterprise key and anti-counterfeiting level parameters, determine the unit side length of the logo grid according to the anti-counterfeiting level and determine the size difference value range according to the printing process type, and load the enterprise-customized complementary color wheel. S2. Dynamically generate an m-row, n-column orthogonal logo grid based on the overall size and aspect ratio of the logo font. The grid completely covers all logo characters, and the grid lines are aligned with the center lines of the logo strokes. Each grid cell is assigned a unique grid coordinate. S3. Morphological skeleton extraction and distance transformation techniques are used to convert each stroke into a hollow outline with a width of a, and a mapping relationship between strokes and grid coordinates is established. S4. Using grid cells as the basic unit, a pseudo-random algorithm with an enterprise key is used to assign a base color and size difference to each grid cell, and a three-dimensional mapping table of grid coordinates, base color, complementary color, and size difference is established. S5. Generate the surface printing image and the bottom printing image respectively. The surface layer generates a transparent hollow area based on the outline of the hollow strokes and superimposes grid lines as positioning marks. The bottom layer performs sub-pixel level outline offset on the filling strokes corresponding to each grid unit according to the mapping table and fills them with complementary colors and outputs them. S6. Extract the coordinates, base color, and size difference of all grid cells, concatenate them into a feature string according to the grid order, and generate an anti-counterfeiting verification code using a hash algorithm. Combine the product batch, timestamp, and anti-counterfeiting verification code into a unique anti-counterfeiting code, and establish a one-to-one correspondence between the anti-counterfeiting code and the mapping table and layered images.

[0006] Preferably, the dynamic generation of the m-row, n-column orthogonal logo grid includes: Calculate the outer rectangle size of the logo characters, and determine the values ​​of m and n according to the preset grid density algorithm so that the side length of each grid cell matches the average width of the logo strokes.

[0007] Preferably, establishing the mapping relationship between strokes and grid coordinates includes: Determine the direction of each stroke, determine the sequence of grid cells the stroke passes through based on the direction, assign a set of continuous grid coordinates to each stroke, and record the correspondence between the stroke number and the grid coordinate sequence.

[0008] Preferably, the method of assigning a base color and size difference to each grid cell using a pseudo-random algorithm with an enterprise key includes: The enterprise key and grid coordinates are used as seeds for a pseudo-random number generator, ensuring that the same enterprise and the same coordinates generate the same base color and size difference each time.

[0009] Preferably, the enterprise-customized complementary color wheel includes: The color wheel file provided by the company is analyzed to identify the basic colors and their corresponding complementary colors in the color wheel, and a lookup table of basic and complementary colors is created for subsequent color allocation.

[0010] Preferably, generating the surface printing image includes: The hollow outline is converted into vector path data. Based on the path data, a binary image of the transparent and non-transparent areas is generated. Grid lines corresponding to the logo grid are superimposed on the image edges as registration marks.

[0011] Preferably, generating the underlying printed image includes: Obtain the size difference corresponding to each grid cell from the mapping table, use half of the size difference as the offset to radially offset the outline of the filling stroke, use a subpixel interpolation algorithm to calculate the subpixel edge coordinates after offset, and fill the complementary color corresponding to the base color in the mapping table.

[0012] Preferably, the step of generating the anti-counterfeiting verification code using a hash algorithm includes: Read the grid coordinates, basic color codes, and size differences sequentially from left to right and from top to bottom, concatenate all feature data into a continuous string, and input the string into a hash function to generate a fixed-length checksum.

[0013] Preferably, the method further includes: Multi-scale hierarchical verification provides three modes: general-level verification, professional-level verification, and enterprise-level verification. For ordinary users, the anti-counterfeiting code is scanned via a mobile terminal, and the composite image of S1S2 is then manually compared. Professional-grade verification involves scanning the anti-counterfeiting code with a mobile terminal, aligning the overlay surface and bottom images, extracting the color features of the stroke edges, and automatically comparing them with the database. Enterprise-level verification uses industrial cameras to capture high-resolution overlay images, extracts the color edge width and color of each grid cell, automatically compares them one by one, and verifies the consistency of the hash check code. Enterprise-level verification uses industrial cameras to capture high-resolution overlay images, extracts the color edge width of each grid cell, compares it with the color one by one, and verifies the consistency of the hash check code.

[0014] This invention also provides a logo grid complementary color anti-counterfeiting label generation system, comprising: The initialization configuration module is used to receive the logo vector image, enterprise key, and anti-counterfeiting level parameters and generate a baseline configuration. The logo grid encoding and stroke extraction module is used to generate orthogonal logo grids and establish a mapping relationship between strokes and grid coordinates. The grid-level color and size mapping module is used to assign a base color, complementary color, and size difference to each grid cell and generate a mapping table. Layered image generation module, used to generate digital images of the top and bottom layers for printing; The multi-feature fusion coding binding module is used to generate anti-counterfeiting codes and establish their correspondence with the mapping table and layered images; The multi-scale hierarchical verification module is used to provide verification mechanisms in three modes: general-level verification, professional-level verification, and enterprise-level verification.

[0015] Compared with the prior art, the beneficial effects of the present invention are as follows: This invention uses a logo grid as a unified encoding and positioning benchmark, transferring size differences from the overall outer contour of the label to a grid-level stroke structure, achieving a visual representation of micron-level size differences. Simultaneously, it deeply integrates size features, color features, and digital encoding, forming an irreversible binding relationship. This effectively solves the problem in existing technologies where micro-difference structures cannot be associated with digital encoding and are easily counterfeited, thus raising the counterfeiting barrier for anti-counterfeiting labels. This solution employs a pseudo-random algorithm with an enterprise key to assign a base color and size difference value to each grid unit, ensuring consistent results for the same enterprise at the same coordinates, and different results for different enterprises, ensuring the consistency and uniqueness of label generation. High-precision size difference control is achieved using sub-pixel-level contour offset technology, combined with a hash algorithm to generate anti-counterfeiting verification codes. Any change in feature data will result in a completely different verification code, further ensuring the unforgeability of the anti-counterfeiting code. Furthermore, a multi-scale hierarchical verification mode is set up to simultaneously meet the different needs of ordinary consumers for rapid verification and enterprises for high-precision professional verification. Attached Figure Description

[0016] Figure 1 This is a flowchart of the method of the present invention; Figure 2 This is a system structure diagram of the present invention. Detailed Implementation

[0017] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0018] Please see Figure 1 This embodiment provides a method for generating anti-counterfeiting labels with complementary colors in a logo grid, and the specific implementation includes the following steps: S1. Receive the logo vector image, enterprise key and anti-counterfeiting level parameters, determine the unit side length of the logo grid according to the anti-counterfeiting level and determine the size difference value range according to the printing process type, and load the enterprise-customized complementary color wheel. S2. Dynamically generate an m-row, n-column orthogonal logo grid based on the overall size and aspect ratio of the logo font. The grid completely covers all logo characters, and the grid lines are aligned with the center lines of the logo strokes. Each grid cell is assigned a unique grid coordinate. S3. Morphological skeleton extraction and distance transformation techniques are used to convert each stroke into a hollow outline with a width of a, and a mapping relationship between strokes and grid coordinates is established. S4. Using grid cells as the basic unit, a pseudo-random algorithm with an enterprise key is used to assign a base color and size difference to each grid cell, and a three-dimensional mapping table of grid coordinates, base color, complementary color, and size difference is established. S5. Generate the surface printing image and the bottom printing image respectively. The surface layer generates a transparent hollow area based on the hollow stroke outline and superimposes grid lines as positioning marks. The bottom layer performs sub-pixel level outline offset on the filling strokes corresponding to each grid unit according to the mapping table and fills them with complementary colors. S6. Extract the coordinates, base color, and size difference of all grid cells, concatenate them into a feature string according to the grid order, and generate an anti-counterfeiting verification code using a hash algorithm. Combine the product batch, timestamp, and anti-counterfeiting verification code into a unique anti-counterfeiting code, and establish a one-to-one correspondence between the anti-counterfeiting code and the mapping table and layered images.

[0019] This solution uses the logo grid as a unified encoding and positioning benchmark. By transferring the size difference from the overall outer contour of the label to the grid-level stroke structure, it achieves the visualization of micron-level size differences. At the same time, it deeply integrates size features, color features and digital codes to form an irreversible binding relationship. This effectively solves the problem in existing technologies that micro-difference structures cannot be associated with digital codes and are easily counterfeited, thus raising the counterfeiting barrier of anti-counterfeiting labels.

[0020] In one specific embodiment, the dynamic generation of the m-row n-column orthogonal logo grid includes: Calculate the outer rectangle size of the logo characters, and determine the values ​​of m and n according to the preset grid density algorithm so that the side length of each grid cell matches the average width of the logo strokes.

[0021] Specifically, the grid density algorithm dynamically adjusts the grid density by establishing a correspondence between the grid cell side length and the anti-counterfeiting level. The higher the anti-counterfeiting level, the smaller the grid cell side length and the greater the grid density. For example, when the anti-counterfeiting level is 3, the grid cell side length is set to be equal to the average width of the logo strokes; when the anti-counterfeiting level is increased to 5, the grid cell side length can be reduced to half the average width of the logo strokes to increase encoding capacity and anti-counterfeiting strength. During grid generation, the width W and height H of the bounding rectangle of the logo characters are first calculated. Then, the number of rows m and columns n are calculated based on the grid cell side length s, where m is the smallest integer greater than or equal to H / s, and n is the smallest integer greater than or equal to W / s, ensuring that the grid completely covers all logo characters. Alignment between the grid lines and the center lines of the logo strokes is achieved by calculating the coordinates of the stroke skeleton. The coordinates of the grid lines are adjusted to coincide with the average coordinates of the stroke skeleton, ensuring that each stroke is evenly divided by the grid.

[0022] In one specific embodiment, establishing the mapping relationship between strokes and grid coordinates includes: Determine the direction of each stroke, determine the sequence of grid cells the stroke passes through based on the direction, assign a set of continuous grid coordinates to each stroke, and record the correspondence between the stroke number and the grid coordinate sequence.

[0023] Specifically, the stroke direction determination uses the directional gradient histogram algorithm. By calculating the gradient direction at each point on the stroke skeleton, the overall direction of the stroke is determined to be horizontal, vertical, or slanted. For horizontal strokes, the grid cells they pass through are recorded from left to right; for vertical strokes, from top to bottom; and for slanted strokes, they are recorded sequentially according to their extension direction. The grid coordinate sequence corresponding to each stroke remains continuous to ensure that subsequent color and size allocation can be evenly distributed along the stroke direction, avoiding visual breaks. After the mapping relationship is established, the system verifies the grid coverage of all strokes to ensure that no grid cell is occupied by multiple strokes repeatedly, and that no grid cell corresponding to a stroke is missing.

[0024] In one specific embodiment, the assignment of the base color and size difference to each grid cell using a pseudo-random algorithm with an enterprise key includes: The enterprise key and grid coordinates are used as seeds for a pseudo-random number generator, ensuring that the same enterprise and the same coordinates generate the same base color and size difference each time.

[0025] Specifically, the pseudo-random number generator uses a linear congruential generator, and its algorithm formula is as follows: ; in, Let be the nth pseudo-random number, a be the multiplier, c be the increment, and m be the modulus. In this scheme, the enterprise key K is combined with the grid coordinates (i,j) as the initial seed. ,Right now ,in This is a bitwise XOR operation, and << is a left shift operation. The multiplier 'a' takes the value 1103515245, the increment 'c' takes the value 12345, and the modulus 'm' takes the value... This parameter combination conforms to the ANSI C standard and exhibits good randomness and periodicity. The generated pseudo-random numbers are converted into a base color index and a size difference value through a mapping function. The base color index corresponds to the color sequence number in the enterprise's customized color wheel, and the size difference value is mapped to a preset value range. Because the enterprise key is unique and bound to the grid coordinates, the same grid coordinates from different enterprises will generate different base colors and size differences, while the same grid coordinates from the same enterprise will always produce completely consistent results, ensuring the consistency and uniqueness of tag generation.

[0026] In one specific embodiment, the loading of the enterprise-customized complementary color wheel includes: The color wheel file provided by the company is analyzed to identify the basic colors and their corresponding complementary colors in the color wheel, and a lookup table of basic and complementary colors is created for subsequent color allocation.

[0027] Specifically, the color wheel file supports SVG, JSON, and CSV formats. During parsing, the RGB values ​​of each basic color and its corresponding complementary color (RGB value) are extracted. The calculation of complementary colors is based on the color wheel principle. For any color (R, G, B) in the RGB color space, its complementary color (R, G, B) satisfies the following condition: , , For spot color printing scenarios, companies can directly provide the spot color number and its corresponding complementary spot color number. The system will automatically establish a mapping relationship between the spot color number and CMYK values ​​to ensure the accuracy of printed colors. After the color wheel is loaded, the system will perform color gamut verification on the colors in the color wheel to ensure that all colors are within the color gamut range of the selected printing process, avoiding color deviation issues in printing.

[0028] In one specific embodiment, generating the surface printing image includes: The hollow outline is converted into vector path data. Based on the path data, a binary image of the transparent and non-transparent areas is generated. Grid lines corresponding to the logo grid are superimposed on the image edges as registration marks.

[0029] Specifically, when converting the cutout outline into a vector path, Bezier curve fitting technology is used to ensure smooth, jagged edges. In the binary image, the transparent channel value is 0 for the cutout area and 255 for the non-cutout area. Registration marks are in the form of crosshairs, located at the four corners of the image. The center of the crosshairs is strictly aligned with the coordinates of the four corners of the logo grid. The crosshair width is set to 0.1mm and the length to 2mm to facilitate precise registration between the top and bottom layers during printing. The output resolution of the top layer image is set to 1200dpi in CMYK format to meet the requirements of high-precision printing.

[0030] In one specific embodiment, generating the underlying printed image includes: Obtain the size difference corresponding to each grid cell from the mapping table, use half of the size difference as the offset to radially offset the outline of the filling stroke, use a subpixel interpolation algorithm to calculate the subpixel edge coordinates after offset, and fill the complementary color corresponding to the base color in the mapping table.

[0031] Specifically, radial offset is implemented using a distance transformation algorithm. For each contour point of the filled stroke, its distance *d* to the stroke skeleton is calculated. Then, the position of the contour point is adjusted according to the offset *Δx*, so that the adjusted distance is *d* + *Δx*. The sub-pixel interpolation algorithm uses bicubic interpolation. By weighted averaging of the 16 neighboring pixels around the original pixel, sub-pixel-level edge coordinates are calculated, with an interpolation accuracy of 0.0005mm. For example, when the size difference is 0.01mm, the offset is 0.005mm, and the edge coordinate error calculated by bicubic interpolation is less than 0.0005mm, meeting the requirements of high-precision printing. The underlying image is also output in 1200dpi CMYK format to ensure consistent printing precision with the surface image.

[0032] In one specific embodiment, generating the anti-counterfeiting verification code using a hash algorithm includes: Read the grid coordinates, basic color codes, and size differences sequentially from left to right and from top to bottom, concatenate all feature data into a continuous string, and input the string into a hash function to generate a fixed-length checksum.

[0033] Specifically, the grid traversal order follows a row-first principle, meaning that all grid cells in the first row are traversed first, read sequentially from left to right, then the second row is traversed, and so on. The feature string is concatenated in the following format: hexadecimal representation of grid coordinates (i,j) + hexadecimal representation of the base color code + hexadecimal representation of the size difference. The feature data length of each grid cell is fixed at 8 bytes. The hash function uses the SHA-256 algorithm to generate a 256-bit hash value, then the first 16 bytes are truncated and converted into a 32-bit hexadecimal string as the anti-counterfeiting verification code. The SHA-256 algorithm is characterized by strong collision resistance and fast computation speed, effectively preventing the feature string from being tampered with. Any change in the coordinates, base color, or size difference of any grid cell will result in a completely different hash verification code, thus ensuring the uniqueness and unforgeability of the anti-counterfeiting code.

[0034] In one specific embodiment, the method further includes: Multi-scale hierarchical verification provides three modes: general-level verification, professional-level verification, and enterprise-level verification. For ordinary users, the anti-counterfeiting code is scanned via a mobile terminal, and the composite image of S1S2 is then manually compared. Professional verification involves scanning the anti-counterfeiting code with a mobile terminal, aligning and overlaying the surface and bottom images, extracting the color features of the stroke edges, and automatically comparing them with the database. Enterprise-level verification uses industrial cameras to capture high-resolution overlay images, extracts the color edge width of each grid cell, and automatically compares and verifies the consistency of the hash check code.

[0035] Specifically, in the standard verification process, the user opens a mobile app and scans the anti-counterfeiting QR code on the label. After verifying the legality of the anti-counterfeiting code format, the system retrieves a pre-stored standard logo composite image and displays it on the phone screen. The user visually compares the standard image displayed on the phone screen with the printed logo on the label. If the overall outline, stroke direction, and color distribution of the two are completely consistent, it is determined to be genuine; if there are obvious missing strokes, deformations, or color differences, it is determined to be a suspected counterfeit product. In the professional verification process, the mobile terminal captures the superimposed label image through a camera, uses an edge detection algorithm to extract the color features of the stroke edges, and compares the extracted features with the standard color features stored in the database. When the matching degree reaches a preset threshold, it is determined to be genuine. Enterprise-level verification uses a 1200dpi resolution industrial camera to capture label images, uses a sub-pixel edge detection algorithm to extract the color edge width of each grid unit with an accuracy of 0.001mm, and then compares the color edge width and color with the size difference and complementary color in the mapping table one by one. At the same time, it verifies whether the hash check code corresponding to the anti-counterfeiting code is consistent to ensure the accuracy of the verification results. The multi-scale hierarchical verification mechanism not only meets the needs of ordinary consumers for rapid verification, but also provides enterprises with high-precision professional verification methods, which can effectively cope with different levels of anti-counterfeiting needs.

[0036] Please see Figure 2 This embodiment also provides a logo grid complementary color anti-counterfeiting label generation system, used to implement the above-mentioned logo grid complementary color anti-counterfeiting label generation method. The system includes: The initialization configuration module is used to receive the logo vector image, enterprise key, and anti-counterfeiting level parameters and generate a baseline configuration. The logo grid encoding and stroke extraction module is used to generate orthogonal logo grids and establish a mapping relationship between strokes and grid coordinates. The grid-level color and size mapping module is used to assign a base color, complementary color, and size difference to each grid cell and generate a mapping table. Layered image generation module, used to generate digital images of the top and bottom layers for printing; The multi-feature fusion coding binding module is used to generate anti-counterfeiting codes and establish their correspondence with the mapping table and layered images; The multi-scale hierarchical verification module provides verification mechanisms in three modes: general-level, professional-level, and enterprise-level verification.

[0037] The modules communicate via a high-speed PCIe 3.0 interface for data transfer. The initialization configuration module connects to the enterprise's encrypted database via an Ethernet TCP / IP interface to obtain the enterprise's customized complementary color wheel data. The initialization configuration module transmits the generated baseline configuration to the logo grid encoding and stroke extraction module via an SPI interface. This module then transmits the grid coordinates and stroke mapping data to the grid-level color and size mapping module via an LVDS interface. The 3D mapping table generated by the grid-level color and size mapping module is transmitted to the layered image generation module and the multi-feature fusion encoding and binding module via a USB 3.2 interface. The layered image generation module outputs the generated layered printed image to the printing equipment via an HDMI 2.1 interface. The multi-feature fusion encoding and binding module stores the generated anti-counterfeiting code and its corresponding relationship data in the enterprise's encrypted database via an Ethernet TCP / IP interface. The multi-scale hierarchical verification module connects to the enterprise's encrypted database via an Ethernet TCP / IP interface to obtain standard feature data for verification and comparison. When the system is working, the initialization configuration module first receives input parameters and generates a baseline configuration. Then, it sequentially calls subsequent modules to complete grid encoding, mapping generation, image generation and encoding binding. Finally, the multi-scale hierarchical verification module provides verification services.

[0038] In summary, this invention uses a logo grid as a unified encoding and positioning benchmark, transferring the size difference from the overall outer contour of the label to the grid-level stroke structure, achieving a visual representation of micron-level size differences. Simultaneously, it deeply integrates size features, color features, and digital encoding, forming an irreversible binding relationship. This effectively solves the problem in existing technologies where micro-difference structures cannot be associated with digital encoding and are easily counterfeited, thus raising the counterfeiting barrier for anti-counterfeiting labels. This solution employs a pseudo-random algorithm with an enterprise key to assign a base color and size difference value to each grid unit, ensuring consistent results for the same enterprise at the same coordinates, and different results for different enterprises, ensuring the consistency and uniqueness of label generation. High-precision size difference control is achieved using sub-pixel-level contour offset technology, combined with a hash algorithm to generate an anti-counterfeiting verification code. Any change in feature data will result in a completely different verification code, further ensuring the unforgeability of the anti-counterfeiting code. Furthermore, a multi-scale hierarchical verification mode is set up to simultaneously meet the different needs of ordinary consumers for rapid verification and enterprises for high-precision professional verification.

[0039] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus.

[0040] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.

Claims

1. A method for generating anti-counterfeiting labels with complementary colors in a logo grid, characterized in that, include: S1. Receive the logo vector image, enterprise key and anti-counterfeiting level parameters, determine the unit side length of the logo grid according to the anti-counterfeiting level and determine the size difference value range according to the printing process type, and load the enterprise-customized complementary color wheel. S2. Dynamically generate an m-row, n-column orthogonal logo grid based on the overall size and aspect ratio of the logo font. The grid completely covers all logo characters, and the grid lines are aligned with the center lines of the logo strokes. Each grid cell is assigned a unique grid coordinate. S3. Morphological skeleton extraction and distance transformation techniques are used to convert each stroke into a hollow outline with a width of a, and a mapping relationship between strokes and grid coordinates is established. S4. Using grid cells as the basic unit, a pseudo-random algorithm with an enterprise key is used to assign a base color and size difference to each grid cell, and a three-dimensional mapping table of grid coordinates, base color, complementary color, and size difference is established. S5. Generate the surface printing image and the bottom printing image respectively. The surface layer generates a transparent hollow area based on the hollow stroke outline and superimposes grid lines as positioning marks. The bottom layer performs sub-pixel level outline offset on the filling strokes corresponding to each grid unit according to the mapping table and fills them with complementary colors. S6. Extract the coordinates, base color, and size difference of all grid cells, concatenate them into a feature string according to the grid order, and generate an anti-counterfeiting verification code using a hash algorithm. Combine the product batch, timestamp, and anti-counterfeiting verification code into a unique anti-counterfeiting code, and establish a one-to-one correspondence between the anti-counterfeiting code and the mapping table and layered images.

2. The method for generating a logo grid complementary color anti-counterfeiting label according to claim 1, characterized in that, The dynamically generated m-row, n-column orthogonal logo grid includes: Calculate the outer rectangle size of the logo characters, and determine the values ​​of m and n according to the preset grid density algorithm so that the side length of each grid cell matches the average width of the logo strokes.

3. The method for generating a logo grid complementary color anti-counterfeiting label according to claim 1, characterized in that, The process of establishing the mapping relationship between strokes and grid coordinates includes: Determine the direction of each stroke, determine the sequence of grid cells the stroke passes through based on the direction, assign a set of continuous grid coordinates to each stroke, and record the correspondence between the stroke number and the grid coordinate sequence.

4. The method for generating a logo grid complementary color anti-counterfeiting label according to claim 1, characterized in that, The method of assigning a base color and size difference to each grid cell using a pseudo-random algorithm with an enterprise key includes: The enterprise key and grid coordinates are used as seeds for a pseudo-random number generator, ensuring that the same enterprise and the same coordinates generate the same base color and size difference each time.

5. The method for generating a logo grid complementary color anti-counterfeiting label according to claim 1, characterized in that, The customized complementary color wheel for the loading enterprise includes: The color wheel file provided by the company is analyzed to identify the basic colors and their corresponding complementary colors in the color wheel, and a lookup table of basic and complementary colors is created for subsequent color allocation.

6. The method for generating a logo grid complementary color anti-counterfeiting label according to claim 1, characterized in that, The generated surface printing image includes: The hollow outline is converted into vector path data. Based on the path data, a binary image of the transparent and non-transparent areas is generated. Grid lines corresponding to the logo grid are superimposed on the image edges as registration marks.

7. The method for generating a logo grid complementary color anti-counterfeiting label according to claim 1, characterized in that, The generation of the underlying printed image includes: Obtain the size difference corresponding to each grid cell from the mapping table, use half of the size difference as the offset to radially offset the outline of the filling stroke, use a subpixel interpolation algorithm to calculate the subpixel edge coordinates after offset, and fill the complementary color corresponding to the base color in the mapping table.

8. The method for generating a logo grid complementary color anti-counterfeiting label according to claim 1, characterized in that, The step of generating the anti-counterfeiting verification code using a hash algorithm includes: Read the grid coordinates, basic color codes, and size differences sequentially from left to right and from top to bottom, concatenate all feature data into a continuous string, and input the string into a hash function to generate a fixed-length checksum.

9. The method for generating a logo grid complementary color anti-counterfeiting label according to claim 1, characterized in that, The method further includes: Multi-scale hierarchical verification provides three modes: general-level verification, professional-level verification, and enterprise-level verification. For ordinary users, the anti-counterfeiting code is scanned via a mobile terminal, and the composite image of S1S2 is then manually compared. Professional-grade verification involves scanning the anti-counterfeiting code with a mobile terminal, aligning the overlay surface and bottom images, extracting the color features of the stroke edges, and automatically comparing them with the database. Enterprise-level verification uses industrial cameras to capture high-resolution overlay images, extracts the color edge width of each grid cell, and automatically compares and verifies the consistency of the hash check code.

10. A logo grid complementary color anti-counterfeiting label generation system, applied to the logo grid complementary color anti-counterfeiting label generation method according to any one of claims 1 to 9, characterized in that, include: The initialization configuration module is used to receive the logo vector image, enterprise key, and anti-counterfeiting level parameters and generate a baseline configuration. The logo grid encoding and stroke extraction module is used to generate orthogonal logo grids and establish a mapping relationship between strokes and grid coordinates. The grid-level color and size mapping module is used to assign a base color, complementary color, and size difference to each grid cell and generate a mapping table. Layered image generation module, used to generate digital images of the top and bottom layers for printing; The multi-feature fusion coding binding module is used to generate anti-counterfeiting codes and establish their correspondence with the mapping table and layered images; The multi-scale hierarchical verification module provides verification mechanisms in three modes: general-level, professional-level, and enterprise-level verification.