An anti-counterfeiting method based on a graph encryption algorithm

The anti-counterfeiting method using graphic encryption algorithms solves the problems of high replication, high professionalism, and high cost in existing anti-counterfeiting technologies. It achieves fast, low-cost, and widely applicable anti-counterfeiting identification under conventional packaging and printing, making it suitable for ordinary consumers.

CN116233450BActive Publication Date: 2026-06-30BERGTUMA (SHANGHAI) INFORMATION TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
BERGTUMA (SHANGHAI) INFORMATION TECH CO LTD
Filing Date
2023-01-05
Publication Date
2026-06-30

AI Technical Summary

Technical Problem

Existing anti-counterfeiting technologies are difficult to prevent copying and tampering, require high levels of expertise and are costly to identify, and fail to recognize in poor lighting or when the image code is damaged, which limits their widespread adoption and application scenarios.

Method used

It adopts an anti-counterfeiting method based on image encryption algorithm, which judges the integrity and encryption status of the image code through image processing and encoding logic. It supports conventional packaging and printing, and can be quickly identified using mobile APP or WeChat mini program to achieve unique binding between the item and the image code.

Benefits of technology

It can quickly identify the authenticity of the items inside the packaging box without damaging the packaging, supports conventional packaging and printing, reduces costs, can be used by ordinary consumers, has a high anti-counterfeiting effect, and is adaptable to various environmental conditions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116233450B_ABST
    Figure CN116233450B_ABST
Patent Text Reader

Abstract

This invention relates to the field of anti-counterfeiting technology, providing an anti-counterfeiting method based on a graphic encryption algorithm. The method includes: processing an obtained image file; segmenting the processed image file into different forms of graphic codes according to selected delimiting elements; and reverse-identifying the graphic codes according to a predetermined encoding logic to determine whether they have been copied, counterfeited, or damaged by external forces. If encryption is detected, the graphic codes are decrypted by reverse rotation according to the antenna pointing code. The graphic codes are then filtered and sorted according to a layered logic. Finally, the key layer and watermark layer data in the graphic codes are checked for matching. If they match, the item upload information is parsed through the graphic codes to form an encrypted anti-counterfeiting graphic code. This invention achieves a very high level of anti-counterfeiting effect without changing the original packaging conditions and costs, with extremely low application costs.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of anti-counterfeiting technology, and in particular to an anti-counterfeiting method based on a graphic encryption algorithm. Background Technology

[0002] Current anti-counterfeiting technologies face three main challenges:

[0003] First, it is difficult to guarantee that it will not be copied, tampered with or counterfeited. The limited solutions mostly adopt special-designed irreversible physical structures, which further limits the application scenarios and conditions of the technology. Only a very limited number of products can use it, and it is impossible to verify its authenticity without damaging the structure.

[0004] Secondly, the more powerful the anti-counterfeiting technology, the higher the level of professionalism required for identification, or the more specific equipment is required for identification, which makes it difficult for anti-counterfeiting technology to be widely used and greatly limits its use by ordinary consumers.

[0005] Third, the cost of using anti-counterfeiting technology in all stages of product production, packaging, transportation, and storage is relatively high.

[0006] The main problems with existing encryption algorithms include: first, they cannot be recognized when the image code is damaged to a certain extent in practical applications; second, they still require some special equipment for recognition, which limits the application scenarios and the target audience; third, poor lighting conditions can easily lead to recognition failure; and fourth, high image quality is required in application, which can easily lead to a certain degree of recognition failure. Summary of the Invention

[0007] This invention primarily addresses several technical problems existing in the prior art as described in the background section, proposing an anti-counterfeiting method based on a graphic encryption algorithm. This method aims to prevent counterfeiting through copying and high-definition scanning, quickly identify whether the items inside the packaging box / carton have been tampered with without damaging the packaging, support conventional packaging as well as conventional precision printing and laser engraving, have extremely low application costs, and achieve a very high degree of anti-counterfeiting effect without changing the original packaging conditions and costs.

