Invoice processing method, device, equipment and medium based on RPA and AI

By applying RPA and AI technologies in invoice processing, the automatic identification of invoice content and the extraction and entry of target attributes are achieved, which solves the problems of inefficiency and error-prone in the existing technology, reduces manual participation and improves the flexibility of processing.

CN114612905BActive Publication Date: 2025-04-15BEIJING BENYING NETWORK TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210178839.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-02-25
Publication Date
2025-04-15
Estimated Expiration
2042-02-25

AI Technical Summary

Technical Problem

The prior art is inefficient and prone to errors when processing invoices in different formats and languages. Especially when there are many types of invoice formats, a large amount of manpower is required for labeling and training.

Method used

The invoice processing method based on RPA and AI is adopted, and the invoice content is automatically identified through the RPA robot, and the target attribute fields and values ​​are extracted based on OCR technology and setting rules, and stored.

Benefits of technology

It reduces the amount of manual participation, improves the efficiency of identification and entry of invoice content, enhances the accuracy of entry, and improves the flexibility and adaptability of the method.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114612905B_ABST
    Figure CN114612905B_ABST
Patent Text Reader

Abstract

The present disclosure proposes an invoice processing method, device, equipment and medium based on RPA and AI, which relates to the fields of AI and RPA, wherein the method includes: the RPA robot identifies the invoice content of the invoice to be identified based on OCR technology; extracts each target attribute field and the target attribute value corresponding to each target attribute field from the invoice content based on the set rules; and stores each target attribute field and the target attribute value corresponding to each target attribute field in correspondence. Thus, the invoice content of the invoice to be identified is automatically identified by the RPA robot, and the target attribute field and its corresponding target attribute value in the invoice content are automatically extracted and entered. On the one hand, the amount of manual participation can be reduced, human resources can be released, and labor costs can be reduced. On the other hand, the recognition efficiency and entry efficiency of the invoice content can be improved, and the situation that manual entry is prone to errors can be avoided, and the accuracy of invoice content entry can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the fields of artificial intelligence (AI) and robotic process automation (RPA), and in particular to an invoice processing method, device, equipment and medium based on RPA and AI. Background Art

[0002] RPA uses specific "robot software" to simulate human operations on computers and automatically execute process tasks according to rules.

[0003] AI is a technical science that studies and develops theories, methods, technologies and application systems for simulating, extending and expanding human intelligence.

[0004] Intelligent Document Processing (IDP) is a new generation of automation technology that is based on artificial intelligence technologies such as Optical Character Recognition (OCR), Computer Vision (CV), Natural Language Processing (NLP), and Knowledge Graph (KG). It can identify, classify, extract, and verify various types of documents, helping enterprises to realize the intelligence and automation of document processing.

[0005] For enterprises, they may receive invoices in different formats. For example, when the invoice language is different, the invoice format may be different, or for the same invoice language, the invoice format may be different. For example, the invoice language used in different regions is the same, but different regions issue invoices according to different invoice formats. In related technologies, the invoice content is identified and extracted through the following methods:

[0006] First, the IDP model is used to identify and extract the content of invoices with a fixed and uniform format;

[0007] Second, by manually reading invoices, the contents of invoices in different formats can be identified, key information in the invoice contents can be extracted, and the key information in the invoice contents can be entered into the invoice system;

[0008] Third, a custom recognition model is used to identify and extract key information from invoices in different formats.

[0009] However, the first method mentioned above is only applicable to invoices with fixed formats and is not very applicable; the second method mentioned above, which involves manually identifying and entering key information in the invoice content, is not only inefficient but also prone to errors; the third method mentioned above is only applicable to a limited number of invoice formats. When the number of invoice formats is large, a lot of manpower is required to label the training samples, which is time-consuming and labor-intensive. Summary of the invention

[0010] The present disclosure aims to solve one of the technical problems in the related art at least to some extent.

[0011] To this end, the present disclosure proposes an invoice processing method, device, equipment and medium based on RPA and AI, so as to realize automatic identification of the invoice content of the invoice to be identified by the RPA robot, and automatically extract and enter the target attribute fields and their corresponding target attribute values ​​in the invoice content. On the one hand, it can reduce the amount of manual participation, release human resources, and reduce labor costs. On the other hand, it can improve the recognition efficiency and entry efficiency of the invoice content, avoid the error-prone situation of manual entry, and improve the accuracy of invoice content entry. On the other hand, there is no restriction on the invoice format of the invoice to be identified, which can improve the flexibility and adaptability of the method.

[0012] The first embodiment of the present disclosure provides an invoice processing method based on RPA and AI, wherein the method is executed by an RPA robot and includes:

[0013] Obtaining an invoice to be identified, and identifying the invoice content of the invoice to be identified based on optical character recognition (OCR) technology;

[0014] Based on the set rules, extract each target attribute field and the target attribute value corresponding to each target attribute field from the invoice content;

[0015] Each of the target attribute fields and the target attribute value corresponding to each of the target attribute fields are stored correspondingly.

[0016] The second embodiment of the present disclosure proposes an invoice processing device based on RPA and AI, which is applied to an RPA robot, including:

[0017] A first recognition module is used to obtain an invoice to be recognized and recognize the invoice content of the invoice to be recognized based on optical character recognition (OCR) technology;

[0018] An extraction module, used for extracting each target attribute field and the target attribute value corresponding to each target attribute field from the invoice content based on a set rule;

[0019] The storage module is used to store the target attribute fields and the target attribute values ​​corresponding to the target attribute fields in correspondence.

[0020] An embodiment of the third aspect of the present disclosure provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the method described in the embodiment of the first aspect of the present disclosure is implemented.

[0021] The fourth aspect embodiment of the present disclosure provides a non-temporary computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the method described in the first aspect embodiment of the present disclosure is implemented.

[0022] A fifth aspect embodiment of the present disclosure provides a computer program product, including a computer program, which, when executed by a processor, implements the method described in the first aspect embodiment of the present disclosure.

[0023] The technical solution provided by the embodiments of the present disclosure has the following beneficial effects:

[0024] The invoice to be identified is obtained by the RPA robot, and the invoice content of the invoice to be identified is identified based on the optical character recognition (OCR) technology; based on the set rules, each target attribute field and the target attribute value corresponding to each target attribute field are extracted from the invoice content; each target attribute field and the target attribute value corresponding to each target attribute field are stored correspondingly. Thus, the invoice content of the invoice to be identified is automatically identified by the RPA robot, and the target attribute field and the corresponding target attribute value in the invoice content are automatically extracted and entered. On the one hand, the amount of manual participation can be reduced, human resources can be released, and human costs can be reduced; on the other hand, the recognition efficiency and entry efficiency of the invoice content can be improved, and the situation that manual entry is prone to errors can be avoided, and the accuracy of invoice content entry can be improved; on the other hand, there is no restriction on the invoice format of the invoice to be identified, which can improve the flexibility and adaptability of the method; on the other hand, the attribute fields and attribute values ​​in the invoice content are identified and extracted based on the rules. When adding a new invoice format, it is only necessary to modify the rule algorithm, without spending a lot of manpower to continuously annotate and train the training samples, which can reduce the amount of manual participation and release human resources.

[0025] Additional aspects and advantages of the present disclosure will be given in part in the following description and in part will be obvious from the following description or learned through practice of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] The above and / or additional aspects and advantages of the present disclosure will become apparent and easily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which:

[0027] Figure 1A flowchart of an invoice processing method based on RPA and AI provided in an embodiment of the present disclosure;

[0028] Figure 2 A flowchart of another invoice processing method based on RPA and AI provided in an embodiment of the present disclosure;

[0029] Figure 3 Invoice provided for the embodiment of the present disclosure Figure 1 ;

[0030] Figure 4 Invoice provided for the embodiment of the present disclosure Figure 2 ;

[0031] Figure 5 Invoice provided for the embodiment of the present disclosure Figure 3 ;

[0032] Figure 6 A flowchart of another invoice processing method based on RPA and AI provided in an embodiment of the present disclosure;

[0033] Figure 7 A flowchart of another invoice processing method based on RPA and AI provided in an embodiment of the present disclosure;

[0034] Figure 8 A flowchart of another invoice processing method based on RPA and AI provided in an embodiment of the present disclosure;

[0035] Fig. 9 Invoice provided for the embodiment of the present disclosure Figure 4 ;

[0036] Fig.10 A schematic diagram of the structure of an invoice processing device based on RPA and AI provided in an embodiment of the present disclosure;

[0037] Fig.11 A block diagram of an exemplary electronic device suitable for implementing embodiments of the present disclosure is shown. DETAILED DESCRIPTION

[0038] Embodiments of the present disclosure are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present disclosure, and should not be construed as limiting the present disclosure.

[0039] Invoice formats can be varied, and extracting and entering key information from invoice content is a critical task in finance. For invoices with a fixed and uniform format, it is easier to train an intelligent document processing (IDP) model with high recognition accuracy, such as the general multi-invoice recognition model in the pre-trained artificial intelligence (AI) capability.

[0040] For invoices with irregular formats, the following two methods can be used to identify the invoice content:

[0041] The first method is to manually identify key information in the invoice content.

[0042] However, the first manual identification method mentioned above is not only time-consuming and labor-intensive, but also inefficient and not conducive to the development of the enterprise.

