Two-dimensional code generation method applied to commodity multi-dimensional information traceability

CN122927344APending Publication Date: 2026-10-16ANHUI XINWEI PACKAGING CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611140972.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-30
Publication Date
2026-10-16

AI Technical Summary

Technical Problem

现有技术中,二维码的生成方式通常为将固定的溯源信息一次性编码为二维码图案,二维码生成后其内容即被固化,无法在后续环节中动态追加新的溯源信息;若需补充质检、物流等环节的信息,则需要重新生成新的二维码并替换原有图案,或采用多个二维码分别对应不同环节的信息;前者导致二维码需要频繁更换,后者导致包装表面出现多个二维码,消费者无法通过单一二维码获取完整的溯源信息;此外,现有技术中各环节的溯源信息缺乏统一的关联机制,信息来源和时间顺序难以清晰追溯,影响了溯源信息的完整性和可靠性;

Benefits of technology

[0011]与现有技术相比,本发明的有益效果是:通过在二维码生成过程中对初始溯源数据层进行编码并建立链接接口,使后续环节的附加溯源信息可通过该链接接口分层挂载至同一二维码所关联的溯源编码数据体中,解决了传统二维码生成后无法动态追加多维溯源信息的问题,提升了商品溯源信息的整合效率;同时,链接接口的建立使得各环节的溯源信息按时间戳顺序形成溯源链,信息来源和时间能够清晰区分,提升了溯源信息的追溯效率和可靠性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122927344A_ABST
    Figure CN122927344A_ABST
Patent Text Reader

Abstract

The application discloses a two-dimensional code generation method applied to commodity multi-dimensional information tracing, relates to the technical field of two-dimensional code generation, and comprises the following steps: obtaining commodity initial tracing information, extracting initial tracing identification information, and generating an initial tracing data layer; encoding the initial tracing data layer and establishing a link interface to generate a tracing coding data body; performing character coding conversion and error correction coding processing on the tracing coding data body to generate a data code word sequence; constructing a function pattern framework; filling the data code word sequence into a data area and performing mask processing to generate a data matrix; merging the function pattern framework and the data matrix, filling in format information, and generating a two-dimensional code pattern; and the like. Through the establishment of the link interface during coding, the subsequent tracing information can be mounted in the same two-dimensional code in layers, the problem that the traditional two-dimensional code cannot dynamically add multi-dimensional tracing information after being generated is solved, and the effect that the two-dimensional code is fixed and unchangeable while the tracing information is continuously expanded is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of QR code generation technology, specifically a QR code generation method for multi-dimensional information traceability of goods. Background Technology

[0002] During the production, distribution, and sales of goods, multiple stakeholders are involved, including manufacturers, quality inspection agencies, and logistics companies. The traceability information generated by each stakeholder needs to be added to the product's traceability file at different time points. Currently, QR codes are commonly used as information carriers in the field of product traceability. Traceability information is encoded into QR code patterns and printed on the surface of product packaging. Consumers can obtain relevant product information by scanning the code. In existing technologies, QR codes are typically generated by encoding fixed traceability information into a single QR code pattern. Once generated, the content of the QR code is fixed and cannot be dynamically added to subsequent stages. If information from quality inspection, logistics, or other stages needs to be supplemented, a new QR code needs to be generated and the original pattern replaced, or multiple QR codes need to be used to correspond to information from different stages. The former leads to frequent QR code replacements, while the latter results in multiple QR codes appearing on the packaging surface, making it impossible for consumers to obtain complete traceability information through a single QR code. Furthermore, existing technologies lack a unified association mechanism for traceability information at each stage, making it difficult to clearly trace the source and time sequence of information, thus affecting the integrity and reliability of the traceability information. How to construct an extensible data structure during the generation of a QR code, so that traceability information from subsequent stages can be continuously added to the data body associated with the QR code, is the problem we need to solve. To this end, we now provide a QR code generation method for multidimensional information traceability of goods. Summary of the Invention

[0003] The purpose of this invention is to provide a QR code generation method for multi-dimensional information traceability of goods.

