Two-dimensional code generation and decoding methods, apparatuses, and devices

Uloženo v:
Podrobná bibliografie
Název: Two-dimensional code generation and decoding methods, apparatuses, and devices
Patent Number: 12204,967
Datum vydání: January 21, 2025
Appl. No: 18/551997
Application Filed: March 18, 2022
Abstrakt: A method is disclosed that includes: obtaining two-dimensional code of a to-be-generated two-dimensional code image; performing error resilient coding by using a coding algorithm with a predetermined error-tolerant rate, to obtain error-tolerant-processed two-dimensional code; determining a code element shape that is corresponding to each data information bit in the error-tolerant-processed two-dimensional code and that is in a generation region of the two-dimensional code image; determining, according to a predetermined arrangement rule of the two-dimensional code, first position information that is corresponding to each data information bit of the error-tolerant-processed two-dimensional code and that is in the generation region; determining second position information of each positioning point bit in the generation region; and generating the two-dimensional code image based on the first position information, the code element shape corresponding to each data information bit, and the second position information of each positioning point bit.
Inventors: ALIPAY.COM CO., LTD. (Shanghai, CN)
Assignees: ALIPAY.COM CO., LTD. (Shanghai, CN)
Claim: 1. A two-dimensional code generation method, comprising: obtaining two-dimensional code of a to-be-generated two-dimensional code image; performing error resilient coding on the two-dimensional code by using a coding algorithm with a predetermined error-tolerant rate, to obtain error-tolerant-processed two-dimensional code; determining a code element shape that is corresponding to each data information bit in the error-tolerant-processed two-dimensional code and that is in a generation region of the two-dimensional code image, wherein the code element shape comprises a dot or an arc; determining, according to a predetermined arrangement rule of the two-dimensional code, first position information that is corresponding to each data information bit of the error-tolerant-processed two-dimensional code and that is in the generation region; determining second position information of each positioning point bit in the generation region; and generating the two-dimensional code image based on the first position information, the code element shape corresponding to each data information bit, and the second position information of each positioning point bit, wherein the two-dimensional code image comprises a ring formed by the dot and the arc; and a ring width of each circle of the ring is the same.
Claim: 2. The method according to claim 1 , wherein the determining a code element shape that is corresponding to each data information bit in the error-tolerant-processed two-dimensional code and that is in a generation region of the two-dimensional code image specifically comprises: determining, for each code bit in the error-tolerant-processed two-dimensional code, a sequence of the code bit in the error-tolerant-processed two-dimensional code; determining a position of a data information bit corresponding to the sequence in the two-dimensional code generation region; and determining a code element shape corresponding to a data information bit of the position according to a value of the code bit.
Claim: 3. The method according to claim 1 , wherein the generation region further comprises mask information; and before the obtaining two-dimensional code of a to-be-generated two-dimensional code image, the method further comprises: performing mask processing on the two-dimensional code according to the mask information, to obtain a mask-processed two-dimensional code.
Claim: 4. The method according to claim 1 , wherein the positioning point bits comprise first positioning point bits and second positioning point bits; the first positioning point bits are separately distributed in an upper left corner position, an upper right corner position, and a lower left corner position of the generation region; and the second positioning point bits are distributed in a lower right corner position of the generation region.
Claim: 5. The method according to claim 4 , wherein a region corresponding to a directional positioning point bit is used to display a second identifier; and a display area of the second identifier is less than a display area of a first identifier.
Claim: 6. The method according to claim 1 , wherein the two-dimensional code image further comprises an intermediate region, and the intermediate region is concentric with the ring; the intermediate region is used to display a first identifier; adjacent rings have a same interval; and an interval between the intermediate region and a ring formed by adjacent code element shapes is the same as an interval between adjacent rings.
Claim: 7. The method according to claim 1 , wherein a code element in the two-dimensional code image is coded by using two colors.
Claim: 8. A computing device, comprising a memory and a processor, wherein the memory stores executable instructions that, in response to execution by the processor, cause the computing device to: obtain two-dimensional code of a to-be-generated two-dimensional code image; perform error resilient coding on the two-dimensional code by using a coding algorithm with a predetermined error-tolerant rate, to obtain error-tolerant-processed two-dimensional code; determine a code element shape that is corresponding to each data information bit in the error-tolerant-processed two-dimensional code and that is in a generation region of the two-dimensional code image, wherein the code element shape comprises a dot or an arc; determine, according to a predetermined arrangement rule of the two-dimensional code, first position information that is corresponding to each data information bit of the error-tolerant-processed two-dimensional code and that is in the generation region; determine second position information of each positioning point bit in the generation region; and generate the two-dimensional code image based on the first position information, the code element shape corresponding to each data information bit, and the second position information of each positioning point bit, wherein the two-dimensional code image comprises a ring formed by the dot and the arc; and a ring width of each circle of the ring is the same.
Claim: 9. The computing device according to claim 8 , wherein being caused to determine the code element shape that is corresponding to each data information bit in the error-tolerant-processed two-dimensional code and that is in the generation region of the two-dimensional code image comprises being caused to: determine, for each code bit in the error-tolerant-processed two-dimensional code, a sequence of the code bit in the error-tolerant-processed two-dimensional code; determine a position of a data information bit corresponding to the sequence in the two-dimensional code generation region; and determine a code element shape corresponding to a data information bit of the position according to a value of the code bit.
Claim: 10. The computing device according to claim 8 , wherein the generation region further comprises mask information; and wherein the computing device is further caused to, before the obtaining two-dimensional code of a to-be-generated two-dimensional code image: perform mask processing on the two-dimensional code according to the mask information, to obtain a mask-processed two-dimensional code.
Claim: 11. The computing device according to claim 8 , wherein the positioning point bits comprise first positioning point bits and second positioning point bits; the first positioning point bits are separately distributed in an upper left corner position, an upper right corner position, and a lower left corner position of the generation region; and the second positioning point bits are distributed in a lower right corner position of the generation region.
Claim: 12. The computing device according to claim 11 , wherein a region corresponding to a directional positioning point bit is used to display a second identifier; and a display area of the second identifier is less than a display area of a first identifier.
Claim: 13. The computing device according to claim 8 , wherein the two-dimensional code image further comprises an intermediate region, and the intermediate region is concentric with the ring; the intermediate region is used to display a first identifier; adjacent rings have a same interval; and an interval between the intermediate region and a ring formed by adjacent code element shapes is the same as an interval between adjacent rings.
Claim: 14. The computing device according to claim 8 , wherein a code element in the two-dimensional code image is coded by using two colors.
Claim: 15. A non-transitory computer readable storage medium having stored therein instructions that, when executed by a processor of a device, cause the device to: obtain two-dimensional code of a to-be-generated two-dimensional code image; perform error resilient coding on the two-dimensional code by using a coding algorithm with a predetermined error-tolerant rate, to obtain error-tolerant-processed two-dimensional code; determine a code element shape that is corresponding to each data information bit in the error-tolerant-processed two-dimensional code and that is in a generation region of the two-dimensional code image, wherein the code element shape comprises a dot or an arc; determine, according to a predetermined arrangement rule of the two-dimensional code, first position information that is corresponding to each data information bit of the error-tolerant-processed two-dimensional code and that is in the generation region; determine second position information of each positioning point bit in the generation region; and generate the two-dimensional code image based on the first position information, the code element shape corresponding to each data information bit, and the second position information of each positioning point bit, wherein the two-dimensional code image comprises a ring formed by the dot and the arc; and a ring width of each circle of the ring is the same.
Claim: 16. The non-transitory computer readable storage medium according to claim 15 , wherein being caused to determine the code element shape that is corresponding to each data information bit in the error-tolerant-processed two-dimensional code and that is in the generation region of the two-dimensional code image comprises being caused to: determine, for each code bit in the error-tolerant-processed two-dimensional code, a sequence of the code bit in the error-tolerant-processed two-dimensional code; determine a position of a data information bit corresponding to the sequence in the two-dimensional code generation region; and determine a code element shape corresponding to a data information bit of the position according to a value of the code bit.
Claim: 17. The non-transitory computer readable storage medium according to claim 15 , wherein the generation region further comprises mask information; and wherein the device is further caused to, before the obtaining two-dimensional code of a to-be-generated two-dimensional code image: perform mask processing on the two-dimensional code according to the mask information, to obtain a mask-processed two-dimensional code.
Claim: 18. The non-transitory computer readable storage medium according to claim 15 , wherein the positioning point bits comprise first positioning point bits and second positioning point bits; the first positioning point bits are separately distributed in an upper left corner position, an upper right corner position, and a lower left corner position of the generation region; and the second positioning point bits are distributed in a lower right corner position of the generation region.
Claim: 19. The non-transitory computer readable storage medium according to claim 15 , wherein the two-dimensional code image further comprises an intermediate region, and the intermediate region is concentric with the ring; the intermediate region is used to display a first identifier; adjacent rings have a same interval; and an interval between the intermediate region and a ring formed by adjacent code element shapes is the same as an interval between adjacent rings.
Claim: 20. The non-transitory computer readable storage medium according to claim 15 , wherein a code element in the two-dimensional code image is coded by using two colors.
Patent References Cited: 2015/0324946 November 2015 Arce et al.
2016/0342873 November 2016 Feld
2020/0097692 March 2020 Tu
104933387 September 2015
105975894 September 2016
106951812 July 2017
108764420 November 2018
108960000 December 2018
110288069 September 2019
110969233 April 2020
111209991 May 2020
112926715 June 2021
113487001 October 2021
Other References: The International Search Report and Written Opinion of the International Searching Authority for International Application No. PCT/CN2022/081625 mailed on May 31, 2022. cited by applicant
Primary Examiner: Johnson, Sonji N
Attorney, Agent or Firm: Womble Bond Dickinson (US) LLP
Přístupové číslo: edspgr.12204967
Databáze: USPTO Patent Grants
Buďte první, kdo okomentuje tento záznam!
Nejprve se musíte přihlásit.