Bill information extraction method and device, computer equipment, readable storage medium and program product

By determining the fixed format of bill content and using table line information to extract bill information, the problem of information loss caused by uncertain number of records in bill information extraction is solved, and the accuracy of extraction is improved.

CN119516570APending Publication Date: 2025-02-25CHINA LIFE INSURANCE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411715993.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-27
Publication Date
2025-02-25

AI Technical Summary

Technical Problem

When extracting bill information in the automatic claims service, the prior art encounters the problem of uncertainty in the number of records, resulting in the loss of information beyond the template setting area, affecting the accuracy of extraction.

Method used

By obtaining the fixed format of the bill content of the bill, the target bill information distribution area is determined, and the table line information is used to extract information from the content rows to avoid information loss.

Benefits of technology

It improves the accuracy of bill information extraction, can effectively deal with uncertain records, and ensures that all information that needs to be extracted can be accurately extracted.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119516570A_ABST
    Figure CN119516570A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of information extraction, provides a bill information extraction method and device, computer equipment, a computer readable storage medium and a computer program product, and can improve the extraction accuracy of bill information. The method comprises the following steps: acquiring a bill to be subjected to bill information extraction, and determining a bill content fixed format of the bill; determining a target bill information distribution area according to the bill content fixed format, and obtaining table line information of the target bill information distribution area; and performing information extraction on each content line in the target bill information distribution area according to the table line information, and obtaining a bill information extraction result of the bill according to a content line information extraction result of each content line.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of information extraction, and in particular to a method, apparatus, computer equipment, computer-readable storage medium and computer program product for extracting bill information. Background Art

[0002] In the automatic claims service, users will upload a large number of different invoices, and it is necessary to extract the target information from these invoices in a structured manner. Since the format of the invoice is relatively fixed, the relevant technology mainly formulates a general template, matches the corresponding coordinates of several key positions in the invoice, and then confirms the specific location of the target information to be extracted through the relative position of the template, and then extracts the target information.

[0003] However, the template needs to pre-set the area of ​​the row where the target information is located. However, since the number of records on the bill is often uncertain, when the number of records is large, it will exceed the area set by the template, resulting in the loss of information beyond the template area, which significantly affects the accuracy of bill information extraction. Summary of the invention

[0004] Based on this, it is necessary to provide a bill information extraction method, device, computer equipment, computer readable storage medium and computer program product to address the above technical problems.

[0005] In a first aspect, the present application provides a method for extracting bill information, comprising:

[0006] Obtaining a bill for which bill information is to be extracted, and determining a fixed format of bill content of the bill;

[0007] Determine a target bill information distribution area according to the fixed format of the bill content, and obtain table line information of the target bill information distribution area;

[0008] Information is extracted from each content row in the target ticket information distribution area according to the table line information, and a ticket information extraction result of the ticket is obtained according to the content row information extraction result of each content row.

[0009] In one embodiment, extracting information from each content row in the target ticket information distribution area according to the table line information includes:

[0010] Determine a plurality of content rows in the target ticket information distribution area according to the table line information;

[0011] Information is extracted from each of the plurality of content rows in the target ticket information distribution area.

[0012] In one embodiment, extracting information from each of the plurality of content lines in the target ticket information distribution area includes:

[0013] Determine a plurality of content columns in the target ticket information distribution area according to the table line information; each of the plurality of content columns corresponds to a sub-category of ticket information;

[0014] determining a target content column among the plurality of content columns;

[0015] For each of the content rows in the target ticket information distribution area, information is extracted from the target content column in the content row.

[0016] In one embodiment, determining the fixed format of the bill content of the bill includes:

[0017] Performing optical character recognition on the bill, and determining the bill type corresponding to the bill according to the optical character recognition result;

[0018] Obtain a bill template corresponding to the bill type, and obtain a fixed format of bill content corresponding to the bill according to the bill template.

[0019] In one embodiment, determining the target bill information distribution area according to the fixed format of the bill content includes:

