A construction method and system of a copy-resistant hidden two-dimensional code

By retaining the central image pixels in the QR code and filling it with a random image, an uncopyable hidden QR code is generated, solving the problem of easy copying of QR codes and achieving high security and anti-counterfeiting effects.

CN119692380BActive Publication Date: 2026-03-17HUBEI OPTICAL VALLEY CHANGCAI TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-19
Publication Date
2026-03-17

AI Technical Summary

Technical Problem

Existing QR codes have poor security, are easily copied, and lack anti-copying measures.

Method used

The generation of hidden QR codes increases complexity and security by retaining the image pixels in the center of each code element area and filling the rest with random images.

Benefits of technology

The generated hidden QR code is uncopyable, which improves security and is suitable for anti-counterfeiting and identity verification.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119692380B_ABST
    Figure CN119692380B_ABST
Patent Text Reader

Abstract

The application discloses a construction method and system of a hidden two-dimensional code for preventing replication, and the method comprises the following steps: generating an original two-dimensional code, reserving image pixels of a central part of each code element area, filling the remaining part with random images, and obtaining a hidden two-dimensional code.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of QR code construction technology, and more specifically, relates to a method and system for constructing a copy-proof hidden QR code. Background Technology

[0002] A QR code is a black-and-white graphic using specific geometric shapes arranged according to a certain pattern on a two-dimensional plane to record data symbols. It cleverly utilizes the concept of "0" and "1" bit streams, the foundation of computer logic, to represent textual and numerical information using geometric shapes corresponding to binary. It is automatically read by image input devices or photoelectric scanning devices, enabling automatic information processing. QR codes not only share some common characteristics with barcode technology, such as each code system having its specific character set, each character occupying a certain width, and having certain verification functions, but also possess features such as automatic recognition of information in different rows and handling graphic rotation changes.

[0003] QR codes can express information simultaneously in both horizontal and vertical directions, thus conveying a large amount of information within a small area. Based on differences in structure, encoding, and reading methods, QR codes can be broadly classified into two categories: stacked / row-based QR codes and matrix QR codes. Stacked / row-based QR codes are formed by stacking multiple rows of short one-dimensional barcodes, while matrix QR codes are composed of a matrix. In this matrix, dots represent binary "1" and spaces represent binary "0," with the code formed by the arrangement of dots and spaces.

[0004] QR codes have a wide range of applications, including item identification, electronic vouchers, text storage, and navigation. For example, at supermarket checkouts, each item has a unique category number (usually a barcode), which can be quickly scanned to retrieve the price. QR codes have a larger data storage capacity, allowing each item to have a unique QR code (e.g., generated from a product serial number), which can be used for tracking logistics on waybills and for product anti-counterfeiting and traceability. Furthermore, QR codes can serve as unique identifiers for people and events, such as health codes, payment QR codes, and many O2O (online-to-offline) consumption vouchers, requiring electronic verification to ensure identity confirmation between online and offline transactions.

[0005] However, current QR codes have poor security and are easily copied, so there is an urgent need for a technical solution to solve this problem. Summary of the Invention

[0006] To address the above technical problems, this invention proposes a method for constructing an anti-copying hidden QR code, comprising:

[0007] 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.

[0008] Furthermore, it also includes: to facilitate scanning, the positioning area of ​​the original QR code remains unchanged.

[0009] Furthermore, preserving the image grayscale value of the central portion of each symbol region includes: preserving the image pixels of a region representing 1 / 4 to 1 / 2 of the symbol area of ​​the central portion unchanged.

[0010] Furthermore, at most 1 / 9 of the code elements in the central area of ​​the original QR code are filled with random images.

[0011] Furthermore, the hidden QR code is associated with the corresponding product information.

[0012] This invention also proposes a system for constructing anti-copying hidden QR codes, comprising:

[0013] The hidden QR code module is used to generate an original QR code, retaining the image pixels in the center of each code element area, and filling the remaining parts with random images to obtain a hidden QR code.

[0014] Furthermore, it also includes: to facilitate scanning, the positioning area of ​​the original QR code remains unchanged.

