CN115601216A - Anti-counterfeiting tracing method and device based on structural deformation and image watermark - Google Patents

Anti-counterfeiting tracing method and device based on structural deformation and image watermark Download PDF

Info

Publication number
CN115601216A
CN115601216A CN202211406826.9A CN202211406826A CN115601216A CN 115601216 A CN115601216 A CN 115601216A CN 202211406826 A CN202211406826 A CN 202211406826A CN 115601216 A CN115601216 A CN 115601216A
Authority
CN
China
Prior art keywords
sequence
deformation
watermark
unique identification
coding
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
CN202211406826.9A
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.)
Shenzhen International Graduate School of Tsinghua University
Original Assignee
Shenzhen International Graduate School of Tsinghua University
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 Shenzhen International Graduate School of Tsinghua University filed Critical Shenzhen International Graduate School of Tsinghua University
Priority to CN202211406826.9A priority Critical patent/CN115601216A/en
Publication of CN115601216A publication Critical patent/CN115601216A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T1/00General purpose image data processing
    • G06T1/0021Image watermarking
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T1/00General purpose image data processing
    • G06T1/0021Image watermarking
    • G06T1/0042Fragile watermarking, e.g. so as to detect tampering
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N1/00Scanning, transmission or reproduction of documents or the like, e.g. facsimile transmission; Details thereof
    • H04N1/32Circuits or arrangements for control or supervision between transmitter and receiver or between image input and image output device, e.g. between a still-image camera and its memory or between a still-image camera and a printer device
    • H04N1/32101Display, printing, storage or transmission of additional information, e.g. ID code, date and time or title
    • H04N1/32144Display, printing, storage or transmission of additional information, e.g. ID code, date and time or title embedded in the image data, i.e. enclosed or integrated in the image, e.g. watermark, super-imposed logo or stamp
    • H04N1/32149Methods relating to embedding, encoding, decoding, detection or retrieval operations
    • H04N1/32267Methods relating to embedding, encoding, decoding, detection or retrieval operations combined with processing of the image
    • H04N1/32272Encryption or ciphering

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Image Processing (AREA)
  • Editing Of Facsimile Originals (AREA)

Abstract

The invention provides an anti-counterfeiting tracing method and device based on structural deformation and image watermarking, and relates to the technical field of watermarking, wherein the method comprises the following steps: dividing a watermark coding sequence corresponding to the unique identification sequence into a first coding sequence and a second coding sequence; according to the sequence of the first coding sequence, according to the corresponding relation between preset different coding values and the symbol deformation rule, sequentially carrying out corresponding deformation on the symbols in the target image of the anti-counterfeiting tracing object; and embedding the second coding sequence into the image part in the target image based on the edge watermark to obtain the target image of the anti-counterfeiting object embedded with the unique identification sequence. The method comprehensively utilizes the structured character watermark and the edge watermark, the edge watermark can weaken the anti-attack capability but can improve the watermark capacity, the structured character watermark capacity is limited but the anti-attack capability is strong, and the two watermarks are fused, so that the watermark capacity is ensured and the anti-attack capability is strong, and the optimal balance of the watermark robustness and the watermark carrying capacity is obtained.

Description

