IP Library Granted Patent US 10,726,223
Granted Patent B2
US 10,726,223 · App. 16/393,648 · Granted Jul 28, 2020

Method and apparatus for barcode identifcation

Inventor: Zhengbao Liu (Hangzhou, CN)
Assignee: Alibaba Group Holding Limited
G06K7/10722G06K7/1413
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 10,726,223
App. No.
16/393,648
Granted
Jul 28, 2020
Kind
B2
Abstract

A first row of pixels from a barcode image is extracted by a terminal device based on a predetermined extraction policy. The first row of pixels is parsed by the terminal device to obtain a first character string. Whether the first character string satisfies a predetermined character rule is determined by the terminal device. Responsive to a determination that the first character string satisfies the predetermined character rule: the first character string is determined as an identification result of a barcode in the barcode image and the identification result is generated including the first character string.

Claims (91)

1. A computer-implemented method, comprising:

extracting, by a terminal device and based on a predetermined extraction policy, a first row of pixels from a barcode image;

parsing, by the terminal device, the first row of pixels to obtain a first character string;

determining, by the terminal device, whether the first character string satisfies a predetermined character rule;

responsive to a determination that the first character string satisfies the predetermined character rule:

determining that the first character string is an identification result of a barcode in the barcode image; and

generating the identification result comprising the first character string;

responsive to determining that the first character string does not satisfy the predetermined character rule:

extracting a second row of pixels from the barcode image based on the predetermined extraction policy, wherein the second row of pixels is different from the first row of pixels;

parsing the second row of pixels to obtain a second character string;

determining whether the second character string matches the first character string;

responsive to a determination that the second character string matches the first character string:

determining that the second character string is the identification result of the barcode in the barcode image; and

responsive to a determination that the second character string does not match the first character string:

iteratively performing an identification process so that a target character string is obtained a same way as the first character string and the second character string during each identification process, wherein a target row of pixels corresponding to each target character string is within the barcode image;

determining, during each identification process, whether there is a target character that satisfies the predetermined character rule or matches another character string obtained from a last identification process; and

responsive to a determination that there is a target character that satisfies the predetermined character rule or matches another character string obtained from a last identification process:

determining that the target character string is the identification result of the barcode in the barcode image; and

terminating the identification process.

2. The computer-implemented method of claim 1 , wherein the predetermined character rule is that a character string does not contain consecutive predetermined characters, and the consecutive predetermined characters do not comprise a set number of uppercase letters, lowercase letters, integers, and spaces.

3. The computer-implemented method of claim 1 , wherein the predetermined extraction policy is:

extracting a row of pixels starting from a default row at an interval of a fixed number of rows until a target extraction row goes beyond the barcode image; or

extracting a row of pixels starting from a default row at an interval of a dynamically changed number of rows until a target extraction row goes beyond the barcode image.

4. The computer-implemented method of claim 3 , wherein the interval of the dynamically changed number of rows overlaps with at least a portion of a preceding extraction interval or a subsequent extraction interval.

5. The computer-implemented method of claim 1 , wherein, responsive to a determination that there is no target character string that satisfies the predetermined character rule or matches the another character string obtained from the last identification process:

determining, for each target character string obtained from each identification process, an occurrence frequency value;

determining whether there is at least one target character string of the target character strings obtained from each identification process with a corresponding occurrence frequency value greater than one;

responsive to a determination that there is at least one target character string with the corresponding occurrence frequency value greater than one:

determining, as an identification result of the barcode in the barcode image, the target character string of the at least one target character string with a largest corresponding occurrence frequency value; or

determining that the identification process fails.

6. A non-transitory, computer-readable medium storing one or more instructions executable by a computer system to perform operations comprising:

extracting, by a terminal device and based on a predetermined extraction policy, a first row of pixels from a barcode image;

parsing, by the terminal device, the first row of pixels to obtain a first character string;

determining, by the terminal device, whether the first character string satisfies a predetermined character rule;

responsive to a determination that the first character string satisfies the predetermined character rule:

determining that the first character string is an identification result of a barcode in the barcode image; and

generating the identification result comprising the first character string;

responsive to determining that the first character string does not satisfy the predetermined character rule:

extracting a second row of pixels from the barcode image based on the predetermined extraction policy, wherein the second row of pixels is different from the first row of pixels;

parsing the second row of pixels to obtain a second character string;

determining whether the second character string matches the first character string;

responsive to a determination that the second character string matches the first character string:

determining that the second character string is the identification result of the barcode in the barcode image; and

responsive to a determination that the second character string does not match the first character string:

iteratively performing an identification process so that a target character string is obtained a same way as the first character string and the second character string during each identification process, wherein a target row of pixels corresponding to each target character string is within the barcode image;

determining, during each identification process, whether there is a target character that satisfies the predetermined character rule or matches another character string obtained from a last identification process; and

responsive to a determination that there is a target character that satisfies the predetermined character rule or matches another character string obtained from a last identification process:

