Method and apparatus for invoice information extraction, computer device and storage medium

By identifying specific information on foreign currency invoices, selecting standard invoice styles, and determining recognition biases, the problem of low efficiency and poor accuracy in foreign currency invoice information recognition is solved, achieving efficient and accurate information extraction.

CN115391584BActive Publication Date: 2026-01-13UNIVERSE ZHIXIANG (SUZHOU) INFORMATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211061394.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-31
Publication Date
2026-01-13
Estimated Expiration
2042-08-31

AI Technical Summary

Technical Problem

Existing technologies are inefficient and prone to errors when identifying foreign currency invoice information, especially due to the variety of formats and complex character combinations, which makes manual identification time-consuming and unreliable.

Method used

By identifying specific information in the file, a standard invoice template is selected, the identification deviation is determined, and based on the position coordinates and identification deviation of various target questions in the standard invoice template, the target questions and detailed data are identified in the file to be identified, and finally stored in a unified format.

Benefits of technology

It improves the accuracy and efficiency of invoice information extraction, and reduces manual intervention and time consumption.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115391584B_ABST
    Figure CN115391584B_ABST
Patent Text Reader

Abstract

The method and device for invoice information extraction, computer equipment and storage medium provided by the application identify specific information in a file, obtain a corresponding standard invoice style from a preset standard style, determine the identification deviation between the two, identify various item titles first, and then identify corresponding detailed data, identify and extract the various item titles and the detailed data according to the characteristics of the various item titles and the detailed data, ensure the accuracy of the extraction, and improve the identification efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of invoice information recognition, and in particular to a method for extracting invoice information. Background Technology

[0002] With the rapid development of artificial intelligence and computer vision technologies, OCR technology is widely used to recognize various types of image information. In the recognition of invoice information, especially foreign currency invoices, the diverse formats result in variations in invoice categories and recognition locations. Using a general line-by-line recognition method is inefficient, while manual selection is time-consuming and labor-intensive. Furthermore, since foreign currency invoices contain letters, numbers, or combinations of both, a single incorrect character recognition can lead to completely different information being identified. Summary of the Invention

[0003] To address the aforementioned problems, this invention proposes a method, apparatus, computer equipment, and storage medium for extracting invoice information.

[0004] The main contents of this invention include:

[0005] A method for extracting invoice information includes the following steps:

[0006] Documents required to obtain foreign currency invoices;

[0007] By identifying specific information in the file, the corresponding standard invoice style is selected from the preset standard style library;

[0008] Identification bias is determined by comparing the document of the invoice to be identified with a standard invoice template;

[0009] Based on the position coordinates and recognition deviations of various target questions in the standard invoice template, identify the corresponding target questions within the corresponding position range of the document to be identified, and record their corresponding position coordinates;

[0010] Based on the definition of detailed data under various target titles in the standard invoice template, identify the corresponding detailed data within the preset range of various target titles in the document to be identified;

[0011] The category titles are associated with the corresponding detailed data and then stored in a unified format.

[0012] Preferably, by identifying specific information in the document, a corresponding standard invoice style is selected from a preset standard style library, including the following sub-steps:

[0013] The specific information is manually determined, including one or more of the manufacturer's name, logo, or abbreviation. Based on the specific information, the corresponding standard invoice style is determined from a preset standard style library.

[0014] Preferably, by identifying specific information in the document, a corresponding standard invoice style is selected from a preset standard style library, including the following sub-steps:

[0015] The invoice document to be identified is parsed, and the specific information is identified according to the pre-set identification strategy. The specific information includes the manufacturer mark, key title and corresponding coordinate information. Based on the specific information, the corresponding standard invoice style is determined from the pre-set standard style library.

[0016] Preferably, the identification strategy according to the pre-set criteria includes the following steps:

[0017] Determine the recognition range, and select one recognition range for each row as needed, or select several preset recognition ranges;

[0018] The corresponding semantic information that has been identified is obtained in sequence, and the standard invoice style containing the identified content is searched in the preset standard style library;

[0019] If the matching rate between the specific information and the corresponding standard invoice template exceeds a set value, then the corresponding standard invoice template is selected.

[0020] Preferably, the corresponding semantic information identified is acquired sequentially, including the following steps:

[0021] Within the corresponding recognition range, each character and its corresponding coordinate position are extracted sequentially;

[0022] Based on the coordinates of each character, combine the characters to form the corresponding words;

[0023] Based on the positional relationship between words, the corresponding word groups within the recognition range are determined, and the word groups represent the semantic information within the corresponding recognition range.

