CN110781726A - Image data identification method and device based on OCR (optical character recognition), and computer equipment - Google Patents

Image data identification method and device based on OCR (optical character recognition), and computer equipment Download PDF

Info

Publication number
CN110781726A
CN110781726A CN201910858699.8A CN201910858699A CN110781726A CN 110781726 A CN110781726 A CN 110781726A CN 201910858699 A CN201910858699 A CN 201910858699A CN 110781726 A CN110781726 A CN 110781726A
Authority
CN
China
Prior art keywords
picture
standardized
identified
recognized
pictures
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201910858699.8A
Other languages
Chinese (zh)
Inventor
张�杰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
OneConnect Smart Technology Co Ltd
Original Assignee
OneConnect Smart Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by OneConnect Smart Technology Co Ltd filed Critical OneConnect Smart Technology Co Ltd
Priority to CN201910858699.8A priority Critical patent/CN110781726A/en
Publication of CN110781726A publication Critical patent/CN110781726A/en
Priority to PCT/CN2020/087132 priority patent/WO2021047182A1/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/40Document-oriented image-based pattern recognition
    • G06V30/41Analysis of document content
    • G06V30/413Classification of content, e.g. text, photographs or tables
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/04Billing or invoicing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/60Type of objects
    • G06V20/62Text, e.g. of license plates, overlay texts or captions on TV images
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/10Character recognition

Abstract

The invention discloses an OCR-based picture data recognition method, an OCR-based picture data recognition device, computer equipment and a storage medium. The method comprises the steps that non-forward pictures in a picture set to be identified are rotated to obtain a standard forward picture, and a standard picture set to be identified is obtained through updating; acquiring picture types respectively corresponding to the standardized pictures to be identified; acquiring identification values corresponding to designated areas in the standardized pictures to be identified through image identification; and respectively filling identification values corresponding to the standardized pictures to be identified into the corresponding sub data tables for storage, respectively summing the identification values of the sub data tables, and then accumulating and summing to obtain an actual sum value corresponding to the total data table. The method realizes that the non-forward pictures are rotated to obtain the standard forward picture, and then the invoice amount is identified and the accounting is carried out through the image identification technology, so that the accounting efficiency is improved, and the accounting accuracy is high.

Description

