IP Library › Granted Patent US 11,049,235
Granted Patent B2
US 11,049,235 · App. 17/083,568 · Granted Jun 29, 2021

Techniques for extracting contextually structured data from document images

Inventors: David James Wheaton (Pittsboro, NC); William Robert Nadolski (Raleigh, NC); Heather Michelle GoodyKoontz (Raleigh, NC)
Assignee: SAS INSTITUTE INC.
G06T7/0002G06F16/81G06F16/93G06F40/169G06F40/186G06F40/284G06K9/00483G06K9/6253G06K9/6276G06K9/685G06K2209/01G06T2207/30168G06T2207/30176
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 11,049,235
App. No.
17/083,568
Granted
Jun 29, 2021
Kind
B2
Abstract

Embodiments are generally directed to techniques for extracting contextually structured data from document images, such as by automatically identifying document layout, document data, and/or document metadata in a document image, for instance. Many embodiments are particularly directed to generating and utilizing a document template database for automatically extracting document image contents into a contextually structured format. For example, the document template database may include a plurality of templates for identifying/explaining key data elements in various document image formats that can be used to extract contextually structured data from incoming document images with a matching document image format. Several embodiments are particularly directed to automatically identifying and associating document metadata with corresponding document data in a document image, such as for generating a machine-facilitated annotation of the document image. In some embodiments, the machine-facilitated annotation of a document may be used to generate a template for the template database.

Claims (93)

1. An apparatus comprising a processor and a storage to store instructions that, when executed by the processor, cause the processor to perform operations comprising:

identify semi-structured data generated by optical character recognition, the semi-structured data comprising a set of word tokens for each document image in a standardized-filtered collection of document images;

remove the set of word tokens from each document image in the standardized-filtered collection of document images to produce a collection of document structures that corresponds to the standardized-filtered collection of document images;

hash each document structure in the collection of document structures to produce a collection of image hashes;

compute a hamming distance between each pair of image hashes in the collection of image hashes;

cluster the document structures based on the hamming distances to determine a set of candidate templates from the collection of document structures, wherein each candidate template in the set of templates corresponds to a different cluster of document structures;

for each candidate template in the set of candidate templates:

identify one or more occurrences for each common word in a set of common words in each document image in the standardized-filtered collection that corresponds to a respective candidate template in the set of candidate templates based on corresponding word tokens,

create a table for the set of common words, the table comprising locations of the one or more occurrences for each common word in the set of common words for each document image in the standardized-filtered collection that corresponds to the respective candidate template in the set of candidate templates,

perform a first set of linear regressions based on locations of the set of common words in the table, wherein performance of the first set of linear regressions determines a residual for each of the locations in the table,

remove locations from the table that exceed a threshold residual determined based on the first linear regression to produce an updated table,

perform a second set of linear regressions based on locations of the respective common word in the updated table,

identify a linear transformation between document images in the standardized-filtered collection that correspond to the respective candidate template in the set of candidate templates based on the second set of linear regressions,

determine the respective candidate template is an actual template based, at least in part, on the linear transformation,

generate a prompt for user input to annotate the actual template with one or more annotations to produce an annotated template in response to confirmation of the respective candidate template,

produce the annotated template based on user input received in response to the prompt, and

store a representative document image hash, a representative document structure, the annotated template, and a list of metadata words with locations for the annotated template in a template database; and

utilize the template database to extract document image contents into a contextually structured format from each document image in the collection of document images that corresponds to one of the annotated templates.

2. The apparatus of claim 1 , wherein the table is created with at least two occurrences of each common word from each document image in the standardized-filtered collection that corresponds to a respective candidate template in the set of candidate templates.

3. The apparatus of claim 2 , wherein the two occurrences of the respective common word are the first occurrence and the last occurrence of the respective common word in each document image in the standardized-filtered collection that corresponds to a respective candidate template in the set of candidate templates.

4. The apparatus of claim 1 , wherein the processor is caused to perform operations comprising generate a blended image for the respective candidate template based on each document image that corresponds to the respective candidate template.

5. The apparatus of claim 4 , wherein the processor is caused to perform operations comprising generate a prompt for user input to determine the respective candidate template is an actual template.

6. The apparatus of claim 4 , wherein the processor is caused to perform operations comprising:

utilize the blended image to confirm the respective candidate template; and

generate a pixel mask based on the blended image.

7. The apparatus of claim 6 , wherein the pixel mask comprises a three-dimensional pixel mask with a first dimension that corresponds to data, a second dimension that corresponds to metadata, and a third dimension that corresponds to document structure.

8. The apparatus of claim 1 , wherein the processor is caused to perform operations to produce the standardized-filtered collection of document images comprising:

remove one or more document images in a collection of document images based on a set of document image requirements to produce a filtered collection of document images, wherein the set of document image requirements includes a minimum image quality for each document image in the filtered collection; and

standardize each document image in the filtered collection of document images based on a set of document image standards to produce the standardized-filtered collection of document images, wherein the set of document image standards includes a standard image size.

9. The apparatus of claim 1 , wherein the first set of linear regressions comprises a first x-axis linear regression and a first y-axis linear regression and the second set of linear regressions comprise a second x-axis linear regression and a second y-axis linear regression.

10. The apparatus of claim 1 , wherein the contextually structured format distinguishes data words in a document image from metadata words in the document image and correlates each data word in the document image with at least one annotation in the document.

11. A computer-implemented method, comprising:

identifying semi-structured data generated by optical character recognition, the semi-structured data comprising a set of word tokens for each document image in a standardized-filtered collection of document images;

removing the set of word tokens from each document image in the standardized-filtered collection of document images to produce a collection of document structures that corresponds to the standardized-filtered collection of document images;

hashing each document structure in the collection of document structures to produce a collection of image hashes;

computing a hamming distance between each pair of image hashes in the collection of image hashes;

clustering the document structures based on the hamming distances to determine a set of candidate templates from the collection of document structures, wherein each candidate template in the set of templates corresponds to a different cluster of document structures;

for each candidate template in the set of candidate templates:

identifying one or more occurrences for each common word in a set of common words in each document image in the standardized-filtered collection that corresponds to a respective candidate template in the set of candidate templates based on corresponding word tokens,

creating a table for the set of common words, the table comprising locations of the one or more occurrences for each common word in the set of common words for each document image in the standardized-filtered collection that corresponds to the respective candidate template in the set of candidate templates,

performing a first set of linear regressions based on locations of the set of common words in the table, wherein performance of the first set of linear regressions determines a residual for each of the locations in the table,

removing locations from the table that exceed a threshold residual determined based on the first linear regression to produce an updated table,

performing a second set of linear regressions based on locations of the respective common word in the updated table,

identifying a linear transformation between document images in the standardized-filtered collection that correspond to the respective candidate template in the set of candidate templates based on the second set of linear regressions,

determining the respective candidate template is an actual template based, at least in part, on the linear transformation,

generating a prompt for user input to annotate the actual template with one or more annotations to produce an annotated template in response to confirmation of the respective candidate template,

producing the annotated template based on user input received in response to the prompt, and

storing a representative document image hash, a representative document structure, the annotated template, and a list of metadata words with locations for the annotated template in a template database; and

utilizing the template database to extract document image contents into a contextually structured format from each document image in the collection of document images that corresponds to one of the annotated templates.

12. The computer-implemented method of claim 11 , wherein the table is created with at least two occurrences of each common word from each document image in the standardized-filtered collection that corresponds to a respective candidate template in the set of candidate templates.

13. The computer-implemented method of claim 12 , wherein the two occurrences of the respective common word are the first occurrence and the last occurrence of the respective common word in each document image in the standardized-filtered collection that corresponds to a respective candidate template in the set of candidate templates.

14. The computer-implemented method of claim 11 , comprising generating a blended image for the respective candidate template based on each document image that corresponds to the respective candidate template.

15. The computer-implemented method of claim 14 , comprising generating a prompt for user input to determine the respective candidate template is an actual template.

16. The computer-implemented method of claim 14 , comprising:

utilizing the blended image to confirm the respective candidate template; and

generating a pixel mask based on the blended image.

17. The computer-implemented method of claim 16 , wherein the pixel mask comprises a three-dimensional pixel mask with a first dimension that corresponds to data, a second dimension that corresponds to metadata, and a third dimension that corresponds to document structure.

18. The computer-implemented method of claim 11 , wherein producing the standardized-filtered collection of document images comprises:

removing one or more document images in a collection of document images based on a set of document image requirements to produce a filtered collection of document images, wherein the set of document image requirements includes a minimum image quality for each document image in the filtered collection; and

standardizing each document image in the filtered collection of document images based on a set of document image standards to produce the standardized-filtered collection of document images, wherein the set of document image standards includes a standard image size.

19. The computer-implemented method of claim 11 , wherein the first set of linear regressions comprises a first x-axis linear regression and a first y-axis linear regression and the second set of linear regressions comprise a second x-axis linear regression and a second y-axis linear regression.

20. The computer-implemented method of claim 11 , wherein the contextually structured format distinguishes data words in a document image from metadata words in the document image and correlates each data word in the document image with at least one annotation in the document.

