Quick response code and recognition method therefor, electronic device, storage medium, and program product

By designing a QR code structure with dotted information areas and positioning features, the problem of integrating existing QR codes with the display interface has been solved, achieving efficient scanning, a good user experience, and enhanced privacy.

WO2025241629A9PCT designated stage Publication Date: 2026-05-15HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
HUAWEI TECH CO LTD
Filing Date
2025-02-21
Publication Date
2026-05-15

AI Technical Summary

Technical Problem

The existing QR code's lookup pattern and data area display pattern are too complex, making it impossible to integrate with the display interface content and affecting the user's viewing experience.

Method used

Design a QR code structure including N information areas and K positioning structures. Each information area is composed of dots, and the positioning structures are used to locate the information area. The information content of the information area represents the target information. Electronic devices can obtain the complete information by scanning part of the information area, thus achieving integration with the displayed content.

Benefits of technology

It improves the scanning efficiency of QR codes and the user viewing experience, reduces the coverage of the display interface, and enhances privacy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025078591_15052026_PF_FP_ABST
    Figure CN2025078591_15052026_PF_FP_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of information. Disclosed are a quick response code and a recognition method therefor, an electronic device, a storage medium, and a program product. The quick response code comprises a plurality of information regions and at least one positioning structure, wherein the positioning structure is used for positioning each of the plurality of information regions, information content of the plurality of information regions is used for representing target information corresponding to the quick response code, the positioning structure comprises one or more positioning points, and the information content of the information regions comprises a plurality of information points (or referred to as information region particles). In the quick response code provided in the embodiments of the present application, information regions and a positioning structure both consist of dots, resulting in a simple structure without covering a large area of display content in a display interface of an electronic device, and there is only dotted partial coverage, such that the electronic device can directly display the quick response code over original display content, that is, the integration of the quick response code and underlying display content of the electronic device is realized, thereby improving the viewing experience of users.
Need to check novelty before this filing date? Find Prior Art

Description

QR codes and their recognition methods, electronic devices, storage media and software products

[0001] This application claims priority to Chinese Patent Application No. 202410647073.3, filed on May 23, 2024, entitled "QR code and its recognition method, electronic device, storage medium and program product", the entire contents of which are incorporated herein by reference. Furthermore, this application also claims priority to Chinese Patent Application No. 202411325724.3, filed on September 20, 2024, entitled "QR code and its recognition method, electronic device, storage medium and program product", the entire contents of which are incorporated herein by reference. Technical Field

[0002] This application relates to the field of information technology, and in particular to a QR code and its recognition method, electronic device, storage medium and program product. Background Technology

[0003] Currently, QR codes are widely used in various industries and in all aspects of life. For example, they are used for mobile payments and information recognition, greatly improving the convenience of daily life.

[0004] Figure 1A shows a schematic diagram of a Quick Response type QR code 100, and the QR code 100 shown in Figure 1A can generally include several components. For example, the QR code 100 contains lookahead patterns 101 in the lower left, upper left, and upper right corners. When an electronic device scans the QR code 100, the three lookahead patterns 101 enable the electronic device to determine that the currently scanned content is a QR code, and the electronic device can also determine the outer border of the QR code 100 based on the three lookahead patterns 101. The QR code 100 also includes a whole data area 102 represented by the blank part of the QR code border content in Figure 1A. It can be understood that the data area 103 is generally filled with a high-density black and white striped irregular pattern (not shown here).

[0005] The aforementioned QR code has a complex lookup pattern and data area display pattern, which makes it impossible to integrate with the content displayed on the screen. As a result, the QR code can only exist in a situation where it covers part of the display content on the electronic device's screen, or is displayed in the blank area of ​​the display content on the screen, which affects the user's viewing experience. Summary of the Invention

[0006] This application provides a QR code and its recognition method, electronic device, storage medium, and program product. The QR code can display multiple complete QR codes containing target information through N information areas. In this case, even if the electronic device only scans a portion of the N information areas, it can still obtain the target information conveyed by the QR code, improving the scanning efficiency of the QR code.

[0007] In a first aspect, this application provides a QR code, which includes N information areas and K positioning structures, wherein N is greater than 1 and K is greater than or equal to 1; the K positioning structures are used to locate each of the N information areas respectively, and the information content of the N information areas is used to represent the target information corresponding to the QR code; the positioning structure includes one or more positioning points, and the information content of the information area includes multiple information points.

[0008] In the QR code provided in this application embodiment, both the information area and the positioning structure are composed of dots. The structure is simple and does not cover a large area of ​​the display content of the electronic device's display interface. Only the dots partially cover the content, allowing the electronic device to directly display the QR code on the original display content. This achieves the integration of the QR code and the underlying display content of the electronic device, improving the user's viewing experience.

[0009] It should be noted that the target information of the QR code mentioned in the embodiments of this application can also be referred to as the information to be conveyed by the QR code, QR code information, QR code data information, QR code text information, etc. The target information in the QR code can vary depending on the intended use of the QR code. For example, in a data cloning scenario, the target information carried by the QR code can be the SSID information and password information of a Wi-Fi network. Or, in a wristband pairing scenario, the information carried by the QR code can be pairing code information, etc.

[0010] In one possible implementation of the first aspect, the N information areas include M information area groups, each information area group includes at least one information area, and at least two information area groups in the M information area groups have the same information content, and both are used to represent the target information corresponding to the QR code, wherein the information content includes multiple information points, M is less than or equal to N and M is greater than 1.

[0011] It is understood that in this application, the QR code displays the target information to be conveyed by the QR code through N information areas. Specifically, the N information areas include M information area groups, and at least two of the M information area groups have the same content, and all of them can be used to decode the target information to be conveyed by the QR code. In some embodiments, the content of each information area group in the M information area groups is the same, and all of them can be used to decode the target information to be conveyed by the QR code. The relationship between the information area groups and the information areas can be seen in Figure 4B below. In addition, this application does not limit the shape of the QR code. The shape of the QR code can be square, circular, ring-shaped, triangular, etc. The QR code shown in Figure 4C is square, and the QR code shown in Figure 4D is ring-shaped.

[0012] With the above QR code structure, when an electronic device scans the QR code, it can obtain the target information to be conveyed by the QR code by scanning only at least one of the M information groups, without having to scan the entire QR code to obtain the target information, which can improve the scanning efficiency of the QR code.

[0013] In one possible implementation of the first aspect, the target information includes multiple first pieces of information, and the information point state of each information area is used to characterize at least one first piece of information among the multiple first pieces of information and the sequence number corresponding to the at least one first piece of information in the target information.

[0014] In one possible implementation of the first aspect, the first information includes one or more of numbers, letters, and symbols.

[0015] It is understood that the first information can be characters. For example, the first information can be any combination of numbers, letters, and symbols, etc., and this application embodiment does not limit this. Taking Figure 4C below as an example, if the target information is 148258, then the first information can be the numbers 1, 4, 8, 2, 5, 8. Each information area displays one piece of first information. For example, information area a is used to display the first information 1 and the corresponding sequence number 0 of the first information 1 in the target information.

[0016] Taking the 4D image as an example, if the target information is 148258, then the first information can be the numbers 1, 4, 8, 2, 5, 8. Each information area displays one first information. For example, information area A1 is used to display the first information 1 and its corresponding sequence number 0 in the target information.

[0017] In one possible implementation of the first aspect, the number of information points in each information region is the same, and the different states of each information point in each information region correspond to different values. Each information region is characterized by code data composed of the values ​​corresponding to each information point, which represents at least one first piece of information and the sequence number of the at least one first piece of information in the target information.

[0018] This application does not limit the number of information points included in each information area, nor does it limit the state of the information points. For example, the state of an information point can be a solid circle state or a hollow circle state, as shown in Figure 6B. Different states of information points correspond to different values. Therefore, by sorting the multiple values ​​corresponding to multiple information points according to their position numbers, the code element corresponding to each information area can be obtained. Furthermore, by decoding the code element, the first information corresponding to each information area and the sequence number or position of the first information in the target information can be obtained.

[0019] For example, in another possible implementation, the information point exists in the information area in a first state, and the information point corresponds to a first value; the information point exists in the information area in a second state, and the information point corresponds to a second value. The first value and the second value are different. The first state is the display state, and the second state is the undisplayed state.

[0020] The status of this information point can be seen in Figure 6C. Different statuses correspond to different values. For example, the display status corresponds to the value 1, which is the first value; the hollow circle status (i.e., the non-display status) corresponds to the value 0, which is the second value.

[0021] In one possible implementation of the first aspect, the number of information points in the first state of the information area differs depending on the version number corresponding to the QR code.

[0022] For example, in version V1.0, each information area has 2 information points (i.e., bright spots) in the first state. In version V2.0, each information area has 3 information points (i.e., bright spots) in the first state.

[0023] In one possible implementation of the first aspect, each positioning structure is located between two adjacent information areas.

[0024] In one possible implementation of the first aspect, a positioning structure is used to locate a corresponding information area; or, two adjacent positioning structures are used to locate the information area between the two adjacent positioning structures; or, a positioning structure is used to locate two adjacent information areas.

[0025] In one possible implementation of the first aspect, the QR code is in the shape of an annulus formed by a first outer circle and a first inner circle, and the positioning structure includes an outer positioning point and an inner positioning point; the outer positioning point is located on the first outer circle, and the inner positioning point is located on the first inner circle; and N information areas are located in a first region between the first outer circle and the first inner circle.

[0026] As can be understood based on the preceding content, the shape of the QR code can be ring-shaped, and the positioning structure can include positioning points. Therefore, in this case, multiple positioning points can be further divided into outer positioning points and inner positioning points. As shown in Figure 5E, outer positioning point 1 and outer positioning point 2 are located on the outer circle (i.e., the first outer circle), and inner positioning point 1' and inner positioning point 2' are located on the inner circle (i.e., the first inner circle). Furthermore, the information area is located in the ring-shaped region (i.e., the first region) formed by the outer and inner circles.

[0027] In one possible implementation of the first aspect, the QR code further includes multiple reference points located in a first region. The display color of the multiple reference points in the QR code is different from the display color of the information points having a display state. Furthermore, any information point displays a first color at a first moment, a second color at a second moment, and a third color at a third moment, and the first color, second color, and third color are different.

[0028] For example, the reference point may be displayed in gray in the first frame, blue in the second frame, and yellow in the third frame. This application does not limit the selection of the first, second, and third time points, nor does it limit the selection of the first, second, and third colors.

[0029] It's understandable that the color of the information points changes at different times, while the color of the reference points within the information area remains the same. Furthermore, the colors of the reference points and information points can be similar but different colors, making the overall color scheme of the QR code more harmonious for the user's visual perception and improving the visual experience. This method of including reference points and adding different display colors to the reference points and information points prevents the user from observing the specific structure of the QR code, thus enhancing its privacy.

[0030] Secondly, this application provides a QR code recognition method for the aforementioned QR code. The method is applied to an electronic device and includes: scanning a QR code to be recognized, the QR code to be recognized including N information areas and K positioning structures, wherein N is greater than 1, K is greater than or equal to 1, the K positioning structures are used to locate each of the N information areas respectively, the positioning structure includes one or more positioning points, and the information area includes multiple information points; determining the target information corresponding to the QR code to be recognized based on the N information areas in the QR code to be recognized.

[0031] In this embodiment, each information area can be determined based on the positioning structure, and the QR code to be identified can be decoded based on each information area. Furthermore, since the QR code in this embodiment is composed of multiple dots, its complexity is low, and it can be integrated with the display content of the display device, improving the user's viewing experience when scanning the code.

[0032] In one possible implementation of the second aspect, determining the target information corresponding to the QR code to be identified based on the N information areas in the QR code to be identified includes: extracting the code data of the N information areas to obtain the N code data corresponding to the N information areas respectively; and decoding the N code data to obtain the target information corresponding to the QR code to be identified.

[0033] In one possible implementation of the second aspect, the N information areas include M information area groups, and each information area group includes at least one information area; at least two information area groups in the M information area groups have the same information content, and both are used to represent the target information corresponding to the QR code, where M is less than or equal to N and M is greater than 1.

[0034] It is understandable that since a QR code represents M target information through M information groups, and at least two of these information groups have identical content, and both can be used to decode the target information conveyed by the QR code. In some embodiments, the content of each of the M information groups is identical, and each can be used to decode the target information conveyed by the QR code. Therefore, when an electronic device scans a QR code, it only needs to scan at least one of the M information groups to obtain the target information, without having to scan the entire QR code. This method can improve the scanning efficiency of QR codes.

[0035] In one possible implementation of the second aspect, decoding N code metadata to obtain target information corresponding to the QR code to be identified includes: decoding N code metadata to obtain M identical first target information corresponding to N information areas;

[0036] Perform a first fusion process on M identical first target information to obtain the fused second target information corresponding to the QR code to be identified.

[0037] The process of fusing M identical first target information to obtain the fused second target information corresponding to the QR code to be identified can be understood as taking any one of the M identical first target information as the second target information.

[0038] In one possible implementation of the second aspect, code data is extracted from N information regions to obtain N code data corresponding to each of the N information regions, including: determining multiple values ​​corresponding to multiple information points based on the state of multiple information points in each information region, wherein information points with different states correspond to different values; arranging the multiple values ​​in the order of the sequence numbers corresponding to the multiple information points to obtain the code data corresponding to each information region.

[0039] It is understandable that since different states of information points correspond to different values, for multiple information points in each information area, the multiple values ​​corresponding to these multiple information points are arranged according to their position numbers to obtain the code data for each information area. At this point, the code data is a string composed of multiple binary values. As shown in Figure 6B, a hollow circle can correspond to the value 0, and a solid circle can correspond to the value 1. That is, the information points with position numbers 1 and 2 correspond to the value 1, and the other information points correspond to the value 0. Therefore, the code element corresponding to information area A1 is 011000000000.

[0040] In one possible implementation of the second aspect, the information point has a first state and a first value; the information point has a second state and a second value, the first value and the second value are different, the first state is the display state, and the second state is the non-display state.

[0041] For example, if the information point is in a displayed state, the first value corresponding to the information point can be 1; if the information point is in a non-displayed state, the second value corresponding to the information point can be 0. Therefore, in Figure 6C, the information points with position numbers 1 and 2 correspond to the first value 1, and the remaining information points correspond to the second value 0. The code data corresponding to information area A1 (i.e., information area A1) remains 011000000000.

[0042] In one possible implementation of the second aspect, the information point has a first state and a first value; the information point has a second state and a second value, the first value and the second value are different, the first state is the display state, and the second state is the non-display state.

[0043] In one possible implementation of the second aspect, the first target information corresponding to the QR code includes multiple pieces of first information, which include one or more of numbers, letters, and symbols.

[0044] It is understood that the first information can be numbers, letters, etc., and this application embodiment does not limit this. Taking Figure 4D as an example, if the target information is 148258, then the first information can be the numbers 1, 4, 8, 2, 5, 8. Each information area displays one piece of first information. For example, information area a is used to display the first information 1 and the corresponding sequence number 0 of the first information 1 in the target information.

[0045] Taking the 4D image as an example, if the target information is 148258, then the first information can be the numbers 1, 4, 8, 2, 5, 8. Each information area displays one first information. For example, information area A1 is used to display the first information 1 and its corresponding sequence number 0 in the target information.

[0046] In one possible implementation of the second aspect, decoding the N code metadata to obtain the target information corresponding to the QR code to be identified includes: looking up the code table based on the N code metadata to determine the first information corresponding to each code metadata in the code table and the sequence number corresponding to the first information; and determining the target information corresponding to the QR code to be identified based on the multiple first information corresponding to the N code metadata and the sequence numbers corresponding to the multiple first information.

[0047] The code table, as shown in Table 2 below, can include first information, the corresponding sequence number of the first information, and the correspondence between code elements. Therefore, after obtaining the code data, the electronic device searches the code table to determine the first information and sequence number corresponding to each code data element. Taking the code data element 011000000000 mentioned earlier as an example, the electronic device searches Table 2 based on this code data element and can determine that the first information (i.e., payload data) corresponding to this code data element in Table 2 is 1, and the sequence number is 0.

[0048] In one possible implementation of the second aspect, a code table is looked up based on N code data elements to determine the first information corresponding to each code data element in the code table and the sequence number corresponding to the first information, including:

[0049] If multiple first code metadatas representing the same first information are identical among N code metadatas, a code table is searched based on the multiple first code metadatas to determine the first information corresponding to the multiple first code metadatas and the sequence number corresponding to the first information; if multiple first code metadatas are different, a second fusion process is performed on the multiple first code metadatas to obtain multiple second code metadatas. A code table is searched based on the multiple second code metadatas to determine the first information corresponding to the multiple second code metadatas and the sequence number corresponding to the first information.

[0050] It is understandable that during the actual display of a QR code, multiple metadata representations of the same primary information may be identical or different. If the multiple metadata representations of the same primary information are identical, it indicates that the primary metadata is correct, and the primary information can be determined directly by looking up the code table based on the primary metadata. If the multiple metadata representations of the same primary information are different, it indicates that at least one of the primary metadata representations is incorrect. In this case, it is impossible to look up the code table based on the incorrect primary metadata to obtain the primary information. Therefore, a second fusion process is required to obtain the fused secondary metadata. Then, the primary information is determined by looking up the code table based on the secondary metadata.

[0051] In one possible implementation of the second aspect, corresponding to the differences in multiple first code metadata, a second fusion process is performed on the multiple first code metadata to obtain multiple second code metadata, including: keeping the same value of the information points with the same sequence number in the multiple first code metadata unchanged, and setting the different values ​​of the information points with the same sequence number as the first value, to obtain multiple second code metadata corresponding to the multiple code metadata.

[0052] As shown in Figure 12, information areas A1 and A10 represent the same first information. However, the metadata corresponding to information area A1 is 010000000000, while the metadata corresponding to information area A10 is 001000000000. Since these two metadata entries are different, a second fusion process can be performed. The first bit of the metadata corresponding to information area A1 is 1, and the rest are 0. The second bit of the metadata corresponding to information area A10 is 1, and the rest are 0. Therefore, the second bit of the metadata corresponding to information area A1 is set to 1, and the first bit of the metadata corresponding to information area A10 is set to 1. Thus, the metadata corresponding to both information areas A1 and A10 is 011000000000.

[0053] Similarly, after the second fusion process, the code data corresponding to information area A3 and information area A12 are both 000000000010; the code data corresponding to information area A5 and information area A8 are both 000000110010.

[0054] In one possible implementation of the second aspect, the code table is looked up based on multiple second code metadata to determine the first information corresponding to the multiple second code metadata and the sequence number corresponding to the first information, including: for third code metadata in the multiple second code metadata where the number of first values ​​is equal to a quantity threshold, determining the first information corresponding to the third code metadata in the code table and the sequence number corresponding to the first information; for fourth code metadata in the multiple second code metadata where the number of first values ​​is not equal to the quantity threshold, performing error correction processing on the fourth code metadata to obtain the error-corrected fifth code metadata; and determining the first information corresponding to the fifth code metadata in the code table and the sequence number corresponding to the first information.

[0055] It is understandable that the number of the first value (i.e., the value 1) in each information area of ​​the QR code shown in Figure 12 is fixed and is always 2. The number of values ​​1 in the metadata 011000000000 corresponding to information areas A1 and A10 is 2, so the code table can be looked up based on this metadata to determine the first information corresponding to A1 and information area A10. However, the number of values ​​1 in the metadata 000000000010 corresponding to information areas A3 and A12 is 1, so the code table cannot be looked up based on this metadata to determine the first information corresponding to A3 and information area A12. The same applies to the metadata 000000110010 corresponding to information areas A5 and A8. Therefore, in this case, the metadata can be corrected, and then the code table can be looked up based on the corrected metadata.

