CN117952138A - Anti-fake code generation and verification method and label-based anti-fake system - Google Patents

Anti-fake code generation and verification method and label-based anti-fake system Download PDF

Info

Publication number
CN117952138A
CN117952138A CN202311209554.8A CN202311209554A CN117952138A CN 117952138 A CN117952138 A CN 117952138A CN 202311209554 A CN202311209554 A CN 202311209554A CN 117952138 A CN117952138 A CN 117952138A
Authority
CN
China
Prior art keywords
image
counterfeiting
verified
counterfeiting image
printing
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311209554.8A
Other languages
Chinese (zh)
Inventor
罗涛
钱烽
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou Ant Love Technology Co ltd
Original Assignee
Hangzhou Ant Love Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou Ant Love Technology Co ltd filed Critical Hangzhou Ant Love Technology Co ltd
Priority to CN202311209554.8A priority Critical patent/CN117952138A/en
Publication of CN117952138A publication Critical patent/CN117952138A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K19/00Record carriers for use with machines and with at least a part designed to carry digital markings
    • G06K19/06Record carriers for use with machines and with at least a part designed to carry digital markings characterised by the kind of the digital marking, e.g. shape, nature, code
    • G06K19/06009Record carriers for use with machines and with at least a part designed to carry digital markings characterised by the kind of the digital marking, e.g. shape, nature, code with optically detectable marking
    • G06K19/06037Record carriers for use with machines and with at least a part designed to carry digital markings characterised by the kind of the digital marking, e.g. shape, nature, code with optically detectable marking multi-dimensional coding
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/018Certifying business or products
    • G06Q30/0185Product, service or business identity fraud
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/74Image or video pattern matching; Proximity measures in feature spaces
    • G06V10/761Proximity, similarity or dissimilarity measures

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Business, Economics & Management (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Software Systems (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Databases & Information Systems (AREA)
  • Evolutionary Computation (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Artificial Intelligence (AREA)
  • Multimedia (AREA)
  • Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • Accounting & Taxation (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Finance (AREA)
  • Marketing (AREA)
  • Strategic Management (AREA)
  • General Business, Economics & Management (AREA)
  • Editing Of Facsimile Originals (AREA)
  • Record Information Processing For Printing (AREA)

Abstract

One or more embodiments of the present disclosure provide a method for generating and verifying an anti-counterfeit code, and an anti-counterfeit system based on a label. The method comprises the following steps: the method comprises the steps that a generating party of the anti-counterfeiting label obtains an initial anti-counterfeiting image containing a graphic code for anti-counterfeiting, and splits the initial anti-counterfeiting image into a plurality of sub-images; dividing a plurality of sub-images into a plurality of times of printing to a label stock to generate a printing anti-counterfeiting image corresponding to a graphic code, wherein random offset exists among printing positions of the plurality of sub-images on the label stock; the verification party of the anti-counterfeiting label obtains an anti-counterfeiting image to be verified, which is acquired by a user through a terminal; obtaining a printed anti-counterfeiting image corresponding to the graphic code contained in the anti-counterfeiting image to be verified; and verifying the authenticity of the anti-counterfeiting image to be verified according to the image similarity between the anti-counterfeiting image to be verified and the printing anti-counterfeiting image.

Description

Anti-fake code generation and verification method and label-based anti-fake system
Technical Field
One or more embodiments of the present disclosure relate to the field of anti-counterfeiting technologies, and in particular, to a method and an apparatus for generating an anti-counterfeiting code, an electronic device, a machine-readable storage medium, a method and an apparatus for verifying an anti-counterfeiting code, an electronic device, a machine-readable storage medium, and a tag-based anti-counterfeiting system.
Background
The anti-counterfeiting label can also be called as anti-counterfeiting mark, anti-counterfeiting sticker and the like, and is a mark with anti-counterfeiting effect, which can be adhered, printed and transferred on the surface of a target object, the package of the target object or an accessory of the target object.
The two-dimensional code anti-counterfeit label is a common anti-counterfeit label. Additional information such as special characters or patterns visible to naked eyes, hidden contents invisible to naked eyes and the like can be embedded in the two-dimensional code anti-counterfeit label in advance; further, the two-dimensional code anti-counterfeiting label and the commodity can be bound by using an easy-tearing and pasting technology, such as self-adhesive glue and the like; subsequently, the user can scan the two-dimensional code anti-counterfeit label stuck on the commodity through a terminal such as a mobile phone to identify whether effective additional information is embedded in the two-dimensional code anti-counterfeit label, so as to identify the authenticity of the two-dimensional code anti-counterfeit label, and further judge the authenticity of the commodity stuck with the two-dimensional code anti-counterfeit label.
The two-dimensional code anti-counterfeiting label has the advantages of low cost, easiness in adhesion, easiness in checking and the like, and is widely applied to the commodity anti-counterfeiting field and the commodity tracing field at present.
In the related art, since the uniqueness of the two-dimensional code anti-counterfeit label is derived from the uniqueness of the digital anti-counterfeit image, once the digital anti-counterfeit image is leaked, the authenticity of the two-dimensional code anti-counterfeit label is difficult to verify, and the risk of losing a spam verification scheme exists.
Disclosure of Invention
The application provides a generation method of anti-fake codes, which comprises the following steps:
obtaining an initial anti-counterfeiting image containing a graphic code for anti-counterfeiting;
Splitting the initial anti-counterfeiting image into a plurality of sub-images; the plurality of sub-images are printed on the label stock for a plurality of times to generate a printed anti-counterfeiting image corresponding to the graphic code;
wherein the plurality of sub-images have random offsets between print positions on the label substrate; the printing anti-counterfeiting image supports identification of the graphic code corresponding to the printing anti-counterfeiting image.
The application also provides a verification method of the anti-counterfeiting code, which comprises the following steps:
acquiring an anti-counterfeiting image to be verified, which is acquired by a user through a terminal;
Obtaining a printed anti-counterfeiting image corresponding to the graphic code contained in the anti-counterfeiting image to be verified; the printing anti-counterfeiting image is generated by dividing a plurality of sub-images obtained by splitting an initial anti-counterfeiting image into a plurality of times of printing on a label printing stock; the plurality of sub-images having random offsets between print positions on the label substrate;
and verifying the authenticity of the anti-counterfeiting image to be verified according to the image similarity between the anti-counterfeiting image to be verified and the printing anti-counterfeiting image.
The application also provides a device for generating the anti-counterfeiting code, which comprises the following steps:
A first obtaining unit for obtaining an initial anti-counterfeiting image containing a graphic code for anti-counterfeiting;
An image splitting unit for splitting the initial anti-counterfeiting image into a plurality of sub-images; the plurality of sub-images are printed on the label stock for a plurality of times to generate a printed anti-counterfeiting image corresponding to the graphic code;
wherein the plurality of sub-images have random offsets between print positions on the label substrate; the printing anti-counterfeiting image supports identification of the graphic code corresponding to the printing anti-counterfeiting image.
The application also provides a verification device of the anti-counterfeiting code, which comprises:
The second obtaining unit is used for obtaining an anti-counterfeiting image to be verified, which is acquired by a user through the terminal;
A third obtaining unit, configured to obtain a printed anti-counterfeit image corresponding to the graphic code included in the anti-counterfeit image to be verified; the printing anti-counterfeiting image is generated by dividing a plurality of sub-images obtained by splitting an initial anti-counterfeiting image into a plurality of times of printing on a label printing stock; the plurality of sub-images having random offsets between print positions on the label substrate;
And the label verification unit is used for verifying the authenticity of the anti-counterfeiting image to be verified according to the image similarity between the anti-counterfeiting image to be verified and the printing anti-counterfeiting image.
The application also provides an anti-counterfeiting system based on the label, which comprises:
the generating party of the anti-counterfeiting label is used for executing the generating method of the anti-counterfeiting code;
And the verifying party of the anti-counterfeiting label is used for executing the verifying method of the anti-counterfeiting code.
The application also provides electronic equipment, which comprises a communication interface, a processor, a memory and a bus, wherein the communication interface, the processor and the memory are mutually connected through the bus;
The memory stores machine readable instructions, and the processor executes the generation method of the anti-counterfeiting code or the verification method of the anti-counterfeiting code by calling the machine readable instructions.
The application also provides a machine-readable storage medium storing machine-readable instructions which, when invoked and executed by a processor, implement the above-described anti-counterfeiting code generation method or the above-described anti-counterfeiting code verification method.
According to the embodiment, on one hand, an initial anti-counterfeiting image is split into a plurality of sub-images, and then the split sub-images are printed on a label printing stock for a plurality of times, so that a printed anti-counterfeiting image corresponding to a graphic code contained in the initial anti-counterfeiting image is generated; because the plurality of sub-images have random offset between the printing positions on the label printing stock, the random offset between the printing positions on the label printing stock of the plurality of sub-images can be utilized, so that the generated printing anti-counterfeiting image has uniqueness, and the counterfeiting cost of the anti-counterfeiting label is improved.
On the other hand, after the anti-counterfeiting image to be verified, which is acquired by the user through the terminal, is obtained, the verification party of the anti-counterfeiting label can obtain a printing anti-counterfeiting image corresponding to the graphic code contained in the anti-counterfeiting image to be verified, and can verify the authenticity of the anti-counterfeiting image to be verified according to the image similarity between the anti-counterfeiting image to be verified and the printing anti-counterfeiting image, so that the authenticity of the anti-counterfeiting label is determined; therefore, even if the initial anti-counterfeiting image is leaked, the authenticity of the anti-counterfeiting image to be verified, which is acquired by the user, can be verified by verifying whether the random offset existing in the printing anti-counterfeiting image is consistent with the random offset existing in the anti-counterfeiting image to be verified, so that the false bottom verification scheme of the anti-counterfeiting label is provided.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the drawings that are needed in the description of the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments described in the present disclosure, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic illustration of an initial security image shown in an exemplary embodiment;
FIG. 2 is a schematic diagram of a sub-image shown in an exemplary embodiment;
FIG. 3 is a schematic illustration of a printed security image shown in an exemplary embodiment;
FIG. 4 is a schematic illustration of another printed security image shown in an exemplary embodiment;
FIG. 5 is a flow chart illustrating a method of generating anti-counterfeiting code according to an exemplary embodiment;
FIG. 6 is a schematic diagram of another seed image shown in an exemplary embodiment;
FIG. 7 is a flow chart illustrating a method of verification of anti-counterfeit code, in accordance with an exemplary embodiment;
FIG. 8 is a schematic view of a corner point shown in an exemplary embodiment;
Fig. 9 is a schematic structural diagram of an electronic device in which a generating device of an anti-counterfeiting code or a verifying device of the anti-counterfeiting code is located, which is shown in an exemplary embodiment;
FIG. 10 is a block diagram of an apparatus for generating security codes, shown in an exemplary embodiment;
fig. 11 is a block diagram illustrating a verification apparatus of an anti-counterfeit code according to an exemplary embodiment.
Detailed Description
In order to make the technical solutions in the present specification better understood by those skilled in the art, the technical solutions in the embodiments of the present specification will be clearly and completely described below with reference to the drawings in the embodiments of the present specification, and it is obvious that the described embodiments are only some embodiments of the present specification, not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are intended to be within the scope of the present disclosure.
It should be noted that: in other embodiments, the steps of the corresponding method are not necessarily performed in the order shown and described in this specification. In some other embodiments, the method may include more or fewer steps than described in this specification. Furthermore, individual steps described in this specification, in other embodiments, may be described as being split into multiple steps; while various steps described in this specification may be combined into a single step in other embodiments.
The anti-counterfeiting label can also be called as anti-counterfeiting mark, anti-counterfeiting sticker and the like, and is a mark with anti-counterfeiting effect, which can be adhered, printed and transferred on the surface of a target object, the package of the target object or an accessory of the target object.
The two-dimensional code anti-counterfeit label is a common anti-counterfeit label. Additional information such as special characters or patterns visible to naked eyes, hidden contents invisible to naked eyes and the like can be embedded in the two-dimensional code anti-counterfeit label in advance; further, the two-dimensional code anti-counterfeiting label and the commodity can be bound by using an easy-tearing and pasting technology, such as self-adhesive glue and the like; subsequently, the user can scan the two-dimensional code anti-counterfeit label stuck on the commodity through a terminal such as a mobile phone to identify whether effective additional information is embedded in the two-dimensional code anti-counterfeit label, so as to identify the authenticity of the two-dimensional code anti-counterfeit label, and further judge the authenticity of the commodity stuck with the two-dimensional code anti-counterfeit label.
The two-dimensional code anti-counterfeiting label has the advantages of low cost, easiness in adhesion, easiness in checking and the like, and is widely applied to the commodity anti-counterfeiting field and the commodity tracing field at present.
In the related art, in order to avoid batch imitation of the two-dimensional code anti-counterfeiting label, different additional information can be generally embedded in the two-dimensional code pattern itself or the peripheral area of the two-dimensional code pattern so as to generate different digital anti-counterfeiting images, and then the generated digital anti-counterfeiting images are printed on a label printing stock.
Therefore, in the embodiment shown above, each two-dimensional code anti-counterfeiting label can be provided with unique embedded information, so that the two-dimensional code anti-counterfeiting labels can be prevented from being imitated in batches, and the counterfeiting cost is increased. However, since the uniqueness of the two-dimensional code anti-counterfeit label is derived from the uniqueness of the digital anti-counterfeit image, once the digital anti-counterfeit image is leaked, the authenticity of the two-dimensional code anti-counterfeit label is difficult to verify, and the risk of losing the spam verification scheme exists.
In view of this, the present disclosure aims to propose a scheme for generating and verifying anti-counterfeit codes, so that a user can still verify the authenticity of an anti-counterfeit label printed with the anti-counterfeit codes under the condition that a digital anti-counterfeit image is leaked.
Because the anti-counterfeit label printing equipment has the characteristics of relative position offset of a roller and printing paper, mechanical vibration of an ink jet printer during ink jet printing and the like, random offset possibly exists between the pattern position obtained by actual printing and the expected printing position in the printing process, the digital anti-counterfeit pattern can be split into a plurality of sub-patterns, and each split sub-pattern is printed on a label printing object for multiple times, so that the anti-counterfeit label obtained by actual printing still has the macroscopic digital anti-counterfeit pattern (the visual effect is not necessarily equal to that of the original digital anti-counterfeit pattern), and the random position offset generated in the printing process can be utilized as the unique mark of the anti-counterfeit label and can be used as the verification basis of the anti-counterfeit label.
When the method is realized, a generator of the anti-counterfeiting label can firstly obtain an initial anti-counterfeiting image containing graphic codes for anti-counterfeiting, and can split the initial anti-counterfeiting image into a plurality of sub-images; the plurality of sub-images may be divided into a plurality of prints onto a label substrate to generate a printed security image corresponding to the graphic code; wherein the plurality of sub-images have random offsets between print positions on the label substrate; the printing anti-counterfeiting image supports identification of the graphic code corresponding to the printing anti-counterfeiting image.
Correspondingly, the verification party of the anti-counterfeiting label can obtain an anti-counterfeiting image to be verified, which is acquired by a user through the terminal; further, the verifying party of the anti-counterfeiting label can obtain a printing anti-counterfeiting image corresponding to the graphic code contained in the anti-counterfeiting image to be verified; the printing anti-counterfeiting image is generated by dividing a plurality of sub-images obtained by splitting an initial anti-counterfeiting image into a plurality of times of printing on a label printing stock; further, the verifying party of the anti-counterfeiting label can verify the authenticity of the anti-counterfeiting image to be verified according to the image similarity between the anti-counterfeiting image to be verified and the printing anti-counterfeiting image.
The printing anti-counterfeiting image refers to an actual printing effect obtained after the plurality of sub-images are printed on the label stock for a plurality of times. For example, after printing a plurality of sub-images obtained by splitting an initial anti-counterfeiting image onto a label substrate, image acquisition may be performed on the printed label substrate to obtain a generated printed anti-counterfeiting image.
The anti-counterfeiting label refers to a real object obtained after a plurality of sub-images are printed on a label stock for a plurality of times, namely, the anti-counterfeiting label refers to the label stock printed with the printed anti-counterfeiting image.
For example, referring to fig. 1 and 2, fig. 1 is a schematic diagram of an initial security image according to an exemplary embodiment, and fig. 2 is a schematic diagram of a sub-image according to an exemplary embodiment. After obtaining the initial anti-counterfeiting image H shown in fig. 1, the generating party of the anti-counterfeiting label can split the initial anti-counterfeiting image H into two sub-images shown in fig. 2, namely a sub-image A and a sub-image B; further, the generating party of the anti-counterfeiting label can divide the sub-image a and the sub-image B shown in fig. 2 into two times of printing on the label printing stock, so as to generate a printed anti-counterfeiting image corresponding to the two-dimensional code contained in the initial anti-counterfeiting image H shown in fig. 1.
Since the positional shift generated during each printing process is random, when the printed anti-counterfeit image is generated a plurality of times based on the sub-image a and the sub-image B shown in fig. 2, the generated printed anti-counterfeit image is different and unique. For example, referring to fig. 3 and 4, fig. 3 is a schematic view of a printed security image according to an exemplary embodiment, and fig. 4 is a schematic view of another printed security image according to an exemplary embodiment. The printed security image G1 shown in fig. 3 and the printed security image G2 shown in fig. 4 are both generated based on the sub-image a and the sub-image B shown in fig. 2, and it can be still seen that the two-dimensional code included in the initial security image H exists in the printed security image G1 and the printed security image G2, but the printed security image G1 and the printed security image G2 are different.
Further, it is assumed that the printed anti-counterfeit image G1 shown in fig. 3 is a printed anti-counterfeit image obtained by image-capturing a real anti-counterfeit label generated by a manufacturer of the anti-counterfeit label, and the printed anti-counterfeit image G2 shown in fig. 4 is a printed anti-counterfeit image obtained by image-capturing a false anti-counterfeit label generated by a counterfeiter of the anti-counterfeit label. The user can acquire the anti-counterfeiting image Q to be verified through the terminal, and the anti-counterfeiting image Q to be verified can be provided for a verification party of the anti-counterfeiting label; further, after obtaining the anti-counterfeit image Q to be verified, the verifying party of the anti-counterfeit label may obtain a printed anti-counterfeit image G1 corresponding to the graphic code included in the anti-counterfeit image Q to be verified; further, if the image similarity between the to-be-verified anti-counterfeiting image Q and the printed anti-counterfeiting image G1 is high, the verification party of the anti-counterfeiting label can determine that the authenticity of the to-be-verified anti-counterfeiting image Q passes verification; and if the image similarity between the to-be-verified anti-counterfeiting image Q and the printing anti-counterfeiting image G1 is low, the verification party of the anti-counterfeiting label can determine that the authenticity of the to-be-verified anti-counterfeiting image Q is not verified.
Therefore, in the technical scheme in the specification, on one hand, the initial anti-counterfeiting image is split into a plurality of sub-images, and then the split sub-images are printed on a label printing stock for a plurality of times, so that a printing anti-counterfeiting image corresponding to the graphic code contained in the initial anti-counterfeiting image is generated; because the plurality of sub-images have random offset between the printing positions on the label printing stock, the random offset between the printing positions on the label printing stock of the plurality of sub-images can be utilized, so that the generated printing anti-counterfeiting image has uniqueness, and the counterfeiting cost of the anti-counterfeiting label is improved.
On the other hand, after the anti-counterfeiting image to be verified, which is acquired by the user through the terminal, is obtained, the verification party of the anti-counterfeiting label can obtain a printing anti-counterfeiting image corresponding to the graphic code contained in the anti-counterfeiting image to be verified, and can verify the authenticity of the anti-counterfeiting image to be verified according to the image similarity between the anti-counterfeiting image to be verified and the printing anti-counterfeiting image, so that the authenticity of the anti-counterfeiting label is determined; therefore, even if the initial anti-counterfeiting image is leaked, the authenticity of the anti-counterfeiting image to be verified, which is acquired by the user, can be verified by verifying whether the random offset existing in the printing anti-counterfeiting image is consistent with the random offset existing in the anti-counterfeiting image to be verified, so that the false bottom verification scheme of the anti-counterfeiting label is provided.
It should be noted that, compared with the related art, in addition to the step of generating the initial anti-counterfeit image, the graphic code included in the initial anti-counterfeit image may be used as the unique identifier of the anti-counterfeit label, or the random offset existing between the printing positions of the plurality of sub-images on the label printing stock may be used as the unique identifier of the anti-counterfeit label in the printing step of the anti-counterfeit label, and further the authenticity of the anti-counterfeit label may be verified based on the graphic code and/or the random offset, thereby improving the reliability of the authenticity verification for the anti-counterfeit label.
The present application is described below by way of specific embodiments and in connection with specific application scenarios.
Referring to fig. 5, fig. 5 is a flowchart illustrating a method for generating an anti-counterfeiting code according to an exemplary embodiment. The method may perform the steps of:
step 502: an initial security image is obtained that contains a graphic code for security.
For example, the generating party of the anti-counterfeit label may obtain an initial anti-counterfeit image H as shown in fig. 1, where QR Code (Quick Response Code) with anti-counterfeit effect may be included.
It should be noted that fig. 1 is only an exemplary description, and is not particularly limited in this specification. In the step 502, the graphic Code may be not only a QR Code, but also other two-dimensional codes, such as a Data Matrix, a Han Xin Code, etc.; in addition, the graphic code may be a two-dimensional code, or may be other graphic codes, such as a one-dimensional bar code, which is not listed here.
In step 502, the initial anti-counterfeit image may be generated by the generator of the anti-counterfeit label based on the anti-counterfeit information, or may be obtained directly from a third party by the generator of the anti-counterfeit label.
In one embodiment, the obtaining an initial security image including a graphic code for security may specifically include: based on preset anti-counterfeiting information, generating a graphic code carrying the anti-counterfeiting information, and generating the initial anti-counterfeiting image containing the graphic code.
For example, a two-dimensional code having an anti-counterfeiting effect may be generated based on the anti-counterfeiting information C, and then an initial anti-counterfeiting image H including the two-dimensional code as shown in fig. 1 may be generated.
In the embodiments described above, the content of the security information is not particularly limited. For example, the anti-counterfeiting information may be a preset character string, which has an anti-counterfeiting function, such as a production lot, a commodity identifier, and the like. For another example, the anti-counterfeiting information may specifically be a graphic code identifier, and the graphic code identifier and the anti-counterfeiting content have a one-to-one correspondence, and the anti-counterfeiting content corresponding to the graphic code identifier may be queried in the database based on the image code identifier identified from the graphic code.
Step 504: splitting the initial anti-counterfeiting image into a plurality of sub-images; the plurality of sub-images are printed on the label stock for a plurality of times to generate a printed anti-counterfeiting image corresponding to the graphic code; wherein the plurality of sub-images have random offsets between print positions on the label substrate; the printing anti-counterfeiting image supports identification of the graphic code corresponding to the printing anti-counterfeiting image.
Wherein "a plurality of" may include two or more and "a plurality of" may include two or more.
For example, after obtaining the initial anti-counterfeit image H shown in fig. 1, the generating party of the anti-counterfeit label may split the initial anti-counterfeit image H into two sub-images, sub-image a and sub-image B, as shown in fig. 2; further, the sub-image a and the sub-image B may be printed onto the label substrate in two times to generate a printed security image corresponding to the two-dimensional code included in the initial security image H as shown in fig. 1. Wherein, as shown in fig. 3, there is a random offset between the printing positions of sub-image a and sub-image B on the label substrate, that is, the overlapping portion of the white slit and the black area that appears in the printed security image as shown in fig. 3. It should be noted that, because the graphic code usually has a certain fault tolerance mechanism, that is, when the complete graphic code is not recognized or the graphic code is stained, the information carried by the graphic code can be correctly recognized; therefore, in the embodiment shown above, even if there is a random offset between the printing positions on the label substrate of the plurality of sub-images obtained by splitting the initial anti-counterfeit image, which results in a certain overlapping portion of white gaps or black areas in the graphic code included in the printed anti-counterfeit image actually printed on the anti-counterfeit label, when the user scans the anti-counterfeit label through the terminal, the graphic code corresponding to the printed anti-counterfeit image can still be identified, and the anti-counterfeit information carried in the graphic code can also be obtained.
In one embodiment shown, the initial security image may include dark and light regions. In order to improve the recognition success rate of the image coding in the subsequent verification stage and to make the generated anti-counterfeiting label more attractive, only the dark color area in the initial anti-counterfeiting image can be split instead of directly splitting the whole initial anti-counterfeiting image.
In this case, the splitting the initial anti-counterfeit image into a plurality of sub-images may specifically include: splitting the initial anti-counterfeiting image based on a preset pattern to obtain a first sub-image which is split from the dark region and has the shape of the preset pattern, and splitting a second sub-image which is remained after the first sub-image is split from the initial anti-counterfeiting image.
The preset graphics can be preset characters, special patterns and the like. For example, the preset pattern may be a character such as a letter or a number, and the preset pattern may also be a special pattern such as a five-pointed star, a triangle, a rectangle, a plum blossom, a peach heart, a cloud, etc.
The graphic code can be a two-dimensional code; the dark areas included in the initial security image may include a plurality of rectangular dark areas.
The two-dimensional code can be printed in black and white or in color. If the two-dimensional code is black-and-white printed, the dark area is the area where the black small square is located, and the light area is the area where the white small square is located; and if the two-dimensional code is color-printed, the display pattern of the two-dimensional code may be in various colors, the area identified as being equivalent to the black square may be determined as a dark area and the area identified as being equivalent to the white square may be determined as a light area according to the two-dimensional code identification process.
In some possible embodiments, in order to improve the anti-counterfeit performance of the anti-counterfeit label, the anti-counterfeit cost is further increased, and in the generation stage of the anti-counterfeit label, the preset pattern may be randomly selected.
In this case, the preset graphic may be one or more graphic selected randomly from a preset graphic set.
For example, as shown in fig. 3, the preset graphic set may include letters, numbers, five stars, triangles, rectangles, quincuncials, peach hearts, and clouds; the generating party of the anti-counterfeit label can randomly select one or more preset patterns from the preset pattern set, split the initial anti-counterfeit image H shown in fig. 1 based on the selected one or more preset patterns, obtain a sub-image a split from a dark color area included in the initial anti-counterfeit image H, and obtain a sub-image B (i.e., b=h-a) remaining after the sub-image a is split from the initial anti-counterfeit image H.
In other possible embodiments, in order to further improve the anti-counterfeit performance of the anti-counterfeit label and increase the anti-counterfeit cost, the specific positions and the number of the splitting positions, which need to be split in the dark area included in the initial anti-counterfeit image, may also be determined randomly in the generation stage of the anti-counterfeit label.
In this case, the splitting the initial anti-counterfeiting image based on the preset pattern may specifically include: randomly selecting a random number of rectangular dark areas from the plurality of rectangular dark areas; and splitting the preset graph from the selected dark color area of the rectangle, determining the split partial image with the shape of the preset graph as the first sub-image, and determining the rest partial image of the initial anti-counterfeiting image as the second sub-image after splitting the preset graph from the selected dark color area of the rectangle.
It should be noted that fig. 2 is only an exemplary embodiment, and an embodiment in which each black square block included in the two-dimensional code is split based on a preset pattern is shown. In practical application, the two-dimensional code can be split only for part of black squares contained in the two-dimensional code, and the part of black squares needing to be split can be selected randomly from all black squares contained in the two-dimensional code. Further, after determining the preset pattern and the black squares to be split, the specific positions of the preset pattern in the black squares to be split may also be determined randomly, which is not illustrated here.
In addition, fig. 2 is merely an exemplary description, and is not particularly limited in this specification. In the step 504, the number of the plurality of sub-images may be two or more. Regarding a specific implementation manner of splitting the initial anti-counterfeiting image into a plurality of sub-images, besides splitting a dark color region included in the initial anti-counterfeiting image based on a preset graph, the whole initial anti-counterfeiting image can be directly split into a plurality of parts, and the split first sub-image and the split second sub-image can be split secondarily, and the like.
For example, referring to fig. 6, fig. 6 is a schematic diagram of another seed image shown in an exemplary embodiment. As shown in fig. 6, the initial anti-counterfeit image H shown in fig. 1 may be directly split into the sub-image D and the sub-image E (i.e., e=h-D) based on the irregular curve.
For another example, after splitting the initial anti-counterfeit image H shown in fig. 1 into the sub-image a and the sub-image B shown in fig. 2, the sub-image a may be split for the second time to split the sub-image a into the sub-image A1 and the sub-image A2 (i.e., h=a1+a2+b).
In this specification, as a basis for subsequent verification of the anti-counterfeit label, the method may further include:
Step 506: dividing the plurality of sub-images into a plurality of times of printing to the label stock, and carrying out image acquisition on the printed label stock to obtain the printing anti-counterfeiting image corresponding to the graphic code.
For example, after the sub-image a and the sub-image B shown in fig. 2 are printed onto the label stock twice, the generator of the anti-counterfeit label may perform image acquisition on the printed label stock to obtain a printed anti-counterfeit image G1 shown in fig. 3; the two-dimensional code included in the printed anti-counterfeit image G1 shown in fig. 3 corresponds to the two-dimensional code included in the initial anti-counterfeit image H shown in fig. 1.
Further, after the anti-counterfeit label is printed, the anti-counterfeit label can be adhered to the commodity to create a binding relationship between the anti-counterfeit label and the commodity at a physical level. Subsequently, the user can acquire the image of the anti-counterfeiting label stuck on the commodity through a mobile phone or other image acquisition equipment so as to obtain an anti-counterfeiting image to be verified on the anti-counterfeiting label.
Referring to fig. 7, fig. 7 is a flowchart illustrating a verification method of anti-counterfeiting code according to an exemplary embodiment. The verification method can be executed by a server for verifying the authenticity of the anti-counterfeit label. The method may perform the steps of:
step 702: and obtaining the anti-counterfeiting image to be verified, which is acquired by the user through the terminal.
For example, a user can acquire an image of an anti-counterfeit label to be verified, which is stuck on a commodity, through a terminal to obtain an anti-counterfeit image Q to be verified, and the anti-counterfeit image Q to be verified can be provided for a server corresponding to a verification party of the anti-counterfeit label; the server side can obtain the anti-counterfeiting image Q to be verified.
In the step 702, the to-be-verified anti-counterfeit image obtained by the server may specifically include: and the user photographs or scans the anti-counterfeiting label to be verified through the terminal to obtain an anti-counterfeiting image to be verified, and the anti-counterfeiting image is uploaded to the server.
In addition, in step 702, in addition to the anti-counterfeit image to be verified, the server may obtain anti-counterfeit information identified by the terminal by scanning the anti-counterfeit image to be verified. Or in the step 702, after obtaining the anti-counterfeit image to be verified, the server may identify the anti-counterfeit image to be verified, so as to obtain anti-counterfeit information carried by the graphic code included in the anti-counterfeit image to be verified.
Step 704: obtaining a printed anti-counterfeiting image corresponding to the graphic code contained in the anti-counterfeiting image to be verified; the printing anti-counterfeiting image is generated by dividing a plurality of sub-images obtained by splitting an initial anti-counterfeiting image into a plurality of times of printing on a label printing stock; the plurality of sub-images have random offsets between print positions on the label substrate.
For example, after obtaining the to-be-verified security image Q, the verifier of the security label may obtain a printed security image G1 corresponding to the graphic code included in the to-be-verified security image Q.
In one embodiment shown, the database may store a first correspondence between security information and printed security images. In this case, the obtaining a printed security image corresponding to the graphic code contained in the security image to be verified may specifically include: obtaining anti-counterfeiting information carried by graphic codes contained in the anti-counterfeiting image to be verified; and according to the first corresponding relation, searching the printing anti-counterfeiting image corresponding to the obtained anti-counterfeiting information from a database.
For example, after the sub-image a and the sub-image B shown in fig. 2 are printed onto the label stock twice, the generator of the anti-counterfeit label may perform image acquisition on the printed label stock to obtain a printed anti-counterfeit image G1 shown in fig. 3, and may store a first correspondence between the anti-counterfeit information C and the printed anti-counterfeit image G1 in the database; further, after obtaining the anti-counterfeiting image Q to be verified, the verifying party of the anti-counterfeiting label can obtain anti-counterfeiting information C carried in the two-dimensional code included in the anti-counterfeiting image Q to be verified, and find out a printed anti-counterfeiting image G1 corresponding to the anti-counterfeiting information C according to the first corresponding relation stored in the database.
Step 706: and verifying the authenticity of the anti-counterfeiting image to be verified according to the image similarity between the anti-counterfeiting image to be verified and the printing anti-counterfeiting image.
For example, after obtaining the to-be-verified anti-counterfeiting image Q and the printed anti-counterfeiting image G1, the verifying party of the anti-counterfeiting label can verify the authenticity of the to-be-verified anti-counterfeiting image according to the image similarity between the to-be-verified anti-counterfeiting image Q and the printed anti-counterfeiting image G1; if the image similarity between the anti-counterfeit image Q to be verified and the printed anti-counterfeit image G1 is high, the verification party of the anti-counterfeit label can determine that the authenticity of the anti-counterfeit image Q to be verified passes the verification, and further can determine that the authenticity of the anti-counterfeit label to be verified also passes the verification; if the image similarity between the to-be-verified anti-counterfeiting image Q and the printing anti-counterfeiting image G1 is low, the verification party of the anti-counterfeiting label can determine that the authenticity of the to-be-verified anti-counterfeiting image Q is not verified, and further the authenticity of the to-be-verified anti-counterfeiting label can be determined to be not verified.
In the illustrated embodiment, since the actual printing effect of the anti-counterfeit label is unstable, the printed anti-counterfeit image obtained by each printing has uniqueness, the authenticity verification result of the image to be verified cannot be obtained by directly comparing the anti-counterfeit image to be verified with the printed anti-counterfeit image, but a first difference region between the anti-counterfeit image to be verified and the standard anti-counterfeit image and a second difference region between the printed anti-counterfeit image and the standard anti-counterfeit image can be determined respectively, and then the similarity between the anti-counterfeit image to be verified and the printed anti-counterfeit image is determined based on the similarity between the first difference region and the second difference region.
In this case, verifying the authenticity of the to-be-verified anti-counterfeit image according to the image similarity between the to-be-verified anti-counterfeit image and the printed anti-counterfeit image may specifically include: based on the anti-fake information carried by the graphic code contained in the anti-fake image to be verified, obtaining a standard anti-fake image for verifying the authenticity of the anti-fake image to be verified; performing exclusive OR operation on the anti-counterfeiting image to be verified and the standard anti-counterfeiting image to obtain a first difference region; performing exclusive OR operation on the printing anti-counterfeiting image and the standard anti-counterfeiting image to obtain a second difference area; calculating the region similarity between the first difference region and the second difference region; and if the region similarity is lower than a preset threshold value, determining that the authenticity of the anti-counterfeiting image to be verified is not verified.
The exclusive OR (xor) operation refers to an operation that if the values of two objects are different, the exclusive OR operation result is 1, and if the values of the two objects are the same, the exclusive OR operation result is 0. The first difference region may be used to characterize random offsets present in the anti-counterfeit image to be verified; the second region of difference may be used to characterize random offset present in the printed security image.
For example, after the anti-counterfeiting image Q to be verified and the printing anti-counterfeiting image G are obtained, a standard anti-counterfeiting image S can be obtained based on the anti-counterfeiting information C carried in the anti-counterfeiting image Q to be verified; further, the to-be-verified anti-counterfeiting image Q and the standard anti-counterfeiting image S can be subjected to exclusive-or operation to obtain a first difference area A1, and the printing anti-counterfeiting image G and the standard anti-counterfeiting image S can be subjected to exclusive-or operation to obtain a second difference area A2; further, the region Similarity between the first difference region A1 and the second difference region A2 may be calculated; if the calculated Similarity of the areas is lower than a preset threshold T, determining that the authenticity of the anti-counterfeiting image Q to be verified is not verified, and determining that the authenticity of the anti-counterfeiting label to be verified is not verified.
In some possible embodiments, regarding the implementation manner of obtaining the standard anti-counterfeiting image, an initial anti-counterfeiting image corresponding to the standard anti-counterfeiting image can be searched in a database based on anti-counterfeiting information, and the searched initial anti-counterfeiting image is determined to be the standard anti-counterfeiting image; or the standard security image may be directly regenerated based on the security information.
In this case, the database also stores a second correspondence between the anti-counterfeiting information and the initial anti-counterfeiting image; the obtaining a standard anti-counterfeiting image for verifying the authenticity of the anti-counterfeiting image to be verified based on the anti-counterfeiting information carried by the graphic code contained in the anti-counterfeiting image to be verified specifically may include: according to the second corresponding relation, an initial anti-counterfeiting image corresponding to anti-counterfeiting information carried by graphic codes contained in the anti-counterfeiting image to be verified is searched out from the database and used as the standard anti-counterfeiting image; or generating the graphic code carrying the anti-counterfeiting information based on the anti-counterfeiting information carried by the graphic code contained in the anti-counterfeiting image to be verified, and generating a standard anti-counterfeiting image containing the regenerated graphic code.
For example, in the generation stage of the anti-counterfeit label, after the initial anti-counterfeit image H is generated based on the anti-counterfeit information C, the correspondence between the anti-counterfeit information C and the initial anti-counterfeit image H may be stored in the database; in the verification stage of the anti-counterfeit label, the verification party can find out an initial anti-counterfeit image H corresponding to the anti-counterfeit information C from the database and take the initial anti-counterfeit image H as a standard anti-counterfeit image S.
For another example, in the verification stage of the security label, after obtaining the security information C, the verifier may directly regenerate the standard security image S based on the security information C. In the embodiment shown above, compared with the implementation manner of searching the initial anti-counterfeit image in the database as the standard anti-counterfeit image, the response speed of directly regenerating the standard anti-counterfeit image based on the anti-counterfeit information is faster, so that the verification efficiency of the authenticity of the anti-counterfeit label can be improved.
In some possible embodiments, the region similarity between the first difference region and the second difference region may be calculated based on the region area, thereby improving the calculation efficiency of the region similarity.
In this case, the calculating the region similarity between the first difference region and the second difference region may specifically include: performing exclusive OR operation on the first difference region and the second difference region to obtain a third difference region; calculating the area similarity between the first difference area and the second difference area according to the area of the third difference area and the area of the second difference area; wherein the smaller the ratio between the area of the third difference region and the area of the second difference region, the higher the region similarity between the first difference region and the second difference region.
For example, after the first difference area A1 and the second difference area A2 are calculated, the first difference area A1 and the second difference area A2 may be subjected to an exclusive or operation to obtain a third difference area A3; further, the region Similarity between the first difference region A1 and the second difference region A2 can be calculated by the formula similarity=1-S3/S2; wherein S3 is the area of the third difference region A3, and S2 is the area of the second difference region A2.
In the embodiment shown above, the area similarity between the first difference area and the second difference area may be calculated based on Hausdroff, dice, hu-movement algorithm, and is not listed here.
In some possible embodiments, due to the size limitation of the security label, the random offset in the printed security image may be small, and when comparing the printed security image with the security image to be verified, it is necessary to ensure that the alignment error of the printed security image and the security image is less than 3 pixels, and typically, the alignment error of most of the alignment algorithms is 20-50 pixels; therefore, the angular point characteristics of the printing anti-counterfeiting image and the anti-counterfeiting image to be verified can be extracted through angular point detection at a sub-pixel level, image preprocessing is carried out based on the extracted angular point characteristics, and the printing anti-counterfeiting image after image preprocessing is compared with the anti-counterfeiting image to be verified.
In this case, before performing an exclusive or operation on the to-be-verified anti-counterfeit image and the standard anti-counterfeit image to obtain the first difference region, the method may further include: performing sub-pixel level corner detection on the anti-counterfeiting image to be verified to obtain corner features of the anti-counterfeiting image to be verified, and performing image preprocessing on the anti-counterfeiting image to be verified based on the corner features of the anti-counterfeiting image to be verified; and carrying out sub-pixel-level corner detection on the printing anti-counterfeiting image to obtain corner features of the printing anti-counterfeiting image, and carrying out image preprocessing on the printing anti-counterfeiting image based on the corner features of the printing anti-counterfeiting image.
Wherein, the corner feature specifically may include, but is not limited to: anchor points in the graphic coding, individual corner points of the image coding, etc.
Wherein, the image preprocessing specifically can include, but is not limited to: image alignment, binarization processing, graphics transformation (e.g., affine transformation, perspective transformation), and so forth.
For example, referring to fig. 8, fig. 8 is a schematic view of a corner point shown in an exemplary embodiment. Taking the printing anti-counterfeiting image shown in fig. 3 as an example for fine alignment, the detection of the huff lines can be firstly carried out on the partial image of the positioning point of the upper left corner of the two-dimensional code, the corner points of each huff line are obtained, the obtained intersection points are clustered, the point of the upper left corner can be selected from the clustered intersection points, and the detection of the sub-pixel corner points is carried out, so that the corner point of the upper left corner shown in fig. 8 is obtained; based on a similar procedure, the corner points of the lower left corner and the corner points of the upper right corner as shown in fig. 8 can be obtained; further, for the partial image of the right lower corner of the two-dimensional code without positioning points, the connected domains of the black rectangle can be found, the point of the right lower corner of each connected domain is obtained, clustering and sub-pixel level corner detection are carried out on the connected domains, and the corner of the right lower corner shown in fig. 8 is obtained; further, after four corner points of the two-dimensional code included in the printed anti-counterfeiting image G1 are found, perspective transformation can be performed on the printed anti-counterfeiting image G1 based on the detected four corner points, so as to obtain a precisely aligned printed anti-counterfeiting image g1_refine. Based on a similar process, a precisely aligned anti-counterfeit image to be verified Q_refine can be obtained.
For another example, the binarization processing of the adaptive threshold value can be performed on the precisely aligned anti-counterfeiting image q_refine to obtain a binarized anti-counterfeiting image q_bin to be verified; and, the binarization processing of the adaptive threshold value can be performed on the precisely aligned printed anti-counterfeiting image G1_refine to obtain a printed anti-counterfeiting image G1_binary after the binarization processing. Subsequently, the similarity between the two can be calculated based on the binarized anti-counterfeiting image Q_binary to be verified and the binarized printed anti-counterfeiting image G1_binary.
In one embodiment, the verifying party of the anti-counterfeiting label can verify the authenticity of the anti-counterfeiting image to be verified according to the anti-counterfeiting information carried in the anti-counterfeiting image to be verified; if the verification is passed, verifying according to random offset in the anti-counterfeiting image to be verified, so as to improve the verification reliability of the anti-counterfeiting label; if the verification result does not pass, the fact that the authenticity verification of the anti-counterfeiting image to be verified does not pass is directly determined, so that the verification efficiency of the anti-counterfeiting label is improved.
For example, after obtaining the anti-counterfeit image Q to be authenticated, the anti-counterfeit information C' carried therein may be obtained; if the anti-counterfeiting information C' carried in the anti-counterfeiting image Q to be verified is inconsistent with the anti-counterfeiting information C carried in the printing anti-counterfeiting image G1, the authenticity of the anti-counterfeiting image Q to be verified can be determined to be not verified, and further the authenticity of the anti-counterfeiting label to be verified can be determined to be not verified.
According to the technical scheme, on one hand, an initial anti-counterfeiting image is split into a plurality of sub-images, and then the split sub-images are printed on a label printing stock for a plurality of times, so that a printed anti-counterfeiting image corresponding to a graphic code contained in the initial anti-counterfeiting image is generated; because the plurality of sub-images have random offset between the printing positions on the label printing stock, the random offset between the printing positions on the label printing stock of the plurality of sub-images can be utilized, so that the generated printing anti-counterfeiting image has uniqueness, and the counterfeiting cost of the anti-counterfeiting label is improved.
On the other hand, after the anti-counterfeiting image to be verified, which is acquired by the user through the terminal, is obtained, the verification party of the anti-counterfeiting label can obtain a printing anti-counterfeiting image corresponding to the graphic code contained in the anti-counterfeiting image to be verified, and can verify the authenticity of the anti-counterfeiting image to be verified according to the image similarity between the anti-counterfeiting image to be verified and the printing anti-counterfeiting image, so that the authenticity of the anti-counterfeiting label is determined; therefore, even if the initial anti-counterfeiting image is leaked, the authenticity of the anti-counterfeiting image to be verified, which is acquired by the user, can be verified by verifying whether the random offset existing in the printing anti-counterfeiting image is consistent with the random offset existing in the anti-counterfeiting image to be verified, so that the false bottom verification scheme of the anti-counterfeiting label is provided.
Corresponding to the generation method of the anti-counterfeiting code and the embodiment of the verification method of the anti-counterfeiting code, the specification also provides an anti-counterfeiting code generation device, an anti-counterfeiting code verification device and a label-based anti-counterfeiting system.
In this specification, the tag-based anti-counterfeit system may include a generator of an anti-counterfeit tag and a verifier of the anti-counterfeit tag; wherein, the generating party of the anti-counterfeit label can execute the steps 502-506; the step 702-step 706 may be executed by the verifier of the anti-counterfeit label to implement the technical solution of the present specification.
Referring to fig. 9, fig. 9 is a hardware configuration diagram of an electronic device where an apparatus for generating an anti-counterfeit code or an apparatus for verifying an anti-counterfeit code is shown in an exemplary embodiment. At the hardware level, the device includes a processor 902, an internal bus 904, a network interface 906, memory 908, and non-volatile storage 910, although other hardware requirements are possible. One or more embodiments of the present description may be implemented in a software-based manner, such as by the processor 902 reading a corresponding computer program from the non-volatile memory 910 into the memory 908 and then running. Of course, in addition to software implementation, one or more embodiments of the present disclosure do not exclude other implementation manners, such as a logic device or a combination of software and hardware, etc., that is, the execution subject of the following processing flow is not limited to each logic unit, but may also be hardware or a logic device.
Referring to fig. 10, fig. 10 is a block diagram illustrating an apparatus for generating an anti-counterfeit code according to an exemplary embodiment. The generation device of the anti-counterfeiting code can be applied to the electronic equipment shown in fig. 9 to realize the technical scheme of the specification. The generation device of the anti-counterfeiting code may include:
a first obtaining unit 1002, configured to obtain an initial anti-counterfeit image including a graphic code for anti-counterfeit;
An image splitting unit 1004, configured to split the initial anti-counterfeit image into a plurality of sub-images; the plurality of sub-images are printed on the label stock for a plurality of times to generate a printed anti-counterfeiting image corresponding to the graphic code;
wherein the plurality of sub-images have random offsets between print positions on the label substrate; the printing anti-counterfeiting image supports identification of the graphic code corresponding to the printing anti-counterfeiting image.
In this embodiment, the initial security image includes dark areas and light areas;
the image splitting unit 1004 is specifically configured to:
Splitting the initial anti-counterfeiting image based on a preset pattern to obtain a first sub-image which is split from the dark region and has the shape of the preset pattern, and splitting a second sub-image which is remained after the first sub-image is split from the initial anti-counterfeiting image.
In this embodiment, the preset pattern is one or more patterns selected randomly from a preset pattern set.
In this embodiment, the graphic code is a two-dimensional code; the initial anti-counterfeiting image comprises a plurality of rectangular dark areas;
the image splitting unit 1004 is specifically configured to:
randomly selecting a random number of rectangular dark areas from the plurality of rectangular dark areas;
And splitting the preset graph from the selected dark color area of the rectangle, determining the split partial image with the shape of the preset graph as the first sub-image, and determining the rest partial image of the initial anti-counterfeiting image as the second sub-image after splitting the preset graph from the selected dark color area of the rectangle.
In this embodiment, the first obtaining unit 1002 is specifically configured to:
based on preset anti-counterfeiting information, generating a graphic code carrying the anti-counterfeiting information, and generating the initial anti-counterfeiting image containing the graphic code.
In this embodiment, the apparatus further includes:
a printing unit for dividing the plurality of sub-images into a plurality of times for printing onto the label stock;
And the image acquisition unit is used for acquiring the image of the label printing stock after printing to obtain the printing anti-counterfeiting image corresponding to the graphic code.
In this embodiment, the two-dimensional Code is a QR Code.
Referring to fig. 11, fig. 11 is a block diagram illustrating a verification apparatus of anti-counterfeiting codes according to an exemplary embodiment. The verification device of the anti-counterfeiting code can be applied to the electronic equipment shown in fig. 9 to realize the technical scheme of the specification. Wherein, the verification device of the anti-counterfeiting code can comprise:
the second obtaining unit 1102 is configured to obtain an anti-counterfeit image to be verified, which is collected by a user through a terminal;
A third obtaining unit 1104, configured to obtain a printed anti-counterfeit image corresponding to the graphic code included in the anti-counterfeit image to be verified; the printing anti-counterfeiting image is generated by dividing a plurality of sub-images obtained by splitting an initial anti-counterfeiting image into a plurality of times of printing on a label printing stock; the plurality of sub-images having random offsets between print positions on the label substrate;
the label verification unit 1106 is configured to verify the authenticity of the to-be-verified anti-counterfeit image according to the image similarity between the to-be-verified anti-counterfeit image and the printed anti-counterfeit image.
In this embodiment, the database stores a first correspondence between the anti-counterfeiting information and the printed anti-counterfeiting image;
the second obtaining unit 1102 is specifically configured to:
Obtaining anti-counterfeiting information carried by graphic codes contained in the anti-counterfeiting image to be verified;
And according to the first corresponding relation, searching the printing anti-counterfeiting image corresponding to the obtained anti-counterfeiting information from a database.
In this embodiment, the tag verification unit 1106 is specifically configured to:
Based on the anti-fake information carried by the graphic code contained in the anti-fake image to be verified, obtaining a standard anti-fake image for verifying the authenticity of the anti-fake image to be verified;
Performing exclusive OR operation on the anti-counterfeiting image to be verified and the standard anti-counterfeiting image to obtain a first difference region; performing exclusive OR operation on the printing anti-counterfeiting image and the standard anti-counterfeiting image to obtain a second difference area;
Calculating the region similarity between the first difference region and the second difference region;
and if the region similarity is lower than a preset threshold value, determining that the authenticity of the anti-counterfeiting image to be verified is not verified.
In this embodiment, the calculating the region similarity between the first difference region and the second difference region includes:
performing exclusive OR operation on the first difference region and the second difference region to obtain a third difference region;
Calculating the area similarity between the first difference area and the second difference area according to the area of the third difference area and the area of the second difference area; wherein the smaller the ratio between the area of the third difference region and the area of the second difference region, the higher the region similarity between the first difference region and the second difference region.
In this embodiment, the database further stores a second correspondence between the anti-counterfeiting information and the initial anti-counterfeiting image;
the obtaining a standard anti-counterfeiting image for verifying the authenticity of the anti-counterfeiting image to be verified based on the anti-counterfeiting information carried by the graphic code contained in the anti-counterfeiting image to be verified comprises the following steps:
According to the second corresponding relation, an initial anti-counterfeiting image corresponding to anti-counterfeiting information carried by graphic codes contained in the anti-counterfeiting image to be verified is searched out from the database and used as the standard anti-counterfeiting image; or alternatively
Based on the anti-fake information carried by the graphic code contained in the anti-fake image to be verified, generating the graphic code carrying the anti-fake information, and generating a standard anti-fake image containing the regenerated graphic code.
In this embodiment, the graphic code is a two-dimensional code;
The apparatus further comprises:
The angular point detection unit is used for carrying out sub-pixel-level angular point detection on the anti-counterfeiting image to be verified, obtaining angular point characteristics of the anti-counterfeiting image to be verified, and carrying out image preprocessing on the anti-counterfeiting image to be verified based on the angular point characteristics of the anti-counterfeiting image to be verified; and carrying out sub-pixel-level corner detection on the printing anti-counterfeiting image to obtain corner features of the printing anti-counterfeiting image, and carrying out image preprocessing on the printing anti-counterfeiting image based on the corner features of the printing anti-counterfeiting image.
In this embodiment, the image preprocessing includes: image alignment and/or binarization processing.
The implementation process of the functions and roles of each unit in the above device is specifically shown in the implementation process of the corresponding steps in the above method, and will not be described herein again.
For the device embodiments, reference is made to the description of the method embodiments for the relevant points, since they essentially correspond to the method embodiments. The apparatus embodiments described above are illustrative only, in that the elements illustrated as separate elements may or may not be physically separate, and the elements shown as elements may or may not be physical elements, may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purposes of the present description. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
The system, apparatus, module or unit set forth in the above embodiments may be implemented in particular by a computer chip or entity, or by a product having a certain function. A typical implementation device is a computer, which may be in the form of a personal computer, laptop computer, cellular telephone, camera phone, smart phone, personal digital assistant, media player, navigation device, email device, game console, tablet computer, wearable device, or a combination of any of these devices.
In a typical configuration, a computer includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include volatile memory in a computer-readable medium, random Access Memory (RAM) and/or nonvolatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of computer-readable media.
Computer readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of storage media for a computer include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, read only compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic disk storage, quantum memory, graphene-based storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store information that can be accessed by the computing device. Computer-readable media, as defined herein, does not include transitory computer-readable media (transmission media), such as modulated data signals and carrier waves.
The user information (including but not limited to user equipment information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, presented data, etc.) related to the present application are information and data authorized by the user or fully authorized by each party, and the collection, use and processing of related data is required to comply with the relevant laws and regulations and standards of the relevant country and region, and is provided with corresponding operation entries for the user to select authorization or rejection.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article or apparatus that comprises the element.
The foregoing describes specific embodiments of the present disclosure. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims can be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
The terminology used in the one or more embodiments of the specification is for the purpose of describing particular embodiments only and is not intended to be limiting of the one or more embodiments of the specification. As used in this specification, one or more embodiments and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any or all possible combinations of one or more of the associated listed items.
It should be understood that although the terms first, second, third, etc. may be used in one or more embodiments of the present description to describe various information, these information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of one or more embodiments of the present description. The word "if" as used herein may be interpreted as "at … …" or "at … …" or "in response to a determination" depending on the context.
The foregoing description of the preferred embodiment(s) is (are) merely intended to illustrate the embodiment(s) of the present invention, and it is not intended to limit the embodiment(s) of the present invention to the particular embodiment(s) described.

Claims (10)

1. A method of verification of anti-counterfeit code, the method comprising:
acquiring an anti-counterfeiting image to be verified, which is acquired by a terminal;
Obtaining a printed anti-counterfeiting image corresponding to the graphic code contained in the anti-counterfeiting image to be verified; the printing anti-counterfeiting image is generated by dividing a plurality of sub-images obtained by splitting an initial anti-counterfeiting image into a plurality of times of printing on a label printing stock; the plurality of sub-images having random offsets between print positions on the label substrate;
and verifying the authenticity of the anti-counterfeiting image to be verified according to the image similarity between the anti-counterfeiting image to be verified and the printing anti-counterfeiting image.
2. The method of claim 1, wherein the database stores a first correspondence between the security information and the printed security image;
the obtaining of the printed anti-counterfeiting image corresponding to the graphic code contained in the anti-counterfeiting image to be verified comprises the following steps:
Obtaining anti-counterfeiting information carried by graphic codes contained in the anti-counterfeiting image to be verified;
And according to the first corresponding relation, searching the printing anti-counterfeiting image corresponding to the obtained anti-counterfeiting information from a database.
3. The method of claim 1, the verifying the authenticity of the to-be-verified security image based on the image similarity between the to-be-verified security image and the printed security image, comprising:
Based on the anti-fake information carried by the graphic code contained in the anti-fake image to be verified, obtaining a standard anti-fake image for verifying the authenticity of the anti-fake image to be verified;
Performing exclusive OR operation on the anti-counterfeiting image to be verified and the standard anti-counterfeiting image to obtain a first difference region; performing exclusive OR operation on the printing anti-counterfeiting image and the standard anti-counterfeiting image to obtain a second difference area;
Calculating the region similarity between the first difference region and the second difference region;
and if the region similarity is lower than a preset threshold value, determining that the authenticity of the anti-counterfeiting image to be verified is not verified.
4. A method according to claim 3, the calculating a region similarity between the first region of difference and the second region of difference comprising:
performing exclusive OR operation on the first difference region and the second difference region to obtain a third difference region;
Calculating the area similarity between the first difference area and the second difference area according to the area of the third difference area and the area of the second difference area; wherein the smaller the ratio between the area of the third difference region and the area of the second difference region, the higher the region similarity between the first difference region and the second difference region.
5. A method according to claim 3, wherein the database stores a second correspondence between the security information and the initial security image;
the obtaining a standard anti-counterfeiting image for verifying the authenticity of the anti-counterfeiting image to be verified based on the anti-counterfeiting information carried by the graphic code contained in the anti-counterfeiting image to be verified comprises the following steps:
According to the second corresponding relation, an initial anti-counterfeiting image corresponding to anti-counterfeiting information carried by graphic codes contained in the anti-counterfeiting image to be verified is searched out from the database and used as the standard anti-counterfeiting image; or alternatively
Based on the anti-fake information carried by the graphic code contained in the anti-fake image to be verified, generating the graphic code carrying the anti-fake information, and generating a standard anti-fake image containing the regenerated graphic code.
6. The method of claim 3, the graphic encoding being a two-dimensional code;
Before performing exclusive or operation on the to-be-verified anti-counterfeiting image and the standard anti-counterfeiting image to obtain a first difference region, the method further comprises:
Performing sub-pixel level corner detection on the anti-counterfeiting image to be verified to obtain corner features of the anti-counterfeiting image to be verified, and performing image preprocessing on the anti-counterfeiting image to be verified based on the corner features of the anti-counterfeiting image to be verified; and carrying out sub-pixel-level corner detection on the printing anti-counterfeiting image to obtain corner features of the printing anti-counterfeiting image, and carrying out image preprocessing on the printing anti-counterfeiting image based on the corner features of the printing anti-counterfeiting image.
7. The method of claim 6, the image preprocessing comprising: image alignment and/or binarization processing.
8. An apparatus for verifying an security code, the apparatus comprising:
the second obtaining unit is used for obtaining the anti-counterfeiting image to be verified, which is acquired by the terminal;
A third obtaining unit, configured to obtain a printed anti-counterfeit image corresponding to the graphic code included in the anti-counterfeit image to be verified; the printing anti-counterfeiting image is generated by dividing a plurality of sub-images obtained by splitting an initial anti-counterfeiting image into a plurality of times of printing on a label printing stock; the plurality of sub-images having random offsets between print positions on the label substrate;
And the label verification unit is used for verifying the authenticity of the anti-counterfeiting image to be verified according to the image similarity between the anti-counterfeiting image to be verified and the printing anti-counterfeiting image.
9. An electronic device comprises a communication interface, a processor, a memory and a bus, wherein the communication interface, the processor and the memory are connected with each other through the bus;
the memory stores machine readable instructions, the processor executing the method of any of claims 1-7 by invoking the machine readable instructions.
10. A machine-readable storage medium storing machine-readable instructions which, when invoked and executed by a processor, implement the method of any one of claims 1-7.
CN202311209554.8A 2023-05-05 2023-05-05 Anti-fake code generation and verification method and label-based anti-fake system Pending CN117952138A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311209554.8A CN117952138A (en) 2023-05-05 2023-05-05 Anti-fake code generation and verification method and label-based anti-fake system

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202311209554.8A CN117952138A (en) 2023-05-05 2023-05-05 Anti-fake code generation and verification method and label-based anti-fake system
CN202310499794.XA CN116227524B (en) 2023-05-05 2023-05-05 Anti-fake code generation and verification method and label-based anti-fake system

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
CN202310499794.XA Division CN116227524B (en) 2023-05-05 2023-05-05 Anti-fake code generation and verification method and label-based anti-fake system

Publications (1)

Publication Number Publication Date
CN117952138A true CN117952138A (en) 2024-04-30

Family

ID=86587614

Family Applications (2)

Application Number Title Priority Date Filing Date
CN202311209554.8A Pending CN117952138A (en) 2023-05-05 2023-05-05 Anti-fake code generation and verification method and label-based anti-fake system
CN202310499794.XA Active CN116227524B (en) 2023-05-05 2023-05-05 Anti-fake code generation and verification method and label-based anti-fake system

Family Applications After (1)

Application Number Title Priority Date Filing Date
CN202310499794.XA Active CN116227524B (en) 2023-05-05 2023-05-05 Anti-fake code generation and verification method and label-based anti-fake system

Country Status (1)

Country Link
CN (2) CN117952138A (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117893227A (en) * 2024-03-13 2024-04-16 深圳市金雅福首饰制造有限公司 Ornament anti-counterfeiting mark generation and verification method, ornament anti-counterfeiting mark generation and verification equipment and readable storage medium

Family Cites Families (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006246097A (en) * 2005-03-04 2006-09-14 Ricoh Co Ltd Printing method and system, and image formation device
DK1745940T3 (en) * 2005-07-20 2014-03-03 Jds Uniphase Corp Two-step FOR COATING OF AN OBJECT OF SAFETY PRESSURE
CN102201100B (en) * 2011-05-10 2013-04-24 朱清明 Object anti-counterfeiting method and system
WO2013063871A1 (en) * 2011-11-02 2013-05-10 Yue Tiegang Anti-counterfeiting method, label and label manufacturing method based on 2d graphical coding
CN102855514A (en) * 2012-08-23 2013-01-02 晏华艳 Bidimensional-barcode-based anti-counterfeiting identification method and system
CN102930316A (en) * 2012-10-23 2013-02-13 海南亚元防伪技术研究所 Three-dimensional commodity bar code information system
CN106529976A (en) * 2016-10-28 2017-03-22 珠海丹德图像技术有限公司 Checking system and checking method for commodity determination uniqueness
CN106650875A (en) * 2017-01-04 2017-05-10 广州科琳电子科技有限公司 Anti-counterfeiting method based on anti-counterfeiting identification for preventing batch copying of two-dimensional code
CN106960352A (en) * 2017-02-14 2017-07-18 广州软码信息科技有限公司 A kind of method for anti-counterfeit based on picture uniqueness
CN107169548A (en) * 2017-06-05 2017-09-15 北京德绩信息科技有限公司 A kind of verification method of anti-counterfeit printing product and anti-counterfeit printing product
CN108875878A (en) * 2018-09-28 2018-11-23 武汉保诚信网络科技有限公司 Stereoscopic two-dimensional code antifalsification label
CN110263893A (en) * 2019-06-13 2019-09-20 深圳劲嘉集团股份有限公司 A kind of anti-fake two-dimension code generation method and device being embedded in watermark
CN111319370B (en) * 2020-01-17 2021-08-10 上海世丰印刷有限公司 Bar code printing process
CN115244542A (en) * 2020-03-10 2022-10-25 罗伯特·博世有限公司 Method and device for verifying authenticity of product
US20230023503A1 (en) * 2021-03-16 2023-01-26 Blocktag, Inc. Security Devices of Various Form factors with Chaosmetric Artifacts
CN114596310A (en) * 2022-04-13 2022-06-07 长沙市雅高彩印有限公司 Printing production management system

Also Published As

Publication number Publication date
CN116227524A (en) 2023-06-06
CN116227524B (en) 2023-08-08

Similar Documents

Publication Publication Date Title
US20220130159A1 (en) System and method for detecting the authenticity of products
US10706277B2 (en) Storing anonymized identifiers instead of personally identifiable information
KR102235215B1 (en) Augmenting barcodes with secondary encoding for anti-counterfeiting
EP2495689B1 (en) Sign authentication system and sign authentication method
CN116227524B (en) Anti-fake code generation and verification method and label-based anti-fake system
US9681020B2 (en) Creation and identification of unforgeable printable image information data
CN106408063B (en) Printing medium, method of generating the same, method of scanning the same, and label
CN109472337A (en) A kind of label anti-counterfeit method and apparatus based on random character
US20170200247A1 (en) Systems and methods for authentication of physical features on identification documents
US9934457B2 (en) Method of securing a two-dimensional barcode
US20180033020A1 (en) System and apparatus for detecting forgery features on identification documents
US20190138778A1 (en) A system for product authentication and method thereof
CN106815731A (en) A kind of label anti-counterfeit system and method based on SURF Image Feature Matchings
CN109816077A (en) A kind of hidden method of two-dimensional barcode information, device, electronic equipment and storage medium
CN110533704A (en) Fake method, device, equipment and medium are tested in the identification of ink label
CN108256608A (en) A kind of two dimensional image code and its recognition methods and equipment
CN113392664A (en) Anti-counterfeiting two-dimensional code generation method, anti-counterfeiting method and anti-counterfeiting device
CN106934756A (en) The method and system of embedding information in a kind of monochromatic or spot color figure
CN111680771A (en) Commodity anti-counterfeiting method and system based on anti-counterfeiting label
CN109325568B (en) Anti-counterfeiting two-dimensional code and modulation encryption method and identification system thereof
CN115601216A (en) Anti-counterfeiting tracing method and device based on structural deformation and image watermark
US20090173797A1 (en) Two part code
CN107169548A (en) A kind of verification method of anti-counterfeit printing product and anti-counterfeit printing product
CN108133378B (en) Label for food traceability and anti-counterfeiting, label generation method, system and method
CN109784454A (en) A kind of information concealing method based on two dimensional code, device and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination