Method for recognizing two-dimensional code and related apparatus

Gespeichert in:
Bibliographische Detailangaben
Titel: Method for recognizing two-dimensional code and related apparatus
Patent Number: 12229,631
Publikationsdatum: February 18, 2025
Appl. No: 18/264551
Application Filed: January 21, 2022
Abstract: Methods and apparatuses for recognizing a two-dimensional code are disclosed. In an implementation, a method comprises: identifying, by an electronic device, a two-dimensional code, wherein the two-dimensional code comprises an image region in the center and a ring region surrounding the image region, wherein the ring region comprises a code region including a first code region and a second code region, a first spacing region, and a second spacing region, wherein the first spacing region and the second spacing region are arranged between the first code region and the second code region, determining values corresponding to a plurality of code elements in the code region, and recognizing, by the electronic device based on the values, first information corresponding to the two-dimensional code.
Inventors: HUAWEI TECHNOLOGIES CO., LTD. (Guangdong, CN)
Assignees: Huawei Technologies Co., Ltd. (Shenzhen, CN)
Claim: 1. A method for recognizing a two-dimensional code, comprising: identifying, by an electronic device, a two-dimensional code, wherein the two-dimensional code comprises an image region in the center and a ring region surrounding the image region, wherein the ring region comprises a code region including a first code region, a second code region, a first spacing region, and a second spacing region, wherein the first spacing region and the second spacing region are arranged between the first code region and the second code region; determining, by the electronic device, values corresponding to a plurality of code elements in the code region, wherein the plurality of code elements are a plurality of dot-shaped code elements; and recognizing, by the electronic device based on the values, first information corresponding to the two-dimensional code.
Claim: 2. The method according to claim 1 , wherein the first spacing region and the second spacing region are partial rings with a same width.
Claim: 3. The method according to claim 1 , wherein areas occupied by the first code region and the second code region are same.
Claim: 4. The method according to claim 1 , wherein a ratio between a width of the image region in a horizontal direction and a width of the two-dimensional code in the horizontal direction is 1:3.
Claim: 5. The method according to claim 1 , wherein the plurality of code elements in the code region are distributed on at least two concentric circles.
Claim: 6. The method according to claim 5 , wherein an arc distance between centers of adjacent dot-shaped code elements on a same concentric circle of the code region is (2r+b)×k, wherein k is a positive integer, r is a radius of the dot-shaped code element, and b is a fixed value, wherein a circumference of the same concentric circle is N×(2r+b), and wherein N is a positive integer greater than k.
Claim: 7. The method according to claim 6 , wherein an arc distance between centers of three consecutive dot-shaped code elements on a same concentric circle of the code region is greater than (2r+b)×2.
Claim: 8. The method according to claim 5 , wherein dot-shaped code elements a and b located on two different concentric circles of the two-dimensional code, and a connection line between a center of the dot-shaped code element a and a center of the dot-shaped code element b passes through the center of the two-dimensional code.
Claim: 9. The method according to claim 5 , wherein radii of dot-shaped code elements on different ones of the at least two concentric circles of the two-dimensional code are different.
Claim: 10. The method according to claim 9 , wherein a radius of a dot-shaped code element on an outer concentric circle of the two-dimensional code is greater than a radius of a dot-shaped code element on an inner concentric circle of the two-dimensional code.
Claim: 11. The method according to claim 5 , wherein the code elements further comprise an arc-shaped code element, an arc length of the arc-shaped code element on a concentric circle is (2r+b)×M, and M is a positive integer.
Claim: 12. The method according to claim 11 , wherein an arc distance between an arc-shaped code element and an adjacent code element on a same concentric circle is greater than or equal to (2r+b)×2.
Claim: 13. The method according to claim 1 , wherein the determining values corresponding to a plurality of code elements in a code region of the two-dimensional code comprises: determining, by the electronic device, a target version of the two-dimensional code, wherein the target version indicates coordinate information of each storage location in the code region of the two-dimensional code; and determining, by the electronic device based on the coordinate information of each storage location, that a storage location occupied by each of the plurality of code elements in the code region of the two-dimensional code is correspondingly a value of the values.
Claim: 14. The method according to claim 13 , wherein each storage location is in a dot shape, and the coordinate information comprises center coordinate information and radius information of the storage location.
Claim: 15. The method according to claim 13 , wherein before the determining, by the electronic device, a target version of the to-be-recognized two-dimensional code, the method comprises: determining, by the electronic device, a location of a locator in an image to be recognized; determining, by the electronic device, a vertex location of a two-dimensional code in the image based on the location of the locator; and calibrating, by the electronic device, the two-dimensional code in the image based on the vertex location, to obtain the two-dimensional code.
Claim: 16. The method according to claim 1 , wherein a type of the first information comprises one or more of: a character, text, a picture, audio, a video, or a link address.
Claim: 17. An electronic device, comprising: one or more processors; and one or more memories coupled to the one or more processors and storing instructions for execution by the one or more processors to perform operations comprising: identifying, by an electronic device, a two-dimensional code, wherein the two-dimensional code comprises an image region in the center and a ring region surrounding the image region, wherein the ring region comprises a code region including a first code region and a second code region, a first spacing region, and a second spacing region, wherein the first spacing region and the second spacing region are arranged between the first code region and the second code region; determining, by the electronic device, values corresponding to a plurality of code elements in the code region, wherein the plurality of code elements are a plurality of dot-shaped code elements; and recognizing, by the electronic device based on the values, first information corresponding to the two-dimensional code.
Claim: 18. The electronic device according to claim 17 , wherein the plurality of code elements in the code region are distributed on at least two concentric circles.
Claim: 19. A non-transitory, computer-readable medium storing one or more instructions executable by one or more processors to perform operations comprising: identifying, by an electronic device, a two-dimensional code, wherein the two-dimensional code comprises an image region in the center and a ring region surrounding the image region, wherein the ring region comprises a code region including a first code region and a second code region, a first spacing region, and a second spacing region, wherein the first spacing region and the second spacing region are arranged between the first code region and the second code region; determining, by the electronic device, values corresponding to a plurality of code elements in the code region, wherein the plurality of code elements are a plurality of dot-shaped code elements; and recognizing, by the electronic device based on the values, first information corresponding to the two-dimensional code.
Claim: 20. The non-transitory, computer-readable medium according to claim 19 , wherein the plurality of code elements in the code region are distributed on at least two concentric circles.
Patent References Cited: 2005/0269412 December 2005 Chiu
106951812 July 2017
107590522 January 2018
207051946 February 2018
110969042 April 2020
111275152 June 2020
112926715 June 2021

Other References: Extended European Search Report in European Appln No. 22748898.8, dated Jun. 10, 2024, 7 pages. cited by applicant
International Search Report and Written Opinion in International Appln. No. PCT/CN2022/073210, mailed on Apr. 20, 2022, 22 pages (with English translation). cited by applicant
Primary Examiner: Franklin, Jamara A
Attorney, Agent or Firm: Fish & Richardson P.C.
Dokumentencode: edspgr.12229631
Datenbank: USPTO Patent Grants