[0015] Furthermore, preserving the image grayscale value of the central portion of each symbol region includes: preserving the image pixels of a region representing 1 / 4 to 1 / 2 of the symbol area of ​​the central portion unchanged.

[0016] Furthermore, at most 1 / 9 of the code elements in the central area of ​​the original QR code are filled with random images.

[0017] Furthermore, the hidden QR code is associated with the corresponding product information.

[0018] Compared with the prior art, the above-described technical solutions conceived in this invention have the following beneficial effects:

[0019] The hidden QR code generated by the technical solution provided by this invention can replace the existing QR code to achieve the technical effect of being uncopyable and highly secure. Attached Figure Description

[0020] Figure 1 This is a diagram illustrating the generation process of the hidden QR code in Embodiment 1 of the present invention;

[0021] Figure 2 This is an example of how the same code image is printed twice simultaneously in Embodiment 1 of the present invention, resulting in a detailed difference image.

[0022] Figure 3 This is a detailed difference diagram of the hidden QR code after copying according to Embodiment 1 of the present invention. Detailed Implementation

[0023] To better understand the above technical solutions, the following will provide a detailed explanation of the technical solutions in conjunction with the accompanying drawings and specific implementation methods.

[0024] The method provided by this invention can be implemented in a terminal environment that 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, which is loaded and executed by the processor to implement the method described in the following embodiments.

[0025] A processor may include one or more processing cores. The processor uses various interfaces and lines to connect various parts of the terminal, and performs various functions and processes data by running or executing instructions, programs, code sets or instruction sets stored in the storage medium, and by calling data stored in the storage medium.

[0026] Storage media can include random access memory (RAM) or read-only memory (ROM). Storage media can be used to store instructions, programs, code, code sets, or instructions.

[0027] The display screen is used to show the interactive sections of various applications.

[0028] In the formula of this invention, all subscripts are only used to distinguish parameters and have no actual meaning.

[0029] In addition, those skilled in the art will understand that the structure of the terminal described above does not constitute a limitation on the terminal. The terminal may include more or fewer components, or combine certain components, or have different component arrangements. For example, the terminal may also include radio frequency circuits, input units, sensors, audio circuits, power supplies, and other components, which will not be described in detail here.

[0030] Example 1

[0031] like Figure 1 As shown, this invention proposes a method for constructing an anti-copying hidden QR code, the specific method of which is as follows:

[0032] First, generate a standard QR code. Then, retain the central portion of each code element area, which occupies 1 / 4 or more of the total code element area. Fill the remaining portion with a microscopically rich random image, resulting in a random image with the QR code hidden. To facilitate scanning, the original QR code graphic can be retained in the positioning area.

[0033] The specific steps are as follows:

[0034] 1. Use a standard QR code encoding tool to generate an n-row, n-column standard QR code image (original QR code), containing n*n code elements;

[0035] 2. Reconstruct the image for each symbol: keep the image pixels in the central region that occupies 1 / 4 to 1 / 2 of the symbol area unchanged, and reassign random values ​​to the remaining image pixels;

[0036] Specifically, the chaotic sequence of the reconstructed part is first generated, 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] Where, x i,j Let r be the value of the first chaotic sequence at the i-th row and j-th column position of the part of the original QR code that needs to be reconstructed, and x be the value of the first chaotic sequence. i-1,j The value of the first chaotic sequence at the (i-1)th row and jth column of the original QR code that needs to be reconstructed is y. i,j y represents the second chaotic sequence value at the i-th row and j-th column position of the part of the original QR code that needs to be reconstructed. i-1,j The value of the second chaotic sequence at the (i-1)th row and jth column of the original QR code that needs to be reconstructed is z. i,j The value of the third chaotic sequence at the i-th row and j-th column position of the original QR code that needs to be reconstructed is z. i-1,j The value of the third chaotic sequence at the position of the (i-1)th row and jth column of the part of the original QR code that needs to be reconstructed.

