Two-dimensional code generation method and device based on capacity expansion and two-dimensional code recognition method and device based on capacity expansion

By segmenting and encoding the QR code content and generating symbols with different shapes and colors, combined with error correction codes, the problem of insufficient QR code capacity is solved, and efficient data storage and recognition are achieved.

CN121303172APending Publication Date: 2026-01-09SHENZHEN POWERRICH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511437488.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-09
Publication Date
2026-01-09

AI Technical Summary

Technical Problem

Existing QR codes have low effective capacity, cannot store large amounts of information and data, and require dedicated equipment for high-density recognition.

Method used

By segmenting and encoding the target content, symbols with different shapes and colors are generated, and a target QR code is generated by combining it with a preset error correction code, thereby increasing the encoding capacity.

Benefits of technology

It increases the effective capacity of QR codes, making them suitable for IoT device configuration and offline large file transfer, thus improving data interaction efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121303172A_ABST
    Figure CN121303172A_ABST
Patent Text Reader

Abstract

The invention discloses a two-dimensional code generation method and device and a two-dimensional code recognition method and device based on capacity expansion, and the method comprises the steps: obtaining target content which comprises text information, a URL link and structured information; partitioning the target content to obtain a plurality of content sub-blocks, and encoding each content sub-block to obtain an encoding value of each content sub-block; a symbol identifier corresponding to each content sub-block is determined according to the coded value of each content sub-block, and the symbol identifiers are different in shape and / or color; and generating a target two-dimensional code based on the symbol identifier corresponding to each content sub-block and a preset error correction code. The method aims at solving the technical problems that the effective capacity of a two-dimensional code is low, and a large amount of information and data cannot be stored.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of information encoding and computer vision, specifically to a QR code generation method, QR code recognition method and apparatus based on capacity expansion. Background Technology

[0002] Currently, most individual QR codes have a storage limit of 3KB of binary data. In practical applications, the effective capacity of QR codes is usually even lower because error correction space needs to be reserved. For example, they can only store 1-2KB of text. When transmitting a 1MB file, hundreds of QR codes need to be generated. Manual scanning is impractical and requires automated equipment such as industrial barcode scanners. When generating high-density QR codes smaller than 0.2mm in size, a dedicated macro lens is needed for recognition, as ordinary mobile phone cameras are difficult to recognize such QR codes. Summary of the Invention

[0003] The main technical problem that this invention addresses is the low effective capacity of QR codes, which cannot store large amounts of information and data.

[0004] According to the first aspect, one embodiment provides a QR code generation method based on capacity expansion, comprising: Obtain target content, wherein the target content includes text information, URL links, and structured information; The target content is divided into blocks to obtain multiple content sub-blocks, and each content sub-block is encoded to obtain the encoded value of each content sub-block; Each content sub-block is identified by a symbol identifier corresponding to it based on its encoded value, wherein each symbol identifier has a different shape and / or color. A target QR code is generated based on the symbol identifier corresponding to each content sub-block and the preset error correction code.

[0005] In some embodiments, generating the target QR code based on the symbol identifier corresponding to each content sub-block and a preset error correction code includes: The symbols corresponding to each content sub-block are arranged according to a preset arrangement order and interval, and a preset error correction code is embedded in the symbols corresponding to the arranged content sub-blocks to obtain the target QR code.

[0006] In some embodiments, arranging the symbol identifiers corresponding to each content sub-block according to a preset arrangement order and interval includes: Encrypt the symbol identifier corresponding to the first content sub-block and / or the symbol identifier corresponding to the last content sub-block among the plurality of content sub-blocks to obtain the encrypted symbol identifier corresponding to the first content sub-block and / or the encrypted symbol identifier corresponding to the last content sub-block; The encrypted symbol identifiers corresponding to the first content sub-block and / or the last content sub-block, as well as the symbol identifiers corresponding to the content sub-blocks excluding the first and last content sub-blocks, are arranged according to a preset arrangement order and interval.

