IP Library Granted Patent US 10,635,959
Granted Patent B2
US 10,635,959 · App. 15/894,761 · Granted Apr 28, 2020

Generating authentication image to verify a two-dimensional code offline

Inventor: Wei Guo (Hangzhou, CN)
Assignee: Alibaba Group Holding Limited
G06K19/06103G06F21/64G06K19/06037
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,635,959
App. No.
15/894,761
Granted
Apr 28, 2020
Kind
B2
Abstract

The present disclosure describes technologies related to generating authentication image to verify a two-dimensional (2D) code offline. In some implementations, a 2D code is parsed to identify a plurality of black pixels and a plurality of white pixels. A target image is parsed to identify a plurality of black pixels and a plurality of white pixels. The plurality of black pixels and the plurality of white pixels of the images are converted to a first plurality of binary arrays and a second plurality of binary arrays based on a predetermined rule. At least a portion of the first plurality of binary arrays and a portion of the second plurality of binary arrays are compared, and an authentication image including a plurality of black pixels, a plurality of white pixels, and a plurality of transparent pixels is generated based on comparison results.

Claims (58)

1. A computer-implemented method, comprising:

parsing a two-dimensional (2D) code to identify a plurality of black pixels and a plurality of white pixels;

converting the plurality of black pixels and the plurality of white pixels of the 2D code to a first plurality of binary arrays, wherein the plurality of black pixels and the plurality of white pixels correspond to different binary digits;

parsing a target image to identify a plurality of black pixels and a plurality of white pixels, wherein the target image includes a predetermined pattern;

converting the plurality of black pixels and the plurality of white pixels of the target image to a second plurality of binary arrays based on a predetermined rule;

comparing at least a portion of the first plurality of binary arrays and a portion of the second plurality of binary arrays; and

generating an authentication image based on comparing the portion of the first plurality of binary arrays and the portion of the second plurality of binary arrays including:

generating black pixels in the authentication image for locations that are black in the target image but white in the 2D code,

generating white pixels in the authentication image for locations that are white in the target image but black in the 2D code, and

generating transparent pixels in the authentication image for locations having matching colors in the target image and in the 2D code.

2. The computer-implemented method of claim 1 , wherein the predetermined rule includes converting each black pixel to binary digit 1 and converting each white pixel to binary digit 0.

3. The computer-implemented method of claim 1 , wherein each binary array of the first plurality of binary arrays corresponds to a line of pixels in the 2D code.

4. The computer-implemented method of claim 1 , wherein a number of pixels identified from the target image is the same as a number of pixels identified from the 2D code.

5. The computer-implemented method of claim 1 , wherein a number of pixels identified from the target image is different from a number of pixels identified from the 2D code, and the number of pixels identified from the target image is converted to be the same as the number of pixels identified from the 2D code.

6. The computer-implemented method of claim 1 , further comprising:

overlapping the authentication image with the 2D code to form an overlapped image;

determining the 2D code is unmodified if the overlapped image includes the predetermined pattern; and

determining the 2D code is modified if the overlapped image does not include the predetermined pattern.

7. The computer-implemented method of claim 6 , wherein the authentication image is printed on a transparent paper and overlapped with the 2D code printed on a paper to form the overlapped image.

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

parsing a two-dimensional (2D) code to identify a plurality of black pixels and a plurality of white pixels;

converting the plurality of black pixels and the plurality of white pixels of the 2D code to a first plurality of binary arrays, wherein the plurality of black pixels and the plurality of white pixels correspond to different binary digits;

parsing a target image to identify a plurality of black pixels and a plurality of white pixels, wherein the target image includes a predetermined pattern;

converting the plurality of black pixels and the plurality of white pixels of the target image to a second plurality of binary arrays based on a predetermined rule;

comparing at least a portion of the first plurality of binary arrays and a portion of the second plurality of binary arrays; and

generating an authentication image based on comparing the portion of the first plurality of binary arrays and the portion of the second plurality of binary arrays, including:

generating black pixels in the authentication image for locations that are black in the target image but white in the 2D code,

generating white pixels in the authentication image for locations that are white in the target image but black in the 2D code, and

generating transparent pixels in the authentication image for locations having matching colors in the target image and in the 2D code.

9. The non-transitory, computer-readable medium of claim 8 , wherein the predetermined rule includes converting each black pixel to binary digit 1 and converting each white pixel to binary digit 0.

10. The non-transitory, computer-readable medium of claim 8 , wherein each binary array of the first plurality of binary arrays corresponds to a line of pixels in the 2D code.

11. The non-transitory, computer-readable medium of claim 8 , wherein a number of pixels identified from the target image is the same as a number of pixels identified from the 2D code.

12. The non-transitory, computer-readable medium of claim 8 , wherein a number of pixels identified from the target image is different from a number of pixels identified from the 2D code, and the number of pixels identified from the target image is converted to be the same as the number of pixels identified from the 2D code.

13. The non-transitory, computer-readable medium of claim 8 , further comprising:

overlapping the authentication image with the 2D code to form an overlapped image;

determining the 2D code is unmodified if the overlapped image includes the predetermined pattern; and

determining the 2D code is modified if the overlapped image does not include the predetermined pattern.

14. The non-transitory, computer-readable medium of claim 13 , wherein the authentication image is printed on a transparent paper and overlapped with the 2D code printed on a paper to form the overlapped image.

15. 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:

parsing a two-dimensional (2D) code to identify a plurality of black pixels and a plurality of white pixels;

converting the plurality of black pixels and the plurality of white pixels of the 2D code to a first plurality of binary arrays, wherein the plurality of black pixels and the plurality of white pixels correspond to different binary digits;

parsing a target image to identify a plurality of black pixels and a plurality of white pixels, wherein the target image includes a predetermined pattern;

converting the plurality of black pixels and the plurality of white pixels of the target image to a second plurality of binary arrays based on a predetermined rule;

comparing at least a portion of the first plurality of binary arrays and a portion of the second plurality of binary arrays; and

generating an authentication image based on comparing the portion of the first plurality of binary arrays and the portion of the second plurality of binary arrays, including:

generating black pixels in the authentication image for locations that are black in the target image but white in the 2D code,

generating white pixels in the authentication image for locations that are white in the target image but black in the 2D code, and

generating transparent pixels in the authentication image for locations having matching colors in the target image and in the 2D code.

16. The computer-implemented system of claim 15 , wherein the predetermined rule includes converting each black pixel to binary digit 1 and converting each white pixel to binary digit 0.

17. The computer-implemented system of claim 15 , wherein each binary array of the first plurality of binary arrays corresponds to a line of pixels in the 2D code.

18. The computer-implemented system of claim 15 , wherein a number of pixels identified from the target image is the same as a number of pixels identified from the 2D code.

19. The computer-implemented system of claim 15 , wherein a number of pixels identified from the target image is different from a number of pixels identified from the 2D code, and the number of pixels identified from the target image is converted to be the same as the number of pixels identified from the 2D code.

20. The computer-implemented system of claim 15 , further comprising:

overlapping the authentication image with the 2D code to form an overlapped image;

determining the 2D code is unmodified if the overlapped image includes the predetermined pattern; and

determining the 2D code is modified if the overlapped image does not include the predetermined pattern.

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 Jul 20, 2018
From: GUO, WEI
To: ALIBABA GROUP HOLDING LIMITED
Reel/Frame 046409/0466 →
Priority Claims (1)
CN 2017 1 0076533 · Feb 13, 2017 · national
Continuity (1)
Related Publication 20180232611A1 · Aug 16, 2018
Cited By (1)
US 12,254,435