Special code system technology based on dot matrix relation and applied to article coding field
Through special code system technology based on lattice relationships, dynamic masks and space filling curves are used to generate high-density and strong anti-interference lattice code images, solving the problem of fixed density and insufficient anti-interference ability of traditional QR code encoding, and achieving efficient anti-counterfeiting and data security.
Patent Information
- Application Number
- CN202510166558.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-14
- Publication Date
- 2025-06-06
AI Technical Summary
Traditional QR codes have problems with fixed encoding density and insufficient anti-interference ability, which leads to their ease of copying and forging, resulting in the proliferation of counterfeit and shoddy products on the market.
Special code system technology based on lattice relationships, including encoding algorithms and decoding algorithms, is used to generate high-density and strong anti-interference lattice code images through the combination of dynamic masks, Hilbert curves and z-order curves.
It realizes the highly randomized distribution characteristics of the encoded images, which are difficult to copy and crack, improves information density and recognition accuracy, and ensures data security and anti-counterfeiting effect.
Smart Images

Figure CN120106113A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of information coding technology, in particular to a special coding technology based on dot matrix relationship applied in the field of article coding. Background Art
[0002] With the development of science and technology, traditional anti-counterfeiting technologies such as barcodes and QR codes have gradually been unable to meet the growing demand for anti-counterfeiting. Traditional QR codes have problems such as fixed coding density and insufficient anti-interference ability. These technologies are easy to copy and forge, resulting in the proliferation of counterfeit and shoddy products on the market, causing huge losses to brands. The main problems faced by brands include but are not limited to counterfeit products, cross-selling, and unknown product sources. These problems not only harm the interests of consumers, but also seriously affect the market reputation and economic interests of the brand. Therefore, we propose a special code system technology based on dot matrix relationship applied to the field of item coding to solve the above problems.
[0003] The above information disclosed in this background technology is only used to increase the understanding of the background technology of the present invention and therefore, it may include information that does not constitute the prior art known to a person of ordinary skill in the art. Summary of the invention
[0004] The purpose of the present invention is to provide a special coding technology based on dot matrix relationship applied to the field of article coding, so as to solve the problems of fixed coding density and insufficient anti-interference ability of traditional two-dimensional codes.
[0005] To achieve the above object, the present invention provides the following technical solution: a special code system technology based on dot matrix relationship applied to the field of article coding, including an encoding algorithm and a decoding algorithm, wherein the encoding algorithm includes the following steps:
[0006] Step 1: Data Preprocessing
[0007] Input the original coded data, generate decimal ciphertext data through encryption algorithm, convert the ciphertext data into binary stream, add version identification bit and append CRC-16 checksum to generate seed key;
[0008] Step 2: Dynamic mask generation
[0009] Use the SHA-256 hash algorithm to process the seed key, generate a 32-byte chaotic sequence as the mask parameter, and generate a dynamic mask according to the formula M_i=(K_i XOR K_{i+16})mod 8;
[0010] Step 3: Space Filling Mapping
[0011] Apply Hilbert curve and z-order curve for space filling, determine the binary flow and curve type of the multidimensional coordinates of each data point, apply dynamic masking, and generate a set of lattice coordinates;
[0012] Step 4: Graphical Coding
[0013] Map the coordinate set to a scalable vector graphic, add positioning marks and error-tolerant areas, and generate the corresponding dot-code image;
[0014] The decoding algorithm comprises the following steps:
[0015] Step 1: Image Preprocessing
[0016] Binarize the dot code image, identify the positioning mark, and normalize the coordinate system;
[0017] Step 2: Parameter extraction
[0018] Read the version identification bit and determine the curve type, and parse the initial value of the chaotic sequence according to the mask synchronization bit;
[0019] Step 3: Reverse mapping
[0020] Calculate the traversal sequence number according to the corresponding curve type, extract the original data bits, and reconstruct the binary stream;
[0021] Step 4: Data Validation
[0022] Verify CRC-16 integrity, identify error locations and perform error correction.
[0023] Preferably, in step 1 of the encoding algorithm, the original encoded data uses 20-bit pure numbers, and the encryption algorithm uses the RSA encryption algorithm.
[0024] Preferably, the specific steps of step 3 of the encoding algorithm are:
[0025] def coordinate generation (binary stream, curve type):
[0026] Block size = ceil(sqrt(len(stream) / 2))
[0027] Initialize N-order space-filling curve
[0028] For each 2-bit data segment:
[0029] Apply dynamic mask: data' = data XOR current mask value
[0030] Assign point coordinates in the order of curve traversal
[0031] Record (x,y) coordinates and data values
[0032] return the point coordinate set.
[0033] Preferably, the specific steps of step 3 of the decoding algorithm are:
[0034] For each coordinate point:
[0035] Calculate the traversal sequence number according to the corresponding curve type
[0036] Extract original data bits = read value XOR mask sequence
[0037] Reassemble binary stream.
[0038] Compared with the prior art, the present invention has the following beneficial effects:
[0039] (1) The present invention adopts dynamic mask technology, which enables the same data to generate different coding forms, making the coded image non-repetitive and impossible to copy. It has a highly random distribution characteristic and is effectively resistant to malicious cracking. This provides the product with extremely high concealment, making it difficult for counterfeiters to discover and copy.
[0040] (2) The present invention uses Hilbert curve and z-order curve for space filling. The hyperbolic mechanism greatly improves the coding density, maximizes the information density, ensures the printing stability, and thus improves the recognition accuracy.
[0041] (3) The present invention uses a data format that cannot be parsed by unauthorized devices. It requires both the mask algorithm and the spatial mapping rule to be cracked in order to be decoded, thereby ensuring the security of the data and preventing the risk of data leakage and tampering.
[0042] (4) The coding technology of the present invention can be applied over a large area or in multiple parts of a product, thus providing flexible and diverse anti-counterfeiting solutions.
[0043] The above summary is for illustrative purposes only and is not intended to be limiting in any way. In addition to the illustrative aspects, embodiments and features described above, further aspects, embodiments and features of the present invention will be readily apparent by reference to the accompanying drawings and the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] Figure 1 This is a schematic diagram of the coding algorithm flow of the present invention;
[0045] Figure 2 The figure is a flowchart of the decoding algorithm of the present invention. DETAILED DESCRIPTION
[0046] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0047] A special code technology based on dot matrix relationship applied to the field of article coding, including encoding algorithm and decoding algorithm. The encoding algorithm includes the following steps:
[0048] Step 1: Data Preprocessing
[0049] Input the original coded data, generate decimal ciphertext data through encryption algorithm, and convert the ciphertext data into binary stream;
[0050] The original coded data uses 20-bit pure numbers, and the encryption algorithm uses the RSA encryption algorithm;
[0051] Add the version identification bit and append the CRC-16 checksum to generate the seed key;
[0052] Step 2: Dynamic mask generation
[0053] Use the SHA-256 hash algorithm to process the seed key, generate a 32-byte chaotic sequence as the mask parameter, and generate a dynamic mask according to the formula M_i=(K_i XOR K_{i+16})mod 8;
[0054] Step 3: Space Filling Mapping
[0055] Apply Hilbert curve and z-order curve for space filling, determine the binary flow and curve type of the multidimensional coordinates of each data point, apply dynamic masking, and generate a set of lattice coordinates;
[0056] The specific steps are:
[0057] def coordinate generation (binary stream, curve type):
[0058] Block size = ceil(sqrt(len(stream) / 2))
[0059] Initialize N-order space-filling curve
[0060] For each 2-bit data segment:
[0061] Apply dynamic mask: data' = data XOR current mask value
[0062] Assign point coordinates in the order of curve traversal
[0063] Record (x,y) coordinates and data values
[0064] return dot coordinate set
[0065] Step 4: Graphical Coding
[0066] Map the coordinate set to a scalable vector graphic, add positioning marks and error-tolerant areas, and generate the corresponding dot-code image;
[0067] The decoding algorithm consists of the following steps:
[0068] Step 1: Image Preprocessing
[0069] Binarize the dot code image, identify the positioning mark, and normalize the coordinate system;
[0070] Step 2: Parameter extraction
[0071] Read the version identification bit and determine the curve type, and parse the initial value of the chaotic sequence according to the mask synchronization bit;
[0072] Step 3: Reverse mapping
[0073] Calculate the traversal sequence number according to the corresponding curve type, extract the original data bits, and reconstruct the binary stream;
[0074] The specific steps are:
[0075] For each coordinate point:
[0076] Calculate the traversal sequence number according to the corresponding curve type
[0077] Extract original data bits = read value XOR mask sequence
[0078] Reassemble binary stream
[0079] Step 4: Data Validation
[0080] Verify CRC-16 integrity, identify error locations and perform error correction.
[0081] The present invention adopts dynamic mask technology, which enables the same data to generate different coding forms, so that the coded image is non-repetitive and cannot be copied, and has a highly randomized distribution characteristic, which effectively resists malicious cracking, which provides extremely high concealment for the product, making it difficult for counterfeiters to find and copy. The present invention uses Hilbert curves and z-order curves for space filling, and the hyperbolic mechanism greatly improves the coding density, maximizes the information density, and can ensure the stability of printing, thereby improving the recognition accuracy.
[0082] The coding of the present invention is based on the point-to-point topological relationship, and the data rule is 20 digits. The coding technology of the present invention is applicable to a variety of materials, including plastic PVC, paper, wood products, metals, etc., covering almost all types of product packaging. The coding method is flexible and can be carried out by printing, online printing (code change, scanning and spraying mode) and other methods to meet the needs of different production environments.
[0083] The present invention uses a data format that cannot be parsed by unauthorized devices. It requires the mask algorithm and spatial mapping rules to be cracked at the same time to decode, ensuring the security of the data and preventing the risk of data leakage and tampering. The digital invisible code can be identified by a variety of reading devices, such as PDA, mobile phone APP, production line scanner, etc., providing users with a convenient reading method. The code making technology of the present invention can be laid over a large area and can also be applied to multiple parts of the product. It can provide flexible and diverse anti-counterfeiting solutions, significantly improve the anti-counterfeiting effect of the product, effectively combat counterfeit and shoddy products, protect the interests of the brand, and can achieve full tracking of products from production, logistics to sales, improving product management efficiency and transparency. Effective anti-counterfeiting measures help protect the brand image, enhance consumers' trust in the brand, and enhance the brand's market competitiveness.
[0084] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example" or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, unless they are contradictory.
[0085] Although the embodiments of the present invention have been shown and described above, it is to be understood that the above embodiments are exemplary and are not to be construed as limitations of the present invention. A person skilled in the art may change, modify, replace and vary the above embodiments within the scope of the present invention.
Claims
1. A special code technology based on dot matrix relationship applied to the field of article coding, including encoding algorithm and decoding algorithm, characterized in that: The encoding algorithm comprises the following steps: Step 1: Data Preprocessing Input the original coded data, generate decimal ciphertext data through encryption algorithm, convert the ciphertext data into binary stream, add version identification bit and append CRC-16 checksum to generate seed key; Step 2: Dynamic Mask Generation Use the SHA-256 hash algorithm to process the seed key, generate a 32-byte chaotic sequence as the mask parameter, and generate a dynamic mask according to the formula M_i=(K_i XOR K_{i+16})mod 8; Step 3: Space Filling Mapping Apply Hilbert curve and z-order curve for space filling, determine the binary flow and curve type of the multidimensional coordinates of each data point, apply dynamic masking, and generate a set of lattice coordinates; Step 4: Graphical Coding Map the coordinate set to a scalable vector graphic, add positioning marks and error-tolerant areas, and generate the corresponding dot-code image; The decoding algorithm comprises the following steps: Step 1: Image Preprocessing Binarize the dot code image, identify the positioning mark, and normalize the coordinate system; Step 2: Parameter extraction Read the version identification bit and determine the curve type, and parse the initial value of the chaotic sequence according to the mask synchronization bit; Step 3: Reverse mapping Calculate the traversal sequence number according to the corresponding curve type, extract the original data bits, and reconstruct the binary stream; Step 4: Data Validation Verify CRC-16 integrity, identify error locations and perform error correction.
2. The special coding technology based on dot matrix relationship applied to the field of article coding according to claim 1 is characterized in that: In step 1 of the encoding algorithm, the original encoding data uses 20-bit pure numbers, and the encryption algorithm uses the RSA encryption algorithm.
3. The special coding technology based on dot matrix relationship applied to the field of article coding according to claim 1 is characterized in that: The specific steps of step 3 of the encoding algorithm are: def coordinate generation: Block size = ceil(sqrt(len(stream) / 2)) Initialize N-th order space filling curve For each 2-bit data segment: Apply dynamic mask: data' = data XOR current mask value Assign point coordinates in the order of curve traversal Record (x,y) coordinates and data values return the point coordinate set.
4. The special coding technology based on dot matrix relationship applied to the field of article coding according to claim 1 is characterized in that: The specific steps of step 3 of the decoding algorithm are: For each coordinate point: Calculate the traversal sequence number according to the corresponding curve type Extract original data bits = read value XOR mask sequence Reassemble binary stream.