[0007] In some embodiments, a preset error correction code is embedded in the symbol identifier corresponding to the arranged content sub-blocks to obtain the target QR code, including: The error correction code is embedded into different regions of the symbol identifier corresponding to the arranged content sub-block to obtain the target QR code, wherein the different regions include the upper left corner, lower left corner, upper right corner and lower right corner of the symbol identifier corresponding to the arranged content sub-block.

[0008] In some embodiments, after generating the target QR code based on the symbol identifier corresponding to each content sub-block and the preset error correction code, the QR code generation method further includes: The target QR code is divided into multiple data blocks of a preset size; Perform an XOR operation on a pre-defined number of randomly selected data blocks to obtain an encoded block; The encoded blocks are sent to a preset QR code recognition terminal, so that the QR code recognition terminal can recognize the target QR code according to the received preset second number of encoded blocks, wherein the second number is greater than the number of data blocks.

[0009] According to a second aspect, one embodiment provides a QR code recognition method, including: Obtain a QR code to be recognized, wherein the QR code to be recognized includes multiple symbols with different shapes and / or colors, and each symbol is determined by the encoding value corresponding to a content sub-block in the pre-acquired target content, wherein the target content includes text information, URL links and structured information; The symbols in the QR code to be recognized are decoded to obtain the QR code recognition result.

[0010] In some embodiments, each of the symbol identifiers has a hash distance index, and the decoding of the symbol identifiers in the QR code to be recognized to obtain the QR code recognition result includes: Determine the decoding priority based on the hash distance metric of each symbol identifier; Based on the decoding priority, each symbol in the QR code to be recognized is decoded to obtain the QR code recognition result.

[0011] According to a third aspect, one embodiment provides a QR code generation device based on capacity expansion, comprising: The content acquisition module is used to acquire target content, wherein the target content includes text information, URL links, and structured information; The encoding module is used to divide the target content into blocks to obtain multiple content sub-blocks, and to encode each content sub-block to obtain the encoding value of each content sub-block; A symbol identifier generation module is used to determine a symbol identifier corresponding to each content sub-block based on the encoding value of each content sub-block, wherein each symbol identifier has a different shape and / or color; The QR code generation module is used to generate a target QR code based on the symbol identifier corresponding to each content sub-block and a preset error correction code.

[0012] According to a fourth aspect, one embodiment provides a QR code recognition device, comprising: A QR code acquisition module is used to acquire a QR code to be recognized, wherein the QR code to be recognized includes multiple symbols with different shapes and / or colors, and each symbol is determined by the encoding value corresponding to a content sub-block in the pre-acquired target content, wherein the target content includes text information, URL links and structured information; The symbol identification decoding module is used to decode the symbol identification in the QR code to be identified, so as to obtain the QR code recognition result.

[0013] According to the fifth aspect, one embodiment provides a computer program product, including a computer program and / or instructions, which, when executed by a processor, implement the QR code generation method or the QR code recognition method.

[0014] According to the above embodiments, the QR code generation method, QR code recognition method, QR code generation device, QR code recognition device, and computer program product based on capacity expansion acquire target content, divide the target content into blocks to obtain multiple content sub-blocks, encode each content sub-block, obtain the encoding value of each content sub-block, and determine the symbol identifier corresponding to each content sub-block based on the encoding value of each content sub-block. Since the shape and / or color of each symbol identifier is different, the target QR code generated based on the symbol identifier corresponding to each content sub-block and the preset error correction code can increase the encoding capacity through the different colors and / or shapes of the symbol identifiers, thereby improving the effective capacity of the target QR code and realizing the capacity expansion of the QR code, so as to be suitable for high-density data interaction scenarios such as IoT device configuration and offline large file transmission. Attached Figure Description

[0015] Figure 1 This is a flowchart of the QR code generation method based on capacity expansion in the embodiments of this application;

[0016] Figure 2 This is a flowchart illustrating how the symbol identifiers corresponding to each content sub-block are arranged according to a preset arrangement order and interval in one embodiment.

[0017] Figure 3 This is a flowchart of a QR code generation method in one embodiment, after generating a target QR code based on the symbol identifier corresponding to each content sub-block and a preset error correction code;

