Circular two-dimensional code encoding and decoding methods

JP2025540643A5Pending Publication Date: 2026-03-27SHANGHAI BILIBILI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Filing Date
2023-07-06
Publication Date
2026-03-27

AI Technical Summary

Technical Problem

Existing two-dimensional codes, particularly QR codes, lack exclusivity and privacy protection due to their open-source encoding and decoding designs, which allows unauthorized entities to generate and interpret data, compromising security and privacy.

Method used

A method for encoding and decoding circular two-dimensional codes that involves converting data into binary data, determining a two-dimensional code version with multiple rings, segmenting valid data bits into metadata and content segments, and generating a symbol pattern to create a circular code with predetermined valid and invalid data bits, ensuring privacy and exclusivity.

Benefits of technology

The circular two-dimensional code provides secure data content with privacy protection and brand individuality, suitable for specific uses by ensuring exclusive recognition and secure data storage.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 00000000_0000_ABST
    Figure 00000000_0000_ABST
Patent Text Reader

Abstract

This application discloses a method for encoding a circular two-dimensional code, including the steps of converting data to be encoded into binary data, determining a two-dimensional code version of a two-dimensional code to be generated, where the two-dimensional code to be generated includes multiple rings corresponding to the same center, each ring corresponding to multiple data bits, determining multiple valid data bits for the multiple rings according to the two-dimensional code version, dividing the multiple valid data bits into multiple data segments, and generating corresponding symbol patterns for the multiple valid data bits according to the metadata and the binary data to obtain a circular two-dimensional code. The circular two-dimensional code provided in this application requires a specific encoding and decoding method, has secure data content, and is suitable for specific applications.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

[0001] This application claims priority to a Chinese patent application with application number 202211533389.7, entitled "Method for encoding and decoding circular two-dimensional codes," filed on November 30, 2022, the entire contents of which are incorporated herein by reference.

[0002] The embodiments of the present application relate to the technical field of computers, and in particular to a circular two-dimensional code encoding method, decoding method, encoding system, decoding system, computer device, and computer-readable storage medium. [Background technology]

[0003] With the development of computer technology, 2D codes have become a convenient medium for transmitting information and are becoming more integrated. Users can obtain related information or link to related web pages or interfaces by scanning a 2D code. 2D code encoding and decoding involves performing a binarization operation on the image and then converting binary data into target data according to predetermined rules. Common 2D codes include QR codes, WeChat mini-program codes, and TikTok codes. QR codes, mini-program codes, and TikTok codes are all closed-source 2D codes and cannot be directly used in other products.

[0004] Currently, the most commonly used two-dimensional code on the market is the QR code, and its open-source encoding and decoding design has led to an objective explosion in the use of QR codes. As the inventors recognized, due to the open-source nature of the QR code generation algorithm, the QR code generation channel is not exclusive, that is, different entities can use the open-source code to generate the same two-dimensional code, which poses a serious risk to applications that require strict restrictions on the digital generation entity or scope, and weakens the privacy protection of data content.

[0005] It should be noted that the above content is not necessarily prior art, and is not intended to limit the scope of patent protection of the present application. Summary of the Invention

[0006] An object of the embodiments of the present application is to provide a method, system, computer device and computer-readable storage medium for encoding a circular two-dimensional code that solves the above problems.

[0007] In one aspect, the embodiments of the present application include: converting data to be encoded into binary data; determining a two-dimensional code version of a two-dimensional code to be generated, the two-dimensional code to be generated including a plurality of rings corresponding to a common center, each ring corresponding to a plurality of data bits; determining a plurality of valid data bits of the plurality of rings according to the two-dimensional code version; dividing the plurality of valid data bits into a plurality of data segments, including a reserved field for encoding metadata and a content data segment for encoding the binary data; generating a corresponding symbol pattern on the plurality of valid data bits according to the metadata and the binary data to obtain a circular two-dimensional code.

[0008] Optionally, the step of determining the two-dimensional code version of the two-dimensional code to be generated includes: determining the two-dimensional code version according to the amount of information of the encoding target data; Here, different two-dimensional code versions correspond to different numbers of multiple valid data bits.

[0009] Selectively, Further included is the step of combining the valid data bits of a single ring into one data segment based on a predetermined clockwise direction to obtain multiple data segments for multiple rings.

[0010] Selectively, The method further includes determining a front-to-back order of the plurality of data segments according to an order from the innermost ring to the outermost ring of the plurality of rings.

[0011] Selectively, The method further includes a step of setting a plurality of locators around the periphery of the two-dimensional code to be generated so as to be distributed on the outermost ring of the plurality of rings.

[0012] Optionally, the method further comprises: The method further includes determining data bits occupied by the plurality of locators as invalid data bits that are not used to store information.

[0013] Optionally, the method further comprises: The method further includes generating a target pattern including an authentication identifier within an innermost ring of the plurality of rings.

[0014] In one aspect, the embodiments of the present application include: a conversion module for converting the encoding target data into binary data; a first determination module for determining a two-dimensional code version of a two-dimensional code to be generated, the two-dimensional code to be generated including a plurality of rings corresponding to the same center, each ring corresponding to a plurality of data bits; a second determination module for determining a plurality of valid data bits of the plurality of rings according to the two-dimensional code version; a segmentation module for segmenting the plurality of valid data bits into a plurality of data segments, the data segments including a reserved field for encoding metadata and a content data segment for encoding the binary data; and a generating module for generating a corresponding symbol pattern for the plurality of valid data bits according to the metadata and the binary data to obtain a circular two-dimensional code.