[0043] The second method is to use a custom recognition model to identify key information in the invoice content. For example, the custom template recognition model in the customized AI capability can be used to identify the invoice content. Specifically, training samples can be manually annotated, and the annotated training samples can be used to train the custom template recognition model, so that the key information in the invoice content can be identified through the trained custom template recognition model.

[0044] However, the second method mentioned above is only applicable to a limited number of invoice formats. When the number of invoice formats is large, a lot of manpower is needed to label the training samples, which is time-consuming and labor-intensive. In addition, when the invoice format recognized by the model is different from the format of the training sample, the model recognition will fail.

[0045] In response to the above problems, the present disclosure proposes an invoice processing method, device, equipment and medium based on RPA and AI.

[0046] The following describes the invoice processing method, device, equipment and medium based on RPA and AI in the embodiments of the present disclosure with reference to the accompanying drawings. Before describing the embodiments of the present disclosure in detail, for ease of understanding, common technical terms are first introduced:

[0047] "Invoice" refers to the business voucher issued and collected by all units and individuals when buying and selling goods, providing or receiving services, and engaging in other business activities. Invoice is the original voucher of the costs, expenses or income incurred.

[0048] "Invoice to be identified" refers to an invoice that needs to be identified. In the present disclosure, the number of invoices to be identified can be at least one. When the number of invoices to be identified is multiple, the invoice formats of the invoices to be identified can be the same or different, and the present disclosure does not limit this. That is, in the present disclosure, the invoice format of the invoice to be identified is not limited.

[0049] In addition, in the present disclosure, there is no limitation on the invoice language of the invoice to be identified. For example, the invoice language of the invoice to be identified may be non-Chinese, and / or the invoice language of the invoice to be identified may also be Chinese.

[0050] "Optical Character Recognition (OCR)" refers to the process in which an electronic device examines characters printed on paper, determines their shapes by detecting dark and light patterns, and then uses character recognition methods to translate the shapes into computer text; that is, for printed characters, an optical method is used to convert the text in a paper document into a black and white dot matrix image file, and recognition software is used to convert the text in the image into a text format for further editing and processing by word processing software.

[0051] "Invoice contents" may include the invoice name, invoice code and number, copies and purpose, customer name, bank account and account number, commodity (product) name or business item, unit of measurement, quantity, unit price, amount, issuer, invoice date, name (seal) of the invoice issuing unit (individual), issuer, invoice date, payment deadline, etc.

[0052] "Target attribute field" refers to the attribute field in the invoice to be identified. For example, the target attribute field may include invoice number (Invoice Id), invoice date (Invoice Date), invoice time (Invoice Time), payment deadline (Due Date), total cost (Invoice Total), etc.

[0053] It should be understood that the above-mentioned target attribute fields are only exemplary, but the present disclosure is not limited to this. In actual application, for invoices to be identified in different formats and / or using different invoice languages, the target attribute fields may also include other attribute fields. For example, in order to distinguish the order numbers of the sales and purchase parties, the target attribute fields may also include the purchase order number (Purchase Order No, abbreviated as PO No) and Dell Order No, etc., or the target attribute fields may also include an email address (such as the sales person email), a contact number, etc., and the present disclosure does not impose any restrictions on this.

[0054] "Target attribute value" refers to the attribute value corresponding to the target attribute field in the invoice to be identified or the invoice content. For example, the invoice language used in the invoice to be identified is English. The characters contained in the target attribute value may include at least one of numbers, letters, and preset symbols (such as ".", "-", "_", " / ", "@", etc.).

[0055] For example, when the target attribute field is the invoice number, the corresponding target attribute value may be, for example, 11092318, MY-001, or W477-19007870. When the target attribute field is the invoicing date, the corresponding target attribute value may be, for example, 2021.01.08, 2021-01-08, 08 / 01 / 2021, or 08-Jan-2021. When the target attribute field is the invoicing time, the corresponding target attribute value may be, for example, 0:33:10AM or 1:33:10PM. When the target attribute field is the payment deadline, the corresponding target attribute value may be, for example, 2021.05.08, 2021-05-08, 08 / 05 / 2021, or 08-May-2021. When the target attribute field is the total cost, the corresponding target attribute value may be, for example, 4500.00. When the target attribute field is an email address (such as Sales Person Email), the corresponding target attribute value may be, for example, XX_xx@xxxxxx.com.

[0056] “Set rules” refer to pre-set extraction rules used to extract target attribute fields and target attribute values ​​in the invoice to be identified or invoice content.

[0057] The "first rule table" refers to a pre-set rule table used to extract the target attribute field in the invoice to be identified or the invoice content. The first rule table corresponds to the target attribute field one by one, and the first rule table can be obtained based on the corresponding target attribute fields in the invoices to be identified in different formats.

[0058] The "first characteristic field" refers to a characteristic field included in the first rule table, wherein the first characteristic field has a semantic match with the target attribute field corresponding to the first rule table. For example, assuming that the invoice language of the invoice to be identified is English, and assuming that the target attribute field is Invoice Id, the first characteristic field in the first rule table corresponding to the target attribute field may be "Invoice No.", "Invoice#", "INVOICE#", etc.

[0059] The "target text segment" refers to the text segment to which the target attribute field belongs or is located in the invoice content corresponding to the invoice to be identified. The same text segment contains adjacent characters and / or contains characters separated by a first set number of spaces (such as 1 or 2, etc.).

[0060] The "second characteristic field" refers to a pre-set characteristic field, which is specifically a field that matches the supplier's semantics. For example, if the invoice language of the invoice to be identified is English, the second characteristic field may be "Ltd (i.e. Limited Company)", "SBN BHD (Sendirian Berhad, Private Limited Company)", "SBN BHD", "LTD", etc.

[0061] The “second rule table” refers to a pre-set rule table, and the second rule table includes at least one second characteristic field.

[0062] Figure 1 A flowchart of an invoice processing method based on RPA and AI provided in an embodiment of the present disclosure.

[0063] The invoice processing method based on RPA and AI provided in the embodiments of the present disclosure can be applied to an RPA robot, which can be run in any electronic device with computing capabilities. The electronic device can be a personal computer, a mobile terminal, etc. The mobile terminal is, for example, a mobile phone, a tablet computer, a personal digital assistant, and other hardware devices with various operating systems.

[0064] like Figure 1 As shown, the RPA and AI-based invoice processing method may include the following steps:

[0065] Step 101, obtaining the invoice to be identified, and identifying the invoice content of the invoice to be identified based on the OCR technology.

[0066] In the embodiment of the present disclosure, the invoice content of the invoice to be identified is related to the invoice format of the invoice to be identified and / or the invoice language used by the invoice to be identified. When the invoice format of the invoice to be identified is different, the invoice content may be different, and / or, when the invoice language used by the invoice to be identified is different, the invoice content may also be different. For example, the invoice content of an invoice whose language is English may be different from the invoice content of an invoice whose language is Chinese, etc. For another example, when the invoice format of the invoice to be identified is format 1, the invoice content may be several of the examples listed above, and when the invoice format of the invoice to be identified is format 2, the invoice content may include not only several of the examples listed above, but also an email address, a contact number, etc., and the present disclosure does not limit this.

[0067] In a possible implementation of the embodiment of the present disclosure, the invoice to be identified may be stored in an invoice system, and the RPA robot may log in to the invoice system to obtain the invoice to be identified to be processed from the invoice system.

[0068] The invoice to be identified is usually stored in the invoice system in a portable document format (PDF), an open fixed-layout document format (OFD), or an image file format (such as JPG format or JPEG (Joint Photographic Experts Group) format).

[0069] After obtaining the invoice to be identified, the RPA robot can perform character recognition on the invoice to be identified based on the OCR technology in AI technology to identify the invoice content of the invoice to be identified. For example, the invoice to be identified can be scanned based on the OCR component to identify the invoice content of the invoice to be identified.

[0070] In another possible implementation of the embodiment of the present disclosure, the invoice to be identified can also be manually uploaded or sent to the device where the RPA robot is located. For example, the business personnel can scan the paper invoice to obtain the invoice to be identified in PDF format, or the business personnel can take a photo of the paper invoice through an image acquisition device (such as a camera, mobile terminal, etc.) to obtain the invoice to be identified in image file format. After obtaining the invoice to be identified, the business personnel can upload or send the invoice to be identified to the device where the RPA robot is located. After obtaining the invoice to be identified uploaded or sent by the business personnel, the RPA robot can also perform character recognition on the invoice to be identified based on OCR technology to identify the invoice content of the invoice to be identified.

[0071] Step 102: extract each target attribute field and the target attribute value corresponding to each target attribute field from the invoice content based on the set rules.

[0072] In the embodiment of the present disclosure, the setting rule may be a pre-set rule.

[0073] In the embodiment of the present disclosure, the target attribute field refers to the attribute field in the invoice to be identified.

[0074] In the embodiment of the present disclosure, the target attribute value refers to the attribute value corresponding to the target attribute field in the invoice to be identified or the invoice content.

[0075] In the disclosed embodiment, the RPA robot can extract each target attribute field and the target attribute value corresponding to each target attribute field from the invoice content based on the set rules.

[0076] Step 103: Store each target attribute field and the target attribute value corresponding to each target attribute field in correspondence.

[0077] In an embodiment of the present disclosure, the RPA robot may store each target attribute field and the target attribute value corresponding to each target attribute field in correspondence. For example, the RPA robot may store each target attribute field and the target attribute value corresponding to each target attribute field in a target file in correspondence, or may store each target attribute field and the target attribute value corresponding to each target attribute field in an invoice system in correspondence, and so on. The present disclosure does not impose any restrictions on this.