[0056] In one possible implementation of the second aspect, for the fourth code metadata in a plurality of second code metadata where the number of first values ​​is not equal to a quantity threshold, error correction processing is performed on the fourth code metadata to obtain the error-corrected fifth code metadata, including:

[0057] If the number of the first value is greater than the quantity threshold, the first value that exceeds the quantity threshold is set as the second value, and the fifth code metadata that the number of the first value is equal to the quantity threshold is obtained; if the number of the first value is less than the quantity threshold, the second value that does not meet the quantity threshold is set as the first value, and the fifth code metadata that the number of the first value is equal to the quantity threshold is obtained.

[0058] As can be understood, taking Figure 12 as an example again, the code data 000000000010 corresponding to information areas A3 and A12 contains only one value, 1. In this case, we can change one value (0) in 000000000010 to 1 to determine if the corrected code data exists in the code table. Specifically, the corrected code data exists in the code table only when it is 000000100010. Therefore, the code data 000000100010 corresponding to information areas A3 and A12 represents the first information and its sequence number, respectively, as 8 and 2.

[0059] The code metadata 000000110010 corresponding to information areas A5 and A8 contains only three values ​​of 1. We can change one of these 1 values ​​to 0 to determine if the corrected code metadata exists in the code table. Specifically, the corrected code metadata exists in the code table only if it is 000000010010. Therefore, the code metadata 000000010010 corresponding to information areas A5 and A8 represents the first information and its sequence number, respectively, as 5 and 4.

[0060] In one possible implementation of the second aspect, the method further includes: if there are no missing positioning points in the K positioning structures corresponding to the QR code to be identified, N information areas are determined based on the K positioning structures; if there are missing positioning points in the K positioning structures corresponding to the QR code to be identified, the missing positioning points are filled in, and N information areas are determined based on the filled-in K positioning structures.

[0061] In one possible implementation of the second aspect, filling in the missing positioning points includes: for some positioning points in the first positioning structure among K positioning structures, filling in the missing positioning points based on other positioning points in the first positioning structure; for all positioning points in the first positioning structure among N positioning structures, filling in the missing positioning points based on adjacent positioning structures of the first positioning structure.

[0062] For example, as shown in Figure 5E, taking the inner positioning point 1' and the outer positioning point 2 (i.e., some positioning points in a positioning structure) as known, the outer positioning point 1 and the inner positioning point 2' can be determined as follows: the intersection of the line connecting the center of the circle and the inner positioning point 1' in Figure 5E with the outer circle can be determined as the outer positioning point 1; the intersection of the line connecting the center of the circle and the outer positioning point 2 with the inner circle can be determined as the inner positioning point 2'.

[0063] As shown in Figure 5H, taking the outer positioning point 1, inner positioning point 1', outer positioning point 3, and inner positioning point 3' as an example, the outer positioning point 2 and inner positioning point 2' (i.e., the missing positioning structure between the two known positioning structures) can be determined as follows: Determine line 1 connecting the center of the circle to the inner positioning point 1', determine line 2 connecting the center of the circle to the inner positioning point 3', and then determine line 3, which bisects the angle between line 1 and line 2 and passes through the center of the circle. Further, the intersection of line 3 and the outer circle is the outer positioning point 2, and the intersection of line 3 and the inner circle is the inner positioning point 2'.

[0064] Thirdly, this application provides a QR code recognition method, the method comprising: scanning a QR code to be recognized, the QR code to be recognized comprising N information areas and K positioning structures, wherein N is greater than 1, K is greater than or equal to 1, the K positioning structures are used to locate each of the N information areas respectively, the positioning structure comprising one or more positioning points, and the information area comprising multiple information points;

[0065] Obtain the version number corresponding to the QR code to be recognized; determine the target information corresponding to the QR code to be recognized based on the version number and the N information areas in the QR code.

[0066] In some embodiments, there can be multiple versions of a QR code, and different versions of QR codes correspond to different code tables. When generating a QR code, the version number of the QR code can be determined based on the amount of data to be transmitted, and the corresponding QR code is generated based on the code table corresponding to the version number. In the QR code recognition method provided in this application embodiment, when there are multiple versions of the QR code, the electronic device that scans the QR code can first determine the version number corresponding to the QR code based on the number of bright spots in the QR code, obtain the code table corresponding to the version number, and decode the QR code based on the code table corresponding to the version number to achieve correct QR code recognition.

[0067] In one possible implementation of the third aspect, obtaining the version number corresponding to the QR code to be recognized includes: obtaining the number of target information points in the N information areas of the QR code to be recognized that are in the display state; and determining the version number corresponding to the QR code to be recognized based on the number of target information points in the N information areas that are in the display state.

[0068] In one possible implementation of the third aspect, the version number of the QR code to be recognized is determined based on the number of target information points in the display state in the N information areas, including: if the number of target information points in the display state in each of the N information areas is a first quantity, then the version number of the QR code to be recognized is determined based on the first quantity; if the number of information areas in the N information areas where the number of target information points is a second quantity is greater than the number of information areas where the number of target information points is any quantity other than the second quantity, then the version number of the QR code to be recognized is determined based on the second quantity.

[0069] In this embodiment of the application, when the number of target information points in the display state in each of the N information areas is the same, for example, a first number, the version number corresponding to the QR code to be recognized is determined based on the first number. For example, if the number of target information points in the display state in each information area is 2, or the total number of target information points in all information areas is 48, then the version number can be determined as V1.0 based on the QR code version number mapping table shown in Table 3. If the number of target information points in the display state in each information area is 3, or the total number of target information points in all information areas is 60, then the version number can be determined as V2.0 based on the QR code version number mapping table shown in Table 3.

[0070] When the number of target information points in the display state differs among N information areas, and the number of information areas with a target information point count equal to a second-highest number is greater than the number of information areas with a target information point count other than the second-highest number, then the version number corresponding to the QR code to be recognized is determined based on the second-highest number. For example, in the 13 information areas corresponding to the QR code to be recognized, 10 information areas have 2 bright spots each, and 2 information areas have 3 bright spots each. Then the output version number is the version number corresponding to the information area with 2 bright spots, for example, version number V1.0.

[0071] In this embodiment, when the number of highlights in each information area is different, the version number with the highest probability can be selected to improve the accuracy of QR code recognition.

[0072] In one possible implementation of the third aspect, the version number of the QR code to be recognized is determined based on the number of target information points in the N information areas that are in the display state, including: obtaining the number of target information points in the N information areas that are in the display state and the number of positioning points in the QR code to be recognized; and determining the version number of the QR code to be recognized based on the number of target information points in the N information areas that are in the display state and the number of positioning points in the QR code to be recognized.

[0073] In some embodiments, the version number can also be determined based on the total number of highlights in the QR code to be recognized, which is the sum of the number of information points in all information areas and the total number of positioning points. For example, if the total number of highlights in the QR code to be recognized is 48, then the version number can be determined to be V1.0 based on Table 1.

[0074] In one possible implementation of the third aspect, obtaining the number of target information points in the N information areas of the QR code to be recognized in the display state includes: obtaining the number of information points in the N information areas of the QR code to be recognized in the display state; obtaining the number of noise points in the N information areas of the QR code to be recognized in the display state; and determining the number of target information points in the N information areas based on the number of information points and the number of noise points in the N information areas.

[0075] In this embodiment of the application, when counting the number of bright spots in the information area, noise in the information area can be removed to improve the accuracy of QR code recognition.

[0076] In one possible implementation of the third aspect, obtaining the number of noise points in the N information areas of the QR code to be recognized in the display state includes: obtaining the positioning structure in the QR code to be recognized; performing an affine transformation on a standard QR code template based on the extracted positioning structure to obtain a processed QR code template; aligning the processed QR code template with the QR code to be recognized, taking the unaligned information points in the N information areas in the display state as noise points, and obtaining the number of noise points.

[0077] In some embodiments, since the shooting direction of the QR code to be recognized can be upward, downward, or oblique, the QR code to be recognized may not be able to be aligned with the standard QR code. Therefore, an affine or perspective transformation can be performed on the standard QR code template based on the positioning points extracted from the QR code to be recognized to obtain a processed (distorted) QR code template (mask). The processed (distorted) QR code template (mask) is made to have the same distortion direction as the QR code to be recognized, so that the processed (distorted) QR code template (mask) and the QR code to be recognized can be aligned.

[0078] In some embodiments, an affine or perspective transformation can be performed on the QR code to be identified based on the positioning point and the standard QR code template to obtain a QR code to be identified without distortion. The QR code to be identified without distortion and the standard QR code template are then aligned to identify noise in the information area, thereby obtaining the number of target information points in each information area.

[0079] In one possible implementation of the third aspect, obtaining the version number corresponding to the QR code to be recognized includes: the sum of the total number of information points in the display state in the N information areas and the total number of positioning points in the QR code to be recognized, and the difference between the sum of the total number of information points in the display state in the N information areas and the total number of positioning points corresponding to the first version number of the QR code is the smallest, and the version number corresponding to the QR code to be recognized is determined to be the first version number.

[0080] In some embodiments, when the total number of highlights corresponding to the QR code to be recognized (i.e., the sum of the total number of target information points in the N information areas that are in the display state and the total number of positioning points in the QR code to be recognized) is inconsistent with the total number of highlights corresponding to each version number, the version number with the smallest difference between the total number of highlights corresponding to each version number of the QR code and the total number of highlights corresponding to the QR code to be recognized, i.e., the version number with the closest total number of highlights, is taken as the version number corresponding to the QR code to be recognized.

[0081] It is understandable that in some embodiments, during the QR code extraction process shown in Figure 15, there may be noise or some missing positioning points or information points in the QR code. Therefore, the total number of highlights in the QR code to be recognized may not be strictly consistent with the total number of highlights corresponding to each version number. For example, there may be two highlights in some information areas and three highlights in others. In this case, the version number can be determined by the nearest neighbor method of the total number of highlights. For example, if the total number of highlights of the QR code to be recognized is 47, which is closest to the total number of highlights corresponding to version number V1.0, then version number V1.0 is used as the version number corresponding to the QR code to be recognized. This can avoid the situation where the QR code is damaged and cannot be decoded, thus improving the user experience.

[0082] In one possible implementation of the third aspect, the target information corresponding to the QR code to be recognized is determined based on the version number corresponding to the QR code to be recognized and the N information areas in the QR code to be recognized, including: determining the target code table corresponding to the QR code to be recognized based on the version number corresponding to the QR code to be recognized, the target code table being used to reflect the mapping relationship between the code data and the first information and the sequence number corresponding to the first information; extracting the code data of the N information areas to obtain the code data corresponding to the N information areas; searching the target code table based on the N code data to determine the first information and the sequence number corresponding to the first information corresponding to each code data in the target code table; and determining the target information corresponding to the QR code to be recognized based on the multiple first information corresponding to the N code data and the multiple sequence numbers corresponding to the first information.

[0083] In some embodiments, determining the target information corresponding to the QR code to be identified based on multiple first pieces of information corresponding to N code metadata and the sequence numbers corresponding to the multiple first pieces of information may include: determining M identical first target information corresponding to N information areas based on multiple first pieces of information corresponding to N code metadata and the sequence numbers corresponding to the multiple first pieces of information; performing a first fusion process on the M identical first target information to obtain the fused second target information corresponding to the QR code to be identified.

[0084] In some embodiments, when N information areas contain only one target information, it is not necessary to fuse multiple identical first target information. The target information corresponding to the QR code to be identified can be determined based on multiple first information corresponding to N code data and the sequence number corresponding to multiple first information.

[0085] In one possible implementation of the third aspect, the N information areas are determined based on at least one positioning structure included in the QR code to be identified, the positioning structure including one or more positioning points.

[0086] Fourthly, this application provides an electronic device having a display screen for displaying a QR code representing the first aspect and any possible implementation thereof.

[0087] Fifthly, this application provides an electronic device comprising: one or more processors; one or more memories; the one or more memories storing one or more programs, which, when executed by one or more processors, cause the electronic device to perform the QR code recognition method of the second aspect and any possible implementation thereof.

[0088] In a sixth aspect, this application provides a computer-readable storage medium storing instructions that, when executed on a computer, cause the computer to perform the QR code recognition method of the second aspect and any possible implementation thereof.

[0089] In a seventh aspect, this application provides a computer program product comprising: computer instructions that, when executed on an electronic device, cause the electronic device to perform the QR code recognition method of the second aspect and any possible implementation thereof. Attached Figure Description

[0090] Figure 1A shows a schematic diagram of the structure of a QR code 100 according to some embodiments of this application;

[0091] Figures 1B to 1D, according to some embodiments of this application, illustrate a schematic interface diagram of a data cloning process between an old device 300 and a new device 310;

[0092] Figure 1E illustrates a scenario of data cloning between a mobile phone and a watch, according to some embodiments of this application.

[0093] Figure 2 shows a schematic diagram of a QR code structure according to some embodiments of this application;

[0094] Figures 3A to 3B illustrate a scenario of an electronic device scanning a QR code 100 according to some embodiments of this application;

[0095] Figures 4A to 4D illustrate a structural schematic diagram of a QR code provided in this application, according to some embodiments of this application.

[0096] Figure 5A shows a schematic diagram of a QR code structure when the number of outer and inner positioning points is the same as the number N of information areas, according to some embodiments of this application.

[0097] Figure 5B shows a schematic diagram of four positioning points corresponding to information area A1 in Figure 5A, according to some embodiments of this application.

[0098] Figure 5C shows a schematic diagram of the structure of a QR code when the number of outer and inner positioning points is different from the number of information areas, according to some embodiments of this application.

[0099] Figure 5D shows a schematic diagram of two positioning points corresponding to information area A1 in Figure 5C, according to some embodiments of this application.

[0100] Figure 5E illustrates a schematic diagram of a first method for determining individual positioning points based on partial positioning points of a QR code, according to some embodiments of this application.

[0101] Figure 5F shows a schematic diagram of the structure of a QR code when the number of outer and inner positioning points is different from the number of information areas, according to some embodiments of this application.

[0102] Figure 5G, according to some embodiments of this application, shows a schematic diagram of two positioning points corresponding to information area A1 in Figure 5F;

[0103] Figure 5H illustrates a second method for determining individual positioning points based on partial positioning points of a QR code, according to some embodiments of this application.

[0104] Figure 5I shows a schematic diagram of the state of information points in an information area according to some embodiments of this application;

[0105] Figure 6A illustrates a schematic diagram of the setting of information point serial numbers according to some embodiments of this application;

[0106] Figure 6B shows a schematic diagram of the state of information points in the first information area A1 according to some embodiments of this application;

[0107] Figure 6C shows a schematic diagram of the state of information points in the second information area A1 according to some embodiments of this application;

[0108] Figure 7A shows a complete structural diagram of the QR code when the first PIN code is 148258, according to some embodiments of this application.

[0109] Figure 7B shows a complete structural diagram of the QR code when the second PIN code is 148258, according to some embodiments of this application.

[0110] Figure 8 illustrates the distribution of the number of digits of the PIN code corresponding to each information area according to some embodiments of this application.

[0111] Figure 9 shows a flowchart of a first QR code recognition method according to some embodiments of this application;

[0112] Figure 10A shows a schematic diagram of the structure of a first type of QR code to be identified according to some embodiments of this application;

[0113] Figure 10B shows a schematic diagram of the structure of a QR code to be identified after all positioning points have been added, according to some embodiments of this application.

[0114] Figure 10C shows a schematic diagram of the structure of a QR code to be identified when determining the serial numbers of information point 1 and information point 2 according to some embodiments of this application.

[0115] Figure 11 illustrates a flowchart of a second QR code recognition method according to some embodiments of this application;

[0116] Figure 12 shows a schematic diagram of the structure of a second type of QR code to be recognized, according to some embodiments of this application;

[0117] Figure 13A shows a flowchart of a third QR code recognition method according to some embodiments of this application;

[0118] Figure 13B illustrates a flowchart of a fourth QR code recognition method according to some embodiments of this application;

[0119] Figure 13C shows a schematic diagram of the structure of a QR code in a related art according to some embodiments of this application;

[0120] Figure 14A shows a schematic diagram of a structure for integrating a QR code according to some embodiments of this application;

[0121] Figures 14B to 14D, according to some embodiments of this application, illustrate a schematic diagram of the interface between a new device 400 and an old device 410 when performing data cloning based on a fused QR code.

[0122] Figure 15 illustrates a flowchart for extracting location points from a fused QR code according to some embodiments of this application;

[0123] Figure 16 shows a schematic diagram of the structure of four types of QR codes according to some embodiments of this application;

[0124] Figure 17 illustrates a flowchart of a QR code generation method according to some embodiments of this application;

[0125] Figure 18 illustrates a flowchart of a QR code recognition method according to some embodiments of this application;

[0126] Figure 19 shows a schematic diagram of noise in a QR code according to some embodiments of this application;

[0127] Figure 20 illustrates a flowchart of a fifth QR code recognition method according to some embodiments of this application;

[0128] Figure 21 illustrates a flowchart of a sixth QR code recognition method according to some embodiments of this application;

[0129] Figure 22 illustrates a flowchart of a seventh QR code recognition method according to some embodiments of this application;

[0130] Figure 23 shows a schematic diagram of the structure of an electronic device that displays a QR code or performs a QR code recognition method, according to some embodiments of this application. Detailed Implementation

[0131] The illustrative embodiments of this application include, but are not limited to, QR codes and their recognition methods, electronic devices, storage media, and program products.

[0132] The following section will first explain the proprietary terms used in the embodiments of this application.

[0133] QR Code: The current structure of QR codes is mainly shown in Figure 1. This type of QR code records data symbol information based on specific geometric shapes distributed in a plane (two-dimensional direction) according to certain rules. To enable computer recognition, QR codes use several geometric shapes corresponding to binary to represent textual and numerical information; for example, white blocks represent binary "0", and black blocks represent "1". In this way, electronic devices can interpret the information contained in the QR code by recognizing the colors and arrangement.

[0134] Personal Identification Number (PIN): Commonly referred to as a PIN code. In this application, for ease of description, the target information corresponding to the QR code is uniformly described as a PIN code. The PIN code can consist of numbers, letters, characters, etc. It can be understood that the number of digits in the PIN code is the number of data (or payload data) contained within it. For example, if the PIN code is 148258, then this PIN code is a 6-digit PIN code.

[0135] The application scenarios of the QR codes involved in this application are described in detail below.

[0136] Currently, QR code scanning and recognition scenarios include, but are not limited to, new device verification, smart band pairing, account login, one-click screen mirroring, and data cloning. Taking data cloning as an example, this scenario allows two devices (usually a new device and an old device) to clone data by scanning a QR code. Specifically, the old device can establish a Wi-Fi connection with the new device by scanning the QR code displayed on the new device's screen. Once the connection is established, the old device can transfer data to the new device. The QR code on the new device may carry information such as the Wi-Fi service set identifier (SSID) and the Wi-Fi password.