[0020] Determining sub-category title lines corresponding to a plurality of sub-category titles in the bill according to the optical character recognition result;

[0021] According to the bill template, the bill information distribution area below the sub-category target title line is determined as the target bill information distribution area.

[0022] In one embodiment, obtaining the table line information of the target bill information distribution area includes:

[0023] Extracting image information corresponding to the target bill information distribution area;

[0024] The image information corresponding to the target bill information distribution area is input into a trained table line detection model to obtain the table line information of the target bill information distribution area output by the table line detection model.

[0025] In a second aspect, the present application also provides a bill information extraction device, comprising:

[0026] A format determination module, used to obtain a bill for which bill information extraction is to be performed, and determine a fixed bill content format of the bill;

[0027] A table line acquisition module, used to determine a target bill information distribution area according to the fixed format of the bill content, and acquire table line information of the target bill information distribution area;

[0028] The information extraction module is used to extract information from each content line in the target bill information distribution area according to the table line information, and obtain the bill information extraction result of the bill according to the content line information extraction result of each content line.

[0029] In a third aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:

[0030] Obtaining a bill for which bill information is to be extracted, and determining a fixed format of bill content of the bill;

[0031] Determine a target bill information distribution area according to the fixed format of the bill content, and obtain table line information of the target bill information distribution area;

[0032] Information is extracted from each content row in the target ticket information distribution area according to the table line information, and a ticket information extraction result of the ticket is obtained according to the content row information extraction result of each content row.

[0033] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the following steps are implemented:

[0034] Obtaining a bill for which bill information is to be extracted, and determining a fixed format of bill content of the bill;

[0035] Determine a target bill information distribution area according to the fixed format of the bill content, and obtain table line information of the target bill information distribution area;

[0036] Information is extracted from each content row in the target ticket information distribution area according to the table line information, and a ticket information extraction result of the ticket is obtained according to the content row information extraction result of each content row.

[0037] In a fifth aspect, the present application further provides a computer program product, including a computer program, which implements the following steps when executed by a processor:

[0038] Obtaining a bill for which bill information is to be extracted, and determining a fixed format of bill content of the bill;

[0039] Determine a target bill information distribution area according to the fixed format of the bill content, and obtain table line information of the target bill information distribution area;

[0040] Information is extracted from each content row in the target ticket information distribution area according to the table line information, and a ticket information extraction result of the ticket is obtained according to the content row information extraction result of each content row.

[0041] The above-mentioned ticket information extraction method, device, computer equipment, computer-readable storage medium and computer program product can obtain the ticket to be subjected to ticket information extraction, determine the fixed format of the ticket content of the ticket; then determine the target ticket information distribution area according to the fixed format of the ticket content, and obtain the table line information of the target ticket information distribution area; then extract information from each content line in the target ticket information distribution area according to the table line information, and obtain the ticket information extraction result of the ticket according to the content line information extraction result of each content line. In this embodiment, by performing table line detection on the target ticket information distribution area, the table line information can be obtained and each content line in the target ticket information distribution area can be determined. By performing information extraction on each content line, the information contained in each content line can be accurately extracted, avoiding the loss of ticket information of some objects due to the uncertainty of the number of lines, and effectively improving the accuracy of ticket information extraction. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0043] Figure 1 A schematic diagram of a process of extracting bill information in an embodiment;

[0044] Figure 2 A flowchart of a step of extracting bill information during a claims settlement process in one embodiment;

[0045] Figure 3 A schematic diagram of a flow chart of another method for extracting bill information in one embodiment;

[0046] Figure 4 It is a structural block diagram of a bill information extraction device in one embodiment;

[0047] Figure 5 is an internal structure diagram of a computer device in one embodiment;

[0048] Figure 6 The figure is a diagram of the internal structure of another computer device in one embodiment. DETAILED DESCRIPTION