[0078] There is no restriction on the document format of the target file. For example, the target file can be a file in a document format such as Word or Excel.

[0079] The invoice processing method based on RPA and AI of the disclosed embodiment obtains the invoice to be identified through the RPA robot, and identifies the invoice content of the invoice to be identified based on the optical character recognition (OCR) technology; extracts each target attribute field and the target attribute value corresponding to each target attribute field from the invoice content based on the set rules; and stores each target attribute field and the target attribute value corresponding to each target attribute field in correspondence. Thus, the invoice content of the invoice to be identified is automatically identified by the RPA robot, and the target attribute field and the target attribute value corresponding to the target attribute field in the invoice content are automatically extracted and entered. On the one hand, the amount of manual participation can be reduced, human resources are released, and human costs are reduced; on the other hand, the recognition efficiency and entry efficiency of the invoice content can be improved, and the situation that manual entry is prone to errors can be avoided, and the accuracy and reliability of invoice content entry can be improved; on the other hand, the invoice format of the invoice to be identified is not restricted, which can improve the flexibility and adaptability of the method; on the other hand, the attribute fields and attribute values ​​in the invoice content are identified and extracted based on the rules. When adding a new invoice format, it is only necessary to modify the rule algorithm without spending a lot of manpower to continuously annotate and train the training samples, which can reduce the amount of manual participation and release human resources.

[0080] In order to clearly explain how the RPA robot in any embodiment of the present disclosure extracts each target attribute field and the target attribute value corresponding to each target attribute field, the present disclosure also proposes an invoice processing method based on RPA and AI.

[0081] Figure 2 A flowchart of another invoice processing method based on RPA and AI provided in an embodiment of the present disclosure.

[0082] like Figure 2 As shown, the RPA and AI-based invoice processing method may include the following steps:

[0083] Step 201, obtaining the invoice to be identified, and identifying the invoice content of the invoice to be identified based on the OCR technology.

[0084] The execution process of step 201 may refer to the execution process of any embodiment of the present disclosure, and will not be described in detail here.

[0085] Step 202: for each target attribute field, obtain a first rule table matching the target attribute field, wherein the first rule table includes at least one first characteristic field.

[0086] In the embodiment of the present disclosure, each target attribute field has a corresponding first rule table, wherein the first rule table may be a pre-set rule table, or, considering that the format of the invoice to be identified may change in actual applications, when the format of the invoice to be identified changes, the attribute fields in the invoice to be identified may also change. Therefore, in the present disclosure, in order to improve the accuracy and reliability of the target attribute field extraction results, the first rule table can also be dynamically adjusted according to actual application requirements, and the present disclosure does not impose any restrictions on this.

[0087] The first rule table may include at least one characteristic field, which is referred to as the first characteristic field in the present disclosure. Each first characteristic field in the first rule table is obtained by counting attribute fields in invoices to be identified in different formats.

[0088] In the embodiment of the present disclosure, the semantics of each first characteristic field in the first rule table matches the semantics of the target attribute field corresponding to the first rule table, that is, each first characteristic field in the first rule table can represent the target attribute field corresponding to the first rule table. For example, when the target attribute field is the invoice number Invoice Id, the first characteristic fields that match the semantics of the invoice number InvoiceId may include "Invoice No.", "Invoice#", "INVOICE#", "INVOICE:", etc., that is, as long as they can represent the invoice number Invoice Id, they can be used as the first characteristic field of the invoice number Invoice Id, and the present disclosure does not impose any restrictions on this.

[0089] As an example, the invoice language of the invoice to be identified is English for exemplary description. Assuming that the target attribute field is the invoice number Invoice Id, the first rule table corresponding to the invoice number can be shown in Table 1:

[0090] Serial number The first characteristic field (prefixed with the word "invoice") 1 Invoice# 2 Invoice No. 3 INVOICE# 4 Invoice No: 5 Tax Reg. No.: 6 INVOICE: 7 Sales Invoice 8 Doc No. 9 Invoice number: 10 OUR INVOICE NO.: 11 Invoice No 12 Invoice No# 13 NO.: 14 Purchase Invoice 15 NO. 16 Invoice

[0091] Table 1 The first rule table

[0092] In an embodiment of the present disclosure, for each target attribute field, the RPA robot may obtain a first rule table that matches the target attribute field, wherein the first rule table includes at least one first feature field.

[0093] Step 203: based on the first rule table, extract the target attribute field including the first characteristic field in the first rule table from the invoice content.

[0094] In an embodiment of the present disclosure, the RPA robot may extract, from the invoice content, a target attribute field including a first feature field in the first rule table based on the first rule table.

[0095] Still using the above example for illustrative explanation, when the target attribute field is the invoice number Invoice Id, the RPA robot can extract the target attribute field containing the first characteristic field in the first rule table from the invoice content according to the first rule table corresponding to the invoice number Invoice Id, such as Table 1. For example, assuming that the invoice content contains the first characteristic field "Invoice No." in the first rule table, the RPA robot can extract the target attribute field "Invoice No." from the invoice content based on the first rule table. That is to say, in the present disclosure, the target attribute field extracted by the RPA robot is the same as one of the first characteristic fields in the first rule table.

[0096] Step 204: extract the target attribute value corresponding to the target attribute field from the invoice content.

[0097] In an embodiment of the present disclosure, after extracting the target attribute field from the invoice content, the RPA robot may continue to extract the target attribute value corresponding to the target attribute field from the invoice content.

[0098] Step 205: Store each target attribute field and the target attribute value corresponding to each target attribute field in correspondence.

[0099] The execution process of step 205 may refer to the execution process of any embodiment of the present disclosure, and will not be described in detail here.

[0100] The invoice processing method based on RPA and AI of the disclosed embodiment obtains a first rule table matching the target attribute field for each target attribute field, wherein the first rule table contains at least one first characteristic field; based on the first rule table, extracts the target attribute field containing the first characteristic field in the first rule table from the invoice content; and extracts the target attribute value corresponding to the target attribute field from the invoice content. Thus, based on the first rule table corresponding to each target attribute field, each target attribute field is extracted from the invoice content, which is simple to operate and easy to implement, and also improves the recognition efficiency of the target attribute field.

[0101] It should be explained that in actual application scenarios, the typesetting formats of each target attribute field and the target attribute value corresponding to each target attribute field in the invoice content include the following three situations:

[0102] The first case, such as Figure 3 As shown in the middle area 31, the target attribute field and the corresponding target attribute value are arranged adjacent to each other and are located in the same text segment, wherein the same text segment contains adjacent characters and / or contains characters separated by a first set number (such as 1 or 2, etc.) of spaces.

[0103] The second situation, such as Figure 4 As shown in the middle area 41, the target attribute field and the corresponding target attribute value are not located in the same text segment, that is, the text segment to which the target attribute field belongs is different from the text segment to which the corresponding target attribute value belongs, and the target attribute field and the corresponding target attribute value are located in the same row, that is, the target attribute field and the corresponding target attribute value are arranged left and right. It can be understood that in order to facilitate manual viewing or review of the invoice content, in general, when the target attribute field and the corresponding target attribute value are arranged left and right, the distance between different text segments in the invoice to be identified needs to be greater than the set distance threshold, for example, the target attribute field and the corresponding target attribute value need to be separated by a second set number of spaces (such as 6, 7, 8, etc.).

[0104] The third situation, such as Figure 5 As shown in the middle area 51 , the target attribute field and the corresponding target attribute value are not located in the same text segment, and the target attribute field and the corresponding target attribute value are located in the same column, that is, the target attribute field and the corresponding target attribute value are arranged up and down.

[0105] In the first case above, in order to clearly illustrate how the RPA robot extracts the target attribute value corresponding to the target attribute field from the invoice content, the present disclosure also proposes an invoice processing method based on RPA and AI. Figure 6 , the above process is explained in detail.

[0106] Figure 6 A flowchart of another invoice processing method based on RPA and AI provided in an embodiment of the present disclosure.

[0107] like Figure 6 As shown, the RPA and AI-based invoice processing method may include the following steps:

[0108] Step 601, obtaining the invoice to be identified, and identifying the invoice content of the invoice to be identified based on the OCR technology.

[0109] Step 602: For each target attribute field, obtain a first rule table matching the target attribute field, wherein the first rule table includes at least one first characteristic field.

[0110] Step 603: based on the first rule table, extract the target attribute field including the first characteristic field in the first rule table from the invoice content.

[0111] The execution process of step 601 to step 603 can refer to the execution process of any embodiment of the present disclosure, and will not be repeated here.

[0112] Step 604: Determine the target text segment where the target attribute field is located from the invoice content.

[0113] In the disclosed embodiment, the same text segment includes adjacent characters and / or includes characters separated by a first set number (such as 1 or 2) of spaces, wherein the first set number is a smaller value.

[0114] In the embodiment of the present disclosure, the target text segment refers to the text segment to which the target attribute field belongs or is located in the invoice content. For example, taking the target attribute field as the invoice date as an example, the target text segment to which the target attribute field is located in the invoice content may be "Invoice Date: May 3, 2016", or "Invoice Date: 03-May-2016".

[0115] In the disclosed embodiment, the RPA robot can determine the target text segment where the target attribute field is located from the invoice content.

[0116] Step 605: Identify whether there are other characters except the target attribute field in the target text segment.

