Two-dimensional code, generation method and identification method thereof, identification system and equipment

By adopting the design of track frame lines and coding areas in the QR code, the problem of inefficiency in storing multiple information is solved, and higher data storage efficiency and capacity are achieved, and user experience is improved.

CN119849531APending Publication Date: 2025-04-18BEIJING LP CENTURY TECH +1
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202510051879.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-13
Publication Date
2025-04-18

AI Technical Summary

Technical Problem

Existing QR codes are inefficient when storing more information, occupy a large number of effective coding areas, and the generation method of composite QR codes has strict restrictions on error correction capabilities and subcode storage capacity.

Method used

The track frame lines and coding areas are designed, and the track frame lines are arranged between dark modules and light modules, and are used for the identification of QR codes and the adaptive configuration of the coding areas to reduce the occupation of the effective coding area.

Benefits of technology

It improves the data storage efficiency and capacity of QR codes, reduces the occupation of effective coding areas, and improves user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119849531A_ABST
    Figure CN119849531A_ABST
Patent Text Reader

Abstract

The invention provides a two-dimensional code which is characterized in that the two-dimensional code comprises a rectangular track frame line which is formed by arranging dark color modules and light color modules at intervals, the dark color modules are arranged at the four vertex positions of the track frame line, and the track frame line is used for identifying the two-dimensional code; the coding area is located in the track frame line, and the coding area is filled with a data module used for expressing data information. According to the method, the occupied effective code arrangement area can be effectively reduced, the data storage efficiency of the code arrangement area is improved to the maximum extent, and the user experience is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the technical field of two-dimensional codes, and in particular to a two-dimensional code and a generation method and recognition method thereof, a recognition system, a device, a readable storage medium, and a program product. Background Art

[0002] In today's era of rapid digital information dissemination, QR codes, as a convenient information storage and transmission tool, have been widely used in various fields. From product identification, advertising to mobile payment, ticket management, etc., QR codes have become an indispensable part of people's lives and work due to their ability to quickly and accurately store and read large amounts of information.

[0003] Common two-dimensional codes in the prior art, such as QR codes, must be provided with auxiliary direction-finding images such as position detection graphics and positioning graphics, wherein the position detection graphics are composed of three large black and white squares nested, respectively located in the upper left corner, upper right corner, and lower left corner of the two-dimensional code, and are used to determine the size and position of the two-dimensional code; the positioning graphics are composed of two black and white straight lines, which are convenient for determining the angle of the two-dimensional code and correcting the distortion. In addition, in order to facilitate identification, a circle of blank area is left around the periphery of the two-dimensional code. The above-mentioned locators and blank areas occupy more space in the two-dimensional code, and the size of the two-dimensional code is predetermined. The storage capacity of a single two-dimensional code is very limited. When multiple information needs to be stored, it can only be a discharge splicing of multiple single two-dimensional codes, resulting in low storage and splicing efficiency.

[0004] In addition, although composite QR codes generated by generating two or more QR codes have appeared in the prior art, such as the composite payment code of merchants. However, the current composite QR code generation method usually "hollows out" the middle area of ​​the mother code, and then fills in the sub-code, and uses error correction technology to restore the mother code information when identifying the mother code. This places high demands on the error correction capability of the QR code, and because the sub-code occupies the encoding space of the mother code, the area of ​​the mother code that can be used to actually store information is relatively reduced. In order to ensure the accuracy of the corrected information of the mother code, the size of the sub-code is strictly limited, and it cannot occupy too much encoding space of the mother code, which in turn seriously restricts the storage capacity of the sub-code. Summary of the invention

[0005] The present disclosure is completed to solve the above-mentioned problems, and its purpose is to provide a two-dimensional code and its generation method and recognition method, recognition system, device, readable storage medium, and program product that can reduce the occupation of the effective coding area and maximize the data storage efficiency of the coding area.

[0006] The present disclosure provides this summary of the invention to introduce concepts in a brief form, which will be described in detail in the detailed implementation section below. This summary of the invention is not intended to identify the key features or essential features of the technical solution claimed for protection, nor is it intended to be used to limit the scope of the technical solution claimed for protection.

[0007] In order to solve the above technical problems, an embodiment of the present disclosure provides a two-dimensional code, including: a track frame line, which has a rectangular shape and is formed by dark modules and light modules arranged alternately, and the dark modules are arranged at the four vertex positions of the track frame line, and the track frame line is used for identifying the two-dimensional code; and a coding area, which is located inside the track frame line, and the coding area is filled with data modules for expressing data information.

[0008] In order to solve the above technical problems, the embodiment of the present disclosure provides a two-dimensional code generation method, including: encoding the data information to be encoded and calculating the required number of data modules; filling the data modules into the coding area; using the form of dark modules and light modules arranged at intervals, setting a track frame line with a rectangular shape, so that the dark modules are set at the four vertex positions of the track frame line, and the number of data modules that can be arranged in the coding area within the track frame line is not less than the required number of data modules, so as to generate the two-dimensional code.

[0009] In order to solve the above technical problems, the embodiments of the present disclosure also provide a two-dimensional code recognition method, including: determining the outline graphic of the two-dimensional code, and searching the outline graphic in the scanning area; screening out the two-dimensional code icons whose outline graphic is a preset track frame line; dividing the two-dimensional code icons into grids according to the track frame line; verifying whether there is a format information module in the coding area of ​​the two-dimensional code icon, if so, reading the data module in the coding area and decoding the data information, if not, terminating the recognition.

[0010] In order to solve the above technical problems, the embodiments of the present disclosure also provide a QR code recognition system, including: a display device, used to display the QR code as described above; a recognition device, used to scan and recognize the QR code displayed on the display device; and a server, used to send or receive the QR code or the data of the QR code.

[0011] In order to solve the above technical problems, an embodiment of the present disclosure further provides a computer device, including a memory, a processor, and a computer program stored in the memory, characterized in that the processor executes the computer program to implement the steps of any of the methods described above.

[0012] In order to solve the above technical problems, the embodiments of the present disclosure further provide a computer-readable storage medium on which a computer program is stored, characterized in that when the computer program is executed by a processor, the steps of the method described in any one of the above items are implemented.

[0013] In order to solve the above technical problems, the embodiments of the present disclosure further provide a computer program product, including a computer program, characterized in that when the computer program is executed by a processor, the steps of any of the above methods are implemented.