[0008] This invention provides an anti-counterfeiting method based on a graphic encryption algorithm, comprising:

[0009] Perform image processing on the obtained image files;

[0010] The processed image file is divided into different types of image codes based on the selected delimiter elements;

[0011] The different forms of the graphic codes are identified in reverse according to the predetermined encoding logic to determine whether they have been copied, counterfeited, or damaged by external forces. If the determination is yes, an alarm is triggered, the data is archived, and the data is uploaded to the server synchronously. If the determination is no, the determination is continued to determine whether the graphic code is encrypted.

[0012] If encryption is detected, the image code is decrypted by rotating it in the reverse direction according to the antenna pointing code; for the image code that is not detected and decrypted, it is parsed. During the parsing process, the two-dimensional model of the image code is reassembled and the byte order is re-established.

[0013] The image codes are filtered according to hierarchical logic, and then categorized and sorted.

[0014] Determine whether the key layer data in the image code is correct. If it is incorrect, an alarm is triggered, the data is archived, and the data is uploaded to the server synchronously. If it is correct, continue to determine whether the watermark layer data in the image code matches the existing watermark features. If they do not match, an alarm is triggered, the data is archived, and the data is uploaded to the server synchronously.

[0015] If a match is found, the item upload information is parsed using the image code to form an encrypted anti-counterfeiting image code, thereby achieving a unique binding between the item and the image code.

[0016] Furthermore, the image processing of the obtained image file includes: rotating, stretching, flipping, correcting, cropping, and extracting the image file obtained by shooting or scanning.

[0017] Furthermore, the step of determining that there is no encrypted and decrypted image code to parse includes: filtering meaningful image codes according to the separator code, and then identifying the meaningful image codes according to the image code and meaning character correspondence table in the system.

[0018] Furthermore, the number of combinations of the segmented graphic codes is 2-9, and the combination form is one of the following: a straight line, a grid, a pentagon, or a hexagon.

[0019] Furthermore, the graphic is rotated according to certain rules.

[0020] Furthermore, after parsing the item upload information through the image code, the parsed data is uploaded and associated with the product information in the production or inventory management system.

[0021] Furthermore, the encrypted anti-counterfeiting code is printed or engraved on the outer packaging, inner packaging, or surface of the item using sealing stickers, fragile stickers, or integrated printing.

[0022] Furthermore, the orientation of the rectangular graphic code is determined using the top-character positioning method. Specifically: first, a solid line is drawn along the bottom edge of the rectangular graphic code; second, a solid line is drawn along the center of the rectangular graphic code. The shape of the character; finally, the top, bottom, left, and right sides of the rectangular graphic code are located using the above methods.

[0023] This invention provides an anti-counterfeiting method based on a graphic encryption algorithm, which can be counterfeited under existing technology conditions through copying and high-definition scanning. It can quickly identify whether the items inside the packaging box / carton have been switched without damaging the packaging. It supports conventional packaging, conventional precision printing and laser engraving, and has extremely low application costs. Attached Figure Description

[0024] Figure 1 This is a flowchart illustrating the implementation of the anti-counterfeiting method based on a graphic encryption algorithm provided by the present invention.

[0025] Figure 2 This is a logic diagram of the anti-counterfeiting method based on a graphic encryption algorithm provided by the present invention;

[0026] Figure 3 This is an example diagram illustrating the combination of encrypted image codes in the embodiment;

[0027] Figure 4 This is a schematic diagram showing that the encrypted graphic codes are uniformly rotated 90 degrees in the embodiment;

[0028] Figure 5 These are schematic diagrams showing the encrypted graphic codes rotated by 0°, 90°, 180°, and 270° respectively in the embodiments;

[0029] Figure 6 This is a schematic diagram illustrating the result of filtering layered data according to layered logic using existing technology in the embodiment. Detailed Implementation

[0030] To make the technical problems solved by this invention, the technical solutions adopted, and the technical effects achieved clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and not intended to limit it. Furthermore, it should be noted that, for ease of description, only the parts relevant to the invention are shown in the accompanying drawings, not all of them.