[0004] The objective of this invention can be achieved through the following technical solution: a QR code generation method for multi-dimensional information traceability of goods, comprising: S1: Obtain initial traceability information of the product, extract initial traceability identification information, and generate initial traceability data layer; S2: Encode the initial traceability data layer and establish a link interface to generate the traceability encoded data body; S3: Perform character encoding conversion on the traceability encoded data body, and perform error correction encoding processing according to the preset error correction level to generate a data codeword sequence; S4: Construct positioning patterns, correction patterns, and initial format information patterns to generate a functional pattern framework; S5: Fill the data codeword sequence into the data area defined by the functional pattern frame and perform masking, determine the mask number, and generate a data matrix; S6: Merge the functional pattern framework with the data matrix, and fill in the initial format information pattern according to the error correction level and mask number to generate the QR code pattern.

[0005] Preferably, the process of obtaining initial product traceability information, extracting initial traceability identifier information, and generating the initial traceability data layer includes: Establish a data connection with MES, send read commands through the API interface provided by MES, and receive the initial traceability information of the goods returned by MES; The received initial traceability information of the goods is parsed, the manufacturer field is located and its value is read as the initial information source, the production time field is located and its value is read as the initial timestamp, and the product code field and batch number field are located and their values ​​are read and combined into the initial identifier. The initial information source, initial timestamp, initial identifier, and values ​​of the product name field, production line field, and raw material batch field are combined to form the initial traceability data layer.

[0006] Preferably, the process of encoding the initial traceability data layer and establishing a link interface to generate the traceability encoded data body includes: The source field, time field, identifier field and content field in the initial traceability data layer are converted into binary data streams to obtain the encoding result of the initial traceability data layer. A link interface is then established at the end of the encoding result of the initial traceability data layer to obtain the corresponding traceability encoded data body. The encoding result corresponding to the identifier field is the header of the data body of the encoding result of the initial traceability data layer.

[0007] Preferably, the process of generating the data codeword sequence includes: The binary data stream of the traceable encoded data body is divided into byte sequences, a byte pattern indicator is added to the front of the byte sequence, and a terminator is added to the end of the byte sequence to form an encoded bit stream; The encoded bitstream is divided into data codewords. Reed-Solomon error correction encoding is performed on the data codewords according to the preset error correction level to generate error correction codewords. The data codewords and error correction codewords are interleaved to generate a data codeword sequence.

[0008] Preferably, the process of generating a functional pattern frame includes: The QR code version and matrix size are determined based on the total number of codewords in the data codeword sequence; In the QR code matrix, construct the location detection pattern, positioning pattern, correction pattern and initial format information pattern, mark the modules that have been occupied by the functional pattern as occupied, and mark the remaining modules as data areas and leave them empty, thus forming the functional pattern framework.

[0009] Preferably, the process of generating the data matrix includes: The data codeword sequence is sequentially filled into the data area of ​​the functional pattern frame. The filled data area is then masked. The mask number is determined based on the masking result. The mask number and the processed data area module value are used together as the data matrix.

[0010] Preferably, the process of generating a QR code pattern includes: The functional pattern framework and the data matrix are combined to obtain the QR code module matrix; Format information is generated based on the error correction level and mask number, and the format information is filled into the initial format information pattern; The value of each module in the QR code module matrix is ​​mapped to a pixel to generate a QR code pattern.

[0011] Compared with existing technologies, the beneficial effects of this invention are as follows: By encoding the initial traceability data layer and establishing a link interface during the QR code generation process, subsequent additional traceability information can be layered and mounted to the traceability encoded data body associated with the same QR code through this link interface. This solves the problem that traditional QR codes cannot dynamically add multi-dimensional traceability information after generation, thus improving the integration efficiency of product traceability information. At the same time, the establishment of the link interface enables the traceability information of each stage to form a traceability chain in the order of timestamps, and the source and time of information can be clearly distinguished, thereby improving the traceability efficiency and reliability of traceability information. Attached Figure Description

[0012] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this invention. For those skilled in the art, other drawings can be obtained based on these drawings.

[0013] Figure 1 This is a schematic diagram of the present invention. Detailed Implementation