[0014] According to the technical solution disclosed in the present invention, compared with the prior art, the present invention does not need to be specially provided with auxiliary direction-finding images such as position detection graphics and positioning graphics, which can reduce the occupation of the effective coding area, maximize the data storage efficiency of the coding area, effectively improve the data storage capacity of the QR code, and greatly improve the user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] Figure 1 is a schematic diagram of an embodiment of a two-dimensional code generation process according to the present disclosure; Figure 2 is a schematic diagram of an embodiment of a two-dimensional code according to the present disclosure; Figure 3 is a schematic diagram of another embodiment of a two-dimensional code according to the present disclosure; Figure 4 is a schematic diagram of an embodiment of a method for generating a two-dimensional code according to the present disclosure; Figure 5 is a schematic diagram of an embodiment of a two-dimensional code recognition method according to the present disclosure; Figure 6 is a schematic diagram of an embodiment of a composite two-dimensional code according to the present disclosure; Figure 7 is a schematic diagram of an embodiment of a method for generating a composite two-dimensional code according to the present disclosure; Figure 8 is a schematic diagram of an embodiment of a composite two-dimensional code recognition method according to the present disclosure; Fig. 9 is a structural diagram of an embodiment of an identification system according to the present disclosure; Fig.10 is a schematic diagram of an embodiment of a terminal device according to the present disclosure.

[0016] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and that components and elements are not necessarily drawn to scale. DETAILED DESCRIPTION

[0017] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which the present disclosure belongs; the terms used in the specification of the application herein are only for the purpose of describing specific embodiments and are not intended to limit the present disclosure; the terms "including" and "having" and any variations thereof in the specification and claims of the present disclosure and the above-mentioned drawings are intended to cover non-exclusive inclusions. The terms "first", "second", etc. in the specification and claims of the present disclosure or the above-mentioned drawings are used to distinguish different objects, not to describe a specific order.

[0018] 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 disclosure. The appearance of the phrase in various places 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.

[0019] In order to enable those skilled in the art to better understand the solution of the present disclosure, the technical solution in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the accompanying drawings.

[0020] First of all, it should be explained that the composite QR code of the present invention is based on the QR code of the present invention, such as the Longbei code, and is compounded with other types of QR codes, texts, pictures and other contents. Therefore, the QR code of the embodiment of the present invention (hereinafter referred to as the Longbei code unless specifically described) or the composite QR code involved in the relevant concepts or generation methods, and some process steps of the recognition method are the same, and will not be repeated when describing the composite QR code, but the relevant technology of the composite QR code still includes the relevant characteristic technical features of the Longbei code.

[0021] The following is an explanation of the related concepts involved in the two-dimensional code (Longbei code) or composite two-dimensional code of the present disclosure: A module is a smallest independent unit in the Longbei code disclosed in the present invention, used to represent a single bit of data or to form a functional graph, and is usually a square.

[0022] The synchronous barcode, also known as the track frame or track line described later, is located at the Longbei code Figure 4 The dark and light colored modules are used to record the number of rows and columns of the code image and to correct the distortion of the code image. The synchronization barcode is divided into horizontal synchronization barcode and vertical synchronization barcode.

[0023] The guide modules, for example, are six modules located on both sides of the Longbei code pattern, which are arranged adjacent to the outside of the synchronous barcode and are used to locate the horizontal direction of the code pattern.

[0024] The coding area, for example, is the area in the barcode used to store data, which is composed of dark and light modules and is surrounded by synchronized barcodes.

[0025] Mask, the mask can make the ratio of dark and light modules in the code image close to 1:1, and at the same time play a role in data encryption.

[0026] The format information, such as encoding direction, error correction level, and floating correction value, is used to decode the remaining part of the encoding area.

[0027] The header and tail are used to fill the empty space after the last codeword when the coding area cannot be filled with 8-bit codewords. They do not represent data, but only help determine the coding direction.

[0028] The following introduces one aspect of the embodiment of the present disclosure: the QR code is the Longbei code.

[0029] like Figure 1 , Figure 2 and 3 , which is a schematic diagram of an embodiment of the two-dimensional code disclosed in the present invention, namely the Longbei code. Figure 1 is a schematic diagram of an embodiment of a two-dimensional code generation process according to the present disclosure; Figure 2 is a schematic diagram of an embodiment of a two-dimensional code according to the present disclosure; Figure 3 is a schematic diagram of another embodiment of a two-dimensional code according to the present disclosure.

[0030] like Figure 1 As shown, the Longbei code has a track frame line 101, which has a rectangular shape and is formed by dark modules and light modules arranged at intervals, and dark modules are arranged at the four vertex positions of the track frame line. The track frame line 101 is used for the recognition of the two-dimensional code. On the one hand, the track frame line 101 of the Longbei code can replace the locator used to determine the direction of the two-dimensional code such as the QR code, and the direction can be directly identified and located only by using the track frame line 101; on the other hand, the track frame line 101 can also serve as the boundary of the container. When encoding, the track frame line 101 can be adaptively configured according to the amount of encoded content information, thereby realizing the large capacity feature of the Longbei code.

[0031] In one or more embodiments, the track frame line 101 is composed of four track lines, namely, two first track lines and two second track lines, wherein the two first track lines are respectively arranged on the two outer peripheral sides of the coding area in the first direction, and are respectively adjacent to the coding area, such as horizontal synchronization bar codes; the two second track lines are respectively arranged on the two outer peripheral sides of the coding area in the second direction, and are respectively adjacent to the coding area, such as vertical synchronization bar codes; here, the first direction and the second direction are perpendicular to each other, and the first direction, such as the horizontal direction, is the filling direction of the QR code.

[0032] The Longbei code also has a coding area 102, i.e., a code image, located inside the track frame line 101. The coding area 102 is filled with a data module for expressing data information. Here, the coding area 102 determines the row and column values ​​of the code image according to the four track lines, i.e., the synchronous barcodes, around the code image.

[0033] In one or more embodiments, the product of the row value and the column value of the data modules arranged in the coding area 102, i.e., the code diagram, is not less than the number of data modules required for encoding the data information; here, at least one of the row value and the column value is a non-fixed value; and both the row value and the column value are odd numbers.

[0034] In one or more embodiments, when the two-dimensional code is in a dark background, the dark module and the light module of the track frame line 101 and the data module are all presented in a color opposite to the original module.