[0041] The reconstructed portion is subjected to convolutional operations 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 The adaptive convolution kernel at the i-th row and j-th column position of the part of the original QR code that needs to be reconstructed, q i+a,j+b Let k be the feature value of the part of the original QR code that needs to be reconstructed, in the (i+a)th row and (j+b)th column. a,b For adaptive convolution kernel K i,j The feature value at position (a, b) is h, where h(q) is the edge detection function. i+a,j+b ) is h(q i+a,j+b )=Δ·q i+a,j+b Δ is the Laplace operator.

[0044] Based on the chaotic sequence, a perturbation matrix is ​​calculated to increase the complexity and security of the QR code, specifically as follows:

[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 Let α be the perturbation value at the i-th row and j-th column position of the part of the original QR code that needs to be reconstructed, β be the weight of the first chaotic sequence, β be the adjustment factor of the first chaotic sequence, γ be the weight of the second chaotic sequence, δ be the adjustment factor of the second chaotic sequence, η be the weight of the comprehensive chaotic sequence, and θ be the adjustment factor of the comprehensive chaotic sequence.

[0047] Based on the adaptive convolution kernel and the perturbation matrix, the parts of the original QR code that need to be reconstructed are reconstructed, specifically as follows:

[0048]

[0049] Where, q′ i,j Let q be the reconstructed feature value of the i-th row and j-th column of the original QR code that needs to be reconstructed. i,j The value represents the feature value in the i-th row and j-th column of the original QR code that needs to be reconstructed; * represents the convolution operation. This is a non-linear operation.

[0050] To increase the complexity of the parts of the original QR code that need 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) represents the perturbation value at the i-th row and j-th column position of the part of the original QR 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 recognition of QR code content by standard QR code recognition programs, the code elements in the positioning area can remain unchanged from the original standard QR code image;

[0054] 4. To enhance the anti-copying effect of QR codes, 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, hidden QR codes, by incorporating random images with rich microscopic texture features, will generate uniquely detailed graphics when printed onto any substrate surface, since no substrate surface can be perfectly smooth. Even when the same image is printed simultaneously on adjacent areas of the same substrate, differences in detail will still occur.

[0056] like Figure 3 As shown, the copied code obtained by directly photocopying the printed hidden QR code will also have subtle differences from the original code.

[0057] Whether it's multiple printings of the same hidden QR code digital image or copying of the printed QR code, it can be identified by capturing and magnifying the image with a digital camera. Therefore, the hidden QR code described in this invention possesses the characteristic of being uncopyable after printing, making it a convenient and quick anti-counterfeiting method, especially for pre-sale anti-counterfeiting. If the image of the printed hidden QR code is captured and saved to a cloud server, its authenticity can be automatically identified using a smartphone or handheld device.

[0058] Example 2

[0059] This invention also proposes a system for constructing a copy-proof hidden QR code, comprising:

[0060] The hidden QR code module is used to generate an original QR code, retaining the image pixels in the center of each code element area, and filling the remaining parts with random images to obtain a hidden QR code.

[0061] Specifically, the chaotic sequence of the reconstructed part is first generated, 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] Where, x i,j Let r be the value of the first chaotic sequence at the i-th row and j-th column position of the part of the original QR code that needs to be reconstructed, and x be the value of the first chaotic sequence. i-1,j The value of the first chaotic sequence at the (i-1)th row and jth column of the original QR code that needs to be reconstructed is y. i,j y represents the second chaotic sequence value at the i-th row and j-th column position of the part of the original QR code that needs to be reconstructed. i-1,j The value of the second chaotic sequence at the (i-1)th row and jth column of the original QR code that needs to be reconstructed is z. i,j The value of the third chaotic sequence at the i-th row and j-th column position of the original QR code that needs to be reconstructed is z. i-1,j The value of the third chaotic sequence at the position of the (i-1)th row and jth column of the part of the original QR code that needs to be reconstructed.

[0066] The reconstructed portion is subjected to convolutional operations 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 The adaptive convolution kernel at the i-th row and j-th column position of the part of the original QR code that needs to be reconstructed, q i+a,j+b Let k be the feature value of the part of the original QR code that needs to be reconstructed, in the (i+a)th row and (j+b)th column. a,b For adaptive convolution kernel K i,j The feature value at position (a, b) is h, where h(q) is the edge detection function. i+a,j+b ) is h(q i+a,j+b )=Δ·q i+a,j+b Δ is the Laplace operator.