[0014] like Figure 1 As shown, the QR code generation method applied to multi-dimensional information traceability of goods includes: S1: Obtain initial traceability information of the product, extract initial traceability identification information, and generate initial traceability data layer; S2: Encode the initial traceability data layer and establish a link interface to generate the traceability encoded data body; S3: Perform character encoding conversion on the traceability encoded data body, and perform error correction encoding processing according to the preset error correction level to generate a data codeword sequence; S4: Construct positioning patterns, correction patterns, and initial format information patterns to generate a functional pattern framework; S5: Fill the data codeword sequence into the data area defined by the functional pattern frame and perform masking, determine the mask number, and generate a data matrix; S6: Merge the functional pattern framework with the data matrix, and fill in the initial format information pattern according to the error correction level and mask number to generate the QR code pattern.

[0015] Furthermore, the process of obtaining initial product traceability information and generating the initial traceability data layer includes: Establish a data connection with MES, send a read command through the API interface provided by MES, the read command contains the unique identifier of the product, MES queries the corresponding production record based on the unique identifier of the product and returns the initial traceability information of the product. It should be further explained that the initial traceability information of a product is all the production information related to the product recorded by MES after the production process is completed. It is returned in the form of a JSON string. The initial traceability information of a product includes the manufacturer field, production time field, product name field, product code field, batch number field, production line field, and raw material batch field. The received initial traceability information of the goods is parsed, the manufacturer field is located and its value is read, and the read value is used as the initial information source; the production time field is located and its value is read, and the read value is used as the initial timestamp; the product code field and batch number field are located and the two read values ​​are combined into the initial identifier; The initial traceability identification information includes the initial information source, the initial timestamp, and the initial identifier; The initial information source, initial timestamp, initial identifier, and values ​​of the product name field, production line field, and raw material batch field are combined to form the initial traceability data layer. It should be further explained that the initial information source is written into the source field, the initial timestamp is written into the time field, the initial identifier is written into the identifier field, and the values ​​of the product name field, production line field, and raw material batch field are concatenated and written into the content field. The initial traceability data layer is composed of the source field, time field, identifier field, and content field. It should be further explained that the initial traceability data layer constitutes the first layer of nodes in the traceability chain; the traceability chain is a chain-like data structure formed by sequentially linking the traceability data layers of each link through a link interface, used to record complete traceability information of goods from production to sales.

[0016] Further, the process of encoding the initial traceability data layer, establishing a link interface, and generating a traceability encoded data body in step S2 includes: Converting the source field, time field, identification field and content field in the initial traceability data layer into a binary data stream to obtain the encoding result of the initial traceability data layer, and establishing a link interface at the end of the encoding result of the initial traceability data layer, so as to obtain the corresponding traceability encoded data body; Wherein, the encoding result corresponding to the identification field is the data body header of the encoding result of the initial traceability data layer; It should be further noted that the process of converting the field into a binary data stream includes: taking UTF-8 as the encoding rule, converting each character in the field into a corresponding binary sequence, for English characters and numbers, each character is converted into 1 byte; for Chinese characters, each character is converted into 3 bytes; the converted bytes of all characters in the field are combined in sequence according to the left-to-right arrangement order of each character in the field, that is, the binary data stream corresponding to the field is formed; For example: Assume that in the initial traceability data layer, the value of the source field is "Manufacturer A", and the content field contains the text "Product Name: Pure Milk". Taking "Manufacturer A Pure Milk" as an example, the conversion process is as follows: The character "厂" is converted into a binary sequence: 11100101 10001110 10000010 The character "商" is converted into a binary sequence: 11100101 10010101 10000110 The character "A" is converted into a binary sequence: 01000001 The character "纯" is converted into a binary sequence: 11100111 10111010 10101111 The character "牛" is converted into a binary sequence: 11100101 10001001 10001101 The character "奶" is converted into a binary sequence: 11100101 10100101 10110110 Splicing the binary sequences of the 6 characters in sequence according to the left-to-right arrangement order, that is, the binary data stream corresponding to "Manufacturer A Pure Milk" is obtained; It should be further noted that the link interface is a reserved extended access point in the traceability encoded data body, which is used to establish an association relationship between subsequent additional traceability information and the initial traceability information; the structure of the link interface includes a current layer identifier, a next layer pointer and an interface check code, the current layer identifier records the hierarchical position of the current data layer in the traceability chain, the next layer pointer is used to store the storage address of the subsequent additional traceability data layer, and the interface check code is used to verify the integrity of the link interface itself; It should be further explained that the process of establishing the link interface includes: writing the current layer identifier at the end of the encoding result of the initial traceability data layer, with a value of 1, indicating that this data layer is the first layer node of the traceability chain; writing the next layer pointer after the current layer identifier, with an initial value of empty, indicating that there is no subsequent data layer attached; and writing the interface verification code after the current layer identifier and the next layer pointer. The interface verification code is generated by performing cyclic redundancy check on the current layer identifier and the next layer pointer. Example: Let the encoding result of the initial traceability data layer be: After establishing the link interface, the structure of the source code data body is as follows: [Source Field Code] [Time Field Code] [Identifier Field Code] [Content Field Code] [Data Header: Identifier Field Encoding] [Source Field Encoding] [Time Field Encoding] [Content Field Encoding] [Current Layer Identifier: 00000001] [Next Layer Pointer: 00000000] [Interface Checksum: CRC Result] The current layer identifier "00000001" represents the first layer, the next layer pointer "00000000" represents a null pointer, and the interface verification code is the result of CRC-8 calculation after concatenating "00000001" and "00000000".