[0018] Figure 4 This is a flowchart of the QR code recognition method in the embodiments of this application;

[0019] Figure 5 This is a flowchart illustrating how to decode the symbols in a QR code to obtain the QR code recognition result in one embodiment.

[0020] Figure 6 This is a schematic diagram of the structure of a QR code generation device based on capacity expansion in one embodiment;

[0021] Figure 7 This is a schematic diagram of the structure of a QR code recognition device in one embodiment. Detailed Implementation

[0022] The present invention will now be described in further detail with reference to specific embodiments and accompanying drawings. Similar elements in different embodiments are referred to by associated similar element reference numerals. In the following embodiments, many details are described to facilitate a better understanding of this application. However, those skilled in the art will readily recognize that some features may be omitted in different situations, or may be replaced by other elements, materials, or methods. In some cases, certain operations related to this application are not shown or described in the specification. This is to avoid obscuring the core parts of this application with excessive description. For those skilled in the art, detailed description of these related operations is not necessary; they can fully understand the related operations based on the description in the specification and general technical knowledge in the art.

[0023] Furthermore, the features, operations, or characteristics described in the specification can be combined in any suitable manner to form various embodiments. At the same time, the steps or actions in the method description can be rearranged or adjusted in a manner obvious to those skilled in the art. Therefore, the various orders in the specification and drawings are only for the clear description of a particular embodiment and do not imply a necessary order, unless otherwise stated that a particular order must be followed.

[0024] The serial numbers assigned to components in this document, such as "first" and "second," are used only to distinguish the described objects and have no sequential or technical meaning. The terms "connection" and "linkage" used in this application, unless otherwise specified, include both direct and indirect connections (linkages).

[0025] Currently, there are several methods to expand the capacity of QR codes: data compression, block processing, and high-density encoding. Data compression refers to reducing data redundancy and information volume through compression algorithms such as ZIP and Base64. However, compression algorithms may increase decompression time and have limited compression efficiency for certain data types (such as images). Block processing involves dividing large amounts of data into multiple small data blocks, generating independent QR codes for each, and then reconstructing them after scanning. However, this method requires complex segmentation and reconstruction logic, increasing development costs, and users may experience a decreased user experience as they need to scan multiple QR codes. High-density encoding uses methods such as micro QR codes and data matrix codes to store more information in a limited space. However, this method requires specific scanning equipment, has poor versatility, and may reduce scanning speed.

[0026] To increase the capacity of QR codes without affecting the user experience, this application provides a QR code generation method based on capacity expansion. The method involves: acquiring target content, which includes text information, URL links, and structured information; dividing the target content into multiple content sub-blocks and encoding each sub-block to obtain an encoding value; determining a symbol identifier corresponding to each content sub-block based on its encoding value, wherein each symbol identifier has a different shape and / or color; and generating a target QR code based on the symbol identifier corresponding to each content sub-block and a preset error correction code.

[0027] The expanded QR code generation method provided in this application is described below with reference to the accompanying drawings.

[0028] Figure 1 A flowchart of a QR code generation method based on capacity expansion provided in an embodiment of this application is shown, which will be described in detail below.

[0029] Step S10: Obtain the target content.

[0030] Specifically, the target content includes text information, URL links, and structured information, and the selection of target content depends on the application scenario and requirements.

[0031] For example, text information can be product serial numbers, contact information, or short instructions to quickly convey basic information; URL links can be links to the website homepage, product details page, or event registration page for online marketing and sharing of online resources; and structured information can be names, phone numbers, email addresses, companies, or addresses for exchanging business cards in business scenarios.

[0032] Step S20: Divide the target content into blocks to obtain multiple content sub-blocks, and encode each content sub-block to obtain the encoding value of each content sub-block.

[0033] Specifically, each character / letter / number / symbol in the target content is treated as a separate content sub-block to divide the target content into blocks, thereby obtaining multiple content sub-blocks. Based on the specific content of the content sub-block, an appropriate encoding method or encoding standard is selected for encoding to obtain the encoding value of each content sub-block.