[0015] In one aspect, the embodiments of the present application include: obtaining a circular two-dimensional code, the circular two-dimensional code including a plurality of rings corresponding to the same center, each ring corresponding to a plurality of data bits; determining a plurality of valid data bits of the plurality of rings according to the two-dimensional code version, wherein the plurality of valid data bits are divided into a plurality of data segments including a reserved field for storing metadata and a content data segment for storing binary data; and obtaining binary data of the circular two-dimensional code according to a plurality of valid symbol patterns corresponding to the plurality of valid data bits.

[0016] Selectively, determining valid data bits of a single ring as one data segment based on a predetermined clockwise direction to obtain multiple data segments of multiple rings; The method further includes determining a front-to-back order of the plurality of data segments according to an order from the innermost ring to the outermost ring of the plurality of rings.

[0017] In one aspect, the embodiments of the present application include: a first acquisition module for acquiring a circular two-dimensional code, the circular two-dimensional code including a plurality of rings corresponding to the same center, each ring corresponding to a plurality of data bits; a determining module for determining a plurality of valid data bits of the plurality of rings according to the two-dimensional code version, the valid data bits being divided into a plurality of data segments including a reserved field for storing metadata and a content data segment for storing binary data; and a second acquiring module for acquiring binary data of the circular two-dimensional code according to a plurality of valid symbol patterns corresponding to the plurality of valid data bits.

[0018] In one aspect, an embodiment of the present application further provides a computer device including a memory, a processor, and computer-readable instructions stored in the memory and executable on the processor, wherein, when the computer-readable instructions are executed by the processor, the steps of the encoding method and / or decoding method for a circular two-dimensional code described above are realized.

[0019] In one aspect, an embodiment of the present application further provides a computer-readable storage medium having computer-readable instructions stored thereon, the computer-readable instructions being executable by at least one processor, thereby causing the at least one processor to implement the steps of the encoding and / or decoding methods for circular two-dimensional codes described above.

[0020] The encoding and decoding method, system, computer device, and computer-readable storage medium provided in the embodiments of the present application may produce the following technical effects.

[0021] Unlike the case where black and white symbols are used as valid coded data for a two-dimensional code, in this embodiment, valid data bits and invalid data bits, i.e., valid coded data for each ring, are predetermined. Therefore, the circular two-dimensional code requires a specific encoding and decoding method, and provides a highly recognizable and exclusive variant (circular) two-dimensional code that combines privacy protection and brand individuality, with secure data content and suitable for specific use. [Brief explanation of the drawings]

[0022] [Figure 1] 1 is a schematic diagram illustrating an application environment of a circular two-dimensional code encoding method according to an embodiment of the present application; [Figure 2] 1 is a schematic diagram showing a flowchart of a method for encoding a circular two-dimensional code according to a first embodiment of the present application. [Figure 3] 1 is a schematic diagram illustrating an exemplary pattern of a circular two-dimensional code according to Example 1 of the present application. [Figure 4] 1 shows a schematic representation of a reserved field. [Figure 5] 10 is a schematic diagram illustrating another exemplary pattern of a circular two-dimensional code according to Example 1 of the present application. [Figure 6] 10 is a schematic diagram illustrating another exemplary pattern of a circular two-dimensional code according to Example 1 of the present application. [Figure 7] 1 is a schematic diagram showing the encoding order of a circular two-dimensional code according to a first embodiment of the present application. [Figure 8] 10 is a schematic diagram showing a flowchart of a method for encoding a circular two-dimensional code according to a second embodiment of the present application. [Figure 9] 10 is a block diagram of a circular two-dimensional code encoding system according to a third embodiment of the present application; FIG. [Figure 10] FIG. 10 is a block diagram of a circular two-dimensional code decoding system according to a fourth embodiment of the present application. [Figure 11] 10 is a schematic diagram illustrating the hardware architecture of a computer device suitable for implementing a circular two-dimensional code encoding / decoding method according to a fifth embodiment of the present application; DETAILED DESCRIPTION OF THE INVENTION

[0023] In order to make the objectives, technical solutions and advantages of the present application clearer and easier to understand, the present application will be described in more detail below with reference to the drawings and examples. It should be understood that the specific examples described herein are only for the purpose of interpreting the present application and are not intended to limit the present application. Based on the examples in the present application, all other examples obtained by those skilled in the art without any creative efforts fall within the scope of protection of the present application.

[0024] In addition, the terms "first," "second," etc., used in the embodiments of this application are merely for explanatory purposes and should not be understood as expressing or implying relative importance or the number of technical features indicated. Therefore, features defined as "first" or "second" can expressly or imply the inclusion of at least one of the features. Furthermore, the technical solutions in each embodiment of this application can be combined with each other, but this must be based on the fact that they can be realized by a person skilled in the art. If a combination of technical solutions is mutually contradictory or infeasible, it should be considered that such a combination of technical solutions does not exist and is not included in the scope of protection claimed in this application.

[0025] In the description of this application, it should be understood that the numerical symbols before steps do not indicate the order in which the steps should be performed, but are merely used to facilitate the description of this application and to distinguish each step, and therefore should not be construed as a limitation on this application.

[0026] The following are the interpretations of terms used in this application.

[0027] A two-dimensional bar code is a black and white graphic that records data and code information using a specific geometric shape and is distributed on a plane (two-dimensionally) according to a certain rule.

[0028] Binarization is a visual effect in which an entire image is converted into an image with only two colors, black and white, using a certain image algorithm.

[0029] ECC (full name: Error Correcting Code) is a technology that can detect and correct errors, thereby improving operational stability and reliability.

[0030] Perspective transformation is the projection of an image onto a new viewpoint or plane, which can then be transformed into a flat effect.

[0031] In order for those skilled in the art to easily understand the technical solutions provided in the embodiments of the present application, the related art will be described below.

[0032] With the development of computer technology, 2D codes have become a convenient medium for transmitting information and have become increasingly integrated. Users can obtain relevant information or link to related web pages or interfaces by scanning a 2D code. 2D code encoding and decoding involves performing a binarization operation on an image and then converting binary data into target data according to predetermined rules. There are various types of 2D barcodes, and each has a different structure and writing and reading methods. Examples include PDF417 code, QR code, Hanxin code, color barcode, quick mark code, and data matrix. Common 2D codes include QR code, WeChat mini-program code, and TikTok code. Mini-program code and TikTok code are both closed-source 2D codes and cannot be directly used in other products.

[0033] A 2D code reader can scan the 2D code and analyze the original information. Because it can scan both paper and electronic 2D codes, 2D codes can be used in fields such as electronic tickets, electronic coupons, membership systems, and account login authentication.

[0034] Below, we will further introduce the related technologies of two-dimensional codes using QR Code (Quick Response Code) as an example.

[0035] QR codes can store data using four standardized encoding patterns (numeric, alphanumeric, byte, and Chinese character). They can store more data, offer open-source encoding and decoding designs, and have good recognition rates, which allows their application range to be expanded to more situations. However, they are not suitable for situations where privacy protection of data content is required, such as when it is desirable for only a specific app to be able to interpret the content of the QR code.

[0036] In view of this, the embodiments of the present application provide a new two-dimensional code solution that can realize data content security and be adapted to specific scenarios, and has a high recognition success rate under the background of both privacy protection and brand individuality.

[0037] An exemplary application environment of the present application is provided below, which can be used, for example, in a two-dimensional code encoding device 2 and a two-dimensional code decoding device 4 as shown in FIG.

[0038] The two-dimensional code encoding device 2 may be any device capable of generating and / or analyzing two-dimensional codes. For example, it may be a terminal device such as a smartphone, tablet, laptop computer, workstation, game console, digital streaming device, in-vehicle user terminal, smart TV, set-top box, etc., or it may be a virtualized computing instance within a server. The virtualized computing instance may include a virtual machine, e.g., an emulation of a computer system, operating system, server, etc.

[0039] The two-dimensional code encoding device 2 may include multiple client programs, such as a two-dimensional code generator, a two-dimensional code reader, etc. The two-dimensional code generator can provide the function of generating a two-dimensional code, and the two-dimensional code reader is used to provide the function of analyzing a two-dimensional code.

[0040] The two-dimensional code decoding device 4 may be a specific scanning device or a general-purpose device with scanning and recognition functions, such as a smartphone.

[0041] In the following, several examples are provided in the above exemplary application environment to describe the technical solutions of the embodiments of the present application: The two-dimensional code encoding device 2 or the two-dimensional code decoding device 4 can be the entity that performs encoding and decoding of the circular two-dimensional code.

[0042] Example 1 2 is a schematic flow chart of a method for encoding a circular two-dimensional code according to Example 1 of the present application. As shown in FIG. 2, the method for encoding a circular two-dimensional code may include steps S200 to S210.

[0043] In step S200, the data to be encoded is converted into binary data.

[0044] In step S202, a two-dimensional code version of the two-dimensional code to be generated is determined, where the two-dimensional code to be generated includes multiple rings corresponding to the same center, and each ring corresponds to multiple data bits.

[0045] In step S204, a plurality of valid data bits of the plurality of rings are determined according to the two-dimensional code version.

[0046] In step S206, the plurality of valid data bits are divided into a plurality of data segments, including a reserved field for encoding metadata and a content data segment for encoding the binary data.

[0047] In step S208, a corresponding symbol pattern is generated for the plurality of valid data bits according to the metadata and the binary data, to obtain a circular two-dimensional code.

[0048] Taking Figure 3 as an example, a circular 2D code has six rings from the inside to the outside. Each ring is a different size, and there is a certain interval between adjacent rings to prevent overlapping or crossing. To ensure effective recognition efficiency, the rings may be circular, as shown in Figure 3. The multiple rings are concentric, and the center point of each ring is the center point of a circle. The ring shape may also be elliptical, rectangular, triangular, etc., and can be designed according to actual needs.

[0049] The ring is formed by alternating multiple first and second symbol patterns.

[0050] Taking the third ring in Figure 3 as an example, the third ring is formed by alternating multiple first and second symbol patterns, visually forming a "dashed" circular ring, with different symbol patterns corresponding to different binary elements (1 or 0).

[0051] In an alternative embodiment, in order to accommodate different amounts of data to be encoded, step S202 may include determining the two-dimensional code version according to the amount of information of the data to be encoded, where different two-dimensional code versions correspond to different numbers of effective data bits, and a larger number of effective data bits indicates a larger amount of information that can be stored.

[0052] In an alternative embodiment, for encoding and decoding accuracy, the method comprises: Further included is the step of combining the valid data bits of a single ring into one data segment based on a predetermined clockwise direction to obtain multiple data segments for multiple rings.

[0053] In an optional embodiment, to facilitate splitting of the encoded data and the composite data, the method further includes determining a front-to-back order of the plurality of data segments according to an order from an innermost ring to an outermost ring of the plurality of rings.