[0069] Based on the chaotic sequence, a perturbation matrix is ​​calculated to increase the complexity and security of the QR code, specifically as follows:

[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 Let α be the perturbation value at the i-th row and j-th column position of the part of the original QR code that needs to be reconstructed, β be the weight of the first chaotic sequence, β be the adjustment factor of the first chaotic sequence, γ be the weight of the second chaotic sequence, δ be the adjustment factor of the second chaotic sequence, η be the weight of the comprehensive chaotic sequence, and θ be the adjustment factor of the comprehensive chaotic sequence.

[0072] Based on the adaptive convolution kernel and the perturbation matrix, the parts of the original QR code that need to be reconstructed are reconstructed, specifically as follows:

[0073]

[0074] Where, q′ i,j Let q be the reconstructed feature value of the i-th row and j-th column of the original QR code that needs to be reconstructed. i,j The value represents the feature value in the i-th row and j-th column of the original QR code that needs to be reconstructed; * represents the convolution operation. This is a non-linear operation.

[0075] To increase the complexity of the parts of the original QR code that need 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) represents the perturbation value at the i-th row and j-th column position of the part of the original QR 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, this also includes: to facilitate scanning, the positioning area of ​​the original QR code remains unchanged.

[0079] Specifically, preserving the image grayscale value of the central part of each symbol region includes: preserving the image pixels of a region of 1 / 4 to 1 / 2 symbol area in the central part unchanged.

[0080] Specifically, at most 1 / 9 of the code elements in the central area of ​​the original QR code are filled with random images.

[0081] Specifically, the hidden QR code is associated with the corresponding product information.

[0082] Example 3

[0083] This invention also proposes a storage medium storing multiple instructions for implementing the method for constructing an anti-copying hidden QR code.

[0084] Optionally, in this embodiment, the storage medium may be located in any computer terminal in a group of computer terminals in a computer network, or in any mobile terminal in a group of mobile terminals.

[0085] Optionally, in this embodiment, the storage medium is configured to store program code for performing the following steps: a hidden QR code module, used to generate an original QR code, retaining the image pixels of the center part of each code element area, and filling the remaining parts with random images to obtain a hidden QR code.

[0086] Specifically, the chaotic sequence of the reconstructed part is first generated, 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] Where, x i,j Let r be the value of the first chaotic sequence at the i-th row and j-th column position of the part of the original QR code that needs to be reconstructed, and x be the value of the first chaotic sequence. i-1,j The value of the first chaotic sequence at the (i-1)th row and jth column of the original QR code that needs to be reconstructed is y. i,j y represents the second chaotic sequence value at the i-th row and j-th column position of the part of the original QR code that needs to be reconstructed. i-1,j The value of the second chaotic sequence at the (i-1)th row and jth column of the original QR code that needs to be reconstructed is z. i,j The value of the third chaotic sequence at the i-th row and j-th column position of the original QR code that needs to be reconstructed is z. i-1,j The value of the third chaotic sequence at the position of the (i-1)th row and jth column of the part of the original QR code that needs to be reconstructed.

[0091] The reconstructed portion is subjected to convolutional operations 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 The adaptive convolution kernel at the i-th row and j-th column position of the part of the original QR code that needs to be reconstructed, q i+a,j+b Let k be the feature value of the part of the original QR code that needs to be reconstructed, in the (i+a)th row and (j+b)th column. a,b For adaptive convolution kernel K i,j The feature value at position (a, b) is h, where h(q) is the edge detection function. i+a,j+b ) is h(q i+a,j+b )=Δ·q i+a,j+b Δ is the Laplace operator.

[0094] Based on the chaotic sequence, a perturbation matrix is ​​calculated to increase the complexity and security of the QR code, specifically as follows:

[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 Let α be the perturbation value at the i-th row and j-th column position of the part of the original QR code that needs to be reconstructed, β be the weight of the first chaotic sequence, β be the adjustment factor of the first chaotic sequence, γ be the weight of the second chaotic sequence, δ be the adjustment factor of the second chaotic sequence, η be the weight of the comprehensive chaotic sequence, and θ be the adjustment factor of the comprehensive chaotic sequence.

[0097] Based on the adaptive convolution kernel and the perturbation matrix, the parts of the original QR code that need to be reconstructed are reconstructed, specifically as follows:

[0098]

[0099] Where, q′ i,j Let q be the reconstructed feature value of the i-th row and j-th column of the original QR code that needs to be reconstructed. i,j The value represents the feature value in the i-th row and j-th column of the original QR code that needs to be reconstructed; * represents the convolution operation. This is a non-linear operation.

[0100] To increase the complexity of the parts of the original QR code that need 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) represents the perturbation value at the i-th row and j-th column position of the part of the original QR 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, this also includes: to facilitate scanning, the positioning area of ​​the original QR code remains unchanged.

[0104] Specifically, preserving the image grayscale value of the central part of each symbol region includes: preserving the image pixels of a region of 1 / 4 to 1 / 2 symbol area in the central part unchanged.

[0105] Specifically, at most 1 / 9 of the code elements in the central area of ​​the original QR code are filled with random images.

[0106] Specifically, the hidden QR code is associated with the corresponding product information.

[0107] Example 4

[0108] This invention also proposes an electronic device, including a processor and a storage medium connected to the processor. The storage medium stores multiple instructions, which can be loaded and executed by the processor to enable the processor to execute a method for constructing an anti-copying hidden QR code.

[0109] Specifically, the electronic device in this embodiment can be a computer terminal, which may include one or more processors and a storage medium.

[0110] The storage medium can be used to store software programs and modules, such as the method for constructing an anti-copying hidden QR code in this embodiment of the invention. The corresponding program instructions / modules allow the processor to execute various functional applications and data processing by running the software programs and modules stored in the storage medium, thus realizing the aforementioned method for constructing an anti-copying hidden QR code. The storage medium may include high-speed random access storage media, and may also include non-volatile storage media, 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 storage media remotely configured relative to the processor, which can be connected to the terminal via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.

[0111] The processor can call the information and application stored in the storage medium through the transmission system to execute the following steps: a hidden QR code module, which generates an original QR code, retains the image pixels in the center of each code element area, and fills the remaining parts with random images to obtain a hidden QR code.

[0112] Specifically, the chaotic sequence of the reconstructed part is first generated, 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] Where, x i,j Let r be the value of the first chaotic sequence at the i-th row and j-th column position of the part of the original QR code that needs to be reconstructed, and x be the value of the first chaotic sequence. i-1,j The value of the first chaotic sequence at the (i-1)th row and jth column of the original QR code that needs to be reconstructed is y. i,j y represents the second chaotic sequence value at the i-th row and j-th column position of the part of the original QR code that needs to be reconstructed. i-1,j The value of the second chaotic sequence at the (i-1)th row and jth column of the original QR code that needs to be reconstructed is z. i,j The value of the third chaotic sequence at the i-th row and j-th column position of the original QR code that needs to be reconstructed is z. i-1,j The value of the third chaotic sequence at the position of the (i-1)th row and jth column of the part of the original QR code that needs to be reconstructed.

[0117] The reconstructed portion is subjected to convolutional operations 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 The adaptive convolution kernel at the i-th row and j-th column position of the part of the original QR code that needs to be reconstructed, q i+a,j+b Let k be the feature value of the part of the original QR code that needs to be reconstructed, in the (i+a)th row and (j+b)th column. a,b For adaptive convolution kernel k i,j The feature value at position (a, b) is h, where h(q) is the edge detection function. i+a,j+b ) is h(q i+a,j+b )=Δ·q i+a,j+bΔ is the Laplace operator.

[0120] Based on the chaotic sequence, a perturbation matrix is ​​calculated to increase the complexity and security of the QR code, specifically as follows:

[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 Let α be the perturbation value at the i-th row and j-th column position of the part of the original QR code that needs to be reconstructed, β be the weight of the first chaotic sequence, β be the adjustment factor of the first chaotic sequence, γ be the weight of the second chaotic sequence, δ be the adjustment factor of the second chaotic sequence, η be the weight of the comprehensive chaotic sequence, and θ be the adjustment factor of the comprehensive chaotic sequence.

[0123] Based on the adaptive convolution kernel and the perturbation matrix, the parts of the original QR code that need to be reconstructed are reconstructed, specifically as follows:

[0124]

[0125] Where, q′ i,j Let q be the reconstructed feature value of the i-th row and j-th column of the original QR code that needs to be reconstructed. i,j The value represents the feature value in the i-th row and j-th column of the original QR code that needs to be reconstructed; * represents the convolution operation. This is a non-linear operation.

[0126] To increase the complexity of the parts of the original QR code that need 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) represents the perturbation value at the i-th row and j-th column position of the part of the original QR 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, this also includes: to facilitate scanning, the positioning area of ​​the original QR code remains unchanged.

[0130] Specifically, preserving the image grayscale value of the central part of each symbol region includes: preserving the image pixels of a region of 1 / 4 to 1 / 2 symbol area in the central part unchanged.

[0131] Specifically, at most 1 / 9 of the code elements in the central area of ​​the original QR code are filled with random images.

[0132] Specifically, the hidden QR code is associated with the corresponding product information.

[0133] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0134] In the above embodiments of the present invention, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0135] In the several embodiments provided by this invention, it should be understood that the disclosed technical content can be implemented in other ways. The system embodiments described above are merely illustrative; for example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces, indirect coupling or communication connection of units or modules, and may be electrical or other forms.

[0136] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0137] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0138] If the integrated unit is implemented as 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, in essence, 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. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes: USB flash drives, read-only storage media (ROM), random access storage media (RAM), portable hard drives, magnetic disks, optical disks, and other media capable of storing program code.

[0139] Obviously, the above embodiments are merely illustrative examples for clear explanation and are not intended to limit the implementation. Those skilled in the art will recognize that other variations or modifications can be made based on the above description. It is neither necessary nor possible to exhaustively list all possible implementations here. However, obvious variations or modifications derived therefrom are still within the scope of protection of this invention.

Claims

1. A method for constructing a copy-protected steganographic two-dimensional code, characterized by, The method comprises the following steps: Generating an original two-dimensional code, reconstructing the image of each code element, keeping the image pixels of the area of the part of the code element occupied by the center unchanged, and reassigning random values to the image pixels of the remaining part to obtain a hidden two-dimensional code; The reconstruction comprises the following steps: , , , in, The part of the original QR code that needs to be reconstructed Line number The first chaotic sequence value at the column position, The part of the original QR code that needs to be reconstructed Line number The first chaotic sequence value at the column position, The part of the original QR code that needs to be reconstructed Line number The second chaotic sequence value at the column position, The part of the original QR code that needs to be reconstructed Line number The second chaotic sequence value at the column position, The part of the original QR code that needs to be reconstructed Line number The third chaotic sequence value at the column position, The part of the original QR code that needs to be reconstructed Line number The third chaotic sequence value at the column position; Performing convolution operation on the reconstructed part to extract local features: , wherein, is the feature value of the original two-dimensional code at the position of the row and the column , is the feature value of the original two-dimensional code at the position of the row and the column , is the feature value at the position of the adaptive convolution kernel , h is an edge detection function, and here is: , is a Laplace operator; According to the chaotic sequence, a perturbation matrix is calculated to increase the complexity and security of the two-dimensional code: , wherein, is a first chaotic sequence, is a second chaotic sequence, is a disturbance value at a row, is a weight of the first chaotic sequence, is an adjustment factor of the first chaotic sequence, is a weight of the second chaotic sequence, is an adjustment factor of the second chaotic sequence, is a weight of the integrated chaotic sequence, is an adjustment factor of the integrated chaotic sequence. 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: , wherein, is the reconstructed feature value of the i-th row and j-th column of the portion of the original two-dimensional code that needs to be reconstructed, is the feature value of the i-th row and j-th column of the portion of the original two-dimensional code that needs to be reconstructed, is a convolution operation, is a non-linear operation.