[0034] For example, if the target content is "Hello! :)", the target content can be divided into blocks, resulting in the following content blocks: "H", "e", "l", "l", "o", "!", ":", and ")". Each content block is then encoded using the ASCII encoding standard, resulting in the following encoded values: "H" corresponds to 0100 1000, "e" to 01100101, "l" to 0110 1100, "o" to 0110 1111, "!" to 0010 0001, ":" to 0011 1010, and ")" to 0010 1001. Therefore, an 8×8 network can be encoded into a 64-bit number.

[0035] In this embodiment of the application, multiple content sub-blocks obtained by segmentation are encoded to obtain the encoded value of each content sub-block. The readable content is converted into machine-processable binary data to adapt to the subsequent QR code generation process, ensuring data accuracy and compatibility.

[0036] Step S30: Determine the symbol identifier corresponding to each content sub-block based on the encoding value of each content sub-block.

[0037] Specifically, the symbol identifier for each content sub-block is determined based on a preset symbol identifier reference table and the encoding value of each content sub-block. The symbol identifier reference table includes symbol identifiers corresponding to different encoding values, and each symbol identifier has a different shape and / or color.

[0038] For example, the symbol reference table includes cross-shaped symbols, circle-shaped symbols, and triangle-shaped symbols. The color of the symbols can be red or black.

[0039] In this embodiment, the symbol identifier corresponding to each content sub-block not only differs in shape but also in color. This allows for the increase of encoding capacity through different shapes and colors, thereby expanding the capacity of the QR code.

[0040] Step S40: Generate the target QR code based on the symbol identifier and preset error correction code corresponding to each content sub-block.

[0041] Specifically, the symbols corresponding to each content sub-block are arranged according to a preset order. Considering that images may become blurry or damaged during data transmission, preset error correction codes are embedded in the symbols corresponding to the arranged content sub-blocks to prevent these problems from affecting data integrity. This is like adding a backup layer, so that even if some data is lost, the information can be recovered through these backups.

[0042] For example, if there is a 125-byte content sub-block, an additional 30 bytes of error correction code will be added on top of that. This way, even if some information is lost, the lost information can still be recovered using the additional 30 bytes of error correction code.

[0043] In detail, the process of generating the target QR code can be likened to a jigsaw puzzle. Each content sub-block's corresponding symbol is placed one by one into a larger puzzle piece. Each content sub-block's symbol not only has shape but also color. The sub-blocks are placed in the larger puzzle piece according to their segmentation order until all the symbols for each content sub-block are placed. That is, first, the symbol corresponding to the content sub-block "H" is determined based on its encoding value 0100 1000, and this symbol is placed at the beginning of the larger puzzle piece. Next, the symbol corresponding to the content sub-block "e" is determined based on its encoding value 0110 0101, and this symbol is placed after the symbol corresponding to "H". At this point, the edge of the larger puzzle piece is reached, so the symbol corresponding to "l" is placed starting from the next row, and so on, completing the design of the symbols for each content sub-block in "Hello! :)".

[0044] In this embodiment of the application, the process of generating a QR code is similar to the following code operation: For each array, input the file; Find the next location; Place the corresponding symbol on it; Therefore, approximately 9300 bytes of data can be encoded into a 1024×1024 pixel image, thereby increasing the capacity of the target QR code and enabling it to store more valid data.

[0045] According to the above embodiment of the QR code generation method based on capacity expansion, target content is obtained, the target content is divided into blocks to obtain multiple content sub-blocks, and each content sub-block is encoded to obtain an encoding value for each content sub-block. Based on the encoding value of each content sub-block, a symbol identifier corresponding to each content sub-block is determined. Since the shape and / or color of each symbol identifier is different, the target QR code generated based on the symbol identifier corresponding to each content sub-block and the preset error correction code can increase the encoding capacity by using different colors and / or shapes of the symbol identifiers, thereby improving the effective capacity of the target QR code and realizing the capacity expansion of the QR code. This method is suitable for high-density data interaction scenarios such as IoT device configuration and offline large file transfer.