[0117] In an embodiment of the present disclosure, the RPA robot may perform a string comparison between each character in the target text segment and each character corresponding to the target attribute field to determine whether there are other characters in the target text segment except for the target attribute field.

[0118] For example, a string comparison can be performed between the string corresponding to the target text segment and the string corresponding to the target attribute field. During the comparison process, the starting position and the ending position of the string corresponding to the target attribute field in the target text segment can be identified. Based on the starting position and the ending position, it can be determined whether there are other character positions in the target text segment except for the starting position to the ending position. If it is determined that there are other character positions, it can be determined that there are other characters in the target text segment except for the target attribute field.

[0119] For example, the target text segment is "Invoicing Date: May 3, 2016", and the target attribute field is "Invoicing Date:". By performing string comparison on the target text segment and the target attribute field, it is identified that the string corresponding to the target attribute field "Invoicing Date:" has a starting position of 0 and an ending position of 8 in the string corresponding to the target text segment "Invoicing Date: May 3, 2016". Based on the starting position and the ending position, it is determined that there are other character positions in the target text segment except for the starting position to the ending position, and it is determined that the other characters corresponding to the other character positions in the target text segment are "May 3, 2016".

[0120] It needs to be explained that, in the process of performing string comparison on each character in the target text segment and each character corresponding to the target attribute field, when it is determined based on the starting position and the ending position that there are no other character positions in the target text segment except the starting position to the ending position, it can be determined that there are no other characters in the target text except the target attribute field.

[0121] Step 606: When other characters except the target attribute field exist in the target text segment, the other characters are used as target attribute values ​​corresponding to the target attribute field.

[0122] In the embodiment of the present disclosure, when other characters except the target attribute field exist in the target text segment, the other characters may be used as the target attribute values ​​corresponding to the target attribute field.

[0123] Step 607: Store each target attribute field and the target attribute value corresponding to each target attribute field in correspondence.

[0124] The execution process of step 607 may refer to the execution process of any embodiment of the present disclosure, and will not be described in detail here.

[0125] The invoice processing method based on RPA and AI of the disclosed embodiment determines the target text segment where the target attribute field is located from the invoice content; identifies whether there are other characters except the target attribute field in the target text segment; and when there are other characters except the target attribute field in the target text segment, uses the other characters as the target attribute value corresponding to the target attribute field. Thus, when the target attribute field and the corresponding target attribute value are located in the same text segment, the other characters except the target attribute field in the text segment are used as the target attribute value corresponding to the target attribute field, which can not only realize the accurate extraction of the target attribute value corresponding to the target attribute field in the invoice content, but also improve the extraction efficiency of the target attribute value.

[0126] It is understandable that in the above embodiment, when performing string comparison between each character in the target text segment and each character in the target attribute field, the following situation may also exist: there are no other characters except the target attribute field in the target text segment.

[0127] When there are no characters other than the target attribute field in the target text segment, that is, the second or third situation mentioned above, in order to clearly explain how the RPA robot extracts the target attribute value corresponding to the target attribute field from the invoice content, the present disclosure also proposes an invoice processing method based on RPA and AI. Figure 7 , the above process is explained in detail.

[0128] Figure 7 A flowchart of another invoice processing method based on RPA and AI provided in an embodiment of the present disclosure.

[0129] like Figure 7 As shown, the RPA and AI-based invoice processing method may include the following steps:

[0130] Step 701, obtaining the invoice to be identified, and identifying the invoice content of the invoice to be identified based on the OCR technology.

[0131] Step 702: For each target attribute field, obtain a first rule table matching the target attribute field, wherein the first rule table includes at least one first characteristic field.

[0132] Step 703: Based on the first rule table, extract the target attribute field including the first characteristic field in the first rule table from the invoice content.

[0133] Step 704: Determine the target text segment where the target attribute field is located from the invoice content.

[0134] Step 705 , identifying whether there are other characters except the target attribute field in the target text segment.

[0135] The execution process of step 701 to step 705 can refer to the execution process of any embodiment of the present disclosure, and will not be repeated here.

[0136] Step 706: If there are no other characters except the target attribute field in the target text segment, extract other text segments from the invoice to be recognized based on the set extraction direction, starting from the first position of the target text segment in the invoice to be recognized.

[0137] In the embodiments of the present disclosure, the extraction direction may be set to a preset direction, for example, the extraction direction may be set to a direction from left to right, from top to bottom, etc., and the present disclosure does not impose any limitation on this.

[0138] In an embodiment of the present disclosure, when there are no other characters except the target attribute field in the target text segment, the RPA robot can take the first position of the target text segment in the invoice to be identified as the starting point and extract other text segments from the invoice content according to the set extraction direction.

[0139] A coordinate system may be established on the invoice to be identified, and the first position of the target text segment in the invoice to be identified may be determined according to the established coordinate system. For example, the established coordinate system may be an image coordinate system, wherein the coordinate origin in the image coordinate system may be the center point of the invoice to be identified, the horizontal axis (X axis) is horizontal to the right, and the vertical axis (Y axis) is horizontal downward, and the unit is pixel. It should be noted that the above coordinate system is only used as an example of an image coordinate system. In actual application, the above coordinate system may also be other coordinate systems, such as a pixel coordinate system, wherein the coordinate origin in the pixel coordinate system may be the upper left corner of the invoice to be identified, with the X-axis horizontally to the right and the Y-axis horizontally downward, and the unit is pixel, or the coordinate origin in the above coordinate system may be the upper right corner of the invoice to be identified, with the X-axis horizontally to the left and the Y-axis horizontally downward, and the unit is pixel, or the coordinate origin in the above coordinate system may also be the lower left corner of the invoice to be identified, with the X-axis horizontally to the right and the Y-axis horizontally upward, and the unit is pixel, or the coordinate origin in the above coordinate system may be the lower right corner of the invoice to be identified, with the X-axis horizontally to the left and the Y-axis horizontally upward, and the unit is pixel, and the present disclosure does not impose any limitation on this.

[0140] For the convenience of calculation and explanation, the present disclosure uses the pixel coordinate system as an example for explanation in the following.

[0141] Among them, the first position of the target text segment in the above-mentioned coordinate system can be determined according to the coordinate position of each character in the target text segment in the above-mentioned coordinate system. For example, the coordinate position of each character in the target text segment can be averaged, and the average coordinate can be used as the first position of the target text segment, or the coordinate position of the middle character in the target text segment can be used as the first position of the target text segment, or the coordinate position of the first character in the target text segment can be used as the first position of the target text segment, or the coordinate position of the last character in the target text segment can be used as the first position of the target text segment, and so on. The present disclosure does not impose any restrictions on this.

[0142] For example, when there are no other characters except the target attribute field in the target text segment, the center position of the target text segment in the invoice to be identified can be used as the first position. Taking the first position as the starting point, the RPA robot can extract other text segments except the target text segment from the invoice to be identified according to the set extraction direction.

[0143] For example, take the target attribute field as the invoicing date as an example, assuming that the target attribute field and the corresponding target attribute value are arranged in left-right arrangement, such as Figure 4 As shown in area 41, the target attribute field "INVOICE#" and the corresponding target attribute value "MY-001" are presented in the invoice to be identified as follows:

[0144] “INVOICE#MY-001”;

[0145] The RPA robot can calculate the coordinate position of each character in the target text fragment where the target attribute field is located, determine the first position of the target text fragment based on the coordinate position of each character in the target text fragment, and extract other text fragments "MY-001" except the target text fragment from the invoice content from the first position as the starting point in a left-to-right direction.

[0146] Step 707: determine whether the format of the other text segments matches the target attribute field.

[0147] It is understandable that the formats of other text segments may match the target attribute field, or may not match the target attribute field.

[0148] For example, assuming that the invoice language used by the invoice to be identified is English, the characters contained in the target attribute value corresponding to the target attribute field may include at least one of numbers, letters and preset symbols. For example, when the target attribute field is the invoice number, the characters contained in the attribute value corresponding to the invoice number may be only numbers, or a combination of numbers and letters, or a combination of numbers, letters and preset symbols. If the characters contained in the other text fragments are numbers, or a combination of numbers and letters, or a combination of numbers, letters and preset symbols, then it is determined that its format matches the target attribute field. If the characters contained in the other text fragments are only letters, or the other text fragments contain characters in other languages, then it is determined that its format does not match the target attribute field.

[0149] For another example, when the target attribute field is the total expense, the characters contained in the attribute value corresponding to the total expense may be only numbers, or a combination of numbers and preset symbols (such as currency symbols). If the characters contained in the other text fragments are numbers, or a combination of numbers and preset symbols, it is determined that its format matches the target attribute field. If the characters contained in the other text fragments are only letters, or the other text fragments contain characters in other languages, it is determined that its format does not match the target attribute field.

[0150] In an embodiment of the present disclosure, the RPA robot may determine whether the format of other text segments matches the target attribute field.

[0151] Step 708: When the format of the other text segment matches the target attribute field, the other text segment is used as the target attribute value corresponding to the target attribute field.

[0152] In the embodiment of the present disclosure, when the format of other text fragments matches the target attribute field, it can be determined that the other text fragments are the text fragments where the target attribute value corresponding to the target attribute field is located. Therefore, the other text fragments can be used as the target attribute value corresponding to the target attribute field.