21. A computer-program product tangibly embodied in a non-transitory machine-readable storage medium, the computer-program product including instructions operable to cause a processor to perform operations comprising:

identify semi-structured data generated by optical character recognition, the semi-structured data comprising a set of word tokens for each document image in a standardized-filtered collection of document images;

remove the set of word tokens from each document image in the standardized-filtered collection of document images to produce a collection of document structures that corresponds to the standardized-filtered collection of document images;

hash each document structure in the collection of document structures to produce a collection of image hashes;

compute a hamming distance between each pair of image hashes in the collection of image hashes;

cluster the document structures based on the hamming distances to determine a set of candidate templates from the collection of document structures, wherein each candidate template in the set of templates corresponds to a different cluster of document structures;

for each candidate template in the set of candidate templates:

identify one or more occurrences for each common word in a set of common words in each document image in the standardized-filtered collection that corresponds to a respective candidate template in the set of candidate templates based on corresponding word tokens,

create a table for the set of common words, the table comprising locations of the one or more occurrences for each common word in the set of common words for each document image in the standardized-filtered collection that corresponds to the respective candidate template in the set of candidate templates,

perform a first set of linear regressions based on locations of the set of common words in the table, wherein performance of the first set of linear regressions determines a residual for each of the locations in the table,

remove locations from the table that exceed a threshold residual determined based on the first linear regression to produce an updated table,

perform a second set of linear regressions based on locations of the respective common word in the updated table,

identify a linear transformation between document images in the standardized-filtered collection that correspond to the respective candidate template in the set of candidate templates based on the second set of linear regressions,

determine the respective candidate template is an actual template based, at least in part, on the linear transformation,

generate a prompt for user input to annotate the actual template with one or more annotations to produce an annotated template in response to confirmation of the respective candidate template,

produce the annotated template based on user input received in response to the prompt, and

store a representative document image hash, a representative document structure, the annotated template, and a list of metadata words with locations for the annotated template in a template database; and

utilize the template database to extract document image contents into a contextually structured format from each document image in the collection of document images that corresponds to one of the annotated templates.

22. The computer-program product of claim 21 , wherein the table is created with at least two occurrences of each common word from each document image in the standardized-filtered collection that corresponds to a respective candidate template in the set of candidate templates.

23. The computer-program product of claim 22 , wherein the two occurrences of the respective common word are the first occurrence and the last occurrence of the respective common word in each document image in the standardized-filtered collection that corresponds to a respective candidate template in the set of candidate templates.

24. The computer-program product of claim 21 , including instructions operable to cause the processor to perform operations comprising generate a blended image for the respective candidate template based on each document image that corresponds to the respective candidate template.

25. The computer-program product of claim 24 , including instructions operable to cause the processor to perform operations comprising generate a prompt for user input to determine the respective candidate template is an actual template.

26. The computer-program product of claim 24 , including instructions operable to cause the processor to perform operations comprising:

utilize the blended image to confirm the respective candidate template; and

generate a pixel mask based on the blended image.

27. The computer-program product of claim 26 , wherein the pixel mask comprises a three-dimensional pixel mask with a first dimension that corresponds to data, a second dimension that corresponds to metadata, and a third dimension that corresponds to document structure.

28. The computer-program product of claim 21 , including instructions operable to cause the processor to perform operations to produce the standardized-filtered collection of document images comprising:

remove one or more document images in a collection of document images based on a set of document image requirements to produce a filtered collection of document images, wherein the set of document image requirements includes a minimum image quality for each document image in the filtered collection; and

standardize each document image in the filtered collection of document images based on a set of document image standards to produce the standardized-filtered collection of document images, wherein the set of document image standards includes a standard image size.

29. The computer-program product of claim 21 , wherein the first set of linear regressions comprises a first x-axis linear regression and a first y-axis linear regression and the second set of linear regressions comprise a second x-axis linear regression and a second y-axis linear regression.

30. The computer-program product of claim 21 , wherein the contextually structured format distinguishes data words in a document image from metadata words in the document image and correlates each data word in the document image with at least one annotation in the document.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Dec 21, 2020
From: WHEATON, DAVID JAMES; NADOLSKI, WILLIAM ROBERT; GOODYKOONTZ, HEATHER MICHELLE
To: SAS INSTITUTE INC.
Reel/Frame 054705/0840 →
Continuity (4)
Provisional Application 62894418 · Aug 30, 2019
Provisional Application 62991259 · Mar 18, 2020
Provisional Application 62922941 · Sep 9, 2019
Related Publication 20210110527A1 · Apr 15, 2021
Cited By (7)
US 12,197,481 US 12,211,242 US 12,266,432 US 12,306,882 US 12,307,801 US 12,339,887 US 12,493,737