[0049] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0050] In one embodiment, Figure 1 As shown, a method for extracting ticket information is provided. This embodiment uses the method applied to a server as an example for illustration. It can be understood that the method can also be applied to a terminal, and can also be applied to a system including a terminal and a server, and is implemented through the interaction between the terminal and the server. In this embodiment, the method includes the following steps:

[0051] S101, obtaining a bill whose bill information is to be extracted, and determining a fixed format of the bill content of the bill.

[0052] In practical applications, a bill to be extracted from bill information may be obtained, wherein the bill may include relevant information of multiple objects of varying numbers, such as bill 1 only recording relevant information of object A, while bill 2 records relevant information of each of objects A, B, and C. In some exemplary embodiments, the bill from which bill information is to be extracted may be a financial bill, such as an invoice, or may be other bills used to record object information in business activities, such as one or more of a purchase order, a purchase order, and a delivery order.

[0053] After obtaining the bill for which bill information extraction is to be performed, the fixed format of the bill content of the bill can be determined. Among them, in the same bill, although multiple bills record different information respectively, the distribution position of different types of bill information in the same bill is relatively fixed. In this regard, the fixed format of the bill content can be obtained. The fixed format of the bill content can represent the approximate distribution of various types of bill information in the bill, that is, the approximate bill information distribution area of ​​various types of bill information in the bill, and each type of bill information can correspond to a bill information distribution area.

[0054] S102, determining a target bill information distribution area according to a fixed format of bill content, and obtaining table line information of the target bill information distribution area.

[0055] The target bill information distribution area is the bill information distribution area in the bill that contains the bill information to be extracted.

[0056] In a specific implementation, after obtaining the fixed format of the bill content, the target bill information distribution area can be determined according to the fixed format of the bill content. The target bill information distribution area often includes an indefinite amount of bill information to be extracted, but the inventors have found in practice that such bill information is often arranged in an orderly manner based on a visible or invisible table in the target bill information distribution area. In this regard, in this embodiment, the table line information of the target bill information distribution area can be further obtained, wherein the table line information can represent the position of the visible or invisible table line in the target bill information distribution area.

[0057] In some exemplary embodiments, obtaining table line information of a target bill information distribution area may include the following steps:

[0058] Extract image information corresponding to the target bill information distribution area; input the image information corresponding to the target bill information distribution area into the trained table line detection model to obtain the table line information of the target bill information distribution area output by the table line detection model.

[0059] In practical applications, after determining the target bill information distribution area in the bill, image information corresponding to the target bill information distribution area may be extracted, and the image information includes an image of the target bill information distribution area.

[0060] Then, the image information corresponding to the target bill information distribution area can be input into the trained table line detection model to obtain the table line information of the target bill information distribution area output by the table line detection model. In some exemplary embodiments, the table line detection model can be obtained by training a neural network in a supervised learning manner, and the table line model can determine the visible or invisible table lines in the image according to the distribution law of each text information in the input image, and then output the corresponding table line information.

[0061] In this embodiment, the target bill information distribution area can be quickly identified through the trained table line detection model, which helps to flexibly determine the table lines appearing in different bills and improve the efficiency of table line information extraction.

[0062] S103, extracting information from each content line in the target bill information distribution area according to the table line information, and obtaining a bill information extraction result of the bill according to the content line information extraction result of each content line.

[0063] In a specific implementation, since the table line information can represent the location of visible or invisible table lines in the target bill information distribution area, the content rows contained in the target bill information distribution area can be determined by analyzing the table line information, and then, information can be extracted from each content row, and based on the content row information extraction results of each content row, the bill information extraction result of the bill can be obtained.

[0064] For example, refer to Figure 2 As shown, during the insurance claim process, the number of rows of items in the target bill information distribution area in the invoice can be determined through the table line information, and then the amount information of each row of items can be accurately extracted based on the number of rows. The accurate total amount information is combined with the amount information extracted from each row to determine the claim result, effectively avoiding the loss of the amount information of some items due to the uncertainty of the number of rows of items.