[0153] It should be understood that there may be situations where the format of other text fragments does not match the target attribute field. In this case, the RPA robot can be controlled to take the position of the above-mentioned other text fields in the invoice to be identified as the starting point, and extract candidate text fragments other than other text fragments from the invoice to be identified according to the set extraction direction, and determine whether the format of the candidate text fragment matches the target attribute field. When it is determined that the format of the candidate text fragment matches the target attribute field, the candidate text fragment can be used as the target attribute value corresponding to the target attribute field. When it is determined that the format of the candidate text fragment does not match the target attribute field, the text fragments other than the candidate text fragments can continue to be extracted from the electronic file according to the set extraction direction until the format of the above-mentioned text fragment matches the target attribute field, and the text fragment can be used as the target attribute value corresponding to the target attribute field.

[0154] In a possible implementation of the present disclosure, when the format of other text fragments matches the target attribute field, the relationship between the position of the other text fragments and the position of the target attribute field can be further determined. Only when the position of the other text fragments and the position of the target attribute field meet the second and third situations mentioned above, can the other text fragments be used as the target attribute value corresponding to the target attribute field.

[0155] As an example, when the format of the other text fragment matches the target attribute field, the second position of the other text fragment in the invoice to be identified can be further determined; when the difference between the horizontal coordinate of the first position and the horizontal coordinate of the second position of the target text fragment is less than the first difference threshold, and the difference between the vertical coordinate of the first position and the vertical coordinate of the second position is less than the second difference threshold, the other text fragment is used as the target attribute value corresponding to the target attribute field, wherein the first difference threshold is less than the second difference threshold.

[0156] The first difference threshold and the second difference threshold are both preset, the first difference threshold is a smaller value, and the first difference threshold is smaller than the second difference threshold.

[0157] In the present disclosure, in the case where the format of the other text fragment matches the target attribute field, the second position of the other text fragment in the invoice to be identified can be further determined, wherein the second position is determined in a similar manner to the first position and will not be described in detail here. After determining the second position of the other text fragment in the invoice to be identified, the difference between the horizontal coordinate of the first position and the horizontal coordinate of the second position can be calculated. For example, the difference can be the difference between the horizontal coordinate of the first position and the horizontal coordinate of the second position, or the absolute value of the difference, or the square of the difference, etc. In the case where it is determined that the difference between the horizontal coordinate of the first position and the horizontal coordinate of the second position is less than the first difference threshold, the difference between the vertical coordinate of the first position and the vertical coordinate of the second position can be further calculated. For example, the difference can be the difference between the vertical coordinate of the first position and the vertical coordinate of the second position, or the absolute value of the difference, or the square of the difference, etc. When it is determined that the difference between the vertical coordinate of the first position and the vertical coordinate of the second position is less than the second difference threshold, it can be determined that this situation is the third situation mentioned above, that is, the position where the target attribute field is located and the position where the target attribute value corresponding to the target attribute field is located are arranged up and down, satisfying one of the above three situations, so that other text fragments can be used as the target attribute value corresponding to the target attribute field.

[0158] That is to say, in the present disclosure, considering that there may be multiple attribute values ​​in the same column, but there is only one target attribute value that matches the target attribute field, therefore, the second position of the other text fragments where the various attribute values ​​are located can be matched with the first position of the target text fragment where the target attribute field is located. Only when the difference between the horizontal coordinates of the first position and the second position is small, and the difference between the vertical coordinates of the first position and the second position is small, the other text fragment corresponding to the second position is used as the target attribute value corresponding to the target attribute field.

[0159] Among them, when the target attribute field and the target attribute value are arranged up and down, the horizontal coordinates between the first position and the second position can be equal, or the difference between the horizontal coordinates is small, and because the target attribute field and the target attribute value are located in different rows or adjacent rows, the difference between the vertical coordinates between the first position and the second position can be greater than the difference between the horizontal coordinates.

[0160] As another example, when the format of other text fragments matches the target attribute field, the second position of the other text fragments in the invoice to be identified can be further determined; when the difference between the vertical coordinate of the first position and the vertical coordinate of the second position of the target text fragment where the target attribute field is located is less than the third difference threshold, and the difference between the horizontal coordinate of the first position and the horizontal coordinate of the second position is less than the fourth difference threshold, the other text fragment is used as the target attribute value corresponding to the target attribute field; wherein the third difference threshold is less than the fourth difference threshold.

[0161] Among them, the third difference threshold and the fourth difference threshold are both pre-set, the third difference threshold is a smaller value, and the third difference threshold is less than the fourth difference threshold. It should be noted that the third difference threshold can be the same as the first difference threshold, or the third difference threshold can also be different from the first difference threshold, and accordingly, the fourth difference threshold can be the same as the second difference threshold, or the fourth difference threshold can also be different from the second difference threshold (for example, the fourth difference threshold can be greater than the second difference threshold), and the present disclosure does not limit this.

[0162] In the present disclosure, when the format of the other text fragment matches the target attribute field, the second position of the other text fragment in the invoice to be identified can be further determined. After determining the second position of the other text fragment in the invoice to be identified, the difference between the ordinate of the first position and the ordinate of the second position can be calculated. When it is determined that the difference between the ordinate of the first position and the ordinate of the second position is less than the third difference threshold, the difference between the abscissa of the first position and the abscissa of the second position can be further calculated. When it is determined that the difference between the abscissa of the first position and the abscissa of the second position is less than the fourth difference threshold, it can be determined that this situation is the second situation mentioned above, that is, the position where the target attribute field is located and the position where the target attribute value corresponding to the target attribute field is located are arranged left and right, satisfying one of the above three situations. Thus, the other text fragment can be used as the target attribute value corresponding to the target attribute field.

[0163] That is to say, in the present disclosure, considering that there may be multiple attribute values ​​in the same row, but there is only one target attribute value that matches the target attribute field, therefore, the second position of the other text fragments where the various attribute values ​​are located can be matched with the first position of the target text fragment where the target attribute field is located. Only when the difference between the vertical coordinates of the first position and the second position is small, and the difference between the horizontal coordinates of the first position and the second position is small, the other text fragment corresponding to the second position is used as the target attribute value corresponding to the target attribute field.

[0164] Among them, when the target attribute field and the target attribute value are arranged left and right, the vertical coordinates between the first position and the second position can be equal, but because the target attribute field and the target attribute value are located in different columns or adjacent columns, the difference between the horizontal coordinates between the first position and the second position can be greater than the difference between the vertical coordinates.

[0165] Step 709: Store each target attribute field and the target attribute value corresponding to each target attribute field in correspondence.

[0166] The execution process of step 709 can refer to the execution process of any embodiment of the present disclosure, and will not be repeated here.

[0167] The invoice processing method based on RPA and AI of the disclosed embodiment, when there are no other characters except the target attribute field in the target text segment, takes the first position of the target attribute field in the invoice to be identified as the starting point, and extracts other text segments from the invoice to be identified according to the set extraction direction; determines whether the format of other text segments matches the target attribute field; when the format of other text segments matches the target attribute field, uses other text segments as the target attribute value corresponding to the target attribute field. Thus, when there are no other characters except the target attribute field in the target text segment, the target attribute value corresponding to the target attribute field can be effectively identified by extracting other text segments from the invoice to be identified. Moreover, by verifying the format of other text segments, only when the format of other text segments matches the target attribute field, other text segments are used as the target attribute value corresponding to the target attribute field, which can improve the accuracy and reliability of the target attribute value extraction result corresponding to the target attribute field.

[0168] It should be noted that in addition to some attribute fields, the invoice to be identified may also include other fields, such as the field corresponding to the supplier. In order to clearly explain how the RPA robot in this disclosure identifies the field corresponding to the supplier in the invoice content, this disclosure also proposes an invoice processing method based on RPA and AI. Figure 8 , the above process is explained in detail.

[0169] Figure 8 A flowchart of another invoice processing method based on RPA and AI provided in an embodiment of the present disclosure.

[0170] like Figure 8 As shown, based on any of the above embodiments, the invoice processing method based on RPA and AI may further include the following steps:

[0171] Step 801: Identify at least one candidate text segment containing a set second characteristic field from the invoice content.

[0172] In the embodiment of the present disclosure, the second characteristic field refers to a field that matches the semantics of the supplier. For example, the second characteristic field may be "Limited Company (Ltd)", or "Sendirian Berhad (SBNBHD)", or "SBN BHD", or "LTD", etc. The second characteristic field is pre-set, and the number of the second characteristic fields may be one or more, which is not limited by the present disclosure.

[0173] In the embodiment of the present disclosure, the candidate text segment is a text segment containing a set second characteristic field. The number of candidate text segments may be one or more, and the present disclosure does not impose any limitation on this.

[0174] In the disclosed embodiment, the RPA robot can identify at least one candidate text segment containing the set second characteristic field from the invoice content. For example, the RPA robot can identify a text segment containing the set second characteristic field from the invoice content, and use the identified text segment as a candidate text segment.

[0175] In a possible implementation of the embodiment of the present disclosure, feature fields that match the semantics of suppliers can be counted in advance based on invoices to be identified in different formats to obtain at least one second feature field, and a second rule table can be established based on the at least one second feature field, that is, the second rule table contains at least one second feature field. Thus, the RPA robot can identify at least one candidate text segment containing the second feature field from the invoice content based on the pre-established second rule table.

[0176] As an example, the invoice language of the invoice to be identified is English, and the second rule table can be shown in Table 2:

[0177] Serial number Second characteristic field (including the word "company") 1 LTD. 2 LTD 3 SDN BHD 4 SDN.BHD. 5 BHD 6 BHD. 7 Sdn.Bhd.

[0178] Table 2 Second rule table

[0179] Step 802: Determine a third position of at least one candidate text segment in the invoice to be recognized.

[0180] In an embodiment of the present disclosure, the RPA robot can determine a third position of at least one candidate text segment in the invoice to be identified, wherein the method for determining the third position is similar to the method for determining the first position, and will not be elaborated here.

[0181] Step 803: Determine a text segment corresponding to the supplier from the at least one candidate text segment according to the third position of the at least one candidate text segment, and store the text segment corresponding to the supplier.

[0182] In an embodiment of the present disclosure, the RPA robot can determine a text segment corresponding to a supplier from at least one candidate text segment based on the third position of at least one candidate text segment, so that the RPA robot can store the text segment corresponding to the supplier.

[0183] It should be noted that, for invoices of different formats, the position of the text segment where the supplier is located in the invoice content may be the same or different. In a possible implementation method of the embodiment of the present disclosure, the position of the text segment where the supplier is located can be counted in advance for invoices of different formats, and a correspondence between the invoice format and the position of the text segment where the supplier is located can be established. Therefore, in the present disclosure, the RPA robot can identify the format of the invoice to be identified. After determining the format of the invoice to be identified, the RPA robot can query the above correspondence according to the format of the invoice to be identified, determine the position of the text segment where the supplier is located corresponding to the format of the invoice to be identified (hereinafter referred to as the target position), and match the third position of each candidate text segment with the target position, and use the candidate text segment whose third position matches the target position as the text segment where the supplier is located, and control the RPA robot to store the text segment corresponding to the above supplier.

[0184] For example, to identify the invoice Fig. 9 As shown, the second characteristic field is "SBN BHD" for example, where: Fig. 9 In the layout format corresponding to the invoice to be identified, the text segment where the supplier is located is located at the top of the invoice. The RPA robot can identify the candidate text segment containing the second feature field "SBN BHD" in Table 2 from the invoice content as "xxxxxx SBN BHD" as shown in area 91. The RPA robot can determine the third position of the candidate text segment "xxxxxx SBN BHD" in the invoice, and determine whether the vertical coordinate of the third position is less than the set threshold. If so, it is determined that the candidate segment is located at the top of the invoice to be identified. At this time, it can be determined that the candidate text segment "xxxxxxSBN BHD" is the text segment corresponding to the supplier, and then the RPA robot can store the text segment corresponding to the supplier.

[0185] For example, the invoice to be identified is Fig. 9As shown, the second feature field is "SBN BHD" and "LTD" for example. The RPA robot can identify the candidate text segment 1 containing the second feature field as "xxxxxx SBN BHD" shown in area 91 and the candidate text segment 2 as "xxxxxxx LTD" shown in area 92 from the invoice content based on the second feature field "SBN BHD" and "LTD", and respectively determine the candidate text segment 1 "xxxxxx SBN BHD" in the third position 1 in the invoice and the candidate text segment 2 "xxxxxxx LTD" in the third position 2 in the invoice. The RPA robot can determine that the candidate segment 1 is located at the upper part of the invoice to be identified and the candidate segment 2 is located in the middle part of the invoice to be identified based on the third position 1 and the third position 2. In the layout format corresponding to this invoice to be identified, the text segment where the supplier is located is located at the upper part of the invoice to be identified. Based on this principle, the RPA robot can determine that the candidate text segment 1 "xxxxxx SBN BHD" is the text segment corresponding to the supplier, and then the RPA robot can store the text segment corresponding to the supplier.

[0186] The invoice processing method based on RPA and AI in the disclosed embodiment uses an RPA robot to identify at least one candidate text segment containing a set second feature field from the invoice content; determine the third position of at least one candidate text segment in the invoice to be identified; and determine the text segment corresponding to the supplier from at least one candidate text segment based on the third position of at least one candidate text segment, and store the text segment corresponding to the supplier. Thus, the RPA robot can effectively and accurately identify the text segment corresponding to the supplier in the invoice content based on the set second feature field, and store the text segment corresponding to the supplier, which can improve the richness of invoice content entry.

[0187] In any embodiment of the present disclosure, the processing of an enterprise's invoice is used as an example. The enterprise has more than 2,000 types of invoices, and new invoice formats are constantly being added. The enterprise's invoices can be in multiple languages. The present disclosure uses English as the invoice language for example.

[0188] First, in order to effectively identify the invoice content, the following prerequisites can be met:

[0189] 1. The format of the corporate invoice is the image format supported by general invoice recognition, such as JPG format, JPEG format, etc.

[0190] 2. If the format of the corporate invoice is PDF, the number of pages of the corporate invoice can be 1 page, or it can be multiple pages. When the invoice to be identified has multiple pages, the pages can be turned manually, or the program can be used to control the automatic turning of the invoice to be identified to control the RPA robot to identify the invoice content corresponding to each page. The present disclosure does not impose any restrictions on this.

[0191] Second, the steps to identify corporate invoices can be:

[0192] 1. Determine the fields that the customer needs to identify. In this example, the fields that need to be identified include vendor (VendorName), invoice number (Invoice Id), invoice date (Invoice Date), payment deadline (Due Date), total cost (Invoice Total), etc.

[0193] 2. Select invoices of different formats from a large number of corporate invoices as the invoices to be processed. In this example, 30 invoices of different formats are selected for identification. The invoices to be identified are JPG format image files, where one image contains one invoice.

[0194] 3. With the goal of identifying the Vendor Name field, analyze and count the 30 invoices to be identified.

[0195] 1) For invoices to be identified in English, the vendor name usually contains the following fixed characters: "LTD.", "LTD", "SDN BHD", "SDN.BHD.", "BHD", "BHD.", "Sdn.Bhd.", etc. The above fixed characters can be used as the second feature field, and the second rule table is established based on these second feature fields, such as Figure 2 shown.

[0196] 2) Based on the second rule table, each candidate text segment containing the second characteristic field in each invoice to be identified can be determined, and the position of each candidate text segment can be determined, that is, the position of each candidate text segment in the invoice to be identified.

[0197] 3) The vendor name usually appears at the top and upper left corner of the invoice. When the invoice contains information of multiple companies, the vendor information can be identified based on this feature. That is, the text segment where the vendor is located can be determined from the candidate text segments in the same invoice to be identified based on the positions of the candidate text segments in the same invoice to be identified.

[0198] 4. With the identification attribute field as the invoice number (Invoice Id) field, the 30 invoices to be identified are sub-systematized.

[0199] 1) In the invoice content, the pattern of the invoice number is invoice number + invoice number value. Statistics are taken on the invoices to be identified in different formats, and it is determined that the fields that match the semantics of the invoice number include: "Invoice No.", "Invoice#", "INVOICE#", etc. The above fields can be used as the first feature fields, and the first rule table is established based on the first feature field, as shown in Table 1.

[0200] 2) Based on the first rule table, the invoice numbers of the 30 invoices to be identified are divided into the following three situations:

[0201] In the first case, the characters corresponding to the Invoice Id field and the characters corresponding to the Invoice Id value corresponding to the Invoice Id field are located in the same text segment, such as Figure 3 As shown in the middle area 31. There are 14 invoices to be identified that meet this condition.

[0202] In the second case, the position of the Invoice Id field and the position of the Invoice Id value corresponding to the Invoice Id field are adjacent and in the same row, but the distance between the position of the Invoice Id field and the position of the Invoice Id value is greater than the set distance, that is, the Invoice Id field and the Invoice Id value are arranged left and right, such as Figure 4 As shown in the middle area 41. There are 12 invoices to be identified that meet this condition.

[0203] In the third case, the location of the Invoice Id field and the location of the Invoice Id value corresponding to the Invoice Id field are not in the same row, and can be multiple rows apart, that is, the Invoice Id field and the Invoice Id value are arranged one above the other, such as Figure 5 As shown in the middle area 51. There are 4 invoices to be identified that meet this condition.

[0204] Therefore, for each invoice to be identified, based on the first rule table, the invoice number (Invoice Id) field containing the first characteristic field in the first rule table can be extracted from the invoice content, and the target text segment where the invoice number (Invoice Id) field is located can be determined. When it is determined that there are other characters other than the invoice number (Invoice Id) field in the target text segment where the invoice number (Invoice Id) field is located, the first situation is met, and the other characters can be used as the invoice number (Invoice Id) value corresponding to the invoice number (Invoice Id) field.

[0205] For example, the last character in the Invoice Id field may be determined in the target text segment, a separator may be set after the last character, and the target text segment may be segmented according to the separator to obtain the Invoice Id value located on the right side of the Invoice Id field.

[0206] When there are no other characters other than the Invoice Number (Invoice Id) field in the target text segment where the Invoice Number (Invoice Id) field is located, the position of the Invoice Number (Invoice Id) field in the invoice to be identified is taken as the starting point, and the other text segments are traversed and searched from left to right. Among them, when the format of the other text segment matches the Invoice Number (Invoice Id) field, it can be determined that the other text segment is the text segment where the Invoice Number (Invoice Id) value is located; on the contrary, when the format of the other text segment does not match the Invoice Number (Invoice Id) field, the next text segment of the other text segment can be traversed and searched from left to right until it is determined that the format of a certain text segment matches the Invoice Number (Invoice Id) field, and then the traversal can be stopped, and the text segment is used as the text segment where the Invoice Number (Invoice Id) value is located.