[0046] In some embodiments, a target QR code is generated based on the symbol identifier corresponding to each content sub-block and a preset error correction code, including: The symbols corresponding to each content sub-block are arranged according to a preset order and interval, and a preset error correction code is embedded in the symbols corresponding to the arranged content sub-blocks to obtain the target QR code.

[0047] Specifically, the preset arrangement order can be based on the main framework of the QR code, and the filling order from left to right and from top to bottom can be adopted according to the actual number of content sub-blocks. The arrangement interval is the pixel interval between each content sub-block.

[0048] For example, the spacing is 20, which means that each content sub-block is separated by 20 bits of pixels.

[0049] In this embodiment, the symbol identifiers corresponding to each content sub-block are separated by 20 bits, which ensures that even if the image is blurry or subject to other interference, the symbol identifiers corresponding to each content sub-block can be clearly distinguished.

[0050] Please refer to Figure 2 In some embodiments, the symbol identifiers corresponding to each content sub-block are arranged according to a preset arrangement order and arrangement interval, including steps S41 to S42, which are described in detail below.

[0051] Step S41: Encrypt the symbol identifier corresponding to the first content sub-block and / or the symbol identifier corresponding to the last content sub-block among multiple content sub-blocks to obtain the encrypted symbol identifier corresponding to the first content sub-block and / or the encrypted symbol identifier corresponding to the last content sub-block.

[0052] Specifically, the symbol identifiers corresponding to the first content sub-block and / or the last content sub-block are encrypted using a preset encryption algorithm to obtain the encrypted symbol identifiers corresponding to the first content sub-block and / or the last content sub-block. The preset encryption algorithm can be the SM4 encryption algorithm.

[0053] For example, for the content sub-blocks “H”, “e”, “l”, “l”, “o”, “!”, “:”, and “)”, the SM4 encryption algorithm is used to encrypt the symbol identifier corresponding to the first content sub-block “H” and / or the symbol identifier corresponding to the last content sub-block “)”, resulting in the encrypted symbol identifier corresponding to the first content sub-block “H” and / or the encrypted symbol identifier corresponding to the last content sub-block “)”.

[0054] In this embodiment, the target QR code is generated by encrypting the symbol identifiers corresponding to the content sub-blocks. This target QR code requires a decryption key to recover the data, effectively protecting user privacy. Furthermore, encrypting only the symbol identifiers corresponding to the first and / or last content sub-blocks reduces the data redundancy that would occur if all content sub-blocks' symbol identifiers were encrypted.

[0055] Step S42: Arrange the encrypted symbol identifiers corresponding to the first content sub-block and / or the encrypted symbol identifiers corresponding to the last content sub-block, as well as the symbol identifiers corresponding to the content sub-blocks excluding the first and last content sub-blocks, according to the preset arrangement order and arrangement interval.

[0056] Specifically, the specific implementation method in step S42 can refer to the specific implementation steps of arranging the symbol identifiers corresponding to each content sub-block according to the preset arrangement order and arrangement interval, which will not be repeated here.

[0057] In some embodiments, a preset error correction code is embedded in the symbol identifier corresponding to the arranged content sub-blocks to obtain the target QR code, including: The error correction code is embedded into different areas of the symbol identifier corresponding to the arranged content sub-blocks to obtain the target QR code.

[0058] Specifically, the different areas include the top left, bottom left, top right, and bottom right corners of the symbols corresponding to the arranged content sub-blocks.

[0059] In this embodiment, considering that image errors are often concentrated in adjacent areas, such as when part of an image is obscured by a finger, this embodiment uses data interleaving technology to embed error correction codes into different areas of the symbol identifiers corresponding to the arranged content sub-blocks, so as to reduce the impact of local errors on the overall decoding.

[0060] Please refer to Figure 3 In some embodiments, after step S40: generating the target QR code based on the symbol identifier and preset error correction code corresponding to each content sub-block, the QR code generation method further includes steps S43 to S45, which are described in detail below.

[0061] Step S43: Divide the target QR code into multiple data blocks of a preset size.

[0062] Specifically, the target QR code is divided into multiple data blocks of equal size, each of which can also be called a raw block.

[0063] Step S44: Perform an XOR operation on a pre-defined number of randomly selected data blocks to obtain the encoded blocks.

[0064] Specifically, an infinite number of coding blocks can be generated through XOR operations. Each coding block is composed of several data blocks, that is, a new coding block is obtained by XORing a preset number of randomly selected data blocks. Each coding block can be regarded as a mixture of multiple original blocks.

[0065] Step S45: Send the encoded blocks to the preset QR code recognition terminal so that the QR code recognition terminal can recognize the target QR code according to the received preset second number of encoded blocks.

[0066] Specifically, these encoded blocks are continuously generated and sent to a preset QR code recognition terminal. The QR code recognition terminal does not need to receive all encoded blocks; it only needs to receive a preset second number of encoded blocks to begin decoding. This second number is greater than the number of data blocks. When the QR code recognition terminal receives the second number of encoded blocks, it progressively uses an inverse XOR operation to recover the data blocks. Since each received encoded block is actually a combination of certain data blocks, once the QR code recognition terminal has received a sufficient number of encoded blocks, it can deduce all the data blocks. Once the QR code recognition terminal has decoded all the data blocks, the transmission can stop. Therefore, the decoding method in this embodiment does not require receiving specific encoded blocks, nor does it require receiving encoded blocks in sequence; as long as the number of encoded blocks is sufficient, the data can be recovered.

[0067] In this embodiment, a fountain code encoding method is used. For files larger than 7500 bytes, this is an efficient segmented data transmission method. Its design is inspired by the image of a fountain's water flow, allowing you to collect water freely without needing to collect every single drop; enough water is sufficient to fill a cup. In data transmission, the basic working principle of the fountain code is to divide the target QR code into several data blocks, and then generate numerous encoded blocks, which are represented by water droplets. The QR code reader does not need to receive all these water droplets; receiving enough encoded blocks is sufficient to reconstruct the target QR code. Therefore, through this encoding method, the QR code reader can receive data from multiple frames in any order. As long as enough frames are received, the target QR code can be successfully decoded. Even if some data frames are lost, the target QR code can still be reconstructed from the received N+1 data frames.

[0068] Please refer to Figure 4 This application provides a QR code recognition method, including steps S50 to S60, which are described in detail below.

[0069] Step S50: Obtain the QR code to be recognized.

[0070] Specifically, the QR code to be recognized includes multiple symbols of different shapes and / or colors. Each symbol is determined by the encoding value corresponding to a content sub-block in the pre-acquired target content, which includes text information, URL links, and structured information. The QR code to be recognized can be generated and obtained using the QR code generation method described in steps S10 to S40 above.

[0071] Step S60: Decode the symbols in the QR code to be recognized to obtain the QR code recognition result.

[0072] Specifically, the boundary and grid structure of the encoding area in the QR code to be recognized are identified by locating the tile grid to obtain the grid coordinate system after positioning. The positioned grid blocks are converted into standard rectangles by 2D image conversion and precise extraction. Then, the credibility of the content sub-blocks in the standard rectangles is quantified by hash value. High-quality content sub-blocks are decoded first to achieve gradual decoding and improve the accuracy of decoding, so as to obtain accurate QR code recognition results.

[0073] In some embodiments, the QR code to be recognized can be color-calibrated before decoding to improve the accuracy of subsequent QR code recognition.

[0074] Please refer to Figure 5 In some embodiments, each symbol identifier has a hash distance index. Step S60: Decode the symbol identifier in the QR code to be identified to obtain the QR code recognition result, including steps S61 to S62, which are described in detail below.

[0075] Step S61: Determine the decoding priority based on the hash distance index of each symbol identifier.

[0076] Specifically, the hash distance index for each symbol can be perceptual hash, average hash, or Hamming distance. First, calculate the hash distance index corresponding to each symbol, then sort them in ascending order of hash distance index. Decoding starts from the symbol with the smallest hash distance index and gradually expands to the subsequent symbol. This sorting is the corresponding decoding priority.