Image data identification method and device based on OCR (optical character recognition), and computer equipment
Technical Field
The invention relates to the technical field of image recognition, in particular to an OCR-based image data recognition method and device, computer equipment and a storage medium.
Background
When the financial reimbursement is carried out, the reimbursement staff need to fill in the reimbursement form and paste the invoice, and then the financial staff audits and calculates whether the amount of the invoice is consistent with the amount of money in the form, and the invoice amount must be equal to the amount of money reimbursed in the form so as to carry out the subsequent reimbursement process.
At present, an online office collaboration system has appeared, in which there are also functional modules for online reimbursement. When the user reimburses on the system, the user needs to fill in reimbursement information and upload a scanning file of an invoice provided by reimbursement. However, when the financial staff uses the online reimbursement function module, the reimbursement information filled by the reimbursement staff and the scanning file are only stored in the server of the online office coordination system for the user to inquire the historical data, the information in the reimbursement information is not utilized for automatic accounting of the money amount, the manual accounting is still needed according to the reimbursement form and the pasted invoice, and the manual accounting process is complicated, so that the accounting efficiency is low, and errors are easy to occur.
Disclosure of Invention
The embodiment of the invention provides an OCR-based picture data identification method, an OCR-based picture data identification device, computer equipment and a storage medium, and aims to solve the problems that in a functional module of online reimbursement of an online office coordination system in the prior art, reimbursement information filled by reimbursers and scanning files are only stored for a user to inquire historical data, manual accounting is still needed according to reimbursement forms and pasted invoices, the process of manual accounting is complicated, the accounting efficiency is low, and errors are easy to occur.
In a first aspect, an embodiment of the present invention provides an OCR-based picture data recognition method, which includes:
receiving a picture set to be identified uploaded by an uploading terminal;
rotating the non-forward pictures in the picture set to be recognized to obtain a standard forward picture so as to update the picture set to be recognized to obtain a standard picture set to be recognized;
acquiring the picture types respectively corresponding to the standardized pictures to be identified in the standardized picture set to be identified; the image types comprise a first image type corresponding to a value-added tax special invoice or a value-added tax common invoice, a second image type corresponding to a machine invoice and a third image type corresponding to a quota invoice;
acquiring identification values corresponding to preset designated areas in the standardized pictures to be identified in the standardized picture set to be identified through image identification;
acquiring the number of pictures of each picture type in the standardized picture set to be recognized to obtain the total number of the pictures, and creating a sub data table with corresponding line number according to the number of the pictures of each picture type to form a total data table;
respectively filling identification values corresponding to the standardized pictures to be identified into corresponding sub data tables for storage, respectively summing the identification values of the sub data tables, and then accumulating and summing to obtain an actual sum value corresponding to a total data table; and
and sending the actual sum value to an uploading end.
In a second aspect, an embodiment of the present invention provides an OCR-based picture data recognition apparatus, including:
the picture set receiving unit is used for receiving the picture set to be identified uploaded by the uploading terminal;
the image standardization unit is used for rotating non-forward images in the image set to be identified to obtain a standard forward image so as to update the image set to be identified to obtain a standardized image set to be identified;
the image type acquisition unit is used for acquiring the image types corresponding to the standardized images to be identified in the standardized image set to be identified; the image types comprise a first image type corresponding to a value-added tax special invoice or a value-added tax common invoice, a second image type corresponding to a machine invoice and a third image type corresponding to a quota invoice;
the identification value acquisition unit is used for acquiring identification values corresponding to preset designated areas in the standardized pictures to be identified in the standardized picture set to be identified through image identification;
a total data table obtaining unit, configured to obtain the number of pictures of each picture type in the standardized set of pictures to be recognized to obtain a total number of pictures, and create a sub data table with a corresponding number of lines according to the number of pictures of each picture type to form a total data table;
the summing unit is used for respectively filling the identification values corresponding to the standardized pictures to be identified into the corresponding sub data tables for storage, respectively summing the identification values of the sub data tables, and then accumulating and summing to obtain an actual sum value corresponding to the total data table; and
and the sum value sending unit is used for sending the actual sum value to an uploading end.
In a third aspect, an embodiment of the present invention further provides a computer device, which includes a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor, when executing the computer program, implements the OCR-based picture data recognition method according to the first aspect.
In a fourth aspect, the present invention further provides a computer-readable storage medium, where the computer-readable storage medium stores a computer program, and the computer program, when executed by a processor, causes the processor to execute the OCR-based picture data recognition method according to the first aspect.
The embodiment of the invention provides an OCR-based picture data identification method and device, computer equipment and a storage medium. The method realizes that the non-forward pictures are rotated to obtain the standard forward picture, and then the invoice amount is identified and the accounting is carried out through the image identification technology, so that the accounting efficiency is improved, and the accounting accuracy is high.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic view of an application scenario of an OCR-based picture data recognition method according to an embodiment of the present invention;
fig. 2 is a schematic flowchart of an OCR-based picture data recognition method according to an embodiment of the present invention;
FIG. 3 is a schematic flow chart of a method for recognizing image data based on OCR according to an embodiment of the present invention;
FIG. 4a is a schematic diagram of a non-forward picture in the OCR-based picture data recognition method according to the embodiment of the present invention;
fig. 4b is a schematic diagram of a standard forward picture in the OCR-based picture data recognition method according to the embodiment of the present invention;
FIG. 5 is a sub-flow diagram of an OCR-based image data recognition method according to an embodiment of the present invention;
FIG. 6 is a schematic block diagram of an OCR-based picture data recognition apparatus according to an embodiment of the present invention;
FIG. 7 is another schematic block diagram of an OCR-based picture data recognition apparatus according to an embodiment of the present invention;
FIG. 8 is a schematic block diagram of sub-units of an OCR-based picture data recognition apparatus according to an embodiment of the present invention;
FIG. 9 is a schematic block diagram of a computer device provided by an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It will be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It is also to be understood that the terminology used in the description of the invention herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in the specification of the present invention and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It should be further understood that the term "and/or" as used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
Referring to fig. 1 and fig. 2, fig. 1 is a schematic view of an application scenario of an OCR-based image data recognition method according to an embodiment of the present invention; fig. 2 is a schematic flowchart of an OCR-based image data recognition method according to an embodiment of the present invention, where the OCR-based image data recognition method is applied to a server, and the method is executed by application software installed in the server.
As shown in fig. 2, the method includes steps S110 to S170.
And S110, receiving the picture set to be identified uploaded by the uploading end.
In this embodiment, when the specific application scenario is financial reimbursement, an uploading end (such as a smart phone, a tablet computer, or the like) needs to be operated to directly upload an invoice scanning file or a photo to the server on line, and then the desired amount of money required for reimbursement can be selected and filled. The server carries out the calculation of the reimbursement amount according to the uploaded invoice scanning file or photo without manual accounting of the user.
And S120, rotating the non-forward pictures in the picture set to be recognized to obtain a standard forward picture so as to update the picture set to be recognized to obtain a standardized picture set to be recognized.
In this embodiment, since there may be pictures in the to-be-identified picture set whose scanning direction is not the positive direction, the server needs to uniformly rotate all the non-positive pictures in the to-be-identified picture set to obtain a standard positive picture, so as to realize the standard forward of all the to-be-identified pictures.
In an embodiment, as shown in fig. 3, step S120 further includes:
s1201, judging whether a non-forward picture exists in the picture set to be identified; if the non-forward picture exists in the picture set to be identified, executing step S1202; if no non-forward picture exists in the picture set to be identified, executing step S130;
and S1202, acquiring a rotation angle according to the position of the first line of characters corresponding to the non-forward picture and the corresponding position of the same characters in the corresponding standard forward picture.
In this embodiment, when the to-be-identified picture set is uploaded by the upload terminal, the scanning direction of the invoice scanning file included in the to-be-identified picture set may not be a positive direction (the positive direction of the invoice scanning file refers to an included angle between a direction line obtained by connecting central points of characters of a ticket head and a bottom edge of a page of the scanning file is 0, that is, the positive direction of the invoice scanning file and the direction line are parallel to each other, and the ticket head is located at the top of the scanning file), at this time, a non-positive picture in the to-be-identified picture set needs to be correspondingly rotated, for example.
At this time, the rotation angle may be obtained according to the position of the first line of characters corresponding to the non-forward picture and the corresponding position of the same character in the corresponding standard forward picture. For example, as shown in fig. 4a, the first line of characters identified in the non-forward picture is "the X-th link: XX in parallel; these characters are in the middle of the upper side of the non-forward picture. And refer to "X connection: XX together "these same text corresponding positions are in the middle right in the standard forward picture.
In one embodiment, step S1201 includes:
and acquiring the first line characters of each picture to be recognized in the picture set to be recognized through image recognition, and taking the corresponding picture to be recognized as a non-forward picture if the first line characters of the picture to be recognized do not comprise the keywords in the preset first keyword list.
In this embodiment, the OCR image recognition model is used to recognize the first line of characters of each to-be-recognized picture in the to-be-recognized picture set first, and the OCR technology is used to scan the first line of characters from left to right line by line.
The OCR technology is an abbreviation for Optical Character Recognition (Optical Character Recognition), and is a computer input technology that converts characters of various bills, newspapers, books, manuscripts, and other printed matters into image information by an Optical input method such as scanning, and then converts the image information into usable computer information by using a Character Recognition technology. Can be applied to the fields of inputting and processing bank notes, a large amount of text data, file files and documentaries. It is suitable for automatic scanning, identification and long-term storage of a large number of bill forms in the industries of banks, tax administration and the like.
If the first-line character does not include the keywords in the preset first keyword list (for example, the first keyword list set in advance includes the keywords such as special invoice, common invoice, quota invoice and the like), it indicates that the picture to be identified is a non-forward picture.
With reference to fig. 4a and 4b, when the rotation angle is obtained according to the position of the first line of characters corresponding to the non-forward picture and the corresponding position of the same character in the corresponding standard forward picture, it is known that the rotation angle is-90 degrees (where the actual angle obtained by the position of the first line of characters corresponding to the non-forward picture and the corresponding position of the same character in the corresponding standard forward picture is 90 degrees in the counterclockwise direction, and if the actual angle is 90 degrees in the counterclockwise direction, the actual angle needs to be rotated by 90 degrees in the clockwise direction in order to rotate the non-forward picture into the standard forward picture), the non-forward pictures in the picture set to be identified are subjected to picture rotation according to the corresponding rotation angle, so as to obtain the standardized picture set to be identified.
S130, acquiring picture types corresponding to the standardized pictures to be identified in the standardized picture set to be identified respectively; the image types comprise a first image type corresponding to a value-added tax special invoice or a value-added tax common invoice, a second image type corresponding to a machine invoice and a third image type corresponding to a quota invoice.
In this embodiment, please refer to fig. 4b, for example, the invoice printed by the vehicle-mounted terminal of the taxi is a machine-printed invoice, the invoice issued by the general taxpayer to the individual or other general taxpayer is a value-added tax special invoice or a value-added tax general invoice, and the parking invoice is a quota invoice. The invoice content generally includes: the ticket head, the character track number, the number and the purpose of association, the name of a client, the account number of bank account opening, the name of a business (product) or an operation item, a metering unit, the quantity, the unit price, the amount of money, capital and small amount of money, a passer-by, a unit seal, the date of invoicing and the like. The special value-added tax invoice used by the unit for implementing the value-added tax also has the contents of tax type, tax rate, tax amount and the like. When the picture types of the standardized pictures to be recognized in the standardized picture set to be recognized are recognized, accurate recognition can be achieved according to the ticket heads.
In one embodiment, step S130 includes:
and recognizing the ticket head of each standardized picture to be recognized through an OCR image recognition model so as to obtain the picture type corresponding to each standardized picture to be recognized.
In this embodiment, when the picture types respectively corresponding to the pictures to be recognized in the picture set to be recognized are obtained, the ticket heads of the standardized pictures to be recognized can be recognized through the OCR image recognition model, and thus the picture types respectively corresponding to the pictures to be recognized in the picture set to be recognized can be obtained. For example, a ticket header of a certain standardized picture to be recognized is a XXX value added tax special invoice, which indicates that the picture type of the standardized picture to be recognized is the first picture type.
And S140, acquiring identification numerical values respectively corresponding to the preset designated areas in the standardized pictures to be identified in the standardized picture set to be identified through image identification.
In this embodiment, after the OCR image recognition model recognizes the picture content text of each standardized picture to be recognized, the keyword is included in the summary, or the keyword is included in the price and tax summary. After the position of the aggregated or tax-aggregated keyword in the text of the picture content corresponding to each standardized picture to be identified is located, the identification value (for example, the value shown in the tax aggregation column in fig. 4 b) after the aggregated or tax-aggregated keyword can be obtained. The corresponding identification numerical value can be accurately acquired by identifying the text of the preset designated area in the standardized picture to be identified.
In one embodiment, as shown in fig. 5, step S140 includes:
s141, obtaining picture content texts corresponding to the standardized pictures to be recognized in the standardized picture set to be recognized respectively;
and S142, positioning and obtaining the text content, which is the same as the keywords in the preset second keyword list, in the picture content text of each standardized picture to be recognized, and taking the corresponding numerical value behind the text content as the corresponding recognition numerical value of each standardized picture to be recognized.
In this embodiment, after the image content text of each standardized image to be recognized is recognized by the OCR image recognition model, the keyword set in the second keyword list of "price and tax total" is respectively located in each image content text, and after the keyword of "price and tax total" is located, the numerical value (for example, 300.14) after the keyword is respectively obtained, and the numerical value after the text content is taken as the recognition numerical value corresponding to each standardized image to be recognized. By the image identification mode, the identification numerical values corresponding to the standardized pictures to be identified can be effectively and efficiently identified.
S150, obtaining the number of the pictures of each picture type in the standardized picture set to be recognized to obtain the total number of the pictures, and creating a sub data table with corresponding line numbers according to the number of the pictures of each picture type to form a total data table.
In this embodiment, the sub-data table corresponding to each picture type is created to correspondingly store the identification value of the standardized picture to be identified of the type, so as to facilitate the subsequent summation. For example, 10 standardized pictures to be identified of the first picture type are respectively identified to obtain 10 identification values, and the 10 identification values are stored in a first sub data table corresponding to the first picture type; and obtaining a second sub data table corresponding to the second picture type and a third sub data table corresponding to the third picture type in the same way, wherein the first sub data table, the second sub data table and the third sub data table form a total data table.
And S160, respectively filling the identification values corresponding to the standardized pictures to be identified into the corresponding sub data tables for storage, respectively summing the identification values of the sub data tables, and then accumulating and summing to obtain an actual sum value corresponding to the total data table.
In this embodiment, the identification values of the sub-data tables are summed respectively and then accumulated to sum, so that the sum of the identification values corresponding to the standardized to-be-identified pictures in the standardized to-be-identified picture set can be obtained, that is, the total invoice amount of all uploaded invoice scanning files is obtained and recorded as the actual sum value.
And S170, sending the actual sum value to an uploading end.
In this embodiment, when the total invoice amount accounting is completed according to the uploaded to-be-identified picture set in the server, the actual total value may be sent to the uploading end to notify the server that the automatic invoice amount verification is completed, and the user may perform the next operation.
In an embodiment, step S170 is followed by:
receiving a target numerical value uploaded by an uploading terminal;
judging whether the actual sum value is smaller than the target value;
if the actual sum value is larger than or equal to the target value, sending first notification information for notifying that the audit is passed to an uploading end;
and if the actual sum value is smaller than the target value, sending second notification information for notifying that the audit is not passed to an uploading end.
In this embodiment, after the uploading end receives the actual sum value, it may also select to set an expected amount (understood as a target value) of the expected reimbursement, where the target value is directly uploaded to the server and then compared with the actual sum value calculated before. If the actual sum value is greater than or equal to the target value, the expected amount of the expected reimbursement is less than or equal to the actual sum value, and the reimbursement process can be passed through the auditing and continued. If the actual sum value is smaller than the target value, the expected amount of the expected reimbursement is larger than the actual sum value, and if the actual sum value is smaller than the target value, the user cannot be audited and is prompted to continue uploading another picture set to be identified, or the target value is reduced until the actual sum value is smaller than or equal to the target value, and then the reimbursement process can be continued.
The method realizes that the non-forward pictures are rotated to obtain the standard forward picture, and then the invoice amount is identified and the accounting is carried out through the image identification technology, so that the accounting efficiency is improved, and the accounting accuracy is high.
The embodiment of the invention also provides an OCR-based picture data recognition device, which is used for executing any embodiment of the OCR-based picture data recognition method. Specifically, referring to fig. 6, fig. 6 is a schematic block diagram of an OCR-based picture data recognition apparatus according to an embodiment of the present invention. The OCR-based picture data recognition apparatus 100 may be configured in a server.
As shown in fig. 6, the OCR-based picture data recognition apparatus 100 includes a picture set receiving unit 110, a picture normalizing unit 120, a picture type acquiring unit 130, a recognition numerical value acquiring unit 140, a total data table acquiring unit 150, a summing unit 160, and a value transmitting unit 170.
The image set receiving unit 110 is configured to receive an image set to be identified uploaded by an uploading end.
In this embodiment, when the specific application scenario is financial reimbursement, an uploading end (such as a smart phone, a tablet computer, or the like) needs to be operated to directly upload an invoice scanning file or a photo to the server on line, and then the desired amount of money required for reimbursement can be selected and filled. The server carries out the calculation of the reimbursement amount according to the uploaded invoice scanning file or photo without manual accounting of the user.
The picture normalization unit 120 is configured to rotate all non-forward pictures in the picture set to be identified to obtain a standard forward picture, so as to update the picture set to be identified to obtain a normalized picture set to be identified.
In this embodiment, since there may be pictures in the to-be-identified picture set whose scanning direction is not the positive direction, the server needs to uniformly rotate all the non-positive pictures in the to-be-identified picture set to obtain a standard positive picture, so as to realize the standard forward of all the to-be-identified pictures.
In an embodiment, as shown in fig. 7, the OCR-based picture data recognition apparatus 100 further includes:
a non-forward picture judging unit 1201, configured to judge whether a non-forward picture exists in the to-be-identified picture set; if the non-forward pictures exist in the picture set to be identified, executing a step of acquiring a rotation angle according to the position of the first line of characters corresponding to the non-forward pictures and the corresponding position of the same characters in the corresponding standard forward pictures; if the non-forward pictures do not exist in the picture set to be recognized, the step of obtaining the picture types respectively corresponding to the standardized pictures to be recognized in the standardized picture set to be recognized is executed;
a rotation angle obtaining unit 1202, configured to obtain a rotation angle according to a position of a first row of characters corresponding to the non-forward picture and a corresponding position of the same character in the corresponding standard forward picture.
In this embodiment, when the to-be-identified picture set is uploaded by the upload terminal, the scanning direction of the invoice scanning file included in the to-be-identified picture set may not be a positive direction (the positive direction of the invoice scanning file refers to an included angle between a direction line obtained by connecting central points of characters of a ticket head and a bottom edge of a page of the scanning file is 0, that is, the positive direction of the invoice scanning file and the direction line are parallel to each other, and the ticket head is located at the top of the scanning file), at this time, a non-positive picture in the to-be-identified picture set needs to be correspondingly rotated, for example.
At this time, the rotation angle may be obtained according to the position of the first line of characters corresponding to the non-forward picture and the corresponding position of the same character in the corresponding standard forward picture. For example, as shown in fig. 4a, the first line of characters identified in the non-forward picture is "the X-th link: XX in parallel; these characters are in the middle of the upper side of the non-forward picture. And refer to "X connection: XX together "these same text corresponding positions are in the middle right in the standard forward picture.
In an embodiment, the non-forward picture determining unit 1201 is further configured to:
and acquiring the first line characters of each picture to be recognized in the picture set to be recognized through image recognition, and taking the corresponding picture to be recognized as a non-forward picture if the first line characters of the picture to be recognized do not comprise the keywords in the preset first keyword list.
In this embodiment, the OCR image recognition model is used to recognize the first line of characters of each to-be-recognized picture in the to-be-recognized picture set first, and the OCR technology is used to scan the first line of characters from left to right line by line.
The OCR technology is an abbreviation for Optical Character Recognition (Optical Character Recognition), and is a computer input technology that converts characters of various bills, newspapers, books, manuscripts, and other printed matters into image information by an Optical input method such as scanning, and then converts the image information into usable computer information by using a Character Recognition technology. Can be applied to the fields of inputting and processing bank notes, a large amount of text data, file files and documentaries. It is suitable for automatic scanning, identification and long-term storage of a large number of bill forms in the industries of banks, tax administration and the like.
If the first-line character does not include the keywords in the preset first keyword list (for example, the first keyword list set in advance includes the keywords such as special invoice, common invoice, quota invoice and the like), it indicates that the picture to be identified is a non-forward picture.
With reference to fig. 4a and 4b, when the rotation angle is obtained according to the position of the first line of characters corresponding to the non-forward picture and the corresponding position of the same character in the corresponding standard forward picture, it is known that the rotation angle is-90 degrees (where the actual angle obtained by the position of the first line of characters corresponding to the non-forward picture and the corresponding position of the same character in the corresponding standard forward picture is 90 degrees in the counterclockwise direction, and if the actual angle is 90 degrees in the counterclockwise direction, the actual angle needs to be rotated by 90 degrees in the clockwise direction in order to rotate the non-forward picture into the standard forward picture), the non-forward pictures in the picture set to be identified are subjected to picture rotation according to the corresponding rotation angle, so as to obtain the standardized picture set to be identified.
A picture type obtaining unit 130, configured to obtain picture types corresponding to the standardized pictures to be identified in the standardized picture set to be identified; the image types comprise a first image type corresponding to a value-added tax special invoice or a value-added tax common invoice, a second image type corresponding to a machine invoice and a third image type corresponding to a quota invoice.
In this embodiment, please refer to fig. 4b, for example, the invoice printed by the vehicle-mounted terminal of the taxi is a machine-printed invoice, the invoice issued by the general taxpayer to the individual or other general taxpayer is a value-added tax special invoice or a value-added tax general invoice, and the parking invoice is a quota invoice. The invoice content generally includes: the ticket head, the character track number, the number and the purpose of association, the name of a client, the account number of bank account opening, the name of a business (product) or an operation item, a metering unit, the quantity, the unit price, the amount of money, capital and small amount of money, a passer-by, a unit seal, the date of invoicing and the like. The special value-added tax invoice used by the unit for implementing the value-added tax also has the contents of tax type, tax rate, tax amount and the like. When the picture types of the standardized pictures to be recognized in the standardized picture set to be recognized are recognized, accurate recognition can be achieved according to the ticket heads.
In an embodiment, the picture type obtaining unit 130 is further configured to:
and recognizing the ticket head of each standardized picture to be recognized through an OCR image recognition model so as to obtain the picture type corresponding to each standardized picture to be recognized.
In this embodiment, when the picture types respectively corresponding to the pictures to be recognized in the picture set to be recognized are obtained, the ticket heads of the standardized pictures to be recognized can be recognized through the OCR image recognition model, and thus the picture types respectively corresponding to the pictures to be recognized in the picture set to be recognized can be obtained. For example, a ticket header of a certain standardized picture to be recognized is a XXX value added tax special invoice, which indicates that the picture type of the standardized picture to be recognized is the first picture type.
An identification value obtaining unit 140, configured to obtain, through image identification, identification values corresponding to preset specified regions in each standardized to-be-identified picture in the standardized to-be-identified picture set.
In this embodiment, after the OCR image recognition model recognizes the picture content text of each standardized picture to be recognized, the keyword is included in the summary, or the keyword is included in the price and tax summary. After the position of the aggregated or tax-aggregated keyword in the text of the picture content corresponding to each standardized picture to be identified is located, the identification value (for example, the value shown in the tax aggregation column in fig. 4 b) after the aggregated or tax-aggregated keyword can be obtained. The corresponding identification numerical value can be accurately acquired by identifying the text of the preset designated area in the standardized picture to be identified.
In one embodiment, as shown in fig. 8, the identification value obtaining unit 140 includes:
a picture content text acquiring unit 141, configured to acquire picture content texts corresponding to the standardized pictures to be recognized in the standardized picture set to be recognized;
and the keyword positioning unit 142 is configured to position and acquire text contents, which are the same as keywords in the preset second keyword list, in the image content text of each standardized picture to be recognized, and take a corresponding numerical value after the text contents as a corresponding recognition numerical value of each standardized picture to be recognized.
In this embodiment, after the image content text of each standardized image to be recognized is recognized by the OCR image recognition model, the keyword set in the second keyword list of "price and tax total" is respectively located in each image content text, and after the keyword of "price and tax total" is located, the numerical value (for example, 300.14) after the keyword is respectively obtained, and the numerical value after the text content is taken as the recognition numerical value corresponding to each standardized image to be recognized. By the image identification mode, the identification numerical values corresponding to the standardized pictures to be identified can be effectively and efficiently identified.
A total data table obtaining unit 150, configured to obtain the number of pictures of each picture type in the standardized set of pictures to be recognized to obtain a total number of pictures, and create a sub data table with a corresponding number of lines according to the number of pictures of each picture type to form a total data table.
In this embodiment, the sub-data table corresponding to each picture type is created to correspondingly store the identification value of the standardized picture to be identified of the type, so as to facilitate the subsequent summation. For example, 10 standardized pictures to be identified of the first picture type are respectively identified to obtain 10 identification values, and the 10 identification values are stored in a first sub data table corresponding to the first picture type; and obtaining a second sub data table corresponding to the second picture type and a third sub data table corresponding to the third picture type in the same way, wherein the first sub data table, the second sub data table and the third sub data table form a total data table.
And the summing unit 160 is configured to fill the identification values corresponding to the standardized pictures to be identified into the corresponding sub data tables respectively for storage, and sum the identification values of the sub data tables respectively and then add up the identification values to obtain an actual sum value corresponding to the total data table.
In this embodiment, the identification values of the sub-data tables are summed respectively and then accumulated to sum, so that the sum of the identification values corresponding to the standardized to-be-identified pictures in the standardized to-be-identified picture set can be obtained, that is, the total invoice amount of all uploaded invoice scanning files is obtained and recorded as the actual sum value.
And a sum value sending unit 170, configured to send the actual sum value to the uploading end.
In this embodiment, when the total invoice amount accounting is completed according to the uploaded to-be-identified picture set in the server, the actual total value may be sent to the uploading end to notify the server that the automatic invoice amount verification is completed, and the user may perform the next operation.
In an embodiment, the OCR-based picture data recognition apparatus 100 further includes:
the target value acquisition unit is used for receiving the target value uploaded by the uploading terminal;
a value judgment unit for judging whether the actual sum value is smaller than the target value;
the first notification unit is used for sending first notification information for notifying that the audit is passed to an uploading end if the actual sum value is greater than or equal to the target value;
and the second notification unit is used for sending second notification information for notifying that the audit is not passed to the uploading end if the actual sum value is smaller than the target value.
In this embodiment, after the uploading end receives the actual sum value, it may also select to set an expected amount (understood as a target value) of the expected reimbursement, where the target value is directly uploaded to the server and then compared with the actual sum value calculated before. If the actual sum value is greater than or equal to the target value, the expected amount of the expected reimbursement is less than or equal to the actual sum value, and the reimbursement process can be passed through the auditing and continued. If the actual sum value is smaller than the target value, the expected amount of the expected reimbursement is larger than the actual sum value, and if the actual sum value is smaller than the target value, the user cannot be audited and is prompted to continue uploading another picture set to be identified, or the target value is reduced until the actual sum value is smaller than or equal to the target value, and then the reimbursement process can be continued.
The device realizes that the non-forward pictures are rotated to obtain the standard forward picture, and then the invoice amount is identified and the accounting is carried out through the image identification technology, so that the accounting efficiency is improved, and the accounting accuracy is high.
The OCR-based picture data recognition apparatus may be implemented in the form of a computer program that can be run on a computer device as shown in fig. 9.
Referring to fig. 9, fig. 9 is a schematic block diagram of a computer device according to an embodiment of the present invention. The computer device 500 is a server, and the server may be an independent server or a server cluster composed of a plurality of servers.
Referring to fig. 9, the computer device 500 includes a processor 502, memory, and a network interface 505 connected by a system bus 501, where the memory may include a non-volatile storage medium 503 and an internal memory 504.
The non-volatile storage medium 503 may store an operating system 5031 and a computer program 5032. The computer program 5032, when executed, may cause the processor 502 to perform an OCR-based picture data recognition method.
The processor 502 is used to provide computing and control capabilities that support the operation of the overall computer device 500.
The internal memory 504 provides an environment for running the computer program 5032 in the non-volatile storage medium 503, and when the computer program 5032 is executed by the processor 502, the processor 502 may be caused to execute an OCR-based picture data recognition method.
The network interface 505 is used for network communication, such as providing transmission of data information. Those skilled in the art will appreciate that the configuration shown in fig. 9 is a block diagram of only a portion of the configuration associated with aspects of the present invention and is not intended to limit the computing device 500 to which aspects of the present invention may be applied, and that a particular computing device 500 may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
The processor 502 is configured to run the computer program 5032 stored in the memory to implement the OCR-based picture data recognition method disclosed by the embodiment of the invention.
Those skilled in the art will appreciate that the embodiment of a computer device illustrated in fig. 9 does not constitute a limitation on the specific construction of the computer device, and that in other embodiments a computer device may include more or fewer components than those illustrated, or some components may be combined, or a different arrangement of components. For example, in some embodiments, the computer device may only include a memory and a processor, and in such embodiments, the structures and functions of the memory and the processor are consistent with those of the embodiment shown in fig. 9, and are not described herein again.
It should be understood that, in the embodiment of the present invention, the Processor 502 may be a Central Processing Unit (CPU), and the Processor 502 may also be other general purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field-Programmable gate arrays (FPGAs) or other Programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, and the like. Wherein a general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
In another embodiment of the invention, a computer-readable storage medium is provided. The computer readable storage medium may be a non-volatile computer readable storage medium. The computer readable storage medium stores a computer program, wherein the computer program, when executed by a processor, implements the OCR-based picture data recognition method disclosed by the embodiment of the invention.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described apparatuses, devices and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again. Those of ordinary skill in the art will appreciate that the elements and algorithm steps of the examples described in connection with the embodiments disclosed herein may be embodied in electronic hardware, computer software, or combinations of both, and that the components and steps of the examples have been described in a functional general in the foregoing description for the purpose of illustrating clearly the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
In the embodiments provided by the present invention, it should be understood that the disclosed apparatus, device and method can be implemented in other ways. For example, the above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only a logical division, and there may be other divisions when the actual implementation is performed, or units having the same function may be grouped into one unit, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may also be an electric, mechanical or other form of connection.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment of the present invention.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a storage medium. Based on such understanding, the technical solution of the present invention essentially or partially contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a magnetic disk, or an optical disk.
While the invention has been described with reference to specific embodiments, the invention is not limited thereto, and various equivalent modifications and substitutions can be easily made by those skilled in the art within the technical scope of the invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (10)