[0017] Furthermore, step S3, which generates the data codeword sequence, includes: The binary data stream of the traceability encoded data body is divided into byte sequences in groups of 8 bits. A byte pattern indicator is added at the beginning of the byte sequence and a terminator is added at the end of the byte sequence to form an encoded bit stream. The encoded bitstream is divided into data codewords in groups of 8 bits. Reed-Solomon error correction encoding is performed on the data codewords according to the preset error correction level to generate error correction codewords. The data codewords and error correction codewords are interleaved to generate a data codeword sequence. It should be further explained that the byte mode indicator is a 4-bit binary number used to identify the selected QRCode encoding mode. Since the traceability encoded data body contains Chinese characters, an 8-bit byte mode is used, and the byte mode indicator is 0100. The encoded bit stream is composed of the byte mode indicator, byte sequence and terminator concatenated from front to back. It should be further explained that the preset error correction level is M. The number of error correction codewords is determined according to the number of data codewords and the error correction level of M. The error correction codewords are generated by the Reed-Solomon coding algorithm. The interleaving arrangement rule of data codewords and error correction codewords is that one error correction codeword is inserted after every two data codewords until all error correction codewords are inserted. If the data codewords are arranged first, the remaining error correction codewords are arranged at the end of the sequence. Example: Divide the encoded bit stream into groups of 8 bits each to obtain 4 data codewords, sequentially denoted as D1 to D4; the M-level error correction level corresponds to generating 3 error correction codewords, sequentially denoted as E1 to E3; according to the interleaving arrangement rule, the generated data codeword sequence is: D1, D2, E1, D3, D4, E2, E3.

[0018] Further, the process of generating the functional pattern frame in step S4 includes: Determine the QR code version according to the total number of codewords in the generated data codeword sequence, and determine the size of the QR code matrix from the QR code version; In the QR code matrix, first construct three position detection patterns, which are respectively placed at the top left corner, top right corner and bottom left corner of the matrix; then construct a horizontal timing pattern and a vertical timing pattern to connect the three position detection patterns; construct an alignment pattern at the corresponding position of the matrix according to the QR code version; finally, construct an initial format information pattern around the position detection patterns, reserve a format information writing area, and each module is not assigned a value for the time being; After the construction of the functional patterns is completed, the modules in the QR code matrix that have been occupied by the functional patterns are marked as occupied, and the remaining modules are marked as data areas and left blank, so as to form the functional pattern frame.