[0077] Step S62: Decode each symbol in the QR code to be recognized based on the decoding priority to obtain the QR code recognition result.

[0078] In this embodiment, priority decoding reduces accumulated errors and improves the accuracy of QR code recognition.

[0079] This application proposes a dynamic QR code generation and recognition method that enhances data capacity through color enhancement and fractal structure. It primarily utilizes fractal color layered encoding combined with the LDPC error correction algorithm to expand capacity while maintaining standard QR scan compatibility, leveraging the multi-dimensional data embedding characteristics of the HSV color space. The advantage of this application is that a single code capacity can reach 30MB, and the file supports tamper-proof verification. Alternative solutions can also be introduced, such as eliminating fractal encoding and using only color expansion (reducing capacity to 20KB and cost by 60%), or introducing quantum noise encryption to combat physical copying attacks (requiring a quantum random number generator).

[0080] Please refer to Figure 6 This application also provides a QR code generation device based on capacity expansion, including a content acquisition module 10, an encoding module 20, a symbol generation module 30, and a QR code generation module 40, which are described in detail below.

[0081] The content acquisition module 10 is used to acquire target content, which includes text information, URL links, and structured information.

[0082] The encoding module 20 is used to divide the target content into blocks to obtain multiple content sub-blocks, and to encode each content sub-block to obtain the encoding value of each content sub-block.

[0083] The symbol identifier generation module 30 is used to determine the symbol identifier corresponding to each content sub-block based on the encoding value of each content sub-block, wherein each symbol identifier has a different shape and / or color.

[0084] The QR code generation module 40 is used to generate a target QR code based on the symbol identifier corresponding to each content sub-block and the preset error correction code.

[0085] Please refer to Figure 7 This application also provides a QR code recognition device, including a QR code acquisition module 50 and a symbol identification decoding module 60, which will be described in detail below.

[0086] The QR code acquisition module 50 is used to acquire a QR code to be recognized, wherein the QR code to be recognized includes multiple symbols with different shapes and / or colors. Each symbol is determined by the encoding value corresponding to the content sub-block in the pre-acquired target content. The target content includes text information, URL links and structured information.

[0087] The symbol decoding module 60 is used to decode the symbols in the QR code to be recognized, so as to obtain the QR code recognition result.

[0088] This application provides a computer program product, including a computer program and / or instructions, which, when executed by a processor, implement a QR code generation method or a QR code recognition method.

[0089] Those skilled in the art will understand that all or part of the functions of the various methods in the above embodiments can be implemented by hardware or by computer programs. When all or part of the functions in the above embodiments are implemented by computer programs, the program can be stored in a computer-readable storage medium, which may include: read-only memory, random access memory, disk, optical disk, hard disk, etc., and the program is executed by a computer to achieve the above functions. For example, the program can be stored in the memory of a device, and when the program in the memory is executed by the processor, all or part of the above functions can be achieved. In addition, when all or part of the functions in the above embodiments are implemented by computer programs, the program can also be stored in a server, another computer, disk, optical disk, flash drive, or external hard drive, etc., and can be downloaded or copied to the memory of a local device, or the system of the local device can be updated. When the program in the memory is executed by the processor, all or part of the functions in the above embodiments can be achieved.

[0090] The above examples illustrate the present invention only to aid in understanding it and are not intended to limit the scope of the invention. Those skilled in the art can make various simple deductions, modifications, or substitutions based on the principles of this invention.

Claims

1. A QR code generation method based on capacity expansion, characterized in that, include: Obtain target content, wherein the target content includes text information, URL links, and structured information; The target content is divided into blocks to obtain multiple content sub-blocks, and each content sub-block is encoded to obtain the encoded value of each content sub-block; Each content sub-block is identified by a symbol identifier corresponding to it based on its encoded value, wherein each symbol identifier has a different shape and / or color. A target QR code is generated based on the symbol identifier corresponding to each content sub-block and the preset error correction code.