1. An OCR-based picture data recognition method is characterized by comprising the following steps:
receiving a picture set to be identified uploaded by an uploading terminal;
rotating the non-forward pictures in the picture set to be recognized to obtain a standard forward picture so as to update the picture set to be recognized to obtain a standard picture set to be recognized;
acquiring the picture types respectively corresponding to the standardized pictures to be identified in the standardized picture set to be identified; the image types comprise a first image type corresponding to a value-added tax special invoice or a value-added tax common invoice, a second image type corresponding to a machine invoice and a third image type corresponding to a quota invoice;
acquiring identification values corresponding to preset designated areas in the standardized pictures to be identified in the standardized picture set to be identified through image identification;
acquiring the number of pictures of each picture type in the standardized picture set to be recognized to obtain the total number of the pictures, and creating a sub data table with corresponding line number according to the number of the pictures of each picture type to form a total data table;
respectively filling identification values corresponding to the standardized pictures to be identified into corresponding sub data tables for storage, respectively summing the identification values of the sub data tables, and then accumulating and summing to obtain an actual sum value corresponding to a total data table; and
and sending the actual sum value to an uploading end.
2. An OCR-based picture data recognition method according to claim 1, wherein after sending the actual sum to an uploading end, the method further comprises:
receiving a target numerical value uploaded by an uploading terminal;
judging whether the actual sum value is smaller than the target value;
if the actual sum value is larger than or equal to the target value, sending first notification information for notifying that the audit is passed to an uploading end;
and if the actual sum value is smaller than the target value, sending second notification information for notifying that the audit is not passed to an uploading end.
3. An OCR-based picture data recognition method according to claim 1, wherein before rotating all non-forward pictures in the to-be-recognized picture set to obtain a standard forward picture so as to update the to-be-recognized picture set to obtain a standardized to-be-recognized picture set, the method further comprises:
judging whether a non-forward picture exists in the picture set to be identified; if the non-forward pictures exist in the picture set to be identified, executing a step of acquiring a rotation angle according to the position of the first line of characters corresponding to the non-forward pictures and the corresponding position of the same characters in the corresponding standard forward pictures; if the non-forward pictures do not exist in the picture set to be recognized, the step of obtaining the picture types respectively corresponding to the standardized pictures to be recognized in the standardized picture set to be recognized is executed;
and acquiring the rotation angle according to the position of the first line of characters corresponding to the non-forward picture and the corresponding position of the same characters in the corresponding standard forward picture.
4. An OCR-based picture data recognition method according to claim 3, wherein the determining whether there is a non-forward picture in the picture set to be recognized comprises:
and acquiring the first line characters of each picture to be recognized in the picture set to be recognized through image recognition, and taking the corresponding picture to be recognized as a non-forward picture if the first line characters of the picture to be recognized do not comprise the keywords in the preset first keyword list.
5. An OCR-based picture data recognition method according to any one of claims 1 to 4, wherein the obtaining of the recognition numerical values respectively corresponding to the preset designated areas in the standardized to-be-recognized pictures in the standardized to-be-recognized picture set by image recognition comprises:
acquiring picture content texts corresponding to the standardized pictures to be identified in the standardized picture set to be identified respectively;
and positioning to obtain the text content, which is the same as the keywords in the preset second keyword list, in the picture content text of each standardized picture to be recognized, and taking the corresponding numerical value behind the text content as the corresponding recognition numerical value of each standardized picture to be recognized.
6. An OCR-based picture data recognition method according to any one of claims 1 to 4, wherein the obtaining of the picture type corresponding to each standardized picture to be recognized in the standardized picture set to be recognized comprises:
and recognizing the ticket head of each standardized picture to be recognized through an OCR image recognition model so as to obtain the picture type corresponding to each standardized picture to be recognized.
7. An OCR-based picture data recognition apparatus, comprising:
the picture set receiving unit is used for receiving the picture set to be identified uploaded by the uploading terminal;
the image standardization unit is used for rotating non-forward images in the image set to be identified to obtain a standard forward image so as to update the image set to be identified to obtain a standardized image set to be identified;
the image type acquisition unit is used for acquiring the image types corresponding to the standardized images to be identified in the standardized image set to be identified; the image types comprise a first image type corresponding to a value-added tax special invoice or a value-added tax common invoice, a second image type corresponding to a machine invoice and a third image type corresponding to a quota invoice;
the identification value acquisition unit is used for acquiring identification values corresponding to preset designated areas in the standardized pictures to be identified in the standardized picture set to be identified through image identification;
a total data table obtaining unit, configured to obtain the number of pictures of each picture type in the standardized set of pictures to be recognized to obtain a total number of pictures, and create a sub data table with a corresponding number of lines according to the number of pictures of each picture type to form a total data table;
the summing unit is used for respectively filling the identification values corresponding to the standardized pictures to be identified into the corresponding sub data tables for storage, respectively summing the identification values of the sub data tables, and then accumulating and summing to obtain an actual sum value corresponding to the total data table; and
and the sum value sending unit is used for sending the actual sum value to an uploading end.
8. An OCR-based picture data recognition apparatus according to claim 7, further comprising:
the target value acquisition unit is used for receiving the target value uploaded by the uploading terminal;
a value judgment unit for judging whether the actual sum value is smaller than the target value;
the first notification unit is used for sending first notification information for notifying that the audit is passed to an uploading end if the actual sum value is greater than or equal to the target value;
and the second notification unit is used for sending second notification information for notifying that the audit is not passed to the uploading end if the actual sum value is smaller than the target value.
9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the OCR-based picture data recognition method according to any one of claims 1 to 6 when executing the computer program.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program which, when executed by a processor, causes the processor to execute the OCR-based picture data recognition method according to any one of claims 1 to 6.
CN201910858699.8A 2019-09-11 2019-09-11 Image data identification method and device based on OCR (optical character recognition), and computer equipment Pending CN110781726A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201910858699.8A CN110781726A (en) 2019-09-11 2019-09-11 Image data identification method and device based on OCR (optical character recognition), and computer equipment
PCT/CN2020/087132 WO2021047182A1 (en) 2019-09-11 2020-04-27 Ocr-based picture data recognition method and apparatus, and computer device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910858699.8A CN110781726A (en) 2019-09-11 2019-09-11 Image data identification method and device based on OCR (optical character recognition), and computer equipment