[0207] Among them, when the format of the other text segment matches the invoice number (Invoice Id) field, the position of the other text segment can be further judged to determine whether it meets the second situation or the third situation above. For example, in the second situation, the horizontal coordinate difference between the position of the other text segment and the position of the invoice number (Invoice Id) field is less than 45, and the vertical coordinate difference is less than 5 (that is, the above situation). Figure 7 In an embodiment, the fourth difference threshold may be 45, and the second difference threshold may be 5), and the other text segments are determined to be the text segments where the invoice number (Invoice Id) value is located.

[0208] In the third case, the position of the other text fragment and the position of the Invoice ID field have a horizontal axis difference of less than 5 and a vertical axis difference of less than 30 (i.e. Figure 7 In an embodiment, the third difference threshold may be 30, and the first difference threshold may be 5), and the other text segments are determined to be the text segments where the invoice number (Invoice Id) value is located.

[0209] 5. For the identification of other target attribute fields, such as invoice date (Invoice Date), invoice time (InvoiceTime), payment deadline (Due Date), total cost (Invoice Total) and other attribute fields, a similar identification method as the invoice number (Invoice Id) can be used to find the target attribute value corresponding to each target attribute field.

[0210] In summary, in the present disclosure, the situations of each invoice to be identified can be classified, and the situations with the largest proportion can be processed first. The attribute values ​​of the attribute fields in the invoice to be identified can be searched and traversed by strings, and the corresponding rule algorithms can be written, and then the situations with a smaller proportion can be processed. In special cases, in order to save resources and improve processing efficiency, the situations with a particularly small proportion can be abandoned. The strings that meet the rules can be verified, such as the invoice number value includes numbers, the date has a specific date format, etc., and the strings that pass the verification are used as the attribute values ​​of the corresponding attribute fields.

[0211] By writing rule algorithms corresponding to each field, the RPA robot can call the rule algorithm for each field, extract each field (supplier, invoice number, invoicing date, invoicing time, payment deadline, total cost, etc.), extract the attribute values ​​corresponding to each attribute field, and write the extracted information into an Excel table.

[0212] The RPA and AI-based invoice processing method disclosed in the present invention can at least embody the following advantages when processing invoices to be identified in various formats:

[0213] 1. Provide a solution for the identification of general invoices. Based on the method disclosed in the present invention, key field information in invoices to be identified in different formats can be automatically identified and extracted.

[0214] 2. Solve the problem that the custom template recognition model can only recognize a limited number of invoice formats, and when a new invoice format is added, it takes manpower to continuously label and train the training samples.

[0215] 3. By adopting the rule-based invoice information identification method disclosed in the present invention, when adding a new invoice format type, it is only necessary to modify the rule table and / or rule algorithm, without spending a lot of manpower to continuously label and train the training samples, which can reduce the amount of manual participation and release human resources.

[0216] With the above Figures 1 to 8 Corresponding to the invoice processing method based on RPA and AI provided in the embodiment, the present disclosure also provides an invoice processing device based on RPA and AI. Figures 1 to 8 The invoice processing method based on RPA and AI provided in the embodiment corresponds to each other, so the implementation of the invoice processing method based on RPA and AI is also applicable to the invoice processing device based on RPA and AI provided in the embodiment of the present disclosure, and will not be described in detail in the embodiment of the present disclosure.

[0217] Fig.10 A schematic diagram of the structure of an invoice processing device based on RPA and AI provided in an embodiment of the present disclosure.

[0218] like Fig.10 As shown, the RPA and AI-based invoice processing device 1000 is applied to an RPA robot and may include: a first identification module 1001, an extraction module 1002 and a storage module 1003.

[0219] The first recognition module 1001 is used to obtain the invoice to be recognized and recognize the invoice content of the invoice to be recognized based on the optical character recognition (OCR) technology.

[0220] The extraction module 1002 is used to extract each target attribute field and the target attribute value corresponding to each target attribute field from the invoice content based on the set rules.

[0221] The storage module 1003 is used to store each target attribute field and the target attribute value corresponding to each target attribute field in correspondence.

[0222] In a possible implementation of the embodiment of the present disclosure, the target attribute field includes: at least one of: invoice number, invoicing date, invoicing time, payment deadline and total fee; the extraction module 1002 is used to: for each target attribute field, obtain a first rule table matching the target attribute field, wherein the first rule table contains at least one first characteristic field; based on the first rule table, extract the target attribute field containing the first characteristic field in the first rule table from the invoice content; extract the target attribute value corresponding to the target attribute field from the invoice content.

[0223] In a possible implementation of the embodiment of the present disclosure, the extraction module 1002 is used to: determine the target text segment where the target attribute field is located from the invoice content; identify whether there are other characters except the target attribute field in the target text segment; and when there are other characters except the target attribute field in the target text segment, use the other characters as the target attribute value corresponding to the target attribute field.

[0224] In a possible implementation of the embodiment of the present disclosure, the extraction module 1002 is further used to: when there are no other characters except the target attribute field in the target text segment, take the first position of the target text segment in the invoice to be identified as the starting point, and extract other text segments from the invoice to be identified according to the set extraction direction; determine whether the format of the other text segments matches the target attribute field; and when the format of the other text segments matches the target attribute field, use the other text segments as the target attribute value corresponding to the target attribute field.

[0225] In a possible implementation of the embodiment of the present disclosure, the extraction module 1002 is used to: determine the second position of the other text segment in the invoice to be identified when the format of the other text segment matches the target attribute field; when the difference between the horizontal coordinate of the first position and the horizontal coordinate of the second position is less than the first difference threshold, and the difference between the vertical coordinate of the first position and the vertical coordinate of the second position is less than the second difference threshold, use the other text segment as the target attribute value corresponding to the target attribute field; wherein the first difference threshold is less than the second difference threshold. Alternatively, when the difference between the vertical coordinate of the first position and the vertical coordinate of the second position is less than the third difference threshold, and the difference between the horizontal coordinate of the first position and the horizontal coordinate of the second position is less than the fourth difference threshold, use the other text segment as the target attribute value corresponding to the target attribute field; wherein the third difference threshold is less than the fourth difference threshold.

[0226] In a possible implementation of the embodiment of the present disclosure, the RPA and AI-based invoice processing method device 1000 may further include:

[0227] The second recognition module is used to recognize at least one candidate text segment containing a set second characteristic field from the invoice content.

[0228] The determination module is used to determine a third position of at least one candidate text segment in the invoice to be identified.

[0229] The processing module is used to determine a text segment corresponding to a supplier from at least one candidate text segment according to a third position of the at least one candidate text segment, and store the text segment corresponding to the supplier.

[0230] In a possible implementation of the embodiment of the present disclosure, the first recognition module is used to: identify at least one candidate text segment containing a second feature field from the invoice content based on a second rule table; wherein the second rule table contains at least one second feature field.

[0231] The invoice processing device based on RPA and AI of the disclosed embodiment obtains the invoice to be identified through the RPA robot, and identifies the invoice content of the invoice to be identified based on the optical character recognition (OCR) technology; extracts each target attribute field and the target attribute value corresponding to each target attribute field from the invoice content based on the set rules; and stores each target attribute field and the target attribute value corresponding to each target attribute field in correspondence. Thus, the invoice content of the invoice to be identified is automatically identified by the RPA robot, and the target attribute field and the target attribute value corresponding to the target attribute field in the invoice content are automatically extracted and entered. On the one hand, the amount of manual participation can be reduced, human resources can be released, and human costs can be reduced; on the other hand, the recognition efficiency and entry efficiency of the invoice content can be improved, and the situation that manual entry is prone to errors can be avoided, and the accuracy of invoice content entry can be improved; on the other hand, the invoice format of the invoice to be identified is not restricted, which can improve the flexibility and adaptability of the method; on the other hand, the attribute fields and attribute values ​​in the invoice content are identified and extracted based on the rules. When adding a new invoice format, it is only necessary to modify the rule algorithm without spending a lot of manpower to continuously annotate and train the training samples, which can reduce the amount of manual participation and release human resources.

[0232] In order to implement the above embodiments, the embodiments of the present disclosure also propose an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the invoice processing method based on RPA and AI as described in any of the above method embodiments is implemented.

[0233] In order to implement the above embodiments, the embodiments of the present disclosure also propose a non-temporary computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the invoice processing method based on RPA and AI as described in any of the above method embodiments is implemented.

[0234] In order to implement the above embodiments, the embodiments of the present disclosure also propose a computer program product. When the instruction processor in the computer program product is executed, the invoice processing method based on RPA and AI as described in any of the above method embodiments is implemented.

[0235] Fig.11 A block diagram of an exemplary electronic device suitable for implementing embodiments of the present disclosure is shown. Fig.11 The electronic device 12 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0236] like Fig.11 As shown, the electronic device 12 is in the form of a general purpose computing device. The components of the electronic device 12 may include, but are not limited to: one or more processors or processing units 16, a system memory 28, and a bus 18 that connects various system components (including the memory 28 and the processing unit 16).

[0237] The bus 18 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, a graphics acceleration port, a processor or a local bus using any of a variety of bus structures. For example, these architectures include but are not limited to Industry Standard Architecture (ISA) bus, Micro Channel Architecture (MAC) bus, Enhanced ISA bus, Video Electronics Standards Association (VESA) local bus and Peripheral Component Interconnection (PCI) bus.

