CN109829529B - Method and device for optimizing embedded parameters of anti-copy two-dimensional code - Google Patents

Method and device for optimizing embedded parameters of anti-copy two-dimensional code Download PDF

Info

Publication number
CN109829529B
CN109829529B CN201910083224.6A CN201910083224A CN109829529B CN 109829529 B CN109829529 B CN 109829529B CN 201910083224 A CN201910083224 A CN 201910083224A CN 109829529 B CN109829529 B CN 109829529B
Authority
CN
China
Prior art keywords
dimensional code
correction
variance
shape factor
dimensional
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.)
Active
Application number
CN201910083224.6A
Other languages
Chinese (zh)
Other versions
CN109829529A (en
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 University
Original Assignee
Shenzhen 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 University filed Critical Shenzhen University
Priority to CN201910083224.6A priority Critical patent/CN109829529B/en
Publication of CN109829529A publication Critical patent/CN109829529A/en
Application granted granted Critical
Publication of CN109829529B publication Critical patent/CN109829529B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The disclosure describes an optimization method for embedded parameters of a copy-proof two-dimensional code, which is characterized by comprising the following steps: acquiring an initial two-dimensional code; printing and scanning the initial two-dimensional code to obtain a plurality of target two-dimensional codes; on the basis of a plurality of target two-dimensional codes, synthesizing a plurality of preset number of target two-dimensional codes into a corresponding two-dimensional code synthetic graph according to a smooth averaging mode; calculating the mean value, the variance and the shape factor of the two-dimensional code synthetic image, and correcting the mean value, the variance and the shape factor through a correction function to obtain a corrected mean value, a corrected variance and a corrected shape factor; obtaining a theoretical correction error rate through a generalized Gaussian function based on a correction mean value, a correction variance and a correction shape factor; and comparing the theoretical correction error rate with the error correction capability of the two-dimensional code, and reducing the error correction capability of the two-dimensional code when the theoretical correction error rate is less than or equal to the error correction capability of the two-dimensional code so as to improve the attack cost of an illegal copying party.

Description

Method and device for optimizing embedded parameters of anti-copy two-dimensional code
Technical Field
The disclosure relates to the technical field of information, in particular to a method and a device for optimizing embedded parameters of anti-copy two-dimensional codes.
Background
The conventional two-dimensional code is easily copied by an illegal user after being printed. At present, the two-dimensional code anti-copy method mainly comprises: (1) using digital watermarking techniques to protect against copying; (2) use of special printing materials or processes to prevent copying; (3) using a physical unclonable feature to prevent copying; (4) the anti-copy pattern is used to prevent copying.
Although the above method can play a role in copy prevention to some extent, there are also significant limitations: on one hand, the universality of the two-dimensional code is reduced, particularly the universal applicability of the two-dimensional code to output and reading equipment is reduced by the method, and the contradiction exists between the illegal copying resistance and the universal applicability; on the other hand, the method cannot resist reduction attack, and particularly, due to the block shape and the public coding structure of the traditional two-dimensional code, the method cannot resist image reduction attack aiming at the structured two-dimensional code; on the other hand, it needs additional online information, and in particular, the verification process of the above method cannot be completed based on the offline image features, and needs to utilize additional online auxiliary information, such as an online database.
In order to better improve the anti-copy method, the illegally copied two-dimensional codes need to be effectively analyzed, however, the prior art is lack of further analysis on a plurality of illegally copied two-dimensional codes.
Disclosure of Invention
In order to solve the problems, the method and the device for optimizing the embedded parameters of the anti-copying two-dimensional code are provided, which can optimize the embedded parameters of the two-dimensional code and improve the attack cost of an illegal copying party.
To this end, a first aspect of the present disclosure provides a method for optimizing an embedded parameter of a copy-prevention two-dimensional code, including: acquiring an initial two-dimensional code; printing and scanning the initial two-dimensional code to obtain a plurality of target two-dimensional codes; synthesizing a plurality of preset numbers of target two-dimensional codes into a corresponding two-dimensional code synthetic graph according to a smooth averaging mode on the basis of the plurality of target two-dimensional codes; calculating the mean value, the variance and the shape factor of the two-dimensional code synthetic image, and correcting the mean value, the variance and the shape factor through a correction function to obtain a corrected mean value, a corrected variance and a corrected shape factor; obtaining a theoretical correction error rate through a generalized Gaussian function based on the correction mean value, the correction variance and the correction shape factor; and comparing the theoretical correction error rate with the error correction capability of the two-dimensional code, and when the theoretical correction error rate is smaller than or equal to the error correction capability of the two-dimensional code, reducing the error correction capability of the two-dimensional code so as to improve the attack cost of an illegal copying party.
According to the method, an initial two-dimensional code is obtained, a plurality of target two-dimensional codes are obtained based on the initial two-dimensional code, a plurality of preset target two-dimensional codes are combined into a corresponding two-dimensional code composite image according to a smooth averaging mode, the mean value, the variance, the shape factor and the correction error rate of the two-dimensional code composite image are calculated, and the theoretical correction error rate and the error correction capability of the two-dimensional codes are compared to optimize an embedding parameter. Therefore, the embedded parameters of the two-dimensional code can be optimized, and the attack cost of an illegal copying party is increased.
In the method for optimizing the embedding parameters of the copy-prevention two-dimensional code according to the present disclosure, optionally, the method further includes: preparing original information and authentication information, coding the original information through a first coding mode to obtain coded original information, and coding the authentication information through a second coding mode to obtain coded authentication information; and obtaining the initial two-dimensional code based on the encoding original information and the authentication information. Therefore, the original information and the authentication information are coded in different coding modes, the encryption capacity of the obtained initial two-dimensional code is enhanced, and the decryption difficulty is improved.
In the optimization method of the embedded parameters of the copy-prevention two-dimensional code, optionally, the encoded authentication information is embedded into the encoded original information in a whole segment to obtain a target bit stream; and converting the target bit stream into a gray value according to a preset modulation mode, and printing and scanning to obtain the initial two-dimensional code. Thus, the initial two-dimensional code with strong encryption capability can be further obtained.
In the method for optimizing the embedded parameter of the copy-protected two-dimensional code according to the present disclosure, optionally, the first encoding scheme employs a multilevel error correction encoding scheme, and the second encoding scheme employs a binary error correction encoding scheme. Thus, the security effect of the initial two-dimensional code can be enhanced.
In the method for optimizing the embedded parameter of the copy-prevention two-dimensional code, optionally, the preset modulation mode is a pulse amplitude modulation mode. Thus, the initial two-dimensional code can be obtained by the pulse amplitude modulation method.
A second aspect of the present disclosure provides an apparatus for optimizing an embedded parameter of a copy-proof two-dimensional code, including: the acquisition module is used for acquiring an initial two-dimensional code; the printing and scanning module is used for printing and scanning the initial two-dimensional code to obtain a plurality of target two-dimensional codes; the synthesis module is used for synthesizing a plurality of target two-dimensional codes into a corresponding two-dimensional code synthesis image according to a smooth averaging mode; the calculation module is used for calculating the mean value, the variance and the shape factor of the two-dimensional code synthetic image, and correcting the mean value, the variance and the shape factor through a correction function to obtain a corrected mean value, a corrected variance and a corrected shape factor; obtaining a theoretical correction error rate for the correction mean value, the correction variance and the correction shape factor through a generalized Gaussian function; and the comparison module is used for comparing the theoretical correction error rate with the error correction capability of the two-dimensional code, and when the theoretical correction error rate is smaller than or equal to the error correction capability of the two-dimensional code, the error correction capability of the two-dimensional code is reduced so as to improve the attack cost of an illegal copying party.
In the disclosure, the acquisition module acquires an initial two-dimensional code, and the printing and scanning module generates a two-dimensional code synthetic graph through the synthesis module after acquiring a plurality of target two-dimensional codes through the printing and scanning module based on the initial two-dimensional code. The calculation module calculates to obtain the mean value, the variance and the shape factor of the two-dimensional code synthetic image and the correction error rate, and the comparison module compares the theoretical correction error rate with the error correction capability of the two-dimensional code to optimize the embedding parameters. Therefore, the embedded parameters of the two-dimensional code can be optimized, and the attack cost of an illegal copying party is increased.
In the optimization device for the embedded parameters of the copy-proof two-dimensional code, optionally, the obtaining module prepares original information and authentication information, encodes the original information by a first encoding method to obtain encoded original information, and encodes the authentication information by a second encoding method to obtain encoded authentication information; and obtaining the initial two-dimensional code based on the encoding original information and the authentication information. Therefore, the original information and the authentication information are coded in different coding modes, the encryption capacity of the obtained initial two-dimensional code is enhanced, and the decryption difficulty is improved.
In the optimization device for the embedded parameters of the copy-prevention two-dimensional code, optionally, the obtaining module embeds the encoded authentication information into the encoded original information in a whole segment to obtain a target bit stream, converts the target bit stream into a gray value according to a preset modulation mode, and prints and scans the gray value to obtain the initial two-dimensional code. Thus, the initial two-dimensional code with strong encryption capability can be further obtained.
In the optimization device for the embedded parameters of the copy-protected two-dimensional code according to the present disclosure, optionally, the obtaining module uses a multilevel error correction coding scheme for a first coding scheme and uses a binary error correction coding scheme for a second coding scheme. Thus, the security effect of the initial two-dimensional code can be enhanced.
In the optimization device for the embedded parameters of the copy-prevention two-dimensional code, optionally, the obtaining module uses a pulse amplitude modulation mode as the preset modulation mode. Thus, the initial two-dimensional code can be obtained by the pulse amplitude modulation method.
According to the method and the device for optimizing the embedded parameters of the anti-copying two-dimensional code, the embedded parameters of the two-dimensional code can be optimized, and the attack cost of an illegal copying party is improved.
Drawings
Embodiments of the present disclosure will now be explained in further detail, by way of example only, with reference to the accompanying drawings, in which:
fig. 1 is a flowchart illustrating an optimization method of an embedding parameter of a copy-protected two-dimensional code according to an example of the present disclosure.
Fig. 2 is a relational diagram showing a target two-dimensional code composite number of the two-dimensional code composite diagram according to the example of the present disclosure.
Fig. 3 is a schematic structural diagram illustrating an apparatus for optimizing embedding parameters of a copy-protected two-dimensional code according to an example of the present disclosure.
Fig. 4 is a schematic structural diagram illustrating an optimization apparatus of embedding parameters of a copy-protected two-dimensional code according to an example of the present disclosure.
Detailed Description
Hereinafter, preferred embodiments of the present disclosure will be described in detail with reference to the accompanying drawings. In the following description, the same components are denoted by the same reference numerals, and redundant description thereof is omitted. In addition, the drawings are only schematic drawings.
It should be noted that the terms "first," "second," "third," and "fourth," etc. in the description and claims of the present disclosure and in the above-described drawings are used for distinguishing between different objects and not for describing a particular order. Furthermore, the terms "include" and "have," as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements listed, but may alternatively include other steps or elements not listed, or inherent to such process, method, article, or apparatus.
Fig. 1 is a flowchart illustrating an optimization method of embedded parameters of a copy-protected two-dimensional code according to an example of the present disclosure. As shown in fig. 1, the method for optimizing the embedding parameters of the copy-protected two-dimensional code includes acquiring an initial two-dimensional code (step S100).
In step S100, the initial two-dimensional code may be an electronic two-dimensional code. The initial two-dimensional code may be obtained based on the original information and the authentication information. The original information may be information to be transmitted by the user, that is, the original information may be information input by the user, such as a character string. The authentication information may be a string, a binary bit stream, or the like. The authentication information may be used to authenticate authenticity of the initial two-dimensional code to verify authenticity of the initial two-dimensional code.
In some examples, original information and authentication information are prepared, the original information is encoded through a first encoding mode to obtain encoded original information, and the authentication information is encoded through a second encoding mode to obtain encoded authentication information. Therefore, the original information and the authentication information are coded in different coding modes, the encryption capacity of the obtained initial two-dimensional code is enhanced, and the decryption difficulty is improved.
Specifically, the first coding scheme may be a multilevel error correction coding scheme, such as Reed-solomon (RS) coding scheme. RS coding is a kind of channel coding. RS encoding has forward error correction capability and is effective on the polynomial generated by correcting the oversampled data. The RS code has stronger anti-interference, anti-noise and error correction capabilities. In addition, the encoded original information may be a binary bit stream composed of "0" and "1". The second coding method may be a binary error correction coding method, such as a BCH (Bose, Ray-Chaudhuri Hocquenghem) coding method. The BCH code is a linear block code in a finite field. BCH codes have the ability to correct multiple random errors and are commonly used for error correction in the communications and storage fields. BCH encoding may be used for multi-level phase shift keying at the prime level or at the power of the prime. Compared with RS codes, BCH codes have weak anti-interference, anti-noise and error correction capabilities. In addition, the encoded authentication information may be a binary bit stream composed of "0" and "1". In this case, the first encoding scheme is different from the second encoding scheme. Thus, the security effect of the initial two-dimensional code can be enhanced.
In some examples, the encoding of the original information and the encoding of the authentication information may be performed simultaneously or sequentially. When the sequence is performed, the original information may be encoded first, or the authentication information may be encoded first.
In some examples, the information length of the encoded authentication information may be much smaller than the information length of the encoded original information. For example, the encoded authentication information may be less than 30% of the encoded original information. For example, the length of the encoded authentication information is 100bits, the length of the encoded original information is 1000bits, and the length of the finally obtained target bit stream is between 1000bits and 1100 bits.
In some examples, the initial two-dimensional code is obtained based on the encoded original information and the encoded authentication information. Specifically, the encoding authentication information is embedded into the encoding original information to obtain a target bit stream; and converting the target bit stream into a gray value according to a preset modulation mode, and printing and scanning to obtain the initial two-dimensional code. The printing operation may use a laser printer, an inkjet printer, or the like. For example, printing may be performed by a printer of model fuji 355 d. The scanning operation may use a flatbed scanner, a drum scanner, a cell phone camera, or other imaging capture devices. For example, scanning may be performed by a scanner, model BENQK 810. Thus, the initial two-dimensional code with strong encryption capability can be further obtained.
In some examples, the encoded authentication information may include a plurality of segmented encoded authentication information. The encoded original information can be embedded into each piece of segmented encoded authentication information to obtain the target bit stream. The embedding may be, for example, replacement. In other words, part of the information in the encoded original information may be replaced by a plurality of piece-wise encoded authentication information. Therefore, the coded authentication information can be disguised, and the robustness of the obtained initial two-dimensional code is improved. For example, when the length of the encoded authentication information is 100bits and the length of the encoded original information is 1000bits, the encoded authentication information may replace a part of information of the encoded original information having a length of 100bits, thereby obtaining a target bit stream having a length of 1000 bits. Therefore, the initial two-dimensional code comprising the authentication information can be obtained, and the authentication information has a low error rate.
In addition, the length of each segmented coding authentication information is the same. That is, the encoded authentication information may be segmented averagely to obtain a plurality of segmented encoded authentication information. Therefore, the initial two-dimensional code with a lower error rate can be further obtained based on the segmented coding authentication information obtained by averaging the segments.
In some examples, the preset Modulation scheme may adopt any one of a Quadrature Amplitude Modulation (QAM) scheme, a Quadrature Phase-Shift Keying (QPSK) scheme, or a pulse Modulation scheme.
In some examples, the Pulse Modulation scheme may be a Pulse Amplitude Modulation (PAM) Modulation scheme. The target bit stream can be converted into a gray value by adopting a PAM (pulse amplitude modulation) mode, and then the initial two-dimensional code is generated.
Specifically, the target bitstream may be composed of "0" and "1". Considering adjacent two-bit binary numbers as a group, there are 4 cases, for example, "00", "01", "10", and "11", per group. Different groups can be modulated into different gray values by adopting a PAM modulation mode, for example, the gray values corresponding to the four cases can be 40, 100, 160 and 220. The initial two-dimensional code can be obtained based on the four gray values. And the position relation of each group of adjacent two-bit binary numbers in the target bit stream corresponds to the position relation of the pixels with corresponding gray values in the initial two-dimensional code one to one. Therefore, the target bit stream can be converted into the gray value by adopting a pulse amplitude modulation mode, and the initial two-dimensional code is further obtained.
The examples of the present disclosure are not limited thereto, and in other examples, adjacent three or more bits of the target bit stream may be regarded as one group, different groups may be modulated to different gray values by using a PAM modulation method, and the initial two-dimensional code may be obtained.
In some examples, the device that generates the initial two-dimensional code may be, for example, a computer, a printer (laser printer, inkjet printer, etc.).
In some examples, the method for optimizing the embedding parameters of the copy-prevention two-dimensional code may further include printing and scanning the initial two-dimensional code to obtain a plurality of target two-dimensional codes (step S200).
In step S200, the initial two-dimensional code is printed and scanned. The printer and the scanner may refer to, but are not limited to, the description in step S100 described above. And repeatedly printing and scanning the initial two-dimensional code to obtain a plurality of independent and identically distributed target two-dimensional codes.
In some examples, the method for optimizing the embedding parameters of the copy-prevention two-dimensional code may further include combining a plurality of preset numbers of target two-dimensional codes into a corresponding two-dimensional code composite map according to a smooth averaging manner based on the plurality of target two-dimensional codes (step S300).
In step S300, the preset number of sheets may be, for example, "1 sheet", "2 sheets", "3 sheets", or the like. The plurality may be, but is not limited to, 16.
Specifically, for example, the target two-dimensional codes of which the preset number is 1 may be combined into one two-dimensional code combined image by a smooth averaging method. Ten two-dimensional code composite images can be combined from target two-dimensional codes with a preset number of 10 according to a smooth averaging mode. Wherein, the more the preset number of the two-dimensional code composite image, the lower the error rate of the corresponding two-dimensional code composite image.
In some examples, the method for optimizing the embedding parameters of the copy-protected two-dimensional code may further include calculating a mean, a variance, and a shape factor of the two-dimensional code composite image, and correcting the mean, the variance, and the shape factor by a correction function to obtain a corrected mean, a corrected variance, and a corrected shape factor (step S400).
In step S400, the mean, variance, and shape factor thereof may be calculated based on the two-dimensional code composite map. And the obtained mean value, variance and shape factor are corrected by a correction function to obtain a corrected mean value, a corrected variance and a corrected shape factor.
In some examples, the method for optimizing the embedding parameters of the copy-protected two-dimensional code may further include learning a theoretical correction error rate by a generalized gaussian function based on the correction mean, the correction variance, and the correction shape factor (step S500).
In step S500, the modified mean, the modified variance, and the modified shape factor may be used as input parameters of a generalized gaussian function, and a theoretical modified error rate of each two-dimensional code composite graph may be calculated through the generalized gaussian function.
In some examples, the method for optimizing the embedded parameter of the copy-protected two-dimensional code may further include comparing the theoretical correction error rate with the error correction capability of the two-dimensional code, and when the theoretical correction error rate is less than or equal to the error correction capability of the two-dimensional code, reducing the error correction capability of the two-dimensional code to increase the attack cost of an illegal copying party (step S600).
In step S600, when the theoretical correction error rate is greater than the error correction capability of the two-dimensional code, the illegally copied two-dimensional code may be recognized. When the theoretical correction error rate is less than or equal to the error correction capability of the two-dimensional code, the illegally copied two-dimensional code cannot be effectively identified. The error correction capability of the two-dimensional code when the theoretical correction error rate is equal to the error correction capability of the two-dimensional code can be regarded as a decision threshold.
In some examples, when the theoretical correction error rate is less than or equal to the error correction capability of the two-dimensional code, the embedding parameters of the two-dimensional code are optimized, that is, the error correction capability of the two-dimensional code is reduced. Therefore, an illegal copying party can synthesize more target two-dimensional codes to obtain a corresponding two-dimensional code synthetic image, and further a new illegally copied two-dimensional code can not be effectively identified. In this case, the attack cost of the illegal copying party can be increased.
Fig. 2 is a relational diagram showing a target two-dimensional code composite number of the two-dimensional code composite diagram according to the example of the present disclosure. Wherein the vertical axis represents the theoretical corrected bit error rate. The horizontal axis represents the number of target two-dimensional code combinations. Curve a represents the value of the theoretical correction error rate in the scene of the target number of two-dimensional code composite sheets of different two-dimensional code composite diagrams. The straight line B represents the error correction capability of the original two-dimensional code. The straight line C represents the error correction capability of the adjusted two-dimensional code. The straight line D represents the lower limit of the error correction capability. The value of the straight line D can ensure the error rate of the legal two-dimensional code in the worst scene, and the area between the straight line B and the straight line D represents the optimization range of the error correction capability. As the number of combined sheets increases, the theoretical correction error rate tends to decrease. It can be seen from the figure that when ten two-dimensional codes are synthesized, the value of the theoretical correction error rate is located below the straight line B, and when the down-regulation error correction capability reaches the straight line C, the synthesis of sixteen target two-dimensional codes is needed to enable the theoretical correction error rate to be lower than C. This can increase the attack cost.
According to the method, an initial two-dimensional code is obtained, a plurality of target two-dimensional codes are obtained based on the initial two-dimensional code, a plurality of preset target two-dimensional codes are combined into a corresponding two-dimensional code combined graph according to a smooth averaging mode, the mean value, the variance, the shape factor and the correction error rate of the two-dimensional code combined graph are obtained through calculation, the theoretical correction error rate and the error correction capability of the two-dimensional codes are compared, and the embedding parameters are optimized. Therefore, the embedded parameters of the two-dimensional code can be optimized, and the attack cost of an illegal copying party is increased.
Fig. 3 is a schematic structural diagram illustrating an apparatus for optimizing embedding parameters of a copy-protected two-dimensional code according to an example of the present disclosure. As shown in fig. 3, the device 1 for optimizing embedded parameters of a copy-protected two-dimensional code includes an acquisition module 11, a print scanning module 12, a synthesis module 13, a calculation module 14, and a comparison module 15.
In some examples, the obtaining module 11 may be configured to obtain an initial two-dimensional code. The acquisition module prepares original information and authentication information, encodes the original information through a first encoding mode to obtain encoded original information, and encodes the authentication information through a second encoding mode to obtain encoded authentication information. The first coding mode adopts a multilevel error correction coding mode, such as an RS coding mode, and the second coding mode adopts a binary error correction coding mode, such as a BCH coding mode.
In some examples, the obtaining module 11 may obtain the initial two-dimensional code based on the encoding original information and the authentication information. Specifically, the encoding authentication information is embedded into the encoding original information in a whole segment to obtain a target bit stream; and converting the target bit stream into a gray value according to a preset modulation mode, and printing and scanning to obtain the initial two-dimensional code. The preset modulation mode can adopt a pulse amplitude modulation mode. The function of the obtaining module 11 can be seen in step S100.
In some examples, the print-and-scan module 12 may be configured to print and scan the initial two-dimensional code to obtain multiple target two-dimensional codes. See step S200 for details.
In some examples, the synthesis module 13 may be configured to synthesize a plurality of target two-dimensional codes into a corresponding two-dimensional code synthesis map according to a smooth averaging manner. See step S300 for details.
In some examples, the calculation module 14 may be configured to calculate a mean, a variance, and a shape factor of the two-dimensional code composite image, and obtain a modified mean, a modified variance, and a modified shape factor by modifying the mean, the variance, and the shape factor with a modification function; and obtaining the theoretical correction error rate by the generalized Gaussian function for the correction mean value, the correction variance and the correction shape factor. See step S400 and step S500 specifically.
In some examples, the comparing module 15 may be configured to compare the theoretical correction error rate with the error correction capability of the two-dimensional code, and when the theoretical correction error rate is less than or equal to the error correction capability of the two-dimensional code, reduce the error correction capability of the two-dimensional code to increase the attack cost of an illegal copying party. See step S600 for details.
The present disclosure relates to an optimization apparatus of an embedded parameter of a copy-resistant two-dimensional code. Fig. 4 is a schematic structural diagram illustrating an optimization apparatus of embedding parameters of a copy-protected two-dimensional code according to an example of the present disclosure.
In the present disclosure, the optimization of the embedding parameters of the copy-protected two-dimensional code as shown in fig. 4 includes a processor 21 and a memory 22. The processor 21 and the memory 22 are connected to a communication bus, respectively. The memory 22 may be a high-speed RAM memory or a non-volatile memory (non-volatile memory). The memory 22 may include a program storage area storing program code and a data storage area transmitting data signals. Those skilled in the art will appreciate that the structure of the optimization device 1 for the embedded parameters of the copy-proof two-dimensional code shown in fig. 4 does not constitute a limitation to the present disclosure, and may be a bus structure, a star structure, a combination of more or less components than those shown in fig. 4, or a different arrangement of components.
The processor 21 is a control center of the optimization device 1 for preventing the embedded parameters of the two-dimensional code from being copied. The processor 21 may be a Central Processing Unit (CPU). The processor 21 connects the various parts of the optimization apparatus 1 of the embedded parameters of the entire copy-protected two-dimensional code by means of various interfaces and lines, by running or executing software programs and/or modules stored in the memory 22, and calling program code stored in a program memory area of the memory 22, for performing the following operations:
acquiring an initial two-dimensional code; printing and scanning the initial two-dimensional code to obtain a plurality of target two-dimensional codes; on the basis of a plurality of target two-dimensional codes, synthesizing a plurality of preset number of target two-dimensional codes into a corresponding two-dimensional code synthetic graph according to a smooth averaging mode; calculating the mean value, the variance and the shape factor of the two-dimensional code synthetic image, and correcting the mean value, the variance and the shape factor through a correction function to obtain a corrected mean value, a corrected variance and a corrected shape factor; obtaining a theoretical correction error rate through a generalized Gaussian function based on a correction mean value, a correction variance and a correction shape factor; and comparing the theoretical correction error rate with the error correction capability of the two-dimensional code, and reducing the error correction capability of the two-dimensional code when the theoretical correction error rate is less than or equal to the error correction capability of the two-dimensional code so as to improve the attack cost of an illegal copying party.
In the present embodiment, the processor 21 of the optimization apparatus 1 for the embedding parameters of the copy-protected two-dimensional code at the transmitting end further performs the following operations: preparing original information and authentication information, coding the original information through a first coding mode to obtain coded original information, and coding the authentication information through a second coding mode to obtain coded authentication information; and obtaining an initial two-dimensional code based on the encoding original information and the authentication information.
In the present embodiment, the processor 21 of the optimization apparatus 1 for the embedding parameters of the copy-protected two-dimensional code at the transmitting end further performs the following operations: embedding the coding authentication information into the coding original information in a whole section to obtain a target bit stream; and converting the target bit stream into a gray value according to a preset modulation mode, and printing and scanning to obtain the initial two-dimensional code.
In the present embodiment, the processor 21 of the optimization apparatus 1 for the embedding parameters of the copy-protected two-dimensional code at the transmitting end further performs the following operations: the first coding mode adopts an RS coding mode, and the second coding mode adopts a BCH coding mode.
In the present embodiment, the processor 21 of the optimization apparatus 1 for the embedding parameters of the copy-protected two-dimensional code at the transmitting end further performs the following operations: the preset modulation mode adopts a pulse amplitude modulation mode.
In this embodiment, it should be understood that the disclosed apparatus may be implemented in other ways. For example, the above-described device embodiments are merely illustrative, and for example, a division of a unit is merely a logical division, and an actual implementation may have another division, for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of some interfaces, devices or units, and may be an electric or other form.
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 units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, each functional unit in the present embodiment may be integrated into one processing unit, each unit may exist alone physically, or two or more units may be integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable memory. Based on such understanding, the technical solution of the present disclosure may be embodied in the form of a software product, which is stored in a memory and includes several 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 disclosure. And the aforementioned memory comprises: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.
The present embodiment discloses a computer-readable storage medium, and those skilled in the art can understand that all or part of the steps in the above-disclosed optimization method for embedded parameters of various anti-copy two-dimensional codes can be implemented by a program (instructions) to instruct related hardware, where the program (instructions) can be stored in a computer-readable memory (storage medium), and the memory can include: flash Memory disks, Read-Only memories (ROMs), Random Access Memories (RAMs), magnetic or optical disks, and the like.
While the present disclosure has been described in detail in connection with the drawings and examples, it should be understood that the above description is not intended to limit the disclosure in any way. Those skilled in the art can make modifications and variations to the present disclosure as needed without departing from the true spirit and scope of the disclosure, which fall within the scope of the disclosure.

Claims (6)

1. An optimization method of embedded parameters of anti-copy two-dimensional codes is characterized in that,
the method comprises the following steps:
preparing original information and authentication information, coding the original information through a first coding mode to obtain coded original information, coding the authentication information through a second coding mode to obtain coded authentication information, embedding the coded authentication information into the coded original information in a whole section to obtain a target bit stream, converting the target bit stream into a gray value according to a preset modulation mode, and printing and scanning to obtain an initial two-dimensional code;
repeatedly printing and scanning the initial two-dimensional code to obtain a plurality of target two-dimensional codes;
on the basis of a plurality of target two-dimensional codes, synthesizing a plurality of preset numbers of target two-dimensional codes into corresponding two-dimensional code synthetic graphs according to a smooth averaging mode to reduce the error rate;
calculating the mean value, the variance and the shape factor of each two-dimensional code composite image, and correcting the mean value, the variance and the shape factor through a correction function to obtain a corrected mean value, a corrected variance and a corrected shape factor;
obtaining a theoretical correction error rate through a generalized Gaussian function based on the correction mean value, the correction variance and the correction shape factor; and is
And comparing the theoretical correction error rate with the error correction capability of the two-dimensional code, and when the theoretical correction error rate is less than or equal to the error correction capability of the two-dimensional code, reducing the error correction capability of the two-dimensional code so as to improve the attack cost of an illegal copying party.
2. The optimization method according to claim 1,
the first coding mode adopts a multilevel error correction coding mode,
the second coding mode adopts a binary error correction coding mode.
3. The optimization method according to claim 1,
the preset modulation mode adopts a pulse amplitude modulation mode.
4. An optimization device for embedded parameters of a copy-proof two-dimensional code is characterized in that,
the method comprises the following steps:
the acquisition module is used for preparing original information and authentication information, coding the original information through a first coding mode to obtain coded original information, coding the authentication information through a second coding mode to obtain coded authentication information, embedding the coded authentication information into the coded original information in a whole section to obtain a target bit stream, converting the target bit stream into a gray value according to a preset modulation mode, and printing and scanning to obtain an initial two-dimensional code;
the printing and scanning module is used for repeatedly printing and scanning the initial two-dimensional code to obtain a plurality of target two-dimensional codes;
the synthesis module is used for synthesizing a plurality of target two-dimensional codes into a corresponding two-dimensional code synthesis image according to a smooth averaging mode so as to reduce the error rate;
the calculation module is used for calculating the mean value, the variance and the shape factor of each two-dimensional code composite image, and correcting the mean value, the variance and the shape factor through a correction function to obtain a corrected mean value, a corrected variance and a corrected shape factor; obtaining a theoretical correction error rate for the correction mean value, the correction variance and the correction shape factor through a generalized Gaussian function; and
and the comparison module is used for comparing the theoretical correction error rate with the error correction capability of the two-dimensional code, and when the theoretical correction error rate is smaller than or equal to the error correction capability of the two-dimensional code, the error correction capability of the two-dimensional code is reduced so as to improve the attack cost of an illegal copying party.
5. The optimization device of claim 4,
the acquisition module adopts a multilevel error correction coding mode for the first coding mode,
and adopting a binary error correction coding mode for the second coding mode.
6. The optimization device of claim 4,
and the acquisition module adopts a pulse amplitude modulation mode to the preset modulation mode.
CN201910083224.6A 2019-01-18 2019-01-18 Method and device for optimizing embedded parameters of anti-copy two-dimensional code Active CN109829529B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910083224.6A CN109829529B (en) 2019-01-18 2019-01-18 Method and device for optimizing embedded parameters of anti-copy two-dimensional code

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910083224.6A CN109829529B (en) 2019-01-18 2019-01-18 Method and device for optimizing embedded parameters of anti-copy two-dimensional code

Publications (2)

Publication Number Publication Date
CN109829529A CN109829529A (en) 2019-05-31
CN109829529B true CN109829529B (en) 2021-05-25

Family

ID=66862734

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910083224.6A Active CN109829529B (en) 2019-01-18 2019-01-18 Method and device for optimizing embedded parameters of anti-copy two-dimensional code

Country Status (1)

Country Link
CN (1) CN109829529B (en)

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101063999B (en) * 2006-04-29 2010-09-15 银河联动信息技术(北京)有限公司 Synthesis system and method of two-dimension code and sign
CA2851809A1 (en) * 2011-07-25 2013-01-31 4Gqr Llc Device and its use for creation, output and management of 2d barcodes with embedded images
CN105095935B (en) * 2015-06-01 2018-07-24 深圳大学 A kind of low-density having merged Chaos Encryption Technology, high coding capacity dot matrix Quick Response Code
CN106203571A (en) * 2016-07-11 2016-12-07 搜油郎成都科技有限公司 Image production method based on Quick Response Code and recognition methods and realize system
CN108229596B (en) * 2016-12-09 2024-03-26 北京大码技术有限公司 Combined two-dimensional code, electronic certificate carrier, generating and reading device and method
CN108345925A (en) * 2017-01-24 2018-07-31 北京大码技术有限公司 Generation, reading method and the device of composite type two-dimensional code
CN206863799U (en) * 2017-05-08 2018-01-09 广州市中崎商业机器股份有限公司 A kind of intelligent express system based on Quick Response Code
CN107909133B (en) * 2017-11-15 2021-01-19 深圳大学 Two-dimensional code generation method, two-dimensional code decoding method and terminal

Also Published As

Publication number Publication date
CN109829529A (en) 2019-05-31

Similar Documents

Publication Publication Date Title
Bulan et al. Orientation modulation for data hiding in clustered-dot halftone prints
US8014557B2 (en) Watermarking electronic text documents
US6763121B1 (en) Halftone watermarking method and system
JP3647405B2 (en) Image processing apparatus and image processing method
JP4719717B2 (en) Image processing apparatus, image processing method, and image processing program
EP2243104A1 (en) Procedure for verifying the integrity of documents
CN109840576A (en) The generation method and coding/decoding method of anti-copying two dimensional code based on segmentation insertion
Bulan et al. High capacity color barcodes: Per channel data encoding via orientation modulation in elliptical dot arrays
CN110033067B (en) Anti-copy two-dimensional code and anti-counterfeiting authentication method of two-dimensional code
US8270728B2 (en) Information processing apparatus and information processing method
JP4143441B2 (en) Information processing method and apparatus, computer program, and computer-readable storage medium
US8396288B2 (en) Information processing apparatus and information processing method for image verification
JP2002344736A (en) Original warrant system for print paper, printer, and verification device
Villán et al. Tamper-proofing of electronic and printed text documents via robust hashing and data-hiding
CN109829529B (en) Method and device for optimizing embedded parameters of anti-copy two-dimensional code
Chen et al. High-quality blind watermarking in halftones using random toggle approach
Bulan et al. Data embedding in hardcopy images via halftone-dot orientation modulation
JP4401578B2 (en) Information processing apparatus and method, and storage medium
JP4978325B2 (en) Image processing apparatus, image processing method and computer program thereof
US20050063018A1 (en) Image processor unit, image processing method, and storage medium
Fei et al. Analysis and design of authentication watermarking
JP3787511B2 (en) Image processing apparatus and image processing method
Chan et al. A survey of information hiding schemes for digital images
Lee et al. Image integrity and correction using parities of error control coding
JP6920719B2 (en) Digital watermarking device and method

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
GR01 Patent grant
GR01 Patent grant