[0031] like Figure 1 , Figure 2 As shown, the anti-counterfeiting method based on a graphic encryption algorithm provided in this embodiment of the invention includes:

[0032] 101. Perform image processing on the obtained image file;

[0033] Specifically, image files obtained through shooting or scanning will undergo image processing such as rotation, stretching, flipping, skew correction, cropping, and trimming for later use.

[0034] 102. Divide the processed image file into different types of image codes based on the selected delimiter elements;

[0035] Specifically, such as Figure 3 As shown, the encrypted code can be divided according to the selected dividing elements in a predetermined manner, and the combination form can be a single line, a grid, a tic-tac-toe pattern, etc. The number of combinations of encrypted code segments can be 2-9 or even more. With the addition of the code's own fault tolerance, the code loss rate can be tolerated at over 50%-90%.

[0036] 103. Reverse the identification of different forms of graphic codes according to the established encoding logic to determine whether the graphic code has been copied, counterfeited, or damaged by external forces; if the determination is yes, then an alarm is triggered, the data is archived, and the data is uploaded to the server synchronously; if the determination is no, then continue to determine whether the graphic code is encrypted.

[0037] Specifically, the segmented image codes are reverse-engineered according to a predetermined encoding logic to determine whether they have been copied or counterfeited, or whether the image codes have suffered excessive damage due to soiling, wear, or other forms of damage. If the identification fails, an alarm is triggered and the data is archived or uploaded to the server synchronously. If any of the segmented image codes in the same group are successfully identified, the entire group is considered to have passed the identification process.

[0038] 104. If encryption is detected, the image code is decrypted by rotating it in the reverse direction according to the antenna pointing code; for images that are not detected and decrypted, they are parsed. During the parsing process, the two-dimensional model of the image code is reassembled and the byte order is re-established.

[0039] Specifically, the presence of an antenna pointing code determines whether the identified graphic code is encrypted. If encrypted, it is decrypted by rotating the antenna pointing code in reverse. The decrypted information data is initially parsed, and meaningful graphic codes are distinguished based on meaningless codes (separator codes). Then, the corresponding identification is performed according to the system's graphic code and meaning character correspondence table. During the decoding process, the identification of each two-dimensional model is reconfigured and the byte order is re-established.

[0040] 105. Filter the image data according to the hierarchical logic, and then classify and sort them;

[0041] Specifically, such as Figure 6 As shown, the image code layering in this embodiment adopts the existing technology, which mainly includes: the approved elements contained in the raster cell can contain 2-16 even pairs, which can be divided into eight types according to the granularity. At the same time, since the elements are printed in black and gray, they can be further subdivided into N+1 types according to the number of black and gray particles contained in each (N is the total number of particles). Four types can be selected as the layering logic to generate relevant layering data.

[0042] 106. Determine whether the key layer data in the graphic code is correct. If it is incorrect, alarm, archive, and synchronously upload to the server. If it is correct, continue to determine whether the watermark layer data in the graphic code matches the stored watermark features. If it does not match, alarm, archive, and synchronously upload to the server.

[0043] Specifically, connect to the system or server for comparison to determine whether the key layer data is correct. If it fails, alarm and archive or synchronously upload to the server. Connect to the system or server for comparison to determine whether the watermark layer data matches the stored watermark features. If it does not match, alarm and archive or synchronously upload to the server.

[0044] 107. If it matches, parse the item upload information through the graphic code to form an encrypted anti-counterfeiting graphic code to achieve the unique binding of the item and the graphic code.

[0045] Specifically, if the verification passes, parse the item upload information, upload the parsed data, and associate it with the product information in the production or inventory management system. After that, the encrypted anti-counterfeiting graphic code can be printed or engraved on the outer packaging, inner packaging or the surface of the item in the form of a sealing sticker, a frangible sticker or integrated printing to achieve the unique binding of the item and the graphic code.