2. The QR code generation method as described in claim 1, characterized in that, The step of generating a target QR code based on the symbol identifier corresponding to each content sub-block and a preset error correction code includes: The symbols corresponding to each content sub-block are arranged according to a preset arrangement order and interval, and a preset error correction code is embedded in the symbols corresponding to the arranged content sub-blocks to obtain the target QR code.

3. The QR code generation method as described in claim 2, characterized in that, The step of arranging the symbol identifiers corresponding to each content sub-block according to a preset arrangement order and interval includes: Encrypt the symbol identifier corresponding to the first content sub-block and / or the symbol identifier corresponding to the last content sub-block among the plurality of content sub-blocks to obtain the encrypted symbol identifier corresponding to the first content sub-block and / or the encrypted symbol identifier corresponding to the last content sub-block; The encrypted symbol identifiers corresponding to the first content sub-block and / or the last content sub-block, as well as the symbol identifiers corresponding to the content sub-blocks excluding the first and last content sub-blocks, are arranged according to a preset arrangement order and interval.

4. The QR code generation method as described in claim 2, characterized in that, A preset error correction code is embedded in the symbol identifier corresponding to the arranged content sub-blocks to obtain the target QR code, including: The error correction code is embedded into different regions of the symbol identifier corresponding to the arranged content sub-block to obtain the target QR code, wherein the different regions include the upper left corner, lower left corner, upper right corner and lower right corner of the symbol identifier corresponding to the arranged content sub-block.

5. The QR code generation method as described in claim 1, characterized in that, After generating the target QR code based on the symbol identifier corresponding to each content sub-block and the preset error correction code, the QR code generation method further includes: The target QR code is divided into multiple data blocks of a preset size; Perform an XOR operation on a pre-defined number of randomly selected data blocks to obtain an encoded block; The encoded blocks are sent to a preset QR code recognition terminal, so that the QR code recognition terminal can recognize the target QR code according to the received preset second number of encoded blocks, wherein the second number is greater than the number of data blocks.

6. A QR code recognition method, characterized in that, include: Obtain a QR code to be recognized, wherein the QR code to be recognized includes multiple symbols with different shapes and / or colors, and each symbol is determined by the encoding value corresponding to a content sub-block in the pre-acquired target content, wherein the target content includes text information, URL links and structured information; The symbols in the QR code to be recognized are decoded to obtain the QR code recognition result.

7. The QR code recognition method as described in claim 6, characterized in that, Each of the symbol identifiers has a hash distance index. Decoding the symbol identifiers in the QR code to be recognized to obtain the QR code recognition result includes: Determine the decoding priority based on the hash distance metric of each symbol identifier; Based on the decoding priority, each symbol in the QR code to be recognized is decoded to obtain the QR code recognition result.

8. A QR code generation device based on capacity expansion, characterized in that, include: The content acquisition module is used to acquire target content, wherein the target content includes text information, URL links, and structured information; The encoding module is used to divide the target content into blocks to obtain multiple content sub-blocks, and to encode each content sub-block to obtain the encoding value of each content sub-block; A symbol identifier generation module is used to determine a symbol identifier corresponding to each content sub-block based on the encoding value of each content sub-block, wherein each symbol identifier has a different shape and / or color; The QR code generation module is used to generate a target QR code based on the symbol identifier corresponding to each content sub-block and a preset error correction code.

9. A QR code recognition device, characterized in that, include: A QR code acquisition module is used to acquire a QR code to be recognized, wherein the QR code to be recognized includes multiple symbols with different shapes and / or colors, and each symbol is determined by the encoding value corresponding to a content sub-block in the pre-acquired target content, wherein the target content includes text information, URL links and structured information; The symbol identification decoding module is used to decode the symbol identification in the QR code to be identified, so as to obtain the QR code recognition result.

10. A computer program product comprising a computer program and / or instructions, characterized in that, When the computer program and / or instructions are executed by the processor, they implement the QR code generation method as described in any one of claims 1-5 or the QR code recognition method as described in any one of claims 6-7.