CN114863452A - Method, device, electronic equipment and medium for determining text information in invoice image - Google Patents

Method, device, electronic equipment and medium for determining text information in invoice image Download PDF

Info

Publication number
CN114863452A
CN114863452A CN202210585658.8A CN202210585658A CN114863452A CN 114863452 A CN114863452 A CN 114863452A CN 202210585658 A CN202210585658 A CN 202210585658A CN 114863452 A CN114863452 A CN 114863452A
Authority
CN
China
Prior art keywords
text information
image
target text
invoice
layer
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
CN202210585658.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.)
China Construction Bank Corp
Original Assignee
China Construction Bank Corp
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 China Construction Bank Corp filed Critical China Construction Bank Corp
Priority to CN202210585658.8A priority Critical patent/CN114863452A/en
Publication of CN114863452A publication Critical patent/CN114863452A/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/412Layout analysis of documents structured with printed lines or input boxes, e.g. business forms or tables
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/22Image preprocessing by selection of a specific region containing or referencing a pattern; Locating or processing of specific regions to guide the detection or recognition
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/762Arrangements for image or video recognition or understanding using pattern recognition or machine learning using clustering, e.g. of similar faces in social networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/764Arrangements for image or video recognition or understanding using pattern recognition or machine learning using classification, e.g. of video objects

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Artificial Intelligence (AREA)
  • Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • Databases & Information Systems (AREA)
  • Evolutionary Computation (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Software Systems (AREA)
  • Character Input (AREA)

Abstract

The disclosure provides a method, a device, equipment, a storage medium and a program product for determining text information in an invoice image, relates to the technical field of computers, and can be applied to the technical field of finance. The method comprises the following steps: under the condition that the overlap of target text information exists in the invoice image to be identified, determining a target area, wherein the target area comprises at least two pieces of target text information with the overlap of the target text information; the at least two pieces of target text information comprise needle printing target text information and printing target text information; carrying out layer separation on the image of the target area to obtain a first layer corresponding to the needle printing target text information and a second layer corresponding to the printing target text information; respectively identifying a first image layer and a second image layer to obtain at least two identification results; and determining text information in the invoice image based on the at least two recognition results.

Description

Method, device, electronic equipment and medium for determining text information in invoice image
Technical Field
The present disclosure relates to the field of computer technology, and may be applied to the field of financial technology, and more particularly, to a method, apparatus, device, medium, and program product for determining text information in an invoice image.
Background
Currently, the invoice verification process generally sends invoice verification elements to the tax system, such as invoice codes, invoice numbers, invoicing dates, and other elements. Because higher cost is needed for invoice verification through the tax system, in order to reduce cost, preliminary screening is generally performed before the invoice is sent to the tax system, and a part of false tickets or repeated tickets are filtered.
The invoice authenticity checking or weight checking in the preliminary screening needs to check the text information corresponding to the elements such as the invoice code, the invoice number, the invoice date and the like in the invoice image, so that the text information in the invoice image needs to be determined. However, the existing technologies, such as the character recognition technology, have low accuracy of the obtained recognition result, which is not favorable for reducing the cost.
Disclosure of Invention
In view of the above problems, the present disclosure provides a method, an apparatus, a device, a medium, and a program product for determining text information in an invoice image, which can improve the identification accuracy of text information in an invoice image, and facilitate accurate filtering of false tickets or duplicate tickets in a subsequent verification or query process, thereby reducing cost.
According to a first aspect of the present disclosure, there is provided a method of determining text information in an invoice image, comprising: under the condition that the overlap of target text information exists in the invoice image to be identified, determining a target area, wherein the target area comprises at least two pieces of target text information with the overlap of the target text information; the at least two pieces of target text information comprise needle printing target text information and printing target text information; performing layer separation on the image of the target area to obtain a first layer corresponding to the needle printing target text information and a second layer corresponding to the printing target text information; respectively identifying the first image layer and the second image layer to obtain at least two identification results; and determining text information in the invoice image based on the at least two recognition results.
According to an embodiment of the present disclosure, the performing layer separation on the image of the target area to obtain a first layer corresponding to the stitch target text information and a second layer corresponding to the printed target text information includes: and carrying out layer separation on the image of the target area by adopting a gray clustering method to obtain a first layer corresponding to the needle printing target text information and a second layer corresponding to the printing target text information.
According to the embodiment of the present disclosure, the performing layer separation on the image of the target area by using a gray clustering method to obtain a first layer corresponding to the stitch target text information and a second layer corresponding to the printed target text information includes: determining extreme points in the target area image based on a nuclear density estimation method; clustering is carried out based on the extreme points to obtain a classification result; and carrying out layer separation based on the classification result to obtain the first layer and the second layer.
According to an embodiment of the present disclosure, the method further comprises: acquiring a two-dimensional code identification result in the invoice image to be identified; and determining whether the text information in the invoice image is correct or not based on the two-dimension code recognition result.
According to an embodiment of the present disclosure, the method further comprises: and carrying out duplicate checking processing according to the text information in the invoice image.
A second aspect of the present disclosure provides an apparatus for determining text information in an invoice image, comprising: the invoice recognition system comprises a first determination module, a second determination module and a recognition module, wherein the first determination module is used for determining a target area under the condition that target text information overlapping exists in an invoice image to be recognized, and the target area comprises at least two target text information with the target text information overlapping; the at least two pieces of target text information comprise needle printing target text information and printing target text information; the layer separation processing module is used for carrying out layer separation on the image of the target area to obtain a first layer corresponding to the needle printing target text information and a second layer corresponding to the printing target text information; the identification module is used for respectively identifying the first image layer and the second image layer to obtain at least two identification results; and a second determination module for determining text information in the invoice image based on the at least two recognition results.
A third aspect of the present disclosure provides an electronic device, comprising: one or more processors; memory for storing one or more programs, wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to perform the above-described method of determining textual information in an invoice image.
A fourth aspect of the present disclosure also provides a computer-readable storage medium having stored thereon executable instructions that, when executed by a processor, cause the processor to perform the above-described method of determining textual information in an invoice image.
The fifth aspect of the present disclosure also provides a computer program product, including a computer program, which when executed by a processor, implements the above method for determining text information in an invoice image.
According to the method for determining the text information in the invoice image, the identification accuracy of the text information in the invoice image can be improved through the complete process of determining the text information in the invoice image, and the method is beneficial to accurately filtering out false tickets or repeated tickets in the subsequent verification or query process, so that the cost is reduced.
Drawings
The foregoing and other objects, features and advantages of the disclosure will be apparent from the following description of embodiments of the disclosure, which proceeds with reference to the accompanying drawings, in which:
FIG. 1 schematically illustrates an application scenario diagram of a method, apparatus, device, medium, and program product for determining textual information in an invoice image, according to embodiments of the present disclosure;
FIG. 2 schematically illustrates a flow chart of a method of determining textual information in an invoice image, according to an embodiment of the disclosure;
FIG. 3 schematically illustrates a schematic diagram of an invoice image with target textual information overlap, according to an embodiment of the disclosure;
FIG. 4 schematically illustrates an implementation of invoice validating and reviewing, in accordance with an embodiment of the present disclosure;
FIG. 5 schematically shows a block diagram of an apparatus for determining text information in an invoice image according to an embodiment of the present disclosure; and
FIG. 6 schematically illustrates a block diagram of an electronic device suitable for implementing a method of determining textual information in an invoice image, according to an embodiment of the disclosure.
Detailed Description
Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. It should be understood that the description is illustrative only and is not intended to limit the scope of the present disclosure. In the following detailed description, for purposes of explanation, numerous specific details are set forth in order to provide a thorough understanding of the embodiments of the disclosure. It may be evident, however, that one or more embodiments may be practiced without these specific details. Moreover, in the following description, descriptions of well-known structures and techniques are omitted so as to not unnecessarily obscure the concepts of the present disclosure.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. The terms "comprises," "comprising," and the like, as used herein, specify the presence of stated features, steps, operations, and/or components, but do not preclude the presence or addition of one or more other features, steps, operations, or components.
All terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art unless otherwise defined. It is noted that the terms used herein should be interpreted as having a meaning that is consistent with the context of this specification and should not be interpreted in an idealized or overly formal sense.
Where a convention analogous to "at least one of A, B and C, etc." is used, in general such a construction is intended in the sense one having skill in the art would understand the convention (e.g., "a system having at least one of A, B and C" would include but not be limited to systems that have a alone, B alone, C alone, a and B together, a and C together, B and C together, and/or A, B, C together, etc.).
The embodiment of the disclosure provides a method and a device for determining text information in an invoice image, wherein a target area is determined under the condition that target text information overlapping exists in the invoice image to be identified, and the target area comprises at least two target text information overlapping with the target text information; the at least two pieces of target text information comprise needle printing target text information and printing target text information; performing layer separation on the image of the target area to obtain a first layer corresponding to the stitch printing target text information and a second layer corresponding to the printing target text information; respectively identifying a first image layer and a second image layer to obtain at least two identification results; and determining text information in the invoice image based on the at least two recognition results.
Fig. 1 schematically illustrates an application scenario diagram of a method, apparatus, device, medium, and program product for determining textual information in an invoice image according to embodiments of the present disclosure.
As shown in fig. 1, an application scenario 100 according to this embodiment may include terminal devices 101, 102, 103, a network 104 and a server 105. The network 104 serves as a medium for providing communication links between the terminal devices 101, 102, 103 and the server 105. Network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
The user may use the terminal devices 101, 102, 103 to interact with the server 105 via the network 104 to receive or send messages or the like. The terminal devices 101, 102, 103 may have installed thereon various communication client applications, such as shopping-like applications, web browser applications, search-like applications, instant messaging tools, mailbox clients, social platform software, etc. (by way of example only).
The terminal devices 101, 102, 103 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, and the like.
The server 105 may be a server providing various services, such as a background management server (for example only) providing support for websites browsed by users using the terminal devices 101, 102, 103. The background management server may analyze and perform other processing on the received data such as the user request, and feed back a processing result (e.g., a webpage, information, or data obtained or generated according to the user request) to the terminal device.
It should be noted that the method for determining the text information in the invoice image provided by the embodiment of the present disclosure may be generally executed by the server 105. Accordingly, the apparatus for determining text information in an invoice image provided by the embodiments of the present disclosure may be generally disposed in the server 105. The method for determining the text information in the invoice image provided by the embodiment of the present disclosure may also be performed by a server or a server cluster which is different from the server 105 and can communicate with the terminal devices 101, 102, 103 and/or the server 105. Accordingly, the apparatus for determining text information in an invoice image provided by the embodiment of the present disclosure may also be disposed in a server or a server cluster different from the server 105 and capable of communicating with the terminal devices 101, 102, 103 and/or the server 105.
It should be understood that the number of terminal devices, networks, and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
The method for determining text information in an invoice image according to the disclosed embodiment will be described in detail with reference to fig. 2 based on the scenario described in fig. 1.
Fig. 2 schematically illustrates a flow chart of a method of determining textual information in an invoice image according to an embodiment of the present disclosure.
As shown in fig. 2, the embodiment includes operations S210 to S240, and the method of determining text information in an invoice image may be performed by a server.
In the technical scheme of the disclosure, the data acquisition, collection, storage, use, processing, transmission, provision, disclosure, application and other processing are all in accordance with the regulations of relevant laws and regulations, necessary security measures are taken, and the public order and good custom are not violated.
In operation S210, in a case that it is determined that there is target text information overlap in the invoice image to be recognized, determining a target area, where the target area includes at least two pieces of target text information where the target text information overlap; the at least two target text messages include a stitch target text message and a print target text message.
In operation S220, layer separation is performed on the image of the target area to obtain a first layer corresponding to the stitch target text information and a second layer corresponding to the print target text information.
In operation S230, the first layer and the second layer are respectively identified to obtain at least two identification results.
In operation S240, text information in the invoice image is determined based on at least two recognition results.
It will be appreciated that the textual information in the invoice needs to be determined before the invoice is verified or reviewed. Verifying the invoice: the method is to determine the authenticity of the invoice according to necessary invoice information such as an invoice code, an invoice number, an invoice date and the like. And (3) checking the invoice: for example, when an enterprise reimburses an invoice, the repeatability of the invoice needs to be inquired and verified so as to ensure that the property of the enterprise is not damaged.
Generally, the invoice verification process is implemented by sending an invoice verification element to the tax system, and the invoice verification element generally includes: one or more of an invoice code, an invoice number, an invoice date, an invoice amount, and a check code.
It can be understood that, before determining the target area, it is first determined whether there is a situation where the target text information overlaps in the invoice image to be recognized. For example, if there is no target text information overlap in the invoice image to be recognized, text information Recognition in the invoice image may be directly performed, for example, Optical Character Recognition (OCR) and Character Recognition technology are used to determine the target text information. Thereby carrying out invoice verification processing or duplicate checking processing and the like according to the target text information. For example, when target text information is overlapped in an invoice image to be recognized, a target area is determined, wherein the target area comprises at least two pieces of target text information overlapped by the target text information; the at least two target text messages include a stitch target text message and a print target text message.
Fig. 3 schematically illustrates a schematic diagram of an invoice image with target text information overlap according to an embodiment of the disclosure. The target text information may be determined according to the invoice authenticity verification factor, for example, the target text information may include one or more of an invoice code, an invoice number, an invoice date, an invoice amount, and a check code. The invoice image to be identified can be seen in fig. 3, and it can be seen that: the invoice image to be identified has a condition that a plurality of text messages are overlapped. If the image is in the upper left corner, the invoice codes (target text information) have the condition of text information overlapping; as another example, in the upper right corner of the image, there is a case where the text information overlaps the invoice number (target text information).
For the situation that target text information is overlapped in an invoice image to be recognized, if text information Recognition is directly performed, for example, Optical Character Recognition (OCR) and Character Recognition technologies are adopted, the accuracy of the text information determined after Recognition is often lower.
The analysis shows that the printing target text information 301 and the needle-printing target text information 302 have different characteristics, such as different gray levels, such as different color density values. Therefore, in order to reduce the interference factors and further improve the identification accuracy of the text information, a target to-be-separated area (i.e., a target area) where the target text information overlaps in the invoice image to be identified may be first determined, where the target area includes at least two target text information where the target text information overlaps, such as printed target text information 301(42074197) and needle-printed target text information 302 (567819862). Then, the image of the target area is subjected to layer separation, that is, the printed and needled layers are subjected to separation processing, for example, the image of the target area can be subjected to layer separation by adopting a gray clustering method, and the image of the target area can be subjected to layer separation by a trained deep learning model. Thereby obtaining a first layer corresponding to the stitch-printed target text information and a second layer corresponding to the printed target text information. It can be understood that, with the deep learning model, massive training data is required, and the features of the target image (such as the target text information of the invoice image to be recognized) are required to have discrimination.
It can be understood that the text information in the current first image layer and the text information in the second image layer both avoid interference caused by text information overlapping to a certain extent, and are beneficial to improving the accuracy of subsequent text recognition.
And respectively identifying the first image layer and the second image layer, for example, calling a trained OCR (optical character recognition) model, identifying the first image layer and the second image layer to obtain identification results, such as XX value-added tax common invoices, 0123456, 42074197 and the like, so as to obtain information such as printing, pin printing invoice numbers, invoice codes, invoicing dates, amounts, check codes and the like, and further determining text information in the invoice image based on at least two identification results.
It is understood that based on the determined text information in the invoice image, invoice verification processing, duplication checking processing and the like can be performed.
In the method for determining text information in an invoice image provided by this embodiment, a first image layer corresponding to the needle printing target text information and a second image layer corresponding to the printing target text information are obtained by performing image layer separation on an image of a target area; respectively identifying a first image layer and a second image layer to obtain at least two identification results; textual information in the invoice image is then determined based on the at least two recognition results. The text information in the invoice image can be still accurately identified under the condition that the target text information is overlapped in the invoice image to be identified. Therefore, the identification accuracy of the text information in the invoice image can be improved, and the false tickets or the repeated tickets can be filtered out accurately in the subsequent verification or query process, so that the cost is reduced.
The image layer separation is carried out on the image of the target area, and a first image layer corresponding to the needle printing target text information and a second image layer corresponding to the printing target text information are obtained, and the method comprises the following steps: and performing layer separation on the image of the target area by adopting a gray clustering method to obtain a first layer corresponding to the needle printing target text information and a second layer corresponding to the printing target text information.
The gray clustering is also called gray absolute correlation clustering, and is a clustering method based on the gray correlation degree formed by two indexes. A method for aggregating some observation indexes or observation objects into several classes which can be defined by a correlation matrix. The grey associative clustering is mainly used for merging the same type of factors so as to simplify the complex system. The gray correlation matrix is a matrix composed of gray correlation degrees, and is also called a gray correlation matrix. Between the matrixes, each index has a correlation size with another index, and the correlation size measurement method has gray absolute correlation between the indexes.
For example, extreme points in the target area image are determined by an estimation method such as a kernel density estimation method or a gaussian mixture distribution estimation method, then clustering is performed based on the obtained extreme points to obtain a classification result, and then the classification result is used for performing layer separation.
According to the method for determining the text information in the invoice image, the image layer separation is carried out on the image of the target area by adopting a gray clustering method, and the printed and needled image layers can be well separated. The matching degree of the recognition result obtained by recognizing the first image layer and the second image layer obtained by using a gray clustering method and the text information in the real invoice is higher.
Carrying out layer separation on the image of the target area by adopting a gray clustering method to obtain a first layer corresponding to the needle printing target text information and a second layer corresponding to the printing target text information, wherein the method comprises the following steps: determining extreme points in the target area image based on a nuclear density estimation method; clustering is carried out based on the extreme points to obtain a classification result; and carrying out layer separation based on the classification result to obtain a first layer and a second layer.
It is understood that based on the kernel density estimation method, clustering can be performed by solving the color density extremum. The kernel density estimation method is a non-parametric estimation method, is highly emphasized in statistical theory and application, and can be regarded as a function parallel mode. For example, the distribution of the color gradation forms several more prominent peaks, there is a certain clustering tendency, the statistical result of the histogram is discontinuous, and a smooth result is more favorable for analysis, i.e. the statistical result is smoothed.
For example, the valid pixels in the invoice image may be selected first, and then the invalid pixels may be removed; in order to make the recognition result more accurate, inclination correction can be carried out, if the gray matrix is traversed, and the row and the column are blank pixels (>250), the row and the column are deleted; the longest straight line and the included angle between the longest straight line and the horizontal line can be found out, and the invoice image is subjected to inclination correction according to the included angle. The invoice image can be read in a gray level image form to obtain a gray level matrix, and compared with the mode of directly reading an RGB color image, the method is lower in dimensionality, has no obvious loss of character information, and is convenient for image recognition.
And clustering the colors of the invoice images. It is understood that although the gradation picture gradation range is [ 0, 255 ], the overall hue perceived by the naked eye is less. Therefore, similar color levels can be classified into one class, thereby reducing color distribution and effectively lowering noise. Through a large amount of data tests, the method for separating the printed layer and the needle printed layer by adopting the kernel density estimation method is very effective.
For example, for an invoice image, the number of occurrences of each tone scale in the image may be counted, such as estimating the probability (density) of occurrence of a certain value from a large amount of data:
Figure BDA0003664173490000091
in one expression, P represents the probability density function of the population, h is a hyperparameter, called the bandwidth, or window, N represents the total number of samples, and K represents the kernel function. Like the kernel function in the SVM, the kernel function may have various specific forms, such as the formula two:
Figure BDA0003664173490000101
the invoice images have clustering tendency, namely obvious maximum values or minimum values. Extreme points can be selected for clustering, if the maximum points exist, the clusters are determined, the minimum points can be used as boundaries between the classes, then layer separation can be performed based on the classification result, and a first layer corresponding to the stitch target text information and a second layer corresponding to the printing target text information are separated to obtain different layers.
In the method for determining the text information in the invoice image provided by the embodiment, the extreme point in the target area image is determined by a kernel density estimation method; clustering is carried out based on the extreme points to obtain a classification result; and the layer separation is carried out based on the classification result to obtain the first layer and the second layer, so that the method has a good layer separation effect, text information identification is easier, and the accuracy of the identification result is higher.
The method for determining the text information in the invoice image further comprises the following steps: acquiring a two-dimensional code identification result in an invoice image to be identified; and determining whether the text information in the invoice image is correct or not based on the two-dimension code recognition result.
It can be understood that there are two-dimensional codes in the invoice. And reading the two-dimensional code in the invoice image to be identified to obtain five elements of the invoice, such as the invoice number, the invoice code, the invoicing date, the amount and the check code. Then, based on the two-dimension code recognition result and the determined text information in the invoice image, comparison is carried out, for example, the consistency is compared, and whether the text information in the invoice image is correct or not can be determined. So that the authenticity of the invoice can be further judged.
The method for determining the text information in the invoice image provided by the embodiment can determine whether the text information in the invoice image is correct or not based on the two-dimensional code recognition result, and is beneficial to accurately filtering out false tickets in the subsequent authenticity verification process, so that the cost is reduced.
The method for determining the text information in the invoice image further comprises the following steps: and carrying out duplicate checking processing according to the text information in the invoice image.
For example, FIG. 4 schematically illustrates an implementation of invoice validation and duplication checking according to an embodiment of the present disclosure; as shown in fig. 4, this embodiment includes operations S401 to S407.
In operation S401, text information in an invoice image is determined.
In operation S402, it is determined whether the text message is correct, and the text message may be checked, for example, by manual comparison.
If the determination result is incorrect, operation S403 determines that the invoice is a false invoice.
If the determination result is correct, operation S404 is performed to obtain a two-dimensional code recognition result.
In operation S405, it is determined whether the text information is correct based on a comparison between the text information and the two-dimensional code recognition result.
If the text information is not consistent with the two-dimensional code recognition result, operation S406 determines that the invoice is a false invoice.
If the text information is consistent with the two-dimensional code recognition result, operation S407 performs a duplicate checking process. For example, the invoice element can be inserted into the database according to the invoice code, the invoice number, the invoice date, the invoice amount and the check code, and whether the reimbursement field is empty or not can be determined. If the insertion into the database fails, the ticket is determined to be a non-reimburseable duplicate ticket.
The method for determining the text information in the invoice image provided by the embodiment can perform duplicate checking processing according to the text information in the invoice image, and is favorable for accurately filtering out repeated tickets, so that the cost is reduced.
Based on the method for determining the text information in the invoice image, the disclosure also provides a device for determining the text information in the invoice image. The apparatus will be described in detail below with reference to fig. 5.
Fig. 5 schematically shows a block diagram of the apparatus for determining text information in an invoice image according to an embodiment of the present disclosure.
As shown in fig. 5, the apparatus 500 for determining text information in an invoice image according to this embodiment includes a first determining module 510, a layer separation processing module 520, a recognition module 530, and a second determining module 540.
A first determining module 510, configured to determine a target area in a case that it is determined that there is target text information overlap in an invoice image to be identified, where the target area includes at least two target text information with the target text information overlap; the at least two pieces of target text information comprise needle printing target text information and printing target text information; the layer separation processing module 520 is configured to perform layer separation on the image of the target area to obtain a first layer corresponding to the stitch target text information and a second layer corresponding to the print target text information; an identifying module 530, configured to identify the first layer and the second layer respectively to obtain at least two identification results; and a second determining module 540 for determining text information in the invoice image based on the at least two recognition results.
In some embodiments, the layer separation processing module is configured to: and carrying out layer separation on the image of the target area by adopting a gray clustering method to obtain a first layer corresponding to the needle printing target text information and a second layer corresponding to the printing target text information.
In some embodiments, the layer separation processing module is configured to: determining extreme points in the target area image based on a nuclear density estimation method; clustering is carried out based on the extreme points to obtain a classification result; and carrying out layer separation based on the classification result to obtain the first layer and the second layer.
In some embodiments, the apparatus further comprises: the acquisition module is used for acquiring a two-dimensional code identification result in the invoice image to be identified; and the third determining module is used for determining whether the text information in the invoice image is correct or not based on the two-dimensional code recognition result.
In some embodiments, the apparatus further comprises: and the duplication checking module is used for carrying out duplication checking processing according to the text information in the invoice image.
According to an embodiment of the present disclosure, any plurality of the first determining module 510, the layer separation processing module 520, the identifying module 530, and the second determining module 540 may be combined and implemented in one module, or any one of them may be split into a plurality of modules. Alternatively, at least part of the functionality of one or more of these modules may be combined with at least part of the functionality of the other modules and implemented in one module. According to an embodiment of the present disclosure, at least one of the first determining module 510, the layer separation processing module 520, the identifying module 530, and the second determining module 540 may be implemented at least partially as a hardware circuit, such as a Field Programmable Gate Array (FPGA), a Programmable Logic Array (PLA), a system on a chip, a system on a substrate, a system on a package, an Application Specific Integrated Circuit (ASIC), or may be implemented by hardware or firmware in any other reasonable manner of integrating or packaging a circuit, or implemented by any one of three implementations of software, hardware, and firmware, or implemented by a suitable combination of any of them. Alternatively, at least one of the first determining module 510, the layer separation processing module 520, the identifying module 530 and the second determining module 540 may be at least partially implemented as a computer program module, which may perform a corresponding function when executed.
FIG. 6 schematically illustrates a block diagram of an electronic device suitable for implementing a method of determining textual information in an invoice image, according to an embodiment of the disclosure.
As shown in fig. 6, an electronic device 600 according to an embodiment of the present disclosure includes a processor 601, which can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM)602 or a program loaded from a storage section 608 into a Random Access Memory (RAM) 603. Processor 601 may include, for example, a general purpose microprocessor (e.g., a CPU), an instruction set processor and/or associated chipset, and/or a special purpose microprocessor (e.g., an Application Specific Integrated Circuit (ASIC)), among others. The processor 601 may also include onboard memory for caching purposes. Processor 601 may include a single processing unit or multiple processing units for performing different actions of a method flow according to embodiments of the disclosure.
In the RAM 603, various programs and data necessary for the operation of the electronic apparatus 600 are stored. The processor 601, the ROM602, and the RAM 603 are connected to each other via a bus 604. The processor 601 performs various operations of the method flows according to the embodiments of the present disclosure by executing programs in the ROM602 and/or RAM 603. It is to be noted that the programs may also be stored in one or more memories other than the ROM602 and RAM 603. The processor 601 may also perform various operations of the method flows according to embodiments of the present disclosure by executing programs stored in the one or more memories.
Electronic device 600 may also include input/output (I/O) interface 605, input/output (I/O) interface 605 also connected to bus 604, according to an embodiment of the disclosure. The electronic device 600 may also include one or more of the following components connected to the I/O interface 605: an input portion 606 including a keyboard, a mouse, and the like; an output portion 607 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage section 608 including a hard disk and the like; and a communication section 609 including a network interface card such as a LAN card, a modem, or the like. The communication section 609 performs communication processing via a network such as the internet. The driver 610 is also connected to the I/O interface 605 as needed. A removable medium 611 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 610 as necessary, so that a computer program read out therefrom is mounted in the storage section 608 as necessary.
The present disclosure also provides a computer-readable storage medium, which may be contained in the apparatus/device/system described in the above embodiments; or may exist separately and not be assembled into the device/apparatus/system. The computer-readable storage medium carries one or more programs which, when executed, implement the method according to an embodiment of the disclosure.
According to embodiments of the present disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium, which may include, for example but is not limited to: a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. For example, according to embodiments of the present disclosure, a computer-readable storage medium may include the ROM602 and/or RAM 603 described above and/or one or more memories other than the ROM602 and RAM 603.
Embodiments of the present disclosure also include a computer program product comprising a computer program containing program code for performing the method illustrated in the flow chart. When the computer program product runs in a computer system, the program code is used for causing the computer system to realize the method for determining the text information in the invoice image provided by the embodiment of the disclosure.
The computer program performs the above-described functions defined in the system/apparatus of the embodiments of the present disclosure when executed by the processor 601. The above described systems, devices, modules, units, etc. may be implemented by computer program modules according to embodiments of the present disclosure.
In one embodiment, the computer program may be hosted on a tangible storage medium such as an optical storage device, a magnetic storage device, or the like. In another embodiment, the computer program may also be transmitted, distributed in the form of a signal on a network medium, downloaded and installed through the communication section 609, and/or installed from the removable medium 611. The computer program containing program code may be transmitted using any suitable network medium, including but not limited to: wireless, wired, etc., or any suitable combination of the foregoing.
In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 609, and/or installed from the removable medium 611. The computer program, when executed by the processor 601, performs the above-described functions defined in the system of the embodiments of the present disclosure. The systems, devices, apparatuses, modules, units, etc. described above may be implemented by computer program modules according to embodiments of the present disclosure.
In accordance with embodiments of the present disclosure, program code for executing computer programs provided by embodiments of the present disclosure may be written in any combination of one or more programming languages, and in particular, these computer programs may be implemented using high level procedural and/or object oriented programming languages, and/or assembly/machine languages. The programming language includes, but is not limited to, programming languages such as Java, C + +, python, the "C" language, or the like. The program code may execute entirely on the user computing device, partly on the user device, partly on a remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., through the internet using an internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
Those skilled in the art will appreciate that various combinations and/or combinations of features recited in the various embodiments and/or claims of the present disclosure can be made, even if such combinations or combinations are not expressly recited in the present disclosure. In particular, various combinations and/or combinations of the features recited in the various embodiments and/or claims of the present disclosure may be made without departing from the spirit or teaching of the present disclosure. All such combinations and/or associations are within the scope of the present disclosure.
The embodiments of the present disclosure have been described above. However, these examples are for illustrative purposes only and are not intended to limit the scope of the present disclosure. Although the embodiments are described separately above, this does not mean that the measures in the embodiments cannot be used in advantageous combination. The scope of the disclosure is defined by the appended claims and equivalents thereof. Various alternatives and modifications can be devised by those skilled in the art without departing from the scope of the present disclosure, and such alternatives and modifications are intended to be within the scope of the present disclosure.