Anti-counterfeiting tracing method and device based on structural deformation and image watermark
Technical Field
The invention relates to the technical field of watermarks, in particular to an anti-counterfeiting tracing method and device based on structural deformation and image watermarks.
Background
The character watermark is to embed specific information into a character carrier and extract the watermark by machine detection and the like. The character watermark is mainly applied to commodity anti-counterfeiting tracing, and the commodity anti-counterfeiting tracing means that the commodity is protected and counterfeit commodities are identified and monitored through technical means. The main application technology is commodity anti-counterfeiting traceability based on two-dimensional codes, the two-dimensional codes are generated by commodity specific information and are printed in commodity packages, and anti-counterfeiting traceability information is obtained in a scanning mode. The method is only suitable for product outer packaging, has low anti-counterfeiting traceability efficacy in scenes without product outer packaging or scenes in which the product outer packaging is easy to disassemble and replace, such as luxury goods fields of clothing, jewelry and the like, and is easy to copy because the two-dimensional code image is obvious. And the electronic tag generated by the radio frequency technology is attached to a target object to realize commodity anti-counterfeiting tracing, so that the electronic tag is easy to copy, has low anti-counterfeiting capability and high use cost, and can be applied to limited commodity types.
In order to avoid the problems, the commodity anti-counterfeiting tracing based on the image watermark is mainly adopted at present. Specifically, the watermark is embedded into an outer package image for protection, and the outer package is scanned in a detection stage to obtain watermark information. However, this method cannot prevent the above-mentioned problems of package replacement, imitation, etc., and imposes a great limitation on the appearance of the package of the commercial product.
Disclosure of Invention
Aiming at the problems in the prior art, the invention provides an anti-counterfeiting tracing method and device based on structural deformation and image watermarking.
The invention provides an anti-counterfeiting tracing method based on structural deformation and image watermarking, which comprises the following steps: dividing a watermark coding sequence corresponding to the unique identification sequence of the anti-counterfeiting tracing object into a first coding sequence and a second coding sequence; according to the sequence of the first coding sequence, according to the corresponding relation between preset different coding values and the symbol deformation rule, sequentially carrying out corresponding deformation on the symbols in the target image of the anti-counterfeiting tracing object in which the unique identification sequence is to be embedded; and embedding the second coding sequence into a graph part in a target image of the anti-counterfeiting tracing object based on the edge watermark to obtain the target image of the anti-counterfeiting tracing object embedded with the unique identification sequence.
According to the anti-counterfeiting tracing method based on structural deformation and image watermarking, provided by the invention, the symbols in the target image of the anti-counterfeiting tracing object which needs to be embedded with the unique identification sequence are sequentially and correspondingly deformed according to the corresponding relation between the preset different coding values and the symbol deformation rule, and the method comprises the following steps: dividing the first coding sequence into a plurality of groups according to a preset digit, determining a deformation rule corresponding to each group of codes from a preset replacement symbol coding table according to the value of each group of codes in sequence, and replacing symbols in a target image of the anti-counterfeiting tracing object according to the deformation rule in sequence; the replacement symbol coding table is a corresponding relation between a replacement symbol and a coding value, and the replacement symbol is a deformation symbol obtained by a standard symbol under different deformation rules.
According to the anti-counterfeiting tracing method based on structural deformation and image watermarking, the watermark coding sequence corresponding to the unique identification sequence of the anti-counterfeiting tracing object is divided into a first coding sequence and a second coding sequence, and the method comprises the following steps: and determining the length of the first coding sequence according to the number of all available symbols in the target image of the anti-counterfeiting tracing object and the preset digit, and correspondingly obtaining the first coding sequence and the second coding sequence.
According to the anti-counterfeiting tracing method based on structural deformation and image watermarking provided by the invention, before dividing the watermark coding sequence corresponding to the unique identification sequence of the anti-counterfeiting tracing object into the first coding sequence and the second coding sequence, the method further comprises the following steps: converting the unique identification sequence into a binary bit stream to obtain the watermark coding sequence; or converting the unique identification sequence into a binary bit stream, and encrypting the binary bit stream based on a preset encryption algorithm to obtain an encrypted bit stream; and adding a check code to the encrypted bit stream to obtain the watermark coding sequence.
The invention also provides an anti-counterfeiting tracing method based on the structural deformation and the image watermark, which comprises the following steps: comparing each symbol in the target image of the anti-counterfeiting tracing object with a standard symbol, and determining all deformed symbols with deformation; based on the corresponding relation between a preset symbol deformation rule and different coding values, decoding each deformation symbol in sequence to obtain a coding value of each deformation symbol, and obtaining a first coding sequence according to the coding values of all the deformation symbols; detecting the graph in the target image of the anti-counterfeiting tracing object by using an edge watermark detector to obtain a second coding sequence; and combining the first coding sequence and the second coding sequence, and converting the first coding sequence and the second coding sequence into a watermark code corresponding to the unique identification sequence.
According to the anti-counterfeiting tracing method based on the structural deformation and the image watermark, provided by the invention, each deformation symbol is decoded in sequence based on the corresponding relation between the preset symbol deformation rule and different coding values to obtain the coding value of each deformation symbol, and the method comprises the following steps: for all the deformation symbols, determining a coding value corresponding to each deformation symbol from a preset substitution symbol coding table; the replacement symbol coding table is a corresponding relation between a replacement symbol and a coding value, and the replacement symbol is a deformation symbol obtained by a standard symbol under different deformation rules.
According to the anti-counterfeiting tracing method based on the structural deformation and the image watermark, after the conversion into the watermark code corresponding to the unique identification sequence, the anti-counterfeiting tracing method further comprises the following steps: converting the watermark code corresponding to the unique identification sequence into a target unique identification sequence; acquiring a unique identification sequence to be verified provided by the anti-counterfeiting tracing object; and under the condition that the unique identification sequence to be verified is consistent with the target unique identification sequence, judging that the unique identification sequence to be verified is valid, otherwise, judging that the unique identification sequence to be verified is invalid.
According to the anti-counterfeiting tracing method based on structural deformation and image watermarking provided by the invention, after the graph in the target image of the anti-counterfeiting tracing object is detected by using the edge watermark detector to obtain the second coding sequence, the method further comprises the following steps: verifying the number of errors of said second encoded sequence; and when the error quantity of the second coding sequence exceeds a preset quantity, judging that the target image of the anti-counterfeiting tracing object is obtained by copying.
The invention provides an anti-counterfeiting tracing device based on structural deformation and image watermarking, which comprises: the sequence splitting module is used for dividing the watermark coding sequence corresponding to the unique identification sequence of the anti-counterfeiting tracing object into a first coding sequence and a second coding sequence; the structure embedding module is used for sequentially carrying out corresponding deformation on symbols in a target image of the anti-counterfeiting tracing object needing to be embedded with the unique identification sequence according to the sequence of the first coding sequence and the corresponding relation between preset different coding values and the symbol deformation rule; and the edge embedding module is used for embedding the second coding sequence into a graph part in a target image of the anti-counterfeiting tracing object based on the edge watermark to obtain the target image of the anti-counterfeiting tracing object embedded with the unique identification sequence.
The invention also provides an anti-counterfeiting tracing device based on structural deformation and image watermarking, which comprises: the image processing module is used for comparing each symbol in the target image of the anti-counterfeiting tracing object with the standard symbol and determining all deformed symbols with deformation; the first decoding module is used for sequentially decoding each deformation symbol based on the corresponding relation between a preset symbol deformation rule and different coding values to obtain a coding value of each deformation symbol, and obtaining a first coding sequence according to the coding values of all the deformation symbols; the second decoding module is used for detecting the graph in the target image of the anti-counterfeiting tracing object by using the edge watermark detector to obtain a second coding sequence; and the comprehensive decoding module is used for combining the first coding sequence and the second coding sequence and converting the first coding sequence and the second coding sequence into the watermark code corresponding to the unique identification sequence.
The anti-counterfeiting tracing device based on structural deformation and image watermarking provided by the invention further comprises an anti-counterfeiting tracing module, which is used for: converting the watermark code corresponding to the unique identification sequence into a target unique identification sequence; acquiring a unique identification sequence to be verified provided by the anti-counterfeiting tracing object; and under the condition that the unique identification sequence to be verified is consistent with the target unique identification sequence, judging that the unique identification sequence to be verified is valid, otherwise, judging that the unique identification sequence to be verified is invalid.
According to the anti-counterfeiting tracing device based on the structural deformation and the image watermark, the anti-counterfeiting tracing module is further used for: verifying the number of errors of said second encoded sequence; and when the error quantity of the second coding sequence exceeds a preset quantity, judging that the target image of the anti-counterfeiting tracing object is obtained by copying.
The invention also provides an electronic device, which comprises a memory, a processor and a computer program stored on the memory and capable of running on the processor, wherein when the processor executes the program, the anti-counterfeiting traceability method based on the structure deformation and the image watermark is realized.
The present invention further provides a non-transitory computer readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the method for anti-counterfeiting tracing based on structural deformation and image watermarking as described above is implemented.
The invention further provides a computer program product, which comprises a computer program, and when the computer program is executed by a processor, the anti-counterfeiting tracing method based on the structural deformation and the image watermark is realized.
The invention provides an anti-counterfeiting tracing method and device based on structural deformation and image watermarks. In addition, the invention is not easy to copy because of invisibility of human eyes, and the edge watermark is relatively fragile, which can cause great damage during copying, thereby having certain copy prevention capability.
Drawings
In order to more clearly illustrate the present invention or the technical solutions in the prior art, the drawings used in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 is a schematic flow diagram of an anti-counterfeiting tracing method based on structural deformation and image watermarking provided by the present invention;
fig. 2 is a second schematic flowchart of the anti-counterfeiting tracing method based on structural deformation and image watermarking according to the present invention;
fig. 3 is one of the schematic structural diagrams of the anti-counterfeiting tracing device based on structural deformation and image watermarking provided by the present invention;
fig. 4 is a second schematic structural diagram of the anti-counterfeiting tracing apparatus based on structural deformation and image watermarking provided in the present invention;
fig. 5 is a schematic structural diagram of an electronic device provided in the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings, and it is obvious that the described embodiments are some, but not all embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The following describes the anti-counterfeiting tracing method and device based on structural deformation and image watermarking in combination with fig. 1 to 5. Fig. 1 is a schematic flow diagram of an anti-counterfeiting tracing method based on structural deformation and image watermarking, and as shown in fig. 1, the anti-counterfeiting tracing method based on structural deformation and image watermarking provided by the present invention includes:
101. and dividing the watermark coding sequence corresponding to the unique identification sequence of the anti-counterfeiting tracing object into a first coding sequence and a second coding sequence.
The anti-counterfeiting tracing object is an object to be subjected to anti-counterfeiting tracing according to the invention, and can be determined according to needs. Taking the product as an example, the unique identification sequence is a product code of one item and one code generated by the product service end system, such as a 32-bit sequence. And obtaining a corresponding watermark coding sequence to be embedded according to the unique identification sequence, namely the watermark coding sequence to be embedded is a sequence processed by the unique identification sequence. In the invention, the unique identification sequence of the commodity is embedded into the character area of the commodity by comprehensively utilizing the structural watermark and the edge watermark, so that the embedding capacity of the watermark meets the requirement of one object for one object.
First, the watermark encoding sequence to be embedded is divided into two parts, namely a first encoding sequence Wt and a second encoding sequence We, in 101. The first coding sequence Wt is a character watermark sequence based on a structure, and the second coding sequence We is a sequence embedded based on an edge watermark.
102. And according to the sequence of the first coding sequence, sequentially carrying out corresponding deformation on the symbols in the target image of the anti-counterfeiting tracing object needing to be embedded with the unique identification sequence according to the corresponding relation between the preset different coding values and the symbol deformation rule.
Specifically, the target image is an area in which a watermark is to be embedded, and the target image includes a symbol and a graphic (a pattern area excluding a symbol portion), respectively. The target image may be a trademark image of a commodity, that is, the above-mentioned symbol and the below-mentioned figure may be characters and patterns in a trademark, respectively, or may be other images for specifying an embedded watermark.
If the trademark includes n symbols, specifically n characters, the description will be made by taking the symbols as the characters. The n characters in the trademark form a character set T n ,T n =(t 1 ,t 2 ,…t k ,…t n )。
In the invention, all trademark characters are deformed according to the corresponding relation between the predetermined symbol deformation rule and different coding values. And decoding the deformed trademark characters according to the same rule to obtain the first coding sequence.
For example, different encoding values such as 000, 001, 010, 011, 100, 101, 110, and 111 correspond to different character deformation modes. And under the condition that the first coding sequence is determined, sequentially determining corresponding character deformation modes according to the first coding sequence. In the trademark characters, the character deformation modes are applied, namely the deformation modes corresponding to the coding values are adopted to deform the trademark characters, so that the first coding sequence is written into the trademark characters.
103. And embedding the second coding sequence into a graph part in a target image of the anti-counterfeiting tracing object based on the edge watermark to obtain the target image of the anti-counterfeiting object embedded with the unique identification sequence.
Using edge watermarking, by fine tuning T n Watermark sequence W is embedded to each character edge pixel in character set e . For example, watermark embedding can be realized by using various methods such as adjusting the gradient of the text edge pixels, guiding the edge embedding by using a deep learning mode and the like. To this end, the first code sequence W t And a second coding sequence W e And after embedding is finished, obtaining a trademark watermark image containing a watermark coding sequence corresponding to the unique identification sequence. The watermark image of the trademark is printed into the trademark of the commodity to realize the anti-counterfeiting tracing of the commodity, and the specific modes comprise digital printing, embroidery, digital direct injection, pyrography, mucilage printing and the like.
The invention relates to an anti-counterfeiting tracing method based on structural deformation and image watermarking, which sequentially carries out corresponding deformation on symbols in a target image of an anti-counterfeiting tracing object needing to be embedded with a unique identification sequence according to the sequence of a first coding sequence and the corresponding relation of preset different coding values and symbol deformation rules, embeds a second coding sequence into a graph part in the target image of the anti-counterfeiting tracing object based on edge watermarking, comprehensively utilizes structured character watermarking and edge watermarking, and the edge watermarking can weaken the anti-attack capability but can improve the watermarking capacity. In addition, the invention has certain anti-copying capability because the invention is invisible to human eyes, is not easy to copy, and the edge watermark is relatively fragile, and causes great damage during copying
In an embodiment, sequentially performing corresponding deformation on a symbol in a target image of an anti-counterfeiting tracing object to be embedded with a unique identification sequence according to a corresponding relationship between preset different encoding values and a symbol deformation rule includes: dividing the first coding sequence into a plurality of groups according to a preset digit, determining a deformation rule corresponding to each group of codes from a preset replacement symbol coding table according to the value of each group of codes in sequence, and replacing symbols in a target image of the anti-counterfeiting tracing object according to the deformation rule in sequence; the replacement symbol coding table is a corresponding relation between a replacement symbol and a coding value, and the replacement symbol is a deformation symbol obtained by a standard symbol under different deformation rules.
For each character t in the trademark k Generating a series of character variants
Figure BDA0003937202680000081
Figure BDA0003937202680000082
I.e. each character t k Correspond to
Figure BDA0003937202680000083
A replacement character form, c 1 Is a preset number of bits for encoding. In the embodiment of the invention, a replacing character form coding table is established in advance so as to match t k Corresponding V k Coding is carried out with the code number of c 1 . With c 1 For example, =3, the corresponding codes are shown in table 1.
TABLE 1
Figure BDA0003937202680000091
Watermark sequence W to be embedded t Each c is 1 The characters are divided into a group, and the corresponding characters in the trademark are replaced by the character variants corresponding to the group of characters in the watermark sequence by searching a character variant coding table. If the watermark information to be embedded is 101, corresponding t in the trademark is used k Character replacement
Figure BDA0003937202680000092
The anti-counterfeiting tracing method based on structural deformation and image watermarking can realize rapid generation and automatic loading of the watermark image in the symbol in the target image such as a trademark and the like only by searching the replacement character corresponding to the coding value from the replacement symbol coding table.
In one embodiment, the dividing the watermark encoding sequence corresponding to the unique identification sequence of the anti-counterfeiting tracing object into a first encoding sequence and a second encoding sequence includes: and determining the length of the first coding sequence according to the number of all available symbols in the target image of the anti-counterfeiting tracing object and the preset digit, and correspondingly obtaining the first coding sequence and the second coding sequence.
First, a target image into which a structure-based text watermark can be embedded is determined
The number of symbols, if 4 symbols are included in the trademark, the number of available symbols is 4. The predetermined number of bits may be determined according to the encoding mode, for example, if the encoding mode is 3-bit encoding, the length of the first code sequence is 12, and the portion of the watermark code sequence excluding the first code sequence is the second code sequence. The specific number of bits in the watermark code sequence as the first code sequence can be defined by self, and the same definition is kept when decoding. For example, the first 12 positions are the first coding sequence and the remaining portion is the second coding sequence.
According to the anti-counterfeiting tracing method based on the structural deformation and the image watermark, the length of the first coding sequence is determined according to the number of all available symbols and the preset number of bits in the target image such as the trademark image, the watermark can be embedded in a structural mode to the maximum extent, the capacity of embedding the watermark in a result mode is improved, and therefore the anti-attack capability of the watermark is improved.
In an embodiment, before the dividing the watermark encoding sequence corresponding to the unique identification sequence of the anti-counterfeiting tracing object into the first encoding sequence and the second encoding sequence, the method further includes: converting the unique identification sequence into a binary bit stream to obtain the watermark coding sequence; or, converting the unique identification sequence into a binary bit stream, and encrypting the binary bit stream based on a preset encryption algorithm to obtain an encrypted bit stream; and adding a check code to the encrypted bit stream to obtain the watermark coding sequence.
The embodiment of the invention provides two watermark encoding methods which can be encrypted or not. Taking encryption as an example:
converting the unique identification sequence of the product into a binary bit sequence, and obtaining an encrypted random sequence R by using an encryption algorithm (such as stream cipher and the like) stream . To R stream And adding a check code to obtain a watermark coding sequence W. The watermark encoding sequence W is then divided into sequences W embedded using structure-based text watermarks according to application needs t And sequences W for edge watermark embedding e
The anti-counterfeiting tracing method based on the structural deformation and the image watermark can realize the encryption of the watermark information and avoid the tampering.
Fig. 2 is a second schematic flow chart of the anti-counterfeiting tracing method based on structural deformation and image watermarking provided by the present invention, and as shown in fig. 2, the present invention provides an anti-counterfeiting tracing method based on structural deformation and image watermarking, which includes:
201. comparing each symbol in the target image of the anti-counterfeiting tracing object with a standard symbol, and determining all deformed symbols with deformation;
202. based on the corresponding relation between a preset symbol deformation rule and different coding values, decoding each deformation symbol in sequence to obtain the coding value of each deformation symbol, and obtaining a first coding sequence according to the coding values of all the deformation symbols;
203. detecting the graph in the target image of the anti-counterfeiting tracing object by using an edge watermark detector to obtain a second coding sequence;
204. and combining the first coding sequence and the second coding sequence, and converting the first coding sequence and the second coding sequence into a watermark code corresponding to the unique identification sequence.
The embodiment of the invention is a decoding part based on embedded watermarks, and specifically, before 201, the preset quality of an image can be restored by photographing a commodity trademark and performing links such as image correction and image enhancement, so that the robustness of watermark detection is improved.
In 201 to 203, the restored images are detected by an edge watermark detector and a texture-based character watermark detector, respectively, to obtain embedded bit sequences W' e ,W′ t
Specifically, the sequence W 'is obtained by extracting through an edge watermark detector' e Then, a character variant to which each character in the trademark image belongs is identified by using a character watermark detector based on the structure, and the sequence W 'is obtained through restoration according to the corresponding relation between the character variant and the code' t
W 'based on same algorithm in embedding process' e ,W′ t And decrypting to obtain the embedded one-object-one-code information.
In an embodiment, the decoding, based on a corresponding relationship between a preset symbol deformation rule and different coding values, each deformation symbol in turn to obtain a coding value of each deformation symbol includes: for all the deformation symbols, determining a coding value corresponding to each deformation symbol from a preset substitution symbol coding table; the replacement symbol coding table is a corresponding relation between a replacement symbol and a coding value, and the replacement symbol is a deformation symbol obtained by a standard symbol under different deformation rules.
In the embodiment of the invention, deformation of different rules is carried out in advance according to standard symbols to obtain a plurality of replacement characters, the deformation rules of each replacement character are different, the replacement characters correspond to all values of codes one by one, and the replacement symbol coding table is obtained based on the replacement characters and the coding values. The replacing symbol coding table in the embodiment of the invention is the same as the replacing symbol coding table in the watermark embedding process method.
In the decoding stage, the trade mark symbol is compared and matched with the replacing character patterns in all the character replacing tables. And reading the code value corresponding to the corresponding character form to obtain a first code sequence.
In one embodiment, after the converting into the watermark encoding corresponding to the unique identification sequence, the method further includes: converting the watermark code corresponding to the unique identification sequence into a target unique identification sequence; acquiring a unique identification sequence to be verified provided by the anti-counterfeiting tracing object; and under the condition that the unique identification sequence to be verified is consistent with the target unique identification sequence, judging that the unique identification sequence to be verified is valid, otherwise, judging that the unique identification sequence to be verified is invalid.
Specifically, a first coding sequence and a second coding sequence obtained by decoding are merged and recovered to serve as a target unique identification sequence, and the target unique identification sequence is compared with a product unique information identification sequence of 'one product one code' to realize tracing.
The unique identification sequence provided by the article may be plain text printed on the article. For example, by printing a series of unique identification sequences to be verified on the surface of the merchandise or package, and then masking it with a silver-gray coating. And when verification is required, scraping the coating to obtain the unique identifier to be verified.
Sequence of
And comparing the merged and recovered target unique identification sequence with the unique identification sequence to be verified provided by the commodity, wherein if the commodity is fake, the target unique identification sequence obtained according to the trademark image is obviously wrong. For example, the actual unique identification sequence is obtained by a generation method of collecting waste packages of commodities or stealing the unique identification sequence from a production line. However, the target unique identification sequence obtained by the target image at the specific position such as the trademark is obviously different from the unique identification sequence, so that the anti-counterfeiting tracing purpose is achieved.
According to the anti-counterfeiting tracing method based on the structural deformation and the image watermark, the sequence is embedded through the structural transformation of the target image, the anti-counterfeiting tracing method is invisible to human eyes, is not easy to attract attention, and has remarkable anti-counterfeiting capacity.
In an embodiment, after the detecting a pattern in a target image of an anti-counterfeiting tracing object by using an edge watermark detector to obtain a second encoding sequence, the method further includes: verifying the number of errors of said second encoded sequence; and when the error number of the second coding sequence exceeds a preset number, judging that the target image of the anti-counterfeiting tracing object is obtained by copying.
It is considered that the counterfeiter knows the target image region embedded with the unique identification sequence and then counterfeits the target image region by copying or the like. For example, the unique identification sequence to be verified is obtained by collecting the waste packages of the commodities, and the target image is copied by taking a picture or the like and is also printed in the target image area of the counterfeit commodity.
However, the edge watermark is a relatively fragile watermark, and causes more errors during a copying process such as photo-copying, so that whether the edge watermark is copied or not can be identified. In the embodiment of the invention, the edge watermark detector is utilized to detect the graph in the target image of the anti-counterfeiting tracing object, after the second coding sequence is obtained, the error quantity of the second coding sequence is judged, and when the error quantity of the second coding sequence exceeds the preset quantity, the target image of the anti-counterfeiting tracing object can be judged to be obtained by copying. The anti-counterfeiting tracing device based on the structural deformation and the image watermark, which is provided by the invention, is described below, and the anti-counterfeiting tracing device based on the structural deformation and the image watermark, which is described below, and the anti-counterfeiting tracing method based on the structural deformation and the image watermark, which is described above, can be correspondingly referred to each other.
Fig. 3 is one of schematic structural diagrams of the anti-counterfeiting tracing apparatus based on structural deformation and image watermark provided by the present invention, and as shown in fig. 3, the anti-counterfeiting tracing apparatus based on structural deformation and image watermark comprises: a sequence splitting module 301, a structure embedding module 302, and an edge embedding module 303. The sequence splitting module 301 is configured to divide a watermark encoding sequence corresponding to the unique identification sequence of the anti-counterfeiting tracing object into a first encoding sequence and a second encoding sequence; the structure embedding module 302 is configured to sequentially perform corresponding deformation on symbols in a target image of the anti-counterfeiting tracing object, in which the unique identification sequence needs to be embedded, according to a sequence of the first coding sequence and a corresponding relationship between preset different coding values and symbol deformation rules; the edge embedding module 303 is configured to embed the second coding sequence into a graphic portion in a target image of the anti-counterfeiting tracing object based on an edge watermark, so as to obtain the target image of the anti-counterfeiting tracing object embedded with the unique identification sequence.
Fig. 4 is a second schematic structural diagram of the anti-counterfeiting tracing apparatus based on structural deformation and image watermarking provided by the present invention, as shown in fig. 4, the anti-counterfeiting tracing apparatus based on structural deformation and image watermarking includes: an image processing module 401, a first decoding module 402, a second decoding module 403, and an integrated decoding module 404. The image processing module 401 is configured to compare each symbol in the target image of the anti-counterfeiting tracing object with a standard symbol, and determine all deformed symbols with deformation; the first decoding module 402 is configured to decode each deformed symbol in sequence based on a corresponding relationship between a preset symbol deformation rule and different encoding values to obtain an encoding value of each deformed symbol, and obtain a first encoding sequence according to the encoding values of all deformed symbols; the second decoding module 403 is configured to detect a graph in a target image of the anti-counterfeiting tracing object by using an edge watermark detector, so as to obtain a second coding sequence; the comprehensive decoding module 404 is configured to combine the first coded sequence and the second coded sequence, and convert the combined coded sequence into a watermark code corresponding to the unique identification sequence.
In an embodiment of the apparatus, the system further comprises an anti-counterfeiting tracing module, configured to: converting the watermark code corresponding to the unique identification sequence into a target unique identification sequence; acquiring a unique identification sequence to be verified provided by the anti-counterfeiting tracing object; and under the condition that the unique identification sequence to be verified is consistent with the target unique identification sequence, judging that the unique identification sequence to be verified is valid, otherwise, judging that the unique identification sequence to be verified is invalid.
In an embodiment of the apparatus, the anti-counterfeiting tracing module is further configured to: verifying the number of errors of said second encoded sequence; and when the error quantity of the second coding sequence exceeds a preset quantity, judging that the target image of the anti-counterfeiting tracing object is obtained by copying.
The device embodiment provided in the embodiments of the present invention is for implementing the above method embodiments, and for details of the process and the details, reference is made to the above method embodiments, which are not described herein again.
The implementation principle and the generated technical effect of the anti-counterfeiting tracing device based on the structural deformation and the image watermark provided by the embodiment of the invention are the same as those of the anti-counterfeiting tracing method based on the structural deformation and the image watermark, and for brief description, corresponding contents in the anti-counterfeiting tracing method based on the structural deformation and the image watermark can be referred to in the embodiment of the anti-counterfeiting tracing device based on the structural deformation and the image watermark.
Fig. 5 is a schematic structural diagram of an electronic device provided in the present invention, and as shown in fig. 5, the electronic device may include: a processor (processor) 501, a communication Interface (Communications Interface) 502, a memory (memory) 503, and a communication bus 504, wherein the processor 501, the communication Interface 502, and the memory 503 are configured to communicate with each other via the communication bus 504. The processor 501 may call logic instructions in the memory 503 to execute an anti-counterfeiting tracing method based on structural deformation and image watermarking, the method including: dividing a watermark coding sequence corresponding to the unique identification sequence of the anti-counterfeiting tracing object into a first coding sequence and a second coding sequence; according to the sequence of the first coding sequence, according to the corresponding relation between preset different coding values and the symbol deformation rule, sequentially carrying out corresponding deformation on the symbols in the target image of the anti-counterfeiting tracing object in which the unique identification sequence is to be embedded; and embedding the second coding sequence into a graph part in a target image of the anti-counterfeiting tracing object based on the edge watermark to obtain the target image of the anti-counterfeiting tracing object embedded with the unique identification sequence.
In addition, the logic instructions in the memory 503 may be implemented in the form of software functional units and stored in a computer readable storage medium when the logic instructions are sold or used as independent products. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk, and various media capable of storing program codes.
In another aspect, the present invention further provides a computer program product, where the computer program product includes a computer program, the computer program may be stored on a non-transitory computer-readable storage medium, and when the computer program is executed by a processor, a computer can execute the method for anti-counterfeiting tracing based on structural deformation and image watermarking provided by the above methods, where the method includes: dividing a watermark coding sequence corresponding to the unique identification sequence of the anti-counterfeiting tracing object into a first coding sequence and a second coding sequence; according to the sequence of the first coding sequence, according to the corresponding relation between preset different coding values and the symbol deformation rule, sequentially carrying out corresponding deformation on the symbols in the target image of the anti-counterfeiting tracing object in which the unique identification sequence is to be embedded; and embedding the second coding sequence into a graph part in a target image of the anti-counterfeiting tracing object based on the edge watermark to obtain the target image of the anti-counterfeiting tracing object embedded with the unique identification sequence.
In still another aspect, the present invention further provides a non-transitory computer-readable storage medium, on which a computer program is stored, where the computer program is implemented to execute, by a processor, the anti-counterfeiting tracing method based on structural deformation and image watermarking provided by the above methods, where the method includes: dividing a watermark coding sequence corresponding to the unique identification sequence of the anti-counterfeiting tracing object into a first coding sequence and a second coding sequence; according to the sequence of the first coding sequence, according to the corresponding relation between preset different coding values and the symbol deformation rule, sequentially carrying out corresponding deformation on the symbols in the target image of the anti-counterfeiting tracing object in which the unique identification sequence is to be embedded; and embedding the second coding sequence into a graph part in a target image of the anti-counterfeiting tracing object based on the edge watermark to obtain the target image of the anti-counterfeiting tracing object embedded with the unique identification sequence.
The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment may be implemented by software plus a necessary general hardware platform, and may also be implemented by hardware. With this understanding in mind, the above-described technical solutions may be embodied in the form of a software product, which can be stored in a computer-readable storage medium such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in the embodiments or some parts of the embodiments.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (15)