[0065] In the above-mentioned bill information extraction method, the bill to be subjected to bill information extraction can be obtained, and the fixed format of the bill content of the bill can be determined; then the target bill information distribution area is determined according to the fixed format of the bill content, and the table line information of the target bill information distribution area is obtained; then, information is extracted from each content line in the target bill information distribution area according to the table line information, and the bill information extraction result of the bill is obtained according to the content line information extraction result of each content line. In this embodiment, by performing table line detection on the target bill information distribution area, the table line information can be obtained and each content line in the target bill information distribution area can be determined. By performing information extraction on each content line, the information contained in each content line can be accurately extracted, avoiding the loss of bill information of some objects due to the uncertainty of the number of lines, and effectively improving the accuracy of bill information extraction.

[0066] In one embodiment, in step S103, extracting information from each content row in the target bill information distribution area according to the table line information may include the following steps:

[0067] Determine multiple content rows in the target bill information distribution area according to the table line information; and extract information from each of the multiple content rows in the target bill information distribution area.

[0068] In a specific implementation, the table contained in the target ticket information distribution area and each content row in the table can be determined based on the table line information, wherein the number of content rows can be greater than or equal to the objects of the relevant ticket information to be extracted. For example, if the target ticket information distribution area records relevant ticket information for M objects, then the number of content rows in the target ticket information distribution area can be M rows, or greater than M rows, and the excess content rows can be blank content rows, which are used to take up place in the ticket to keep the overall content format of the ticket stable.

[0069] It can be understood that, since the number of content lines can correspond to the number of objects, the table line information obtained through table detection can be used to obtain multiple content lines corresponding to the number of objects in the bill, for example, the number of item lines in the invoice can be obtained through table line detection. Furthermore, information can be extracted from each of the multiple content lines in the target bill information distribution area to obtain the bill information contained in each content line.

[0070] In this embodiment, multiple content rows are determined by table line information and each of the multiple content rows is extracted separately. When the target ticket information distribution area contains an uncertain number of multiple pieces of information, all information can be accurately extracted to avoid losing part of the ticket information that needs to be extracted due to the uncertain number of rows.

[0071] In one embodiment, extracting information from each of the multiple content lines in the target ticket information distribution area includes:

[0072] Determine multiple content columns in the target ticket information distribution area based on table line information; each column in the multiple content columns corresponds to ticket information of a sub-category; determine a target content column in the multiple content columns; and extract information from the target content column in the content row for each content row in the target ticket information distribution area.

[0073] In actual applications, the target ticket information distribution area may include multiple content columns, each content column corresponds to a different sub-category, and the ticket information in the content column is the ticket information under the sub-category corresponding to the content column. For example, corresponding to item A, the sub-category of the content column may include the item type of item A, the unit price of item A, the tax of item A, and the total price of item A consisting of the unit price and tax.

[0074] After obtaining the table line information, multiple content columns in the target bill information distribution area can be determined according to the table line information, and then the target content column in the multiple content columns can be determined according to the fixed format of the bill content (such as the bill template and / or the optical character recognition result of the bill). The target content column is the content column containing the bill information to be extracted. If the bill information to be extracted is the amount of each item, the target content column is the content column corresponding to the amount. Furthermore, for each content row in the target bill information distribution area, information can be extracted from the target content column in the content row.

[0075] According to the template and the optical character recognition results, although fixed-format information such as the bill type and bill generation date can be matched, it is often impossible to accurately match all specific bill information with an uncertain number of objects (such as items) in the bill. In this embodiment, table lines are introduced for guidance, multiple content rows are determined, and the information in the target content column of each content row is extracted. This allows accurate extraction of specific bill information from bills with an uncertain number of records, effectively improving the accuracy of bill information extraction.

[0076] In one embodiment, determining the fixed format of the bill content of the bill may include the following steps:

[0077] Perform optical character recognition on the bill, and determine the bill type corresponding to the bill according to the optical character recognition result; obtain the bill template corresponding to the bill type, and obtain the fixed format of the bill content corresponding to the bill according to the bill template.