[0046] In this embodiment, the encrypted graphic code can be rotated according to certain rules, such as Figure 4 shown, it can be rotated at the same angle, such as Figure 5 shown, or can be rotated at different angles respectively to enhance the encrypted anti-counterfeiting function.

[0047] In this embodiment, the upper character positioning method is used to determine the orientation of the rectangular graphic code. Specifically: First, draw a solid line along the bottom edge of the rectangular graphic code. Second, draw a character in the center of the rectangular graphic code. Finally, position the upper, lower, left and right of the rectangular graphic code through the above method. The above horizontal line and character are very similar to the ancient Chinese character '上', so it is called the 'upper character positioning method'.

[0048] In this embodiment, forms such as hidden codes or visible codes + hidden codes can be applied to enhance the anti-counterfeiting performance.

[0049] In this embodiment, anti-counterfeiting ink can be applied, which can only be displayed and recognized under the irradiation of light with a specific wavelength.

[0050] In this embodiment, frame-by-frame scanning is adopted, and the one with the best image quality is selected for recognition.

[0051] In this embodiment, the identification program is made into a mobile app, WeChat mini-program, or webpage, allowing for easy identification using a mobile phone, making it simple and convenient for ordinary consumers. In particular, the WeChat mini-program is convenient to use without downloading; the selected encryption logic order is pre-agreed and embedded in a dedicated decryption app.

[0052] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications to the technical solutions described in the foregoing embodiments, or equivalent substitutions for some or all of the technical features, do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for preventing counterfeiting based on a graphic encryption algorithm, characterized in that, The method includes: Image processing is performed on the obtained image files, including rotating, stretching, flipping, correcting skew, cropping and trimming the image files obtained by shooting or scanning. The processed image file is divided into different types of image codes based on the selected delimiter elements; the number of image code combinations after division is 2-9, and the combination form is one of the following: straight line, grid, tic-tac-toe, pentagon or hexagon; The different forms of the graphic codes are identified in reverse according to the predetermined encoding logic to determine whether they have been copied, counterfeited, or damaged by external forces. If the determination is yes, an alarm is triggered, the data is archived, and the data is uploaded to the server synchronously. If the determination is no, the determination is continued to determine whether the graphic code is encrypted. If encryption is detected, the image code is decrypted by rotating it in the reverse direction according to the antenna pointing code; for the image code that is determined not to be encrypted or decrypted, it is parsed. During the parsing process, the two-dimensional model of the image code is reassembled and the byte order is re-established; wherein, the parsing of the image code that is determined not to be encrypted or decrypted includes: filtering meaningful image codes according to the separator element, and then identifying the meaningful image codes according to the image code and meaning character correspondence table in the system; The image codes are filtered according to hierarchical logic, and then categorized and sorted. Determine whether the key layer data in the image code is correct. If it is incorrect, an alarm is triggered, the data is archived, and the data is uploaded to the server synchronously. If it is correct, continue to determine whether the watermark layer data in the image code matches the existing watermark features. If they do not match, an alarm is triggered, the data is archived, and the data is uploaded to the server synchronously. If a match is found, the item upload information is parsed using the image code to form an encrypted anti-counterfeiting image code, thereby achieving a unique binding between the item and the image code; After parsing the item upload information using the image code, the parsed data is uploaded and associated with the product information in the production or inventory management system.

2. The anti-counterfeiting method based on a graphic encryption algorithm according to claim 1, characterized in that, The graphic is rotated according to certain rules.

3. The anti-counterfeiting method based on a graphic encryption algorithm according to claim 2, characterized in that, The encrypted anti-counterfeiting code is printed or engraved on the outer packaging, inner packaging, or surface of the item using sealing stickers, fragile stickers, or integrated printing.

4. The anti-counterfeiting method based on a graphic encryption algorithm according to claim 3, characterized in that, The orientation of the rectangular graphic code is determined using the top-character positioning method, specifically as follows: First, draw a solid line along the bottom edge of the rectangular graphic. Secondly, draw at the center of the rectangular graphic code. glyphs; Finally, the top, bottom, left, and right sides of the rectangular graphic are located using the methods described above.