[0024] Preferably, based on the coordinate position of each character, the characters are combined to form corresponding words, including the following steps:

[0025] Compare the X-axis spacing of adjacent characters. If the spacing is less than a first set distance, the two characters are grouped into the same word. If the spacing is greater than the first set distance and less than the second set distance, the two adjacent characters are grouped into the same phrase.

[0026] Preferably, based on the detailed data definitions under various target headings in the standard invoice template, the corresponding detailed data is identified within a preset range for each target heading in the document to be identified, including:

[0027] S1. Determine the basic scope based on the positional relationship between the category titles and corresponding detailed data in the standard invoice template;

[0028] S2. Perform identification within the basic scope, calculate the consistency rate between the identified semantic information and the corresponding detailed data definition. If the consistency rate is higher than the set consistency rate, associate the corresponding category title with the corresponding detailed data; if the consistency rate is lower than the set consistency rate, execute S3.

[0029] S3. Increase the first deviation in the X and / or Y directions of the basic range as the identification range for identification comparison. If it is higher than the set matching rate, associate the corresponding category title with the corresponding detailed data; if it is lower than the set matching rate, execute S4.

[0030] S4. Recognize the document to be recognized line by line, and obtain the corresponding semantic information in turn. According to the definition of detailed data under each type of target title in the standard invoice template, determine the category target title corresponding to the recognized content. Based on the deviation between the coordinate position of the first identified content and the basic range, identify the corresponding detailed data in the corresponding recognition area, and associate the corresponding category target title with the corresponding detailed data.

[0031] The present invention also proposes an apparatus for extracting invoice information, comprising:

[0032] The input module is used to acquire the invoice document to be identified and to acquire the input parameters used, including specific information and the identification range;

[0033] The processing module executes the information extraction method described above;

[0034] The storage module is used to store standard invoice templates, as well as the associated storage category titles and corresponding detailed data in a unified format.

[0035] The present invention also proposes a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the above-described information extraction method.

[0036] The present invention also proposes a computer-readable storage medium having a computer program stored thereon, characterized in that the computer program, when executed by a processor, implements the steps of the information extraction method described above.

[0037] Compared with the prior art, the beneficial effects of the method, apparatus, computer equipment and storage medium for extracting invoice information proposed in this invention are as follows: by identifying specific information in the file, the corresponding standard invoice pattern is obtained from the preset standard pattern, and the identification deviation between the two is determined. First, various target questions are identified, and then the corresponding detailed data is identified. According to the characteristics of various target questions and detailed data, identification and extraction are performed separately, which ensures the accuracy of extraction and improves the efficiency of identification. Attached Figure Description

[0038] Figure 1 This is a flowchart of the information extraction method of the present invention. Detailed Implementation

[0039] The technical solution protected by this invention will be described in detail below with reference to the accompanying drawings.

[0040] Please refer to Figure 1 This invention proposes a method for extracting invoice information, comprising the following steps:

[0041] First, obtain the foreign currency invoice file. The foreign currency invoice file can be in PDF or other formats, and different recognition methods can be selected for different formats.

[0042] Subsequently, by identifying specific information in the document, a corresponding standard invoice style is selected from a preset standard style library. This specific information can be a manufacturer's identifier, such as the manufacturer's name, its abbreviation, or its logo. In one embodiment, after manually identifying the identifier, the corresponding standard invoice style can be directly selected from the standard style library using keywords or other methods. This approach is suitable for invoices with a small number of invoices to be identified, where the specific information is clearly identifiable.

[0043] Furthermore, the standard invoice templates in the standard template library can be pre-stored manually or by other means. When there is a new cooperating manufacturer, it is only necessary to create a corresponding standard invoice template for that manufacturer, and then the extraction method of the present invention can be followed.

[0044] In other embodiments, for invoices with a large number of invoices to be identified or invoices without obvious specific information, the invoice files to be identified can be parsed first, and the specific information can be identified according to a pre-set identification strategy. The specific information includes manufacturer markings, key titles, and corresponding coordinate information. Based on the specific information, the corresponding standard invoice style is determined from a pre-set standard style library.

[0045] Specifically, the identification range is determined. Since there are relatively few types of invoices to be identified, the identification range in the invoices to be identified is determined based on the common areas of specific information in the standard invoice template. That is, several pre-set identification ranges are selected and identification is performed within these ranges; or it can be treated as one identification range and identified sequentially.

[0046] After determining the recognition range, within a single recognition range, the corresponding semantic information is sequentially acquired, and a standard invoice template containing the recognized content is searched in a preset standard template library. The sequential acquisition of the corresponding semantic information includes the following steps:

[0047] Within the corresponding recognition range, each character and its corresponding coordinate position are extracted sequentially;

[0048] Based on the coordinates of each character, combine the characters to form the corresponding words;

[0049] Based on the positional relationship between words, the corresponding word groups within the recognition range are determined, and the word groups represent the semantic information within the corresponding recognition range.

[0050] The process of combining characters into words based on their coordinates involves the following steps:

[0051] Compare the X-axis spacing of adjacent characters. If the spacing is less than a first set distance, the two characters are grouped into the same word. If the spacing is greater than the first set distance and less than the second set distance, the two adjacent characters are grouped into the same phrase.

[0052] The matching rate between the specific information and the corresponding standard invoice template is determined to determine whether to select it as the standard invoice template. That is, when the matching rate between the specific information and the corresponding standard invoice template exceeds a set value, the corresponding standard invoice template is selected.

[0053] After selecting the standard invoice template using the above method, the identification deviation can be determined by comparing the invoice file to be identified with the standard invoice template. That is, by comparing the coordinate position of specific information in the standard invoice template with its coordinate position in the invoice file to be identified, the corresponding identification deviation can be calculated, providing a calibration range for subsequently determining the coordinate position of various titles.

[0054] Subsequently, based on the position coordinates and recognition deviations of various target questions in the standard invoice template, the corresponding target questions are identified within the corresponding position range of the document to be identified, and their corresponding position coordinates are recorded. Since the specific information and the positions of various target questions are relatively fixed, specifically, within the recognition range determined by the position coordinates and recognition deviations of various target questions in the standard invoice template, each character and its corresponding coordinate position are extracted sequentially. Based on the coordinate position of each character, the characters are combined to form corresponding words. Based on the positional relationship between words, the corresponding word groups within the recognition range are determined. The extracted word groups are compared with the corresponding target questions in the standard invoice template to verify the recognition accuracy. Fine-tuning of the recognition deviation can also be performed based on the recognition process.

[0055] In addition, to prevent the invoice documents from becoming distorted due to scanning, the invoice documents can be corrected before they are obtained. This involves selecting the area of ​​the invoice document to be recognized and using tools such as Photoshop to correct the invoice documents.

[0056] Once the corresponding category headings and their coordinate positions in the invoice file to be identified are determined, the corresponding detailed data can be identified within the preset range of each category heading in the file to be identified, based on the detailed data definitions under each category heading in the standard invoice template. Specifically, this includes the following steps:

[0057] S1. Determine the basic scope based on the positional relationship between the category titles and corresponding detailed data in the standard invoice template;

[0058] S2. Perform identification within the basic scope, calculate the consistency rate between the identified semantic information and the corresponding detailed data definition. If the consistency rate is higher than the set consistency rate, associate the corresponding category title with the corresponding detailed data; if the consistency rate is lower than the set consistency rate, execute S3.

[0059] S3. Increase the first deviation in the X and / or Y directions of the basic range as the identification range for identification comparison. If it is higher than the set matching rate, associate the corresponding category title with the corresponding detailed data; if it is lower than the set matching rate, execute S4.

[0060] S4. Recognize the document to be recognized line by line, and obtain the corresponding semantic information in turn. According to the definition of detailed data under each type of target title in the standard invoice template, determine the category target title corresponding to the recognized content. Based on the deviation between the coordinate position of the first identified content and the basic range, identify the corresponding detailed data in the corresponding recognition area, and associate the corresponding category target title with the corresponding detailed data.

[0061] Finally, the associated target questions and corresponding detailed data are stored in a unified format.

[0062] The present invention also proposes an apparatus for extracting invoice information, comprising:

[0063] The input module is used to acquire the invoice document to be recognized and to acquire the input parameters used, including specific information, recognition range, fine-tuning of recognition deviation, first deviation, first set distance between characters, second set distance, etc.

[0064] The processing module executes the information extraction method described above;

[0065] The storage module is used to store standard invoice templates, as well as the associated storage category titles and corresponding detailed data in a unified format.

[0066] The present invention also proposes a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the above-described information extraction method.

[0067] The present invention also proposes a computer-readable storage medium having a computer program stored thereon, characterized in that the computer program, when executed by a processor, implements the steps of the information extraction method described above.

[0068] The above description is merely an embodiment of the present invention and does not limit the patent scope of the present invention. Any equivalent structural or procedural transformations made based on the content of the present invention specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of the present invention.

Claims