2. The method of claim 1, wherein the method further comprises: Further comprising: In order to facilitate code scanning, the positioning area of the original two-dimensional code remains unchanged.

3. The method of claim 1, wherein the method further comprises: generating a plurality of different types of the hidden two-dimensional code; and selecting one of the plurality of different types of the hidden two-dimensional code to be used as the hidden two-dimensional code. Keeping the image gray value of the center part of each code element area comprises: keeping the image pixels of the area of 1 / 4-1 / 2 code element area of the center part unchanged.

4. The method for constructing an anti-copying hidden QR code as described in claim 1, characterized in that, Fill the center area of the entire original two-dimensional code with random images at most 1 / 9 of the number of code elements.

5. The method for constructing an anti-copying hidden QR code as described in claim 1, characterized in that, The hidden two-dimensional code is associated with the corresponding product information.

6. A construction system of a copy-protected steganographic two-dimensional code, characterized by The method comprises the following steps: A hidden two-dimensional code module is used to generate an original two-dimensional code, reconstruct the image of each code element, keep the image pixels of the area of the part of the code element occupied by the center unchanged, and reassign random values to the image pixels of the remaining part to obtain a hidden two-dimensional code; The reconstruction comprises the following steps: , , , in, The part of the original QR code that needs to be reconstructed Line number The first chaotic sequence value at the column position, The part of the original QR code that needs to be reconstructed Line number The first chaotic sequence value at the column position, The part of the original QR code that needs to be reconstructed Line number The second chaotic sequence value at the column position, The part of the original QR code that needs to be reconstructed Line number The second chaotic sequence value at the column position, The part of the original QR code that needs to be reconstructed Line number The third chaotic sequence value at the column position, The part of the original QR code that needs to be reconstructed Line number The third chaotic sequence value at the column position; Performing convolution operation on the reconstructed part to extract local features: , wherein, is the feature value of the original 2D code at the position of the row and the column , is the feature value of the original 2D code at the position of the row and the column , is the feature value at the position of the adaptive convolution kernel , , is the edge detection function, and , is the Laplace operator; According to the chaotic sequence, a perturbation matrix is calculated to increase the complexity and security of the two-dimensional code: , wherein, is a first chaotic sequence, is a second chaotic sequence, is a third chaotic sequence, is a weight of the first chaotic sequence, is an adjustment factor of the first chaotic sequence, is a weight of the second chaotic sequence, is an adjustment factor of the second chaotic sequence, is a weight of the third chaotic sequence, is an adjustment factor of the third chaotic sequence. 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: , wherein, is a feature value of the reconstructed part of the original two-dimensional code in the i-th row and the j-th column, is a feature value of the reconstructed part of the original two-dimensional code in the i-th row and the j-th column, is a feature value of the reconstructed part of the original two-dimensional code in the i-th row and the j-th column, is a feature value of the reconstructed part of the original two-dimensional code in the i-th row and the j-th column, is a feature value of the reconstructed part of the original two-dimensional code in the i-th row and the j-th column, is a feature value of the reconstructed part of the original two-dimensional code in the i-th row and the j-th column, is a convolution operation, ​ 7. The system for constructing a copy-resistant, steganographic two-dimensional code according to claim 6, wherein Further comprising: In order to facilitate code scanning, the positioning area of the original two-dimensional code remains unchanged.

8. The construction system of claim 6, wherein the second image is a second image of the first image. Keeping the image gray value of the center part of each code element area comprises: keeping the image pixels of the area of 1 / 4-1 / 2 code element area of the center part unchanged.

9. The system for constructing an anti-copying hidden QR code as described in claim 6, characterized in that, Fill the center area of the entire original two-dimensional code with random images at most 1 / 9 of the number of code elements.

10. The construction system of a copy-resistant, steganographic two-dimensional code according to claim 6, characterized by, The hidden two-dimensional code is associated with the corresponding product information.

Citation Information

Patent Citations

  • Method and system for generating halftone 2D code

    CN106682717A

  • Two-dimensional code generation method and a computer readable storage medium

    CN109492735A