[0137] The application scenario described above will be described in detail below with reference to Figures 1B to 1D. Taking a mobile phone as an example where both the new and old devices are mobile phones, Figure 1B shows a schematic diagram of the display interface of the old device 300 and the new device 310. The display interface of the old device 300 displays the prompt message "Please open 'Phone Clone' on the new device, select 'New Device' to obtain the hotspot QR code", and displays the scanning area 301. The display interface of the new device 310 displays the prompt message "Open 'Phone Clone' on the old device, select 'Old Device', scan the QR code below to establish a connection", and displays the QR code 302 to be scanned. Then, as shown in Figure 1C, the old device 300 can scan the QR code 302 on the display interface of the new device 310 to obtain the WIFI SSID information and password information carried in the QR code 302, so as to establish a connection with the new device 310. After a successful connection, as shown in Figure 1D, the old device 300 displays a data selection area 303, which includes options for various data types, such as gallery, contacts, messages, and voice recorder. The new device 310 displays a connection success message: "Please select the data to be migrated from the old device." Then, when the user selects the data to be migrated (e.g., gallery, contacts, messages, and voice recorder data) in the old device 300's display interface and clicks the "Next" button, the selected data in the old device 300 can be migrated / cloned to the new device 310.

[0138] It is understood that the above-mentioned data cloning scenario can also include data cloning between two different types of devices, and this application embodiment does not limit this. For example, as shown in Figure 1E, the old device 300 is a mobile phone, and the new device 310 is a watch. Data cloning is performed by scanning the QR code displayed on the watch with the mobile phone.

[0139] As mentioned earlier, the existing QR code structure is complex and cannot be integrated with other display content on the display interface, resulting in a poor user viewing experience.

[0140] To address the aforementioned technical problems, this application provides a QR code, comprising N information areas (or information regions, partitions, information blocks, etc.) and K positioning structures, wherein N is greater than 1 and K is greater than or equal to 1; the K positioning structures are used to locate each of the N information areas, and the information content of the N information areas is used to represent the target information corresponding to the QR code; each positioning structure includes one or more positioning points, and the information content of each information area includes multiple information points (or information area particles). In some embodiments, the number of information points in each information area is the same, for example, two for each area.

[0141] In the QR code provided in this application embodiment, both the information area and the positioning structure are composed of dots. The structure is simple and does not cover a large area of ​​the display content of the electronic device's display interface. Only the dots partially cover the content, allowing the electronic device to directly display the QR code on the original display content. This achieves the integration of the QR code and the underlying display content of the electronic device, improving the user's viewing experience.

[0142] It should be noted that the target information of the QR code mentioned in the embodiments of this application can also be referred to as the information to be conveyed by the QR code, QR code information, QR code data information, QR code text information, etc. The target information in the QR code can vary depending on the intended use of the QR code. For example, in a data cloning scenario, the target information carried by the QR code can be the SSID information and password information of a Wi-Fi network. Or, in a wristband pairing scenario, the information carried by the QR code can be pairing code information, etc.

[0143] In some embodiments, each positioning structure may be used to locate an information area, or two adjacent positioning structures may be used to locate an information area between the two positioning structures.

[0144] In some embodiments, a positioning structure can be used to locate two adjacent information areas. This effectively reduces the number of positioning structures, decreases the complexity of the QR code structure, and enables faster positioning of each information area during QR code recognition, thus accelerating decoding.

[0145] In some embodiments, the shape of the QR code can be square, circular, triangular, or ring-shaped. This application does not limit the shape of the QR code. Taking a ring-shaped QR code as an example, as shown in Figure 2, the QR code can include 24 positioning points (e.g., positioning point 1, positioning point 1', positioning point 2, positioning point 2', etc. in Figure 3) and 12 information areas (e.g., information areas A1-A12 in the figure). Positioning points 1, 1', 2, and 2' can be used to locate one information area A1. Positioning points 1, 1', 2, and 2' can be referred to as a positioning structure, that is, one positioning structure is used to locate one information area. Alternatively, in some embodiments, positioning points 1 and 1' can be referred to as a positioning structure used to locate information area A1, and positioning points 2 and 2' can be referred to as a positioning structure used to locate information area A2.

[0146] Alternatively, positioning point 1 and positioning point 1' can be called a positioning structure, and positioning point 2 and positioning point 2' can be called a positioning structure, meaning that information area A1 is positioned by two adjacent positioning structures. In some embodiments, positioning point 1 and positioning point 1' can be called a positioning structure used to position information area A1, and positioning point 2 and positioning point 2' can be called a positioning structure used to position information area A2.

[0147] In some embodiments, the positioning points may further include outer positioning points and inner positioning points. The outer positioning points are the positioning points located on the outer circle (i.e., the first outer circle) in FIG1B (e.g., positioning point 1 and positioning point 2), and the inner positioning points are the positioning points located on the inner circle (i.e., the first inner circle) (e.g., positioning point 1' and positioning point 2'). In this case, the information area is located in the annular area (i.e., the first area) formed by the outer circle and the inner circle.

[0148] In some embodiments, a positioning structure may consist of an outer positioning point and a corresponding inner positioning point. Each positioning structure is located between two adjacent information areas. For example, the positioning structure consisting of positioning point 1 and positioning point 1' is located between information area A1 and information area A12.

[0149] In some embodiments, the number of outer positioning points and the number of inner positioning points may be the same or different. Furthermore, the number of outer positioning points may be the same as or different from the number of information areas; similarly, the number of inner positioning points may be the same as or different from the number of information areas. The detailed structure of the positioning points is described in Figures 5A-5I below, and will not be repeated here.

[0150] Furthermore, for the QR code shown in Figure 1, since the three lookahead patterns contained in the QR code are used to determine the outer border of the QR code, when an electronic device scans the QR code, it needs to ensure that all three lookahead patterns are located within the scanning area of ​​the electronic device. Figure 3A shows a schematic diagram of an electronic device scanning a QR code 100. In Figure 3A, all three lookahead patterns 101 of the QR code 100 are located within the scanning area 104 of the electronic device. In this case, the electronic device can further identify the information contained in the QR code 100. However, if only a portion of the QR code 100 is located within the scanning area 104 of the electronic device, that is, if only one of the three lookahead areas 101 shown in Figure 3B is located within the scanning area 104 of the electronic device, then the electronic device cannot identify the information contained in the QR code 100, reducing the scanning efficiency of the electronic device for the QR code 100.

[0151] For example, in the scenarios shown in Figures 1B to 1D, or Figure 1E, the structure of the QR code 302 will cause the old device 300 to ensure that the three lookahead patterns of the QR code 302 are completely within the scanning area 301 of the old device 300 when scanning the QR code 302. Otherwise, the old device 300 will not be able to obtain the target information displayed / transmitted in the QR code 302, such as the PIN code corresponding to the QR code 302 (e.g., the SSID information and password information of WIFI), which will result in low scanning efficiency of the QR code.

[0152] To address this issue, in some embodiments, the N information areas can be further categorized into M information area groups (or information region groups). Each information area group includes at least one information area, and at least two information area groups have identical information content, meaning their information point distribution is identical and they both represent the same target information. Here, M is less than or equal to N and greater than 1. It can be understood that the information content of each information area consists of multiple information points (or information area particles). When the distribution state of information points (e.g., the position and display state of information points) is identical in two information areas, then the two information areas represent the same information. Therefore, identical distribution states of information points in two information area groups can refer to identical distribution states of information points in corresponding information areas within the two information area groups.

[0153] It is understood that in some embodiments, the information content of each information group is the same and they are all used to represent the same target information.

[0154] Thus, during the scanning process of an electronic device, as long as the area containing one or more target information in the QR code provided in this application is scanned, the complete target information to be conveyed by the QR code can be obtained. This embodiment of the application does not impose any limitations. In this way, the correct recognition of the QR code can be achieved even if the entire QR code is not scanned, thereby improving scanning efficiency.

[0155] In some embodiments, when each information area group includes one information area, the information points displayed in each information area represent a complete target information of the QR code. For example, as shown in Figure 4A, the information represented by the information points displayed in each information area is a complete target information. Specifically, the QR code includes information areas a, b, c, and d, and each information area can also be an information area group. Information area a can display the information points corresponding to information I1; information area b can display the information points corresponding to information I2; information area c can display the information points corresponding to information I3; and information area d can display the information points corresponding to information I4. It can be understood that in this case, information I1, I2, I3, and I4 are all the same and each represents a complete target information.

[0156] It is understood that, for ease of description, the information area of ​​the QR code in this embodiment of the application displays corresponding information points to represent the corresponding information or target information, which can also be referred to as the information area displaying the information or target information.

[0157] Based on the structure of this QR code, electronic devices can obtain the target information in any information area simply by scanning it, without having to scan the entire or all areas of the QR code to obtain the target information corresponding to the QR code, thereby improving scanning efficiency.

[0158] For example, in some other embodiments, when each information area group includes multiple information areas, the display content of the multiple information areas included in each information area group collectively represents a complete target information. For example, as shown in Figure 4B, the information represented by the display content of two adjacent information areas constitutes the complete target information of the QR code. Specifically, in Figure 4B, information area a and information area c constitute information area group AC, and information area b and information area d constitute information area group BD. Information I1 and I3 together constitute a complete target information, and information I2 and I4 together constitute a complete target information, and the complete target information constituted by information I1 and I3 is the same as the complete target information constituted by information I2 and I4.

[0159] Based on the structure of this QR code, electronic devices can obtain the complete target information corresponding to the QR code simply by scanning information areas a and c, or information areas b and d. For example, scanning information areas a and c can obtain information I1 and I3 within the information areas, thus obtaining the complete target information corresponding to the QR code, without having to scan the entire or all areas of the QR code to obtain the complete target information, thereby improving scanning efficiency.

[0160] It is understood that the structures of the QR codes shown in Figures 4A and 4B are merely illustrative examples and do not constitute a complete limitation on the structure of the QR codes in this application. For example, this application does not limit the number of information areas and information area groups, which can be determined based on the target information to be conveyed by the QR code. Furthermore, the shape of the QR code is not limited; for example, the shape of the QR code can be square, circular, triangular, or ring-shaped.

[0161] In some embodiments, taking the complete target information corresponding to the QR code as the PIN code, and the PIN code including multiple payload data (i.e., first information) as an example, each information area can be used to display (or represent) at least one payload data and the (number of bits) sequence number of the at least one payload data in the target information. Thus, after the electronic device scans the QR code, based on the status of the information points displayed in each information area and their corresponding sequence numbers, it can obtain the code data corresponding to each information area. Based on the code data and the code table (shown in Table 2 later), it can decode at least one payload data and the (number of bits) sequence number of the at least one payload data in the target information, and sort the payload data according to the number of bits to obtain the correct PIN code. Taking the six-digit PIN code 148258 as an example, the number of bits corresponding to payload data 1 can be 0, the number of bits corresponding to payload data 4 can be 1, and so on. Therefore, if the PIN code is 148258, the information area can be used to display information points corresponding to 01, 14, 28, 32, 45, 58, etc.

[0162] In some examples, the QR code provided in this application may also include at least one positioning structure for locating multiple target areas, wherein one positioning structure is used to locate at least one target area. Exemplarily, the positioning structure may include positioning points.

[0163] The structure of the QR code provided in this application will be further described below, taking the six-digit PIN code 148258 that can be identified based on the QR code as an example.

[0164] In some examples, taking a square QR code as an example, as shown in Figure 4D, the QR code may include multiple positioning points (e.g., points A, B, C, and D in the figure) and multiple information areas (e.g., information areas a, b, ..., l in Figure 4D). Figure 4D has a total of 12 information areas, and the four positioning points A, B, C, and D are used to locate three information areas a, b, and c.

[0165] To display PIN code 148258 based on this QR code, for example, information area a can be used to represent payload data 1 and its corresponding digit number 0, i.e., display the information point corresponding to information 01; information area b can be used to represent payload data 4 and its corresponding digit number 1, i.e., display the information point corresponding to information 14; information area c can be used to represent payload data 8 and its corresponding digit number 2, i.e., display the information point corresponding to information 28; information area d can be used to represent payload data 1 and its corresponding digit number 0, i.e., display the information point corresponding to information 01; information area e can be used to represent payload data 4 and its corresponding digit number 1, i.e., display the information point corresponding to information 14; information area f can be used to represent payload data 8 and its corresponding digit number 2, i.e. Information area g can be used to represent net load data 2 and its corresponding bit number 3, which is the information point corresponding to information 32; information area h can be used to represent net load data 5 and its corresponding bit number 4, which is the information point corresponding to information 45; information area i can be used to represent net load data 8 and its corresponding bit number 5, which is the information point corresponding to information 58; information area j can be used to represent net load data 2 and its corresponding bit number 3, which is the information point corresponding to information 32; information area k can be used to represent net load data 5 and its corresponding bit number 4, which is the information point corresponding to information 45; information area l can be used to represent net load data 8 and its corresponding bit number 5, which is the information point corresponding to information 58.

[0166] Therefore, information areas a, b, and c together with information areas g, h, and i form one information area group, collectively representing a complete target information 148258; information areas d, e, and f together with information areas j, k, and l form another information area group, also collectively representing a complete target information 148258. Thus, even if the electronic device scans only the left or right half of the QR code, it can still obtain the complete target information corresponding to the QR code and determine the PIN code.

[0167] It is understood that Figure 4D above is merely an example and does not constitute a complete limitation of this application. For example, information areas a, b, and c may represent the same information as information areas g, h, and i, respectively.

[0168] In some other embodiments, taking a ring-shaped QR code as an example, as shown in Figure 4D, the QR code may include multiple positioning points (e.g., points 1, 1', 2, 2' in the figure) and multiple information areas (e.g., information areas A1, A2, ..., A12 in the figure). There are a total of 12 information areas in Figure 4D (i.e., N is 12), and the four positioning points 1, 1', 2, 2' correspond to one information area A1.

[0169] In some embodiments, the positioning points may further include outer positioning points and inner positioning points. The outer positioning points are those located on the outer circle (i.e., the first outer circle) in Figure 4D (e.g., positioning point 1 and positioning point 2), and the inner positioning points are those located on the inner circle (i.e., the first inner circle) (e.g., positioning point 1' and positioning point 2'). In this case, the information area is located in the annular region (i.e., the first region) formed by the outer and inner circles. The number of outer positioning points and the number of inner positioning points can be the same or different. Furthermore, the number of outer positioning points can be the same as or different from the number of information areas; similarly, the number of inner positioning points can be the same as or different from the number of information areas.

[0170] To display the PIN code 148258 based on this QR code, for example, information area A1 in Figure 4D can be used to represent the payload data 1 of the PIN code and its corresponding digit number 0, i.e., the information point corresponding to display information 01; information area A2 can be used to represent the payload data 4 and its corresponding digit number 1, i.e., the information point corresponding to display information 14; information area A3 can be used to represent the payload data 8 and its corresponding digit number 2, i.e., the information point corresponding to display information 28; information area A4 can be used to represent the payload data 2 and its corresponding digit number 3, i.e., the information point corresponding to display information 32; information area A5 can be used to represent the payload data 5 and its corresponding digit number 4, i.e., the information point corresponding to display information 45; and information area A6 can be used to represent the payload data 8 and its corresponding digit number 5, i.e., the information point corresponding to display information 58. Based on this, the remaining information areas A7 to A12 can again represent the 6-digit PIN code 148258. For example, information area A7 displays the information point corresponding to information 01; information area A8 displays the information point corresponding to information 14; information area A9 displays the information point corresponding to information 28; information area A10 displays the information point corresponding to information 32; information area A11 displays the information point corresponding to information 45; and information area A12 displays the information point corresponding to information 58.

[0171] Therefore, information areas A1 to A6 constitute one information area group, and information areas A7 to A12 constitute another information area group. Thus, when an electronic device scans the QR code provided in Figure 4D, even if the entire QR code is not within the scanning area of ​​the electronic device (e.g., only the left or right half of the QR code is within the scanning area), the electronic device can still obtain the target information corresponding to the QR code and thus the PIN code.

[0172] In some examples, the payload data and its corresponding digit number can be represented separately in different information areas, instead of the case shown in Figures 4C and 4D where a single information area simultaneously represents the payload data and its corresponding digit number. Furthermore, the rules for representing target information using QR codes of other shapes are the same as described above and will not be repeated here.

[0173] In some examples, each information area includes multiple information points, meaning that the QR code can represent the target information corresponding to multiple information areas based on the state of the information points.

[0174] Furthermore, for a specific bit of payload data in repeatedly represented target information, if the information area that should represent that bit fails to do so (e.g., due to information area damage), the electronic device can determine the payload data through other information areas that represent that data. For example, as shown in Figure 4D, if information area A1 fails to accurately transmit the corresponding 0th bit payload data 1, but information area A7 accurately transmits the 0th bit payload data 1, the electronic device can determine the 0th bit payload data 1 based on information area A7. This improves the scanning efficiency of QR codes, thereby enhancing the efficiency of data acquisition and the robustness of scanning.

[0175] It is understood that in some other embodiments, the QR code also displays at least a portion of the complete target information; that is, at one moment, the QR code displays at least a portion of the target information, and at another moment, the QR code displays the remaining portion of the target information. The electronic device obtains the complete target information by integrating the partial target information displayed in the QR code at different times.

[0176] Based on the QR code described above, this application also provides a QR code recognition method. In this method, after scanning the QR code, the electronic device can determine the target information corresponding to the QR code based on the N information areas within the QR code. Specifically, the electronic device can extract code elements from each information area by analyzing the numerical values ​​corresponding to the state of the information points within each information area, and then decode the code elements to obtain the target information corresponding to multiple information areas.

[0177] In some examples, the numerical value of the information point is "0" or "1". Therefore, the code element of each information area is a string obtained by arranging a certain number of "0"s or "1"s in a certain order. The electronic device can look up the corresponding relationship table (or code table) stored internally according to the code element corresponding to each information area to determine the first information corresponding to each code element, and thus obtain the target information represented by multiple code elements. The correspondence table is a list stored in advance inside the electronic device to represent the correspondence between code elements and first information.

[0178] Based on the structure of the QR code described above, when an electronic device scans the QR code, even if the QR code is not entirely within the scanning area of ​​the electronic device, the electronic device can still obtain the target information to be transmitted by the QR code based on the scanned portion of the QR code. This improves the efficiency of the electronic device in obtaining the information transmitted by the QR code, as well as the scanning efficiency and robustness of the QR code.

[0179] Before describing in detail the structure of the QR code provided in the embodiments of this application, we will first introduce the electronic devices and application scenarios in which the QR code is applied.

[0180] It is understood that the QR code provided in this application can be displayed on the display interface or screen of an electronic device. This application does not limit the type and form of the electronic device. For example, electronic devices include, but are not limited to, mobile phones, tablets, computers, wearable devices, augmented reality (AR) devices, and any other electronic devices.

[0181] This application does not limit the application scenarios of the QR code. For example, the QR code provided in this application can be applied to the data cloning scenario shown in Figures 1B to 1E, as well as to scenarios such as wristband pairing, account login, and one-click screen projection.

[0182] It is understood that, for ease of description, this application will subsequently describe the QR code of this application in detail using the circular shape shown in Figure 4D above. It is also understood that the structural principles of QR codes of different shapes are the same and can be used as a reference for each other.

[0183] In an exemplary embodiment, the QR code provided in this application includes N information areas, each of which can be used to transmit at least n bits of information, and the target information corresponding to the QR code includes multiple first pieces of information. That is, each information area can represent at least one first piece of information and its corresponding sequence number in the target information through the values ​​of at least n information points, thereby transmitting the corresponding target information. Taking the target information as 148258 as an example, the multiple first pieces of information may include 1, 4, 8, 2, 5, 8; however, it should be understood that the target information is a plurality of first pieces of information arranged in a certain order. In this case, each information area can represent each first piece of information and its corresponding sequence number through the values ​​of n information points, such as 01, 14, 28, 32, 45, 58, thereby representing the target information as 148258.