[0238] The electronic device 12 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by the electronic device 12, including volatile and non-volatile media, removable and non-removable media.

[0239] The memory 28 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 30 and / or cache memory 32. The electronic device 12 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, the storage system 34 may be used to read and write non-removable, non-volatile magnetic media ( Fig.11 not shown, usually called a "hard drive"). Although Fig.11Not shown in the figure, a disk drive for reading and writing a removable non-volatile disk (e.g., a "floppy disk"), and an optical disk drive for reading and writing a removable non-volatile optical disk (e.g., a compact disc read only memory (CD-ROM), a digital versatile disc read only memory (DVD-ROM), or other optical media) may be provided. In these cases, each drive may be connected to the bus 18 via one or more data medium interfaces. The memory 28 may include at least one program product having a set (e.g., at least one) of program modules configured to perform the functions of the various embodiments of the present disclosure.

[0240] A program / utility 40 having a set (at least one) of program modules 42 may be stored, for example, in the memory 28, such program modules 42 including but not limited to an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment. The program modules 42 generally perform the functions and / or methods of the embodiments described in the present disclosure.

[0241] The electronic device 12 may also communicate with one or more external devices 14 (e.g., keyboards, pointing devices, displays 24, etc.), may also communicate with one or more devices that enable a user to interact with the electronic device 12, and / or may communicate with any device that enables the electronic device 12 to communicate with one or more other computing devices (e.g., network cards, modems, etc.). Such communication may be performed via an input / output (I / O) interface 22. Furthermore, the electronic device 12 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) via a network adapter 20. As shown, the network adapter 20 communicates with other modules of the electronic device 12 via a bus 18. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 12, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0242] The processing unit 16 executes various functional applications and data processing by running the programs stored in the memory 28, such as implementing the methods mentioned in the above embodiments.

[0243] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present disclosure. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction.

[0244] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of the features. In the description of the present disclosure, "plurality" means at least two, such as two, three, etc., unless otherwise clearly and specifically defined.

[0245] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, segment or portion of code that includes one or more executable instructions for implementing the steps of a custom logical function or process, and the scope of the preferred embodiments of the present disclosure includes additional implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in reverse order depending on the functions involved, which should be understood by technicians in the technical field to which the embodiments of the present disclosure belong.

[0246] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute the instructions), or in combination with these instruction execution systems, devices or apparatuses. For the purpose of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in combination with these instruction execution systems, devices or apparatuses. More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (electronic device), a portable computer disk box (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), a fiber optic device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium and then editing, interpreting or processing in other suitable ways if necessary, and then stored in a computer memory.

[0247] It should be understood that the various parts of the present disclosure can be implemented in hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, multiple steps or methods can be implemented in software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, any one of the following technologies known in the art or a combination thereof can be used to implement: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0248] A person skilled in the art may understand that all or part of the steps in the method for implementing the above-mentioned embodiment may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiment.

[0249] In addition, each functional unit in each embodiment of the present disclosure may be integrated into a processing module, or each unit may exist physically separately, or two or more units may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium.

[0250] The storage medium mentioned above may be a read-only memory, a disk or an optical disk, etc. Although the embodiments of the present disclosure have been shown and described above, it can be understood that the above embodiments are exemplary and cannot be understood as limitations of the present disclosure. A person of ordinary skill in the art may change, modify, replace and modify the above embodiments within the scope of the present disclosure.

Claims

1. An invoice processing method based on robotic process automation (RPA) and artificial intelligence (AI), characterized in that: The method is performed by an RPA robot and includes: Obtaining an invoice to be identified, and identifying the invoice content of the invoice to be identified based on optical character recognition (OCR) technology; Based on the set rules, extract each target attribute field and the target attribute value corresponding to each target attribute field from the invoice content; Correspondingly storing each of the target attribute fields and the target attribute values ​​corresponding to each of the target attribute fields; The step of extracting each target attribute field and the target attribute value corresponding to each target attribute field from the invoice content based on the set rule includes: For each of the target attribute fields, obtaining a first rule table matching the target attribute field, wherein the first rule table includes at least one first characteristic field; Based on the first rule table, extracting the target attribute field including the first characteristic field in the first rule table from the invoice content; Extracting the target attribute value corresponding to the target attribute field from the invoice content; The step of extracting the target attribute value corresponding to the target attribute field from the invoice content includes: Determine, from the invoice content, a target text segment where the target attribute field is located; Identify whether there are other characters except the target attribute field in the target text segment; In the case that other characters except the target attribute field exist in the target text segment, taking the other characters as the target attribute values ​​corresponding to the target attribute field; The step of extracting the target attribute value corresponding to the target attribute field from the invoice content further includes: In the case that there are no other characters except the target attribute field in the target text segment, taking the first position of the target text segment in the invoice to be identified as the starting point, extracting other text segments from the invoice to be identified according to the set extraction direction; Determining whether the format of the other text fragment matches the target attribute field; In the case that the format of the other text segment matches the target attribute field, the other text segment is used as the target attribute value corresponding to the target attribute field.

2. The method according to claim 1, characterized in that The target attribute field includes at least one of: invoice number, invoicing date, invoicing time, payment deadline and total cost.

3. The method according to claim 1, characterized in that In the case where the format of the other text segment matches the target attribute field, using the other text segment as the target attribute value corresponding to the target attribute field includes: In the case where the format of the other text segment matches the target attribute field, determining a second position of the other text segment in the invoice to be identified; When the difference between the abscissa of the first position and the abscissa of the second position is less than a first difference threshold, and the difference between the ordinate of the first position and the ordinate of the second position is less than a second difference threshold, taking the other text segment as the target attribute value corresponding to the target attribute field; wherein the first difference threshold is less than the second difference threshold; or, When the difference between the longitudinal coordinate of the first position and the longitudinal coordinate of the second position is less than a third difference threshold, and the difference between the horizontal coordinate of the first position and the horizontal coordinate of the second position is less than a fourth difference threshold, the other text fragment is used as the target attribute value corresponding to the target attribute field; wherein the third difference threshold is less than the fourth difference threshold.

4. The method according to any one of claims 1 to 3, characterized in that The method further comprises: Identifying at least one candidate text segment containing a set second feature field from the invoice content; Determining a third position of the at least one candidate text segment in the invoice to be recognized; According to the third position of the at least one candidate text segment, a text segment corresponding to a supplier is determined from the at least one candidate text segment, and the text segment corresponding to the supplier is stored.

5. The method according to claim 4, characterized in that The step of identifying at least one candidate text segment containing a set second characteristic field from the invoice content includes: Based on a second rule table, at least one candidate text segment containing the second feature field is identified from the invoice content; wherein the second rule table contains at least one second feature field.

6. An invoice processing device based on robotic process automation (RPA) and artificial intelligence (AI), characterized in that: Applied to RPA robots, including: A first recognition module is used to obtain an invoice to be recognized and recognize the invoice content of the invoice to be recognized based on optical character recognition (OCR) technology; An extraction module, used for extracting each target attribute field and the target attribute value corresponding to each target attribute field from the invoice content based on a set rule; A storage module, used for correspondingly storing each of the target attribute fields and the target attribute values ​​corresponding to each of the target attribute fields; The extraction module is used to obtain, for each of the target attribute fields, a first rule table matching the target attribute field, wherein the first rule table contains at least one first characteristic field; Based on the first rule table, extracting the target attribute field including the first characteristic field in the first rule table from the invoice content; Extracting the target attribute value corresponding to the target attribute field from the invoice content; The extraction module is used to determine the target text segment where the target attribute field is located from the invoice content; Identify whether there are other characters except the target attribute field in the target text segment; In the case that other characters except the target attribute field exist in the target text segment, taking the other characters as the target attribute values ​​corresponding to the target attribute field; The extraction module is further configured to extract other text segments from the invoice to be identified based on the set extraction direction, taking the first position of the target text segment in the invoice to be identified as the starting point, if there are no other characters except the target attribute field in the target text segment; Determining whether the format of the other text fragment matches the target attribute field; In the case that the format of the other text segment matches the target attribute field, the other text segment is used as the target attribute value corresponding to the target attribute field.

7. The device according to claim 6, characterized in that The target attribute field includes at least one of: invoice number, invoicing date, invoicing time, payment deadline and total cost.

8. The device according to claim 6, characterized in that The extraction module is used to: In the case where the format of the other text segment matches the target attribute field, determining a second position of the other text segment in the invoice to be identified; When the difference between the abscissa of the first position and the abscissa of the second position is less than a first difference threshold, and the difference between the ordinate of the first position and the ordinate of the second position is less than a second difference threshold, taking the other text segment as the target attribute value corresponding to the target attribute field; wherein the first difference threshold is less than the second difference threshold; or, When the difference between the longitudinal coordinate of the first position and the longitudinal coordinate of the second position is less than a third difference threshold, and the difference between the horizontal coordinate of the first position and the horizontal coordinate of the second position is less than a fourth difference threshold, the other text fragment is used as the target attribute value corresponding to the target attribute field; wherein the third difference threshold is less than the fourth difference threshold.

9. An electronic device, characterized in that: The method comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the method according to any one of claims 1 to 5 is implemented.

10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.

11. A computer program product, comprising a computer program, which, when executed by a processor, implements the method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Deep learning-based invoice information identification method and apparatus, and computer device

    CN113743336A