Publications (1)

Publication Number Publication Date
CN110781726A true CN110781726A (en) 2020-02-11

Family

ID=69383492

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910858699.8A Pending CN110781726A (en) 2019-09-11 2019-09-11 Image data identification method and device based on OCR (optical character recognition), and computer equipment

Country Status (2)

Country Link
CN (1) CN110781726A (en)
WO (1) WO2021047182A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112257613A (en) * 2020-10-23 2021-01-22 中国平安人寿保险股份有限公司 Physical examination report information structured extraction method and device and computer equipment
WO2021047182A1 (en) * 2019-09-11 2021-03-18 深圳壹账通智能科技有限公司 Ocr-based picture data recognition method and apparatus, and computer device

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114140092A (en) * 2021-12-06 2022-03-04 烟台文凯园林工程有限公司 Multifunctional enterprise financial accounting system

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4651876B2 (en) * 2001-07-19 2011-03-16 富士通株式会社 PATTERN IDENTIFICATION DEVICE, PATTERN IDENTIFICATION METHOD, AND PATTERN IDENTIFICATION PROGRAM
CN108133212B (en) * 2018-01-05 2021-06-29 东华大学 Quota invoice amount recognition system based on deep learning
CN108549843A (en) * 2018-03-22 2018-09-18 南京邮电大学 A kind of VAT invoice recognition methods based on image procossing
CN109446995A (en) * 2018-10-30 2019-03-08 广西科技大学 The treating method and apparatus of billing information
CN110781726A (en) * 2019-09-11 2020-02-11 深圳壹账通智能科技有限公司 Image data identification method and device based on OCR (optical character recognition), and computer equipment

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021047182A1 (en) * 2019-09-11 2021-03-18 深圳壹账通智能科技有限公司 Ocr-based picture data recognition method and apparatus, and computer device
CN112257613A (en) * 2020-10-23 2021-01-22 中国平安人寿保险股份有限公司 Physical examination report information structured extraction method and device and computer equipment
CN112257613B (en) * 2020-10-23 2023-08-08 中国平安人寿保险股份有限公司 Physical examination report information structured extraction method and device and computer equipment