[0184] This application does not limit the number of information areas N and the number of information point locations n. The size of N and n can be set based on experience or adjusted flexibly according to the actual application scenario.

[0185] Furthermore, the QR code provided in this application also includes a positioning structure, wherein the positioning structure may include positioning points, which are used to identify and distinguish different information areas. Positioning points may include outer positioning points and inner positioning points, and the embodiments of this application do not limit the number of outer and inner positioning points. The number of outer positioning points may be the same as or different from the number of information areas; similarly, the number of inner positioning points may be the same as or different from the number of information areas.

[0186] For ease of description, the following text will continue to describe the structure of QR codes using N=12 and n=12 as an example.

[0187] The location points of the QR code provided in this application are described in detail below.

[0188] As mentioned above, the number of outer positioning points can be the same as or different from the number of information areas N; the number of inner positioning points can also be the same as or different from the number of information areas N. It can be understood that regardless of the number and location of the outer and inner positioning points, the electronic device scanning the QR code can infer the positioning point corresponding to each information area based on the given outer and inner positioning points.

[0189] Specifically, Figure 5A shows a schematic diagram of a QR code structure when the number of outer and inner positioning points is the same as the number of information areas N. In Figure 5A, the QR code includes 12 information areas, and each information area includes 12 information points that can be used to represent payload data. Specifically, the 12 information points can represent different values ​​("0" or "1") through different states, representing payload data and the corresponding sequence number of the payload data, and thus representing target information. However, for the sake of simplicity, only 12 points (the dashed circles in the figure) are used to represent the possible positions of the information points, and the different states of the information points are not shown. This will be described in detail later.

[0190] In addition, the QR code includes 12 outer positioning points and 12 inner positioning points. The area formed by two adjacent outer positioning points and their corresponding two inner positioning points is the information area (as shown by the dotted lines in the figure). In this case, each information area corresponds to four positioning points. Taking information area A1 in Figure 5A as an example, a schematic diagram of the four positioning points corresponding to information area A1 can be found in Figure 5B.

[0191] For this type of QR code structure, after an electronic device scans the QR code, it can determine which points are the outer positioning points and which are the inner positioning points based on the fact that multiple points are located on the same outer / inner circle. Then, it determines the information area based on the four adjacent positioning points, and then determines the net load data corresponding to the information area and the sequence number corresponding to the net load data based on the values ​​corresponding to the different states of the information points in the information area.

[0192] Figure 5C shows a schematic diagram of a QR code structure when the number of outer and inner positioning points differs from the number of information areas. In Figure 5C, the QR code includes 12 information areas, and each information area includes 12 information points. In addition, the QR code includes 6 outer positioning points and 6 inner positioning points, with each information area corresponding to one outer positioning point and one inner positioning point diagonally opposite to that outer positioning point. In this case, each information area corresponds to two positioning points. Taking information area A1 in Figure 5C as an example, a schematic diagram of the two positioning points corresponding to information area A1 can be found in Figure 5D.

[0193] With this type of QR code structure, after an electronic device scans the QR code, it can determine the four positioning points (two outer positioning points and two inner positioning points) corresponding to the current information area based on the outer and inner positioning points, that is, to fill in the positioning points.

[0194] For example, as shown in Figure 5E, the electronic device can determine the outer circle traversed by the six outer positioning points, as well as the center of that outer circle. Then, taking the inner positioning point 1' and the outer positioning point 2 as known examples, the outer positioning point 1 and the inner positioning point 2' can be determined as follows: the intersection of the line connecting the center of the circle and the inner positioning point 1' in Figure 5E with the outer circle can be determined as outer positioning point 1; the intersection of the line connecting the center of the circle and the outer positioning point 2 with the inner circle can be determined as inner positioning point 2'. The determination methods for other outer and inner positioning points are similar and will not be elaborated further. After determining 12 outer positioning points and 12 inner positioning points based on the above methods, the electronic device can determine each information area, and then obtain the PIN code corresponding to the QR code based on the net payload data corresponding to each information area and the serial number corresponding to the net payload data.

[0195] Figure 5F shows a schematic diagram of a QR code structure when the number of outer and inner positioning points differs from the number of information areas. In Figure 5F(A), the QR code includes 12 information areas, and each information area includes 12 information points. Furthermore, the outer and inner positioning points are located on the same side of the corresponding information areas. In this case, each information area corresponds to two positioning points. Taking information area A1 in Figure 5F as an example, a schematic diagram of the two positioning points corresponding to information area A1 can be found in Figure 5G.

[0196] With this type of QR code structure, after an electronic device scans the QR code, it can determine the four positioning points corresponding to each information area based on the current positioning point, thus completing the positioning points.

[0197] For example, as shown in Figure 5H, the electronic device can determine the outer circle traversed by the six outer positioning points, the inner circle traversed by the six inner positioning points, and the center of the outer (or inner) circle. Then, taking the known outer positioning point 1, inner positioning point 1', outer positioning point 3, and inner positioning point 3' as an example, the outer positioning point 2 and inner positioning point 2' can be determined as follows: determine line 1 connecting the center of the circle to inner positioning point 1', determine line 2 connecting the center of the circle to inner positioning point 3', and then determine line 3 that bisects the angle between line 1 and line 2 and passes through the center of the circle. Further, the intersection of line 3 and the outer circle is the outer positioning point 2, and the intersection of line 3 and the inner circle is the inner positioning point 2'. The determination methods for other outer and inner positioning points are similar and will not be elaborated further. After determining 12 outer positioning points and 12 inner positioning points using the above method, the electronic device can determine each information area, and then obtain the PIN code corresponding to the QR code based on the net load data corresponding to each information area and the serial number corresponding to the net load data.

[0198] It is understandable that the QR codes shown in (B) and (C) of Figure 5F are different only in the number and position of the outer and inner positioning points compared to (A) of Figure 5F. The electronic device determines all positioning points based on the given outer and inner positioning points in the same way as the principle mentioned above, and will not be repeated here.

[0199] In the structure of the QR code described above, it can be understood that two adjacent information areas share an outer positioning point and an inner positioning point. In other words, some positioning points of a certain information area can be determined based on the positioning points of the adjacent information areas. This helps to quickly determine the information area and extract the code elements of the information area. It can also reduce the use of positioning points (or positioning symbols) in the QR code and reduce the complexity of the QR code.

[0200] The information area of ​​the QR code provided in this application is described in detail below.

[0201] In an exemplary embodiment, the information area can represent the payload data and its corresponding sequence number through the states of 12 information points. Different states can be set for different information points to represent different numerical values ​​(e.g., "0" or "1"). The different values ​​of multiple information points, arranged in a certain order, can represent the corresponding payload data and its corresponding sequence number, thereby representing the target information corresponding to the QR code. For example, the first state of an information point corresponds to a first numerical value, the second state corresponds to a second numerical value, and the first and second numerical values ​​are different.

[0202] Taking the 5G QR code as an example, the 12 circles in Figure 5G represent the positions of 12 information points or the possible display positions of these information points. Therefore, information points in different positions can have different serial numbers. In practical applications of QR codes, the 12 information points can have different states to represent different values ​​"0" or "1". For example, Figure 5I shows a schematic diagram of the state and position of one type of information point. In Figure 5I (A), the states of two information points are represented by solid circles, so the value corresponding to these two information points is "1", while the other ten information points are not displayed in the QR code, so the value corresponding to the remaining information points is "0". Arranging the values ​​"1" and "0" according to the serial number corresponding to each information point yields a string, i.e., a code element, which can represent the payload data corresponding to the information area and the serial number corresponding to the payload data. In addition, Figure 5I (B) is a schematic diagram of the state and position of another type of information point, and the principle of representing the payload data and the serial number corresponding to the payload data is the same as that in Figure 5I (A), so it will not be described again.

[0203] This application does not limit the method of setting the serial numbers of information points in each information area. The method of setting the serial numbers of information points in each information area of ​​the QR code can be the same. Figure 6A shows a schematic diagram of one method of setting the serial numbers of information points. As shown in Figure 6A, the 12 information points in information area A1 can be divided into three rows from the inside out. The serial numbers of the four information points in the first row from right to left can be 0-3, similarly, the serial numbers of the four information points in the second row from right to left are 4-7, and the serial numbers of the four information points in the third row from right to left are 8-11. The method of setting the serial numbers of information points in other information areas is similar. For example, the method of setting the serial numbers of the 12 information points in information area A2 can still refer to the content shown in Figure 6A.

[0204] It is understood that the numerical value "0" or "1" corresponding to each information point can be represented by the state of the information point. This application embodiment does not limit the correspondence between numerical values ​​and states. For example, when the numerical value of an information point is "0", the state of that information point can be a hollow circle; when the numerical value of an information point is "1", the state of that information point can correspondingly become a solid circle. Based on the QR code structure shown in Figure 6A, in this case, if the numerical values ​​corresponding to information points numbered 1 and 2 in information area A1 are "1", and the rest are "0", then the state of the information points in information area A1 can be seen in Figure 6B.

[0205] For example, when the value of an information point is "0", that information point may not be displayed in the QR code. Conversely, when the value of an information point is "1", that information point will be displayed as a solid circle in the QR code. Based on the QR code structure shown in Figure 6A, in this case, if the values ​​corresponding to information points numbered 1 and 2 in information area A1 are "1" and the rest are "0", then the state of the information points in information area A1 can be seen in Figure 6C. That is to say, in this case, the first state is the display state, the second state is the undisplayed state, and the first value corresponding to the first state is 1, and the second value corresponding to the second state is 0.

[0206] It is understood that the shape of the information points in the embodiments of this application can be a circle, a triangle or other shapes, and this application does not limit them.

[0207] Therefore, the payload data corresponding to each information area and the sequence number of the payload data can be represented by different values ​​corresponding to information points with different sequence numbers, and the different values ​​corresponding to information points with different sequence numbers can be represented in the form of strings. For example, based on the sequence numbering of the information points shown in Figure 6A, if the values ​​corresponding to information points with sequence numbers 1 and 2 in information area A1 are "1", and the rest are 0, then the string corresponding to the 12 information points in information area A1 would be 011000000000. This string can be used to represent the payload data corresponding to information area A1 and the sequence number of the payload data.

[0208] It is understood that, for the sake of simplicity, this application uses the example of two information points with a value of "1" and the rest with a value of "0" out of 12 information points. However, it should be understood that the number of information points with a value of "1" can be flexibly set according to the actual application scenario, and this application does not limit the size of this number; for example, it can be 3. In addition, the number of information points with a value of "1" in each information area can be the same or different. For example, the number of information points with a value of "1" in information area A1 is 2, and the number of information points with a value of "1" in information area A2 is 3, etc., and this application does not limit this.

[0209] In this embodiment, the payload data corresponding to each information area and the sequence number corresponding to the payload data can be represented by units digit and tens digit. For example, the units digit is the payload data in the PIN code (i.e., target information), and the tens digit is the sequence number corresponding to the payload data. For example, if the 6-digit PIN code is 148258, where the payload data corresponding to the 0th digit is 1, then the information area is used to represent the data 01. In some embodiments, the payload data may also include the overhead of upper-layer protocols that may exist when transmitting target information via QR code.

[0210] In some embodiments, the tens digit can also be the payload data, and the units digit is the sequence number corresponding to the payload data. This application does not impose any restrictions on this.

[0211] The following description uses the example of a 6-digit PIN code (148258) to be transmitted via QR code to illustrate the structure of a QR code.

[0212] It's understandable that, since a 6-digit PIN code (148258) needs to be transmitted, the sequence number of each digit in the PIN code can be represented by 0-5. Table 1 below shows the correspondence between the sequence number of different PIN code digits and the corresponding payload data in the PIN code. As shown in Table 1, sequence number 0 corresponds to payload data of 1; sequence number 1 corresponds to payload data of 4; sequence number 2 corresponds to payload data of 8; sequence number 3 corresponds to payload data of 2; sequence number 4 corresponds to payload data of 5; and sequence number 5 corresponds to payload data of 8.

[0213] Table 1

[0214] In other words, the net load data corresponding to multiple information areas and the sequence number corresponding to the net load data include at least 01, 14, 28, 32, 45, and 58.

[0215] In an exemplary embodiment, the payload data corresponding to each information area and the sequence number corresponding to the payload data can be represented by different values ​​corresponding to different information points. Therefore, the data that the information area corresponding to sequence number 0 needs to transmit through 12 information points is 01. Similarly, the data that the information area corresponding to sequence number 1 needs to transmit through 12 information points is 14; the data that the information area corresponding to sequence number 2 needs to transmit through 12 information points is 28; the data that the information area corresponding to sequence number 3 needs to transmit through 12 information points is 32; the data that the information area corresponding to sequence number 4 needs to transmit through 12 information points is 45; and the data that the information area corresponding to sequence number 5 needs to transmit through 12 information points is 58.

[0216] The following section will detail how the 12 information points represent the payload data to be transmitted in the preceding text and the corresponding sequence number of the payload data.

[0217] Table 2 below shows a code table (i.e., a correspondence table) for a 6-digit PIN code. This code table reflects the correspondence between the digit sequence number of the PIN code, the corresponding payload data, and the code elements of 12 information points. Table 2 includes: the digit sequence number of the PIN code, with a value ranging from 0 to 5, since Table 2 is a code table for a 6-digit PIN code; the payload data, with a value ranging from 0 to 9; and the values ​​corresponding to the 12 information points, where the sequence numbers of the 12 information points are 0-11, and the value of each information point is either "0" or "1".

[0218] Table 2

[0219] It is understood that the code table shown in Table 2 is merely an illustrative example and does not constitute a complete limitation on the embodiments of this application. For example, this application does not limit the number of digits of the PIN code corresponding to the code table; the number of digits can be flexibly set according to the actual application scenario. Furthermore, the specific content included in the code table can also be determined according to the number of digits of the PIN code to which the code table is applicable, as long as the code element corresponding to the information point corresponds one-to-one with the sequence number of the PIN code digits and the payload data.

[0220] For example, as shown in Table 2, when the sequence number is 0, the corresponding code elements for the 12 information points are also different depending on the payload data. Furthermore, different sequence numbers correspond to different code elements for the 12 information points. This setup ensures that the code elements for the 12 information points can reflect the digit sequence number of the PIN code and the size of the corresponding payload data.

[0221] In some embodiments, each of the 12 information points in Table 2 contains two values ​​"1". This application embodiment does not limit the number of values ​​"1" in other code tables, as long as it can clearly reflect the sequence number of the PIN code digits and the corresponding payload data, and the correspondence with the code elements of the 12 information points.

[0222] In some embodiments, based on the foregoing description, if the number of information points with a value of "1" in each information area is different, the code table provided in this application embodiment is not limited to Table 2 above. For example, if the number of information points with a value of "1" in a certain information area is 2, the electronic device can decode the code element corresponding to that information area based on Table 2 above; if the number of information points with a value of "1" in a certain information area is 3, the electronic device also needs to decode the code element corresponding to that information area based on another code table. For example, unlike Table 2 above, the code element corresponding to the center sequence number and the payload data in this other code table may have three information points with a value of "1".

[0223] Taking the payload data transmitted through 12 information points and the corresponding sequence number 01 as an example, according to Table 2, the code element (or code data, string data, binary data) of the 12 information points corresponding to the sequence number 0 and the payload data 1 in the PIN code is 011000000000. That is, among the 12 information points, the value corresponding to the information point with sequence number 0 is 0, the value corresponding to the information point with sequence number 1 is 1, and so on. For example, the QR code with the payload data transmitted through 12 information points and the corresponding sequence number 01 can be shown as information area A1 in Figure 6B or Figure 6C above. Thus, when the electronic device scans the QR code, it can determine the code element (e.g., 0110000000000) of the 12 information points based on their states, and further parse the payload data 1 and the corresponding sequence number 0 represented by that information area according to the code table shown in Table 2.

[0224] The method for setting the other 5 digits of the 6-digit PIN code mentioned above is the same and will not be repeated here.

[0225] Furthermore, since the QR code transmits a 6-digit PIN code based on 12 information areas, the remaining six information areas can repeatedly transmit the 6-digit PIN code. For example, the remaining six information areas can transmit 32, 45, 58, 01, 14, and 28 in sequence.

[0226] Based on the states of the information points corresponding to different values ​​shown in Figure 6B, the structure of the complete QR code can be seen in Figure 7A; based on the states of the information points corresponding to different values ​​shown in Figure 6C, the structure of the complete QR code can be seen in Figure 7B. Furthermore, the distribution of the digits of the PIN code corresponding to each information area at this time can be seen in Figure 8.

[0227] The QR code provided in this application uses a discrete dot pattern, meaning it includes multiple positioning points and information points. These points have strict geometric relationships, allowing electronic devices to determine the corresponding PIN code from the information transmitted by each point. Furthermore, the QR code provided in this application contains a smaller number of points; for example, some positioning points can be determined based on other known positioning points, making the QR code more simplified.

[0228] The QR code provided in this application embodiment has an information area N that is greater than the number of digits of the PIN code to be transmitted by the QR code. In other words, the PIN code to be transmitted can be repeatedly presented in the information area of ​​the QR code. Therefore, even if the QR code is not completely located in the scanning area of ​​the electronic device when scanning the QR code provided in this application, the electronic device can still obtain the PIN code to be transmitted by the QR code based on the scanned part of the QR code. This can improve the scanning efficiency of the QR code, thereby improving the acquisition efficiency of the data transmitted by the QR code and the robustness of the scanning.

[0229] Furthermore, the PIN code can be repeatedly represented in different information areas of the QR code. Therefore, if the information area that should represent a certain bit of the payload data of the repeatedly represented PIN code fails to represent the payload data, the electronic device can determine the payload data through other information areas that represent the payload data. This can improve the scanning efficiency of the QR code, thereby improving the acquisition efficiency of the target information transmitted by the QR code and the robustness of scanning.

[0230] Based on the QR code provided in this application as described above, this application also provides a QR code recognition method for recognizing the aforementioned QR code. It is understood that the QR code recognition method provided in this application can be applied to the data cloning scenarios shown in Figures 1B to 1E above, and can also be applied to scenarios such as wristband pairing, account login, and one-click screen projection.

[0231] Before detailing the QR code recognition method provided in the embodiments of this application, the electronic devices to which this method can be applied will be described first. It is understood that the QR code recognition method provided in the embodiments of this application is applicable to any electronic device with QR code scanning functionality or a camera, including but not limited to mobile phones, tablets, computers, wearable devices, augmented reality (AR) devices, and other electronic devices. The embodiments of this application do not limit the type or form of the electronic device.

[0232] Furthermore, in this embodiment, the type of electronic device performing the QR code recognition method can be the same as or different from the type of electronic device displaying the QR code described above. For example, situations where the electronic device performing the QR code recognition method scans a QR code include, but are not limited to: a mobile phone scanning a QR code on another mobile phone screen, a mobile phone scanning a QR code on a tablet computer screen, a mobile phone scanning a QR code on a watch screen, a tablet computer scanning a QR code on a mobile phone screen, a tablet computer scanning a QR code on a watch screen, etc.

[0233] It is understood that in some embodiments, the device for performing the method is a device that includes at least a camera, and the device for displaying the QR code provided in this application is a device that includes at least a display screen.

[0234] The QR code recognition method provided in the embodiments of this application is described in detail below. This method can be executed by an electronic device, as shown in Figure 9. The method may include the following steps:

[0235] 901: Scan the QR code to be recognized.

[0236] The QR code to be recognized includes N information areas, which are further divided into M information area groups. Each information area group includes at least one information area. At least two of the M information area groups display the same content, and both display the target information of the QR code to be recognized. M is less than or equal to N and greater than 1.