[0019] It should be further noted that the QR code matrix is a square grid composed of a number of rows and a number of columns of modules, the value of each module is 0 or 1, 0 corresponds to white, and 1 corresponds to black; the QR code version is related to the matrix size, and the higher the version, the larger the matrix size; taking version 2 as an example, the size of the QR code matrix is 25×25 modules; It should be further noted that the position detection patterns are used by the code scanning device to locate the position and direction of the QR code. The three position detection patterns all have the same "concentric square" structure, which is formed by nesting a 7×7 module black square, a 5×5 module white square and a 3×3 module black square sequentially from the outside to the inside, and are respectively located at the top left corner, top right corner and bottom left corner of the matrix; The timing patterns are used by the code scanning device to determine the coordinate position and spacing of the modules, and are composed of a horizontal timing pattern and a vertical timing pattern. The horizontal timing pattern is located in the 7th row of the matrix, and the vertical timing pattern is located in the 7th column of the matrix, both of which are arranged with alternating black and white modules; the horizontal timing pattern connects the right edge of the top-left position detection pattern and the left edge of the top-right position detection pattern, and the vertical timing pattern connects the lower edge of the top-left position detection pattern and the upper edge of the bottom-left position detection pattern; The calibration pattern is used by the code scanning device to correct image distortion, has a shape of a concentric square, and is formed by a 5×5 module black square nested with a 3×3 module white square which is further nested with a 1×1 module black square; the number and position of the calibration patterns are determined by the QR Code version. Taking version 2 as an example, one calibration pattern is provided, which is located in the lower right area of the matrix; The initial format information pattern is used to record the error correction level and the mask number, and its writing area is located around the upper-left position detection pattern, consisting of two strip-shaped regions, each of which contains 15 modules.

[0020] Further, the process of generating the data matrix in step S5 includes: Each codeword in the generated data codeword sequence is expanded bitwise into binary bits, which are sequentially filled into the module positions marked as the data region in the generated functional pattern framework. The filling sequence starts from the lower right corner of the matrix, takes two columns as one filling unit, proceeds alternately in directions from right to left and from bottom to top, and skips the modules already occupied by the functional patterns; After the entire data codeword sequence is filled, a masking process is performed on each module in the data region, and an XOR operation is performed on each module in the data region and the selected mask template, so that the distribution of black and white modules in the data region tends to be uniform; After the masking process is completed, the mask number is determined according to the mask template, and the mask number and the processed module values of the data region are together taken as the data matrix; It should be further noted that the manner of the masking process is to perform an XOR operation on the value of each module in the data region and the value of the module at the corresponding position in the mask template one by one. The rule of the XOR operation is that if the two values are the same, the result is 0, and if the two values are different, the result is 1; when the value of a certain module in the data region is 1 and the value at the corresponding position of the mask template is 1, 1 XOR 1 is 0, and the value of this module becomes 0; when the value of a certain module in the data region is 0 and the value at the corresponding position of the mask template is 1, 0 XOR 1 is 1, and the value of this module becomes 1; when the value at the corresponding position of the mask template is 0, the value of this module remains unchanged; The mask templates are eight preset templates specified in the QR Code standard, which are numbered 0 to 7 in sequence; each mask template defines a module matrix having the same size as the data region, and the value of each module in the matrix is 0 or 1, where 0 means not to flip the module value at the corresponding position, and 1 means to flip the module value at the corresponding position; The process of determining the mask number is as follows: using the eight mask templates to perform masking processes on the data region respectively, calculating a penalty score for the result after each masking process, where the penalty score is obtained by accumulating deductions from four aspects: the length of consecutive modules of the same color, the number of 2×2 squares of the same color, the number of patterns similar to the position detection pattern, and the deviation of the ratio of black and white modules; selecting the mask template with the lowest penalty score, and taking its number as the mask number.

[0021] Furthermore, the process of generating a QR code pattern includes: The generated functional pattern frame is merged with the data matrix. Each module position in the QR code matrix is ​​traversed. If the position is marked as occupied in the functional pattern frame, the module value of that position in the functional pattern frame is taken. If the position is marked as a data area in the functional pattern frame, the module value of the corresponding position in the data matrix is ​​taken. After all module positions are processed, the merged QR code module matrix is ​​obtained. Based on the preset error correction level and the determined mask number, a format information bit sequence is generated, and the format information bit sequence is written into each module position of the reserved format information writing area in the initial format information pattern in the order specified by the QR Code standard. After the format information is filled in, the value of each module in the QR code module matrix is ​​mapped to the corresponding number of pixels. The module value of 0 is mapped to white pixels, and the module value of 1 is mapped to black pixels. All pixels are combined to generate a QR code pattern. It should be further explained that the format information bit sequence is a 5-bit binary number, which is generated by combining a 2-bit error correction level indicator and a 3-bit mask number; the indicator corresponding to the M-level error correction level is 00. The 00 is concatenated with the 3-bit binary number of the mask number to obtain the 5-bit format information bit sequence; after error correction encoding, the 5-bit format information bit sequence is extended to 15 bits and written into the 15 module positions of the format information writing area in the order specified by the QR Code standard.