[0035] like Figure 1 As shown, the coding area 102 also has a sequence header 103, a sequence tail 104, and format information 105, wherein the mark H represents the sequence header, the mark T represents the sequence tail, and the dark solid module in the coding area 102 represents that the format information bit is 1, and the dark hollow module represents that the format information bit is 0. The Longbei code disclosed in the present invention can also determine the left and right direction or the horizontal direction through the format information 105 symmetrically placed in the code diagram.

[0036] here, Figure 2 and Figure 3 The difference between the Longbei code is Figure 3 There are six guide modules 301 on both sides of the Longbei code pattern, which are arranged close to the outside of the synchronous bar code and are used to locate the horizontal direction of the code pattern through the left and right guide modules.

[0037] Of course, the left and right or horizontal directions here are relative. In practical applications, they can also be up and down or vertical directions, or other directions are not limited. Determining the direction helps to determine the codeword direction and improve generation and recognition efficiency. Of course, generation or recognition can also be performed directly without determining the direction.

[0038] Another aspect of the embodiment of the present disclosure is introduced below: a method for generating a QR code.

[0039] like Figure 4 FIG. 1 is a schematic diagram of an embodiment of a method for generating a two-dimensional code according to the present disclosure. The method for generating a two-dimensional code includes: S41, encode the data information to be encoded and calculate the number of data modules required. For example, by analyzing the type of the input information string, determine the character set to be used. According to certain rules, compress the character set data to obtain the byte stream data information to be encoded, and the length is recorded as M. The data module includes, for example, data codewords and error correction codewords. According to the preset error correction level, the corresponding error correction code byte number R is calculated according to the number of M bytes, and the minimum number of code map modules required is (M+R)*8, that is, the total number of modules is recorded as S.

[0040] In one or more embodiments, the row and column values ​​required for arranging the data modules in the coding area are calculated according to the required number of data modules, so that the product of the row and column values ​​is not less than the required number of data modules, and both the row and column values ​​are odd numbers.

[0041] In one or more embodiments, the row values ​​and column values ​​required for arranging the data modules in the encoding area are calculated based on the required number of data modules, including: calculating the row values ​​and column values ​​based on a fixed row-to-column ratio; or calculating the column values ​​based on the row values ​​being fixed values; or calculating the row values ​​based on the column values ​​being fixed values; or reducing the size of a single data module and calculating the row values ​​and column values ​​based on the required number of data modules being a fixed value.

[0042] Here, if the row and column values ​​are set as fixed values, for example, it is necessary to ensure that the row value * column value > S*8, if encoded according to the aspect ratio, calculate the minimum row and column values ​​that can store S*8 modules; if the row is a fixed value, calculate the minimum column value that can store S*8 modules; if the column is a fixed value, calculate the minimum row value that can store S*8 modules. All of the above placement methods must meet the requirement that the row and column values ​​are odd numbers.

[0043] Here, the method of continuous data storage can be used. The first mode is density adaptive. The storage capacity is automatically compressed (density is increased) according to the requirements of the coding area, and the encoding is performed according to the length-to-width ratio. The module size selects the maximum module size that can fill the coding area. The second mode is capacity adaptive. When generating, the coding area boundary is not limited (or only a part of the boundary, such as the length of one side, can be limited). The length and width of the code can be automatically adjusted, and the encoding is performed according to the length-to-width ratio or the row value is fixed or the column value is fixed. The module size is specified by the user.

[0044] The Longbei code disclosed in the present invention adopts a single symbol. Regardless of the amount of data content information, the encoding method is not restricted by version and can be filled with data content information arbitrarily. It is completely different from two-dimensional codes such as QR codes. There is no need to decide which version of the encoding rules to use after identifying the amount of encoded content information. The amount of stored data is not limited, which greatly improves the data storage capacity and generation efficiency.

[0045] S42, filling the data module into the coding area.

[0046] In one or more embodiments, on the basis of reaching a preset error correction level, for example, all or part of the remaining codewords in the code map 102 can be used as error correction codewords according to a floating error correction algorithm to improve the error correction capability, and the codewords that are still not used are treated as data codewords and are processed by filling in 0s.

[0047] In one or more embodiments, the generation method disclosed herein further includes, for example, a step of generating an error correction code, grouping the codeword sequence according to the data error correction algorithm, generating corresponding error correction codewords by group, and adding them to the back of the corresponding data codeword bytes. The generation method disclosed herein further includes, for example, a step of adding a mask, performing mask processing on the data codeword and the error correction codeword.

[0048] In one or more embodiments, when the coding area is not filled with data modules, the two-dimensional code generation method also includes: calculating the number of free modules, the number of free modules is equal to the difference between the total number of data modules that can be filled in the coding area and the number of data modules required after the data information is encoded; calculating the number of header modules and the number of tail modules, the sum of the number of header modules and the number of tail modules is equal to the number of free modules; filling the header module at the starting position of the data module arrangement in the coding area; filling the tail module at the end position of the data module arrangement in the coding area.

[0049] In one or more embodiments, the QR code generation method further includes: after masking the format information according to a preset arrangement rule, placing it into the coding area 102 according to certain rules, and placing the masked data codewords and error correction codewords into the coding area 102 according to certain rules.

[0050] S43, a track frame line having a rectangular shape is arranged in the form of dark modules and light modules arranged alternately, so that dark modules are arranged at the four vertices of the track frame line, and the number of data modules that can be arranged in the coding area within the track frame line is not less than the required number of data modules S, and the following is generated: Figure 2 or Figure 3 The final QR code is shown.

[0051] In one or more embodiments, the QR code generation method also includes: taking the number of modules of the first track line as the column value plus two, generating the first track line along the first direction, and both ends of the first track line are dark modules; taking the number of modules of the second track line as the row value plus two, generating the second track line along the second direction, and both ends of the second track line are dark modules; two oppositely arranged first track lines and two oppositely arranged second track lines are enclosed to form a track frame line, and the track frame lines are adjacently arranged on the outer peripheral side of the coding area; wherein the first direction and the second direction are perpendicular to each other, and the first direction is the filling direction of the QR code.

[0052] Another aspect of the embodiment of the present disclosure is introduced below: an example of a method for generating a QR code.

[0053] First, determine the data to be encoded (in hexadecimal value): 78 B6 0C F7 2F DC A2 81 E3 85 80FE C6 EB 3B D8 A0; Byte length of data to be encoded (nInfoLen): 17; Assume that the encoding parameters are set as follows: Error correction level (ECC): 2 (high); Length-to-width ratio: 1:1.