[0237] It is understandable that electronic devices can scan QR codes to be recognized in one way: by scanning the QR code with a camera.

[0238] This application does not limit the type or device on which the QR code to be recognized is displayed. For details, please refer to the preceding description of QR codes, which will not be repeated here. Furthermore, in this application, the electronic device scanning the QR code and the electronic device displaying the QR code can be of the same type or different types of electronic devices. For details, please refer to the examples listed above, which will not be repeated here.

[0239] In other embodiments, the QR code to be recognized may also be pre-stored in the electronic device, for example, the QR code may be stored as an image in the electronic device's gallery application. In this case, the electronic device can directly respond to the user's selection operation, determine the QR code to be recognized, and then scan the QR code.

[0240] 902: Determine the target information corresponding to the QR code to be recognized based on N information areas in the QR code to be recognized.

[0241] It is understood that in this embodiment of the application, the information area is the same as the information area.

[0242] In some embodiments, determining the target information corresponding to the QR code to be identified based on N information areas in the QR code to be identified may include the following steps 9021 to 9023.

[0243] 9021: Extract code elements from each information area in the QR code to be identified, and obtain the code element data corresponding to N information areas.

[0244] In some embodiments, the electronic device may first determine each location point in the QR code to be identified, and then determine multiple information areas based on each location point.

[0245] In this system, if there are no missing positioning points in the K positioning structures corresponding to the QR code to be recognized (e.g., the number of outer and inner positioning points is the same as the number of information areas), N information areas are determined based on the K positioning structures. If there are missing positioning points in the K positioning structures corresponding to the QR code to be recognized (e.g., the number of outer and / or inner positioning points is less than the number of information areas), the missing positioning points are filled in, and N information areas are determined based on the filled-in K positioning structures.

[0246] In some embodiments, filling in missing positioning points includes: for some positioning points in the first positioning structure among K positioning structures, filling in the missing positioning points based on other positioning points in the first positioning structure; for all positioning points in the first positioning structure among N positioning structures, filling in the missing positioning points based on adjacent positioning structures of the first positioning structure. The specific method for determining the positioning points can be found in the preceding descriptions of Figures 5A to 5I, and will not be repeated here.

[0247] Based on the preceding description of the QR code structure, the QR code to be recognized in this application includes multiple information areas, and each information area includes multiple information points. Each information point has a corresponding numerical value, and the multiple information points with numerical values ​​can be used to represent payload data (i.e., the first information) and the sequence number corresponding to the payload data. In an exemplary embodiment, the units digit can be the payload data corresponding to each digit in the PIN code, and the tens digit can be the sequence number corresponding to each payload data.

[0248] Based on the structure of the QR code to be recognized, after the electronic device scans the QR code, it can extract the code elements from each information area. For example, the process of extracting code elements from each information area is to obtain the string (or binary data) of multiple information points included in each information area according to the value of the information points in each information area.

[0249] In an exemplary embodiment, the value of each information point can be "0" or "1", and different values ​​correspond to different states of the information point. This embodiment does not limit the states of the information points corresponding to different values.

[0250] For example, when the value of an information point is "0", the state of that information point can be the hollow circle corresponding to the information point in Figure 6B; when the value of an information point is "1", the state of that information point can be different from the hollow circle in Figure 6B, for example, the hollow circle can be changed to a solid circle. In this case, the electronic device can determine the code elements of multiple information points included in a certain information area by: the electronic device arranging the values ​​("0" or "1") corresponding to each number in the order of the information point numbers according to the sequence number of the multiple information points, and the state of each information point (e.g., whether the information point is represented as a hollow circle or a solid circle), thus obtaining the string corresponding to the multiple information points, i.e., the code elements. That is to say, the code elements are composed of multiple sequentially arranged values ​​"0" or "1".

[0251] Understandably, in this scenario, each information point is displayed within the QR code to be recognized, albeit in a different format: each information point represents its corresponding value via a solid or hollow circle. Therefore, since each information point is displayed within the QR code, the electronic device can associate the information point's serial number with each individual information point, thus obtaining the code elements corresponding to multiple information points in the manner described above.

[0252] For example, when the value of an information point is "0", as shown in Figure 6C, the status of that information point may not be displayed in the QR code to be recognized. Conversely, when the value of an information point is "1", it can be displayed as a solid circle in the QR code to be recognized. However, unlike the previous case where every information point is displayed in the QR code to be recognized, in this case, the information point corresponding to the value "0" will not be displayed in the QR code to be recognized. Therefore, when only a few information points are displayed in each information area, the electronic device cannot directly associate the serial number of the information point with each information point.

[0253] At this point, the electronic device can determine the code elements of multiple information points by: the electronic device determining the code elements based on the length of the line connecting the center of the outer and inner circles of the QR code to be identified to the information points displayed in the QR code and / or the angle between the line connecting the center and the positioning point corresponding to the displayed information point. Since information points with different serial numbers are located in different positions within the information area, the position of the information point can be determined by the length of the line connecting the information point to the center and / or the angle mentioned above, thereby determining the serial number of the information point.

[0254] 9022: Decode N code elements to obtain M identical first target information corresponding to N information areas.

[0255] In this embodiment of the application, the electronic device can decode the code elements of each information area by looking up the corresponding code table based on the code elements corresponding to multiple information points. The code table can reflect the sequence number of the PIN code digits and the corresponding payload data, and the correspondence between them and the string composed of multiple information points.

[0256] After the electronic device obtains the payload data corresponding to the information area and the sequence number of the payload data by looking up the corresponding code table based on the code element, it can arrange the payload data corresponding to multiple information areas in a certain order to obtain the first target information.

[0257] In some embodiments, if the number of information areas included in the provided QR code to be identified is greater than the number of digits in the PIN code to be transmitted, there is redundancy in the information areas of the QR code to be identified. In other words, the electronic device can obtain M identical first target information after decoding.

[0258] 9023: Perform a first fusion process on M identical first target information to obtain the fused second target information corresponding to the QR code to be identified.

[0259] The process of fusing M identical first target information to obtain the fused second target information corresponding to the QR code to be identified can be understood as taking any one of the M identical first target information as the second target information.

[0260] It is understood that in some embodiments, if there is no redundancy in the information area of ​​the provided QR code, that is, the information represented by all the information areas of the QR code is a complete target information, then the fusion processing in step 9023 can be skipped, and the N code elements can be directly decoded to obtain the target information corresponding to the QR code.

[0261] Figure 10A shows a schematic diagram of a QR code to be recognized. It can be understood that the PIN code transmitted by the QR code shown in Figure 10A is the same as that in Figure 7B, except that the number of positioning points displayed in Figure 10A differs from that in Figure 7B. Furthermore, to make the structure of the QR code to be recognized in Figure 10A clearer, dashed lines representing an outer and inner circle are added to Figure 10A. These can be used to distinguish between the positioning points and the displayed information points for illustration purposes. However, it should be understood that when the QR code to be recognized is displayed on the screen of an electronic device, the outer and inner circles are not displayed.

[0262] The QR code recognition method provided in this application will be described in detail below using the QR code to be recognized shown in Figure 10A as an example. Referring to Figure 11, the method may include at least the following steps:

[0263] 1101: Scan the QR code to be recognized.

[0264] It is understandable that the principle and content of this step are roughly the same as those of step 901 above, so they will not be repeated here.

[0265] 1102: Determine each positioning point in the QR code to be recognized.

[0266] In this embodiment, the positioning points of the QR code to be identified include outer positioning points and inner positioning points. It is understood that the method for determining the positioning points when the number of outer and / or inner positioning points differs from the number of information areas has been described in the relevant content of Figures 5B and 5C above. The principles of the positioning point determination methods are similar and will not be repeated here.

[0267] The outer and inner positioning points shown in Figure 10A are the same as those shown in Figure 5B above. Therefore, the method for determining the positioning points of the QR code to be recognized shown in Figure 10A can be found in the relevant description in Figure 5B above. Furthermore, the structure of the QR code to be recognized after all positioning points have been completed can be found in Figure 10B.

[0268] 1103: Extract code elements from each information area in the QR code to be identified, which is determined based on each positioning point.

[0269] The following describes in detail how to extract symbols from each information area, using Figure 10B as an example. Information area A1 in Figure 10B includes two information points with a value of "1", namely information point 1 and information point 2. Specifically, the method for extracting symbols from information area A1 includes the following steps.

[0270] S1: Draw lines from the center of the circle corresponding to the QR code to be identified to the two information points respectively, calculate the length of each line or the line segment length of the line connecting the information point to the nearest inner and outer positioning points, and calculate the angle between each line segment and the line connecting the inner and outer positioning points corresponding to information area A1.

[0271] For example, referring to Figure 10C, the line connecting the inner and outer positioning points corresponding to information area A1 can be line 1 or line 2 in Figure 10C; the line connecting information point 1 and the center of the circle can be line 3 in Figure 10C; and the line connecting information point 2 and the center of the circle can be line 4 in Figure 10C.

[0272] In this step, the electronic device can calculate the length of the line connecting the center of the circle and the information point. That is, the electronic device can calculate the lengths of line 3 and line 4 in Figure 10C.

[0273] Furthermore, the electronic device can also calculate the length of the line connecting the information point to the nearest inner and outer positioning points. That is, the electronic device can calculate the length of the line connecting information point 2 and inner positioning point 1' in Figure 10C, as well as the length of the line connecting information point 1 and inner positioning point 2'.

[0274] In addition, the electronic device can also calculate the angles between each line segment and line 1 and / or line 2. That is, the electronic device can calculate the angle between line 4 and line 1 and / or line 2 in Figure 10C; similarly, the electronic device can also calculate the angle between line 3 and line 1 and / or line 2. Furthermore, the electronic device can also calculate the angle between the line connecting information point 2 and inner positioning point 1' and line 1, and the angle between the line connecting information point 1 and inner positioning point 2' and line 2.

[0275] S2: Determine the positions of information point 1 and information point 2 based on the length of each connection and the included angle of the connection, and then obtain the code element corresponding to information area A1.

[0276] For example, the electronic device can determine the position of information point 1 based on the length of connection 3 and the angle between connection 1 and / or connection 2 and connection 3. The electronic device can determine the position of information point 2 based on the length of connection 4 and the angle between connection 1 and / or connection 2 and connection 4.

[0277] For example, based on the length and angle of the connecting lines, and the situation shown in Figure 6A, it can be determined that the sequence number corresponding to information point 1 is 1, and the sequence number corresponding to information point 2 is 2. Since each information area corresponds to a 12-bit string, when the values ​​corresponding to information points 1 and 2 are "1", the code element corresponding to information area 1 is 011000000000.

[0278] Following the principles shown in steps S1 and S2 above, code elements can be extracted from each information area to obtain the corresponding string. It can be understood that the string corresponding to each information area includes two "1"s and ten "0"s.

[0279] 1104: Decode the code elements of each information area based on the code table to obtain the payload data corresponding to each information area and the sequence number corresponding to the payload data.

[0280] The decoding process of the code elements is also a process of inverse mapping based on the code table, which can be found in Table 2 above. Taking the code element 01100000000 corresponding to information area 1 as an example, by looking up Table 2, we can find that the digit number of the PIN code corresponding to this code element is 0, and the payload data is 1. Therefore, the payload data corresponding to information area 1 and the corresponding digit number of the payload data can be represented by 01 (also known as the row number).

[0281] The determination method for the net load data and the corresponding sequence number of the net load data in other information areas is the same, and will not be repeated here. The data corresponding to information areas A1 to A12 are 01, 14, 28, 32, 45, 58, 32, 45, 58, 01, 14, 28 in sequence.

[0282] 1105: The net load data corresponding to the redundant area and the serial number corresponding to the net load data are fused to obtain the PIN code transmitted by the QR code to be identified.

[0283] Referring back to the example described earlier, the data 01, 14, 28, 32, 45, and 58 all appear twice. This indicates that there is information redundancy in the areas corresponding to the digits 0, 1, 2, 3, 4, and 5. After fusing the redundant information areas (i.e., the first fusing process), the data corresponding to the QR code to be recognized is: 01, 14, 28, 32, 45, and 58. The electronic device arranges the units digit (i.e., the payload data) of the above data according to the PIN digit sequence, resulting in 148258. Therefore, the electronic device can determine that the PIN code corresponding to the QR code to be recognized is 148258.

[0284] In this method, the data corresponding to the information area of ​​the QR code to be recognized includes both the payload data in the PIN code and the digit sequence number of the payload data in the PIN code. Thus, when an electronic device scans the QR code, it can determine the corresponding data based on the code elements in the information area, and then sort the payload data corresponding to each information area based on the digit sequence number, thereby obtaining the PIN code transmitted by the QR code. This improves the efficiency of information acquisition and scanning robustness.

[0285] It is understood that, as shown in Figure 11 above, during the process of decoding the code elements of each information area to obtain the PIN code corresponding to the QR code to be identified, the code elements of multiple information points corresponding to each information area can be successfully decoded. In some embodiments, if the code elements of multiple information points corresponding to at least one of the multiple information areas included in the QR code to be identified cannot be successfully decoded, for example, if the number of information points with the value "1" in the code element is different from the number threshold, resulting in erroneous code elements, the electronic device can perform error correction operations on the erroneous code elements.

[0286] The following describes in detail another QR code recognition method provided in this application, using the QR code shown in Figure 12 as an example.

[0287] Referring to Figure 13A, the method may include at least the following steps:

[0288] 1301: Scan the QR code to be recognized.

[0289] 1302: Determine the various positioning points in the QR code to be recognized.

[0290] 1303: Extract code elements from each information area in the QR code to be identified.

[0291] It is understandable that the principle of steps 1301-1303 above is the same as that of steps 1101-1103 in the previous text. For details, please refer to the previous description, which will not be repeated here.

[0292] 1304: Decode the code elements corresponding to each information area to obtain the payload data corresponding to the correct code element, as well as the sequence number and the first erroneous code element.

[0293] As can be understood from the structure shown in Figure 12, in the QR code to be recognized, information areas A1 and A10 represent the same payload data. However, both information areas A1 and A10 have only one information point with a value of "1", and the corresponding code elements (i.e., the first code element) are different, indicating that the code elements in information areas A1 and A10 are incorrect. Information area A3 has only one information point with a value of "1", and information area A12 has no information point with a corresponding value of "1". Information area A5 has one information point with a value of "1". The number of information points with a value of "1" in the above information areas is different from the number threshold (e.g., 2). Therefore, the code elements corresponding to the above information areas are erroneous code elements.

[0294] The number of information points with the value "1" in both information area A2 and information area A11 is 2, and the code elements (i.e. the first code element) of information area A2 and information area A11 are the same. This means that the code elements of information area A2 and information area A11 are correct. The code table can be looked up based on the code elements to obtain the payload data and sequence number represented by information area A2 and information area A11.

[0295] The same applies to information areas A4, A6, A7, A8, and A9, so I won't go into detail about them.

[0296] Therefore, the electronic device can decode the correct code elements corresponding to the above information area to obtain the corresponding payload data and sequence number.

[0297] Thus, based on the code elements corresponding to the above information areas and the code table shown in Table 2 above, we can obtain the data corresponding to information area A2 as 14, information area A4 as 32, information area A6 as 58, information area A7 as 32, information area A8 as 45, information area A9 as 58, and information area A11 as 14.

[0298] The data corresponding to information areas A1 to A12 can be represented as xx, 14, xx, 32, xx, 58, 32, 45, 58, xx, 14, xx. Here, "xx" indicates that the data corresponding to the information area is unknown. However, based on Figure 12, we know that the code element corresponding to information area A1 is 010000000000, the code element corresponding to information area A3 is 000000000010, the code element corresponding to information area A5 is 000000100000, the code element corresponding to information area A10 is 001000000000, and the code element corresponding to information area A12 is 000000000000.

[0299] 1305: Perform a second fusion process on the erroneous first code element to obtain multiple second code elements.

[0300] Secondly, the code element corresponding to information area A1 is 010000000000, and the code element corresponding to information area A10 is 001000000000. Since information areas A1 and A10 represent the same data, and their corresponding PIN codes are both 0 bits, the electronic device can merge the code elements from information areas A1 and A10. The first bit of the code element corresponding to information area A1 is 1, and the rest are 0; the second bit of the code element corresponding to information area A10 is 1, and the rest are 0. Therefore, the second bit of the code element corresponding to information area A1 is set to 1, and the first bit of the code element corresponding to information area A10 is set to 1. Thus, the code elements corresponding to information areas A1 and A10 are both 011000000000 (i.e., the second code element).

[0301] The code element corresponding to information area A3 is 000000000010, and the code element corresponding to information area A12 is 0000000000000. Since information areas A3 and A12 are used to represent the same data, and the corresponding PIN codes are both 2 bits long, the electronic device can fuse the code elements in information areas A3 and A12 to obtain the fused code element 000000000010.

[0302] The code element corresponding to information area A5 is 000000100000, and the code element corresponding to information area A8 is 000000010010. Since information areas A5 and A8 are used to represent the same data, and the corresponding PIN codes are both 4 bits long, the electronic device can merge the code elements in information areas A5 and A8 to obtain the merged code element 000000110010.

[0303] 1306: Correct the code for code whose number of 1 values ​​is not equal to the number threshold among multiple second code elements, and obtain the corrected code element.

[0304] Based on step 1305 above, the number of 1 values ​​in the second code elements corresponding to information areas A1 and A10 is equal to the number threshold (e.g., 2). Therefore, the code elements corresponding to information areas A1 and A10 do not require error correction. Furthermore, the code elements corresponding to information areas A1 and A10 in this case can serve as an example of a third code element.

[0305] The second code element corresponding to information areas A3 and A12 is 000000000010. Since the number of 1s in this code element is less than the threshold, error correction is required. In this case, the code elements corresponding to information areas A3 and A12 can be considered an example of a fourth code element.

[0306] The specific error correction method can be to set the number of 0s that do not meet the quantity threshold to the value 1, resulting in a fifth code element whose number of 1s equals the quantity threshold. Taking 000000000010 as an example, one 0 in 000000000010 can be changed to 1, and it can be checked whether the corrected code element exists in the correspondence table. Specifically, only when the corrected code element is 000000100010 does the code element exist in the correspondence table. Therefore, the fifth code element corresponding to information area A3 and information area A12 is 000000100010.

[0307] Similarly, in the second code element 000000110010 corresponding to information areas A5 and A8, if the number of 1s exceeds the threshold, error correction is required. In this case, the code elements corresponding to information areas A5 and A8 can be considered an example of a fourth code element.

[0308] The specific error correction method can be to set the number of 1s exceeding a certain threshold to 0, resulting in a fifth code element where the number of 1s equals the threshold. Taking 000000110010 as an example, one of the 1s in 000000110010 can be changed to 0, and the existence of the corrected code element in the correspondence table can be checked. Specifically, the code element exists in the correspondence table only when the corrected code element is 000000010010. Therefore, the fifth code element corresponding to information areas A5 and A8 is 000000010010.

[0309] In some embodiments, if the number of information points with a value of "1" in each information area is different, the electronic device can also determine the bit sequence number corresponding to the information area based on the number of information points with a value of "1" in each information area. Alternatively, in other embodiments, the electronic device can also determine which two information areas are used to represent the same payload data based on the number of information points with a value of "1". These methods all help the electronic device to correct symbol errors.

[0310] 1307: Decode the second code element after fusion processing and the corrected code element to obtain the PIN code transmitted by the QR code to be identified.

[0311] It is understandable that decoding the fused code 011000000000 corresponding to information area A1 and information area A10 yields data 01 corresponding to information area A1 and information area A10.