[0022] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention in any way. Although the present invention has been disclosed above with reference to preferred embodiments, it is not intended to limit the present invention. Any person skilled in the art can make some modifications or alterations to the above-disclosed technical content to create equivalent embodiments without departing from the scope of the present invention. Any modifications or equivalent substitutions made to the above embodiments based on the technical essence of the present invention without departing from the scope of the present invention shall still fall within the scope of the present invention.

Claims

1. A QR code generation method for multi-dimensional information traceability of goods, characterized in that, include: S1: Obtain initial traceability information of the product, extract initial traceability identification information, and generate initial traceability data layer; S2: Encode the initial traceability data layer and establish a link interface to generate the traceability encoded data body; S3: Perform character encoding conversion on the traceability encoded data body, and perform error correction encoding processing according to the preset error correction level to generate a data codeword sequence; S4: Construct positioning patterns, correction patterns, and initial format information patterns to generate a functional pattern framework; S5: Fill the data codeword sequence into the data area defined by the functional pattern frame and perform masking, determine the mask number, and generate a data matrix; S6: Merge the functional pattern framework with the data matrix, and fill in the initial format information pattern according to the error correction level and mask number to generate the QR code pattern.

2. The QR code generation method for multi-dimensional information traceability of goods according to claim 1, characterized in that, The process of obtaining initial product traceability information, extracting initial traceability identifier information, and generating the initial traceability data layer includes: Establish a data connection with MES, send read commands through the API interface provided by MES, and receive the initial traceability information of the goods returned by MES; The received initial traceability information of the goods is parsed, the manufacturer field is located and its value is read as the initial information source, the production time field is located and its value is read as the initial timestamp, and the product code field and batch number field are located and their values ​​are read and combined into the initial identifier. The initial information source, initial timestamp, initial identifier, and values ​​of the product name field, production line field, and raw material batch field are combined to form the initial traceability data layer.

3. The QR code generation method for multi-dimensional information traceability of goods according to claim 2, characterized in that, The process of encoding the initial traceability data layer and establishing a link interface to generate the traceability encoded data body includes: The source field, time field, identifier field and content field in the initial traceability data layer are converted into binary data streams to obtain the encoding result of the initial traceability data layer. A link interface is then established at the end of the encoding result of the initial traceability data layer to obtain the corresponding traceability encoded data body. The encoding result corresponding to the identifier field is the header of the data body of the encoding result of the initial traceability data layer.

4. The QR code generation method for multi-dimensional information traceability of goods according to claim 3, characterized in that, The process of generating a data codeword sequence includes: The binary data stream of the traceable encoded data body is divided into byte sequences, a byte pattern indicator is added to the front of the byte sequence, and a terminator is added to the end of the byte sequence to form an encoded bit stream; The encoded bitstream is divided into data codewords. Reed-Solomon error correction encoding is performed on the data codewords according to the preset error correction level to generate error correction codewords. The data codewords and error correction codewords are interleaved to generate a data codeword sequence.

5. The QR code generation method for multi-dimensional information traceability of goods according to claim 4, characterized in that, The process of generating a functional pattern framework includes: The QR code version and matrix size are determined based on the total number of codewords in the data codeword sequence; In the QR code matrix, construct the location detection pattern, positioning pattern, correction pattern and initial format information pattern, mark the modules that have been occupied by the functional pattern as occupied, and mark the remaining modules as data areas and leave them empty, thus forming the functional pattern framework.

6. The QR code generation method for multi-dimensional information traceability of goods according to claim 5, characterized in that, The process of generating a data matrix includes: The data codeword sequence is sequentially filled into the data area of ​​the functional pattern frame. The filled data area is then masked. The mask number is determined based on the masking result. The mask number and the processed data area module value are used together as the data matrix.

7. The QR code generation method for multi-dimensional information traceability of goods according to claim 6, characterized in that, The process of generating a QR code pattern includes: The functional pattern framework and the data matrix are combined to obtain the QR code module matrix; Format information is generated based on the error correction level and mask number, and the format information is filled into the initial format information pattern; The value of each module in the QR code module matrix is ​​mapped to a pixel to generate a QR code pattern.