[0054] In an alternative embodiment, the method comprises: The method further includes setting a plurality of locators around the periphery of the two-dimensional code to be generated, so that the locators are distributed around the outermost ring of the plurality of rings. Still referring to FIG. 3, the circles around the periphery of the circular two-dimensional code correspond to locators. Each circle represents one locator. Note that the number of locators is not limited to the four shown in FIG. 3 and may be more or less depending on actual needs. The shape of the locators is also not limited to the circle shown in the figure and may be rectangular, etc., and their arrangement is also not limited to the arrangement shown in FIG. 3 and may be arranged depending on actual needs. In this embodiment, the plurality of locators are used to position the circular two-dimensional code, improving the accuracy and efficiency of recognition. Note that the locators in this embodiment are preferably circular. Since this embodiment uses a circular two-dimensional code, the circular shape not only improves recognition accuracy but also reduces the occupying area, minimizing the impact on the volume of the circular two-dimensional code. Furthermore, in order to improve the efficiency and accuracy of the positioning recognition of the circular two-dimensional code, the data of the plurality of locators is four, and is distributed directly above, directly below, directly to the left, and directly to the right of the target center point.

[0055] In an alternative embodiment, the method comprises: The method further includes determining data bits occupied by the locators as invalid data bits that are not used to store information. To ensure the accuracy of valid encoded data, the circular two-dimensional code is configured so that data bits at the intersections occupied by the locators are invalid data bits and are not used to store valid encoded data. As shown in FIG. 3, data bits at the intersections of lines #1, #9, #10, #11, #18, #19, #20, #27, #28, and #29 with the fifth and sixth rings are occupied or affected by locators. To ensure accurate encoding, the valid data bits of the ten lines are set to four bits, and two data bits corresponding to the intersections with the fifth and sixth rings are excluded. Furthermore, if the circular two-dimensional code contains other patterns that affect the data bits, they must also be excluded accordingly.

[0056] In an optional embodiment, the method further includes generating a target pattern including an authentication identifier within an innermost ring of the plurality of rings to provide a platform identifier or the like for the circular two-dimensional code.

[0057] For example, Figures 3, 5, and 6 each show a different version of the two-dimensional code.

[0058] To make this embodiment easier to understand, the circular two-dimensional code (version V1) provided in this embodiment will be described.

[0059] As shown in Figure 3, each ring in this circular 2D code contains 36 valid data bits used for encoding and decoding. Numbering begins with the line in the lower half perpendicular to the horizontal diameter, #1, and a line is added every 10 degrees, for a total of 36 lines arranged sequentially. Note that the lines in the figure are for convenience only and do not actually exist.

[0060] Each line can intersect with up to six rings (circular coding regions).

[0061] A blank at the intersection of the line and the ring represents a data bit of 0; If the intersection of the line and the ring is not blank, it represents a data bit of 1; To avoid the locator and icon areas, The effective bits of the 10 lines #1, #9, #10, #11, #18, #19, #20, #27, #28, and #29 are 4 bits (excluding the outer 2 bits).

[0062] Therefore, the maximum number of bits supported by the circular two-dimensional code can be estimated to be (36*6)-(10*2)=196 bits.

[0063] Furthermore, since the first 16 bits in the innermost ring can be set as a reserved field, the number of effective bits for storing data is 196-16=180 bits.

[0064] As shown in FIG. 4, the above 16 data bits are defined as follows:

[0065] (1) The parity bit is used for parity checking of the 16-bit reserved field, and an even parity method can be adopted.

[0066] (2) The two-dimensional code version number can be expressed as a binary number from 0b001 to 0b011.

[0067] (3) The code mapping table version can be expressed as a binary number from 0b0001 to 0b0011.

[0068] (4) The data type is reserved and can be used to identify the type of data after final decoding (eight definitions in total are supported, such as mid, app-id, etc.).

[0069] (5) Mask index is reserved and indexes the decoding mask of the data coding area, and supports a total of eight types.

[0070] (6) The error correction level corresponds to the definition of four error correction levels: L, M, Q, and H, and can be expressed as binary numbers 0b00 to 0b11.

[0071] Regarding ECC (Error Correcting Code) processing design, The last two data bits in the reserved field may be used to identify the error correction level of the circular two-dimensional code, and the error correction algorithm may be consistent with QR. For example, 1. The algorithm is for GF(256) RS codes, 2. The levels are L (0b00), M (0b01), Q (0b10), and H (0b11). 3. The check bit storage position is at the very end of the data coding area, Note that check bits are generated for all data areas other than the check bits, and if the 16-bit reserved field is not included and the data bits cannot be aligned in one byte, the unaligned data bits are ultimately stored in the lower bits of a separate byte to generate the check bits.

[0072] As shown in Table 1, the error correction levels are defined as follows:

[0073] [Table 1]

[0074] The circular two-dimensional code (version V2) provided in this embodiment will be described below with reference to FIG.

[0075] Based on the circular two-dimensional code (V1 version) shown in Figure 5, the circular two-dimensional code (V2 version) in Figure 5 adds 18 lines to the data area, that is, there are 54 lines in the circular two-dimensional code in Figure 5.

[0076] Considering the following two points, the effective data bits of each line are the outer 5 rings.

[0077] 1. When using the innermost ring, data becomes too dense, which makes it easy for dirty data to occur during encoding and decoding.

[0078] 2. The innermost ring stores reserved fields, which define the metadata of the 2D code and require uniform versions (all versions have the same decoding method).

[0079] The 18 added lines are located halfway between two existing lines; for example, line #2.5 is located halfway between lines #2 and #3 (offsetting line #2 by 5 degrees clockwise). All of the added lines are located after the even-numbered lines of the V1 version circular 2D code; that is, the new lines 2.5, 4.5, 6.5, 8.5, 10.5... are placed after 2, 4, 6, 8, 10...

[0080] To avoid the locator and platform icon area, the effective data bits of the four lines at 10.5, 18.5, 28.5, and 36.5 are 3 bits (excluding the outer 2 bits).