[0054] Step 1, calculate the data codeword and error correction codeword: Data codeword length: 17; Data codeword: 78 B6 0C F7 2F DC A2 81 E3 85 80 FE C6 EB 3B D8 A0; Error correction codeword length: 34; Error correction code: 9D F3 59 AF B6 DE 6E 86 9F C8 B9 9E 17 62 C4 3E 3C 57 2C B861 36 84 0A 23 04 16 B5 A4 D7 BB 02 B8 A3; Sequence codeword length: 51; Serial code words: 78 B6 0C F7 2F DC A2 81 E3 85 80 FE C6 EB 3B D8 A0 9D F3 59AF B6 DE 6E 86 9F C8 B9 9E 17 62 C4 3E 3C 57 2C B8 61 36 84 0A 23 04 16 B5 A4D7 BB 02 B8 A3; Standard mask: E3 72 87 C1 54 44 62 FD E4 43 34 E3 12 8C 14 83 58 E4 F1 FF24 1F 62 32 49 B4 58 5D 0C AD 52 43 AD FC 9B FC F1 0E 49 04 C7 74 51 87 18 470B 79 A3 A3 CB; Codeword after masking: 9B C4 8B 36 7B 98 C0 7C 07 C6 B4 1D D4 67 2F 5B F8 7902 A6 8B A9 BC 5C CF 2B 90 E4 92 BA 30 87 93 C0 CC D0 49 6F 7F 80 CD 57 55 91AD E3 DC C2 A1 1B 68.

[0055] Step 2, calculate the row and column values: The minimum row and column values ​​that can accommodate 51*8 points are calculated based on a row and column ratio of 1:1 as follows: Number of code map rows (nRows): 21; Number of code image columns (nCols): 21.

[0056] Step 3: Calculate the sequence header, sequence tail and format information: The calculated format information value (binary representation): 11111111111111101011001000; Format information after masking: 01011101010000011110001101; Then calculate the sequence head and tail mark: Remaining digits: 7; Sequence header mark bit: 4; Sequence end mark: 3; Finally, the position of each bit of the format information in the code image sequence is calculated according to the distribution function of the format information: 22 40 52 68 77 101 114 129 137 156 177 188 214 226 252 263 284 303 311 326 339 363 372 388 400 418.

[0057] Step 4, generate code map: first place the sequence header, sequence tail, and format information in the code map, such as Figure 1 As shown, then fill in the remaining points with the bits of the data sequence bit stream in turn, and finally generate Figure 2 or Figure 3 The Longbei code diagram shown.

[0058] Another aspect of the embodiment of the present disclosure is introduced below: a method for recognizing a QR code.

[0059] like Figure 5 FIG. 1 is a schematic diagram of an embodiment of a two-dimensional code recognition method according to the present disclosure, and the two-dimensional code recognition method includes: S51, determining the outline graphic of the two-dimensional code, and searching for the outline graphic in the code scanning area, for example, a rectangle.

[0060] S52, filtering out the rectangle of the outline graphic as the two-dimensional code icon of the preset track frame line 101.

[0061] S53, dividing the two-dimensional code symbol into grids according to the track frame line 101, and determining the grid lines of the grid by referring to the row value and column value in the above generation method, for example.

[0062] S54, verify whether there is a format information module in the encoding area 102 of the two-dimensional code symbol. If so, read the data module in the encoding area and decode the data information. If not, terminate the recognition.

[0063] In one or more embodiments, verifying whether there is a format information module in the encoding area 102 of the two-dimensional code symbol includes: rotating the contour graphic and verifying whether there is a format information module for the contour graphic at different angles.

[0064] In one or more embodiments, for example, the coding area is filled with a sequence header module and a sequence tail module, and the two-dimensional code recognition method also includes: identifying the sequence header module and the sequence tail module in the coding area 102; according to the identified sequence header module and sequence tail module, starting from the sequence header module, along the filling direction, reading the data module, and terminating at the sequence tail module.

[0065] Another aspect of the embodiment of the present disclosure is introduced below: a composite two-dimensional code.

[0066] like Figure 6 , is a schematic diagram of an embodiment of a composite two-dimensional code according to the present disclosure, and the composite two-dimensional code includes: a first area 601; and at least one second area 602.

[0067] Among them, the first area 601 is set around the outline of the second area 602, and the first area 601 is provided with the encoding data of the first two-dimensional code, such as the Longbei code; wherein the encoding data at least includes data codewords, format information and positioning information, and of course can also include various types of data information involved in the above-mentioned Longbei code and its generation method, such as error correction codewords, etc., without limitation.

[0068] The second area 602 is provided with any one of a picture, a text or a second two-dimensional code, for example. When the second area 602 is a second two-dimensional code, for example, a QR code, the storage data of the first two-dimensional code Longbei code and the second two-dimensional code QR code have no mandatory relationship, and can be used independently or in association. Composite use facilitates the use of the same code by two identification systems. For example, the logistics department has established a work system using QR codes, and the production unit has established a work system using Longbei codes. If the work of the two systems is to be associated, two two-dimensional codes are required without composite technology, and problems such as easy pasting errors and mismatched relationships occur. In addition, two codes cannot often be pasted at the same time in real life, so the emergence of composite two-dimensional codes can improve the flexibility and efficiency of two-dimensional code synthesis. And by adopting Longbei code as the first two-dimensional code, flexible public range control is provided, and the security and pertinence of the use of composite two-dimensional codes are enhanced. In one or more embodiments, the positioning information includes, for example, a track line; when the second area 602 is completely included in the first area 601, the track lines of the first two-dimensional code, such as the first track line and the second track line, are completely set to surround the second area 602; when the second area 602 is included in the first area 601 and overlaps with part of the boundary of the first area 601, the track lines, such as the first track line and the second track line adjacent to the second area 602, overlap or are arranged in parallel with part of the edge of the second area 602. Of course, the first track line and the second track line adjacent to the second area 602 can also be arranged to bypass the second area 602, such as forming a closed shape inwardly, and there is no limitation; when the second area 602 is partially included in the first area 601, for example, when the two overlap, the track lines, such as the first track line and the second track line adjacent to the second area 602, are arranged to bypass the second area 602, such as forming a closed shape inwardly. In addition, the position, number, shape, etc. of the second area 602 are not limited.

[0069] Another aspect of the embodiment of the present disclosure is introduced below: a method for generating a composite two-dimensional code.

