Construction method and system of anti-copy hidden two-dimensional code
By retaining the image pixels of the central part of the symbol area in the QR code and filling it with random images, the hidden QR code is solved, and the effect of non-copying and high security is achieved.
Patent Information
- Application Number
- CN202410975492.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-19
- Publication Date
- 2025-03-25
- Estimated Expiration
- 2044-07-19
AI Technical Summary
The existing QR codes are poorly secure and are easily copied, and a technical solution is urgently needed to solve this problem.
By generating an original QR code, retaining image pixels in the center of each symbol area, the remaining part is filled with a random image to obtain a hidden QR code. This method not only increases the complexity of the QR code, but also makes it difficult to copy in detail during printing and copying.
It realizes the non-replicability and high security of the generated hidden QR code, which can replace the existing QR code and provide stronger anti-counterfeiting and identity confirmation functions.
Smart Images

Figure CN119692380A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of two-dimensional code construction, and more specifically, relates to a method and system for constructing an anti-copying hidden two-dimensional code. Background Art
[0002] A QR code is a black and white graphic that uses specific geometric shapes to be distributed in a plane (two-dimensional direction) according to a certain pattern, and is used to record data symbol information. It cleverly uses the concept of "0" and "1" bit streams that constitute the internal logic basis of computers, and uses geometric shapes corresponding to binary to represent textual numerical information. It can be automatically read through image input devices or photoelectric scanning devices to achieve automatic processing of information. The QR code not only has some common features of barcode technology, such as each code system has its own specific character set, each character occupies a certain width, and has a certain verification function, but also has the characteristics of automatically identifying information in different rows and processing graphic rotation changes.
[0003] Two-dimensional codes can express information in both horizontal and vertical directions at the same time, so they can express a large amount of information in a very small area. According to the different structures, encoding and reading methods, two-dimensional codes can be divided into two categories: stacked / row-by-row two-dimensional barcodes and matrix two-dimensional barcodes. Stacked / row-by-row two-dimensional barcodes are formed by stacking multiple rows of short one-dimensional barcodes, while matrix two-dimensional barcodes are composed of matrices. "Dots" are used to represent binary "1" and "spaces" are used to represent binary "0" at the corresponding element positions in the matrix. The code is composed of the arrangement of "dots" and "spaces".
[0004] QR codes are widely used, including item identification, electronic vouchers, text storage, jump nodes, etc. For example, when checking out at a supermarket, each item will correspond to a unique category number (usually a barcode), and the price of the item can be quickly retrieved by scanning the barcode gun. QR codes have a larger data storage capacity, so each item can uniquely correspond to a QR code (for example, a QR code is generated by a product serial number), and are used in, for example, checking logistics on express delivery orders and anti-counterfeiting and tracing of goods. In addition, QR codes can also be used as the "unique identity" of people and events, such as payment QR codes and many O2O online and offline consumption vouchers, which need to be proved by an electronic voucher to ensure identity confirmation between online and offline.
[0005] However, current QR codes have poor security and are easily copied, so a technical solution is urgently needed to solve this problem. Summary of the invention
[0006] In order to solve the above technical problems, the present invention proposes a method for constructing an anti-copying hidden two-dimensional code, comprising:
[0007] Generate an original QR code, retain the image pixels in the center of each code element area, and fill the rest with random images to obtain a hidden QR code.
[0008] Furthermore, it also includes: in order to facilitate code scanning, the positioning area of the original two-dimensional code remains unchanged.
[0009] Furthermore, retaining the image grayscale value of the central part of each symbol area includes: retaining the image pixels of an area of 1 / 4-1 / 2 of the symbol area of the central part unchanged.
[0010] Furthermore, at most 1 / 9 of the number of code elements in the central area of the entire original two-dimensional code is filled with random images.
[0011] Furthermore, the hidden QR code is associated with corresponding product information.
[0012] The present invention also proposes a system for constructing a copy-proof hidden two-dimensional code, comprising:
[0013] The hidden QR code module is used to generate an original QR code, retain the image pixels in the center of each code element area, and fill the remaining parts with random images to obtain a hidden QR code.
[0014] Furthermore, it also includes: in order to facilitate code scanning, the positioning area of the original two-dimensional code remains unchanged.
[0015] Furthermore, retaining the image grayscale value of the central part of each symbol area includes: retaining the image pixels of an area of 1 / 4-1 / 2 of the symbol area of the central part unchanged.
[0016] Furthermore, at most 1 / 9 of the number of code elements in the central area of the entire original two-dimensional code is filled with random images.
[0017] Furthermore, the hidden QR code is associated with corresponding product information.
[0018] Compared with the prior art, the above technical solution conceived by the present invention has the following beneficial effects:
[0019] The hidden two-dimensional code generated by the technical solution provided by the present invention can replace the existing two-dimensional code to achieve the technical effect of being non-copyable and highly secure. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] Figure 1 is a diagram of the generation process of the hidden two-dimensional code of Example 1 of the present invention;
[0021] Figure 2 The same code image of embodiment 1 of the present invention is printed twice at the same time to generate a detail difference map;
[0022] Figure 3 This is a detailed difference diagram after the hidden two-dimensional code of Example 1 of the present invention is copied. DETAILED DESCRIPTION
[0023] In order to better understand the above technical solution, the above technical solution will be described in detail below in conjunction with the accompanying drawings and specific implementation methods.
[0024] The method provided by the present invention can be implemented in the following terminal environment, and the terminal may include one or more of the following components: a processor, a storage medium, and a display screen. The storage medium stores at least one instruction, and the instruction is loaded and executed by the processor to implement the method described in the following embodiment.
[0025] The processor may include one or more processing cores. The processor uses various interfaces and lines to connect various parts in the entire terminal, and executes various functions of the terminal and processes data by running or executing instructions, programs, code sets or instruction sets stored in the storage medium, and calling data stored in the storage medium.
[0026] The storage medium may include a random access memory (RAM) or a read-only memory (ROM). The storage medium may be used to store instructions, programs, codes, code sets or instructions.
[0027] The display is used to show the interactive cross-section of each application.
[0028] All subscripts in the formulas of the present invention are only used to distinguish parameters and have no actual meaning.
[0029] In addition, those skilled in the art can understand that the structure of the above terminal does not constitute a limitation on the terminal, and the terminal may include more or fewer components, or combine certain components, or arrange the components differently. For example, the terminal also includes components such as a radio frequency circuit, an input unit, a sensor, an audio circuit, and a power supply, which will not be described in detail here.
[0030] Example 1
[0031] like Figure 1 As shown, the present invention proposes a method for constructing an anti-copying hidden two-dimensional code, and the specific method is as follows:
[0032] First, generate a required ordinary QR code, then keep the central image pixels of each code element area that accounts for 1 / 4 or more of the entire code element area, and fill the remaining part with a random image with rich microscopic texture, and you will get a random image with a hidden QR code. For the convenience of scanning, the positioning area can keep the original QR code image.
[0033] The specific steps are as follows:
[0034] 1. Use a standard QR code encoding tool to generate a standard QR code image (original QR code) with n rows and n columns, containing n*n code elements;
[0035] 2. Reconstruct the image of each symbol: keep the image pixels in the center area occupying 1 / 4-1 / 2 of the symbol area unchanged, and reassign random values to the remaining image pixels;
[0036] Specifically, first generate the chaotic sequence of the reconstructed part, as shown below:
[0037] x i,j = r·x i-1,j ·(1-x i-1,j )
[0038]
[0039] z i,j = sin(π·z i-1,j )
[0040] Among them, x i,j is the first chaotic sequence value at the position of the i-th row and the j-th column of the original two-dimensional code to be reconstructed, r is, x i-1,j is the first chaotic sequence value at the position of the jth column in the i-1th row of the original two-dimensional code to be reconstructed, y i,j is the second chaotic sequence value at the position of the i-th row and the j-th column of the original two-dimensional code to be reconstructed, y i-1,j is the second chaotic sequence value at the position of the jth column in the i-1th row of the original two-dimensional code to be reconstructed, z i,j is the third chaotic sequence value at the position of the i-th row and the j-th column of the original two-dimensional code to be reconstructed, z i-1,j It is the third chaotic sequence value at the position of the jth column in the i-1th row of the part of the original two-dimensional code that needs to be reconstructed.
[0041] Perform convolution operation on the reconstructed part to extract local features, specifically:
[0042] K i,j ={k a,b |k a,b =h(q i+a,j+b )}
[0043] Among them, K i,j is the adaptive convolution kernel at the position of the i-th row and j-th column of the original two-dimensional code to be reconstructed, q i+a,j+b is the eigenvalue of the i+ath row and j+bth column of the original QR code to be reconstructed, k a,b is the adaptive convolution kernel K i,j The eigenvalue at position (a, b) in the middle, h is the edge detection function, where h(q i+a,j+b ) is h(q i+a,j+b )=Δ·q i+a,j+b , Δ is the Laplace operator.
[0044] According to the chaotic sequence, the perturbation matrix is calculated to increase the complexity and security of the QR code. Specifically:
[0045] D i,j =α·sin(β·x i,j )+γ·cos(δ·y i,j )+η·sin(θ·x i,j ·y i,j ·z i,j )
[0046] Among them, D i,j is the disturbance value at the i-th row and j-th column position of the part of the original two-dimensional code that needs to be reconstructed, α is the weight of the first chaotic sequence, β is the adjustment factor of the first chaotic sequence, γ is the weight of the second chaotic sequence, δ is the adjustment factor of the second chaotic sequence, η is the weight of the comprehensive chaotic sequence, and θ is the adjustment factor of the comprehensive chaotic sequence.
[0047] According to the adaptive convolution kernel and the perturbation matrix, the part of the original two-dimensional code that needs to be reconstructed is reconstructed, specifically:
[0048]
[0049] Among them, q′ i,j is the reconstructed feature value of the i-th row and j-th column of the original two-dimensional code to be reconstructed, q i,j is the eigenvalue of the i-th row and j-th column of the original QR code to be reconstructed, * is the convolution operation, It is a non-linear operation.
[0050] In order to increase the complexity of the part of the original two-dimensional code that needs to be reconstructed, the perturbation matrix is improved to a dynamic perturbation matrix, as follows:
[0051] D i,j (t)=α·sin(β·x i,j +ω·t)+γ·cos(δ·y i,j +φ·t)+η·sin(θ·x i,j·y i,j ·z i,j +κ·t)
[0052] Among them, D i,j (t) is the disturbance value at the i-th row and j-th column position of the original two-dimensional code that needs to be reconstructed at time t, ω is the first time adjustment factor, φ is the second time adjustment factor, and κ is the third time adjustment factor.
[0053] 3. To facilitate the standard QR code recognition program to identify the QR code content, the code element in the positioning area can keep the original standard QR code image unchanged;
[0054] 4. In order to increase the anti-copying effect of the QR code, up to 1 / 9 of the code elements in the central area of the entire QR code can be replaced with random images.
[0055] like Figure 2 As shown in the figure, hidden QR codes are a combination of random images with rich microscopic texture features. When printed on any substrate surface, they will generate graphics with unique details, as the substrate surface cannot be completely smooth. Even if the same image is printed on adjacent areas of the same substrate at the same time, there will be differences in details.
[0056] like Figure 3 As shown, the copied code obtained by directly copying the printed hidden QR code will also have detail differences with the original code.
[0057] Whether it is multiple printings of the same hidden QR code digital image or the duplication of the printed QR code, a digital camera can be used to capture and enlarge the image for identification. Therefore, the hidden QR code of the present invention has the characteristic of being non-copyable after printing, and can be used as a convenient and fast anti-counterfeiting means, especially pre-sale anti-counterfeiting. If the collected image of the printed hidden QR code is saved to a cloud server, then a smart phone or handheld device can be used to automatically identify the authenticity.
[0058] Example 2
[0059] The embodiment of the present invention further provides a system for constructing a copy-proof hidden two-dimensional code, comprising:
[0060] The hidden QR code module is used to generate an original QR code, retain the image pixels in the center of each code element area, and fill the remaining parts with random images to obtain a hidden QR code.
[0061] Specifically, first generate the chaotic sequence of the reconstructed part, as shown below:
[0062] x i,j = r·x i-1,j ·(1-x i-1,j )
[0063]
[0064] z i,j = sin(π·z i-1,j )
[0065] Among them, x i,j is the first chaotic sequence value at the position of the i-th row and the j-th column of the original two-dimensional code to be reconstructed, r is, x i-1,j is the first chaotic sequence value at the position of the jth column in the i-1th row of the original two-dimensional code to be reconstructed, y i,j is the second chaotic sequence value at the position of the i-th row and the j-th column of the original two-dimensional code to be reconstructed, y i-1,j is the second chaotic sequence value at the position of the jth column in the i-1th row of the original two-dimensional code to be reconstructed, z i,j is the third chaotic sequence value at the position of the i-th row and the j-th column of the original two-dimensional code to be reconstructed, z i-1,j It is the third chaotic sequence value at the position of the jth column in the i-1th row of the part of the original two-dimensional code that needs to be reconstructed.
[0066] Perform convolution operation on the reconstructed part to extract local features, specifically:
[0067] K i,j ={k a,b |k a,b =h(q i+a,j+b )}
[0068] Among them, K i,j is the adaptive convolution kernel at the position of the i-th row and j-th column of the original two-dimensional code to be reconstructed, q i+a,j+b is the eigenvalue of the i+ath row and j+bth column of the original QR code to be reconstructed, k a,b is the adaptive convolution kernel K i,j The eigenvalue at position (a, b) in the middle, h is the edge detection function, where h(q i+a,j+b ) is h(q i+a,j+b )=Δ·q i+a,j+b , Δ is the Laplace operator.
[0069] According to the chaotic sequence, the perturbation matrix is calculated to increase the complexity and security of the QR code. Specifically:
[0070] D i,j =α·sin(β·x i,j )+γ·cos(δ·y i,j )+η·sin(θ·x i,j ·y i,j ·z i,j )
[0071] Among them, D i,j is the disturbance value at the i-th row and j-th column position of the part of the original two-dimensional code that needs to be reconstructed, α is the weight of the first chaotic sequence, β is the adjustment factor of the first chaotic sequence, γ is the weight of the second chaotic sequence, δ is the adjustment factor of the second chaotic sequence, η is the weight of the comprehensive chaotic sequence, and θ is the adjustment factor of the comprehensive chaotic sequence.
[0072] According to the adaptive convolution kernel and the perturbation matrix, the part of the original two-dimensional code that needs to be reconstructed is reconstructed, specifically:
[0073]
[0074] Among them, q′ i,j is the reconstructed feature value of the i-th row and j-th column of the original two-dimensional code to be reconstructed, q i,j is the eigenvalue of the i-th row and j-th column of the original QR code to be reconstructed, * is the convolution operation, It is a non-linear operation.
[0075] In order to increase the complexity of the part of the original two-dimensional code that needs to be reconstructed, the perturbation matrix is improved to a dynamic perturbation matrix, as follows:
[0076] D i,j (t)=α·sin(β·x i,j +ω·t)+γ·cos(δ·y i,j +φ·t)+η·sin(θ·x i,j ·y i,j ·z i,j +κ·t)
[0077] Among them, D i,j (t) is the disturbance value at the i-th row and j-th column position of the original two-dimensional code that needs to be reconstructed at time t, ω is the first time adjustment factor, φ is the second time adjustment factor, and κ is the third time adjustment factor.
[0078] Specifically, it also includes: in order to facilitate code scanning, the positioning area of the original two-dimensional code remains unchanged.
[0079] Specifically, retaining the image grayscale value of the central part of each symbol area includes: retaining the image pixels of an area of 1 / 4-1 / 2 of the symbol area of the central part unchanged.
[0080] Specifically, at most 1 / 9 of the number of code elements in the central area of the entire original two-dimensional code is filled with random images.
[0081] Specifically, the hidden two-dimensional code is associated with corresponding product information.
[0082] Example 3
[0083] The embodiment of the present invention further provides a storage medium storing a plurality of instructions, wherein the instructions are used to implement the method for constructing a copy-proof hidden two-dimensional code.
[0084] Optionally, in this embodiment, the above storage medium may be located in any computer terminal in a computer terminal group in a computer network, or in any mobile terminal in a mobile terminal group.
[0085] Optionally, in this embodiment, the storage medium is configured to store program codes for executing the following steps: a hidden QR code module is used to generate an original QR code, retain the image pixels in the center part of each code element area, and fill the remaining part with random images to obtain a hidden QR code.
[0086] Specifically, first generate the chaotic sequence of the reconstructed part, as shown below:
[0087] x i,j = r·x i-1,j ·(1-x i-1,j )
[0088]
[0089] z i,j = sin(π·z i-1,j )
[0090] Among them, x i,j is the first chaotic sequence value at the position of the i-th row and the j-th column of the original two-dimensional code to be reconstructed, r is, x i-1,j is the first chaotic sequence value at the position of the jth column in the i-1th row of the original two-dimensional code to be reconstructed, y i,j is the second chaotic sequence value at the position of the i-th row and the j-th column of the original two-dimensional code to be reconstructed, y i-1,j is the second chaotic sequence value at the position of the jth column in the i-1th row of the original two-dimensional code to be reconstructed, z i,j is the third chaotic sequence value at the position of the i-th row and the j-th column of the original two-dimensional code to be reconstructed, z i-1,j It is the third chaotic sequence value at the position of the jth column in the i-1th row of the part of the original two-dimensional code that needs to be reconstructed.
[0091] Perform convolution operation on the reconstructed part to extract local features, specifically:
[0092] K i,j ={k a,b |k a,b =h(q i+a,j+b )}
[0093] Among them, Ki,j is the adaptive convolution kernel at the position of the i-th row and j-th column of the original two-dimensional code to be reconstructed, q i+a,j+b is the eigenvalue of the i+ath row and j+bth column of the original QR code to be reconstructed, k a,b is the adaptive convolution kernel K i,j The eigenvalue at position (a, b) in the middle, h is the edge detection function, where h(q i+a,j+b ) is h(q i+a,j+b )=Δ·q i+a,j+b , Δ is the Laplace operator.
[0094] According to the chaotic sequence, the perturbation matrix is calculated to increase the complexity and security of the QR code. Specifically:
[0095] D i,j =α·sin(β·x i,j )+γ·cos(δ·y i,j )+η·sin(θ·x i,j ·y i,j ·z i,j )
[0096] Among them, D i,j is the disturbance value at the i-th row and j-th column position of the part of the original two-dimensional code that needs to be reconstructed, α is the weight of the first chaotic sequence, β is the adjustment factor of the first chaotic sequence, γ is the weight of the second chaotic sequence, δ is the adjustment factor of the second chaotic sequence, η is the weight of the comprehensive chaotic sequence, and θ is the adjustment factor of the comprehensive chaotic sequence.
[0097] According to the adaptive convolution kernel and the perturbation matrix, the part of the original two-dimensional code that needs to be reconstructed is reconstructed, specifically:
[0098]
[0099] Among them, q′ i,j is the reconstructed feature value of the i-th row and j-th column of the original two-dimensional code to be reconstructed, q i,j is the eigenvalue of the i-th row and j-th column of the original QR code to be reconstructed, * is the convolution operation, It is a non-linear operation.
[0100] In order to increase the complexity of the part of the original two-dimensional code that needs to be reconstructed, the perturbation matrix is improved to a dynamic perturbation matrix, as follows:
[0101] D i,j (t)=α·sin(β·x i,j +ω·t)+γ·cos(δ·y i,j +φ·t)+η·sin(θ·x i,j ·y i,j·z i,j +κ·t)
[0102] Among them, D i,j (t) is the disturbance value at the i-th row and j-th column position of the original two-dimensional code that needs to be reconstructed at time t, ω is the first time adjustment factor, φ is the second time adjustment factor, and κ is the third time adjustment factor.
[0103] Specifically, it also includes: in order to facilitate code scanning, the positioning area of the original two-dimensional code remains unchanged.
[0104] Specifically, retaining the image grayscale value of the central part of each symbol area includes: retaining the image pixels of an area of 1 / 4-1 / 2 of the symbol area of the central part unchanged.
[0105] Specifically, at most 1 / 9 of the number of code elements in the central area of the entire original two-dimensional code is filled with random images.
[0106] Specifically, the hidden two-dimensional code is associated with corresponding product information.
[0107] Example 4
[0108] An embodiment of the present invention also proposes an electronic device, including a processor and a storage medium connected to the processor, wherein the storage medium stores multiple instructions, which can be loaded and executed by the processor so that the processor can execute a method for constructing an anti-copying hidden QR code.
[0109] Specifically, the electronic device of this embodiment may be a computer terminal, and the computer terminal may include: one or more processors, and a storage medium.
[0110] Among them, the storage medium can be used to store software programs and modules, such as a method for constructing a copy-proof hidden two-dimensional code in an embodiment of the present invention, and corresponding program instructions / modules. The processor executes various functional applications and data processing by running the software programs and modules stored in the storage medium, that is, realizing the above-mentioned method for constructing a copy-proof hidden two-dimensional code. The storage medium may include a high-speed random storage medium, and may also include a non-volatile storage medium, such as one or more magnetic storage systems, flash memory, or other non-volatile solid-state storage media. In some instances, the storage medium may further include a storage medium remotely arranged relative to the processor, and these remote storage media may be connected to the terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0111] The processor can call the information and application stored in the storage medium through the transmission system to execute the steps: the hidden QR code module is used to generate an original QR code, retain the image pixels in the center part of each code element area, and fill the remaining part with random images to obtain a hidden QR code.
[0112] Specifically, first generate the chaotic sequence of the reconstructed part, as shown below:
[0113] x i,j = r·x i-1,j ·(1-x i-1,j )
[0114]
[0115] z i,j = sin(π·z i-1,j )
[0116] Among them, x i,j is the first chaotic sequence value at the position of the i-th row and the j-th column of the original two-dimensional code to be reconstructed, r is, x i-1,j is the first chaotic sequence value at the position of the jth column in the i-1th row of the original two-dimensional code to be reconstructed, y i,j is the second chaotic sequence value at the position of the i-th row and the j-th column of the original two-dimensional code to be reconstructed, y i-1,j is the second chaotic sequence value at the position of the jth column in the i-1th row of the original two-dimensional code to be reconstructed, z i,j is the third chaotic sequence value at the position of the i-th row and the j-th column of the original two-dimensional code to be reconstructed, z i-1,j It is the third chaotic sequence value at the position of the jth column in the i-1th row of the part of the original two-dimensional code that needs to be reconstructed.
[0117] Perform convolution operation on the reconstructed part to extract local features, specifically:
[0118] K i,j ={k a,b |k a,b =h(q i+a,j+b )}
[0119] Among them, K i,j is the adaptive convolution kernel at the position of the i-th row and j-th column of the original two-dimensional code to be reconstructed, q i+a,j+b is the eigenvalue of the i+ath row and j+bth column of the original QR code to be reconstructed, k a,b is the adaptive convolution kernel k i,j The eigenvalue at position (a, b) in the middle, h is the edge detection function, where h(q i+a,j+b ) is h(q i+a,j+b )=Δ·q i+a,j+b, Δ is the Laplace operator.
[0120] According to the chaotic sequence, the perturbation matrix is calculated to increase the complexity and security of the QR code. Specifically:
[0121] D i,j =α·sin(β·x i,j )+γ·cos(δ·y i,j )+η·sin(θ·x i,j ·y i,j ·z i,j )
[0122] Among them, D i,j is the disturbance value at the i-th row and j-th column position of the part of the original two-dimensional code that needs to be reconstructed, α is the weight of the first chaotic sequence, β is the adjustment factor of the first chaotic sequence, γ is the weight of the second chaotic sequence, δ is the adjustment factor of the second chaotic sequence, η is the weight of the comprehensive chaotic sequence, and θ is the adjustment factor of the comprehensive chaotic sequence.
[0123] According to the adaptive convolution kernel and the perturbation matrix, the part of the original two-dimensional code that needs to be reconstructed is reconstructed, specifically:
[0124]
[0125] Among them, q′ i,j is the reconstructed feature value of the i-th row and j-th column of the original two-dimensional code to be reconstructed, q i,j is the eigenvalue of the i-th row and j-th column of the original QR code to be reconstructed, * is the convolution operation, It is a non-linear operation.
[0126] In order to increase the complexity of the part of the original two-dimensional code that needs to be reconstructed, the perturbation matrix is improved to a dynamic perturbation matrix, as follows:
[0127] D i,j (t)=α·sin(β·x i,j +ω·t)+γ·cos(δ·y i,j +φ·t)+η·sin(θ·x i,j ·y i,j ·z i,j +κ·t)
[0128] Among them, D i,j (t) is the disturbance value at the i-th row and j-th column position of the original two-dimensional code that needs to be reconstructed at time t, ω is the first time adjustment factor, φ is the second time adjustment factor, and κ is the third time adjustment factor.
[0129] Specifically, it also includes: in order to facilitate code scanning, the positioning area of the original two-dimensional code remains unchanged.
[0130] Specifically, retaining the image grayscale value of the central part of each symbol area includes: retaining the image pixels of an area of 1 / 4-1 / 2 of the symbol area of the central part unchanged.
[0131] Specifically, at most 1 / 9 of the number of code elements in the central area of the entire original two-dimensional code is filled with random images.
[0132] Specifically, the hidden two-dimensional code is associated with corresponding product information.
[0133] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0134] In the above embodiments of the present invention, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0135] In the several embodiments provided by the present invention, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the system embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0136] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0137] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0138] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, read-only storage medium (ROM, Read-Only Memory), random access storage medium (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk and other media that can store program codes.
[0139] Obviously, the above embodiments are merely examples for the purpose of clear explanation, and are not intended to limit the implementation methods. For those skilled in the art, other different forms of changes or modifications can be made based on the above description. It is not necessary and impossible to list all the implementation methods here. The obvious changes or modifications derived therefrom are still within the scope of protection of the invention.
Claims
1. A method for constructing a copy-proof hidden two-dimensional code, characterized in that: include: Generate an original QR code, retain the image pixels in the center of each code element area, and fill the rest with random images to obtain a hidden QR code.
2. A method for constructing a copy-proof hidden two-dimensional code as claimed in claim 1, characterized in that: Also includes: In order to facilitate code scanning, the positioning area of the original QR code remains unchanged.
3. A method for constructing a copy-proof hidden two-dimensional code as claimed in claim 1, characterized in that: Retaining the image grayscale value of the central part of each code element area includes: retaining the image pixels of an area of 1 / 4-1 / 2 of the code element area of the central part unchanged.
4. The method for constructing a copy-proof hidden two-dimensional code according to claim 1, characterized in that: The central area of the entire original two-dimensional code is filled with no more than 1 / 9 of the number of code elements using random images.
5. The method for constructing a copy-proof hidden two-dimensional code according to claim 1, characterized in that: The hidden two-dimensional code is associated with corresponding product information.
6. A system for constructing a copy-proof hidden two-dimensional code, characterized in that: include: The hidden QR code module is used to generate an original QR code, retain the image pixels in the center of each code element area, and fill the remaining parts with random images to obtain a hidden QR code.
7. A system for constructing a copy-proof hidden two-dimensional code as claimed in claim 6, characterized in that: Also includes: In order to facilitate code scanning, the positioning area of the original QR code remains unchanged.
8. A system for constructing a copy-proof hidden two-dimensional code as claimed in claim 6, characterized in that: Retaining the image grayscale value of the central part of each code element area includes: retaining the image pixels of an area of 1 / 4-1 / 2 of the code element area of the central part unchanged.
9. A system for constructing a copy-proof hidden two-dimensional code as claimed in claim 6, characterized in that: The central area of the entire original two-dimensional code is filled with no more than 1 / 9 of the number of code elements using random images.
10. A system for constructing a copy-proof hidden two-dimensional code as claimed in claim 6, characterized in that: The hidden two-dimensional code is associated with corresponding product information.
Citation Information
Patent Citations
Two-dimensional code generation method and decoding method and device
CN106529633A
Method and system for generating halftone 2D code
CN106682717A
Transparent QR code generation method and device
CN108073964A
Two-dimensional code generation method and a computer readable storage medium
CN109492735A
Chaotic encryption method based on variational auto-encoder, application, computer equipment and storage medium
CN114915398A