Multi-two-dimensional code data array generation and identification method and system
By generating multi-QR code data arrays and using array layout and error correction technology, the efficiency and capacity problems of traditional QR codes in high-density information storage and rapid identification scenarios are solved, and efficient information storage and rapid identification are achieved.
Patent Information
- Application Number
- CN202411344751.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-25
- Publication Date
- 2025-02-18
AI Technical Summary
When existing QR codes need to pass a large amount of information or perform complex data interactions, there are problems of inefficiency and limited information capacity. Especially in high-density information storage and rapid identification scenarios, traditional single QR codes cannot meet the needs.
By generating multi-QR code data arrays, using array layout and error correction technology, information storage density and recognition speed are improved. This method divides the original data into multiple data blocks, and generates corresponding QR codes based on the characteristics of each data block, ensuring the stability and accuracy of the identification through array layout and error correction codes.
It significantly improves the information storage density and recognition speed, avoids the spread of code errors, ensures stable identification in complex environments, meets the needs of more complex scenarios, reduces the number of scans, and improves the efficiency of information acquisition.
Smart Images

Figure CN119476328A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image recognition and coding, and in particular to a method and system for generating and recognizing multiple two-dimensional code data arrays. Background Art
[0002] As a fast-response matrix barcode, QR code is widely used in scenarios such as product tracking, information acquisition, and mobile payment. Existing QR codes are usually used individually, which leads to problems such as low efficiency and limited information capacity when large amounts of information need to be transmitted or complex data interactions need to be performed. In particular, in scenarios that require high-density information storage and rapid recognition, traditional single QR codes can no longer meet the requirements. Existing studies have attempted to solve the above problems by improving the encoding algorithm of QR codes or improving recognition accuracy, but these methods can often only improve the performance of QR codes to a certain extent, while also bringing additional complexity and cost. Therefore, seeking new technologies that can maintain the original advantages of QR codes while significantly improving information storage density and recognition speed has become a research hotspot in the current field. Summary of the invention
[0003] The purpose of the present invention is to provide a method and system for generating and recognizing a multi-two-dimensional code data array, arranging a plurality of two-dimensional codes in an array form, and through corresponding generation and recognition algorithms, achieving a significant improvement in information storage density and recognition speed while maintaining the original advantages of the two-dimensional code; and in the process of generating the multi-two-dimensional code data array, fully considering the spatial correlation between each two-dimensional code, improving data storage efficiency and avoiding error propagation during the recognition process; by introducing robust error correction extreme values and optimizing recognition algorithms, ensuring stable recognition of the multi-two-dimensional code data array in a complex environment; and effectively solving the limitations of existing two-dimensional codes in information transmission and processing, by generating a multi-two-dimensional code data array, achieving a one-time transmission of a large amount of complex information, improving recognition accuracy and efficiency, greatly improving information storage capacity, meeting the needs of more complex scenarios, reducing the number of scans, improving the efficiency of information acquisition, ensuring high recognition accuracy and reducing the risk of misreading.
[0004] The present invention is achieved through the following technical solutions:
[0005] A method for generating and recognizing a multi-dimensional code data array, comprising:
[0006] Based on the information attributes of the original data, the original data is divided into a plurality of data blocks; based on the data characteristics of each data block, a coding algorithm matching each data block is determined, and based on the coding algorithm, a two-dimensional code corresponding to the data block is generated;
[0007] Perform array layout and error correction on all two-dimensional codes corresponding to all data blocks to generate corresponding multi-two-dimensional code data arrays;
[0008] The multiple two-dimensional code data array is subjected to image preprocessing and two-dimensional code positioning processing to determine all candidate two-dimensional code areas corresponding to the multiple two-dimensional code data array; all candidate two-dimensional code areas are subjected to two-dimensional code decoding processing and data reorganization processing to obtain corresponding original data.
[0009] Optionally, based on information attributes of the original data, the original data is divided into a plurality of data blocks, including:
[0010] Step S1, using the following formula (1), according to the amount of data divided into several data blocks of the original data, determine the minimum value of the side length of the generated two-dimensional code,
[0011]
[0012] In the above formula (1), D min represents the minimum value of the side length of the generated two-dimensional code; K2(a) represents the amount of binary data of the a-th data block into which the original data is divided; k0 represents the amount of binary data that can be stored in the unit area of the two-dimensional code; S0 represents the unit area; μ represents the margin multiple; n represents the total number of data blocks into which the original data is divided; It means to substitute the value of a from 1 to n into the brackets to get the maximum value in the brackets;
[0013] Step S2, using the following formula (2), according to the minimum value and the preset maximum value of the two-dimensional code side length and the total number of data blocks into which the original data is divided, obtain the exponential base of the generated two-dimensional code side length,
[0014]
[0015] In the above formula (2), G represents the exponential base of the length of the generated two-dimensional code side; D max Indicates the preset maximum value of the length of the QR code side; max(,) means to find the maximum value on both sides of the comma in the brackets;
[0016] Step S3, using the following formula (3), according to the minimum value and the preset maximum value of the two-dimensional code side length and the exponential base of the generated two-dimensional code side length, determine the side length value of the two-dimensional code corresponding to each data block,
[0017]
[0018] In the above formula (3), D(a) represents the side length value of the two-dimensional code corresponding to the a-th data block.
[0019] Optionally, based on information attributes of the original data, the original data is divided into a plurality of data blocks; based on data features of each data block, a coding algorithm matching each data block is determined, and based on the coding algorithm, a two-dimensional code corresponding to the data block is generated, including:
[0020] Performing text semantic recognition on the original data to obtain text semantic distribution attributes of the original data; and dividing the original data into a plurality of data segments in sequence based on the text semantic distribution attributes;
[0021] Based on the data volume of each data segment and the preset two-dimensional code capacity, invalid data codes are removed or data codes are filled in each data segment, so as to obtain a data block corresponding to the data segment;
[0022] Based on the information type and data amount of each data block, a coding algorithm matching each data block is selected; based on the information position corresponding to each data block within the original data and its matching coding algorithm and the side length value of the two-dimensional code, the data block is encoded to generate a two-dimensional code corresponding to each data block.
[0023] Optionally, array layout and error correction are performed on all two-dimensional codes corresponding to all data blocks to generate corresponding multi-two-dimensional code data arrays, including:
[0024] Determine the array size of the multi-two-dimensional code data array based on the information amount and recognition accuracy of all the two-dimensional codes corresponding to all the data blocks; wherein the array size includes the number of rows and columns of the multi-two-dimensional code data array;
[0025] Based on the array scale and the sizes of all the two-dimensional codes, determine the positions of all the two-dimensional codes in the multi-two-dimensional code data array; and based on the positions, perform array layout on all the two-dimensional codes, so as to obtain an initial multi-two-dimensional code data array;
[0026] An error correction code is added to each two-dimensional code included in the initial multi-two-dimensional code data array, and a missing code is detected and reconstructed for each two-dimensional code, so as to obtain a final multi-two-dimensional code data array.
[0027] Optionally, performing image preprocessing and two-dimensional code positioning processing on the multiple two-dimensional code data array to determine all candidate two-dimensional code regions corresponding to the multiple two-dimensional code data array; performing two-dimensional code decoding processing and data reorganization processing on all candidate two-dimensional code regions to obtain corresponding original data, including:
[0028] Performing pixel grayscale preprocessing, pixel binarization preprocessing, noise filtering preprocessing and edge pixel sharpening preprocessing on the multiple two-dimensional code data array;
[0029] Then, feature detection, template matching, edge detection, contour extraction and candidate area screening are performed on the multiple two-dimensional code data array to determine all candidate two-dimensional code areas corresponding to the multiple two-dimensional code data array;
[0030] Perform position correction, image cutting, black and white square recognition, format information reading, data decoding and error correction on each candidate QR code area to obtain the decoded data corresponding to each candidate QR code area;
[0031] Based on the corresponding information positions contained in all decoded data within the original data, all decoded data are sorted and merged to obtain corresponding original data; and then the original data is integrity checked and data recovered.
[0032] Multiple two-dimensional code data array generation and recognition system, including:
[0033] An original data segmentation module, used for segmenting the original data into a plurality of data blocks based on information attributes of the original data;
[0034] A single two-dimensional code generation module is used to determine a coding algorithm that matches each data block based on the data characteristics of each data block, and generate a two-dimensional code corresponding to the data block based on the coding algorithm;
[0035] A multi-two-dimensional code data array generation module is used to perform array layout and error correction on all two-dimensional codes corresponding to all data blocks to generate corresponding multi-two-dimensional code data arrays;
[0036] A multiple two-dimensional code data array preprocessing module, used to perform image preprocessing and two-dimensional code positioning processing on the multiple two-dimensional code data array, and determine all candidate two-dimensional code regions corresponding to the multiple two-dimensional code data array;
[0037] The multiple two-dimensional code data array decoding and reorganization module is used to perform two-dimensional code decoding processing and data reorganization processing on all candidate two-dimensional code areas to obtain corresponding original data.
[0038] Optionally, the original data segmentation module is used to segment the original data into a plurality of data blocks based on information attributes of the original data, including:
[0039] Performing text semantic recognition on the original data to obtain text semantic distribution attributes of the original data; and dividing the original data into a plurality of data segments in sequence based on the text semantic distribution attributes;
[0040] Based on the data volume of each data segment and the preset two-dimensional code capacity, invalid data codes are removed or data codes are filled in each data segment, so as to obtain a data block corresponding to the data segment;
[0041] The single two-dimensional code generation module is used to determine the encoding algorithm matching each data block based on the data characteristics of each data block, and generate a two-dimensional code corresponding to the data block based on the encoding algorithm, including:
[0042] Based on the information type and data amount of each data block, a coding algorithm matching each data block is selected; based on the information position corresponding to each data block within the original data and its matching coding algorithm and the side length value of the two-dimensional code, the data block is encoded to generate a two-dimensional code corresponding to each data block.
[0043] Optionally, the multi-two-dimensional code data array generation module is used to perform array layout and error correction on all two-dimensional codes corresponding to all data blocks to generate a corresponding multi-two-dimensional code data array, including:
[0044] Determine the array size of the multi-two-dimensional code data array based on the information amount and recognition accuracy of all the two-dimensional codes corresponding to all the data blocks; wherein the array size includes the number of rows and columns of the multi-two-dimensional code data array;
[0045] Based on the array scale and the sizes of all the two-dimensional codes, determine the positions of all the two-dimensional codes in the multi-two-dimensional code data array; and based on the positions, perform array layout on all the two-dimensional codes, so as to obtain an initial multi-two-dimensional code data array;
[0046] An error correction code is added to each two-dimensional code included in the initial multi-two-dimensional code data array, and a missing code is detected and reconstructed for each two-dimensional code, so as to obtain a final multi-two-dimensional code data array.
[0047] Optionally, the multi-two-dimensional code data array preprocessing module is used to perform image preprocessing and two-dimensional code positioning processing on the multi-two-dimensional code data array to determine all candidate two-dimensional code areas corresponding to the multi-two-dimensional code data array, including:
[0048] Performing pixel grayscale preprocessing, pixel binarization preprocessing, noise filtering preprocessing and edge pixel sharpening preprocessing on the multiple two-dimensional code data array;
[0049] Then, feature detection, template matching, edge detection, contour extraction and candidate area screening are performed on the multiple two-dimensional code data array to determine all candidate two-dimensional code areas corresponding to the multiple two-dimensional code data array;
[0050] The multi-two-dimensional code data array decoding and reorganization module is used to perform two-dimensional code decoding processing and data reorganization processing on all candidate two-dimensional code areas to obtain corresponding original data, including:
[0051] Perform position correction, image cutting, black and white square recognition, format information reading, data decoding and error correction on each candidate QR code area to obtain the decoded data corresponding to each candidate QR code area;
[0052] Based on the corresponding information positions contained in all decoded data within the original data, all decoded data are sorted and merged to obtain corresponding original data; and then the original data is integrity checked and data recovered.
[0053] Compared with the prior art, the present invention has the following beneficial effects:
[0054] The multi-two-dimensional code data array generation and recognition method and system provided in the present application arrange multiple two-dimensional codes in an array form, and through corresponding generation and recognition algorithms, achieve significantly improved information storage density and recognition speed while maintaining the original advantages of two-dimensional codes; and fully consider the spatial correlation between each two-dimensional code in the process of generating the multi-two-dimensional code data array, improve data storage efficiency and avoid error propagation in the recognition process; by introducing robust error correction extreme values and optimizing recognition algorithms, ensure stable recognition of the multi-two-dimensional code data array in complex environments; and effectively solve the limitations of existing two-dimensional codes in information transmission and processing, and realize one-time transmission of a large amount of complex information by generating a multi-two-dimensional code data array, improve recognition accuracy and efficiency, greatly increase information storage capacity, meet the needs of more complex scenarios, reduce the number of scans, improve the efficiency of information acquisition, ensure high recognition accuracy and reduce the risk of misreading. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the prior art descriptions. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. Among them:
[0056] Figure 1 A schematic flow chart of the method for generating and recognizing multiple two-dimensional code data arrays provided by the present invention.
[0057] Figure 2 A schematic diagram of the structure of the multi-two-dimensional code data array generation and recognition system provided by the present invention. DETAILED DESCRIPTION
[0058] In order to make the above-mentioned purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are described in detail below in conjunction with the accompanying drawings. It is understandable that the specific embodiments described herein are only used to explain the present application, rather than to limit the present application. It should also be noted that, for ease of description, only some structures related to the present application are shown in the accompanying drawings, rather than all structures. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0059] The terms "including" and "having" and any variations thereof in this application are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device comprising a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products or devices.
[0060] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0061] See also Figure 1 As shown, an embodiment of the present application provides a method for generating and identifying a multiple two-dimensional code data array. The method for generating and identifying a multiple two-dimensional code data array includes:
[0062] Based on the information attributes of the original data, the original data is divided into a number of data blocks; based on the data characteristics of each data block, a coding algorithm matching each data block is determined, and based on the coding algorithm, a two-dimensional code corresponding to the data block is generated;
[0063] Perform array layout and error correction on all two-dimensional codes corresponding to all data blocks to generate corresponding multi-two-dimensional code data arrays;
[0064] The multiple two-dimensional code data array is subjected to image preprocessing and two-dimensional code positioning processing to determine all candidate two-dimensional code areas corresponding to the multiple two-dimensional code data array; all candidate two-dimensional code areas are subjected to two-dimensional code decoding processing and data reorganization processing to obtain corresponding original data.
[0065] The beneficial effects of the above embodiments are as follows: the multi-two-dimensional code data array generation and recognition method arranges multiple two-dimensional codes in an array form, and through corresponding generation and recognition algorithms, achieves significant improvement in information storage density and recognition speed while maintaining the original advantages of two-dimensional codes; and in the process of generating the multi-two-dimensional code data array, the spatial correlation between each two-dimensional code is fully considered to improve data storage efficiency and avoid error propagation during the recognition process; by introducing robust error correction extreme values and optimizing recognition algorithms, stable recognition of the multi-two-dimensional code data array in complex environments is ensured; it also effectively solves the limitations of existing two-dimensional codes in information transmission and processing, and realizes the one-time transmission of a large amount of complex information by generating a multi-two-dimensional code data array, improves recognition accuracy and efficiency, greatly improves information storage capacity, meets the needs of more complex scenarios, reduces the number of scans, improves the efficiency of information acquisition, ensures high recognition accuracy and reduces the risk of misreading.
[0066] In another embodiment, the original data is divided into several data blocks based on information attributes of the original data, including:
[0067] Step S1, using the following formula (1), according to the amount of data divided into several data blocks by the original data, determine the minimum value of the side length of the generated two-dimensional code,
[0068]
[0069] In the above formula (1), D min represents the minimum value of the side length of the generated two-dimensional code; K2(a) represents the amount of binary data of the a-th data block divided by the original data; k0 represents the amount of binary data that can be stored in the unit area of the two-dimensional code; S0 represents the unit area; μ represents the margin multiple; n represents the total number of data blocks divided by the original data; It means to substitute the value of a from 1 to n into the brackets to get the maximum value in the brackets;
[0070] Step S2, using the following formula (2), according to the minimum value and the preset maximum value of the two-dimensional code side length and the total number of data blocks into which the original data is divided, the exponential base of the generated two-dimensional code side length is obtained,
[0071]
[0072] In the above formula (2), G represents the exponential base of the length of the generated two-dimensional code side; D max Indicates the preset maximum value of the length of the QR code side; max(,) means to find the maximum value on both sides of the comma in the brackets;
[0073] Step S3, using the following formula (3), according to the minimum value and the preset maximum value of the two-dimensional code side length and the exponential base of the generated two-dimensional code side length, determine the side length value of the two-dimensional code corresponding to each data block,
[0074]
[0075] In the above formula (3), D(a) represents the side length value of the two-dimensional code corresponding to the a-th data block.
[0076] The beneficial effect of the above embodiment is that the minimum value of the generated two-dimensional code side length is determined according to the data amount of the original data divided into several data blocks by using the above formula (1), so as to ensure that the data amount contained in the generated two-dimensional code can cover the data amount of each data block, thereby ensuring the reliability of the system; then the above formula (2) is used, according to the minimum value and the preset maximum value of the two-dimensional code side length and the total number of the original data divided into several data blocks, to obtain the exponential base of the generated two-dimensional code side length, so as to generate different two-dimensional code side length change states according to the state of the data block, so as to ensure that the side length state of the two-dimensional code corresponding to all data blocks can be covered between the minimum value and the preset maximum value of the two-dimensional code side length; then the above formula (3) is used, according to the minimum value and the preset maximum value of the two-dimensional code side length and the exponential base of the generated two-dimensional code side length, to determine the side length value of the two-dimensional code corresponding to each data block, so as to sort the data of each data block according to the length of the two-dimensional code side, so as to facilitate the subsequent reintegration of the data.
[0077] In another embodiment, based on the information attribute of the original data, the original data is divided into a plurality of data blocks; based on the data characteristics of each data block, a coding algorithm matching each data block is determined, and based on the coding algorithm, a two-dimensional code corresponding to the data block is generated, including:
[0078] Performing text semantic recognition on the original data to obtain text semantic distribution attributes of the original data; and dividing the original data into a plurality of data segments in sequence based on the text semantic distribution attributes;
[0079] Based on the data volume of each data segment and the preset two-dimensional code capacity, invalid data codes are removed or filled in for each data segment, so as to obtain a data block corresponding to the data segment;
[0080] Based on the information type and data amount of each data block, a coding algorithm matching each data block is selected; based on the information position corresponding to each data block within the original data and its matching coding algorithm and the side length value of the two-dimensional code, the data block is encoded to generate a two-dimensional code corresponding to each data block.
[0081] The beneficial effect of the above embodiment is that the multi-dimensional code data array includes several single two-dimensional codes arranged in an array form. The single two-dimensional code is the basic unit of the multi-dimensional code data array, so the accuracy of the single two-dimensional code directly affects the accuracy of the multi-dimensional code data array. In order to ensure the accuracy of the single two-dimensional code, it is necessary to strictly select multiple parameters such as the encoding, error correction level, version information, etc. of the data in the process of generating and converting the single two-dimensional code. At the same time, when editing multiple single two-dimensional codes to form a multi-dimensional code data array, it is necessary to consider the arrangement mode, spacing, mutual correlation, and possible overlap of the single two-dimensional codes; in order to maximize the information storage efficiency and recognition accuracy of the multi-dimensional code data array, the optimal array generation rules can be determined through a large number of experiments and tests to ensure that the generated multi-dimensional code data array not only meets the encoding rules of the two-dimensional code, but also meets specific application requirements. When generating a single two-dimensional code, a corresponding single two-dimensional code is generated for each information that needs to be encoded. This step needs to ensure the encoding quality and readability of each single two-dimensional code. When determining the array size of the multi-QR code data array, the number of rows and columns of the multi-QR code data array is determined according to the amount of information required and the recognition accuracy. Common array sizes include 1*1, 2*2, 3*3, etc. In addition, the specific position of each single QR code in the array is calculated based on the array size and the size of the single QR code. This step needs to take into account the spacing between different single QR codes and the overall layout of the array. The generated single QR codes are then combined according to the calculated positions to form a complete multi-QR code data array. During the combination process, it is necessary to ensure that each single QR code is arranged neatly and without overlap, and that the layout of the entire array is beautiful and easy to identify.
[0082] In actual operation, it is usually the original data with a large amount of information that needs to be converted into a multi-two-dimensional code data array. In order to ensure that all the single two-dimensional codes under the original data can fully and accurately correspond to the information of the original data after the original data is converted into a multi-two-dimensional code data array, it is necessary to reasonably divide the original data into blocks according to the number of single two-dimensional codes in the multi-two-dimensional code data array and the text information content obtained by the original data itself. The main principle of block division is to ensure that each single two-dimensional code can carry enough information, while also considering the capacity limit of the single two-dimensional code. The original data is subjected to text semantic recognition to obtain the text semantic distribution attribute of the original data; based on the text semantic distribution attribute, the original data is divided into several data segments in turn; based on the data amount of each data segment and the preset two-dimensional code capacity, invalid data codes are eliminated or data codes are filled in each data segment, so as to obtain the data block corresponding to the data segment. Specifically, for a multi-QR code data array containing 2 single QR codes, the original data is divided into two equal parts according to the data volume and the maximum capacity of the single QR code. If the data volume is small, the data can be divided into primary data and secondary data according to their importance, and encoded into two single QR codes respectively; for a multi-QR code data array containing 4 single QR codes, the data is divided into four parts, and each part of the data is encoded into a single QR code; if the amount of original data is not enough to fill four single QR codes, padding data (such as random characters, etc.) can be added to ensure that each single QR code has sufficient data volume; for a multi-QR code data array containing 9 single QR codes, the data is divided into nine parts, and each part of the data is encoded into a single QR code; similarly, if the amount of original data is not enough to fill nine single QR codes, padding data (such as random characters, etc.) can be added to ensure that each single QR code has sufficient data volume.
[0083] After the original data is divided into several data blocks, each data block is used as a basic unit, and each data block is converted into a two-dimensional code image using the two-dimensional code encoding standard. Specifically, based on the information type and data volume of each data block, a coding algorithm matching each data block is selected; based on the information position corresponding to each data block in the original data and its matching coding algorithm, the data block is encoded and processed to generate a two-dimensional code corresponding to each data block. To this end, a suitable version number and error correction level should be selected according to the data volume. For the selection of the version number, a suitable two-dimensional code version number can be selected according to the data volume to ensure that all data can be correctly encoded; and for the operation of the error correction level, in order to improve robustness, a higher error correction level (such as level H) can be selected, so that the data can be restored even if part of the two-dimensional code is damaged.
[0084] In another embodiment, array layout and error correction are performed on all two-dimensional codes corresponding to all data blocks to generate corresponding multi-two-dimensional code data arrays, including:
[0085] Determine the array size of the multi-dimensional code data array based on the information amount and recognition accuracy of all the two-dimensional codes corresponding to all the data blocks; wherein the array size includes the number of rows and columns of the multi-dimensional code data array;
[0086] Based on the array size and the sizes of all the two-dimensional codes, determine the positions of all the two-dimensional codes in the multi-two-dimensional code data array; and based on the positions, arrange all the two-dimensional codes in an array, so as to obtain an initial multi-two-dimensional code data array;
[0087] An error correction code is added to each two-dimensional code included in the initial multi-two-dimensional code data array, and a missing code is detected and reconstructed for each two-dimensional code, so as to obtain a final multi-two-dimensional code data array.
[0088] The beneficial effect of the above embodiment is that the array scale of the multi-dimensional code data array is determined based on the information amount and recognition accuracy corresponding to all the two-dimensional codes corresponding to all the data blocks; wherein the array scale includes the number of rows and columns of the multi-dimensional code data array, so that the array scale determines the arrangement and layout of all the single two-dimensional codes contained in the multi-dimensional code data array. Specifically, for a multi-dimensional code data array containing 2 single two-dimensional codes, a simple horizontal or vertical arrangement method can be used to combine the two single two-dimensional codes according to a predetermined arrangement method to generate a corresponding multi-dimensional code data array; for a multi-dimensional code data array containing 4 single two-dimensional codes, a 2*2 matrix arrangement method can be used to arrange the 4 single two-dimensional codes to ensure that the spacing between each single two-dimensional code is uniform and meets the recognition requirements; for a multi-dimensional code data array containing 9 single two-dimensional codes, a 3*3 matrix arrangement method can be used to arrange the 9 single two-dimensional codes to ensure that the spacing between each single two-dimensional code is uniform and meets the recognition requirements. In practical applications, this large-scale multi-dimensional code data array can be used to store more information or improve recognition accuracy.
[0089] In addition, in order to improve the robustness of the multi-QR code data array, it is necessary to add an error correction code to each single QR code. Specifically, during the encoding process, an additional error correction code is added to each single QR code, so that even if part of the single QR code is missing or damaged, the data can be recovered through other single QR codes. The corresponding data recovery algorithm is to detect the missing or damaged single QR code and try to recover the data from other single QR codes, that is, the information in the remaining single QR codes and the error correction code can be used to reconstruct the missing part.
[0090] In another embodiment, the multiple two-dimensional code data array is subjected to image preprocessing and two-dimensional code positioning processing to determine all candidate two-dimensional code regions corresponding to the multiple two-dimensional code data array; all candidate two-dimensional code regions are subjected to two-dimensional code decoding processing and data reorganization processing to obtain corresponding original data, including:
[0091] Performing pixel grayscale preprocessing, pixel binarization preprocessing, noise filtering preprocessing and edge pixel sharpening preprocessing on the multiple two-dimensional code data array;
[0092] Then, feature detection, template matching, edge detection, contour extraction and candidate area screening are performed on the multiple two-dimensional code data array to determine all candidate two-dimensional code areas corresponding to the multiple two-dimensional code data array;
[0093] Perform position correction, image cutting, black and white square recognition, format information reading, data decoding and error correction on each candidate QR code area to obtain the decoded data corresponding to each candidate QR code area;
[0094] Based on the corresponding information position of all decoded data within the original data, all decoded data are sorted and merged to obtain the corresponding original data; and then the original data is integrity checked and data recovered.
[0095] The beneficial effect of the above embodiment is that the multi-dimensional code data array is subjected to pixel grayscale preprocessing, pixel binarization preprocessing, noise filtering preprocessing and edge pixel sharpening preprocessing, which can reduce the noise component of the multi-dimensional code data array to improve the accuracy and efficiency of subsequent steps. Specifically, the multi-dimensional code data array is subjected to pixel grayscale preprocessing to convert the color image into a grayscale image to reduce the interference caused by color information; the grayscale image is converted into a black and white image through pixel binarization preprocessing to facilitate subsequent feature extraction; the noise is removed by using the corresponding filter through noise filtering preprocessing to improve the image quality; the edge pixel sharpening preprocessing can enhance the image contrast through histogram equalization and other methods to improve the recognition accuracy.
[0096] Then, the multi-dimensional code data array is subjected to feature detection, template matching, edge detection, contour extraction and candidate area screening to determine all candidate two-dimensional code areas corresponding to the multi-dimensional code data array, so that the two-dimensional code area for subsequent decoding processing can be quickly and accurately located. Specifically, through feature detection, a feature detection algorithm (such as Haar feature, SIFT, SURF and other algorithms) is used to detect the feature points of the two-dimensional code; through template matching, a template matching algorithm is used to identify the pattern of the two-dimensional code, especially the three positioning patterns of the two-dimensional code; through edge detection, an edge detection algorithm (such as Canny edge detection) is used to detect the boundary of the two-dimensional code; through contour extraction, the contour of the two-dimensional code is extracted from the result of edge detection; through candidate area screening, the possible two-dimensional code area is screened out by analyzing the geometric characteristics of the contour of the two-dimensional code (such as area and aspect ratio, etc.).
[0097] Each candidate two-dimensional code area is subjected to position correction, image cutting, black and white square recognition, format information reading, data decoding and error correction to obtain the decoded data corresponding to each candidate two-dimensional code area, so that the information contained in the candidate two-dimensional code area can be decoded. Specifically, through position correction, the two-dimensional code image is corrected according to the position and angle information of the positioning pattern; through image cutting, a complete two-dimensional code image is cut out from the candidate two-dimensional code area; through black and white square recognition, the state of the black and white squares in the two-dimensional code image is identified; through format information reading, the state information of the black and white squares is read to determine the version number and error correction level; through data decoding, according to the version number and error correction level, the two-dimensional code decoding algorithm is used to decode and obtain the data in the two-dimensional code; through error correction, if an error correction code exists, the corresponding error correction code is used to repair the possible errors.
[0098] Based on the corresponding information position of all decoded data in the original data, all decoded data are sorted and merged to obtain the corresponding original data; the original data is then checked for integrity and data recovery, so that the original data can be truly restored. Specifically, through sorting, the data is sorted according to the position or number of the QR code; through merging, the sorted data is merged into the original data stream; through integrity checking and data recovery, the integrity of the reorganized data is checked, and the error correction code is used to recover the data when necessary.
[0099] See also Figure 2 As shown, a multiple two-dimensional code data array generation and recognition system provided by an embodiment of the present application. The multiple two-dimensional code data array generation and recognition system includes:
[0100] The original data segmentation module is used to segment the original data into a plurality of data blocks based on the information attributes of the original data;
[0101] A single two-dimensional code generation module is used to determine a coding algorithm that matches each data block based on the data characteristics of each data block, and generate a two-dimensional code corresponding to the data block based on the coding algorithm;
[0102] A multi-two-dimensional code data array generation module is used to perform array layout and error correction on all two-dimensional codes corresponding to all data blocks to generate corresponding multi-two-dimensional code data arrays;
[0103] A multiple two-dimensional code data array preprocessing module is used to perform image preprocessing and two-dimensional code positioning processing on the multiple two-dimensional code data array, and determine all candidate two-dimensional code areas corresponding to the multiple two-dimensional code data array;
[0104] The multiple two-dimensional code data array decoding and reorganization module is used to perform two-dimensional code decoding processing and data reorganization processing on all candidate two-dimensional code areas to obtain corresponding original data.
[0105] The beneficial effects of the above embodiments are as follows: the multi-two-dimensional code data array generation and recognition system arranges multiple two-dimensional codes in an array form, and through corresponding generation and recognition algorithms, achieves significant improvement in information storage density and recognition speed while maintaining the original advantages of two-dimensional codes; and in the process of generating the multi-two-dimensional code data array, the spatial correlation between each two-dimensional code is fully considered to improve data storage efficiency and avoid error propagation during the recognition process; by introducing robust error correction extreme values and optimizing recognition algorithms, stable recognition of the multi-two-dimensional code data array in complex environments is ensured; it also effectively solves the limitations of existing two-dimensional codes in information transmission and processing, and realizes the one-time transmission of a large amount of complex information by generating a multi-two-dimensional code data array, improves recognition accuracy and efficiency, greatly increases information storage capacity, meets the needs of more complex scenarios, reduces the number of scans, improves the efficiency of information acquisition, ensures high recognition accuracy and reduces the risk of misreading.
[0106] In another embodiment, the original data segmentation module is used to segment the original data into a plurality of data blocks based on information attributes of the original data, including:
[0107] Performing text semantic recognition on the original data to obtain text semantic distribution attributes of the original data; and dividing the original data into a plurality of data segments in sequence based on the text semantic distribution attributes;
[0108] Based on the data volume of each data segment and the preset two-dimensional code capacity, invalid data codes are removed or filled in for each data segment, so as to obtain a data block corresponding to the data segment;
[0109] The single two-dimensional code generation module is used to determine the encoding algorithm matching each data block based on the data characteristics of each data block, and generate a two-dimensional code corresponding to the data block based on the encoding algorithm, including:
[0110] Based on the information type and data amount of each data block, a coding algorithm matching each data block is selected; based on the information position corresponding to each data block within the original data and its matching coding algorithm and the side length value of the two-dimensional code, the data block is encoded to generate a two-dimensional code corresponding to each data block.
[0111] The beneficial effect of the above embodiment is that the multi-dimensional code data array includes several single two-dimensional codes arranged in an array form. The single two-dimensional code is the basic unit of the multi-dimensional code data array, so the accuracy of the single two-dimensional code directly affects the accuracy of the multi-dimensional code data array. In order to ensure the accuracy of the single two-dimensional code, it is necessary to strictly select multiple parameters such as the encoding, error correction level, version information, etc. of the data in the process of generating and converting the single two-dimensional code. At the same time, when editing multiple single two-dimensional codes to form a multi-dimensional code data array, it is necessary to consider the arrangement mode, spacing, mutual correlation, and possible overlap of the single two-dimensional codes; in order to maximize the information storage efficiency and recognition accuracy of the multi-dimensional code data array, the optimal array generation rules can be determined through a large number of experiments and tests to ensure that the generated multi-dimensional code data array not only meets the encoding rules of the two-dimensional code, but also meets specific application requirements. When generating a single two-dimensional code, a corresponding single two-dimensional code is generated for each information that needs to be encoded. This step needs to ensure the encoding quality and readability of each single two-dimensional code. When determining the array size of the multi-QR code data array, the number of rows and columns of the multi-QR code data array is determined according to the amount of information required and the recognition accuracy. Common array sizes include 1*1, 2*2, 3*3, etc. In addition, the specific position of each single QR code in the array is calculated based on the array size and the size of the single QR code. This step needs to take into account the spacing between different single QR codes and the overall layout of the array. The generated single QR codes are then combined according to the calculated positions to form a complete multi-QR code data array. During the combination process, it is necessary to ensure that each single QR code is arranged neatly and without overlap, and that the layout of the entire array is beautiful and easy to identify.
[0112] In actual operation, it is usually the original data with a large amount of information that needs to be converted into a multi-two-dimensional code data array. In order to ensure that all the single two-dimensional codes under the original data can fully and accurately correspond to the information of the original data after the original data is converted into a multi-two-dimensional code data array, it is necessary to reasonably divide the original data into blocks according to the number of single two-dimensional codes in the multi-two-dimensional code data array and the text information content obtained by the original data itself. The main principle of block division is to ensure that each single two-dimensional code can carry enough information, while also considering the capacity limit of the single two-dimensional code. The original data is subjected to text semantic recognition to obtain the text semantic distribution attribute of the original data; based on the text semantic distribution attribute, the original data is divided into several data segments in turn; based on the data amount of each data segment and the preset two-dimensional code capacity, invalid data codes are eliminated or data codes are filled in each data segment, so as to obtain the data block corresponding to the data segment. Specifically, for a multi-QR code data array containing 2 single QR codes, the original data is divided into two equal parts according to the data volume and the maximum capacity of the single QR code. If the data volume is small, the data can be divided into primary data and secondary data according to their importance, and encoded into two single QR codes respectively; for a multi-QR code data array containing 4 single QR codes, the data is divided into four parts, and each part of the data is encoded into a single QR code; if the amount of original data is not enough to fill four single QR codes, padding data (such as random characters, etc.) can be added to ensure that each single QR code has sufficient data volume; for a multi-QR code data array containing 9 single QR codes, the data is divided into nine parts, and each part of the data is encoded into a single QR code; similarly, if the amount of original data is not enough to fill nine single QR codes, padding data (such as random characters, etc.) can be added to ensure that each single QR code has sufficient data volume.
[0113] After the original data is divided into several data blocks, each data block is used as a basic unit, and each data block is converted into a two-dimensional code image using the two-dimensional code encoding standard. Specifically, based on the information type and data volume of each data block, a coding algorithm matching each data block is selected; based on the information position corresponding to each data block in the original data and its matching coding algorithm, the data block is encoded and processed to generate a two-dimensional code corresponding to each data block. To this end, a suitable version number and error correction level should be selected according to the data volume. For the selection of the version number, a suitable two-dimensional code version number can be selected according to the data volume to ensure that all data can be correctly encoded; and for the operation of the error correction level, in order to improve robustness, a higher error correction level (such as level H) can be selected, so that the data can be restored even if part of the two-dimensional code is damaged.
[0114] In another embodiment, the multi-two-dimensional code data array generation module is used to perform array layout and error correction on all two-dimensional codes corresponding to all data blocks to generate corresponding multi-two-dimensional code data arrays, including:
[0115] Determine the array size of the multi-dimensional code data array based on the information amount and recognition accuracy of all the two-dimensional codes corresponding to all the data blocks; wherein the array size includes the number of rows and columns of the multi-dimensional code data array;
[0116] Based on the array size and the sizes of all the two-dimensional codes, determine the positions of all the two-dimensional codes in the multi-two-dimensional code data array; and based on the positions, arrange all the two-dimensional codes in an array, so as to obtain an initial multi-two-dimensional code data array;
[0117] An error correction code is added to each two-dimensional code included in the initial multi-two-dimensional code data array, and a missing code is detected and reconstructed for each two-dimensional code, so as to obtain a final multi-two-dimensional code data array.
[0118] The beneficial effect of the above embodiment is that the array scale of the multi-dimensional code data array is determined based on the information amount and recognition accuracy corresponding to all the two-dimensional codes corresponding to all the data blocks; wherein the array scale includes the number of rows and columns of the multi-dimensional code data array, so that the array scale determines the arrangement and layout of all the single two-dimensional codes contained in the multi-dimensional code data array. Specifically, for a multi-dimensional code data array containing 2 single two-dimensional codes, a simple horizontal or vertical arrangement method can be used to combine the two single two-dimensional codes according to a predetermined arrangement method to generate a corresponding multi-dimensional code data array; for a multi-dimensional code data array containing 4 single two-dimensional codes, a 2*2 matrix arrangement method can be used to arrange the 4 single two-dimensional codes to ensure that the spacing between each single two-dimensional code is uniform and meets the recognition requirements; for a multi-dimensional code data array containing 9 single two-dimensional codes, a 3*3 matrix arrangement method can be used to arrange the 9 single two-dimensional codes to ensure that the spacing between each single two-dimensional code is uniform and meets the recognition requirements. In practical applications, this large-scale multi-dimensional code data array can be used to store more information or improve recognition accuracy.
[0119] In addition, in order to improve the robustness of the multi-QR code data array, it is necessary to add an error correction code to each single QR code. Specifically, during the encoding process, an additional error correction code is added to each single QR code, so that even if part of the single QR code is missing or damaged, the data can be recovered through other single QR codes. The corresponding data recovery algorithm is to detect the missing or damaged single QR code and try to recover the data from other single QR codes, that is, the information in the remaining single QR codes and the error correction code can be used to reconstruct the missing part.
[0120] In another embodiment, the multi-two-dimensional code data array preprocessing module is used to perform image preprocessing and two-dimensional code positioning processing on the multi-two-dimensional code data array, and determine all candidate two-dimensional code regions corresponding to the multi-two-dimensional code data array, including:
[0121] Performing pixel grayscale preprocessing, pixel binarization preprocessing, noise filtering preprocessing and edge pixel sharpening preprocessing on the multiple two-dimensional code data array;
[0122] Then, feature detection, template matching, edge detection, contour extraction and candidate area screening are performed on the multiple two-dimensional code data array to determine all candidate two-dimensional code areas corresponding to the multiple two-dimensional code data array;
[0123] The multiple two-dimensional code data array decoding and reorganization module is used to perform two-dimensional code decoding processing and data reorganization processing on all candidate two-dimensional code areas to obtain corresponding original data, including:
[0124] Perform position correction, image cutting, black and white square recognition, format information reading, data decoding and error correction on each candidate QR code area to obtain the decoded data corresponding to each candidate QR code area;
[0125] Based on the corresponding information position of all decoded data within the original data, all decoded data are sorted and merged to obtain the corresponding original data; and then the original data is integrity checked and data recovered.
[0126] The beneficial effect of the above embodiment is that the multi-dimensional code data array is subjected to pixel grayscale preprocessing, pixel binarization preprocessing, noise filtering preprocessing and edge pixel sharpening preprocessing, which can reduce the noise component of the multi-dimensional code data array to improve the accuracy and efficiency of subsequent steps. Specifically, the multi-dimensional code data array is subjected to pixel grayscale preprocessing to convert the color image into a grayscale image to reduce the interference caused by color information; the grayscale image is converted into a black and white image through pixel binarization preprocessing to facilitate subsequent feature extraction; the noise is removed by using the corresponding filter through noise filtering preprocessing to improve the image quality; the edge pixel sharpening preprocessing can enhance the image contrast through histogram equalization and other methods to improve the recognition accuracy.
[0127] Then, the multi-dimensional code data array is subjected to feature detection, template matching, edge detection, contour extraction and candidate area screening to determine all candidate two-dimensional code areas corresponding to the multi-dimensional code data array, so that the two-dimensional code area for subsequent decoding processing can be quickly and accurately located. Specifically, through feature detection, a feature detection algorithm (such as Haar feature, SIFT, SURF and other algorithms) is used to detect the feature points of the two-dimensional code; through template matching, a template matching algorithm is used to identify the pattern of the two-dimensional code, especially the three positioning patterns of the two-dimensional code; through edge detection, an edge detection algorithm (such as Canny edge detection) is used to detect the boundary of the two-dimensional code; through contour extraction, the contour of the two-dimensional code is extracted from the result of edge detection; through candidate area screening, the possible two-dimensional code area is screened out by analyzing the geometric characteristics of the contour of the two-dimensional code (such as area and aspect ratio, etc.).
[0128] Each candidate two-dimensional code area is subjected to position correction, image cutting, black and white square recognition, format information reading, data decoding and error correction to obtain the decoded data corresponding to each candidate two-dimensional code area, so that the information contained in the candidate two-dimensional code area can be decoded. Specifically, through position correction, the two-dimensional code image is corrected according to the position and angle information of the positioning pattern; through image cutting, a complete two-dimensional code image is cut out from the candidate two-dimensional code area; through black and white square recognition, the state of the black and white squares in the two-dimensional code image is identified; through format information reading, the state information of the black and white squares is read to determine the version number and error correction level; through data decoding, according to the version number and error correction level, the two-dimensional code decoding algorithm is used to decode and obtain the data in the two-dimensional code; through error correction, if an error correction code exists, the corresponding error correction code is used to repair the possible errors.
[0129] Based on the corresponding information position of all decoded data in the original data, all decoded data are sorted and merged to obtain the corresponding original data; the original data is then checked for integrity and data recovery, so that the original data can be truly restored. Specifically, through sorting, the data is sorted according to the position or number of the QR code; through merging, the sorted data is merged into the original data stream; through integrity checking and data recovery, the integrity of the reorganized data is checked, and the error correction code is used to recover the data when necessary.
[0130] The multi-two-dimensional code data array generation and recognition method and system of the present application have the following beneficial effects:
[0131] First, compared with a single QR code, a multi-QR code data array can store several or even dozens of times more information, greatly expanding the application scope of QR codes. For example, in the medical field, a patient's complete medical history, examination report and other information can be integrated into a multi-QR code data array for quick access and sharing.
[0132] Second, because the number of scans is reduced, the efficiency of information acquisition is significantly improved, especially in scenarios such as logistics and warehousing where a large amount of item information needs to be processed quickly, which can greatly shorten the operation time and improve work efficiency. Take express sorting as an example. In the past, it was necessary to scan a single QR code on multiple packages one by one. Now, you only need to scan an array of multiple QR codes to obtain all relevant information.
[0133] Third, through optimized generation and recognition algorithms, as well as verification mechanisms, the recognition accuracy is effectively guaranteed, reducing the losses and risks caused by information errors; in areas such as commodity trading where information accuracy is extremely high, it can ensure the security and accuracy of transactions;
[0134] Fourth, the multi-QR code array generation method is highly flexible and scalable. Whether generating 2, 4 or 9 multi-QR code data arrays, it can be easily handled, and the generated multi-QR code data array has a clear structure and is easy to identify. This flexibility enables the technology to be widely used in various scenarios to meet the needs of different users;
[0135] Fifth, the present application can quickly and accurately identify each QR code in a multi-QR code data array, improve user experience, ensure the real-time and accuracy of information transmission, greatly shorten user waiting time, and improve work efficiency;
[0136] Sixth, it can maintain a high level of recognition rate and transmission rate in various environments and conditions, ensuring that users can enjoy convenient information services anytime and anywhere.
[0137] For a multi-QR code data array containing two single QR codes, it can be applied to situations that require simple data partitioning or dual verification. For example, in file management, an important document can be split into two parts, encoded into two QR codes and formed into an array to ensure the integrity and security of the document; users need to scan the two QR codes at the same time to obtain the complete document content, thereby enhancing data security.
[0138] For a multi-QR code data array containing four single QR codes, in the field of logistics, this array can be used to record detailed information of the package, such as the consignor, consignee, item description and transportation route, etc. Each QR code stores a part of the information, and by scanning the entire array, comprehensive information of the package can be quickly obtained, improving the efficiency and accuracy of logistics processing.
[0139] The multi-QR code data array containing 9 single QR codes is suitable for occasions that need to process large amounts of data or achieve high-level data redundancy. In the field of intelligent manufacturing, this array can be used to store data on the entire life cycle of a product, including information on design, production, quality inspection, sales, and after-sales service. By scanning 9 QR codes, the complete history of the product can be quickly obtained, providing strong support for quality traceability, fault analysis, and predictive maintenance.
[0140] In general, the multi-two-dimensional code data array generation and recognition method and system arrange multiple two-dimensional codes in an array form, and through corresponding generation and recognition algorithms, achieve significantly improved information storage density and recognition speed while maintaining the original advantages of two-dimensional codes; and in the process of generating the multi-two-dimensional code data array, the spatial correlation between each two-dimensional code is fully considered to improve data storage efficiency and avoid error propagation during the recognition process; by introducing robust error correction extremes and optimizing recognition algorithms, stable recognition of the multi-two-dimensional code data array in complex environments is ensured; it also effectively solves the limitations of existing two-dimensional codes in information transmission and processing, and realizes the one-time transmission of a large amount of complex information by generating a multi-two-dimensional code data array, improves recognition accuracy and efficiency, greatly increases information storage capacity, meets the needs of more complex scenarios, reduces the number of scans, improves the efficiency of information acquisition, ensures high recognition accuracy and reduces the risk of misreading.
[0141] The above is only a specific implementation of the present invention, and any other improvements made based on the concept of the present invention are considered to be within the protection scope of the present invention.
Claims
1. A method for generating and recognizing a multi-dimensional code data array, characterized in that: include: Based on information attributes of the original data, dividing the original data into a plurality of data blocks; Based on the data features of each data block, determine a coding algorithm that matches each data block, and based on the coding algorithm, generate a two-dimensional code corresponding to the data block; Perform array layout and error correction on all two-dimensional codes corresponding to all data blocks to generate corresponding multi-two-dimensional code data arrays; The multiple two-dimensional code data array is subjected to image preprocessing and two-dimensional code positioning processing to determine all candidate two-dimensional code areas corresponding to the multiple two-dimensional code data array; all candidate two-dimensional code areas are subjected to two-dimensional code decoding processing and data reorganization processing to obtain corresponding original data.
2. The method for generating and recognizing a multi-dimensional code data array according to claim 1, wherein: Based on the information attributes of the original data, the original data is divided into several data blocks, including: Step S1, using the following formula (1), according to the amount of data divided into several data blocks of the original data, determine the minimum value of the side length of the generated two-dimensional code, In the above formula (1), D min represents the minimum value of the side length of the generated two-dimensional code; K2(a) represents the amount of binary data of the a-th data block into which the original data is divided; k0 represents the amount of binary data that can be stored in the unit area of the two-dimensional code; S0 represents the unit area; μ represents the margin multiple; n represents the total number of data blocks into which the original data is divided; It means to substitute the value of a from 1 to n into the brackets to get the maximum value in the brackets; Step S2, using the following formula (2), according to the minimum value and the preset maximum value of the two-dimensional code side length and the total number of data blocks into which the original data is divided, obtain the exponential base of the generated two-dimensional code side length, In the above formula (2), G represents the exponential base of the length of the generated two-dimensional code side; D max Indicates the preset maximum value of the length of the QR code side; max(,) means to find the maximum value on both sides of the comma in the brackets; Step S3, using the following formula (3), according to the minimum value and the preset maximum value of the two-dimensional code side length and the exponential base of the generated two-dimensional code side length, determine the side length value of the two-dimensional code corresponding to each data block, In the above formula (3), D(a) represents the side length value of the two-dimensional code corresponding to the a-th data block.
3. The method for generating and recognizing a multi-dimensional code data array according to claim 1, wherein: Based on the information attributes of the original data, the original data is divided into a plurality of data blocks; based on the data characteristics of each data block, a coding algorithm matching each data block is determined, and based on the coding algorithm, a two-dimensional code corresponding to the data block is generated, including: Performing text semantic recognition on the original data to obtain text semantic distribution attributes of the original data; Based on the semantic distribution attribute of the text, the original data is divided into several data segments in turn; based on the data amount of each data segment and the preset two-dimensional code capacity, invalid data codes are removed or filled with data codes for each data segment, so as to obtain a data block corresponding to the data segment; based on the information type and data amount of each data block, a coding algorithm matching each data block is selected; based on the information position corresponding to each data block in the original data and its matching coding algorithm and the side length value of the two-dimensional code, the data block is encoded to generate a two-dimensional code corresponding to each data block.
4. The method for generating and recognizing a multi-dimensional code data array according to claim 1, wherein: Perform array layout and error correction on all two-dimensional codes corresponding to all data blocks to generate corresponding multi-two-dimensional code data arrays, including: Determine the array size of the multi-two-dimensional code data array based on the information amount and recognition accuracy of all the two-dimensional codes corresponding to all the data blocks; wherein the array size includes the number of rows and columns of the multi-two-dimensional code data array; Based on the array scale and the sizes of all the two-dimensional codes, determine the positions of all the two-dimensional codes in the multi-two-dimensional code data array; and based on the positions, perform array layout on all the two-dimensional codes, so as to obtain an initial multi-two-dimensional code data array; An error correction code is added to each two-dimensional code included in the initial multi-two-dimensional code data array, and a missing code is detected and reconstructed for each two-dimensional code, so as to obtain a final multi-two-dimensional code data array.
5. The method for generating and recognizing multiple two-dimensional code data arrays according to claim 1, wherein: Performing image preprocessing and two-dimensional code positioning processing on the multiple two-dimensional code data array to determine all candidate two-dimensional code regions corresponding to the multiple two-dimensional code data array; Perform QR code decoding and data reorganization on all candidate QR code areas to obtain the corresponding original data, including: Performing pixel grayscale preprocessing, pixel binarization preprocessing, noise filtering preprocessing and edge pixel sharpening preprocessing on the multiple two-dimensional code data array; Then, feature detection, template matching, edge detection, contour extraction and candidate area screening are performed on the multiple two-dimensional code data array to determine all candidate two-dimensional code areas corresponding to the multiple two-dimensional code data array; Perform position correction, image cutting, black and white square recognition, format information reading, data decoding and error correction on each candidate QR code area to obtain the decoded data corresponding to each candidate QR code area; Based on the corresponding information positions contained in all decoded data within the original data, all decoded data are sorted and merged to obtain corresponding original data; and then the original data is integrity checked and data recovered.
6. A multi-dimensional code data array generation and recognition system, characterized in that: include: An original data segmentation module, used for segmenting the original data into a plurality of data blocks based on information attributes of the original data; A single two-dimensional code generation module is used to determine a coding algorithm that matches each data block based on the data characteristics of each data block, and generate a two-dimensional code corresponding to the data block based on the coding algorithm; A multi-two-dimensional code data array generation module is used to perform array layout and error correction on all two-dimensional codes corresponding to all data blocks to generate corresponding multi-two-dimensional code data arrays; A multiple two-dimensional code data array preprocessing module, used to perform image preprocessing and two-dimensional code positioning processing on the multiple two-dimensional code data array, and determine all candidate two-dimensional code regions corresponding to the multiple two-dimensional code data array; The multiple two-dimensional code data array decoding and reorganization module is used to perform two-dimensional code decoding processing and data reorganization processing on all candidate two-dimensional code areas to obtain corresponding original data.
7. The multi-two-dimensional code data array generation and recognition system according to claim 6, characterized in that: The original data segmentation module is used to segment the original data into a plurality of data blocks based on information attributes of the original data, including: Performing text semantic recognition on the original data to obtain text semantic distribution attributes of the original data; Based on the text semantic distribution attribute, the original data is divided into a plurality of data segments in sequence; based on the data volume of each data segment and the preset two-dimensional code capacity, invalid data codes are removed or filled in for each data segment, so as to obtain a data block corresponding to the data segment; the single two-dimensional code generation module is used to determine the encoding algorithm matching each data block based on the data characteristics of each data block, and generate a two-dimensional code corresponding to the data block based on the encoding algorithm, including: Based on the information type and data amount of each data block, a coding algorithm matching each data block is selected; based on the information position corresponding to each data block within the original data and its matching coding algorithm and the side length value of the two-dimensional code, the data block is encoded to generate a two-dimensional code corresponding to each data block.
8. The multi-two-dimensional code data array generation and recognition system according to claim 6, characterized in that: The multi-two-dimensional code data array generation module is used to perform array layout and error correction on all two-dimensional codes corresponding to all data blocks to generate corresponding multi-two-dimensional code data arrays, including: Determine the array size of the multi-two-dimensional code data array based on the information amount and recognition accuracy of all the two-dimensional codes corresponding to all the data blocks; wherein the array size includes the number of rows and columns of the multi-two-dimensional code data array; Based on the array scale and the sizes of all the two-dimensional codes, determine the positions of all the two-dimensional codes in the multi-two-dimensional code data array; and based on the positions, perform array layout on all the two-dimensional codes, so as to obtain an initial multi-two-dimensional code data array; An error correction code is added to each two-dimensional code included in the initial multi-two-dimensional code data array, and a missing code is detected and reconstructed for each two-dimensional code, so as to obtain a final multi-two-dimensional code data array.
9. The multi-two-dimensional code data array generation and recognition system according to claim 6, characterized in that: The multi-two-dimensional code data array preprocessing module is used to perform image preprocessing and two-dimensional code positioning processing on the multi-two-dimensional code data array, and determine all candidate two-dimensional code areas corresponding to the multi-two-dimensional code data array, including: Performing pixel grayscale preprocessing, pixel binarization preprocessing, noise filtering preprocessing and edge pixel sharpening preprocessing on the multiple two-dimensional code data array; Then, feature detection, template matching, edge detection, contour extraction and candidate area screening are performed on the multiple two-dimensional code data array to determine all candidate two-dimensional code areas corresponding to the multiple two-dimensional code data array; The multi-two-dimensional code data array decoding and reorganization module is used to perform two-dimensional code decoding processing and data reorganization processing on all candidate two-dimensional code areas to obtain corresponding original data, including: Perform position correction, image cutting, black and white square recognition, format information reading, data decoding and error correction on each candidate QR code area to obtain the decoded data corresponding to each candidate QR code area; Based on the corresponding information positions contained in all decoded data within the original data, all decoded data are sorted and merged to obtain corresponding original data; and then the original data is integrity checked and data recovered.
Citation Information
Cited By
Complexity-based two-dimensional code generation method
CN120337964A
Complexity-based two-dimensional code generation method
CN120337964B