[0070] like Figure 7 FIG. 1 is a schematic diagram of an embodiment of a method for generating a composite two-dimensional code according to the present disclosure. The method for generating a composite two-dimensional code includes: S71, setting a first area 601 and at least one second area 602. In one or more embodiments, for example, a Longbei code is set in the first area 601, and a picture, text, or a second two-dimensional code such as a QR code is set in the second area 602.

[0071] Here, a second area 602 is placed at the center of the icon as an example for explanation: Step 1, obtaining the size information in the second area 602, such as image size, number of characters, size of the QR code icon, etc.

[0072] Step 2, by encoding the second two-dimensional code, obtaining the icon size of the second two-dimensional code according to the version of the second two-dimensional code, for example, a×a, and setting the reserved size of the second area 602 to (a+1)×(a+1). Here, the reason for the size of the second two-dimensional code to be +1 is because the parity of the module numbers of different two-dimensional code icon sizes is inconsistent. For example, the sizes of QR codes are all even numbers, and the sizes of Longbei codes are all odd numbers. The QR code needs to be +1 to become an odd number to match the size of the main code.

[0073] Step 3, calculate the coding symbol size required for the Longbei code encoding in the first area 601, for example b×b, and calculate the composition size of the composite two-dimensional code as (a+b+1)×(a+b+1) based on the area reserved size of the second area 602 and the Longbei code symbol size.

[0074] Here, for example, after the size is determined according to the second area 602, the large size of the Longbei code can be confirmed and the second two-dimensional code can be independently encoded and generated without being restricted.

[0075] Step 4, setting the encoding area of ​​the first area 601 and the second area 602 of the Longbei code according to the total code composition size of the composite two-dimensional code and the position of the second area 602. Here, the area increased by the composition size of the composite two-dimensional code compared with the size area of ​​the second two-dimensional code and the size area of ​​the Longbei code icon (approximately equal to 2ab) can be processed in two ways. One is to use the excess area to increase the error correction code, and the other is to accurately calculate the main code size and then reduce the total area and re-fill the data according to the rules.

[0076] S72 , adjusting the shape of the first region 601 in a manner of surrounding the outline of the second region 602 .

[0077] In one or more embodiments, the shape of the first area 601 is adjusted in a manner surrounding the outline of the second area 602, including: keeping the coding density of the first two-dimensional code unchanged, and adjusting the shape of the first area 601 so that the area difference between the adjusted first area 601 and the second area 602 is not less than the coding area of ​​the first two-dimensional code.

[0078] In one or more embodiments, adjusting the shape of the first region 601 in a manner surrounding the outline of the second region 602 also includes: compressing the encoding density of the first two-dimensional code so that the area of ​​the adjusted first region 601 is not less than the encoding area of ​​the first two-dimensional code.

[0079] S73, fill the first area 601 with the coded data of the first two-dimensional code to generate a composite two-dimensional code. For example, the two-dimensional code data is filled in the order of top first then bottom, left first then right, the first area 601 is filled with the Longbei code data, and the second area 602 is filled with any one of the pictures, texts or second two-dimensional codes such as QR codes.

[0080] In one or more embodiments, it also includes setting format information according to the coding rule of Longbei code, and recording the version number of the second two-dimensional code in the Longbei code format information. Here, as mentioned above, all two-dimensional codes including Longbei code will put format information in the specific position of the icon. The format information is relatively small information, such as 8-bit binary data (8 points), and 2~3 positions are usually selected to put the same format information to reduce the probability of being contaminated. The format information is used to assist the rapid recognition of the two-dimensional code. For the public code system, in order to ensure the consistency of the reading method, the format information is usually used for the agreed rules, and for the non-public code system of Longbei code, the rules are not open. From the recognition point of view, the rules of the format information are consistent as long as the encoding and decoding parties are consistent.

[0081] In one or more embodiments, of course, the format information of the Longbei code may not store information such as the version number of the second two-dimensional code. During recognition, the second two-dimensional code can be recognized first, and then the actual placement size of the Longbei code can be obtained through the size of the second two-dimensional code.

[0082] The unique generation method of the composite two-dimensional code disclosed in the present invention breaks through the limitation of the intermediate code size, and adopts the Longbei code to significantly increase the content storage capacity, which can meet the storage needs of more information.

[0083] Another aspect of the embodiment of the present disclosure is introduced below: another method for generating a composite two-dimensional code.

[0084] Disposing a first region 601 and at least one second region 602 such that the second region 602 is at least partially included in the first region 601; Fill the second area 602 with the encoded data of the second two-dimensional code; The first area 601 is filled with the coded data of the first two-dimensional code, and in the area where the first area 601 overlaps with the second area 602, the coded data of the first two-dimensional code is converted into the same coded data as the second two-dimensional code according to a preset rule.

[0085] According to the unique generation method of the composite two-dimensional code disclosed in the present invention, it is possible to unify the encoding data, format information, code system, etc. of the Longbei code and the second two-dimensional code in the composite two-dimensional code, reuse the code word information of the second two-dimensional code, increase the coding area of ​​the Longbei code, and meet the storage needs of more information.

[0086] Another aspect of the embodiment of the present disclosure is introduced below: a method for recognizing a composite two-dimensional code.

[0087] like Figure 8 FIG. 1 is a schematic diagram of an embodiment of a composite two-dimensional code recognition method according to the present disclosure, and the composite two-dimensional code recognition method includes: S81, identifying the format information of the first two-dimensional code, namely the Longbei code, in the first area 601, and obtaining the first icon size of the first two-dimensional code contained in the format information; S82, searching for a first locator of the first two-dimensional code, for example, the center position of the Longbei code; S83, identifying the first two-dimensional code in the first area 601 according to the first locator and the first icon size, and decoding it.

[0088] In one or more embodiments, the second area 602 is filled with a second two-dimensional code, and the composite two-dimensional code recognition method also includes: identifying the format information of the second two-dimensional code in the second area 602, such as its version information, and obtaining the second icon size of the second two-dimensional code, such as a×a; searching for the second locator of the second two-dimensional code, such as starting from the center of the Longbei code to search for the second two-dimensional code and other locating symbols, and the search area is (a+1)×(a+1); based on the second locator and the second icon size, identifying the second two-dimensional code and decoding it.