[0312] Decoding the corrected code element 000000000010 corresponding to information area A3 and information area A12 yields the data 28.

[0313] Decoding the corrected code element 000000010010 corresponding to information areas A5 and A8 yields the data 45 corresponding to information areas A5 and A8.

[0314] At this point, the data corresponding to information areas A1 to A12 has been completely determined, and are 01, 14, 28, 32, 45, 58, 32, 45, 58, 01, 14, 28 respectively. These data undergo a first fusion process to obtain 01, 14, 28, 32, 45, 58. Then, the payload data is sorted based on the sequence number, resulting in the PIN code 148258 corresponding to the QR code.

[0315] Based on the above example, Figure 13B illustrates another schematic diagram of a QR code recognition process. As shown in Figure 13B, this process may include the following steps.

[0316] 1310: Draw a line connecting the center of the circle and a certain information point in the information area, calculate the length of the line segment or the length of the line segment connecting the information point to the nearest internal or external positioning point, and the angle between each line segment and line 1 and / or line 2.

[0317] It can be understood that connection 1 and connection 2 in this step can be connection 1 and connection 2 in Figure 10C above, and the information point in this step can be information point 1 or information point 2 in Figure 10C.

[0318] The principle behind this step is roughly the same as that of step S1 mentioned earlier, so it will not be repeated here.

[0319] 1320: Determine the position number of the information point by the included angle and the distance of the line segment.

[0320] Determining the position number of the information point can also be understood as determining which row and column the information point is in Figure 6A.

[0321] 1330: Analyze the position (row and column) of all information points in this information block and output 12 bits (theoretically, there are 2 1s and 1 0 in the 12 bits).

[0322] It can be understood that this information block can refer to information area A1 in Figure 10C. Analyzing the position of all information points in this information block is equivalent to analyzing the position / state of all information points in information area A1 in Figure 10C, and obtaining the 12 bits corresponding to information area A1, that is, the code element is 011000000000.

[0323] 1340: Obtain 12 bits from each information block.

[0324] 1350: Perform a reverse mapping based on Table 2 to obtain 12 rows (due to errors, some rows may be empty).

[0325] The row number can be the net load data mentioned above or the corresponding sequence number of the net load data.

[0326] It is understood that steps 1300-1350 above are based on the same principle as steps 1103-1104 above, so they will not be repeated here.

[0327] 1360: Determine the starting position of the PIN code by cyclically shifting the tens digit of the 12 rows.

[0328] It is understandable that in this step, if information area A1 in Figure 10C is set as the starting position of the QR code, that is, the electronic device obtains each payload data and its corresponding sequence number based on the starting position in a certain order, and then obtains the PIN code. In this case, if the tens digit of the data corresponding to information area A1 is not 0, the electronic device can perform a cyclic shift operation, moving the data with the digit sequence number 0 to information area A1, and the other data maintains the same shift rule. In this way, after cyclically shifting each data, the electronic device directly uses the data corresponding to information area A1 as the starting point and sorts the units digits of the data in each information area in order (such as clockwise order) to obtain the PIN code.

[0329] However, it should be understood that in the QR code structure shown in Figure 10C, the bit sequence number corresponding to information area A1 is 0. That is to say, in this example, there is no need to perform a shift operation. You can directly obtain the row number corresponding to each information area by starting from information area A1 and proceeding clockwise.

[0330] In some examples, this step is optional. Without shifting, the electronic device can directly arrange the units digits based on the order of the tens digits of the 12 rows, such as 012345, to obtain the PIN code.

[0331] 1370: If originating spatial fusion exists, then fusion will be performed.

[0332] Here, "transmitter" refers to the transmitting end, i.e., the electronic device displaying the QR code. If spatial fusion exists at the transmitter, meaning the QR code corresponds to a 6-digit PIN code, but 12 rows are obtained in step 1350, it indicates that there are duplicate or redundant rows among the 12 rows. In this case, the redundant rows can be fused, for example, resulting in 6 rows. The specific principle of this step can be found in step 1105 above, and will not be repeated here.

[0333] 1380: Perform error correction on each 12-bit bit of each error block according to Table 2 and the order after cyclic shift.

[0334] Among them, the error block can refer to the information area mentioned above.

[0335] 1390: Output the units digits listed in order.

[0336] It is understandable that the principle of steps 1370-1390 above is the same as that of steps 1305-1307 above, so it will not be repeated here.

[0337] In this method, since the number of information areas in the QR code to be recognized is greater than the number of digits in the PIN code transmitted by the QR code, each payload data of the PIN code can be repeatedly displayed in the QR code to be recognized. For example, multiple information areas may correspond to the same payload data and the corresponding sequence number. Therefore, when an information area cannot represent the corresponding payload data and the corresponding sequence number, for example, the number of "1" values ​​in the code element of the information area is not equal to the number threshold, the electronic device can also correct the erroneous code element of that information area based on the code elements of other information areas. For example, it can correct the erroneous code element based on the code elements of information areas that transmit the same payload data and the corresponding sequence number. In this way, even when the code elements in the information area are incorrect, the code elements can be corrected to obtain the correct code elements, thereby obtaining the PIN code transmitted by the QR code to be recognized, improving the efficiency of information acquisition and scanning robustness of the QR code.

[0338] In some embodiments, to prevent the user's eye from directly observing the QR code displayed on the electronic device screen, one method utilizes the visual storage characteristic of the human eye, i.e., the human eye's insensitivity to color, to encode the QR code. For example, when red and green are refreshed rapidly, the human eye can perceive yellow. Therefore, in the above method, if the QR code shown in Figure 13C(A) (i.e., QR code 100 in Figure 1 above) is set to be displayed alternately in green and red on the screen, for example, the first frame displays a green QR code, and the second frame displays a red QR code, and these two frames are displayed on the screen at a rate of 60 frames per second. Due to the excessively fast alternation speed of the two frames, and based on the visual storage characteristic of the human eye, when the user's eye observes the above QR code, the colors of each frame are interleaved, and the human eye cannot observe the specific structure of the red or green QR code. Instead, it can observe a yellow blank area, as shown in Figure 13C(B). That is, when the human eye observes, the area corresponding to the original red and green QR code turns yellow, and there is no specific structure of the QR code observed in this area.

[0339] However, in the above method, although the human eye cannot observe the QR code displayed in different colors on the screen at a rate of 60 frames per second, when another electronic device (or scanning device) scans the QR code, the scanning device captures the QR code at a rate of 60 frames per second and can display the captured red and green QR code on the scanning device's screen at a rate of 30 frames per second. For the human eye, the visual persistence at a rate of 30 frames per second is not strong. In other words, if the human eye observes the red and green QR code displayed alternately at a rate of 30 frames per second, it can still clearly observe the red and green QR code and its specific structure, rather than observing the yellow blank area as mentioned earlier.

[0340] In other words, the above-mentioned method of preventing the human eye from observing the QR code only achieves the desired effect when the human eye directly observes the display screen showing the QR code. When the human eye observes the QR code displayed on the screen of the scanning device, the specific structure of the QR code can still be observed, which reduces the user experience.

[0341] Based on the aforementioned technical issues, this application, building upon the provided QR code structure, integrates other underlying animations when displaying the QR code on an electronic device's screen. In other words, when the QR code is displayed on the electronic device's screen, the user cannot directly observe the structure of the QR code, such as that shown in Figure 7B above. Instead, it is based on other animations, such as animations with colors similar to the target points (including information points and positioning points) included in the QR code (e.g., composed of multiple reference points), combined with the QR code to form a merged QR code. Thus, the QR code on the electronic device's screen that the user can observe satisfies the following: its color is similar to the underlying animation, and its shape is also similar to the underlying animation, making the QR code's structure invisible to the human eye and improving the QR code's display effect.

[0342] Figure 14A shows a schematic diagram of the integrated QR code displayed on this electronic device, which can be observed by the user. The application scenarios of the integrated QR code shown in Figure 14A are described below.

[0343] Similar to the scenarios shown in Figures 1B to 1E above, the QR code shown in Figure 14A can also be applied to data cloning scenarios. Taking a scenario where both the new and old devices are mobile phones, Figure 14B shows a schematic diagram of the interface after the new device 400 is powered on for the first time. For example, in response to a user's power-on operation on the new device 400, such as a long press of the power button, the new device 400 powers on and displays the interface 1400 shown in Figure 14B(A). Interface 1400 displays a language selection area 1401, which offers multiple languages ​​for the user to choose from, such as Chinese, English, and Japanese. The user selects the control corresponding to the language (e.g., selecting "Simplified Chinese") and then clicks the "Start Using" control 1402. The interface of the new device 400 then jumps to interface 1410 shown in (B). Interface 1410 displays a region selection area 1403, which includes multiple regions for the user to select, such as region A01, region B01, and region C01. The user selects the corresponding region (e.g., "Region A01"), and then clicks the "Continue" control 1404. The interface of the new device 400 will then jump to interface 1420 shown in (C). Interface 1420 displays a "Waiting for connection" message and a fusion QR code 1405.

[0344] Furthermore, in response to the selection of the "Continue" control 1404, the new device 400 broadcasts a request to find an older device 410 that can connect to it to complete subsequent tasks such as data cloning. For example, an older device 410 within a certain range of the new device 400, and using the same communication protocol as the new device 400, can receive the broadcast sent by the new device 400. As shown in Figure 14C(A), after receiving the broadcast, the older device 410 can display an interface 1430, which displays a "Connect to New Device" prompt and a "Login and Connect" control 1406. In response to the selection of the "Login and Connect" control 1406, the interface of the older device 410 jumps to interface 1440 shown in Figure 14C(B). Interface 1440 displays a scanning area 1407 and prompts such as "Scan to Connect" and "Aim the scanning frame at the pattern on the new device."

[0345] After scanning the merged QR code 1405 displayed on the screen of the new device 400 using the scanning area 1407 of the old device 410, the user can obtain the WIFI SSID and password information carried in the merged QR code 1405 to establish a connection with the new device 400. A schematic diagram of the successful connection interface 1450 of the new device 400 can be seen in Figure 14D(A), and the interface 1450 displays prompts such as "Quickly turn on the new device" and "Authentication successful".

[0346] After the old device 410 and the new device 400 successfully establish a connection, the old device 410 can migrate relevant data to the new device 400, that is, perform data cloning. As shown in Figure 14D(B), the display interface 1460 of the new device 400 displays prompts such as "Quickly start the new device" and "Migrating system data".

[0347] Based on the application scenarios mentioned above, after an electronic device scans the fused QR code shown in Figure 14A, it also needs to extract the target QR code, for example, as shown in Figure 7B, from the fused QR code, and extract the positioning points in the target QR code. This process may include the following steps.

[0348] 1501: The electronic device continuously captures images of the electronic device displaying the integrated QR code, resulting in multiple captured frames.

[0349] This application does not limit the types of the electronic device that takes the photo and the electronic device that displays the fused QR code. The two types can be the same or different. For details, please refer to the relevant description above. It will not be repeated here.

[0350] An electronic device (or scanning device) can continuously capture images, resulting in multiple captured frames. The time interval between these frames can be set empirically or adjusted flexibly according to the actual application scenario; no restrictions are imposed here. Furthermore, any one of the captured frames can be seen in Figure 15(A), where (A) includes the display interface of the electronic device displaying the fused QR code. In addition to the fused QR code 1510, the display interface also includes the prompt message "Aim the viewfinder of your other device at this image."

[0351] In this embodiment, the fused QR code has a corresponding dynamic effect, which can be based on the underlying animation color and the color of the target point of the QR code. Taking the underlying animation based on the colors of multiple reference points as an example, the colors of the reference points can be fixed, while the color of the target point of the fused QR code can be changed, for example, the color of the target point is different in two consecutive shooting frames.

[0352] Thus, in multiple captured frames of the fused QR code continuously acquired by the electronic device, the reference point has the same color in each frame, while the target point has a different color. For example, a target point may display a first color (e.g., gray) at the first moment, a second color (e.g., blue) at the second moment, and a third color (e.g., yellow) at the third moment, etc. This application does not limit the selection of the first, second, and third colors. It should be understood that the target point can display more different colors at more different moments, not limited to the three colors corresponding to the above three moments. Furthermore, the colors of different target points among multiple target points can be different at the same moment, such as one target point changing colors according to gray, blue, and yellow at different moments, while another target point changes colors according to blue, gray, and yellow, etc.

[0353] 1502: Take screenshots of the areas corresponding to the fused QR codes included in multiple shooting frames to obtain multiple fused QR code areas.

[0354] It is understood that each fused QR code area can include a fused QR code. A schematic diagram of any fused QR code area (or circular area) obtained from the screenshot can be seen in Figure 15(B), and (B) includes fused QR code 1510.

[0355] 1503: The electronic device performs differential processing on multiple fused QR code regions to obtain multiple differential QR code regions.

[0356] It can be understood that the schematic diagram of the differential QR code area can be seen in (C) of Figure 15, and the differential QR code area (or differential result) includes the differential QR code obtained by differentiating the fused QR code, which is composed of the white dots in (C).

[0357] For example, differential processing of multiple fused QR code regions can be achieved by subtracting the pixel values ​​of the same points in different fused QR code regions. Based on the above, it is known that the color of the target point of the fused QR code is different in different fused QR code regions. Therefore, differential processing can filter out the target point of the fused QR code, thus obtaining the differential QR code region, which includes the structure diagram of the differential QR code.

[0358] 1504: The electronic device performs binarization processing on multiple differential QR code regions to obtain multiple differential binary images.

[0359] A schematic diagram of any one of the multiple difference binary graphs can be seen in Figure 15 (D), and this difference binary graph includes the target QR code, which is composed of the white dots in (D). Based on (C) and (D), it can be seen that the target QR code in (D) is displayed more clearly, which facilitates the subsequent electronic device to parse the target QR code and obtain the corresponding PIN and other steps.

[0360] 1505: The electronic device extracts the positioning points from the target QR code.

[0361] The schematic diagram of the extracted positioning points can be seen in Figure 15(E), where the circled points are the positioning points identified by the electronic device. Furthermore, the methods by which the electronic device extracts / identifies positioning points can be found in the relevant descriptions in Figures 5A to 5C, and will not be repeated here.

[0362] It is understood that this application embodiment does not restrict the colors of the positioning points and information points included in the target QR code, as long as the electronic device can obtain the PIN code corresponding to the target QR code based on the positional relationship of the positioning points and information points.

[0363] In this method, the QR code is integrated with the underlying animation displayed on the electronic device, and the display color of the target point in the QR code is similar to the color of the underlying animation, making it impossible for users to observe the specific structure of the QR code on the display screen, thus improving the visual effect of the QR code. In addition, the area of ​​the information area of ​​the QR code (i.e., the area of ​​the annular region) is relatively small compared to the total area occupied by the QR code, reducing the graphic complexity of the QR code and making it easier for electronic devices to identify the PIN code corresponding to the QR code, further improving the user experience.

[0364] It's understandable that in daily life, electronic devices such as billboards, computer screens, and television screens send out a large amount of advertising information that is meaningless to most users, affecting their user experience. Therefore, in some existing visible light communication systems, implicit information, imperceptible to the human eye, is embedded in images or videos displayed on LED or LCD screens, such as electronic billboards, television screens, or computer screens. This implicit information can be captured by a digital camera and recovered through decoding algorithms. This method can solve the aforementioned problem.

[0365] Taking shopping scenarios as an example, implicit information can typically be used to provide users with in-depth information about products displayed on electronic device screens, or even directly push purchase links for those products. Using an implicit information service system to replace visible advertising and product promotion can reduce advertising intrusion on users while ensuring the effectiveness of product promotion. Specifically, if a user is interested in a displayed product, they can obtain implicit information embedded in the product image by taking a photo with their mobile phone. In this application, implicit information can refer to the implicit information contained in a QR code, such as a PIN code contained within the QR code.

[0366] Therefore, taking the QR codes shown in Figures 7A, 7B, or 14A as examples, which contain implicit information such as product details, the QR codes provided in this application can be displayed on electronic devices such as televisions. Users can use electronic devices to photograph the QR code corresponding to a product on the television, and then decode the photographed QR code to obtain implicit information such as product details and purchase links. This can improve the user experience.

[0367] In some embodiments, there may be multiple versions of the QR code, and different versions of the QR code correspond to different code tables. When generating a QR code, the version number of the QR code can be determined based on the amount of data to be transmitted, and the corresponding QR code can be generated based on the code table corresponding to the version number of the QR code.

[0368] In some embodiments, the number of information points displayed in each information area differs across QR code versions, and the target information conveyed (transmitted) differs between versions. The target information of the QR code can be any combination of numbers, letters, and characters, with a preset length (e.g., 6 digits). For example, for version V1.0, the target information can be a 6-digit PIN code; for version V2.0, it can be 6 digits containing both numbers and letters; and for version V3.0, it can be 6 digits containing numbers, letters, and symbols. This application does not limit the format of the target information corresponding to different versions.

[0369] Table 3 illustrates a mapping table of the number of information points (or highlights) in display status, the total number of highlights, and the total data volume for each information area (or partition) corresponding to different version numbers, with 12 display areas, 24 positioning points, and 20 information point positions (serial numbers) in each information area (or partition).

[0370] Table 3:

[0371] As shown in Table 3 and Figure 16(a), taking a display area of ​​12 and a positioning point of 24 as an example, for version V1.0, each display area has 2 bright spots, the total number of bright spots (i.e., the sum of the total number of bright spots in all information areas and the total number of positioning points) is 48, and the total amount of data transmitted is 90 bits. For version V2.0, as shown in Table 3 and Figure 16(b), each display area has 3 bright spots, the total number of bright spots is 60, and the total amount of data transmitted is 121 bits. For version V3.0, as shown in Table 3 and Figure 16(c), each display area has 4 bright spots, the total number of bright spots is 72, and the total amount of data transmitted is 146 bits. For version V4.0, as shown in Table 3 and Figure 16(d), each display area has 5 bright spots, the total number of bright spots is 84, and the total amount of data transmitted is 167 bits.

[0372] It is understandable that the formula for calculating the amount of data transmitted by each version of the QR code is as follows:

[0373] Where D1 is the amount of data transmitted by each version of the QR code, n is the number of information points in each information area (e.g., 20, 12, etc.), and n1 is the number of highlights in each information area.

[0374] In some embodiments, the code tables corresponding to different versions of QR codes can refer to Table 2 above. Based on the payload data value range of 0-9, corresponding letters or symbols are added, and the data (i.e., binary data 0 or 1) corresponding to different sequence numbers of information points are set. For example, for the code table corresponding to version V1.0, the payload data value can be 0-9, with 20 sequence numbers, and the data corresponding to the 20 sequence numbers can contain two 1s. For the code table corresponding to version V2.0, the payload data value can be 0-9 plus English letters (e.g., the 26 letters a, b, a), with 20 sequence numbers, and the data corresponding to the 20 sequence numbers can contain three 1s. For the code table corresponding to version V3.0, the payload data value can be 0-9 plus English letters (e.g., the 26 letters a, b, a, a), and symbols (e.g., *, #, etc.), with 20 sequence numbers, and the data corresponding to the 20 sequence numbers can contain four 1s, etc.

[0375] It is understood that the above-described code table setting method is merely an illustrative example. The code table can be set arbitrarily according to actual needs, and this application embodiment does not impose any limitations.

[0376] Figure 17 illustrates a flowchart of a QR code generation process. As shown in Figure 17, the QR code generation method can be executed by an electronic device, and the method may include:

[0377] 1701: Determine the version number of the QR code to be generated based on the amount of data to be transmitted.

[0378] It is understood that in some embodiments, the electronic device can acquire the data to be transmitted, i.e., the target information, and then determine the version number corresponding to the QR code based on the amount of data corresponding to the target information and a QR code version number mapping table (e.g., the mapping table shown in Table 3). For example, if the target information is the aforementioned "148258" and the amount of data to be transmitted is 90 bits, then the version number can be determined to be V1.0. For example, if the target information is the aforementioned "14825a" and the amount of data to be transmitted is 121 bits, then the version number can be determined to be V2.0, and so on.

[0379] 1702: Encode the target information to be transmitted based on the encoding rules (code table) corresponding to the version number.

[0380] In some embodiments, after determining the version number corresponding to the QR code, the electronic device can obtain the code table (or symbol mapping table, mapping table, encoding mapping table, encoding rules, etc.) corresponding to the version number, and encode the target information to be transmitted based on the code table corresponding to the version number, that is, obtain the symbol (or symbol data, binary data, etc.) of each information area.

[0381] For example, if the target information to be transmitted is "148258" and the version number of the QR code to be generated is V1.0, and if the code table corresponding to version number 1.0 is Table 2, then taking the payload data to be transmitted in one of the information areas as 1 in the target information and the corresponding sequence number of this payload data in the target information as 0 as an example, according to Table 2, the code element of the 12 information points corresponding to the sequence number 0 and the payload data in the PIN code being 1 is 011000000000. The setting method for the other 5 bits of data is the same, and will not be repeated here.

[0382] Furthermore, since the QR code transmits a 6-digit PIN code across 12 information areas, the remaining six information areas can repeatedly transmit the 6-digit PIN code and its corresponding serial number. For example, the remaining six information areas can transmit 32, 45, 58, 01, 14, 28, etc., in sequence.

[0383] 1703: Generate a QR code based on the obtained encoded information.

[0384] In some embodiments, after obtaining the encoded information, such as the code elements corresponding to each information area, the information points in each information area of ​​the QR code can be set based on the code elements corresponding to each information area to generate a new QR code.

[0385] The information points in each information area can be set based on their position number and the corresponding code element. For example, if the code element is 1, the information point is displayed; if the code element is 0, the corresponding information point is not displayed. Specific methods for setting information points can be found in Figures 6A and 6C above, and will not be repeated here.

[0386] It is understood that the embodiments of this application can increase the amount of data transmitted by setting multiple versions of QR codes. Furthermore, it allows for the selection of different QR code versions based on actual needs, increasing the diversity of choices.

[0387] In some embodiments, when there are multiple versions of the QR code, the electronic device that scans the QR code can first determine the version number corresponding to the QR code based on the number of bright spots in the QR code, obtain the mapping table corresponding to the version number, and decode the QR code based on the mapping table corresponding to the version number.

[0388] The QR code recognition method provided in the embodiments of this application will be described in detail below. This method can be executed by an electronic device. Figure 18 illustrates a flowchart of a QR code recognition method. As shown in Figure 18, the method may include the following steps:

[0389] 1801: Scan the QR code to be recognized.

[0390] The QR code to be identified includes N information areas, which in turn include M information area groups. Each information area group includes at least one information area, and at least two of the M information area groups have the same information content, both of which are used to represent the target information corresponding to the QR code. M is less than or equal to N and greater than 1. The information content may include multiple information points.

[0391] It is understandable that electronic devices can scan QR codes to be recognized in one way: by scanning the QR code with a camera.

[0392] This application does not limit the type or device on which the QR code to be recognized is displayed. For details, please refer to the preceding description of QR codes, which will not be repeated here. Furthermore, in this application, the electronic device scanning the QR code and the electronic device displaying the generated QR code can be of the same type or different types. For details, please refer to the examples listed above, which will not be repeated here.

[0393] In some embodiments, the QR code to be recognized can be extracted from a video played on the screen of an electronic device or a photo displayed thereon, or it can be pre-stored in the electronic device. For example, the QR code to be recognized can be stored as an image in the image library application of the electronic device. In this case, the electronic device can directly respond to the user's selection operation, determine the QR code to be recognized, and then scan the QR code.

[0394] 1802: Obtain the version number corresponding to the QR code to be recognized.

[0395] It is understood that, in some embodiments, obtaining the version number corresponding to the QR code to be recognized may include: obtaining the number of target information points in the N information areas of the QR code to be recognized that are in the display state; and determining the version number corresponding to the QR code to be recognized based on the number of target information points in the N information areas that are in the display state.

[0396] In some embodiments, the method for determining the version number of the QR code to be recognized based on the number of target information points in the N information areas that are in the display state can be as follows:

[0397] When the number of target information points in the display state in each of the N information areas is the same, for example, the first number, the version number corresponding to the QR code to be recognized is determined based on the first number. For example, if the number of target information points in the display state in each information area is 2, or the total number of target information points in all information areas is 48, then the version number can be determined as V1.0 based on the QR code version number mapping table shown in Table 3. If the number of target information points in the display state in each information area is 3, or the total number of target information points in all information areas is 60, then the version number can be determined as V2.0 based on the QR code version number mapping table shown in Table 3.

[0398] When the number of target information points in the display state differs among N information areas, and the number of information areas with a target information point count equal to a second-highest number is greater than the number of information areas with a target information point count other than the second-highest number, then the version number corresponding to the QR code to be recognized is determined based on the second-highest number. For example, in the 13 information areas corresponding to the QR code to be recognized, 10 information areas have 2 bright spots each, and 2 information areas have 3 bright spots each. Then the output version number is the version number corresponding to the information area with 2 bright spots, for example, version number V1.0.

[0399] In some embodiments, obtaining the number of target information points in the N information areas of the QR code to be recognized that are in a display state may include: obtaining the number of information points in the N information areas of the QR code to be recognized that are in a display state; obtaining the number of noise points in the N information areas of the QR code to be recognized that are in a display state; and determining the number of target information points in the N information areas based on the number of information points and the number of noise points. For example, the number of target information points in the N information areas can be obtained by subtracting the number of noise points from the number of information points in the N information areas.

[0400] The process of obtaining the number of noise points in the N information areas of the QR code to be recognized can include: obtaining the positioning structure in the QR code to be recognized; performing an affine transformation on a standard QR code template based on the extracted positioning structure to obtain a processed QR code template; aligning the processed QR code template with the QR code to be recognized, identifying the unaligned information points in the N information areas as noise points, and obtaining the number of noise points.

[0401] For example, as shown in Figure 19, an unaligned information point (noise) can be a point B11 that is not in the standard position of the information point in information area B1 shown in Figure 19. Other unaligned information points in information areas can refer to information area B1, which will not be elaborated here.

[0402] In this embodiment of the application, when counting the number of bright spots in the information area, noise in the information area can be removed to improve the accuracy of QR code recognition.

[0403] In some embodiments, the version number can also be determined based on the total number of highlights in the QR code to be recognized, which is the sum of the number of information points in all information areas and the total number of positioning points. For example, if the total number of highlights in the QR code to be recognized is 48, then the version number can be determined to be V1.0 based on Table 1.

[0404] In some embodiments, when the total number of highlights corresponding to the QR code to be recognized (i.e., the sum of the total number of target information points in the N information areas that are in the display state and the total number of positioning points in the QR code to be recognized) is inconsistent with the total number of highlights corresponding to each version number, the version number with the smallest difference between the total number of highlights corresponding to each version number of the QR code and the total number of highlights corresponding to the QR code to be recognized, i.e., the version number with the closest total number of highlights, is taken as the version number corresponding to the QR code to be recognized.

[0405] It is understandable that in some embodiments, during the QR code extraction process shown in Figure 15, there may be noise or some missing positioning points or information points in the QR code. Therefore, the total number of highlights in the QR code to be recognized may not be strictly consistent with the total number of highlights corresponding to each version number. For example, there may be two highlights in some information areas and three highlights in others. In this case, the version number can be determined by the nearest neighbor method of the total number of highlights. For example, if the total number of highlights of the QR code to be recognized is 47, which is closest to the total number of highlights corresponding to version number V1.0, then version number V1.0 is used as the version number corresponding to the QR code to be recognized. This can avoid the situation where the QR code is damaged and cannot be decoded, thus improving the user experience.

[0406] 1803: Determine the target information corresponding to the QR code to be recognized based on the version number corresponding to the QR code to be recognized and the N information areas in the QR code to be recognized.

[0407] In some embodiments, the target information corresponding to the QR code to be recognized is determined based on the version number corresponding to the QR code to be recognized and the N information areas in the QR code to be recognized, including:

[0408] The target code table corresponding to the QR code to be recognized is determined based on the version number of the QR code to be recognized. The target code table is used to reflect the mapping relationship between the code data (or binary data) and the first information and the sequence number corresponding to the first information. It can be understood that each version number corresponds to a code table. Therefore, after determining the version number of the QR code to be recognized, the code table corresponding to the QR code to be recognized, i.e., the target code table, can be determined.

[0409] Then, code elements are extracted from the N information regions to obtain the code element data corresponding to the N information regions; based on the code element data corresponding to the N information regions, the target code table is searched to determine the first information and the sequence number corresponding to the code element data corresponding to the N information regions in the target code table.

[0410] Based on the code data corresponding to N information areas and the sequence number corresponding to the multiple first information, M identical first target information corresponding to the N information areas are determined; the M identical first target information are subjected to a first fusion process to obtain the fused second target information corresponding to the QR code to be identified.

[0411] It should be noted that, in this embodiment of the application, after determining the code table corresponding to the QR code to be identified, the subsequent decoding scheme, i.e. the scheme for obtaining the target information corresponding to the QR code, can be referred to in step 902, and will not be repeated here.

[0412] In the QR code recognition method provided in this application embodiment, when there are multiple versions of the QR code, the electronic device scanning the QR code can first determine the version number corresponding to the QR code based on the number of bright spots in the QR code, and obtain the code table corresponding to the version number. The QR code is then decoded based on the code table corresponding to the version number, achieving correct QR code recognition. Furthermore, the version number can be determined using the nearest neighbor method based on the total number of bright spots, thus avoiding situations where the QR code is damaged and cannot be decoded, improving the user experience. Additionally, when counting the number of bright spots in the information area, noise in the information area can be removed, improving the accuracy of QR code recognition.

[0413] Figure 20 illustrates a flowchart of a QR code recognition method. In this method, the version number of the QR code to be recognized can be determined based on the total number of bright spots. The method can be executed on an electronic device and may include:

[0414] 2001: Extract the QR code to be recognized from the video stream or photos played on the screen.

[0415] It is understood that electronic devices can scan QR codes from video streams played on the screens of other electronic devices (such as screens used for advertising, mobile phone screens, etc.) or displayed photos using cameras, and extract the QR code to be recognized based on the steps shown in Figure 15 above.

[0416] In some embodiments, the QR code to be recognized may also be pre-stored in the electronic device. For example, the QR code to be recognized may be stored as an image in the image library application of the electronic device. In this case, the electronic device can directly respond to the user's selection operation, determine the QR code to be recognized, scan the QR code to be recognized, and extract the QR code to be recognized based on the steps shown in Figure 15 above.

[0417] It is understood that in some embodiments, the QR code to be identified extracted by the electronic device may be partially damaged, such as having noise or missing positioning points.

[0418] 2002: Get the total number of highlights in the QR code to be recognized.

[0419] It is understood that, in this embodiment of the application, the total number of highlights corresponding to the QR code to be recognized can be the sum of the total number of information points in the N information areas of the QR code to be recognized that are in the display state and the total number of positioning points in the QR code to be recognized.

[0420] 2003: Output the version number corresponding to the QR code to be recognized based on the total number of highlights in the QR code to be recognized.

[0421] In some embodiments, the version number of the QR code to be recognized can be determined based on the total number of highlights in the QR code and a QR code version number mapping table. For example, if the total number of highlights in the QR code to be recognized is the same as the total number of highlights corresponding to a certain version number, then that version number can be used as the version number of the QR code to be recognized. For example, if the total number of highlights in the QR code to be recognized is 48, then the version number can be determined to be V1.0 based on Table 3.

[0422] In some embodiments, when the total number of highlights corresponding to the QR code to be recognized is inconsistent with the total number of highlights corresponding to each version number in the QR code version number mapping table, the version number that is closest to the total number of highlights corresponding to each version number of the QR code to be recognized is taken as the version number corresponding to the QR code to be recognized.

[0423] It is understandable that in some embodiments, during the QR code extraction process shown in Figure 15, there may be noise or some positioning points or information points lost in the QR code. Therefore, the total number of highlights in the QR code to be recognized will not be strictly consistent with the total number of highlights corresponding to each version number. For example, there may be 2 highlights in some information areas and 3 highlights in other information areas. In this case, the version number can be determined by the nearest neighbor method of the total number of highlights. For example, if the total number of highlights of the QR code to be recognized is 47, which is closest to the total number of highlights corresponding to version number V1.0, then version number V1.0 is taken as the version number corresponding to the QR code to be recognized.

[0424] 2004: Determine the target information corresponding to the QR code to be recognized based on the version number corresponding to the QR code to be recognized and the N information areas in the QR code to be recognized.

[0425] It is understandable that after determining the version number corresponding to the QR code, the code table corresponding to that version number can be obtained, and the target information corresponding to the QR code to be recognized can be determined based on the code table corresponding to that version number and the N information areas in the QR code to be recognized.

[0426] It is understandable that in step 2004, determining the target information corresponding to the QR code to be recognized based on the code table and the N information areas in the QR code to be recognized can refer to step 903, and will not be repeated here.

[0427] In the QR code recognition method provided in this application embodiment, when there are multiple versions of the QR code, the electronic device that scans the QR code can first determine the version number corresponding to the QR code based on the total number of bright spots in the information area of ​​the QR code, and obtain the mapping table corresponding to the version number. The QR code is then decoded based on the code table corresponding to the version number to achieve correct QR code recognition. Furthermore, the version number can be determined using the nearest neighbor method based on the total number of bright spots, thus avoiding the inability to decode damaged QR codes and improving the user experience.

[0428] Figure 21 illustrates a flowchart of a QR code recognition method. In this method, the version number of the QR code to be recognized can be determined based on the number of bright spots in each information area of ​​the QR code. The method can be executed on an electronic device and may include:

[0429] 2101: Extract the QR code to be recognized from the video stream or photo played on the screen.

[0430] It is understandable that step 2101 can refer to step 2001, and will not be repeated here.

[0431] 2102: Complete all missing positioning points in the QR code to be recognized.

[0432] In some embodiments, if the number of positioning points in the QR code to be recognized is not twice the number of information areas, then all missing positioning points in the QR code to be recognized can be supplemented based on the method shown in Figures 5C-5H above. The method of supplementing positioning points will not be described in detail here.

[0433] 2103: Based on the positioning points, locate the information area of ​​the QR code to be identified and count the number of information points in each information area.

[0434] In some embodiments, after the positioning points in the QR code to be identified are completed, the information area can be located based on the positioning points (i.e., the positioning points on the inner and outer circles), and the number of information points in each information area can be counted.

[0435] 2104: The version number is determined based on the number of information points in each information area.

[0436] For example, when the number of information points in the display state in each of the N information areas is the same, such as the first number, the version number corresponding to the QR code to be recognized is determined based on the first number. For example, if the number of information points in the display state in each information area is 2, the version number can be determined as V1.0 based on the QR code version number mapping table shown in Table 3. If the number of information points in the display state in each information area is 3, the version number can be determined as V2.0 based on the QR code version number mapping table shown in Table 3.

[0437] It's understandable that QR codes may contain noise or some missing points. Therefore, when the number of displayed information points in the N information areas is not the same, if the number of information areas with a second-highest number of information points is greater than the number of information areas with any number of information points other than the second-highest number, then the version number corresponding to the QR code to be recognized is determined based on the second-highest number. For example, in 13 information areas, 10 information areas have 2 bright spots each, and 2 information areas have 3 bright spots each. Then the output version number is the version number corresponding to the 2 bright spots, for example, version number V1.0. That is, the version number with the highest probability is selected.

[0438] 2105: Determine the target information corresponding to the QR code to be recognized based on the version number corresponding to the QR code to be recognized and the N information areas in the QR code to be recognized.

[0439] It is understandable that step 2105 can be referred to step 2004, and will not be repeated here.

[0440] In the QR code recognition method provided in this application embodiment, when there are multiple versions of the QR code, the electronic device that scans the QR code can first determine the version number corresponding to the QR code based on the number of bright spots in each information area of ​​the QR code, and obtain the code table corresponding to the version number. The QR code is then decoded based on the code table corresponding to the version number to achieve correct QR code recognition. Furthermore, when the number of bright spots in each information area is different, the version number with the highest probability can be selected to improve the accuracy of QR code recognition.

[0441] Figure 22 illustrates a flowchart of a QR code recognition method. In this method, the version number of the QR code to be recognized can be determined based on the number of bright spots after removing noise from each information area of ​​the QR code. The method can be executed on an electronic device and may include:

[0442] 2201: Extract the QR code to be recognized from the video stream or photo playing on the screen.

[0443] It is understandable that step 2201 can refer to step 2101, and will not be repeated here.

[0444] 2202: Complete all missing location points in the QR code to be recognized.

[0445] It is understandable that step 2202 can be referred to step 2102, and will not be repeated here.

[0446] 2203: Based on the extracted positioning points in the QR code to be recognized and the standard QR code template (mask), perform affine or perspective transformation processing on the QR code to be recognized to obtain the processed (distorted) QR code template (mask).

[0447] It is understandable that a standard QR code template can be an undamaged and distortion-free QR code pattern, as shown in Figure 7B.

[0448] In some embodiments, since the shooting direction of the QR code to be recognized can be upward, downward, or oblique, the QR code to be recognized may not be able to be aligned with the standard QR code. Therefore, an affine or perspective transformation can be performed on the standard QR code template based on the positioning points extracted from the QR code to be recognized to obtain a processed (distorted) QR code template (mask). The processed (distorted) QR code template (mask) is made to have the same distortion direction as the QR code to be recognized, so that the processed (distorted) QR code template (mask) and the QR code to be recognized can be aligned.

[0449] In some embodiments, an affine or perspective transformation can be performed on the QR code to be identified based on the positioning point and the standard QR code template to obtain a QR code to be identified without distortion. The QR code to be identified without distortion and the standard QR code template are then aligned to identify noise in the information area, thereby obtaining the number of target information points in each information area.

[0450] 2204: Obtain the number of target information points in each information area based on the processed (distorted) QR code template (mask).

[0451] In some embodiments, after aligning the QR code template mask after affine or perspective transformation (distortion) with the QR code to be recognized, noise can be filtered out. That is, the number of noise can be subtracted from the number of information points in N information areas to obtain the number of target information points (highlight count) in N information areas.

[0452] 2205: Output version number based on the number of target information points in each information area.

[0453] When the number of target information points in the display state in each of the N information areas is the same, for example, the first number, the version number corresponding to the QR code to be recognized is determined based on the first number. For example, if the number of target information points in the display state in each information area is 2, or the total number of target information points in all information areas is 48, then the version number can be determined as V1.0 based on the QR code version number mapping table shown in Table 3. If the number of target information points in the display state in each information area is 3, or the total number of target information points in all information areas is 60, then the version number can be determined as V2.0 based on the QR code version number mapping table shown in Table 3.

[0454] When the number of target information points in the displayed state differs among N information areas, and the number of information areas with a target information point count equal to a second set of values ​​is greater than the number of information areas with a target information point count equal to any number other than the second set of values, then the version number corresponding to the QR code to be recognized is determined based on the second set of values. For example, in the 13 information areas corresponding to the QR code to be recognized, 10 information areas have 2 highlights each, and 2 information areas have 3 highlights each. The output version number is the version number corresponding to the information area with 2 highlights, for example, version number V1.0.

[0455] 2206: Determine the target information corresponding to the QR code to be recognized based on the version number corresponding to the QR code to be recognized and the N information areas in the QR code to be recognized.

[0456] It is understandable that step 2206 can be referred to step 2004, and will not be repeated here.

[0457] In the QR code recognition method provided in this application embodiment, when there are multiple versions of the QR code, the electronic device that scans the QR code can first determine the version number corresponding to the QR code based on the number of bright spots in the information area of ​​the QR code, and obtain the mapping table corresponding to the version number. The QR code is then decoded based on the mapping table corresponding to the version number to achieve correct QR code recognition. Furthermore, when counting the number of bright spots in the information area, noise in the information area can be removed to improve the accuracy of QR code recognition.

[0458] In some embodiments, this application provides an electronic device having a display screen for displaying the QR code described in the above embodiments.

[0459] In some embodiments, this application also provides a computer-readable medium storing instructions that, when executed on a computer, cause the computer to perform the QR code recognition method described in the above embodiments.

[0460] In some embodiments, this application also provides an electronic device, which includes: one or more processors; one or more memories; the one or more memories storing one or more programs, which, when executed by one or more processors, cause the electronic device to perform the QR code recognition method described in the above embodiments.

[0461] In some embodiments, this application also provides a computer program product, including: execution instructions stored in a readable storage medium, at least one processor of an electronic device can read the execution instructions from the readable storage medium, and the at least one processor executes the execution instructions to enable the electronic device to implement the QR code recognition method described in the above embodiments.

[0462] Figure 23 shows a schematic diagram of the structure of the electronic device provided in an embodiment of this application. As shown in Figure 23, the electronic device may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headphone jack 170D, a sensor module 180, buttons 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, a barometric pressure sensor 180C, a magnetic sensor 180D, an accelerometer sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, etc.

[0463] It is understood that the structures illustrated in the embodiments of the present invention do not constitute a specific limitation on the electronic device. In other embodiments of this application, the electronic device may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0464] Processor 110 may include one or more processing units, such as application processor (AP), modem processor, graphics processing unit (GPU), image signal processor (ISP), controller, video codec, digital signal processor (DSP), baseband processor, and / or neural network processing unit (NPU). These different processing units may be independent devices or integrated into one or more processors.