1. A method for invoice information extraction, characterized in that, The method comprises the following steps: Obtaining a foreign currency invoice file; Selecting a corresponding standard invoice form from a preset standard form library by recognizing specific information in the file; Determining a recognition deviation by comparing the file of the invoice to be recognized with the standard invoice form; Recognizing a corresponding item title in a corresponding position range of the file to be recognized according to the position coordinates of the item title in the standard invoice form and the recognition deviation, and recording the corresponding position coordinates of the item title; Recognizing corresponding detailed data in a preset range of each item title in the file to be recognized according to the definition of the detailed data under each item title in the standard invoice form; Storing the item title and the corresponding detailed data in a unified format after associating the item title with the corresponding detailed data; Recognizing corresponding detailed data in a preset range of each item title in the file to be recognized according to the definition of the detailed data under each item title in the standard invoice form, comprising: S1. Determining a basic range according to the positional relationship between the item title and the corresponding detailed data in the standard invoice form; S2. Recognizing in the basic range, calculating the coincidence rate of the recognized semantic information and the corresponding detailed data definition, if the coincidence rate is higher than a set coincidence rate, associating the corresponding item title with the corresponding detailed data, if the coincidence rate is lower than the set coincidence rate, executing S3; S3. Increasing a first deviation in the X direction and / or the Y direction of the basic range as a recognition range for recognition comparison, if the coincidence rate is higher than the set coincidence rate, associating the corresponding item title with the corresponding detailed data, if the coincidence rate is lower than the set coincidence rate, executing S4; S4. Recognizing the file to be recognized by row, sequentially obtaining the corresponding recognized semantic information, determining the corresponding item title of the recognized content according to the definition of the detailed data under each item title in the standard invoice form, recognizing the corresponding detailed data in a corresponding recognition area according to the deviation of the coordinate position of the first determined recognized content from the basic range, and associating the corresponding item title with the corresponding detailed data.

2. A method for invoice information extraction according to claim 1, characterized in that, Selecting a corresponding standard invoice form from a preset standard form library by recognizing specific information in the file, comprising the following sub-steps: Manually determining the specific information, which includes one or more of the name, logo or abbreviation of a manufacturer, and determining the corresponding standard invoice form from the preset standard form library according to the specific information.

3. The method for invoice information extraction of claim 1, wherein, Selecting a corresponding standard invoice form from a preset standard form library by recognizing specific information in the file, comprising the following sub-steps: Analyzing the invoice file to be recognized, recognizing the specific information according to a pre-set recognition strategy, the specific information including a manufacturer's mark, a key title and corresponding coordinate information, and determining the corresponding standard invoice form from the preset standard form library according to the specific information.

4. A method for invoice information extraction according to claim 3, characterized in that, The pre-set recognition strategy comprises the following steps: Determining a recognition range, and selecting each row as a recognition range or selecting a plurality of pre-set recognition ranges as needed; Sequentially obtaining the corresponding recognized semantic information, and searching for a standard invoice form containing the recognition content in the preset standard form library; When the matching rate of the specific information and the corresponding standard invoice form exceeds a set value, the corresponding standard invoice form is selected.

5. A method for invoice information extraction according to claim 4, characterized in that, The corresponding semantic information is sequentially obtained, including the following steps: In the corresponding recognition range, each character and the corresponding coordinate position are sequentially extracted; According to the coordinate position of each character, each character is combined into a corresponding word; According to the position relationship between words, a word group in the corresponding recognition range is determined, which represents the semantic information in the corresponding recognition range.

6. The method for invoice information extraction according to claim 5, characterized in that, According to the coordinate position of each character, each character is combined into a corresponding word, including the following steps: The interval of the X-axis of adjacent characters is compared, if the interval is less than a first set distance, the corresponding two characters are combined as a same word, if the interval is greater than the first set distance and less than a second set distance, the adjacent two characters are combined as a same word group.

7. An apparatus for invoice information extraction, characterized in that, It comprises: An input module is configured to obtain an invoice file to be recognized and obtain input parameters, the input parameters including specific information and a recognition range; A processing module is configured to execute the information extraction method according to any one of claims 1 to 6; A storage module is configured to store standard invoice forms and the storage category title and corresponding detailed data associated in a unified format.

8. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that, The processor executes the computer program to implement the steps of the information extraction method according to any one of claims 1 to 6.

9. A computer readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to implement the steps of the information extraction method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Electronic invoice information extraction method and electronic equipment

    CN110751143A

  • Key information extraction method and system based on semantic segmentation

    CN113963147A