[0089] In one or more embodiments, the second area 602 is filled with a second two-dimensional code, and the composite two-dimensional code recognition method also includes: obtaining the symbol size of the second two-dimensional code after recognizing the second two-dimensional code; obtaining the actual placement size of the first two-dimensional code according to the symbol size of the second two-dimensional code, that is, the remaining area after removing the area of ​​the second two-dimensional code symbol size is the Longbei code encoding symbol, and the Longbei code symbol is obtained according to the Longbei code composition rule; the first two-dimensional code is reversely restored to the matrix of the original code image, and decoded according to the original decoding procedure.

[0090] It should be understood that, although the steps in the flowchart of the accompanying drawings are displayed in sequence as indicated by the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least a part of the steps in the flowchart of the accompanying drawings may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be executed in turn or alternately with other steps or at least a part of the sub-steps or stages of other steps.

[0091] Another aspect of the embodiment of the present disclosure is introduced below: a recognition system for a two-dimensional code or a composite two-dimensional code.

[0092] like Fig. 9 As shown, the system structure may include terminal devices 901, 902, 903, 904, 907, a network 905 and a server 906. The network 905 is used to provide a medium for communication links between the terminal devices 901, 902, 903, 904, 907 and the server 906.

[0093] Here, the terminal devices 901, 902, 903, and 904 are, for example, display devices for displaying the two-dimensional code or the composite two-dimensional code as described above.

[0094] The terminal device 907 is, for example, an identification device, which is used to scan and identify at least a part of a two-dimensional code or a composite two-dimensional code displayed on a display device such as the terminal devices 901 , 902 , 903 , 904 .

[0095] The server 906 is used, for example, to send or receive a two-dimensional code or data of the two-dimensional code, or to send or receive at least a portion of a composite two-dimensional code or at least a portion of data of the composite two-dimensional code.

[0096] In this embodiment, the electronic device on which the method is run (e.g., the terminal device 901, 902, 903, or 904 shown in the figure) can transmit various information through the network 905. The network 905 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc. It should be noted that the above-mentioned wireless connection methods may include but are not limited to 3G / 4G / 5G connections, Wi-Fi connections, Bluetooth connections, WiMAX connections, Zigbee connections, UWB connections, local area networks ("LAN"), wide area networks ("WAN"), Internet (e.g., the Internet) and peer-to-peer networks (e.g., ad hoc peer-to-peer networks) and other network connection methods known now or developed in the future. The network 905 can communicate using any currently known or future developed network protocol such as HTTP (Hyper Text Transfer Protocol), and can be interconnected with digital data communications (e.g., communication networks) of any form or medium.

[0097] The user can use the terminal devices 901, 902, 903, 904 to interact with the server 906 through the network 905 to receive or send messages, etc. Various client applications can be installed on the terminal devices 901, 902, 903 or 904, such as video live broadcast and playback applications, web browser applications, shopping applications, search applications, instant messaging tools, email clients, social platform software, etc.

[0098] Terminal devices 901, 902, 903 or 904 can be various electronic devices with touch screens and / or support for web browsing, including but not limited to smart phones, tablet computers, e-book readers, MP3 (Moving Picture Experts Compressed Standard Audio Layer 3) players, MP4 (Moving Picture Experts Compressed Standard Audio Layer 4) players, head-mounted display devices, laptop computers, digital broadcast receivers, PDAs (personal digital assistants), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., as well as mobile terminals such as digital TVs, desktop computers, etc.

[0099] The server 906 may be a server that provides various services, such as a background server that provides support for pages displayed on the terminal device 901 , 902 , 903 or 904 or data transmitted. The server 906 may be a local server or a cloud server, for example.

[0100] It should be understood that Fig. 9 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to the implementation requirements.

[0101] Here, the terminal device can independently or in cooperation with other electronic terminal devices run various operating systems such as applications in the Android system to implement the embodiment method of the present disclosure, and can also run applications in other operating systems to implement the embodiment method of the present disclosure.

[0102] Another aspect of the embodiment of the present disclosure is introduced below: a terminal device.

[0103] refer to Fig.10 , which shows an electronic device (eg, Fig. 9 The terminal device in the embodiment of the present disclosure may be various terminal devices in the above-mentioned system. The electronic device shown in the figure is only an example and should not bring any limitation to the function and scope of use of the embodiment of the present disclosure.

[0104] like Fig.10 As shown, the electronic device 1000 may include a processing device (such as a central processing unit, a graphics processing unit, etc.) 1001 for controlling the overall operation of the electronic device. The processing device may include one or more processors to execute instructions to complete all or part of the steps of the above method. In addition, the processing device 1001 may also include one or more modules for processing and interacting with other devices.

[0105] The storage device 1002 is used to store various types of data. The storage device 1002 may include various types of computer-readable storage media or combinations thereof, such as electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or components, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present disclosure, a computer-readable storage medium may be any tangible medium that contains or stores a program that may be used by or in conjunction with an instruction execution system, device, or component.

[0106] The sensor device 1003 is used to sense the specified measured information and convert it into a usable output signal according to a certain rule, and may include one or more sensors. For example, it may include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor or a temperature sensor, etc., for detecting changes in the opening / closing state, relative positioning, acceleration / deceleration, temperature, humidity and light of the electronic device.

[0107] The processing device 1001 , the storage device 1002 , and the sensor device 1003 are connected to each other via a bus 1004 . An input / output (I / O) interface 1005 is also connected to the bus 1004 .

[0108] The multimedia device 1006 may include input devices such as a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, etc. for receiving input signals from a user. The various input devices may cooperate with the various sensors of the above-mentioned sensor device 1003 to complete, for example, gesture operation input, image recognition input, distance detection input, etc. The multimedia device 1006 may also include output devices such as a liquid crystal display (LCD), a speaker, a vibrator, etc.

[0109] The power supply device 1007 is used to provide power to various devices in the electronic device, and may include a power management system, one or more power supplies, and components for distributing power to other devices.

[0110] The communication device 1008 may allow the electronic device 1000 to communicate with other devices wirelessly or by wire to exchange data.

[0111] The above-mentioned devices can also be connected to the I / O interface 1005 to implement the application of the electronic device 1000.

[0112] It should be understood that, although each box in the block diagram of the accompanying drawings may represent a module, a part of which contains one or more executable instructions for implementing a specified logical function, these modules are not necessarily executed in sequence. The modules and functional units in the device embodiments disclosed herein may be integrated into a processing module, or each unit may exist physically separately, or two or more modules or functional units may be integrated into one module. The above-mentioned integrated modules may be implemented in the form of hardware or in the form of software functional modules. If the integrated modules are implemented in the form of software functional modules and sold or used as independent products, they may also be stored in a computer-readable storage medium. The above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.

[0113] Although Fig.10An electronic device having various devices is shown, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.

[0114] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device. When the computer program is executed by a processing device, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.

[0115] In the context of the present disclosure, a machine-readable medium may be a tangible medium that can contain or store a program for use by or in connection with an instruction execution system, apparatus, or device.

[0116] It should be noted that the above-mentioned computer-readable medium of the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. In the present disclosure, the computer-readable signal medium may include a data signal propagated in the baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate or transmit a program for use by or in combination with an instruction execution system, device or device. The program code contained on the computer-readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

[0117] The computer-readable medium may be included in the electronic device, or may exist independently without being installed in the electronic device.

[0118] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages ​​or a combination thereof, including, but not limited to, object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, or may be connected to an external computer (e.g., through the Internet using an Internet service provider).

[0119] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0120] The units involved in the embodiments described in the present disclosure may be implemented by software or hardware, wherein the name of a unit does not, in some cases, limit the unit itself.