Also Published As

Publication number Publication date
WO2021047182A1 (en) 2021-03-18

Similar Documents

Publication Publication Date Title
US11354495B2 (en) System and method for reliable extraction and mapping of data to and from customer forms
US20150287005A1 (en) Bar coded monetary transaction system and method
US9916606B2 (en) System and method for processing a transaction document including one or more financial transaction entries
US7416131B2 (en) Electronic transaction processing server with automated transaction evaluation
US6598087B1 (en) Methods and apparatus for network-enabled virtual printing
US20080270293A1 (en) Accounts payable automation system with automated discount and factoring management
CN110781726A (en) Image data identification method and device based on OCR (optical character recognition), and computer equipment
US20150039707A1 (en) Document processing
US20150356545A1 (en) Machine Implemented Method of Processing a Transaction Document
US11615234B2 (en) System and method for automated data importation, processing, and form submittal
US8049921B2 (en) System and method for transferring invoice data output of a print job source to an automated data processing system
CN110415066A (en) Cross-border clearance document generation method, device, computer equipment and storage medium
CH716698B1 (en) Partial perceptual image hashing for bill deconstruction.
CN109214362B (en) Document processing method and related equipment
CN114445079A (en) Document processing method, device, equipment and storage medium
CN112785402A (en) Bill information processing method, bill information processing system, and storage medium
US20200193525A1 (en) System and method for automatic verification of expense note
CN111815378A (en) Management system and method for generating invoice based on bill collection
CN111275436A (en) Method and terminal for processing information
CN113807901A (en) Electronic invoice detection method, terminal equipment and storage medium
WO2021174869A1 (en) User image data processing method, apparatus, computer device, and storage medium
WO2021073264A1 (en) Negotiable instrument information acquisition method and device, computer apparatus, and readable storage medium
CN112597743A (en) Attendance data-based reimbursement method and device, computer equipment and storage medium
CN111192095B (en) Multi-time electronic invoice issuing method and system
JP7257800B2 (en) Data collation device, data collation method, and data collation program

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination