Method for generating and decoding a two-dimensional code of an information carrier
The method of forming and decoding an aggregating two-dimensional code addresses data capacity and stability issues in QR code-based identification documents by dividing data into blocks, aggregating QR codes, and using a control code table, enhancing data capacity and stability with smartphone readability.
Patent Information
- Application Number
- PCT/RU2024/050281
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-11-27
- Filing Date
- 2024-11-05
- Publication Date
- 2025-06-05
AI Technical Summary
Existing QR code-based identification document systems face limitations in data capacity and stability due to the inability of many scanners to read multiple QR codes simultaneously, the need for additional software modules, increased mechanical damage risk, and reduced readability under varying lighting conditions.
A method for forming an aggregating two-dimensional code by dividing data into blocks, generating QR codes for each block, and layer-by-layer bitwise aggregation, using a control code table for encoding and decoding, which includes determining the color and symbol in each cell, and applying it to an information carrier.
Increases data capacity while maintaining readability and stability across different lighting conditions, allowing use with built-in smartphone cameras and reducing production costs compared to electronic microcircuits.
Smart Images

Figure RU2024050281_05062025_PF_FP_ABST
Abstract
Description
METHOD OF FORMING AND DECODING A TWO-DIMENSIONAL CODE OF AN INFORMATION CARRIER Field of technology
[0001] The proposed inventions relate to the field of forming information carriers containing an aggregating two-dimensional code, such as identification documents or information carriers containing technological instructions or information materials, as well as for use for marketing purposes.
[0002] The main problems faced by consumers in the market of systems for working with identification documents using QR code-based solutions are determined by the limitation on the amount of information that can be placed in a QR code and the requirement to maintain the stability of reading QR codes at a given level.
[0003] In an attempt to increase the amount of data that can be stored using a QR code, the following types of solutions can be identified.
[0004] Using two or more QR codes in one document or using an additional two-dimensional barcode in addition to the main QR code, made using the "invisible barcode" technology. Obviously, this method of increasing the volume of information placed on an identification document by using several smaller QR codes has the following disadvantages:
[0005] 1) a limitation on the number of available models of QR code scanners due to the lack of functionality in a number of models for simultaneously reading several QR codes with subsequent combination of the received information into a single block, as well as the functionality for reading “invisible QR codes”;
[0006] 2) standard applications for mobile devices do not have the functionality of simultaneously reading several QR codes and then combining the received information into a single block, which may require the development of additional software modules for systems that work with QR codes;
[0007] 3) the total area, taking into account the mandatory dividing fields between QR codes, occupied by several QR codes on a document exceeds the area occupied by a higher-level QR code, which increases the likelihood of mechanical damage to the entire information field occupied on the document by QR codes.
[0008] 4) the placement on the identification document of 2 or more QR codes of version less than 30 instead of one QR code of version 40 will lead to a forced reduction in the size of the entire field of each of the located QR codes, and, taking into account the number of elements by version, and each individual module of the QR code, will lead to a significant decrease in the readability of the entire QR code by scanners, control terminals and mobile devices.
[0009] The second way to increase the amount of data that can be stored using a QR code is to use halftone or color cells instead of cells containing black and white. Increasing the number of colors, on the one hand, increases the amount of information that can be stored using a QR code, but on the other hand, it imposes restrictions on the minimum cell size, and therefore increases the size of the QR code, while the number of colors used is limited by both the capabilities of printing devices and the capabilities of reading devices.
[0010] For example, DataMatrix codes proposed in US 2022 / 0327302 A1, published 13.10.2022, formed on the basis of colored rectangular elements with 3-bit color coding, can be used to mark labels of containers and test tubes with materials for biochemical research, but only for a small number of colors in the code palette and only for codes with a low density of image elements. With an increase in the number of colors in the code and the use of densely located and boundary-unseparated rectangular elements for forming an image, as well as in the absence of a control color code table in the image, this solution will be very dependent (when used for contactless reading of the code image) on the conditions of external lighting. The presence of color components in external light sources can lead to a significant shift in the color palette of the scanned image, thereby causing decoding errors.
[0011] US 7032823 B2, published 25.04.2006 describes the process of forming a bit stream for forming a 5-layer array (RGB layers, brightness and scale layers), while providing for the use of a distributed control color palette in the QR code. This technology does not take into account the color features when printing document images and the features of the document scanning process by mobile devices when conducting checks in various lighting conditions. In conditions of mass use with currently available printing / reading devices, the use of such technology is difficult and will lead to a large number of decoding errors.
[0012] There are also known attempts to create two-dimensional codes containing colored figures in the form of triangles as the main elements of data encoding (US 7936901 B2, published 03.05.2011 and CN 111723890 A, published 29.09.2020). The use of this technology is not applicable when creating information carriers, since the regular structures of halftone figures make it almost impossible to use mobile devices that use contrast or phase autofocus technologies to read them. In addition, in various lighting conditions when scanning identification documents with mobile devices, it is almost impossible to obtain an image in which it is guaranteed to identify figures with close halftones of the same color.
[0013] CN 107895187 A, published 10.04.2018, shows a method for forming a two-dimensional code of a symbolic type, but its applicability is positioned only for the exchange of short messages, without application in the field of identification documents. An example of a simple non-standard matrix code of an undefined format is given. The purpose of reducing the code volume is declared to combat the possibility of using codes as carriers of computer viruses.
[0014] The closest to the claimed invention is patent US 9805296 B2, published 10 / 31 / 2017, which discloses a method for generating a multilayer color QR code from data to be encoded, including:
[0015] dividing the data to be encoded into a plurality of data blocks according to the number of layers and the error correction level of each layer specified by the user;
[0016] breaking down the data in all data blocks into bits;
[0017] independent encoding of separated data blocks into multiple monochrome QR codes, where each monochrome QR code has the same dimension;
[0018] shuffling the data blocks in each monochrome QR code randomly or based on the size of each monochrome QR code;
[0019] combining all monochrome QR codes to create a multi-layer color QR code using a predefined color code table; and
[0020] adding color constraints to spatial patterns,
[0021] adding color constraints to spatial templates involves: coloring all search templates and alignment templates with a set of colors to reduce false positives during the localization process.
[0022] The disadvantages of this method of generating a multilayer color QR code include the use of standard forms of QR code elements to form the resulting image of a multilayer color QR code, completely filled with color from the code palette, and having a common border - this solution is not applicable for using high-density QR codes (version 20 and higher) in identification documents, since when printing boundary-unseparated multi-colored elements, boundary mixing of colors will occur, which will cause the appearance of colors that are not in the palette and will lead to significant distortion of the boundaries of the QR code elements.
[0023] This patent also discloses a method for decoding a multi-layer color QR code, including:
[0024] capturing an image of one or more two-dimensional multi-layer color QR codes having multiple layers of encoded data;
[0025] Detecting coarse locations of colored QR codes using an offline-trained sliding window based QR code detector;
[0026] creating a corrected color QR code inside each detected uneven location, which is generated using a robust geometric transformation algorithm;
[0027] performing color restoration on the corrected color QR code by restoring the original color of each color pixel of the corrected color QR code using a color classifier trained offline, and further decomposing the restored color QR code into multiple monochrome QR codes using a predetermined color code table used in the encoding process; and
[0028] extracting encoded data from monochrome QR codes layer by layer and merging monochrome QR codes to output the data encoded in the captured color QR code.
[0029] The disadvantages of this method of decoding a multilayer color QR code include the inapplicability of this method for use in the processes of verifying identification documents, since the capture of an image of two-dimensional multilayer color QR codes formed from boundary-unseparated multi-colored elements, when reading from a detecting device, is highly dependent on lighting conditions (in particular, on the intensity of light sources and the color spectrum of light sources), and color interference at the boundaries of the QR code elements, especially for density QR codes (versions 21 and higher).
[0030] The claimed invention is aimed at eliminating the shortcomings of known technical solutions. Disclosure of the essence of the invention
[0031] The technical result of the claimed invention is an increase in the volume of information placed in the aggregating two-dimensional code of the information carrier while maintaining the possibility of recognition by built-in cameras of smartphones and subsequent decoding.
[0032] The technical result is achieved by a method for forming an aggregating two-dimensional code of an information carrier, which includes the following actions:
[0033] a) select a format that includes the version and noise immunity of the QR code used for further aggregation;
[0034] b) form at least one set of information to be placed in the aggregating two-dimensional code;
[0035] c) each generated set of information is converted into a bit array of data;
[0036] d) break down each generated bit array of data, exceeding the volume permissible for the selected QR code format, into a set of blocks corresponding to the permissible volume of data of the selected QR code format;
[0037] e) for each data block from the received at least one set of data blocks, a QR code is generated according to the selected format;
[0038] f) the obtained QR codes are placed in at least one matrix of aggregated values of dimension [n, n, m+1], where n is the dimension of the two-dimensional matrix of the selected QR code format, m is the number of QR codes being aggregated;
[0039] g) for each individual data element of the used QR code format, layer-by-layer bitwise aggregation is performed on the (m+1)-th aggregation layer of each matrix, obtaining an identifier for each cell of the (m+1)-th aggregation layer;
[0040] h) determine the dimensionality of the parts of the identifier responsible for encoding information in the cells of the aggregating two-dimensional code, determining the color of the symbol and the symbol in the cell, and form a control code table used for encoding;
[0041] i) generate an image of the markup elements of the aggregating two-dimensional code;
[0042] j) using the identifier values from each cell of the (m+1)th aggregating layer of each matrix of aggregated values, in accordance with the control code table, an image of the resulting aggregating two-dimensional code is formed, wherein the number of symbols in one cell of the aggregating two-dimensional code corresponds to the number of matrices of aggregated values;
[0043] k) fields with a control code table are added to the generated image of the aggregating two-dimensional code;
[0044] l) the generated image of the aggregating two-dimensional code is applied to the information carrier.
[0045] In particular, additionally, according to action h), the part of the identifier responsible for the color of the cell border is determined.
[0046] In particular, additionally according to action h) the part of the identifier responsible for the color or optical density of the cell background is determined.
[0047] In particular, fields with a control code table are placed in the form of a distributed set of elements of an aggregating two-dimensional code in the selected fields of data elements or markup elements of an aggregating two-dimensional code.
[0048] In particular, at least one of the generated QR codes contains means for restricting access to the information contained therein.
[0049] In particular, additional information on the quantity and / or order of placement in the matrix assembly is added to the control code table.
[0050] In particular, information about the version of the aggregated QR codes is additionally added to the control code table.
[0051] The technical result is also achieved through a method of decoding the image of an aggregating two-dimensional code of an information carrier, which includes the following actions:
[0052] a) scan the image of the aggregating two-dimensional code from the information carrier;
[0053] b) carry out detection of images of markup elements of the aggregating two-dimensional code;
[0054] c) the resulting image is positioned using the selected markup elements;
[0055] d) using the black and white fields of the search template markup elements, determines the boundaries of the dynamic range and corrects the white balance in the image of the aggregating two-dimensional code;
[0056] e) decompose the image of the aggregating two-dimensional code and form a set of images of its elements with indexing corresponding to the numbering of the QR code data modules;
[0057] f) extract from the image the aggregating two-dimensional code of the control code table;
[0058] g) using the control code table, the coding elements that determine the color of the symbol and the symbol in the cell are determined, and the dimensions of the parts of the identifier used to encode information that determine the color of the symbol and the symbol in the cell are determined, and the number and method of extracting QR codes from the aggregating two-dimensional code are determined;
[0059] h) determine the parameters of the required color correction based on the analysis of the parameters of the control images of the code color marks for the color of the symbols;
[0060] i) carry out color correction of the set of images of data elements of the aggregating two-dimensional code;
[0061] j) the entire set of images of the aggregating two-dimensional code is recognized and at least one matrix of identifiers of its elements is formed, wherein the number of matrices formed corresponds to the number of symbols in one cell of the aggregating two-dimensional code specified in the control code table;
[0062] k) from each matrix of identifiers, the layers of the constituent QR codes are reconstructed;
[0063] l) carry out layer-by-layer decoding of information from the constituent QR codes with subsequent distribution into sets of information;
[0064] m) the decoded information is displayed on the screen of the control device.
[0065] In particular, additionally, according to action g), the part of the identifier responsible for the color of the cell border is determined.
[0066] In particular, additionally according to action g), the part of the identifier responsible for the color or optical density of the cell background is determined.
[0067] Fig. 1 - structure of QR code markup elements version 7.
[0068] 1 - Free zone, 2 - Search pattern, 3 - Separator, 4 - Sync pattern, 5 - Guide pattern, 6 - Format information, 7 - Version information, 8 - Data and error correction code words, 9 - Function patterns, 10 - Coding area.
[0069] Fig. 2 - structure of data blocks and error correction blocks of the QR code using version 21 as an example. Number of data modules in the QR code: 1 – 101 modules, 2 – 85 modules.
[0070] Fig. 3 - performing layer-by-layer bitwise aggregation of QR codes into an aggregating two-dimensional code.
[0071] Fig. 4 - structure of data blocks and error correction blocks (with block numbering) using the example of QR code version 7.
[0072] Purpose of the blocks: D1-D13 – data block 1, D14-D26 – data block 2, D27-D39 – data block 3, D40-D52 – data block 4, D53-D66 – data block 5, E1-E26 – error correction block 1, E27-E52 – error correction block 2, E53-E78 – error correction block 3, E79-E104 – error correction block 4, E105-E130 – error correction block 5.
[0073] Fig. 5 - view of a single data cell of the aggregating two-dimensional code with single-stream aggregation. The cell size when using the basic 21st version of the QR code is 0.5 x 0.5 mm.
[0074] Fig. 6 - view of a single data cell of the aggregating two-dimensional code with 4-stream aggregation. The cell size when using the basic 21st version of the QR code is 1 x 1 mm.
[0075] Fig. 7 - comparison of maps with QR code version 40 and aggregating two-dimensional code based on QR codes version 21 placed on them. While maintaining the dimensions, the volume of data in the aggregating two-dimensional code is increased more than 4 times.
[0076] Fig. 8 - example image of a test prototype of an aggregating two-dimensional code. Implementation of the invention
[0077] The proposed technology for coding and presenting information in aggregating two-dimensional codes can be used to optimize the presentation of volumes of information when placing personal identification, biometric and departmental information about the owner in identification documents, as well as when forming information carriers for advertising and technological purposes containing general information and additional machine-readable information documents.
[0078] The technology is based on the use of a set of consistently applied methods (including neural network methods) that allow the formation of an image of a high-capacity aggregating two-dimensional code and its use when placing it both on identification documents of limited size and on large-sized information carriers for various purposes. The formed image can be read using both standard cameras of mobile devices and specialized QR code readers that allow saving the resulting image in raster format.
[0079] A special feature of the proposed method is the ability to pre-select the QR code format used for further aggregation. Thus, the aggregating two-dimensional code can be created depending on the requirements for the version and noise immunity.
[0080] In the case of limited space for placing a two-dimensional code, for example, on identification documents, the aggregating two-dimensional code is formed according to the size of the area allocated for its placement, taking into account the minimum permissible cell size.
[0081] For example, to accommodate aggregating two-dimensional codes, inserts can be used on passport pages in the ID-3 format of the ICAO standard or identification plastic cards in the ID-1 format of the ICAO standard, which will determine the maximum permissible geometric size.
[0082] On the contrary, in the absence of strict requirements for the size of the two-dimensional code, for example, when placed on information posters or stands, it is possible, without increasing the QR code series, to place a larger volume of information in the aggregating two-dimensional code by increasing the number of symbols in one cell. The most advantageous from the point of view of the capacity of the aggregating two-dimensional code is to place in the cell a number of characters equal to the square of an integer, i.e. 4, 9, 16, etc.
[0083] The amount of data contained in a QR code is determined by the version of the code used. The higher the correction level (the acceptable level of damage to the QR code), the smaller the amount of information available for placement in the QR code (for versions 20 to 40, presented in Table 1, in bits).
[0084] QR code versionNumber of modulesCorrection level (acceptable damage level)7% (L)15% (M)25% (Q)30% (H)
[0085] Below are examples of the formation and decoding of an aggregating two-dimensional code for an identification document and for an information stand.
[0086] An example of the use of an aggregating two-dimensional code in an identification document.
[0087] A feature of using an aggregating two-dimensional code in an identification document is a limited field on the document for placing a QR code. This example shows a variant of forming, placing and decoding a two-dimensional code on an identification document for recording citizens' weapons (permit for storing and carrying weapons) with a dedicated field for a QR code measuring 40 x 40 mm.
[0088] The formation of an aggregating two-dimensional code for an identification document is carried out in the following order:
[0089] a) a format is selected that includes the version and noise immunity of the QR code used for further aggregation:
[0090] For placement on an area of 40 x 40 mm, it is most optimal to use QR code version 21, containing 9252 data modules. The volume of data placed in QR code version 21, taking into account the correction level "M" (15%) is 5712 bytes or 5.578 KB (see Tables 1 and 4).
[0091] b) one set of information is formed, subject to placement in the aggregating two-dimensional code:
[0092] It is proposed to place the following set of documents and information in the two-dimensional code:
[0093] 1) Identification data of the weapon owner (2 KB);
[0094] 2) Biometric profile of the gun owner (total before vector quantization – 24 KB: 2 iris vectors of 3 KB each, 1 face vector of 2 KB, 2 fingerprint vectors of 8 KB each, total after vector quantization – 6 KB);
[0095] 3) Cards of the weapons owned by the owner (15, 2 KB each);
[0096] 4) Data on the purchase of cartridges (10 at 2 KB);
[0097] 5) Electronic digital signature data (1 KB).
[0098] The total size of the data placed in the two-dimensional code is 59 KB.
[0099] c) the generated set of information is converted into a single bit array of data. If the information does not contain significant information in all sections, for example, if the owner of a weapon has less than 15 units, then the data in the unfilled fragments of information is filled with the additional filling symbol "#".
[0100] d) the generated bit array of data is divided, proportionally to the volume of data of the previously selected QR code, into the number of data blocks (bit arrays), as a result of which the number of QR codes required to accommodate the specified volume of data is determined. To accommodate 59 KB in the set of QR codes of version 21, 11 QR codes are required. The excess data set of the last QR code is filled with the additional filling symbol "#".
[0101] e) for each data block from the set of blocks obtained after dividing into blocks, a QR code is generated according to the selected format.
[0102] f) the obtained QR codes are sequentially placed on layers 1 through 11 in a matrix of aggregated values of dimension [101, 101, 12].
[0103] g) for each individual data element of the used QR code format, layer-by-layer bitwise aggregation is performed on the 12th aggregating layer of the matrix of aggregated values (see), as a result of which an identifier is obtained for each cell of the 12th aggregating layer.
[0104] h) the size and composition of the identifier parts responsible for encoding information in the cells of the aggregating two-dimensional code, determining the color of the symbol and the symbol in the cell, are determined. An 11-bit identifier is used (with the number of bits equal to the number of aggregated QR codes), in which 4 bits are reserved for the symbol color code, 4 bits for the symbol code, 3 bits for the color of the frame around the symbol).
[0105] Next, a control code table is formed, used for coding, containing:
[0106] – the number of aggregated QR codes (in this example 11);
[0107] – the number of groups of aggregated QR codes (in this example 1);
[0108] – the number of identifier bits reserved for the color code;
[0109] – the number of identifier bits reserved for the symbol code;
[0110] – the number of identifier bits reserved for the frame color code;
[0111] – 4 control images of coded color marks (each control image contains 4 colored squares separated by white fields) – a total of 16 colored control marks that determine the encoding of symbols.
[0112] Symbol table. For encoding the 4-bit table in this example, 16 uppercase English characters are used, bold Calibri font:
[0113] Table 2. Symbols used for encoding and cell numbers for placing control samples in them (triple redundancy). No. Symbol QR code data module numbers 1 AD 101, D301, D5012 BD 107, D307, D5073 CD 114, D314, D5144 DD 121, D321, D5215 ED 128, D328, D5286 FD 135, D335, D5357 GD 142, D342, D5428 HD 149, D349, D5499 ID 156, D356, D55610 KD 163, D363, D56311 LD 170, D370, D57012 MD 177, D377, D57713 ND 184, D384, D58414OD191, D391, D59115PD198, D398, D59816QD713, D743, D777
[0114] The data from the QR code elements is temporarily replaced by the data from the control code table of the aggregating two-dimensional code, and when decoded will be restored by using the QR code format with a correction level.
[0115] The first seven colors from the character code table are used to color control the color of the character frames.
[0116] The colors used are 4 basic colors of the CMYK palette + 3 additional colors obtained by pairwise mixing of 3 basic CMY colors + the same 7 colors with 60% saturation + 2 colors with 30% saturation (black and blue).
[0117] i) the formation of an image of the markup elements of the aggregating two-dimensional code is carried out.
[0118] j) using the identifier values from each cell of the aggregation layer of the matrix of aggregated values, in accordance with the control code table, an image of the resulting aggregation two-dimensional code is formed (see).
[0119] k) fields with a control code table are added to the generated image of the aggregating two-dimensional code:
[0120] Table 3. Distribution of control table data by QR code data modules version 21 (triple redundancy). No. ItemName of the indicatorNumbers of QR code data modules1Number of aggregated QR codesD1, D201, D4012Number of groups of aggregated QR codesD22, D222, D4223Number of identifier bits reserved for color codeD43, D243, D4434Number of identifier bits reserved for symbol codeD64, D264, D4645Control images of code color marks for symbol colorD85, D285, D485
[0121] l) the generated image of the aggregating two-dimensional code is applied to the information carrier. The image can be applied directly to the information carrier (in this case, if it is necessary to make changes to the contents of the document, the information carrier is reissued) or the image can be applied to stickers pasted onto the information carrier. In the first case, sublimation color printing can be used to apply the QR code image, in the second case, thermal inkjet or piezoelectric inkjet color printing.
[0122] The use of aggregating two-dimensional codes on identification documents allows solving the following problems:
[0123] a) ensure the possibility of using large volumes of data, especially in the production of identification documents in conditions of a significant shortage of electronic microcircuits used to store information in identification documents (see);
[0124] b) significantly (several times) reduce the cost of production of identification documents using two-dimensional code technology, compared to the cost of production of identification documents with electronic information carriers;
[0125] c) when using two-dimensional code technologies together with electronic storage media technology, the level of security of the identification document is significantly increased.
[0126] Decoding of the aggregating two-dimensional code is carried out in the following order:
[0127] a) scanning the image of the aggregating two-dimensional code from the information carrier - scanning is performed using a mobile application using the smartphone camera, followed by correction of geometric distortions of the obtained image of the aggregating two-dimensional code. To minimize geometric distortions, it is recommended to place the optical axis of the smartphone camera lens on the normal to the center of the scanned code when scanning the image;
[0128] b) detection of elements of the aggregating two-dimensional code markup on the obtained image;
[0129] c) positioning the obtained image according to the selected markup elements;
[0130] d) the boundaries of the dynamic range are determined based on the black and white fields of the search template markup elements and the white balance is adjusted in the image of the aggregating two-dimensional code;
[0131] e) using a pre-trained neural network to decompose the image of the aggregating two-dimensional code, forming a set of images of its elements, with indexing corresponding to the numbering of the QR code data modules;
[0132] f) conducting recognition of images of data elements containing elements of the code table of the aggregating two-dimensional code, followed by the formation of a control code table;
[0133] g) using the control code table, the dimensionality of the parts of the identifier used to encode information, the number of aggregated QR codes, the number of groups of aggregated QR codes, the number of identifier bits reserved for the symbol color code, the number of identifier bits reserved for the symbol code, the number of identifier bits reserved for the frame color code, code colors and the set of code symbols are determined;
[0134] h) determination of the parameters of the required colour correction based on the analysis of the parameters of the control images of the code colour marks for the colour of the symbols;
[0135] i) performing color correction of the set of images of data elements of the two-dimensional aggregation code;
[0136] j) conducting recognition of the entire set of images of data elements of the aggregating two-dimensional code and forming the 12th aggregating layer of the identifier matrix;
[0137] k) from the 12th aggregating layer of the matrix of aggregated values, layers 1 through 11 of the QR code matrix are restored;
[0138] l) layer-by-layer decoding of information from the constituent QR codes is carried out, followed by its distribution among sets of information, in which, for each QR code, the information of the data elements temporarily occupied by the code table of the aggregating two-dimensional code is restored, followed by the unification of the sets of information into a single resulting set of information;
[0139] m) the decoded information is displayed on the screen of the control device.
[0140] An example of the use of an aggregating two-dimensional code for an information stand.
[0141] A special feature of using an aggregating two-dimensional code for information stands is the absence of restrictions on the size of the QR code, which allows not only to use QR codes of version 40, but also to apply multi-stream aggregation of QR codes.
[0142] This example shows a variant of forming, placing and decoding a two-dimensional code on an information stand located next to the equipment, or directly on the equipment body, in the production shop of the enterprise. It is assumed that the production features do not allow the use of wireless communication technologies, and the technical personnel servicing the equipment need prompt access to the instructions for servicing this equipment. Using a mobile application on a smartphone or tablet, the technician scans a two-dimensional code from the information stand containing the instructions for servicing this equipment or its individual component, and performs the actions described in it.
[0143] In this example, we will consider the formation of an aggregating two-dimensional code of size 50 x 50 cm using data aggregation in several streams.
[0144] The formation of the aggregating two-dimensional code is carried out in the following order:
[0145] a) a format is selected that includes the version and noise immunity of the QR code used for further aggregation.
[0146] For placement on an area of 50 x 50 cm, it is most optimal to use QR code version 40, which contains 29648 data modules. The volume of data placed in QR code version 40, taking into account the correction level "M" (15%) is 18672 bytes or 18.234 KB (see Table 1).
[0147] b) one set of information is formed, subject to placement in the aggregating two-dimensional code:
[0148] It is supposed to be placed in the aggregating two-dimensional code:
[0149] 1) technological instructions in pdf format with a total volume of 290 KB;
[0150] 2) electronic digital signature data (1 KB).
[0151] The total size of the data placed in the two-dimensional code is 291 KB.
[0152] c) the generated set of information is converted into a single bit array of data.
[0153] d) the generated data bit array is divided proportionally to the data volume of the previously selected QR code into the number of data blocks (bit arrays), as a result of which the number of QR codes required to accommodate a given data volume is determined. To accommodate 291 KB in the QR code set of version 40, 16 QR codes will be required. To form an aggregating two-dimensional code, we will form 4 streams of 4 aggregated QR codes. When using 4 aggregation streams, the total volume for data placement will be 298752 bytes or 291.744 KB. The excess data set of the last QR code is filled with the additional padding symbol "#".
[0154] e) for each data block from the set of blocks obtained after dividing into blocks, a QR code is generated according to the selected format.
[0155] f) the obtained QR codes are sequentially placed on layers 1 through 4 in 4 matrices of aggregated values with dimensions [177, 177, 5].
[0156] g) for each individual data element of the used QR code format, layer-by-layer bitwise aggregation is performed on the 5th aggregating layer of the matrix of aggregated values. The operation is performed sequentially for each of the 4 matrices. As a result, an identifier is obtained for each cell of the 5th aggregating layer of each of the 4 matrices.
[0157] h) the dimension and composition of the identifier parts responsible for encoding information in the cells of the aggregating two-dimensional code, determining the color of the symbol and the symbol in the cell, are determined. In each of the 4 matrices, a four-bit identifier is used (with the number of bits equal to the number of aggregated QR codes), in which 2 bits are reserved for the symbol color code, 2 bits for the symbol code. The color is not reserved for the frame, since the frame color is not used for encoding in this example (all frames will be black).
[0158] Next, a control code table is formed, used for coding, containing:
[0159] – the number of aggregated QR codes in one stream (in this example 4);
[0160] – the number of groups (aggregation flows) of aggregated QR codes (in this example 4);
[0161] – the number of identifier bits reserved for the color code;
[0162] – the number of identifier bits reserved for the symbol code;
[0163] – 1 control image of coded color marks (contains 4 colored squares separated by white fields) – a total of 4 colored control marks that determine the encoding of symbols.
[0164] Symbol table. For encoding a 2-bit table in this example, 4 uppercase English characters are used, bold Calibri font:
[0165] Table 4. Symbols used for coding and cell numbers for placing control samples in them (triple redundancy). No. Symbol QR code data module numbers 1 AD101, D301, D501 2 BD107, D307, D507 3 CD114, D314, D514 4 DD121, D321, D521
[0166] The data from the QR code elements is temporarily replaced by the data from the control code table of the aggregating two-dimensional code, and when decoded will be restored by using the QR code format with a correction level.
[0167] The colors used are 4 basic colors of the CMYK palette.
[0168] i) the formation of an image of the markup elements of the aggregating two-dimensional code is carried out (see).
[0169] j) using the identifier values from each cell of the aggregating layer of the matrix of aggregated values, in accordance with the control code table, an image of the resulting aggregating two-dimensional code is formed, with one set of 4 symbols (in 2 x 2 format) placed in each data module of the aggregating two-dimensional code. Each of the sets is formed from cells of 4 matrices with identical indices.
[0170] k) fields with a control code table are added to the generated image of the aggregating two-dimensional code:
[0171] Table 5. Distribution of control table data by QR code data modules version 40 (triple redundancy). No. ItemName of the indicatorNumbers of QR code data modules1Number of aggregated QR codes in one streamD1, D201, D4012Number of groups of aggregated QR codes (aggregation streams)D22, D222, D4223Number of identifier bits reserved for color codeD43, D243, D4434Number of identifier bits reserved for symbol codeD64, D264, D4645Control image of code color marks for symbol colorD85, D285, D485
[0172] l) the generated image of the aggregating two-dimensional code is applied to the information carrier. Thermal inkjet or piezoelectric inkjet color printing may be used to apply the image of the two-dimensional code.
[0173] The use of aggregating two-dimensional codes on information stands makes it possible to use large volumes of data, especially when placing information carriers with two-dimensional aggregating codes in areas where, for some reason, the use of wireless communication is impossible or prohibited.
[0174] Decoding of the aggregating two-dimensional code for the information stand is carried out in the following order:
[0175] a) scanning the image of the aggregating two-dimensional code from the information carrier - scanning is performed using a mobile application using the smartphone camera, with subsequent correction of geometric distortions of the obtained image of the aggregating two-dimensional code. To minimize geometric distortions, it is recommended that when scanning the image, the optical axis of the smartphone camera lens be positioned normal to the center of the scanned code;
[0176] b) detection of elements of the aggregating two-dimensional code markup on the obtained image;
[0177] c) positioning the obtained image according to the selected markup elements;
[0178] d) the boundaries of the dynamic range are determined based on the black and white fields of the search template markup elements and the white balance is adjusted in the image of the aggregating two-dimensional code;
[0179] e) using a pre-trained neural network, decomposing the image of the aggregating two-dimensional code and forming a set of images of its elements with indexing corresponding to the numbering of the QR code data modules;
[0180] f) conducting recognition of images of data elements containing elements of the code table of the aggregating two-dimensional code, followed by the formation of a control code table;
[0181] g) using the control code table, the dimensionality of the parts of the identifier used to encode information, the number of aggregated QR codes, the number of groups of aggregated QR codes (aggregation streams), the number of identifier bits reserved for the symbol color code, the number of identifier bits reserved for the symbol code, code colors and the set of code symbols are determined;
[0182] h) determination of the parameters of the required colour correction based on the analysis of the parameters of the control images of the code colour marks for the colour of the symbols;
[0183] i) performing color correction of the set of images of data elements of the two-dimensional aggregation code;
[0184] j) conducting recognition of the entire set of images of data elements of the aggregating two-dimensional code and forming the 5th aggregating layer for each of the 4 identifier matrices;
[0185] k) from the 5th aggregating layer of each of the 4 matrices of aggregated values, layers 1 through 4 of the QR code matrix are restored;
[0186] l) layer-by-layer decoding of information from the constituent QR codes is carried out, followed by its distribution among sets of information, in which, for each QR code from each stream, the recovery of information of data elements temporarily occupied by the code table of the aggregating two-dimensional code is performed, followed by the unification of sets of information into a single resulting set of information;
[0187] m) the decoded information is displayed on the screen of the control device.
[0188] Supplement to examples
[0189] There may be a case when it is desirable to place the generated information in the form of several sets of information. Then each set of information is separately converted into a bit array of data, and then the same set of actions for generating QR codes is performed for each bit array. Later, when decoding, the information presented in the form of separate sets will also be presented separately, which allows, if necessary, to set a restriction on access to some sets of information.
[0190] It is possible that there is already a formed set of information recorded in a QR code. If there is no access to the contents of this QR code, it can be used to form an aggregating two-dimensional code by including it in one of the layers in the existing format. In this case, it is advisable to select the format of the codes to be aggregated based on the format of the existing QR code. If this approach is not possible, it is possible to aggregate QR codes of different versions.
[0191] When aggregating QR codes of different versions, a basic template for placing modules from a QR code of a higher version from the entire set of codes being aggregated is used. The aggregation of bit cells is performed not according to the principle of geometric coincidence of cells in QR code templates, but according to their ordinal numbering. For this purpose, a conversion table of layers is formed, based on which the matrix [n, n, m+1] is then constructed. For QR codes of lower versions, cells from the template of a higher version for which no corresponding cells were found in the lower version are filled with arbitrary values and ignored during the reverse transformation of the aggregated two-dimensional code into the original QR code. The versions of the codes being aggregated and the order of their assembly are specified in the control table of the aggregating two-dimensional code.
[0192] It is possible to use different versions of QR codes for aggregation both in single-stream and multi-stream aggregation. In multi-stream aggregation, it is possible to use the option when QR codes are divided into streams taking into account the same versions.
[0193] If the identifier is long, then in addition to the parts of the identifier responsible for the color of the symbol in the cell and the symbol in the cell, as well as the color of the cell frame, it is possible for a part of the identifier to be responsible for the color or optical density of the cell background.
[0194] The control code table can be formed either in a dedicated field in the center or at the edge of the image of the aggregating two-dimensional code, or in the form of a distributed set of elements of the aggregating two-dimensional code, placed in dedicated fields of data elements or markup elements of the aggregating two-dimensional code.
[0195] Thus, the proposed technical solution allows increasing the volume of information placed in the aggregating two-dimensional code of the information carrier, with its subsequent decoding, while maintaining the ability to be recognized by built-in cameras of smartphones.
[0196] Limitations of using aggregating two-dimensional codes
[0197] When using aggregating two-dimensional codes, the following limitations must be taken into account:
[0198] a) restrictions on the number of colors in the color palette are determined by:
[0199] a. the dimensions of the carrier or the area allocated for placing the aggregating two-dimensional code;
[0200] b. optical resolution of the devices used to read the aggregating two-dimensional code;
[0201] b) restrictions on the colours used in the palette - it is not advisable to use colours from the Pantone palette and similar ones that may fall outside the colour space of printers and scanners used to apply and read QR codes;
[0202] c) restrictions on the light colours used in the palette – it is recommended, in order to improve the readability of the aggregating two-dimensional code, not to use the light area of the colour gamut of the devices used for applying and reading the aggregating two-dimensional code;
[0203] d) restrictions on the composition of the equipment used to read aggregating two-dimensional codes:
[0204] a. For reading aggregating two-dimensional codes, it is recommended to use mobile phones, tablets or terminals equipped with high-resolution color cameras (at least 12 MP);
[0205] b. it is possible to use specialized hardware QR code scanners that, after reading the structure of the QR code, allow a color image of the QR code to be transmitted to the image processing device for further software processing;
[0206] e) restrictions on the composition of the code table of characters: it is desirable to avoid including in the code table characters that differ in appearance (overlapping over the image area) by less than 30%;
[0207] f) when forming an image of an aggregating two-dimensional code, symbols that together form geometric patterns (triangles, squares, completely filled with color or halftone cells) should not be included in the code table and used for encoding, since such images prevent the correct operation of the autofocus systems of reading devices using contrast or phase autofocus technologies;
[0208] g) the limitations on the maximum size of the aggregating two-dimensional code are determined by the optical capabilities of the lenses and the characteristics of the matrices of the reading devices.
[0209] Development Prospects
[0210] Further increase in the density of information placed in aggregating two-dimensional codes can be achieved by partially changing the forms of the basic elements of the two-dimensional code: in addition to standard alphanumeric symbols, it is possible to use sets of various geometric elements placed in standard character spaces of the matrix of the aggregating two-dimensional code for encoding information. In addition, it is possible to use both black-and-white and halftone symbolic elements, both separately and in various combinations (taking into account the limitations). The emergence of new mobile devices with cameras of hundreds of megapixels over the past 5 years gives reason to believe that in the coming years, with further improvement of image acquisition technologies, some of the above limitations will be lifted.
[0211] The use of the above-described method is possible for creating not only information carriers, but also information materials of a significantly larger size, while it is possible to significantly increase the volume of information placed in the composition of the aggregating two-dimensional code, due to the increase in the number of colors and symbols used in coding.
Claims
A method for generating an aggregating two-dimensional code of an information carrier, comprising the following actions: selecting a format including the version and noise immunity of the QR code used for further aggregation; generating at least one set of information to be placed in the aggregating two-dimensional code; converting each generated set of information into a bit array of data; dividing each generated bit array of data, exceeding the volume permissible for the selected QR code format, into a set of blocks corresponding to the permissible volume of data of the selected QR code format; generating a QR code for each data block from the obtained at least one set of data blocks according to the selected format; placing the obtained QR codes in at least one matrix of aggregated values of dimension [n, n, m+1], where n is the dimension of the two-dimensional matrix of the selected QR code format, m is the number of QR codes to be aggregated;for each individual data element of the used QR code format, layer-by-layer bit aggregation is performed on the (m+1)-th aggregating layer of each matrix to obtain an identifier for each cell of the (m+1)-th aggregating layer; the dimensionality of the parts of the identifier responsible for encoding information in the cells of the aggregating two-dimensional code that determine the color of the symbol and the symbol in the cell is determined, and a control code table used for encoding is formed; an image of the markup elements of the aggregating two-dimensional code is formed; using the identifier values from each cell of the (m+1)-th aggregating layer of each matrix of aggregated values, an image of the resulting aggregating two-dimensional code is formed in accordance with the control code table, wherein the number of symbols in one cell of the aggregating two-dimensional code corresponds to the number of matrices of aggregated values;fields with a control code table are added to the generated image of the aggregating two-dimensional code; the generated image of the aggregating two-dimensional code is applied to the information carrier. The method according to paragraph 1, characterized in that, in addition to action h), the part of the identifier responsible for the color of the cell frame is determined. The method according to paragraphs 1 or 2, characterized in that, in addition to step h), the part of the identifier responsible for the color or optical density of the background of the cell is determined. A method according to any of paragraphs 1-3, characterized in that the fields with the control code table are placed in the form of a distributed set of elements of the aggregating two-dimensional code in the selected fields of the data elements or the markup elements of the aggregating two-dimensional code. The method according to any of paragraphs 1-4, characterized in that at least one of the generated QR codes contains means for restricting access to the information contained therein. The method according to any of paragraphs 1-5, characterized in that information on the quantity and / or order of placement in the assembly of matrices is additionally added to the control code table. The method according to any of paragraphs 1-6, characterized in that information about the version of the aggregated QR codes is additionally added to the control code table. A method for decoding an image of an aggregating two-dimensional code of an information carrier, which includes the following actions: scanning an image of the aggregating two-dimensional code from the information carrier; detecting images of the markup elements of the aggregating two-dimensional code; positioning the obtained image based on the selected markup elements; determining the boundaries of the dynamic range based on the black-and-white fields of the markup elements of the search template and adjusting the white balance in the image of the aggregating two-dimensional code; decomposing the image of the aggregating two-dimensional code and forming a set of images of its elements with indexing corresponding to the numbering of the QR code data modules; extracting a control code table from the image of the aggregating two-dimensional code;according to the control code table, the coding elements are determined that determine the color of the symbol and the symbol in the cell, and the dimensions of the parts of the identifier used for coding information that determine the color of the symbol and the symbol in the cell are determined, the number and method of extracting QR codes from the aggregating two-dimensional code are determined; the parameters of the necessary color correction are determined based on the analysis of the parameters of the control images of the code color marks for the color of the symbols; color correction is carried out for the set of images of the data elements of the aggregating two-dimensional code; recognition of the entire set of images of the aggregating two-dimensional code is carried out and at least one matrix of identifiers of its elements is formed, wherein the number of matrices formed corresponds to the number of symbols in one cell of the aggregating two-dimensional code specified in the control code table; the layers of the constituent QR codes are restored from each matrix of identifiers;carry out layer-by-layer decoding of information from the constituent QR codes with subsequent distribution into sets of information; the decoded information is displayed on the screen of the control device. The method according to paragraph 8, characterized in that, in addition to action g), the part of the identifier responsible for the color of the cell frame is determined. The method according to paragraphs 8 or 9, characterized in that, in addition to step g), the part of the identifier responsible for the color or optical density of the background of the cell is determined.
Citation Information
Patent Citations
Encoding / decoding method of color qr code
CN104899630B
Method and apparatus for decoding or generating multi-layer color or code, method for recommending setting parameters in generation of multi-layer or code, and product comprising multi-layer color or code
US20170243097A1
Two-dimensional code, methods and apparatuses for generating, displaying and reading the same
US7032823B2