Claims (10)

1. A method of determining textual information in an invoice image, comprising:
under the condition that the overlap of target text information exists in the invoice image to be identified, determining a target area, wherein the target area comprises at least two pieces of target text information with the overlap of the target text information; the at least two pieces of target text information comprise needle printing target text information and printing target text information;
performing layer separation on the image of the target area to obtain a first layer corresponding to the needle printing target text information and a second layer corresponding to the printing target text information;
respectively identifying the first image layer and the second image layer to obtain at least two identification results; and
determining text information in the invoice image based on the at least two recognition results.
2. The method according to claim 1, wherein the performing layer separation on the image of the target area to obtain a first layer corresponding to the stitch target text information and a second layer corresponding to the printed target text information includes:
and carrying out layer separation on the image of the target area by adopting a gray clustering method to obtain a first layer corresponding to the needle printing target text information and a second layer corresponding to the printing target text information.
3. The method according to claim 2, wherein the performing layer separation on the image of the target area by using a gray clustering method to obtain a first layer corresponding to the stitch target text information and a second layer corresponding to the printed target text information includes:
determining extreme points in the target area image based on a nuclear density estimation method;
clustering is carried out based on the extreme points to obtain a classification result; and
and carrying out layer separation based on the classification result to obtain the first layer and the second layer.
4. The method of claim 1, further comprising:
acquiring a two-dimensional code identification result in the invoice image to be identified; and
and determining whether the text information in the invoice image is correct or not based on the two-dimension code recognition result.
5. The method of claim 1, further comprising:
and carrying out duplicate checking processing according to the text information in the invoice image.
6. An apparatus for determining textual information in an invoice image, comprising:
the invoice recognition system comprises a first determination module, a second determination module and a recognition module, wherein the first determination module is used for determining a target area under the condition that target text information overlapping exists in an invoice image to be recognized, and the target area comprises at least two target text information overlapping the target text information; the at least two pieces of target text information comprise needle printing target text information and printing target text information;
the layer separation processing module is used for carrying out layer separation on the image of the target area to obtain a first layer corresponding to the needle printing target text information and a second layer corresponding to the printing target text information;
the identification module is used for respectively identifying the first image layer and the second image layer to obtain at least two identification results; and
and the second determination module is used for determining the text information in the invoice image based on the at least two recognition results.
7. The apparatus according to claim 6, wherein the layer separation processing module is configured to:
and carrying out layer separation on the image of the target area by adopting a gray clustering method to obtain a first layer corresponding to the needle printing target text information and a second layer corresponding to the printing target text information.
8. An electronic device, comprising:
one or more processors;
a storage device for storing one or more programs,
wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to perform the method of any of claims 1-5.
9. A computer readable storage medium having stored thereon executable instructions which, when executed by a processor, cause the processor to perform the method of any one of claims 1 to 5.
10. A computer program product comprising a computer program which, when executed by a processor, carries out the method according to any one of claims 1 to 5.
CN202210585658.8A 2022-05-26 2022-05-26 Method, device, electronic equipment and medium for determining text information in invoice image Pending CN114863452A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210585658.8A CN114863452A (en) 2022-05-26 2022-05-26 Method, device, electronic equipment and medium for determining text information in invoice image

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210585658.8A CN114863452A (en) 2022-05-26 2022-05-26 Method, device, electronic equipment and medium for determining text information in invoice image