[0078] In a specific implementation, the bill can be subjected to optical character recognition (OCR) to obtain the text information in the bill. By analyzing the text information contained in the bill, the bill type corresponding to the bill can be determined. For example, the title of the bill can contain words such as "invoice" and "delivery order" that represent the bill type. Then, according to the pre-set correspondence between the bill type and the bill template, the bill template corresponding to the current bill type can be obtained from the stored multiple bill templates.

[0079] In an exemplary embodiment, referring to Figure 2 During the insurance claim process, you can perform OCR recognition on the invoices or warehouse entry and exit orders uploaded by the user to obtain the Chinese text information of the bill, and then select the corresponding template according to the type of bill. For example, if the invoice type has a relatively fixed overall format, select the invoice template.

[0080] Then, the fixed format of the bill content corresponding to the bill can be obtained according to the bill template. Therefore, the fixed format of the bill content can be quickly determined by matching the bill template corresponding to the bill, which helps to improve the positioning efficiency of the target bill information distribution area.

[0081] In one embodiment, determining the target bill information distribution area according to the fixed format of the bill content may include the following contents:

[0082] According to the optical character recognition result, the detailed classification title lines corresponding to the multiple detailed classification titles in the bill are determined; according to the bill template, the bill information distribution area below the detailed classification title line is determined as the target bill information distribution area.

[0083] In a specific implementation, the sub-category title line corresponding to the multiple sub-category ticket information in the bill can be determined according to the optical character recognition result. Specifically, the sub-category title line includes multiple sub-category titles, such as item name, item unit price, item tax, item total price, etc. According to the optical character recognition result, the title line containing multiple sub-category names at the same time can be determined as the sub-category title line.

[0084] Then, according to the bill template, the bill information distribution area below the sub-category target title line can be determined as the target bill information distribution area. Figure 3, according to the OCR result and the bill template, the title row containing the item name and item amount can be matched, and then the area below the title row is determined as the target bill information distribution area, and then the number of content rows of the item is determined according to the table line information of the target bill information distribution area, and the item amount in each content row is extracted according to the number of content rows.

[0085] In this embodiment, the optical character recognition result and the bill template can be combined to quickly locate the target bill information distribution area in the bill, which helps to improve the extraction efficiency of the specified bill information.

[0086] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0087] Based on the same inventive concept, the embodiment of the present application also provides a bill information extraction device for implementing the bill information extraction method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more bill information extraction device embodiments provided below can refer to the limitations of the bill information extraction method above, and will not be repeated here.

[0088] In an exemplary embodiment, Figure 4 As shown, a bill information extraction device is provided, comprising:

[0089] The format determination module 401 is used to obtain the bill to be subjected to bill information extraction and determine the fixed format of the bill content of the bill;

[0090] A table line acquisition module 402 is used to determine a target bill information distribution area according to the fixed format of the bill content, and acquire table line information of the target bill information distribution area;

[0091] The information extraction module 403 is used to extract information from each content line in the target bill information distribution area according to the table line information, and obtain the bill information extraction result of the bill according to the content line information extraction result of each content line.

[0092] In one embodiment, the information extraction module 403 is used to:

[0093] Determine a plurality of content rows in the target ticket information distribution area according to the table line information;

[0094] Information is extracted from each of the plurality of content rows in the target ticket information distribution area.

[0095] In one embodiment, the information extraction module 403 is used to:

[0096] Determine a plurality of content columns in the target ticket information distribution area according to the table line information; each of the plurality of content columns corresponds to a sub-category of ticket information;

[0097] determining a target content column among the plurality of content columns;

[0098] For each of the content rows in the target ticket information distribution area, information is extracted from the target content column in the content row.

[0099] In one embodiment, the format determination module 401 is used to:

[0100] Performing optical character recognition on the bill, and determining the bill type corresponding to the bill according to the optical character recognition result;