1. An anti-counterfeiting tracing method based on structural deformation and image watermarking is characterized by comprising the following steps:
dividing a watermark coding sequence corresponding to the unique identification sequence of the anti-counterfeiting tracing object into a first coding sequence and a second coding sequence;
according to the sequence of the first coding sequence, according to the corresponding relation between preset different coding values and the symbol deformation rule, sequentially carrying out corresponding deformation on the symbols in the target image of the anti-counterfeiting tracing object in which the unique identification sequence is to be embedded;
and embedding the second coding sequence into a graph part in a target image of the anti-counterfeiting tracing object based on the edge watermark to obtain the target image of the anti-counterfeiting tracing object embedded with the unique identification sequence.
2. The anti-counterfeiting tracing method based on structural deformation and image watermarking as claimed in claim 1, wherein the corresponding deformation is sequentially performed on the symbols in the target image of the anti-counterfeiting tracing object to be embedded with the unique identification sequence according to the corresponding relationship between the preset different coding values and the symbol deformation rule, and comprises:
dividing the first coding sequence into a plurality of groups according to a preset digit, determining a deformation rule corresponding to each group of codes from a preset replacement symbol coding table according to the value of each group of codes in sequence, and replacing symbols in a target image of the anti-counterfeiting tracing object according to the deformation rule in sequence;
the replacement symbol coding table is a corresponding relation between a replacement symbol and a coding value, and the replacement symbol is a deformation symbol obtained by a standard symbol under different deformation rules.
3. The anti-counterfeiting tracing method based on structural deformation and image watermarking as claimed in claim 2, wherein the dividing of the watermark encoding sequence corresponding to the unique identification sequence of the anti-counterfeiting tracing object into a first encoding sequence and a second encoding sequence comprises:
and determining the length of the first coding sequence according to the number of all available symbols in the target image of the anti-counterfeiting tracing object and the preset digit, and correspondingly obtaining the first coding sequence and the second coding sequence.
4. The method for anti-counterfeiting tracing based on structural deformation and image watermarking as claimed in claim 1, wherein before dividing the watermark encoding sequence corresponding to the unique identification sequence of the anti-counterfeiting tracing object into a first encoding sequence and a second encoding sequence, further comprising:
converting the unique identification sequence into a binary bit stream to obtain the watermark coding sequence;
or converting the unique identification sequence into a binary bit stream, and encrypting the binary bit stream based on a preset encryption algorithm to obtain an encrypted bit stream; and adding a check code to the encrypted bit stream to obtain the watermark coding sequence.
5. An anti-counterfeiting tracing method based on structural deformation and image watermarking is characterized by comprising the following steps:
comparing each symbol in the target image of the anti-counterfeiting tracing object with a standard symbol to determine all deformed symbols with deformation;
based on the corresponding relation between a preset symbol deformation rule and different coding values, decoding each deformation symbol in sequence to obtain the coding value of each deformation symbol, and obtaining a first coding sequence according to the coding values of all the deformation symbols;
detecting the graph in the target image of the anti-counterfeiting tracing object by using an edge watermark detector to obtain a second coding sequence;
and combining the first coding sequence and the second coding sequence, and converting the first coding sequence and the second coding sequence into a watermark code corresponding to the unique identification sequence.
6. The anti-counterfeiting tracing method based on structural deformation and image watermarking as claimed in claim 5, wherein the decoding of each deformed symbol is performed in sequence based on the corresponding relationship between the preset symbol deformation rule and different encoding values to obtain the encoding value of each deformed symbol comprises:
for all the deformation symbols, determining a coding value corresponding to each deformation symbol from a preset substitution symbol coding table;
the replacement symbol coding table is a corresponding relation between a replacement symbol and a coding value, and the replacement symbol is a deformation symbol obtained by a standard symbol under different deformation rules.
7. The anti-counterfeiting tracing method based on structural deformation and image watermarking as claimed in claim 5, wherein after the conversion into the watermark code corresponding to the unique identification sequence, further comprising:
converting the watermark code corresponding to the unique identification sequence into a target unique identification sequence;
acquiring a unique identification sequence to be verified provided by the anti-counterfeiting tracing object;
and under the condition that the unique identification sequence to be verified is consistent with the target unique identification sequence, judging that the unique identification sequence to be verified is valid, otherwise, judging that the unique identification sequence to be verified is invalid.
8. The anti-counterfeiting tracing method based on structural deformation and image watermarking as claimed in claim 5, wherein after the detecting the image in the target image of the anti-counterfeiting tracing object by using the edge watermark detector to obtain the second encoding sequence, the method further comprises:
verifying the number of errors of said second encoded sequence; and when the error number of the second coding sequence exceeds a preset number, judging that the target image of the anti-counterfeiting tracing object is obtained by copying.
9. The utility model provides an anti-fake device of tracing to source based on structure deformation and image watermark which characterized in that includes:
the sequence splitting module is used for dividing a watermark coding sequence corresponding to the unique identification sequence of the anti-counterfeiting tracing object into a first coding sequence and a second coding sequence;
the structure embedding module is used for sequentially carrying out corresponding deformation on the symbols in the target image of the anti-counterfeiting tracing object needing to be embedded with the unique identification sequence according to the sequence of the first coding sequence and the corresponding relation between the preset different coding values and the symbol deformation rule;
and the edge embedding module is used for embedding the second coding sequence into a graph part in a target image of the anti-counterfeiting tracing object based on the edge watermark so as to obtain the target image of the anti-counterfeiting tracing object embedded with the unique identification sequence.
10. The utility model provides an anti-fake device of tracing to source based on structural deformation and image watermark which characterized in that includes:
the image processing module is used for comparing each symbol in the target image of the anti-counterfeiting tracing object with the standard symbol and determining all deformed symbols with deformation;
the first decoding module is used for sequentially decoding each deformation symbol based on the corresponding relation between a preset symbol deformation rule and different coding values to obtain the coding value of each deformation symbol, and obtaining a first coding sequence according to the coding values of all the deformation symbols;
the second decoding module is used for detecting the graph in the target image of the anti-counterfeiting tracing object by using the edge watermark detector to obtain a second coding sequence;
and the comprehensive decoding module is used for combining the first coded sequence and the second coded sequence and converting the combined coded sequences into watermark codes corresponding to the unique identification sequences.
11. The structural deformation and image watermark-based anti-counterfeiting tracing device according to claim 10, further comprising an anti-counterfeiting tracing module for:
converting the watermark code corresponding to the unique identification sequence into a target unique identification sequence;
acquiring a unique identification sequence to be verified provided by the anti-counterfeiting tracing object;
and under the condition that the unique identification sequence to be verified is consistent with the target unique identification sequence, judging that the unique identification sequence to be verified is valid, otherwise, judging that the unique identification sequence to be verified is invalid.
12. The structural deformation and image watermark-based anti-counterfeiting tracing device according to claim 11, wherein the anti-counterfeiting tracing module is further configured to:
verifying the number of errors of said second encoded sequence; and when the error number of the second coding sequence exceeds a preset number, judging that the target image of the anti-counterfeiting tracing object is obtained by copying.
13. An electronic device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the method for anti-counterfeit tracing based on structural deformation and image watermarking according to any one of claims 1 to 8 when executing the program.
14. A non-transitory computer readable storage medium, on which a computer program is stored, wherein the computer program, when executed by a processor, implements the anti-counterfeiting tracing method based on structural deformation and image watermarking according to any one of claims 1 to 8.
15. A computer program product comprising a computer program, wherein the computer program is configured to implement the method for anti-counterfeiting traceability based on structural deformation and image watermarking according to any one of claims 1 to 8 when being executed by a processor.
CN202211406826.9A 2022-11-10 2022-11-10 Anti-counterfeiting tracing method and device based on structural deformation and image watermark Pending CN115601216A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211406826.9A CN115601216A (en) 2022-11-10 2022-11-10 Anti-counterfeiting tracing method and device based on structural deformation and image watermark

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211406826.9A CN115601216A (en) 2022-11-10 2022-11-10 Anti-counterfeiting tracing method and device based on structural deformation and image watermark

