Invoice recognition method, computer device and storage medium
Invoices are parsed and reordered through preconfigured character recognition services and reading order algorithms, combined with multi-modal algorithms for data fusion, which solves the problem of low cross-border invoice parsing accuracy and versatility, and achieves efficient invoice identification and Cross-border business automation.
Patent Information
- Application Number
- PCT/CN2023/127168
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-03-06
- Filing Date
- 2023-10-27
- Publication Date
- 2024-09-12
AI Technical Summary
The existing technology has low parsing accuracy, limited versatility, and low efficiency in cross-border invoice parsing, making it difficult to achieve efficient invoice identification and affecting the efficiency of cross-border business automation.
Use preconfigured character recognition services and reading order algorithms to parse and reorder invoice files, combine multi-modal algorithms for data fusion, and input recognition models for data inference to determine the invoice content.
It improves the accuracy and versatility of invoice parsing, improves the identification efficiency of cross-border invoices, is suitable for different types and styles of invoices, and enhances the automated identification capabilities of cross-border business.
Smart Images

Figure CN2023127168_12092024_PF_FP_ABST
Abstract
Description
Invoice identification method, computer equipment and storage medium
[0001] This application claims priority to the Chinese patent application filed with the China Patent Office on March 6, 2023, with application number 202310202568.0 and application name “Invoice Identification Method, Computer Device and Storage Medium”, the entire contents of which are incorporated by reference into this application. Technical Field
[0002] The present application relates to the field of invoice recognition, and in particular to an invoice recognition method, computer equipment, and computer storage medium. Background Art
[0003] With the development of digital trade, the volume of cross-border trade transactions is increasing. In cross-border business, invoice parsing is an indispensable step. However, due to the diversity of invoice styles and the non-fixed nature of parsing fields, current methods are difficult to obtain correct parsing results for cross-border invoices. In particular, for different types of invoices, the parsing versatility is low, and efficient invoice recognition for cross-border business cannot be achieved, which affects the efficiency of automated business in cross-border business.
[0004] Application Contents
[0005] The purpose of this application is to provide an invoice recognition method, computer equipment, and computer storage medium to at least solve the problems of low parsing accuracy, limited parsing versatility, and low parsing efficiency of cross-border invoices.
[0006] To solve the above technical problems, this application provides an invoice recognition method, comprising:
[0007] Receive input invoice documents;
[0008] Parsing the invoice file based on a preconfigured character recognition service to obtain an information data source of the invoice file;
[0009] Obtaining a preset reading order algorithm, and reordering the information data source based on the reading order algorithm to obtain a target data source having a target file reading order;
[0010] The target data source is fused using a multimodal algorithm and then input into a recognition model to perform data inference to obtain content information corresponding to the target data source;
[0011] The invoice content of the invoice document is determined according to the content information of each target data source.
[0012] To solve the above technical problems, the present application provides a computer device, including a memory and a processor, wherein the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the processor is configured to perform:
[0013] Receive input invoice documents;
[0014] Parsing the invoice file based on a preconfigured character recognition service to obtain an information data source of the invoice file;
[0015] Obtaining a preset reading order algorithm, and reordering the information data source based on the reading order algorithm to obtain a target data source having a target file reading order;
[0016] The target data source is fused using a multimodal algorithm and then input into a recognition model to perform data inference to obtain content information corresponding to the target data source;
[0017] The invoice content of the invoice document is determined according to the content information of each target data source.
[0018] To solve the above technical problems, the present application provides a storage medium storing computer-readable instructions. When the computer-readable instructions are executed by one or more processors, the one or more processors are configured to execute:
[0019] Receive input invoice documents;
[0020] Parsing the invoice file based on a preconfigured character recognition service to obtain an information data source of the invoice file;
[0021] Obtaining a preset reading order algorithm, and reordering the information data source based on the reading order algorithm to obtain a target data source having a target file reading order;
[0022] The target data source is fused using a multimodal algorithm and then input into a recognition model to perform data inference to obtain content information corresponding to the target data source;
[0023] The invoice content of the invoice document is determined according to the content information of each target data source. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which:
[0025] FIG1 is a schematic diagram of the basic flow of an invoice identification method according to a specific embodiment of the present application;
[0026] FIG2 is a schematic diagram of the basic structure of an invoice recognition device according to a specific embodiment of the present application;
[0027] FIG3 is a basic structural block diagram of a computer device according to a specific embodiment of the present application. DETAILED DESCRIPTION
[0028] The following describes in detail embodiments of the present application, 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 only used to explain the present application, and are not to be construed as limiting the present application.
[0029] Those skilled in the art will understand that, unless otherwise stated, the singular forms "a," "an," "said," and "the" used herein may also include plural forms. It should be further understood that the term "comprising" used in the specification of this application refers to the presence of the stated features, integers, steps, operations, elements, and / or components, but does not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof.
[0030] It will be understood by those skilled in the art that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by those skilled in the art to which this application belongs. It should also be understood that terms such as those defined in common dictionaries should be understood to have meanings consistent with their meanings in the context of the prior art and will not be interpreted in an idealized or overly formal sense unless specifically defined as herein.
[0031] As will be understood by those skilled in the art, the term "terminal" as used herein includes both devices that are wireless signal receivers, i.e., devices that only have wireless signal receivers without transmission capabilities, and devices that have receiving and transmitting hardware capable of performing two-way communication over a two-way communication link. Such devices may include: cellular or other communication devices with single-line displays, multi-line displays, or cellular or other communication devices without multi-line displays; PCS (Personal Communications Service) devices that may combine voice, data processing, fax, and / or data communication capabilities; PDAs (Personal Digital Assistants) that may include a radio frequency receiver, a pager, Internet / Intranet access, a web browser, a notepad, a calendar, and / or a GPS (Global Positioning System) receiver; and conventional laptop and / or palmtop computers or other devices that have and / or include a radio frequency receiver. As used herein, a "terminal" may be portable, transportable, installed in a vehicle (air, sea, and / or land), or adapted and / or configured to operate locally, and / or in a distributed manner, at any other location on Earth and / or in space. As used herein, a "terminal" may also be a communication terminal, an Internet access terminal, or a music / video playback terminal, such as a PDA, an MID (Mobile Internet Device), and / or a mobile phone with music / video playback capabilities, or a device such as a smart TV or a set-top box.
[0032] The hardware referred to by names such as "server", "client", and "service node" in this application is essentially an electronic device with capabilities equivalent to those of a personal computer. It is a hardware device that has the necessary components revealed by the von Neumann principle, such as a central processing unit (including an arithmetic unit and a controller), a memory, an input device, and an output device. Computer programs are stored in its memory, and the central processing unit loads the program stored in the external memory into the internal memory for execution, executes the instructions in the program, and interacts with the input and output devices to complete specific functions.
[0033] It should be noted that the concept of "server" referred to in this application can also be extended to server clusters. Based on the network deployment principles understood by those skilled in the art, the servers described should be logically divided. In physical space, these servers can be independent of each other but callable through interfaces, or integrated into a single physical computer or a computer cluster. Those skilled in the art should understand this flexibility and should not use it to constrain the implementation of the network deployment method of this application.
[0034] Unless expressly specified, one or more technical features of the present application can be deployed on a server for implementation and accessed by a client through a remote call to obtain an online service interface provided by the server, or can be directly deployed and run on a client for implementation.
[0035] Unless expressly specified otherwise, the neural network models referenced or may be referenced in this application may be deployed on a remote server and remotely called on the client, or may be deployed and directly called on a client with sufficient device capabilities. In some embodiments, when it runs on the client, its corresponding intelligence may be obtained through transfer learning to reduce the requirements for the client's hardware operating resources and avoid excessive occupation of the client's hardware operating resources.
[0036] Unless explicitly specified, the various data involved in this application can be stored remotely on a server or on a local terminal device, as long as they are suitable for being called by the technical solution of this application.
[0037] Those skilled in the art should be aware that although the various methods of this application are described based on the same concept and thus exhibit commonality, unless otherwise specified, these methods can be independently executed. Similarly, the various embodiments disclosed in this application are all based on the same application concept. Therefore, concepts with the same expression, as well as concepts that are appropriately transformed for convenience despite different expression, should be understood as equivalent.
[0038] Unless expressly stated to be mutually exclusive, the various embodiments disclosed in this application may be cross-combined with the relevant technical features of the various embodiments to flexibly construct new embodiments, as long as such combination does not deviate from the creative spirit of this application and can meet the needs of the prior art or resolve certain deficiencies in the prior art. Those skilled in the art should be aware of such flexibility.
[0039] Please refer to FIG1 , which is a schematic diagram of the basic flow of the invoice recognition method of this embodiment.
[0040] As shown in Figure 1, it includes:
[0041] S1100, receiving input invoice file;
[0042] In this embodiment, an invoice parsing and recognition system is developed to parse different invoice documents, particularly those from different countries and regions abroad. These invoice documents also include various types of documents, such as invoice slips, shopping orders, and payment slips, rather than just a single type of document. The invoice parsing and recognition system primarily consists of two parts: an application layer and an algorithm layer. The application layer is primarily business-oriented and is responsible for storing and managing invoice documents, invoice parsing and recognition services, visualizing invoice parsing results, and assisting with automated review of invoice-based letters of credit. The algorithm layer primarily provides parsing and recognition algorithm services for different invoice document styles. Based on machine learning, the corresponding algorithm model is continuously trained to ensure the efficiency and accuracy of the algorithm model in parsing and recognizing different invoice document styles.
[0043] When identifying an invoice, the input invoice file is first received, that is, the input invoice file is received through the application layer of the invoice parsing and identification system. The format of the input invoice file can be limited at the application layer, and only files in a specific format can be accurately received by the invoice parsing and identification system to perform subsequent invoice identification tasks; in addition, a file conversion function can be added to the application layer, and the invoice parsing and identification system can receive invoice files of different formats and then convert them into a format that can be identified by the invoice parsing and identification system, thereby improving the wide application of invoice identification.
[0044] It should be pointed out that the invoice parsing and identification system can be used for different users. For example, the invoice parsing and identification system can be placed on the Internet. Different users can use the invoice parsing and identification system by accessing a designated link to complete the parsing of invoice documents and subsequent review work.
[0045] It should be pointed out that the invoice parsing and recognition system can be used by users in the form of a web page, that is, the invoice parsing and recognition system can be accessed and used by visiting a designated link; the invoice parsing and recognition system can also be used by users in the form of a client, that is, users need to download the client corresponding to the invoice parsing and recognition system before they can use the invoice parsing and recognition system.
[0046] S1200: Parse the invoice file based on a preconfigured character recognition service to obtain an information data source of the invoice file;
[0047] After the application layer receives the input invoice file, the application layer can call the service to parse the invoice file. First, the preconfigured character recognition service is called, and then the invoice file is parsed based on the preconfigured character recognition service. The character recognition service can extract various characters contained in the invoice file, and identify and classify each removed character. Then, different characters are classified and aggregated to obtain information data corresponding to different characters in the invoice file. A collection of information data of the same type is defined as an information data source, so that the information data source of the invoice file is obtained by parsing the invoice file based on the preconfigured character recognition service.
[0048] It should be noted that the character recognition service includes an OCR character recognition service. First, the invoice document is converted into a format that meets the requirements of OCR character recognition. Then, OCR recognition is performed on the invoice document to obtain each character obtained by OCR recognition. Characters of the same type are classified as the same information data source, thereby obtaining the information data source of the invoice document.
[0049] It should be noted that the information data source includes pictures, text, layout styles, and pictures, text, and corresponding coordinates. After parsing the invoice file to obtain the pictures, their corresponding coordinates are recorded and stored in two information data sources respectively, and the pictures are associated with the corresponding coordinates; the same processing can be performed on the text and layout styles.
[0050] S1300: Obtain a preset reading order algorithm, and reorder the information data source based on the reading order algorithm to obtain a target data source having a target file reading order;
[0051] After parsing the invoice file based on the preconfigured character recognition service and obtaining the information data source of the invoice file, the reading order service is called again to sort the obtained information data source based on the reading order service. Specifically, the reading order service obtains a preset reading order algorithm, and then reorders the information data source based on the reading order algorithm to obtain a target data source with a target file reading order. The information data sources are sorted and combined according to the relevance and readability of the information data sources, and information data sources with higher relevance are combined into the same target data source. After reordering the above information data sources, a data source with a specified file reading order is obtained, that is, a data source with a target file reading order, which is defined as a target data source.
[0052] It should be pointed out that the preset reading order algorithm includes multiple algorithms, each of which can be applied to the information data source for reordering to generate the target data source under the algorithm. Each algorithm is executed based on powerful computing power, and then the one with the highest accuracy is screened out from the target data sources obtained by multiple reading order algorithms. This can effectively improve the accuracy of invoice document recognition, and can also effectively autonomously learn the invoice recognition algorithm to improve the richness of the algorithm.
[0053] S1400: Fusing the target data source using a multimodal algorithm and then inputting the result into a recognition model to perform data inference, thereby obtaining content information corresponding to the target data source;
[0054] After obtaining a preset reading order algorithm, the information data source is reordered based on the reading order algorithm to obtain a target data source with a target file reading order, and the target data source is fused using a multimodal algorithm. The target data source fused based on the multimodal algorithm can be reconstructed from different directions, so that the target data source has attributes and features in multiple dimensions. The fused target data source is then input into a recognition model to perform data inference, and the content of the data source is obtained based on the corresponding attributes and features in different dimensions, thereby accurately obtaining the content information corresponding to the target data source. Since the target data source has a good reading order, the target data source is input into the data recognition model, and the content information corresponding to the target data source can be quickly and accurately identified based on the good reading order.
[0055] It should be pointed out that the multimodal algorithms used to fuse the target data sources include a stage-based multimodal fusion algorithm, a feature-based multimodal fusion algorithm, and a semantics-based multimodal fusion algorithm.
[0056] S1500: Determine the invoice content of the invoice file according to the content information of each target data source.
[0057] The target data sources are fused using a multimodal algorithm and then input into a recognition model to perform data inference. After obtaining the content information corresponding to the target data sources, the invoice content of the invoice file is determined based on the content information of each target data source. That is, based on the target data source, it is determined at which position in the invoice file which image, text or other data appears, as well as the content represented by the image, text or other data appearing at that position. The content information corresponding to each target data source is then aggregated to generate the invoice content corresponding to the complete invoice file. On the basis of a reasonable reading order, the recognition accuracy of the target data source can be greatly improved, thereby improving the accuracy of invoice file content recognition. At the same time, for invoice files of different styles, using different reading orders and multimodal algorithms to process the data source can expand the scenarios of invoice recognition and improve the accuracy and efficiency of invoice recognition of different styles of invoices.
[0058] In the above embodiment, an input invoice file is received, and then the invoice file is parsed based on a pre-configured character recognition service to obtain an information data source of the invoice file. Various characters contained in the invoice file are extracted, and each removed character is identified and classified. Then, different characters are classified and aggregated to obtain information data corresponding to different characters in the invoice file. A collection of information data of the same type is defined as an information data source. Then, a preset reading order algorithm is obtained, and the information data source is reordered based on the reading order algorithm to obtain a target data source having a target file reading order. The target data source is fused using a multimodal algorithm and then input into a recognition model to perform the fusion. Data reasoning is performed to obtain content information corresponding to the target data source. The target data source fused based on the multimodal algorithm can be reconstructed from different directions, so that the target data source has attributes and characteristics in multiple dimensions. The invoice content of the invoice document is determined according to the content information of each target data source. On the basis of a reasonable reading order, the recognition accuracy of the target data source can be greatly improved, thereby improving the accuracy of invoice document content recognition. At the same time, for invoice documents of different styles, different reading orders and multimodal algorithms are used to process the data source, which can expand the scenarios of invoice recognition and improve the accuracy and efficiency of invoice recognition of different styles.
[0059] In some implementations, S1300 obtains a preset reading order algorithm, and reorders the information data source based on the reading order algorithm to obtain a target data source having a target file reading order, including:
[0060] S1311. Obtain text, images, and coordinates corresponding to the text and images from the information data source;
[0061] In one embodiment, when a preset reading order algorithm is obtained and the information data source is reordered based on the reading order algorithm to obtain a target data source with a target file reading order, the preconfigured character recognition service parses the invoice file to obtain the information data source of the invoice file, including text, image, text coordinates, and image coordinates. Therefore, the text, image, and coordinates corresponding to the text and image in the information data source are first obtained, wherein each recognized text has its corresponding two-dimensional coordinates, which can determine the size of the text and the position of the text in the invoice file. Similarly, each recognized image also has its corresponding two-dimensional coordinates, which can determine the size, proportion, and position of the image in the invoice file, as well as the relative positions between texts, between texts and images, and between images.
[0062] S1312. Match the style of the invoice document according to the text, image, and coordinates;
[0063] After obtaining the text, image, and the coordinates corresponding to the text and image from the information data source, the style of the invoice document is matched according to the text, image, and coordinates, and the style of the invoice document is determined by the size of the text and its position in the invoice document, and the size, ratio, and position of the image in the invoice document. Specifically, the text, image, and the coordinates corresponding to the text and image from the information data source can be used to determine information such as how much text and image the invoice document contains, and the space occupied by the text and image in the invoice document. The style of the invoice document is determined based on this information.
[0064] S1313, matching sorting rules according to the pattern;
[0065] After matching the style of the invoice file according to the text, image, and coordinates, different sorting rules are configured for different invoice file styles according to the style matching. Invoice files of different styles can be re-sorted based on the same algorithm, and the data sources of invoice files of different styles can be accurately identified.
[0066] S1313: Reorder the information data source of the invoice file in a specific format based on the reading order algorithm and the sorting rule to obtain a target data source with a target file reading order.
[0067] After matching the sorting rules according to the style, the information data source of the invoice file under the specific style is reordered based on the reading order algorithm and the sorting rules to obtain a target data source with the reading order of the target file. The invoice file of the specific style is reordered using the reading order algorithm and the matched sorting rules, that is, the information data source contained therein is reordered to obtain the target data source of the invoice file under the style. This can improve the accuracy of identifying invoices of different styles, especially different styles of invoices from the same country or region.
[0068] This embodiment obtains text, images, and coordinates corresponding to the text and images from the information data source, matches the style of the invoice document based on the text, images, and coordinates, and reorders the information data source of the invoice document of a specific style based on the reading order algorithm and the sorting rules according to the style matching, thereby obtaining a target data source with the target file reading order. For the recognition of invoice documents of different styles, especially different styles of invoice documents from the same country or region, the accuracy can be effectively improved by configuring different sorting orders for the data sources and reordering them in reverse order.
[0069] In some embodiments, S1400 fuses the target data source using a multimodal algorithm and then inputs the result into a recognition model to perform data inference, thereby obtaining content information corresponding to the target data source, including:
[0070] S1411, obtaining each reasoning stage of data reasoning;
[0071] After the target data source is fused using a multimodal algorithm and input into the recognition model to perform data reasoning, when the content information corresponding to the target data source is obtained, each reasoning stage of the data reasoning is obtained. There are different reasoning stages in the data reasoning process, and the data required at different reasoning stages are different.
[0072] S1412, matching the corresponding multimodal algorithm fusion method according to the reasoning stage;
[0073] After obtaining each inference stage of data inference, in the process of data fusion, the fusion method of the corresponding multimodal algorithm is matched according to the inference stage. For example, in the first stage, data sources with the same coordinates, such as the same horizontal coordinate or the same vertical coordinate, are fused; in the second stage, data sources with horizontal coordinates or vertical coordinates within a preset value are fused, etc.
[0074] S1413. In each inference stage, the target data source is fused in a corresponding fusion manner using a multimodal algorithm and then input into a recognition model to perform data inference to obtain content information corresponding to the target data source.
[0075] In the process of data fusion, the corresponding fusion method of the multimodal algorithm is matched according to the reasoning stage, and the target data source is fused in the corresponding fusion method using the multimodal algorithm in each reasoning stage in turn, and then input into the recognition model to perform data reasoning to obtain the content information corresponding to the target data source. In different reasoning stages, the target data source is fused using different fusion methods of multimodal algorithms, so that different fusion data are generated in different reasoning stages, and then data reasoning of each stage is performed in turn, and finally the content information corresponding to the target data source is obtained by reasoning.
[0076] This embodiment obtains each reasoning stage of data reasoning, matches the corresponding fusion method of the multimodal algorithm according to the reasoning stage, and fuses the target data source in each reasoning stage in a corresponding fusion method using the multimodal algorithm, and then inputs it into the recognition model to perform data reasoning, so as to obtain the content information corresponding to the target data source. The data sources are fused in different ways, so that suitable data sources can be obtained in different data reasoning stages, thereby improving the accuracy of data reasoning and the accuracy of invoice content recognition.
[0077] In some embodiments, after S1400 fuses the target data source using a multimodal algorithm and inputs the resultant data into a recognition model for data inference, and obtains content information corresponding to the target data source, the process further includes:
[0078] S1421. Extract fields contained in the target data source;
[0079] After the target data source is fused using a multimodal algorithm and input into the recognition model to perform data inference, the content information corresponding to the target data source is obtained, and the fields contained in the target data source are extracted. By performing field matching on the target data source, it is determined which fields the target data source contains.
[0080] S1422. Extract the field content of each field from the content information;
[0081] After extracting the fields included in the target data source, the field content of each field is extracted from the content information according to the fields, and each field is matched with its corresponding content.
[0082] S1423. Associate the field content with the field and store it in a database, so as to store the field content of each field separately.
[0083] After extracting the fields contained in the target data source and extracting the field content of each field from the content information, the field content is associated with the field and stored in the database to store the field content of each field separately. All fields in an invoice file and the field content corresponding to each field are stored. When the invoice file is subsequently used or proofread, the efficiency of invoice use or proofreading can be effectively improved.
[0084] This embodiment extracts the fields contained in the target data source, extracts the field content of each field from the content information, associates the field content with the field and stores it in a database, so as to store the field content of each field separately. When the invoice file is subsequently used or proofread, the efficiency of invoice use or proofreading can be effectively improved.
[0085] In some implementations, the step S1423 storing the field content in association with the field in a database includes:
[0086] S1431. Obtain the standard field content of the field in the database;
[0087] In the process of associating the field content with the field and storing it in the database, if the content information of the invoice file needs to be proofread, the field content contained in the invoice file can be proofread. First, a field to be proofread is obtained, then the field content to be proofread is obtained, and then the standard field content of the field to be proofread in the database is obtained.
[0088] S1432. If the difference in content format between the standard field content and the field content of the current field is less than a preset value, the field content is associated with the field and stored in a database.
[0089] After obtaining the standard field content of the field in the database, proofreading is performed based on the standard field content of the field to be proofread. If the content format difference between the standard field content and the field content of the current field is less than a preset value, the field content is associated with the field and stored in the database. Only the field content that has passed the proofreading can be stored in the database. During the invoice recognition process, the accuracy of the content recognition of the fields contained in the invoice is simultaneously identified.
[0090] This embodiment obtains the standard field content of the field in the database. When the content format difference between the standard field content and the field content of the current field is less than a preset value, the field content is associated with the field and stored in the database. Only the field content that has passed the proofreading can be stored in the database. During the invoice recognition process, the accuracy of the content recognition of the fields contained in the invoice is simultaneously identified.
[0091] In some implementations, after determining the invoice content of the invoice file according to the content information of each target data source, S1500 further includes:
[0092] S1511. Match the type of the invoice file according to the invoice content to obtain the classification type of the invoice file;
[0093] After determining the invoice content of the invoice file according to the content information of each target data source, the invoice file is type-matched according to the invoice content to obtain the classification type of the invoice file. The type of the invoice file can be determined based on the identified content information.
[0094] S1512. Verify the legitimacy of the invoice document according to the classification type;
[0095] After obtaining the classification type of the invoice document, the legitimacy of the invoice document is verified according to the classification type. Invoice documents of different types have different specific identification codes. The legitimacy of the above invoice document is verified by the specific identification code. For example, the identification code of type A invoice document is 16 digits and has a certain pattern, and the identification code of type B invoice document is 12 digits and has a certain pattern. The legitimacy of the invoice document is verified by the number of digits and the pattern of the identification code.
[0096] S1513. When the legitimacy verification of the invoice document is passed, the invoice document is archived according to the classification type.
[0097] When the legitimacy verification of the invoice document is passed, the invoice document is filed according to the classification type, and invoice documents of the same classification type are filed in the same folder, thereby improving the accuracy of invoice document filing.
[0098] This embodiment matches the type of the invoice file based on the invoice content to obtain the classification type of the invoice file, and verifies the legitimacy of the invoice file based on the classification type. When the legitimacy verification of the invoice file passes, the invoice file is archived according to the classification type, thereby improving the accuracy of invoice file archiving.
[0099] In some implementations, when the invoice file is a combined file of at least two invoices, the at least two invoices include a first invoice and a second invoice, S1513 files the invoice file according to the classification type, including:
[0100] S1521. Obtain the classification type of the first invoice, and file the first invoice according to its classification type;
[0101] When the invoice file is a combined file of at least two invoices, the at least two invoices include a first invoice and a second invoice. First, the classification type of the first invoice and the classification type of the second invoice are determined according to the above embodiment, and then the first invoice is archived according to its classification type.
[0102] S1522. Obtain the classification type of the second invoice, and file the second invoice according to its classification type;
[0103] Similarly, for the second invoice, obtain the classification type of the second invoice and archive the second invoice according to its classification type. When there are two or more different invoices in the same invoice file, first archive the two or more different invoices according to their respective classification types to ensure the accuracy of the independent invoice file archiving.
[0104] S1523. Associate the first invoice with the second invoice and archive them.
[0105] At the same time, after the first invoice and the second invoice are independently filed, the first invoice and the second invoice are associated and filed. After the associated filing, the second invoice can be quickly found while searching for the first invoice, ensuring that the invoice identification is consistent with actual needs.
[0106] In this embodiment, when the invoice file is a combined file of at least two invoices, the at least two invoices include a first invoice and a second invoice. First, the two or more different invoices are filed according to their respective classification types to ensure the accuracy of filing independent invoice files. Then, the first invoice and the second invoice are filed in association to ensure that invoice identification is consistent with actual needs, thereby improving the management efficiency of different invoices.
[0107] In some implementations, to better adapt to the reading differences of different users, the reading order algorithm needs to be formulated according to the reading habits of each user. Specifically, before S1100, the following steps are also included:
[0108] S1011. Obtain user behavior data of a target user, wherein the user behavior data includes: user reading habit data and focus data;
[0109] The user's behavior data is obtained from the user's historical data of reading invoices. Specifically, the order in which the user clicks or selects text and images while reading the invoice is collected. In some embodiments, prompts are provided to prompt the user to select the document and images they are reading, paragraph by paragraph or article by article, according to their reading order, thereby forming the target user's reading habit data.
[0110] At the same time, the key text or pictures marked by the user when reading the invoice are collected. In some implementations, the user is prompted to mark the information that he or she focused on when reading, thereby generating the target user's key focus data.
[0111] In some embodiments, since the amount of user behavior data of the target user is limited and insufficient to cover all types of invoices, in order to better make the reading order algorithm applicable to the full amount of invoice data, the collected user reading habit data and key attention data are input into a pre-built information extension model. The information extension model is a clustering model. The information extension model user clusters the data based on the full amount of invoice data, user reading habit data and key attention data, and uses the user reading habit data and key attention data as clustering points to cluster the full amount of invoice data, generate a classification system based on user reading habit data and key attention data, and expand the user reading habit data and key attention data of the target user to the full amount of data, thereby improving the adaptability of the invoice recognition method of this embodiment and the initial accuracy of sorting unfamiliar invoice files of the target user.
[0112] S1012: generating sorting priorities for various types of text and images based on the user's reading habit data;
[0113] According to the order in which users read various types of text and various types of images in the user reading habit data, the various types of text and various types of images are prioritized, and the priority information of the various types of text and various types of images is recorded.
[0114] S1013, generating tag information of the various types of text and images according to the key information;
[0115] According to the key attention information, the data or data types that the user pays attention to when reading the invoice document are collected, and marking information of various texts and images is generated.
[0116] S1014. Generate the reading order algorithm based on the sorting priority and the marking information; wherein the sorting priority is used to reorder the invoice documents, the marking information is used to reorder the invoice documents, and the marking information is used to highlight the reordered invoice documents.
[0117] A reading order algorithm is generated based on the acquired sorting priorities and tag information. The reading order algorithm includes sorting priorities and tag information for various types of text and images when the target user reads the invoice. The tag information is used to reorder the invoice documents and to highlight the reordered invoice documents. Therefore, in some embodiments, the target data source contains the data that the target user is most interested in, preventing the filtering or loss of this important data during subsequent data processing.
[0118] Please refer to FIG2 for details, which is a schematic diagram of the basic structure of the invoice recognition device of this embodiment.
[0119] As shown in FIG2 , an invoice recognition device includes: a file receiving module 1100, an information extraction module 1200, an information sorting module 1300, a data inference module 1400, and a content determination module 1500. The file receiving module 1100 is configured to receive an input invoice file; the information extraction module 1200 is configured to parse the invoice file based on a preconfigured character recognition service to obtain the information data source of the invoice file; the information sorting module 1300 is configured to obtain a preset reading order algorithm and reorder the information data source based on the reading order algorithm to obtain a target data source having the target file reading order; the data inference module 1400 is configured to fuse the target data source using a multimodal algorithm and input the resultant data into a recognition model for data inference to obtain content information corresponding to the target data source; and the content determination module 1500 is configured to determine the invoice content of the invoice file based on the content information of each target data source.
[0120] The above-mentioned invoice recognition device receives an input invoice file, and then parses the invoice file based on a pre-configured character recognition service to obtain the information data source of the invoice file, extracts various characters contained in the invoice file, and recognizes and classifies each removed character, and then aggregates the different characters after classification to obtain information data corresponding to different characters in the invoice file, defines a collection of information data of the same type as an information data source, and then obtains a preset reading order algorithm, reorders the information data source based on the reading order algorithm, and obtains a target data source with a target file reading order; the target data source is fused using a multimodal algorithm and then input into the recognition model execution Data reasoning is performed to obtain content information corresponding to the target data source. The target data source fused based on the multimodal algorithm can be reconstructed from different directions, so that the target data source has attributes and characteristics in multiple dimensions. The invoice content of the invoice document is determined according to the content information of each target data source. On the basis of a reasonable reading order, the recognition accuracy of the target data source can be greatly improved, thereby improving the accuracy of invoice document content recognition. At the same time, for invoice documents of different styles, different reading orders and multimodal algorithms are used to process the data source, which can expand the scenarios of invoice recognition and improve the accuracy and efficiency of invoice recognition of different styles.
[0121] In some embodiments, the information sorting module 1300 is further configured to:
[0122] Obtaining text, images, and coordinates corresponding to the text and images from the information data source;
[0123] Matching the style of the invoice document according to the text, image, and coordinates;
[0124] Match sorting rules according to the pattern;
[0125] The information data source of the invoice file in a specific format is reordered based on the reading order algorithm and the sorting rule to obtain a target data source with a target file reading order.
[0126] In some embodiments, the data reasoning module 1400 is further configured to:
[0127] Get every reasoning stage of data reasoning;
[0128] Matching the corresponding multimodal algorithm fusion method according to the reasoning stage;
[0129] In each inference stage, the target data source is fused in a corresponding fusion manner using a multimodal algorithm and then input into a recognition model to perform data inference to obtain content information corresponding to the target data source.
[0130] In some embodiments, the data storage module 1600 is further included to:
[0131] Extracting fields contained in the target data source;
[0132] extracting the field content of each of the fields from the content information;
[0133] The field contents are associated with the fields and stored in a database, so as to store the field contents of each field separately.
[0134] In some embodiments, the data storage module 1600 is further configured to:
[0135] Get the standard field content of the field in the database;
[0136] If the content format difference between the standard field content and the field content of the current field is smaller than a preset value, the field content is associated with the field and stored in a database.
[0137] In some embodiments, an invoice archiving module 1700 is further included for:
[0138] Performing type matching on the invoice file according to the invoice content to obtain the classification type of the invoice file;
[0139] Performing legality verification on the invoice document according to the classification type;
[0140] When the legitimacy verification of the invoice document is passed, the invoice document is archived according to the classification type.
[0141] In some embodiments, the invoice filing module 1700 is further configured to:
[0142] Obtaining the classification type of the first invoice, and filing the first invoice according to its classification type;
[0143] Obtaining the classification type of the second invoice, and filing the second invoice according to its classification type;
[0144] The first invoice and the second invoice are associated and filed.
[0145] In some embodiments, the information sorting module 1300 is further configured to:
[0146] Obtaining user behavior data of the target user, wherein the user behavior data includes: user reading habit data and focus data;
[0147] generating sorting priorities for various types of text and images based on the user's reading habit data;
[0148] generating tag information of the various types of text and images according to the key information;
[0149] The reading order algorithm is generated based on the sorting priority and the marking information; wherein the sorting priority is used to reorder the invoice documents, the marking information is used to reorder the invoice documents, and the marking information is used to highlight the reordered invoice documents.
[0150] To solve the above technical problems, the present application also provides a computer device. Specific reference is made to FIG3 , which is a basic structural block diagram of the computer device of the present embodiment.
[0151] As shown in Figure 3, a schematic diagram of the internal structure of a computer device is shown. The computer device includes a processor, a non-volatile storage medium, a memory, and a network interface connected via a system bus. The non-volatile storage medium of the computer device stores an operating system, a database, and computer-readable instructions. The database may store a control information sequence. When the computer-readable instructions are executed by the processor, the processor may implement a transaction voucher chain method. The processor of the computer device is used to provide computing and control capabilities to support the operation of the entire computer device. The memory of the computer device may store computer-readable instructions. When the computer-readable instructions are executed by the processor, the processor may implement an invoice recognition method. The network interface of the computer device is used to connect and communicate with a terminal. Those skilled in the art will understand that the structure shown in Figure 3 is merely a block diagram of a portion of the structure related to the present application solution and does not constitute a limitation on the computer device to which the present application solution is applied. Specific computer devices may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.
[0152] In this embodiment, the processor is used to execute the specific functions of the file receiving module 1100, information extraction module 1200, information sorting module 1300, data inference module 1400, and content determination module 1500 in Figure 2. The memory stores the program code and various data required to execute these modules. The network interface is used to transmit data between user terminals and servers. In this embodiment, the memory stores the program code and data required to execute all submodules of the invoice recognition device. The server can call the server's program code and data to execute the functions of all submodules.
[0153] The computer device receives an input invoice file, and then parses the invoice file based on a pre-configured character recognition service to obtain the information data source of the invoice file, extracts various characters contained in the invoice file, and recognizes and classifies each removed character. Then, different characters are classified and aggregated to obtain information data corresponding to different characters in the invoice file. A collection of information data of the same type is defined as an information data source. Then, a preset reading order algorithm is obtained, and the information data source is reordered based on the reading order algorithm to obtain a target data source with the target file reading order. The target data source is fused using a multimodal algorithm and then input into a recognition model to execute data. According to reasoning, the content information corresponding to the target data source is obtained, and the target data source after fusion based on the multimodal algorithm can be reconstructed from different directions, so that the target data source has attributes and characteristics in multiple dimensions. The invoice content of the invoice file is determined according to the content information of each target data source. On the basis of a reasonable reading order, the recognition accuracy of the target data source can be greatly improved, thereby improving the accuracy of invoice file content recognition; at the same time, for invoice files of different styles, using different reading orders and multimodal algorithms to process the data source can expand the scenarios of invoice recognition, improve the accuracy of invoice recognition of different styles and the efficiency of invoice recognition.
[0154] The present application also provides a storage medium storing computer-readable instructions. The storage medium of the computer-readable instructions can be non-volatile or volatile. When the computer-readable instructions are executed by one or more processors, the one or more processors execute the steps of the invoice recognition method of any of the above embodiments.
[0155] Those skilled in the art will appreciate that all or part of the processes in the above-described method embodiments can be implemented by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When executed, the program can include the processes in the above-described method embodiments. The aforementioned storage medium can be a non-volatile storage medium such as a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).
[0156] Those skilled in the art will appreciate that the steps, measures, and schemes in the various operations, methods, and processes discussed in this application may be interchanged, modified, combined, or deleted. Furthermore, other steps, measures, and schemes in the various operations, methods, and processes discussed in this application may also be interchanged, modified, rearranged, decomposed, combined, or deleted. Furthermore, steps, measures, and schemes in the prior art that are similar to those disclosed in this application may also be interchanged, modified, rearranged, decomposed, combined, or deleted.
[0157] The above description is only part of the implementation methods of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A method for invoice recognition, wherein: include: Receive input invoice documents; Parsing the invoice file based on a preconfigured character recognition service to obtain an information data source of the invoice file; Obtaining a preset reading order algorithm, and reordering the information data source based on the reading order algorithm to obtain a target data source having a target file reading order; The target data source is fused using a multimodal algorithm and then input into a recognition model to perform data reasoning to obtain content information corresponding to the target data source; The invoice content of the invoice document is determined according to the content information of each of the target data sources.
2. The invoice identification method according to claim 1, wherein: The step of obtaining a preset reading order algorithm and reordering the information data source based on the reading order algorithm to obtain a target data source having a target file reading order includes: Obtaining text, images and coordinates corresponding to the text and images in the information data source; Matching the style of the invoice document according to the text, image, and coordinates; Matching sorting rules according to the pattern; The information data source of the invoice file in a specific format is reordered based on the reading order algorithm and the sorting rule to obtain a target data source with a target file reading order.
3. The invoice identification method according to claim 1, wherein: The target data source is fused using a multimodal algorithm and then input into a recognition model to perform data reasoning to obtain content information corresponding to the target data source, including: Get every reasoning stage of data reasoning; A fusion method of a multimodal algorithm is matched according to the reasoning stage; In each reasoning stage, the target data source is fused in a corresponding fusion manner using a multimodal algorithm and then input into a recognition model to perform data reasoning to obtain content information corresponding to the target data source.
4. The invoice identification method according to claim 1, wherein: After fusing the target data source using a multimodal algorithm and inputting the result into a recognition model to perform data reasoning and obtain content information corresponding to the target data source, the method further includes: Extracting fields contained in the target data source; Extracting the field content of each of the fields from the content information; The field content is associated with the field and stored in a database, so as to store the field content of each field separately.
5. The invoice identification method according to claim 4, wherein: The associating the field content with the field and storing it in a database includes: Get the standard field content of the field in the database; If the content format difference between the standard field content and the field content of the current field is less than a preset value, the field content is associated with the field and stored in a database.
6. The invoice identification method according to claim 1, wherein: After determining the invoice content of the invoice file according to the content information of each target data source, the method further includes: Perform type matching on the invoice file according to the invoice content to obtain the classification type of the invoice file; Performing legality verification on the invoice document according to the classification type; When the legitimacy verification of the invoice document is passed, the invoice document is archived according to the classification type.
7. The invoice identification method according to claim 1, wherein: When the invoice file is a combined file of at least two invoices, the at least two invoices include a first invoice and a second invoice, the filing of the invoice file according to the classification type includes: Obtaining the classification type of the first invoice, and filing the first invoice according to its classification type; Obtaining the classification type of the second invoice, and filing the second invoice according to its classification type; The first invoice is associated with the second invoice for archiving.
8. The invoice identification method according to claim 1, wherein: The method for generating the reading order algorithm comprises: Acquire user behavior data of the target user, wherein the user behavior data includes: user reading habit data and focus data; Generating sorting priorities of various types of text and various types of images according to the user reading habit data; Generate tag information of the various types of text and the various types of images according to the key attention information; The reading order algorithm is generated based on the sorting priority and the marking information; wherein the sorting priority is used to re-sort the invoice documents, the marking information is used to re-sort the invoice documents, and the marking information is used to highlight the re-sorted invoice documents.
9. A computer device comprising a memory and a processor, wherein the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the processor is configured to execute: Receive input invoice documents; Parsing the invoice file based on a preconfigured character recognition service to obtain an information data source of the invoice file; Obtaining a preset reading order algorithm, and reordering the information data source based on the reading order algorithm to obtain a target data source having a target file reading order; The target data source is fused using a multimodal algorithm and then input into a recognition model to perform data reasoning to obtain content information corresponding to the target data source; The invoice content of the invoice document is determined according to the content information of each of the target data sources.
10. The computer device according to claim 9, wherein: The processor is further configured to execute: Obtaining text, images and coordinates corresponding to the text and images in the information data source; Matching the style of the invoice document according to the text, image, and coordinates; Matching sorting rules according to the pattern; The information data source of the invoice file in a specific format is reordered based on the reading order algorithm and the sorting rule to obtain a target data source with a target file reading order.
11. The computer device according to claim 9, wherein: The processor is further configured to execute: Get every reasoning stage of data reasoning; A fusion method of a multimodal algorithm is matched according to the reasoning stage; In each reasoning stage, the target data source is fused in a corresponding fusion manner using a multimodal algorithm and then input into a recognition model to perform data reasoning to obtain content information corresponding to the target data source.
12. The computer device according to claim 9, wherein: The processor is further configured to execute: Extracting fields contained in the target data source; Extracting the field content of each of the fields from the content information; The field content is associated with the field and stored in a database, so as to store the field content of each field separately.
13. The computer device of claim 12, wherein: The processor is further configured to execute: Get the standard field content of the field in the database; If the content format difference between the standard field content and the field content of the current field is less than a preset value, the field content is associated with the field and stored in a database.
14. The computer device according to claim 9, wherein: The processor is further configured to execute: Perform type matching on the invoice file according to the invoice content to obtain the classification type of the invoice file; Performing legality verification on the invoice document according to the classification type; When the legitimacy verification of the invoice document is passed, the invoice document is archived according to the classification type.
15. The computer device of claim 9, wherein: When the invoice file is a combined file of at least two invoices, the processor is further configured to execute: Obtaining the classification type of the first invoice, and filing the first invoice according to its classification type; Obtaining the classification type of the second invoice, and filing the second invoice according to its classification type; The first invoice is associated with the second invoice for archiving.
16. The computer device of claim 9, wherein: The processor is further configured to execute: Acquire user behavior data of the target user, wherein the user behavior data includes: user reading habit data and focus data; Generating sorting priorities of various types of text and various types of images according to the user reading habit data; Generate tag information of the various types of text and the various types of images according to the key attention information; The reading order algorithm is generated based on the sorting priority and the marking information; wherein the sorting priority is used to re-sort the invoice documents, the marking information is used to re-sort the invoice documents, and the marking information is used to highlight the re-sorted invoice documents.
17. A storage medium storing computer-readable instructions, wherein when the computer-readable instructions are executed by one or more processors, the one or more processors are configured to perform: Receive input invoice documents; Parsing the invoice file based on a preconfigured character recognition service to obtain an information data source of the invoice file; Obtaining a preset reading order algorithm, and reordering the information data source based on the reading order algorithm to obtain a target data source having a target file reading order; The target data source is fused using a multimodal algorithm and then input into a recognition model to perform data reasoning to obtain content information corresponding to the target data source; The invoice content of the invoice document is determined according to the content information of each of the target data sources.
18. The storage medium according to claim 17, wherein: The processor is further configured to execute: Obtaining text, images and coordinates corresponding to the text and images in the information data source; Matching the style of the invoice document according to the text, image, and coordinates; Matching sorting rules according to the pattern; The information data source of the invoice file in a specific format is reordered based on the reading order algorithm and the sorting rule to obtain a target data source with a target file reading order.
19. The storage medium according to claim 17, wherein: The processor is further configured to execute: Get every reasoning stage of data reasoning; A fusion method of a multimodal algorithm is matched according to the reasoning stage; In each reasoning stage, the target data source is fused in a corresponding fusion manner using a multimodal algorithm and then input into a recognition model to perform data reasoning to obtain content information corresponding to the target data source.
20. The storage medium according to claim 17, wherein: The processor is further configured to execute: Extracting fields contained in the target data source; Extracting the field content of each of the fields from the content information; The field content is associated with the field and stored in a database, so as to store the field content of each field separately.
Citation Information
Patent Citations
Electronic invoice content analysis method and system
CN105630817A
Electronic invoice analysis method and device
CN112651725A
Bill information extraction method and device, equipment, medium and product
CN115205884A
Invoice identification method, computer equipment and storage medium
CN116071740A
Image processing method, electronic device and storage medium
US20220253631A1
Cited By
Multi-mode invoice image processing method and device based on vision and deep learning, and medium
CN120236296A
Bill collaborative management method and system based on multi-source heterogeneous data fusion
CN120450882A
Document type recommendation method based on large model
CN120561382A