[0121] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.

[0122] According to one or more embodiments of the present disclosure, a two-dimensional code is provided, comprising: a track frame line having a rectangular shape, formed by dark modules and light modules arranged alternately, and the dark modules are arranged at the four vertex positions of the track frame line, the track frame line is used for identifying the two-dimensional code; and a coding area, located inside the track frame line, the coding area is filled with data modules for expressing data information.

[0123] According to one or more embodiments of the present disclosure, a two-dimensional code is provided, wherein the product of the row value and the column value of the data modules arranged in the coding area is not less than the number of data modules required to encode the data information; at least one of the row value and the column value is a non-fixed numerical value; and both the row value and the column value are odd numbers.

[0124] According to one or more embodiments of the present disclosure, a two-dimensional code is provided, wherein the track frame line is surrounded by two first track lines and two second track lines; the two first track lines are respectively arranged on the two outer peripheral sides of the first direction of the coding area, and are respectively adjacent to the coding area; the two second track lines are respectively arranged on the two outer peripheral sides of the second direction of the coding area, and are respectively adjacent to the coding area; wherein the first direction and the second direction are perpendicular to each other, and the first direction is the filling direction of the two-dimensional code.

[0125] According to one or more embodiments of the present disclosure, a two-dimensional code is provided, which is a Longbei code. When the two-dimensional code is in a dark background, the dark module and the light module of the track frame line and the data module are all presented in a color opposite to the original module.

[0126] According to one or more embodiments of the present disclosure, a two-dimensional code generation method is provided, including: encoding data information to be encoded and calculating the required number of data modules; filling the data modules into the coding area; arranging dark modules and light modules at intervals, setting a track frame line with a rectangular shape, setting the dark modules at the four vertex positions of the track frame line, and making the number of data modules that can be arranged in the coding area within the track frame line not less than the required number of data modules, so as to generate the two-dimensional code.

[0127] According to one or more embodiments of the present disclosure, a two-dimensional code generation method is provided, and the two-dimensional code generation method also includes: according to the required number of data modules, calculating the row value and column value required for arranging the data modules in the encoding area, so that the product of the row value and the column value is not less than the required number of data modules, and the row value and the column value are both odd numbers.

[0128] According to one or more embodiments of the present disclosure, a method for generating a two-dimensional code is provided, wherein the step of calculating the row values ​​and column values ​​required for arranging the data modules in the coding area according to the required number of data modules comprises: Calculate the row value and the column value according to a fixed row-column ratio; or, Calculate the column value according to the row value being a fixed value; or, Calculate the row value according to the column value being a fixed value; or, According to the required number of data modules being a fixed value, the size of a single data module is reduced, and the row value and the column value are calculated.

[0129] According to one or more embodiments of the present disclosure, a two-dimensional code generation method is provided, and the two-dimensional code generation method further includes: The number of modules of the first track line is the column value plus two, and the first track line is generated along the first direction, and both ends of the first track line are the dark modules; The number of modules of the second track line is the row value plus two, and the second track line is generated along the second direction, and both ends of the second track line are the dark modules; The two first track lines arranged opposite to each other and the two second track lines arranged opposite to each other are enclosed to form the track frame line, and the track frame line is adjacently sleeved on the outer peripheral side of the coding area; The first direction and the second direction are perpendicular to each other, and the first direction is a code filling direction of the two-dimensional code.

[0130] According to one or more embodiments of the present disclosure, a two-dimensional code generation method is provided. When the encoding area is not filled with the data module, the two-dimensional code generation method further includes: Calculating the number of free modules, where the number of free modules is equal to the difference between the total number of data modules that can be filled in the coding area and the number of data modules required after the data information is encoded; Calculating the number of sequence head modules and the number of sequence tail modules, the sum of the number of sequence head modules and the number of sequence tail modules is equal to the number of free modules; Filling the header module into the starting position of the data module arrangement in the encoding area; The tail module is filled in the end position of the data module arrangement in the encoding area.

[0131] According to one or more embodiments of the present disclosure, a method for generating a two-dimensional code is provided, wherein the two-dimensional code is a Longbei code, and the method for generating a two-dimensional code further includes: According to the preset arrangement rules, the format information module is filled in the coding area.

[0132] According to one or more embodiments of the present disclosure, a two-dimensional code recognition method is provided, including: Determine the outline of the QR code and search for the outline in the scan area; Filter out the two-dimensional code icon whose outline graphic is a preset track frame line; Dividing the two-dimensional code icon into grids according to the track frame line; Verify whether there is a format information module in the coding area of ​​the two-dimensional code icon. If so, read the data module in the coding area and decode the data information. If not, terminate the recognition.

[0133] According to one or more embodiments of the present disclosure, a two-dimensional code recognition method is provided, wherein the step of verifying whether there is a format information module in the coding area of ​​the two-dimensional code icon comprises: The outline graphic is rotated, and the outline graphic at different angles is verified to see whether it has the format information module.

[0134] According to one or more embodiments of the present disclosure, a two-dimensional code recognition method is provided, wherein the two-dimensional code is a Longbei code, and a sequence header module and a sequence tail module are filled in the coding area, and the two-dimensional code recognition method further includes: Identifying the header module and the tail module in the coding region; Starting from the head module, the data module is read along the code filling direction and ends at the tail module.

[0135] According to one or more embodiments of the present disclosure, a two-dimensional code recognition system is provided, comprising: A display device, used to display the QR code as described in any one of the above items; An identification device, used to scan and identify the QR code displayed on the display device; The server is used to send or receive the QR code or the data of the QR code.

[0136] According to one or more embodiments of the present disclosure, a computer device is provided, including a memory, a processor, and a computer program stored in the memory, wherein the processor executes the program to implement the steps of any of the above methods.

[0137] According to one or more embodiments of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above methods are implemented.

[0138] According to one or more embodiments of the present disclosure, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the steps of any of the above methods are implemented.

[0139] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other to form a technical solution.

[0140] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.

[0141] Although the subject matter has been described in language specific to structural features and / or methodological logical actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims.

Claims

1. A two-dimensional code, characterized in that: include: A track frame line has a rectangular shape, is formed by dark modules and light modules arranged alternately, and the dark modules are arranged at four vertex positions of the track frame line, and the track frame line is used for the recognition of the two-dimensional code; and The coding area is located inside the track frame line, and the coding area is filled with data modules for expressing data information.

2. The two-dimensional code according to claim 1, characterized in that: The product of the row value and the column value of the data modules arranged in the coding area is not less than the number of data modules required to encode the data information; At least one of the row value and the column value is a non-fixed value; and The row value and the column value are both odd numbers.

3. The two-dimensional code according to claim 2, characterized in that: The track frame line is formed by two first track lines and two second track lines; The two first track lines are respectively arranged at two outer peripheral sides of the coding area in the first direction and are respectively adjacent to the coding area; The two second track lines are respectively arranged at two outer peripheral sides of the coding area in the second direction and are respectively adjacent to the coding area; The first direction and the second direction are perpendicular to each other, and the first direction is a code filling direction of the two-dimensional code.

4. The two-dimensional code according to claim 1, characterized in that: The two-dimensional code is a Longbei code. When the two-dimensional code is in a dark background, the dark module and the light module of the track frame line and the data module are all presented in a color opposite to the original module.

5. A two-dimensional code generation method, characterized in that: include: Encode the data information to be encoded and calculate the number of required data modules; Filling data modules into the coding area; A track frame line having a rectangular shape is arranged in the form of alternating dark modules and light modules, the dark modules are arranged at the four vertex positions of the track frame line, and the number of data modules that can be arranged in the coding area within the track frame line is not less than the required number of data modules, so as to generate the two-dimensional code.

6. The two-dimensional code generation method according to claim 5, characterized in that: The two-dimensional code generation method also includes: According to the required number of data modules, the row value and column value required for arranging the data modules in the coding area are calculated so that the product of the row value and the column value is not less than the required number of data modules, and the row value and the column value are both odd numbers.

7. The two-dimensional code generation method according to claim 6, characterized in that: The step of calculating the row values ​​and column values ​​required for arranging the data modules in the coding region according to the required number of data modules comprises: Calculate the row value and the column value according to a fixed row-column ratio; or, Calculate the column value according to the row value being a fixed value; or, Calculate the row value according to the column value being a fixed value; or, According to the required number of data modules being a fixed value, the size of a single data module is reduced, and the row value and the column value are calculated.

8. The two-dimensional code generation method according to claim 6, characterized in that: The two-dimensional code generation method also includes: The number of modules of the first track line is the column value plus two, and the first track line is generated along the first direction, and both ends of the first track line are the dark modules; The number of modules of the second track line is the row value plus two, and the second track line is generated along the second direction, and both ends of the second track line are the dark modules; The two first track lines arranged opposite to each other and the two second track lines arranged opposite to each other are enclosed to form the track frame line, and the track frame line is adjacently sleeved on the outer peripheral side of the coding area; The first direction and the second direction are perpendicular to each other, and the first direction is a code filling direction of the two-dimensional code.

9. The two-dimensional code generation method according to claim 5, characterized in that: When the encoding area is not filled with the data module, the two-dimensional code generation method further includes: Calculating the number of free modules, where the number of free modules is equal to the difference between the total number of data modules that can be filled in the coding area and the number of data modules required after the data information is encoded; Calculating the number of sequence head modules and the number of sequence tail modules, the sum of the number of sequence head modules and the number of sequence tail modules is equal to the number of free modules; Filling the header module into the starting position of the data module arrangement in the encoding area; The tail module is filled in the end position of the data module arrangement in the encoding area.

10. The two-dimensional code generation method according to claim 5, characterized in that: The two-dimensional code is a Longbei code, and the two-dimensional code generation method further includes: According to the preset arrangement rules, the format information module is filled in the coding area.

11. A two-dimensional code recognition method, characterized in that: include: Determine the outline of the QR code and search for the outline in the scan area; Filter out the two-dimensional code icon whose outline graphic is a preset track frame line; Dividing the two-dimensional code icon into grids according to the track frame line; Verify whether there is a format information module in the coding area of ​​the two-dimensional code icon. If so, read the data module in the coding area and decode the data information. If not, terminate the recognition.

12. The two-dimensional code recognition method according to claim 11, characterized in that: The verifying whether there is a format information module in the coding area of ​​the two-dimensional code symbol includes: The outline graphic is rotated, and the outline graphic at different angles is verified to see whether it has the format information module.

13. The two-dimensional code recognition method according to claim 11, characterized in that: The two-dimensional code is a Longbei code, and the coding area is filled with a sequence header module and a sequence tail module. The two-dimensional code recognition method also includes: Identifying the header module and the tail module in the coding region; Starting from the head module, the data module is read along the code filling direction and ends at the tail module.

14. A two-dimensional code recognition system, characterized in that: include: A display device for displaying the two-dimensional code according to claims 1 to 4; An identification device, used to scan and identify the QR code displayed on the display device; The server is used to send or receive the QR code or the data of the QR code.

15. A computer device comprising a memory, a processor and a computer program stored in the memory, characterized in that: The processor executes the computer program to implement the steps of the method according to any one of claims 5-13.

16. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 5 to 13 are implemented.

17. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 5 to 13 are implemented.

Citation Information

Patent Citations

  • Novel high-capacity two-dimensional barcode and system, encoding and decoding methods and applications thereof

    CN102034127A

  • Cmnibearing information synchronous two-dimensional bar code system and reading method

    CN1444175A

  • Two-dimentional bar code system of continuous chagnable of length-width ratio of code area

    CN1560792A

  • Two-dimensional code generation and identification

    US20200364429A1