[0465] The controller can generate operation control signals based on the instruction opcode and timing signals to complete the control of instruction fetching and execution.

[0466] The processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. This memory can store instructions or data that the processor 110 has just used or that are used repeatedly. If the processor 110 needs to use the instruction or data again, it can directly retrieve it from the aforementioned memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system. The processor can be used to execute the satellite communication method mentioned in this application.

[0467] The external storage interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device. The external memory card communicates with the processor 110 through the external storage interface 120 to perform data storage functions. For example, music, video, and other files can be saved on the external memory card.

[0468] Internal memory 121 can be used to store executable program code, including instructions. Internal memory 121 may include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function (such as sound playback, image playback, etc.), etc. The data storage area may store data created during the use of the electronic device (such as audio data, phonebook, etc.). Furthermore, internal memory 121 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, universal flash storage (UFS), etc. Processor 110 executes various functional applications and data processing of the electronic device by running instructions stored in internal memory 121 and / or instructions stored in memory disposed within the processor.

[0469] The SIM card interface 195 is used to connect the SIM card.

[0470] It is understood that, as used herein, the term “module” may refer to or include, or be part of, an application-specific integrated circuit (ASIC), electronic circuitry, a processor (shared, dedicated, or grouped) and / or memory that executes one or more software or firmware programs, combinational logic circuitry, and / or other suitable hardware components that provide the described functionality.

[0471] It is understood that in the various embodiments of this application, the processor may be a microprocessor, a digital signal processor, a microcontroller, etc., and / or any combination thereof. According to another aspect, the processor may be a single-core processor, a multi-core processor, etc., and / or any combination thereof.

[0472] The embodiments disclosed in this application can be implemented in hardware, software, firmware, or a combination of these implementation methods. Embodiments of this application can be implemented as computer programs or program code executable on a programmable system, the programmable system including at least one processor, a storage system (including volatile and non-volatile memory and / or storage elements), at least one input device, and at least one output device.

[0473] Program code can be applied to input instructions to execute the functions described in this application and generate output information. The output information can be applied to one or more output devices in a known manner. For the purposes of this application, the processing system includes any system having a processor such as, for example, a digital signal processor (DSP), a microcontroller, an application-specific integrated circuit (ASIC), or a microprocessor.

[0474] The program code can be implemented using a high-level procedural language or an object-oriented programming language to communicate with the processing system. Assembly language or machine language can also be used when needed. In fact, the mechanisms described in this application are not limited to any particular programming language. In either case, the language can be a compiled language or an interpreted language.

[0475] In some cases, the disclosed embodiments may be implemented in hardware, firmware, software, or any combination thereof. The disclosed embodiments may also be implemented as instructions carried or stored thereon on one or more temporary or non-temporary machine-readable (e.g., computer-readable) storage media, which may be read and executed by one or more processors. For example, the instructions may be distributed via a network or through other computer-readable media. Therefore, machine-readable media may include any mechanism for storing or transmitting information in a machine-readable (e.g., computer-readable) form, including but not limited to floppy disks, optical disks, CD-ROMs, magneto-optical disks, read-only memory (ROM), random access memory (RAM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), magnetic cards or optical cards, flash memory, or tangible machine-readable storage for transmitting information (e.g., carrier waves, infrared signals, digital signals, etc.) using the Internet in the form of electrical, optical, acoustic, or other propagation signals. Therefore, machine-readable media include any type of machine-readable medium suitable for storing or transmitting electronic instructions or information in a machine-readable (e.g., computer-readable) form.

[0476] In the accompanying drawings, some structural or methodological features may be shown in a specific arrangement and / or order. However, it should be understood that such a specific arrangement and / or order may not be necessary. Rather, in some embodiments, these features may be arranged in a manner and / or order different from that shown in the illustrative drawings. Furthermore, the inclusion of structural or methodological features in a particular figure does not imply that such features are required in all embodiments, and in some embodiments, these features may be omitted or may be combined with other features.

[0477] It should be noted that all units / modules mentioned in the device embodiments of this application are logical units / modules. Physically, a logical unit / module can be a physical unit / module, a part of a physical unit / module, or a combination of multiple physical units / modules. The physical implementation of these logical units / modules themselves is not the most important factor; the combination of functions implemented by these logical units / modules is the key to solving the technical problems proposed in this application. Furthermore, to highlight the innovative aspects of this application, the above-described device embodiments of this application have not introduced units / modules that are not closely related to solving the technical problems proposed in this application. This does not mean that the above-described device embodiments do not contain other units / modules.

[0478] It should be noted that in the examples and description of this patent, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one" does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0479] Although this application has been illustrated and described with reference to certain preferred embodiments thereof, those skilled in the art will understand that various changes in form and detail may be made thereto without departing from the scope of this application.

Claims

1. A QR code, characterized in that, The QR code includes N information areas and K positioning structures, where N is greater than 1 and K is greater than or equal to 1. The K positioning structures are used to locate each of the N information areas respectively, and the information content of the N information areas is used to characterize the target information corresponding to the QR code; The positioning structure includes one or more positioning points, and the information content of the information area includes multiple information points.

2. The QR code according to claim 1, characterized in that, The N information areas include M information area groups, and each information area group includes at least one of the information areas; At least two of the M information groups have the same information content, and both are used to represent the target information corresponding to the QR code. M is less than or equal to N and M is greater than 1.

3. The QR code according to claim 1 or 2, characterized in that, The target information includes multiple first information, and the information point in each information area is used to characterize at least one of the multiple first information and the corresponding sequence number of the at least one first information in the target information.

4. The QR code according to claim 3, characterized in that, The first information includes one or more of numbers, letters, and symbols.

5. The QR code according to claim 4, characterized in that, The number of information points in each information area is the same, and different states of the information points in each information area correspond to different values. The code data of each information area, composed of the values ​​corresponding to each information point, represents the at least one first information and the sequence number of the at least one first information in the target information.

6. The QR code according to claim 5, characterized in that, The information point exists in the information area in a first state, and the information point corresponds to a first value. The information point exists in the information area in a second state, the information point corresponds to a second value, the first value is different from the second value, the first state is a display state, and the second state is a non-display state.

7. The QR code according to claim 6, characterized in that, The number of information points in the first state in the information area varies depending on the version number of the QR code.

8. The QR code according to any one of claims 1 to 7, characterized in that, Each of the positioning structures is located between two adjacent information areas.

9. The QR code according to any one of claims 1 to 8, characterized in that, One of the positioning structures is used to locate a corresponding information area; Alternatively, two adjacent positioning structures can be used to locate the information area between the two adjacent positioning structures. Alternatively, one of the positioning structures can be used to locate two adjacent information areas.

10. The QR code according to any one of claims 1-9, characterized in that, The QR code is in the shape of a ring formed by a first outer circle and a first inner circle. The K positioning structures include multiple outer positioning points and multiple inner positioning points. Each positioning structure includes one outer positioning point and one inner positioning point. The plurality of outer positioning points are distributed on the first outer circle at a first preset interval, and the inner positioning points are distributed on the first inner circle at a second preset interval; and... The N information areas are located in the first region between the first outer circle and the first inner circle.

11. The QR code according to claim 10, characterized in that, The QR code also includes multiple reference points located in the first area. The display color of the multiple reference points in the QR code is different from the display color of the information points with display status. and, Any of the aforementioned information points displays a first color at a first time, a second color at a second time, and a third color at a third time, and the first color, the second color, and the third color are different.

12. A QR code recognition method, characterized in that, Applied to electronic devices, the method includes: Scan the QR code to be identified, which includes N information areas and K positioning structures, where N is greater than 1 and K is greater than or equal to 1. The K positioning structures are used to locate each of the N information areas. Each positioning structure includes one or more positioning points, and each information area includes multiple information points. The target information corresponding to the QR code to be recognized is determined based on the N information areas in the QR code to be recognized.

13. The method according to claim 12, characterized in that, The step of determining the target information corresponding to the QR code to be recognized based on the N information areas in the QR code to be recognized includes: The code metadata is extracted from the N information areas to obtain N code metadata corresponding to each of the N information areas; The N code metadata are decoded to obtain the target information corresponding to the QR code to be identified.

14. The method according to claim 13, characterized in that, The N information areas include M information area groups, and each information area group includes at least one of the information areas; At least two of the M information groups have the same information content, and both are used to represent the target information corresponding to the QR code. M is less than or equal to N and M is greater than 1.

15. The method according to claim 14, characterized in that, Decoding the N code metadata yields the target information corresponding to the QR code to be identified, including: Decode the N code data to obtain M identical first target information corresponding to the N information areas; The M identical first target information are subjected to a first fusion process to obtain the fused second target information corresponding to the QR code to be identified.

16. The method according to any one of claims 13-15, characterized in that, The step of extracting code metadata from the N information regions to obtain N code metadata corresponding to each of the N information regions includes: Based on the state of multiple information points in each information area, multiple values ​​corresponding to the multiple information points are determined, wherein information points with different states correspond to different values. The multiple values ​​are arranged in the order of the serial numbers corresponding to the multiple information points to obtain the code data corresponding to each information area.

17. The method according to claim 16, characterized in that, The information point has a first state, and the information point corresponds to a first value. The information point has a second state, the information point corresponds to a second value, the first value is different from the second value, the first state is a display state, and the second state is a non-display state.

18. The method according to any one of claims 13-17, characterized in that, The target information corresponding to the QR code includes multiple first pieces of information, which include one or more of numbers, letters, and symbols.

19. The method according to claim 18, characterized in that, Decoding the N code metadata to obtain the target information corresponding to the QR code to be recognized includes: Based on the N code data, a code table is searched to determine the first information corresponding to each code data in the code table and the sequence number corresponding to the first information. Based on the multiple first pieces of information corresponding to the N code data and the sequence number corresponding to the multiple first pieces of information, the target information corresponding to the QR code to be identified is determined.

20. The method according to claim 19, characterized in that, The step of looking up the code table based on the N code data elements to determine the first information corresponding to each code data element in the code table and the sequence number corresponding to the first information includes: If multiple first code metadata corresponding to the same first information are identical among the N code metadata, the code table is searched based on the multiple first code metadata to determine the first information corresponding to the multiple first code metadata and the sequence number corresponding to the first information. Since the multiple first code metadata are different, a second fusion process is performed on the multiple first code metadata to obtain multiple second code metadata. Based on the multiple second code metadata, the code table is searched to determine the first information corresponding to the multiple second code metadata and the sequence number corresponding to the first information.

21. The method according to claim 20, characterized in that, The first code metadata, corresponding to the differences among the plurality of first code metadata, undergoes a second fusion process to obtain a plurality of second code metadata, including: The same values ​​of information points with the same sequence number in the plurality of first code metadata are kept unchanged, and the different values ​​of information points with the same sequence number are set as the first value to obtain the plurality of second code metadata corresponding to the plurality of code metadata.

22. The method according to claim 20 or 21, characterized in that, The step of searching the code table based on the plurality of second code metadata to determine the first information corresponding to the plurality of second code metadata and the sequence number corresponding to the first information includes: For the third code metadata corresponding to the plurality of second code metadata where the number of first values ​​is equal to the number threshold, determine the first information corresponding to the third code metadata in the code table and the sequence number corresponding to the first information; For the fourth code metadata corresponding to the plurality of second code metadata where the number of first values ​​is not equal to the number threshold, the fourth code metadata is subjected to error correction processing to obtain the error-corrected fifth code metadata. Determine the first information corresponding to the fifth code data in the code table and the sequence number corresponding to the first information.

23. The method according to claim 22, characterized in that, The fourth code metadata, corresponding to the plurality of second code metadata in which the number of the first values ​​is not equal to the number threshold, undergoes error correction processing to obtain the error-corrected fifth code metadata, including: If the number of the first value is greater than the number threshold, the first value that exceeds the number threshold is set as the second value, and the fifth code metadata is obtained in which the number of the first value is equal to the number threshold. If the number of the first value is less than the quantity threshold, the second value that does not meet the quantity threshold is set as the first value, and the fifth code metadata is obtained where the number of the first value is equal to the quantity threshold.

24. [Correction 15.04.2025 according to Rule 91] The method according to any one of claims 12-22, characterized in that, The method further includes: There are no missing positioning points in the K positioning structures corresponding to the QR code to be identified, and the N information areas are determined based on the K positioning structures; If there are missing positioning points in the K positioning structures corresponding to the QR code to be identified, the missing positioning points are filled in, and the N information areas are determined based on the filled K positioning structures.

25. The method according to claim 24, characterized in that, The process of filling in the missing positioning points includes: The missing positioning points are part of the positioning points in the first positioning structure among the K positioning structures, and the missing positioning points are filled in based on the other positioning points in the first positioning structure. The missing positioning points correspond to all positioning points in the first positioning structure among the K positioning structures, and the missing positioning points are filled in based on the adjacent positioning structures of the first positioning structure.

26. A QR code recognition method, characterized in that, Applied to electronic devices, the method includes: Scan the QR code to be identified, which includes N information areas and K positioning structures, where N is greater than 1 and K is greater than or equal to 1. The K positioning structures are used to locate each of the N information areas. Each positioning structure includes one or more positioning points, and each information area includes multiple information points. Obtain the version number corresponding to the QR code to be recognized; The target information corresponding to the QR code to be recognized is determined based on the version number corresponding to the QR code to be recognized and the N information areas in the QR code to be recognized.

27. The method according to claim 26, characterized in that, The step of obtaining the version number corresponding to the QR code to be recognized includes: Obtain the number of target information points in the N information areas of the QR code to be recognized that are in the display state; The version number corresponding to the QR code to be identified is determined based on the number of target information points that are in the display state in the N information areas.

28. The method according to claim 27, characterized in that, The version number corresponding to the QR code to be recognized is determined based on the number of target information points in the N information areas that are in the display state, including: If the number of target information points in the display state in each of the N information areas is a first number, then the version number corresponding to the QR code to be identified is determined based on the first number. If, among the N information areas, the number of information areas with the second number of target information points is greater than the number of information areas with any number of target information points other than the second number, then the version number corresponding to the QR code to be identified is determined based on the second number.

29. The method according to claim 26, characterized in that, The version number corresponding to the QR code to be recognized is determined based on the number of target information points in the N information areas that are in the display state, including: Obtain the number of target information points in the N information areas that are in the display state and the number of positioning points in the QR code to be identified; The version number of the QR code to be recognized is determined based on the number of target information points in the N information areas that are in the display state and the number of positioning points in the QR code to be recognized.

30. The method according to any one of claims 27-29, characterized in that, Obtaining the number of target information points in the displayed state among the N information areas of the QR code to be recognized includes: Obtain the number of information points in the N information areas of the QR code to be recognized that are in the display state; Obtain the number of noise points in the N information areas of the QR code to be recognized that are in the display state; The number of target information points in the N information areas is determined based on the number of information points and the number of noise points in the N information areas.

31. The method according to claim 27, characterized in that, The step of obtaining the number of noise points in the N information areas of the QR code to be recognized that are in the display state includes: Obtain the positioning structure in the QR code to be recognized; Based on the extracted positioning structure, an affine transformation is performed on the standard QR code template to obtain the processed QR code template. Align the processed QR code template with the QR code to be recognized, identify the misaligned information points in the N information areas that are in the display state as noise, and obtain the number of noise points.

32. The method according to claim 26, characterized in that, The step of obtaining the version number corresponding to the QR code to be recognized includes: The difference between the sum of the total number of information points in the N information areas that are in the display state and the sum of the total number of positioning points in the QR code to be identified, and the sum of the total number of information points in the N information areas that are in the display state and the sum of the total number of positioning points in the QR code to be identified, corresponding to the first version number of each version number of the QR code, is the smallest. Therefore, the version number corresponding to the QR code to be identified is determined to be the first version number.

33. The method according to any one of claims 26-32, characterized in that, The step of determining the target information corresponding to the QR code to be recognized based on the version number corresponding to the QR code to be recognized and the N information areas in the QR code to be recognized includes: The target code table corresponding to the QR code to be identified is determined based on the version number corresponding to the QR code to be identified. The target code table is used to reflect the mapping relationship between the code data and the first information and the sequence number corresponding to the first information. The code metadata is extracted from the N information regions to obtain the code metadata corresponding to the N information regions; Based on the N code data elements, the target code table is searched to determine the first information corresponding to each code data element in the target code table and the sequence number corresponding to the first information. Based on the multiple pieces of first information corresponding to the N code data and the sequence number corresponding to the multiple pieces of first information, the target information corresponding to the QR code to be identified is determined.

34. An electronic device, characterized in that, The electronic device has a display screen for displaying the QR code according to any one of claims 1 to 10.

35. An electronic device, characterized in that, include: One or more processors; One or more memories; the one or more memories storing one or more programs, which, when executed by the one or more processors, cause the electronic device to perform the QR code recognition method according to any one of claims 12 to 30.

36. A computer-readable storage medium, characterized in that, The readable storage medium stores instructions that, when executed on a computer, cause the computer to perform the QR code recognition method according to any one of claims 12 to 33.

37. A computer program product, characterized in that, include: Computer instructions, when executed on an electronic device, cause the electronic device to perform the QR code recognition method according to any one of claims 12 to 33.