Publications (1)

Publication Number Publication Date
CN114863452A true CN114863452A (en) 2022-08-05

Family

ID=82640433

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210585658.8A Pending CN114863452A (en) 2022-05-26 2022-05-26 Method, device, electronic equipment and medium for determining text information in invoice image

Country Status (1)

Country Link
CN (1) CN114863452A (en)

Similar Documents

Publication Publication Date Title
CN107798299B (en) Bill information identification method, electronic device and readable storage medium
US10572725B1 (en) Form image field extraction
CN107766809B (en) Electronic device, bill information identification method, and computer-readable storage medium
US10482174B1 (en) Systems and methods for identifying form fields
CN110287971B (en) Data verification method, device, computer equipment and storage medium
KR101462289B1 (en) Digital image archiving and retrieval using a mobile device system
US11157816B2 (en) Systems and methods for selecting and generating log parsers using neural networks
US20240012846A1 (en) Systems and methods for parsing log files using classification and a plurality of neural networks
US10402640B1 (en) Method and system for schematizing fields in documents
CN111523678A (en) Service processing method, device, equipment and storage medium
CN110781925B (en) Software page classification method and device, electronic equipment and storage medium
US20220335035A1 (en) Computer estimations based on statistical tree structures
US20210264583A1 (en) Detecting identification tampering using ultra-violet imaging
CN114140649A (en) Bill classification method, bill classification device, electronic apparatus, and storage medium
CN113938481A (en) Receipt processing method, processing device, electronic equipment and readable storage medium
US20240046679A1 (en) Identifying document generators by color footprints
CN114863452A (en) Method, device, electronic equipment and medium for determining text information in invoice image
CN115292187A (en) Method and device for automatically testing code-free page, electronic equipment and medium
CN115880702A (en) Data processing method, device, equipment, program product and storage medium
US20220309084A1 (en) Record matching in a database system
CN112001792B (en) Configuration information consistency detection method and device
CN118298226A (en) Image processing method and device, apparatus, storage medium and program product
CN115983956B (en) Bid file detection method and system
US20240176951A1 (en) Electronic document validation
US20230140546A1 (en) Randomizing character corrections in a machine learning classification system

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