[0081] Compared with the V1 version circular two-dimensional code, the V2 version circular two-dimensional code in Figure 5 supports an additional bit number of (18*5)-(4*2)=82 bits. The effective number of bits for storing data in the V2 version circular two-dimensional code is 180+82=262 bits.

[0082] The error correction levels for circular 2D codes (V2 version) are defined as shown in Table 2 below.

[0083] [Table 2]

[0084] The circular two-dimensional code (version V3) provided in this embodiment will be described below with reference to FIG.

[0085] Based on the circular 2D code (V1 version) shown in Figure 3, the circular 2D code (V3 version) in Figure 6 adds 36 lines to the data area, that is, there are 72 lines in the circular 2D code in Figure 6.

[0086] The effective data bits of each line are the outer 5 rings, and its design considerations are consistent with the V2 version.

[0087] The 18 lines added based on the V2 version are located halfway between two existing lines, for example, line #1.5 is located halfway between lines 1 and 2 (offsetting line 1 5 degrees to the right), and all the lines added in the V3 version are located after the existing odd-numbered lines, i.e., the new lines 1.5, 3.5, 5.5, 7.5, 9.5... are associated with 1, 3, 5, 7, 9...

[0088] To avoid the locator and platform icon areas, The four lines 1.5, 9.5, 19.5, and 27.5 have three valid data bits (excluding the outer two bits).

[0089] Compared with the V2 version circular two-dimensional code, the V3 version circular two-dimensional code in Figure 6 supports an additional bit number of (18*5)-(4*2)=82 bits. The effective number of bits for storing data in the V3 version circular two-dimensional code is 262+82=344 bits.

[0090] The error correction levels for circular 2D codes (V3 version) are defined as shown in Table 3 below.

[0091] [Table 3]

[0092] From Tables 1, 2, and 3, we can see that different versions of circular 2D codes have different data storage capacity and error correction levels. Therefore, different versions of circular 2D codes can be selected based on the amount of data to be encoded and the error correction level, etc.

[0093] From the three 2D code versions mentioned above, it can be seen that different versions correspond to different numbers of valid data bits. The encoding process will be introduced below using the 2D code version shown in Figure 7 as an example. In Figure 7, 36 valid data bits are associated with each ring shown. The positions can be on 36 straight lines. Note that these 36 straight lines are only provided for ease of understanding and do not exist in the actual 2D code. The predetermined encoding rule is to select the straight line directly below the center as the first straight line #1, offset 10 degrees clockwise to select the second adjusted straight line #2, and so on up to the 36th straight line #36.

[0094] The intersection of the first line #1 and the first ring (innermost ring) is the encoding start position (first valid data bit). The intersection of the second line #2 and the first ring (innermost ring) is the second valid data bit. Similarly, the intersection of the 36th line #36 and the first ring (innermost ring) is the 36th valid data bit.

[0095] Next, the intersection of the first line #1 and the second ring (the second ring from the inside) is set as the encoding start position (37th valid data bit). The intersection of the second line #2 and the second ring (the second ring from the inside) is set as the 37th valid data bit. Similarly, the intersection of the 36th line #36 and the second ring (the second ring from the inside) is set as the 72nd valid data bit.

[0096] Next, the intersections of the 1st to 36th lines with the third ring correspond to the 73rd to 108th valid data bits.

[0097] Next, the intersections of the 1st to 36th lines with the 4th ring correspond to the 109th to 144th valid data bits.

[0098] In the fifth ring, the intersections of the ten lines #1, #9, #10, #11, #18, #19, #20, #27, #28, and #29 with the fifth ring (the second ring from the outside) are all occupied by locators and therefore are not used for encoding.

[0099] Next, the intersection of the second line #2 and the fifth ring (the second ring from the outside) is set as the 145th valid data bit. Similarly, 26 valid data bits (clockwise direction) are obtained formed by the fifth ring and the 26 lines.

[0100] In the sixth ring, the intersections of the ten lines #1, #9, #10, #11, #18, #19, #20, #27, #28, and #29 with the sixth ring (the outermost ring) are all occupied by locators and therefore are not used for encoding.

[0101] Next, the intersection of the second line #2 and the sixth ring (outermost ring) is the 161st data bit. Similarly, 26 valid data bits (clockwise direction) are obtained, formed by the sixth ring and 26 lines.

[0102] From the above, it can be seen that the circular two-dimensional code shown in Figure 7 has 196 data bits.

[0103] Situation 1 The first data bit to the 16th valid data bit are a reserved field. Starting from the 17th valid data bit, binary data can be embedded sequentially at corresponding positions (intersections). If the binary data embedded at a specific position is a first value (e.g., "0"), a first symbol pattern (e.g., white) is formed at that position. If the binary data embedded at a specific position is a second value (e.g., "1"), a second symbol pattern (e.g., black) is formed at that position. Using the above method, a circular two-dimensional code corresponding to binary data can be formed.

[0104] Situation 2 Starting from the first valid data bit, binary data can be embedded sequentially at corresponding positions (intersections). If the binary data embedded at a specific position is a first value (e.g., "0"), a first symbol pattern (e.g., white) is formed at that position. If the binary data embedded at a specific position is a second value (e.g., "1"), a second symbol pattern (e.g., black) is formed at that position. Using the above method, a circular two-dimensional code corresponding to binary data can be formed. Note that the first or second symbol pattern can be randomly generated at non-intersection positions on the ring. If the binary data is less than 196 bits, a specific black or white area can be formed at the end.

[0105] Of these 196 data bits, which data bits are used to store encoded data and which data bits are used for other purposes can be set according to actual needs.The two situations listed above are not intended to limit the scope of patent protection.