determining that the target character string is the identification result of the barcode in the barcode image; and

terminating the identification process.

7. The non-transitory, computer-readable medium of claim 6 , wherein the predetermined character rule is that a character string does not contain consecutive predetermined characters, and the consecutive predetermined characters do not comprise a set number of uppercase letters, lowercase letters, integers, and spaces.

8. The non-transitory, computer-readable medium of claim 6 , wherein the predetermined extraction policy is:

extracting a row of pixels starting from a default row at an interval of a fixed number of rows until a target extraction row goes beyond the barcode image; or

extracting a row of pixels starting from a default row at an interval of a dynamically changed number of rows until a target extraction row goes beyond the barcode image.

9. The non-transitory, computer-readable medium of claim 8 , wherein the interval of the dynamically changed number of rows overlaps with at least a portion of a preceding extraction interval or a subsequent extraction interval.

10. The non-transitory, computer-readable medium of claim 6 , wherein, responsive to a determination that there is no target character string that satisfies the predetermined character rule or matches the another character string obtained from the last identification process:

determining, for each target character string obtained from each identification process, an occurrence frequency value;

determining whether there is at least one target character string of the target character strings obtained from each identification process with a corresponding occurrence frequency value greater than one;

responsive to a determination that there is at least one target character string with the corresponding occurrence frequency value greater than one:

determining, as an identification result of the barcode in the barcode image, the target character string of the at least one target character string with a largest corresponding occurrence frequency value; or

determining that the identification process fails.

11. A computer-implemented system, comprising:

one or more computers; and

one or more computer memory devices interoperably coupled with the one or more computers and having tangible, non-transitory, machine-readable media storing one or more instructions that, when executed by the one or more computers, perform one or more operations comprising:

extracting, by a terminal device and based on a predetermined extraction policy, a first row of pixels from a barcode image;

parsing, by the terminal device, the first row of pixels to obtain a first character string;

determining, by the terminal device, whether the first character string satisfies a predetermined character rule;

responsive to a determination that the first character string satisfies the predetermined character rule:

determining that the first character string is an identification result of a barcode in the barcode image; and

generating the identification result comprising the first character string;

responsive to determining that the first character string does not satisfy the predetermined character rule:

extracting a second row of pixels from the barcode image based on the predetermined extraction policy, wherein the second row of pixels is different from the first row of pixels;

parsing the second row of pixels to obtain a second character string;

determining whether the second character string matches the first character string;

responsive to a determination that the second character string matches the first character string:

determining that the second character string is the identification result of the barcode in the barcode image; and

responsive to a determination that the second character string does not match the first character string:

iteratively performing an identification process so that a target character string is obtained a same way as the first character string and the second character string during each identification process, wherein a target row of pixels corresponding to each target character string is within the barcode image;

determining, during each identification process, whether there is a target character that satisfies the predetermined character rule or matches another character string obtained from a last identification process; and

responsive to a determination that there is a target character that satisfies the predetermined character rule or matches another character string obtained from a last identification process:

 determining that the target character string is the identification result of the barcode in the barcode image; and

 terminating the identification process.

12. The computer-implemented system of claim 11 , wherein the predetermined character rule is that a character string does not contain consecutive predetermined characters, and the consecutive predetermined characters do not comprise a set number of uppercase letters, lowercase letters, integers, and spaces.

13. The computer-implemented system of claim 11 , wherein the predetermined extraction policy is:

extracting a row of pixels starting from a default row at an interval of a fixed number of rows until a target extraction row goes beyond the barcode image; or

extracting a row of pixels starting from a default row at an interval of a dynamically changed number of rows until a target extraction row goes beyond the barcode image.

14. The computer-implemented system of claim 11 , wherein, responsive to a determination that there is no target character string that satisfies the predetermined character rule or matches the another character string obtained from the last identification process:

determining, for each target character string obtained from each identification process, an occurrence frequency value;

determining whether there is at least one target character string of the target character strings obtained from each identification process with a corresponding occurrence frequency value greater than one;

responsive to a determination that there is at least one target character string with the corresponding occurrence frequency value greater than one:

determining, as an identification result of the barcode in the barcode image, the target character string of the at least one target character string with a largest corresponding occurrence frequency value; or

determining that the identification process fails.

Assignments (3)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Sep 10, 2020
From: ADVANTAGEOUS NEW TECHNOLOGIES CO., LTD.
To: ADVANCED NEW TECHNOLOGIES CO., LTD.
Reel/Frame 053754/0625 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Aug 31, 2020
From: ALIBABA GROUP HOLDING LIMITED
To: ADVANTAGEOUS NEW TECHNOLOGIES CO., LTD.
Reel/Frame 053743/0464 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Oct 16, 2019
From: LIU, ZHENGBAO
To: ALIBABA GROUP HOLDING LIMITED
Reel/Frame 050729/0809 →