[0101] Obtain a bill template corresponding to the bill type, and obtain a fixed format of bill content corresponding to the bill according to the bill template.

[0102] In one embodiment, the table line acquisition module 402 is used to:

[0103] Determining sub-category title lines corresponding to a plurality of sub-category titles in the bill according to the optical character recognition result;

[0104] According to the bill template, the bill information distribution area below the sub-category target title line is determined as the target bill information distribution area.

[0105] In one embodiment, the table line acquisition module 402 is used to:

[0106] Extracting image information corresponding to the target bill information distribution area;

[0107] The image information corresponding to the target bill information distribution area is input into a trained table line detection model to obtain the table line information of the target bill information distribution area output by the table line detection model.

[0108] Each module in the above-mentioned bill information extraction device can be implemented in whole or in part by software, hardware or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute the corresponding operations of each module.

[0109] In an exemplary embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as shown in FIG. Figure 5 As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store bill data. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a bill information extraction method is implemented.

[0110] In an exemplary embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as shown in FIG. Figure 6As shown. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, near field communication (NFC) or other technologies. When the computer program is executed by the processor, a method for extracting bill information is implemented. The display unit of the computer device is used to form a visually visible picture, which can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device shell, or an external keyboard, touchpad or mouse.

[0111] Those skilled in the art will understand that Figure 5 and Figure 6 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0112] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.

[0113] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.

[0114] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.

[0115] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.

[0116] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.

[0117] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0118] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A method for extracting bill information, characterized in that: The method comprises: Obtaining a bill for which bill information is to be extracted, and determining a fixed format of bill content of the bill; Determine a target bill information distribution area according to the fixed format of the bill content, and obtain table line information of the target bill information distribution area; Information is extracted from each content row in the target ticket information distribution area according to the table line information, and a ticket information extraction result of the ticket is obtained according to the content row information extraction result of each content row.

2. The method according to claim 1, characterized in that The extracting information from each content row in the target bill information distribution area according to the table line information includes: Determine a plurality of content rows in the target ticket information distribution area according to the table line information; Information is extracted from each of the plurality of content rows in the target ticket information distribution area.

3. The method according to claim 2, characterized in that The extracting information from each of the plurality of content lines in the target ticket information distribution area comprises: Determine a plurality of content columns in the target ticket information distribution area according to the table line information; each of the plurality of content columns corresponds to a sub-category of ticket information; determining a target content column among the plurality of content columns; For each of the content rows in the target ticket information distribution area, information is extracted from the target content column in the content row.

4. The method according to claim 1, characterized in that The step of determining the fixed format of the bill content of the bill includes: Performing optical character recognition on the bill, and determining the bill type corresponding to the bill according to the optical character recognition result; Obtain a bill template corresponding to the bill type, and obtain a fixed format of bill content corresponding to the bill according to the bill template.

5. The method according to claim 4, characterized in that The step of determining the target bill information distribution area according to the fixed format of the bill content includes: Determining sub-category title lines corresponding to a plurality of sub-category titles in the bill according to the optical character recognition result; According to the bill template, the bill information distribution area below the sub-category target title line is determined as the target bill information distribution area.

6. The method according to any one of claims 1 to 5, characterized in that The step of obtaining the table line information of the target bill information distribution area includes: Extracting image information corresponding to the target bill information distribution area; The image information corresponding to the target bill information distribution area is input into a trained table line detection model to obtain the table line information of the target bill information distribution area output by the table line detection model.

7. A bill information extraction device, characterized in that: The device comprises: A format determination module, used to obtain a bill for which bill information extraction is to be performed, and determine a fixed bill content format of the bill; A table line acquisition module, used to determine a target bill information distribution area according to the fixed format of the bill content, and acquire table line information of the target bill information distribution area; The information extraction module is used to extract information from each content line in the target bill information distribution area according to the table line information, and obtain the bill information extraction result of the bill according to the content line information extraction result of each content line.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.

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

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.