[0106] Unlike the case where black and white symbols are used as valid coded data for a two-dimensional code, in this embodiment, valid data bits and invalid data bits, i.e., valid coded data for each ring, are predetermined. Therefore, the circular two-dimensional code requires a specific encoding and decoding method, and provides a highly recognizable and exclusive variant (circular) two-dimensional code that combines privacy protection and brand individuality, with secure data content and suitable for specific use.

[0107] Example 2 The decoding method of this embodiment corresponds to the encoding method in the first embodiment, and the first embodiment can be referred to for specific details.

[0108] FIG. 8 is a schematic flow chart of a method for encoding a circular two-dimensional code according to a second embodiment of the present application. As shown in FIG. 8, the method for decoding the circular two-dimensional code includes the following steps: A step S800 of obtaining a circular two-dimensional code, the circular two-dimensional code including a plurality of rings corresponding to the same center, each ring corresponding to a plurality of data bits; A step S802 of determining a plurality of valid data bits of the plurality of rings according to the two-dimensional code version, wherein the plurality of valid data bits are divided into a plurality of data segments, including a reserved field for storing metadata and a content data segment for storing binary data; The method may include step S804 of acquiring binary data of the circular two-dimensional code according to a plurality of valid symbol patterns corresponding to the plurality of valid data bits.

[0109] In an alternative embodiment, the method comprises: determining valid data bits of a single ring as one data segment based on a predetermined clockwise direction to obtain multiple data segments of multiple rings; The method further includes determining a front-to-back order of the plurality of data segments according to an order from the innermost ring to the outermost ring of the plurality of rings.

[0110] Example 3 FIG. 9 is a block diagram of a circular two-dimensional code encoding system according to a third embodiment of the present application. The circular two-dimensional code encoding system may be divided into one or more program modules, which may be stored in a storage medium and executed by one or more processors to achieve the embodiments of the present application. The program modules referred to in the embodiments of the present application refer to a series of computer-readable instruction segments capable of achieving a specific function. The following description will specifically introduce the function of each program module in the present embodiment. As shown in FIG. 9, the circular two-dimensional code encoding system 900 may include a conversion module 910, a first determination module 920, a second determination module 930, a segmentation module 940, and a generation module 950.

[0111] The conversion module 910 is used to convert the data to be encoded into binary data; The first determination module 920 is used to determine a two-dimensional code version of a two-dimensional code to be generated, the two-dimensional code to be generated including a plurality of rings corresponding to a same center, each ring corresponding to a plurality of data bits; a second determination module 930 for determining a plurality of valid data bits of the plurality of rings according to the two-dimensional code version; a division module 940 for dividing the plurality of valid data bits into a plurality of data segments, including a reserved field for encoding metadata and a content data segment for encoding the binary data; The generating module 950 is used to generate a corresponding symbol pattern for the plurality of valid data bits according to the metadata and the binary data, to obtain a circular two-dimensional code.

[0112] In an alternative embodiment, the second determination module 930 further comprises: is used to determine the two-dimensional code version according to the amount of information of the encoding target data, Here, different two-dimensional code versions correspond to different numbers of multiple valid data bits.

[0113] In an alternative embodiment, the system comprises: Further included is the step of combining the valid data bits of a single ring into one data segment based on a predetermined clockwise direction to obtain multiple data segments for multiple rings.

[0114] In an alternative embodiment, the system comprises: The method further includes a third determination module for determining a front-to-back order of the plurality of data segments according to an order from an innermost ring to an outermost ring of the plurality of rings.

[0115] In an alternative embodiment, the system comprises: The apparatus further includes a setting module for setting a plurality of locators around the periphery of the two-dimensional code to be generated, so that the locators are distributed on the outermost ring of the plurality of rings.

[0116] In an alternative embodiment, the system comprises: The data storage device further includes a fourth determining module for determining data bits occupied by the plurality of locators as invalid data bits not used to store information.

[0117] In an alternative embodiment, the generation module further comprises: The ring is used to generate a target pattern including an authentication identifier within the innermost ring of the plurality of rings.

[0118] Example 4 Figure 10 is a block diagram of a circular two-dimensional code decoding system according to Example 4 of the present application. The circular two-dimensional code decoding system may be divided into one or more program modules, which may be stored in a storage medium and executed by one or more processors to achieve the embodiments of the present application. The program modules referred to in the embodiments of the present application refer to a series of computer-readable instruction segments capable of achieving a specific function. The following description will specifically introduce the function of each program module in this embodiment. As shown in Figure 10, the circular two-dimensional code decoding system 1000 may include a first acquisition module 1010, a first determination module 1020, and a second acquisition module 1030.

[0119] The first acquisition module 1010 is used to acquire a circular two-dimensional code, the circular two-dimensional code including a plurality of rings corresponding to the same center, each ring corresponding to a plurality of data bits; a determining module 1020 for determining a plurality of valid data bits of the plurality of rings, the valid data bits being divided into a plurality of data segments, including a reserved field for storing metadata and a content data segment for storing binary data; The second acquiring module 1030 is used for acquiring binary data of the circular two-dimensional code according to a plurality of valid symbol patterns corresponding to the plurality of valid data bits.

[0120] In an alternative embodiment, the system comprises: determining valid data bits of a single ring as one data segment based on a predetermined clockwise direction to obtain multiple data segments of multiple rings; and determining a forward / backward order of the plurality of data segments according to an order from the innermost ring to the outermost ring of the plurality of rings.