Publications (1)

Publication Number Publication Date
CN115601216A true CN115601216A (en) 2023-01-13

Family

ID=84853356

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211406826.9A Pending CN115601216A (en) 2022-11-10 2022-11-10 Anti-counterfeiting tracing method and device based on structural deformation and image watermark

Country Status (1)

Country Link
CN (1) CN115601216A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117291787A (en) * 2023-11-27 2023-12-26 中电科大数据研究院有限公司 Traceability method and system based on data watermark

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117291787A (en) * 2023-11-27 2023-12-26 中电科大数据研究院有限公司 Traceability method and system based on data watermark
CN117291787B (en) * 2023-11-27 2024-01-26 中电科大数据研究院有限公司 Traceability method and system based on data watermark

Similar Documents

Publication Publication Date Title
Tkachenko et al. Two-level QR code for private message sharing and document authentication
US9594993B2 (en) Two dimensional barcode and method of authentication of such barcode
US8087583B2 (en) Associating media through encoding
US6782116B1 (en) Apparatus and methods for improving detection of watermarks in content that has undergone a lossy transformation
US8430301B2 (en) Document authentication using hierarchical barcode stamps to detect alterations of barcode
CN110766594B (en) Information hiding method and device, detection method and device and anti-counterfeiting tracing method
US9589217B2 (en) Augmenting barcodes with secondary encoding for anti-counterfeiting
US9934457B2 (en) Method of securing a two-dimensional barcode
US20060255141A1 (en) Machine readable data
US8385592B2 (en) Digital watermarking system and method
AU2005241434A1 (en) System and method for decoding digital encoded images
US20020146146A1 (en) Using digital watermarks to facilitate counterfeit inspection and inventory management
CN105701757B (en) Product anti-counterfeiting method and device based on digital watermark and graphic code
CN103761656B (en) Printing inspecting method and device of commodity information
CN111444998A (en) Method for manufacturing multiple anti-counterfeiting traceable package identifier
JP2009259220A (en) Creation and placement of two-dimensional bar code stamp on printed document for storing authentication information
JP2017017673A (en) Method for protecting authenticity of article, item, document, package and/or label from imitation, forgery and theft
CN109816077A (en) A kind of hidden method of two-dimensional barcode information, device, electronic equipment and storage medium
CN116681098A (en) Method and system for generating anti-counterfeiting mark image based on two-dimensional code generation
CN115601216A (en) Anti-counterfeiting tracing method and device based on structural deformation and image watermark
CN108960387A (en) A kind of anti-counterfeiting two dimensional code and its generation and recognition methods
CN116227524B (en) Anti-fake code generation and verification method and label-based anti-fake system
AU2006252223B2 (en) Tamper Detection of Documents using Encoded Dots
Sun et al. Research on embedding and extracting methods for digital watermarks applied to QR code images
CN106934756B (en) Method and system for embedding information in single-color or special-color image

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