[0121] Example 5 FIG. 11 is a schematic diagram illustrating the hardware architecture of a computer device suitable for implementing a circular two-dimensional code encoding / decoding method according to a fifth embodiment of the present application. The computer device 10000 can be used as a two-dimensional code encoding device 2 or a two-dimensional code decoding device 4, or as a part thereof. The computer device 10000 is a device that can automatically perform numerical calculations and / or information processing according to pre-set or pre-stored instructions. For example, the computer device 10000 may be a smartphone, tablet, computer, in-vehicle terminal, game console, virtual machine, scanner, or may be a server.

[0122] In this embodiment, the computer device 10000 is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions. As shown in Fig. 11, the computer device 10000 includes at least, but is not limited to, a memory 10010, a processor 10020, and a network interface 10030 that are communicatively connected to each other via a system bus.

[0123] The memory 10010 includes at least one type of computer-readable storage medium, and the readable storage medium may include a flash memory, a hard disk, a multimedia card, a card-type memory (e.g., SD or DX memory), a random access memory (RAM), a static random access memory (SRAM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a programmable read-only memory (PROM), a magnetic memory, a magnetic disk, an optical disk, etc. In some embodiments, the memory 10010 may be an internal storage module of the computer device 10000, such as a hard disk or internal memory of the computer device 10000. In other embodiments, the memory 10010 may be an external storage device of the computer device 10000, such as a plug-in hard disk, a Smart Media Card (abbreviated as SMC), a Secure Digital (abbreviated as SD) card, a flash card, etc., located in the computer device 10000. Of course, the memory 10010 may also include both an internal storage module and an external storage device of the computer device 10000. In this embodiment, the memory 10010 is typically used to store the operating system and various application software installed in the computer device 10000, such as program code for a circular two-dimensional code encoding method. The memory 10010 may also be used to temporarily store various data that has been output or is to be output.

[0124] In some embodiments, the processor 10020 may be a central processing unit (CPU), controller, microcontroller, microprocessor, or other data processing chip. The processor 10020 generally controls the overall operation of the computing device 10000, for example, to perform control and processing related to exchanging or communicating data with the computing device 10000. In this embodiment, the processor 10020 is used to execute program code or process data stored in the memory 10010.

[0125] The network interface 10030 may include a wireless network interface or a wired network interface and is generally used to establish a communication connection between the computer device 10000 and another computer device. For example, the network interface 10030 is used to connect the computer device 10000 to an external terminal via a network and establish a data transmission channel and a communication connection between the computer device 10000 and the external terminal. The network may be a wireless or wired network such as an intranet, the Internet, Global System for Mobile communications (abbreviated as GSM), Wideband Code Division Multiple Access (abbreviated as WCDMA), a 4G network, a 5G network, Bluetooth, Wi-Fi, etc.

[0126] It should be noted that while FIG. 11 only shows a computer device having components 10010-10030, it should be understood that not all of the components shown need be implemented, and alternatively, more or fewer components may be implemented.

[0127] In this embodiment, the circular two-dimensional code encoding system and decoding system stored in memory 10010 can be further divided into one or more program modules and executed by one or more processors (processor 10020 in this embodiment) to achieve the present application.

[0128] Example 6 This embodiment further provides a computer-readable storage medium having computer-readable instructions stored therein, which, when executed by a processor, realizes the steps of the encoding and decoding methods for circular two-dimensional codes in the embodiment.

[0129] In this embodiment, the computer-readable storage medium includes a flash memory, a hard disk, a multimedia card, a card-type memory (e.g., SD or DX memory), a random access memory (RAM), a static random access memory (SRAM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a programmable read-only memory (PROM), a magnetic memory, a magnetic disk, an optical disk, etc. In some embodiments, the computer-readable storage medium may be an internal storage unit of a computer device, such as a hard disk or internal memory of the computer device. In other embodiments, the computer-readable storage medium may be an external storage device of a computer device, such as a plug-in hard disk arranged in the computer device, a Smart Media Card (SMC), a Secure Digital (SD) card, a flash card, etc. Of course, the computer-readable storage medium may also include both an internal storage unit and an external storage device of a computer device. In this embodiment, the computer-readable storage medium is typically used to store an operating system and various application software installed on the computer device, such as the program code of the encoding method for the circular two-dimensional code in this embodiment, etc. The computer-readable storage medium can also be used to temporarily store various data that has been output or is to be output.

[0130] Of course, as will be understood by those skilled in the art, each module or step of the above-described embodiments of the present application can be implemented by a general-purpose computing device, can be centrally located on a single computing device, or can be distributed across a network of multiple computing devices, can be implemented as program code executable by a computing device, and can be stored in a storage device and executed by a computing device. In some cases, the steps shown or described can be performed in an order different from that shown here, can be implemented as individual integrated circuit modules, or can have multiple modules or steps implemented as a single integrated circuit module. Thus, the embodiments of the present application are not limited to any specific combination of hardware and software.

[0131] It should be noted that the above is merely a preferred embodiment of the present application and does not limit the scope of patent protection of the present application. Any equivalent configuration or equivalent flow conversion made using the contents of the specification and drawings of the present application, or any direct or indirect application to other related technical fields, is also deemed to be included in the scope of patent protection of the present application.

Claims

1. The steps include converting the data to be encoded into binary data, A step of determining the two-dimensional code version of the two-dimensional code to be generated, wherein the two-dimensional code to be generated includes multiple rings corresponding to the same center, and each ring corresponds to multiple data bits, The steps include determining a plurality of valid data bits of the plurality of rings according to the two-dimensional code version, The steps include dividing the plurality of valid data bits into a plurality of data segments, each including a reserved field for encoding metadata and a content data segment for encoding the binary data, A method for encoding a circular two-dimensional code, comprising the steps of: generating a corresponding symbol pattern in a plurality of valid data bits according to the metadata and the binary data, and obtaining a circular two-dimensional code.

2. The step of determining the two-dimensional code version of the two-dimensional code to be generated is: This includes determining the two-dimensional code version according to the amount of information in the data to be encoded, The method for encoding a circular two-dimensional code according to claim 1, wherein different two-dimensional code versions correspond to different numbers of multiple valid data bits.

3. A method for encoding a circular two-dimensional code according to claim 1, further comprising the step of combining the valid data bits of a single ring to form a single data segment based on a predetermined clockwise direction, thereby obtaining multiple data segments of multiple rings.

4. A method for encoding a circular two-dimensional code according to claim 1, further comprising the step of determining the front-to-back order of the plurality of data segments according to the order from the innermost ring to the outermost ring of the plurality of rings.

5. The method for encoding a circular two-dimensional code according to claim 1, further comprising the step of setting a plurality of locators on the periphery of the two-dimensional code to be generated so as to be distributed on the outermost ring of the plurality of rings.

6. The method for encoding a circular two-dimensional code according to claim 5, further comprising the step of determining that data bits occupied by the plurality of locators are invalid data bits that are not used to store information.

7. The method for encoding a circular two-dimensional code according to claim 1, further comprising the step of generating a target pattern containing an authentication identifier within the innermost ring of the plurality of rings.

8. A conversion module for converting data to be encoded into binary data, A first determination module for determining the two-dimensional code version of a two-dimensional code to be generated, wherein the two-dimensional code to be generated includes a plurality of rings corresponding to the same center, and each ring includes a first determination module corresponding to a plurality of data bits, A second determination module for determining multiple valid data bits of the multiple rings according to the two-dimensional code version, A splitting module for dividing the plurality of valid data bits into a plurality of data segments, each including a reserved field for encoding metadata and a content data segment for encoding the binary data, A generation module for generating a circular two-dimensional code by generating a corresponding symbol pattern in the plurality of valid data bits according to the metadata and the binary data, A circular two-dimensional code encoding system, including [a specific character].

9. The aforementioned second decision module further, This is used to determine the two-dimensional code version according to the amount of information in the data to be encoded. The circular two-dimensional code encoding system according to claim 8, wherein different two-dimensional code versions correspond to different numbers of multiple valid data bits.

10. The circular two-dimensional code encoding system according to claim 8, further comprising the step of combining the valid data bits of a single ring to form a single data segment based on a predetermined clockwise direction, thereby obtaining multiple data segments of multiple rings.

11. The circular two-dimensional code encoding system according to claim 8, further comprising a third determination module for determining the front-to-back order of the plurality of data segments according to the order from the innermost ring to the outermost ring of the plurality of rings.

12. The circular two-dimensional code encoding system according to claim 8, further comprising a configuration module for setting a plurality of locators on the periphery of the two-dimensional code to be generated so as to be distributed on the outermost ring of the plurality of rings.

13. The circular two-dimensional code encoding system according to claim 8, further comprising a fourth determination module for determining data bits occupied by the plurality of locators as invalid data bits not used for storing information.

14. The aforementioned generation module further, The circular two-dimensional code encoding system according to claim 8, used to generate a target pattern containing an authentication identifier within the innermost ring of the plurality of rings.

15. A step of obtaining a circular two-dimensional code, wherein the circular two-dimensional code includes a plurality of rings corresponding to the same center, and each ring corresponds to a plurality of data bits, A step of determining a plurality of valid data bits of the plurality of rings according to the two-dimensional code version, wherein the plurality of valid data bits are divided into a plurality of data segments, each including a reserved field for storing metadata and a content data segment for storing binary data. A method for decoding a circular two-dimensional code, comprising the step of obtaining binary data of the circular two-dimensional code according to a plurality of valid symbol patterns corresponding to a plurality of valid data bits.

16. The steps include determining the valid data bits of a single ring as one data segment based on a predetermined clockwise direction, and obtaining multiple data segments from multiple rings, A method for decoding a circular two-dimensional code according to claim 15, further comprising the step of determining the front-to-back order of the plurality of data segments according to the order from the innermost ring to the outermost ring of the plurality of rings.

17. A first acquisition module for acquiring a circular two-dimensional code, wherein the circular two-dimensional code includes a plurality of rings corresponding to the same center, and each ring corresponds to a plurality of data bits, A determination module for determining a plurality of valid data bits of a plurality of rings according to the two-dimensional code version, wherein the plurality of valid data bits are divided into a plurality of data segments, each including a reserved field for storing metadata and a content data segment for storing binary data. A decoding system for a circular two-dimensional code, comprising: a second acquisition module for acquiring binary data of the circular two-dimensional code according to a plurality of valid symbol patterns corresponding to a plurality of valid data bits.

18. The steps include determining the valid data bits of a single ring as one data segment based on a predetermined clockwise direction, and obtaining multiple data segments from multiple rings, A circular two-dimensional code decoding system according to claim 17, further comprising a third determination module used for determining the front-to-back order of the plurality of data segments according to the order from the innermost ring to the outermost ring of the plurality of rings.

19. A computer device including memory, a processor, and computer-readable instructions stored in memory and executable on the processor, wherein when the computer-readable instructions are executed by the processor, A step of a method for encoding a circular two-dimensional code according to any one of claims 1 to 7, and / or A computer device that implements the steps of a method for decoding a circular two-dimensional code according to any one of claims 15 to 16.

20. A computer-readable storage medium storing computer-readable instructions, wherein the computer-readable instructions can be executed by at least one processor, thereby enabling the at least one processor to execute the instructions. A step of a method for encoding a circular two-dimensional code according to any one of claims 1 to 7, and / or A computer-readable storage medium that enables the steps of a method for decoding a circular two-dimensional code according to any one of claims 15 to 16.