A method and apparatus for parsing a bill document

By constructing a bill analysis template for the invoice party and converting its location, the problem of irregular electronic invoice data and differences in the analysis template is solved, and the accurate analysis and universality of electronic invoices of different invoice parties is achieved.

CN114357967BActive Publication Date: 2025-06-13泰康保险集团股份有限公司
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111401050.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-19
Publication Date
2025-06-13
Estimated Expiration
2041-11-19

AI Technical Summary

Technical Problem

Since electronic invoices come from multiple invoice parties and the templates used by each invoice party are different, it is necessary to analyze the electronic invoices of each invoice party separately, and the data is not standardized, resulting in failure or inaccurate identification.

Method used

A bill analysis template is constructed for the invoice party in advance. By obtaining the bill analysis template that matches the bill file to be parsed, the parsing area position corresponding to the data item in the template is converted into the position in the bill file to be parsed, so as to read the data information to complete the parsing.

Benefits of technology

It realizes general analysis of electronic invoices of different invoice parties, improves the accuracy of analysis and anti-interference ability, and solves the problem of identification failure caused by irregular data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114357967B_ABST
    Figure CN114357967B_ABST
Patent Text Reader

Abstract

The present invention discloses a method and apparatus for parsing bill documents, relating to the field of computer technology. A specific implementation of the method includes: receiving a bill document to be parsed, querying a matching bill parsing template according to the target object data of the bill document to be parsed; obtaining the configuration information of the bill parsing template, and creating a corresponding parser instance according to the parser information in the configuration information; wherein, the configuration information includes the first position information of the parsing area of the bill parsing template and the parser information, and the parsing area corresponds to the data item of the bill parsing template; using the parser instance, converting the first position information into the second position information of the same data item in the bill document to be parsed, and reading the data information recorded at the second position information to complete the parsing. This method converts the positions of the data items corresponding to the parsing areas in the bill parsing template into the positions of the same data items in the bill document to be parsed, and completes the bill parsing, with good versatility.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and particularly to a method and apparatus for parsing a bill file. Background Art

[0002] With the popularization of electronic invoices, enterprises need to read relevant data information from electronic invoices for business operations. Therefore, the accuracy of data reading plays a very important role in the normal operation of business. Since electronic invoices usually come from multiple invoicing parties, and the templates used by each invoicing party when generating electronic invoices are different, it is necessary to parse the electronic invoices of each invoicing party separately. At the same time, due to the non-standardization of electronic invoice data, recognition failures and inaccurate recognition occur. Summary of the Invention

[0003] In view of this, embodiments of the present invention provide a method and apparatus for parsing a bill file. The method pre-constructs a bill parsing template for the invoicing party. When it is necessary to parse the bill file to be parsed, a bill parsing template matching the bill file to be parsed is obtained, and then the positions of the corresponding parsing regions of each data item in the bill parsing template are converted into the positions of the same data items in the bill file to be parsed, so that the data information of the bill file to be parsed can be read based on this position, and the bill parsing is completed, with good versatility.

[0004] To achieve the above object, according to one aspect of the embodiments of the present invention, a method for parsing a bill file is provided.

[0005] A method for parsing a bill file according to an embodiment of the present invention includes: receiving a bill file to be parsed, and querying a bill parsing template matching the bill file to be parsed according to the target object data of the bill file to be parsed; obtaining configuration information of the bill parsing template, and creating a corresponding parser instance according to the parser information in the configuration information; where the configuration information includes first position information of a parsing region of the bill parsing template and the parser information, and the parsing region corresponds to a data item of the bill parsing template; using the parser instance to convert the first position information into second position information of the same data item in the bill file to be parsed, and reading the data information recorded at the second position information to complete the parsing.

[0006] Optionally, the first position information includes vertex coordinates of the parsing region.

[0007] Converting the first position information into the second position information of the same data item in the bill file to be parsed includes: calculating the starting position ratio, data width ratio, and data height ratio of the corresponding data item in the bill parsing template according to the vertex coordinates of the parsing area, and the first total width and first total height of the bill parsing template; calculating the second position information of the same data item in the bill file to be parsed according to the starting position ratio, data width ratio, and data height ratio of the data item in the bill parsing template, and the second total width and second total height of the bill file to be parsed.

[0008] Optionally, the bill parsing template includes a main ticket area composed of bill basic information and a detailed area composed of bill detailed information. The parsing area in the main ticket area corresponds to one data item, and the parsing area in the detailed area corresponds to multiple data items.

[0009] Calculating the starting position ratio, data width ratio, and data height ratio of the corresponding data item in the bill parsing template includes: when the parsing area is in the main ticket area, dividing the starting abscissa and starting ordinate of the parsing area by the first total width and the first total height respectively to obtain the starting position ratio of the corresponding data item in the bill parsing template; calculating the width and height of the parsing area, and dividing the width and height of the parsing area by the first total width and the first total height respectively to obtain the data width ratio and data height ratio of the corresponding data item in the bill parsing template.

[0010] When the parsing area is in the detailed area, calculating the width and height of the parsing area, calculating the width and height of each data item according to the total number of rows and total number of columns of the parser information; and calculating the starting position ratio, data width ratio, and data height ratio of each data item in the bill parsing template according to the starting abscissa, starting ordinate of the parsing area, and the width and height of each data item.

[0011] Optionally, the bill parsing template includes a main ticket area composed of bill basic information and a detailed area composed of bill detailed information; the parser information includes the parser type, and the parser type of the main ticket area is different from that of the detailed area.

[0012] Creating a corresponding parser instance according to the parser information in the configuration information includes: dividing the configuration information into basic configuration and detailed configuration according to the parser type of the parser information; creating corresponding main parser instances and detailed parser instances according to the basic configuration and the detailed configuration, and the main parser instances and the detailed parser instances constitute the parser instance.

[0013] Using the parser instance includes: when the parsing area is located in the main ticket area, using the main parsing instance; and when the parsing area is located in the detail area, using the detail parsing instance.

[0014] Optionally, the parser types in the main ticket area include the normal type and the delimiter type;

[0015] Reading the data information recorded at the second position information includes: when the parsing area is located in the main ticket area and the parser type is the normal type, directly reading the data information recorded at the second position information; when the parsing area is located in the main ticket area and the parser type is the delimiter type, respectively reading the data information before and after the set delimiter at the second position information.

[0016] Optionally, the method further includes: abstracting the data item as a data node, creating a node identifier for the data node; writing the node identifier, the starting position ratio, the data width ratio, and the data height ratio of the corresponding data item as the node information of the data node into the data node set;

[0017] Calculating the second position information of the same data item in the to-be-parsed bill file includes: repeatedly executing the following steps until all data nodes are processed: indexing the node information of the corresponding data node from the data node set according to the node identifier to calculate the second position information of the same data item in the to-be-parsed bill file; after the step of reading the data information recorded at the second position information, the method further includes: assigning the data information to the data node.

[0018] Optionally, the method further includes: receiving an original bill file, when detecting an editing operation on the original bill file, using the operation area of the editing operation as the parsing area, and returning an attribute editing interface for configuring the parsing area; receiving configuration information input by the user in the attribute editing interface, assembling the configuration information of the parsing area, generating a corresponding bill parsing template; establishing an association relationship between the bill parsing template and the target object data; wherein, the target object data includes the invoicing party identifier.

[0019] To achieve the above object, according to another aspect of the embodiments of the present invention, there is provided an apparatus for parsing a bill file.

[0020] An apparatus for parsing a bill document according to an embodiment of the present invention includes: a template query module, configured to receive a bill document to be parsed, and query a bill parsing template that matches the bill document to be parsed according to target object data of the bill document to be parsed; an instance creation module, configured to obtain configuration information of the bill parsing template, and create a corresponding parser instance according to parser information in the configuration information; wherein the configuration information includes first position information of a parsing area of the bill parsing template and the parser information, and the parsing area corresponds to a data item of the bill parsing template; a file parsing module, configured to use the parser instance to convert the first position information into second position information of the same data item in the bill document to be parsed, and read data information recorded at the second position information, so as to complete parsing.

[0021] Optionally, the first position information includes vertex coordinates of the parsing area;

[0022] The file parsing module is further configured to calculate a starting position ratio, a data width ratio, and a data height ratio of a corresponding data item in the bill parsing template according to the vertex coordinates of the parsing area, and a first total width and a first total height of the bill parsing template; and calculate second position information of the same data item in the bill document to be parsed according to the starting position ratio, the data width ratio, and the data height ratio of the data item in the bill parsing template, and a second total width and a second total height of the bill document to be parsed.

[0023] Optionally, the bill parsing template includes a main bill area composed of basic bill information and a detailed area composed of detailed bill information, a parsing area located in the main bill area corresponds to one of the data items, and a parsing area located in the detailed area corresponds to multiple data items;

[0024] The file parsing module is further configured to, when the parsing area is located in the main bill area, divide the starting abscissa and the starting ordinate of the parsing area by the first total width and the first total height respectively to obtain the starting position ratio of the corresponding data item in the bill parsing template; and calculate the width and height of the parsing area, and divide the width and height of the parsing area by the first total width and the first total height respectively to obtain the data width ratio and the data height ratio of the corresponding data item in the bill parsing template.

[0025] When the parsing area is located in the details area, calculate the width and height of the parsing area, and calculate the width and height of each data item according to the total number of rows and columns of the parser information; and calculate the starting position ratio, data width ratio, and data height ratio of each data item in the bill parsing template according to the starting abscissa, starting ordinate of the parsing area, and the width and height of each data item.

[0026] Optionally, the bill parsing template includes a main bill area composed of basic bill information and a details area composed of bill details information; the parser information includes a parser type, and the parser type of the main bill area is different from the parser type of the details area;

[0027] The instance creation module is further configured to divide the configuration information into basic configuration and details configuration according to the parser type of the parser information; create corresponding main parsing instances and details parsing instances respectively according to the basic configuration and the details configuration, and the main parsing instances and the details parsing instances constitute parser instances;

[0028] The file parsing module is further configured to use the main parsing instance when the parsing area is located in the main bill area; and use the details parsing instance when the parsing area is located in the details area.

[0029] Optionally, the parser type of the main bill area includes a normal type and a separator type;

[0030] The file parsing module is further configured to directly read the data information recorded at the second position information when the parsing area is located in the main bill area and the parser type is the normal type; and respectively read the data information before and after the set separator at the second position information when the parsing area is located in the main bill area and the parser type is the separator type.

[0031] Optionally, the device further includes: a set construction module, configured to abstract the data item into a data node, create a node identifier for the data node; write the node identifier, the starting position ratio, data width ratio, and data height ratio of the corresponding data item as the node information of the data node into a data node set;

[0032] The file parsing module is further configured to: repeatedly execute the following steps until all data nodes are processed: index the node information of the corresponding data node from the data node set according to the node identifier to calculate the second position information of the same data item in the bill file to be parsed; The method further includes: a node assignment module, configured to assign the data information to the data node.

[0033] Optionally, the device further includes: a template construction module, configured to receive an original bill file, and when detecting an editing operation on the original bill file, use the operation area of the editing operation as the parsing area, and return an attribute editing interface for configuring the parsing area; receive configuration information input by a user in the attribute editing interface, assemble the configuration information of the parsing area, and generate a corresponding bill parsing template. A template association module, configured to establish an association relationship between the bill parsing template and the target object data; wherein the target object data includes an invoicing party identifier.

[0034] To achieve the above object, according to another aspect of the embodiments of the present invention, there is provided an electronic device.

[0035] An electronic device according to an embodiment of the present invention includes: one or more processors; a storage device, configured to store one or more programs, and when the one or more programs are executed by the one or more processors, enable the one or more processors to implement a method for parsing a bill file according to an embodiment of the present invention.

[0036] To achieve the above object, according to another aspect of the embodiments of the present invention, there is provided a computer-readable medium.

[0037] A computer-readable medium according to an embodiment of the present invention has a computer program stored thereon, and when the program is executed by a processor, it implements a method for parsing a bill file according to an embodiment of the present invention.

[0038] One of the above embodiments of the invention has the following advantages or beneficial effects: A bill parsing template is constructed in advance for the invoicing party. When it is necessary to parse a bill file to be parsed, by obtaining a bill parsing template that matches the bill file to be parsed, and then converting the positions of the corresponding parsing areas of each data item in the bill parsing template to the positions of the same data items in the bill file to be parsed, so that the data information of the bill file to be parsed can be read based on this position, and the bill parsing is completed, with good versatility.

[0039] The further effects of the above non-conventional optional methods will be described in combination with specific embodiments below. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] The drawings are used to better understand the present invention and do not constitute an improper limitation to the present invention. Among them:

[0041] Figure 1 is a schematic diagram of the main steps of a method for parsing a bill file according to an embodiment of the present invention;

[0042] Figure 2 is a schematic diagram of the main process of a method for parsing a bill file according to an embodiment of the present invention;

[0043] Figure 3 It is a schematic diagram of the main process of processing the configurations of each parsing area into a set of data nodes in an embodiment of the present invention;

[0044] Figure 4 It is a schematic diagram of the result of reading the data information of some data items in the bill file to be parsed in an embodiment of the present invention;

[0045] Figure 5 It is a schematic diagram of the result of structuring the data information of some data items in the bill file to be parsed in an embodiment of the present invention;

[0046] Figure 6 It is a schematic diagram of the main modules of a parsing device for a bill file according to an embodiment of the present invention;

[0047] Figure 7 It is an exemplary system architecture diagram to which an embodiment of the present invention can be applied;

[0048] Figure 8 It is a schematic diagram of the structure of a computer device of an electronic device suitable for implementing an embodiment of the present invention. Detailed implementation manners

[0049] The following describes exemplary embodiments of the present invention with reference to the accompanying drawings, including various details of the embodiments of the present invention to facilitate understanding. It should be considered that they are merely exemplary. Therefore, those of ordinary skill in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present invention. Similarly, for the sake of clarity and conciseness, the description below omits the description of well-known functions and structures.

[0050] Embodiment 1

[0051] Figure 1 It is a schematic diagram of the main steps of a parsing method for a bill file according to an embodiment of the present invention. As Figure 1 shown, the parsing method for a bill file in an embodiment of the present invention mainly includes the following steps:

[0052] Step S101: Receive the bill file to be parsed, and query a bill parsing template that matches the bill file to be parsed according to the target object data of the bill file to be parsed. A bill parsing template is pre-generated for different invoicing parties according to the original bill file, and an association relationship is established between the bill parsing template and the target object data, and the target object data can be an invoicing party identifier.

[0053] After receiving the bill file to be parsed, the target object data of the bill file to be parsed can be obtained. Then, using the target object data as the retrieval condition, the corresponding bill parsing template can be queried, and the queried bill parsing template is the bill parsing template that matches the bill file to be parsed.

[0054] Step S102: Obtain the configuration information of the bill parsing template, and create a corresponding parser instance according to the parser information in the configuration information. Here, the configuration information refers to the relevant information configured for each parsing area of the bill parsing template, which may include the first position information and parser information of the parsing area. The parsing area corresponds to the data item of the bill parsing template, and the parser information refers to the information configured for this parsing area for subsequent parsing.

[0055] After obtaining the configuration information of the bill parsing template, extract the parser information from the configuration information, and then use the createInstance command to create a parser instance for subsequent bill parsing.

[0056] Step S103: Use the parser instance to convert the first position information into the second position information of the same data item in the bill file to be parsed, and read the data information recorded at the second position information to complete the parsing. The first position information may be the vertex coordinates of the parsing area. Since each data item of the bill file to be parsed corresponds to each data item of the bill parsing template, and each data item of the bill parsing template corresponds to the parsing area with the first position information, the first position information can be converted to obtain the second position information of the same data item in the bill file to be parsed.

[0057] Specifically, according to the vertex coordinates of the parsing area, as well as the first total width and first total height of the bill parsing template, calculate the starting position ratio, data width ratio, and data height ratio of the corresponding data item of this parsing area in the bill parsing template; then, according to the starting position ratio, data width ratio, and data height ratio of each data item in the bill parsing template, as well as the second total width and second total height of the bill file to be parsed, calculate the second position information of the same data item in the bill file to be parsed.

[0058] Among them, the starting position ratio represents the ratio of the start position of the data item to the total width and total height of the bill parsing template, the data width ratio represents the ratio of the data width of the data item to the total width of the bill parsing template, and the data height ratio represents the ratio of the data height of the data item to the total height of the bill parsing template.

[0059] After obtaining the second position information of a data item in the bill document to be parsed, an existing data reading tool is called to read the data information recorded at the second position information. In the above manner, the second position information of all data items in the bill document to be parsed is obtained, and the data information recorded at the second position information is read, and the final parsing result can be obtained.

[0060] Embodiment 2

[0061] The original bill document usually includes basic bill information such as bill code, payer, and billing date, and may also include detailed bill information such as secondary classification of the bill and expense details (including lists). To improve the accuracy of bill parsing, the original bill document can be divided into a main bill area and a detailed area. The main bill area includes basic bill information, and the detailed area includes detailed bill information. The main bill area and the detailed area are respectively configured to obtain a bill parsing template. Subsequently, the bill parsing template is used to parse the bill document to be parsed. The following is a detailed description in conjunction with Embodiment 2.

[0062] Figure 2 is a schematic diagram of the main process of the method for parsing a bill document according to an embodiment of the present invention. As Figure 2 shown, the method for parsing a bill document according to an embodiment of the present invention mainly includes the following steps:

[0063] Step S201: Receive the original bill document, perform visual configuration on the original bill document, and generate a corresponding bill parsing template. The original bill document can be an electronic bill PDF file issued by a certain invoicing party. In an optional embodiment, the data items included in the bill documents of the same invoicing party are fixed, and there are differences between different invoicing parties. Therefore, an original bill document including all data items of existing invoicing parties can also be constructed, and subsequently, according to the different invoicing parties, the corresponding data items of the original bill document are visually configured.

[0064] In this step, first, the original bill document is received. When an editing operation on the original bill document is detected, the operation area of the editing operation is used as the parsing area, and an attribute editing interface for configuring the parsing area is returned. In the embodiment, the user can click on a certain area of the original bill document with the mouse. When the click operation is detected, a border is drawn for this area to obtain the parsing area. The attribute editing interface is used to configure the position information of the parsing area, as well as the attribute information and parser information of the data item corresponding to the parsing area.

[0065] In the embodiments, the attribute information of a data item may include a name, a code, a data type, etc. For example, for the data item of the invoice code in the original invoice file, its name may be "Invoice Code", its code may be "invoiceCode", and its data type may be a string (which can be represented by the number 1). For another example, for the data item of the in-hospital time in the original invoice file, which includes the admission time and the discharge time separated by the delimiter "|", its name may be "In-hospital Time", its code may be "inhospitalDate", and its data type may be a delimiter (which can be represented by the number 3).

[0066] The parser information of a data item may include a parser type and the parsing factor corresponding to this type. In the embodiments, there may be three types of parser types, namely the ordinary type, the list type, and the delimiter type. The parsing factor of the ordinary type is empty, and this type of parser is used to parse the basic invoice information without delimiters (such as the invoice code). The parsing factor of the list type includes the total number of rows and the total number of columns, and this type of parser is used to parse the invoice details information (such as the expense details). The parsing factor of the delimiter type includes the delimiter used and the delimiter details, and this type of parser is used to parse the basic invoice information containing delimiters (such as the in-hospital time).

[0067] After the user receives the attribute editing interface, the user inputs the configuration information for the parsing area in the attribute editing interface, and then assembles the configuration information of the parsing area to generate a corresponding invoice parsing template. Then, the invoice parsing template can be tested to verify whether the invoice parsing template can correctly parse the invoice file.

[0068] In an optional embodiment, the original invoice file is usually a PDF file. The PDFBox tool can be used to convert the original invoice file into a picture file, and then perform visual configuration on the picture file. Among them, the PDFBox tool is a Java tool for processing PDF documents, and the functions it provides include: extracting text, document merging / splitting, form filling, PDF printing, PDF conversion, etc. This processing realizes adaptive template configuration, so that during subsequent parsing, picture parsing is performed on the user interface, and at the underlying layer, data reading is realized through the position conversion between the invoice parsing file and the invoice file to be parsed.

[0069] Step S202: Establish an association relationship between the invoice parsing template and the target object data. After the invoice parsing template is configured, an association is established between it and the invoicing party. An invoicing party can issue multiple types of invoices. For example, if the invoicing party is a hospital, the invoices it issues can be in-hospital invoices, general outpatient invoices, outpatient invoices before and after hospitalization, overseas medical treatment invoices, etc. In order to distinguish each invoicing party and various invoice types of the same invoicing party, the target object data can be the invoicing party identifier and the invoice type.

[0070] It is understandable that if an invoicing party only issues one type of bill, the target object data may only include the invoicing party identifier, which is used to distinguish different invoicing parties.

[0071] Step S203: When receiving a bill file to be parsed, query for a bill parsing template that matches the bill file to be parsed according to the target object data of the bill file to be parsed. In the embodiment, obtain the invoicing party identifier and bill type of the bill file to be parsed, and then use the invoicing party identifier and bill type as query conditions to query for the corresponding bill parsing template, which matches the bill file to be parsed.

[0072] Step S204: Obtain the configuration information of the bill parsing template, and create a main parsing instance and a detailed parsing instance according to the parser information in the configuration information. Obtain the configuration information of the bill parsing template, which includes the configuration information of the main bill area (which can be called the basic configuration) and the configuration information of the detailed area (which can be called the detailed configuration), and the configuration information of both the main bill area and the detailed area includes the location information of the parsing area, as well as the attribute information and parser information of the data items corresponding to the parsing area.

[0073] As described above, the parser information includes the parser type and the parsing factor corresponding to this type. Since the main bill area is composed of the basic bill information and the detailed area is composed of the bill detailed information, it can be known that the parser types of the main bill area include the ordinary type and the delimiter type, and the parser type of the detailed area includes the list type, which are different. Therefore, when creating a parser instance, it is necessary to divide the configuration information into the basic configuration and the detailed configuration according to the parser type of the parser information; then, according to the basic configuration and the detailed configuration, create the corresponding main parsing instance and detailed parsing instance respectively, and the main parsing instance and the detailed parsing instance constitute the parser instance.

[0074] That is, when the parser type corresponding to a certain parsing area is the ordinary type or the delimiter type, the configuration information of this parsing area is divided into the basic configuration; when the parser type corresponding to a certain parsing area is the list type, the configuration information of this parsing area is divided into the detailed configuration. Furthermore, use the createInstance command to create a main parsing instance for the basic configuration; use the createInstance command to create a detailed parsing instance for the detailed configuration.

[0075] Step S205: Determine whether each parsing area of the bill parsing template is located in the main bill area or the detail area, so as to use the corresponding parsing instance to process the configuration of each parsing area into a set of data nodes. The parsing area located in the main bill area corresponds to one data item, and the parsing area located in the detail area corresponds to multiple data items. Each data item is abstracted as a data node, and a node identifier is created for the data node. In the embodiment, the data node can be identified by DataNode, and the specific field descriptions are shown in Table 1.

[0076] Table 1

[0077]

[0078] Among the above fields, startX and startY can be combined as (startX, startY), indicating the proportion of the starting position. Assuming that the parsing area is a rectangle and is located in the main bill area, that is, corresponding to one data item, the coordinates of the two vertices on its diagonal are: (x, y) and (x 1 , y 1 ), and x 1 > x, y 1 > y, the first total width of the bill parsing template is W 1 , and the first total height is H 1 , then startX, startY, width, and height can be expressed by the following formulas respectively.

[0079]

[0080]

[0081] In the formula, x represents the starting abscissa of the parsing area, y represents the starting ordinate of the parsing area, x 1 represents the ending abscissa of the parsing area, y 1 represents the ending ordinate of the parsing area, (x 1 -x) represents the width of the parsing area, and (y 1 -y) represents the height of the parsing area.

[0082] For the specific implementation of this step, see the description about Figure 3 . After this processing, only the text field in DataNode is the item to be filled, and other fields have been obtained and can be filled into the corresponding fields of DataNode.

[0083] Step S206: Select a data node from the set of data nodes as the current data node. Select a data node from the set of data nodes without repetition as the current data node.

[0084] Step S207: Index the node information of the current data node from the data node set according to the node identifier. The node information is the content of each field of the data node.

[0085] Step S208: Calculate the second position information of the same data item in the bill file to be parsed according to the node information. In the embodiment, according to the start position ratio, data width ratio, and data height ratio of the data item recorded in the node information in the bill parsing template, as well as the second total width and second total height of the bill file to be parsed, calculate the second position information of the same data item in the bill file to be parsed. The same data item here refers to the data item in the bill file to be parsed that is the same as the data item in the bill parsing template. For example, the data item that is the same as the bill code data item in the bill parsing template is the bill code of the bill file to be parsed.

[0086] When calculating the second position information of the same data item in the bill file to be parsed, the second position information of the data item in the bill file to be parsed can be deduced based on Formula 1 and Formula 2. For example, first, based on Formula 1, multiply the start position ratio by the second total width and the second total height respectively to obtain a vertex coordinate of the data item; then add the width and height of the data item to the abscissa and ordinate of the vertex coordinate obtained in the previous step respectively to obtain another vertex coordinate of the data item. These two vertex coordinates constitute the second position information of the data item in the bill file to be parsed.

[0087] Step S209: Read the data information recorded at the second position information, and assign the data information to the node information of the current data node. Use a data reading tool, such as the PDFBox tool, to read the data information recorded at the second position information, and assign the data information to the text field of the current data node.

[0088] In the embodiment, if the parsing area is located in the main bill area and the parser type is the ordinary type, directly read the data information recorded at the second position information. If the parsing area is located in the main bill area and the parser type is the delimiter type, read the data information before and after the set delimiter at the second position information respectively. If the parsing area is located in the list area, directly read the data information recorded at the second position information.

[0089] In addition, for the delimiter type, the data before and after the delimiter can also be assigned to the specified fields of the delimiter details. For example, for the data item of hospitalization time, including the admission time and discharge time separated by the delimiter "|", the admission time and discharge time can be obtained through the delimiter "|", and the admission time can be assigned to the hospitalization date field of the delimiter details, and the discharge time can be assigned to the discharge date field of the delimiter details. This processing can split the data separated by the delimiter to ensure the correct reading of the data.

[0090] Step S210: Determine whether the current data node is the last data node in the data node set. If so, end this process; if not, execute step S206. Process in a loop to obtain the final data parsing result.

[0091] In a preferred embodiment, the data parsing result can be assembled into structured data. Herein, the structured data is row data, stored in a database, and can be logically expressed and implemented using a two-dimensional table structure. Taking the electronic invoice issued by a hospital as an example, the electronic invoice can be parsed into three structured data tables, namely the basic table of the electronic invoice, the secondary classification table of the electronic invoice, and the expense details table of the electronic invoice. Among them, the basic table correspondingly stores the basic information of the bill, and the secondary classification table and the expense details table store the detailed information of the bill.

[0092] In another embodiment, to avoid the problem that due to the line break of the data content of the same data item, the data content is read into two lines, and the font covering problem (see the data item "medical institution type" in Figure 4 ), when drawing a border for the data item with font covering in the original bill file, the border selection area can be enlarged, and then the data can be read from this area to prevent the reading error caused by line break of the content and font occlusion.

[0093] In this embodiment, by setting the position information of the parsing area, the position information can correspond to the data items in the bill parsing template, and then the data information of the same data item in the bill file to be parsed can be read through the position information, which can solve the problems of recognition failure and inaccurate failure caused by non-standard data, and improve the anti-interference ability; at the same time, it can solve the reading errors caused by line break of the content, font covering, and inclusion of delimiters, and improve the parsing accuracy.

[0094] In addition, in this embodiment, a bill parsing template is established in a visual manner, and the bill parsing template is associated with the invoicing party. While ensuring generality, personalized configuration is realized, and the flexibility is good. At the same time, for the newly connected invoicing party, a personalized bill parsing template can be quickly generated according to the bill sample file of the invoicing party, and quick online access can be realized. That is, by comparing the bill sample file with the original bill file, the data items with differences are obtained, and subsequent configuration of the data items with differences can be performed. In addition, by parsing the bill files of different invoicing parties, the structured data of the bill files with a unified standard is output, which is convenient for business applications.

[0095] Figure 3 This is the main process schematic diagram of processing the configuration of each parsing area into a data node set in the embodiment of the present invention. As Figure 3 shown, the main process (i.e., step S205) of processing the configuration of each parsing area into a data node set in the embodiment of the present invention includes the following steps:

[0096] Step S301: Determine whether the current parsing area of the bill parsing template is in the main bill area or the detail area. If the current parsing area is in the main bill area, execute Step S302; if the current parsing area is in the detail area, execute Step S304. The current parsing area is a non-repeatedly selected parsing area from all the parsing areas of the bill parsing template.

[0097] Step S302: Calculate the starting position ratio, data width ratio, and data height ratio of the corresponding data item in the bill parsing template based on the vertex coordinates of the current parsing area, the first total width, and the first total height of the bill parsing template. The specific calculation process is shown in Formulas 1 and 2.

[0098] Step S303: Abstract the data item corresponding to the current parsing area as a data node, create a node identifier for this data node, assign the node identifiers of the starting position ratio, data width ratio, and data height ratio to the corresponding fields of the data node, add the assigned data node to the main bill node set, and execute Step S307. The main bill node set can be represented by mainNodeList.

[0099] Step S304: Calculate the width and height of the current parsing area, and calculate the width and height of each data item according to the total number of rows and columns of the parser information. Divide the width of the current parsing area by the total number of columns to obtain the width of each data item. Divide the height of the current parsing area by the total number of rows to obtain the height of each data item.

[0100] Step S305: Calculate the starting position ratio, data width ratio, and data height ratio of each data item in the bill parsing template based on the vertex coordinates of the current parsing area, the width and height of each data item, the first total width, and the first total height of the bill parsing template. When calculating the starting position ratio of each data item in the bill parsing template in this step, first calculate the starting position (including the starting abscissa and starting ordinate) of each data item according to the vertex coordinates of the current parsing area, the width and height of each data item; then divide the starting abscissa of each data item by the first total width, and divide the starting ordinate of each data item by the first total height to obtain the starting position ratio of each data item in the bill parsing template.

[0101] In addition, divide the width of each data item by the first total height to obtain the data width ratio of each data item in the bill parsing template. Divide the height of each data item by the first total height to obtain the data height ratio of each data item in the bill parsing template.

[0102] In an optional embodiment, the number of data items in the current parsing area (i.e., the product of the total number of rows and the total number of columns) can also be calculated. After calculating the proportion of the starting position of each data item in the bill parsing template each time, a data item number decreasing operation is performed to ensure that the proportion of the starting position of all data items in the bill parsing template can be calculated.

[0103] Step S306: Abstract each data item in the current parsing area into a data node respectively, create a node identifier for each data node, assign the node identifiers of the starting position proportion, data width proportion, and data height proportion to the corresponding fields of each data node, and add each data node after assignment to the clear detail node set. The clear detail node set can be represented by itemNodeList.

[0104] Step S307: Repeat Step S301 - Step S306 until the last parsing area of the bill parsing template, and use the main bill node set and the clear detail node set as the final data node set.

[0105] In this embodiment, by dividing the bill parsing template into a main bill area and a detail area, and based on the position of the parsing area in the bill parsing template, different methods are used to calculate the proportion of the starting position, data width proportion, and data height proportion of the data item in the bill parsing template. Then, according to the calculation result, the position information of the same data item in the bill file to be parsed is determined, further ensuring the accuracy of data reading and improving the parsing accuracy rate. At the same time, abstracting the data item into a data node facilitates the subsequent generation of structured data.

[0106] Next, taking the electronic bill of medical charges as an example, the parsing method of the bill file in the embodiment of the present invention will be further described.

[0107] After receiving the bill file to be parsed, obtain the issuer identifier and bill type of the bill file to be parsed to query the bill parsing template of the same bill type of the issuer. Then, according to the configuration information of the bill parsing template, create a parser instance to use the parser instance to convert the position information of the parsing area in the bill parsing template into the position information of the same data item in the bill file to be parsed. Then read the data information recorded at the converted position information (see Figure 4 ), and perform structured processing to obtain structured data (see Figure 5 ).

[0108] Such as Figure 4 and Figure 5For the data item "medical institution", there are problems of line breaks in the data content and font overlay. To avoid reading its data content into two lines and font overlay, when drawing the border, the border selection area is enlarged to ensure that the data content of "medical institution" is read into one line and font overlay is avoided. For the data item "length of stay", there is a separator. Through the parsing method of this embodiment, its data content is divided into two items: admission date and discharge date.

[0109] The parsing method of this embodiment can be used for the claim settlement and reimbursement business of the medical bill reimbursement management platform. That is, claim settlement calculations can be performed based on the above structured data, and then claim settlement and reimbursement can be carried out to improve the reimbursement efficiency and accuracy.

[0110] Figure 6 It is a schematic diagram of the main modules of the parsing device for a bill file according to an embodiment of the present invention. As Figure 6 shown, the parsing device 600 for a bill file according to an embodiment of the present invention mainly includes:

[0111] A template query module 601, configured to receive a bill file to be parsed, and query a bill parsing template that matches the bill file to be parsed according to the target object data of the bill file to be parsed. The bill parsing templates for different invoicing parties are pre-generated according to the original bill files, and an association relationship is established between the bill parsing templates and the target object data, and the target object data may be an invoicing party identifier.

[0112] After receiving the bill file to be parsed, the target object data of the bill file to be parsed can be obtained, and then the corresponding bill parsing template is queried using the target object data as a retrieval condition. The queried bill parsing template is the bill parsing template that matches the bill file to be parsed.

[0113] An instance creation module 602, configured to obtain the configuration information of the bill parsing template, and create a corresponding parser instance according to the parser information in the configuration information. The configuration information refers to the relevant information configured for each parsing area of the bill parsing template, and may include the first position information and parser information of the parsing area. The parsing area corresponds to the data item of the bill parsing template, and the parser information refers to the information configured for this parsing area for subsequent parsing.

[0114] After obtaining the configuration information of the bill parsing template, the parser information is extracted from the configuration information, and then the createInstance command is used to create a parser instance for subsequent bill parsing.

[0115] The file parsing module 603 is used to use the parser instance to convert the first position information into the second position information of the same data item in the bill file to be parsed, read the data information recorded at the second position information, and complete the parsing. The first position information may be the vertex coordinates of the parsing area. Since each data item in the bill file to be parsed corresponds to each data item in the bill parsing template, and each data item in the bill parsing template corresponds to the parsing area with the first position information, the first position information can be converted to obtain the second position information of the same data item in the bill file to be parsed.

[0116] After obtaining the second position information of a data item in the bill file to be parsed, call the existing data reading tool to read the data information recorded at the second position information. In the above manner, obtain the second position information of all data items in the bill file to be parsed and read the data information recorded at the second position information, and the final parsing result can be obtained.

[0117] In addition, the bill file parsing device 600 according to an embodiment of the present invention may further include: a set building module, a node assignment module, a template building module, and a template association module ( Figure 6 not shown in the figure). Among them, the set building module is used to abstract the data item into a data node and create a node identifier for the data node; write the node identifier, the starting position ratio, the data width ratio, and the data height ratio of the corresponding data item as the node information of the data node into the data node set. The node assignment module is used to assign the data information to the data node.

[0118] The template building module is used to receive the original bill file. When detecting an editing operation on the original bill file, use the operation area of the editing operation as the parsing area, and return an attribute editing interface for configuring the parsing area; receive the configuration information input by the user in the attribute editing interface, assemble the configuration information of the parsing area, and generate a corresponding bill parsing template. The template association module is used to establish an association relationship between the bill parsing template and the target object data; where the target object data includes the invoicing party identifier.

[0119] It can be seen from the above description that a bill parsing template is pre-constructed for the invoicing party. When it is necessary to parse the bill file to be parsed, by obtaining the bill parsing template matching the bill file to be parsed, and then converting the positions of the corresponding parsing areas of each data item in the bill parsing template into the positions of the same data items in the bill file to be parsed, so that the data information of the bill file to be parsed can be read based on this position to complete the bill parsing, and the versatility is good.

[0120] Figure 7An exemplary system architecture 700 of a method for parsing a bill document or an apparatus for parsing a bill document to which embodiments of the present invention can be applied is shown.

[0121] As Figure 7 shown, the system architecture 700 may include terminal devices 701, 702, 703, a network 704, and a server 705. The network 704 is used to provide a medium for communication links between the terminal devices 701, 702, 703 and the server 705. The network 704 may include various connection types, such as wired, wireless communication links, or fiber optic cables, etc.

[0122] Users may use the terminal devices 701, 702, 703 to interact with the server 705 through the network 704 to receive or send messages, etc. The terminal devices 701, 702, 703 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop portable computers, and desktop computers, etc.

[0123] The server 705 may be a server providing various services, such as a background management server for processing the bill document to be parsed sent by the user using the terminal devices 701, 702, 703. The background management server may query a matching bill parsing template, obtain its configuration information, create a parser instance, and then use the parser instance to implement position conversion, read the data information at the converted position, perform structured processing, and feedback the processing result (such as the final parsing result) to the terminal device.

[0124] It should be noted that the method for parsing a bill document provided by the embodiments of the present application is generally executed by the server 705. Correspondingly, the apparatus for parsing a bill document is generally disposed in the server 705.

[0125] It should be understood that Figure 7 the numbers of the terminal devices, the network, and the server in

[0126] are merely illustrative. According to actual needs, there may be any number of terminal devices, networks, and servers.

[0127] The electronic device of the present invention includes: one or more processors; a storage device for storing one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors implement a method for parsing a bill document according to an embodiment of the present invention.

[0128] The computer-readable medium of the present invention has a computer program stored thereon, and when the program is executed by a processor, it implements a method for parsing a bill document according to an embodiment of the present invention.

[0129] Refer to the following Figure 8 , which shows a schematic structural diagram of a computer system 800 of an electronic device suitable for implementing the embodiments of the present invention. Figure 8 The illustrated electronic device is merely an example and should not impose any limitation on the functions and scope of use of the embodiments of the present invention.

[0130] As Figure 8 shown, the computer system 800 includes a central processing unit (CPU) 801, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 802 or the program loaded from the storage section 808 into the random access memory (RAM) 803. In the RAM 803, various programs and data required for the operation of the computer system 800 are also stored. The CPU 801, ROM 802, and RAM 803 are connected to each other via a bus 804. The input / output (I / O) interface 805 is also connected to the bus 804.

[0131] The following components are connected to the I / O interface 805: an input section 806 including a keyboard, a mouse, etc.; an output section 807 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc. and a speaker, etc.; a storage section 808 including a hard disk, etc.; and a communication section 809 including a network interface card such as a LAN card, a modem, etc. The communication section 809 performs communication processing via a network such as the Internet. A drive 810 is also connected to the I / O interface 805 as needed. A removable medium 811, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 810 as needed so that a computer program read from it can be installed into the storage section 808 as needed.

[0132] Specifically, according to the embodiments disclosed in the present invention, the process described in the above main step diagram can be implemented as a computer software program. For example, the embodiments of the present disclosure include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes program codes for performing the method shown in the main step diagram. In such an embodiment, the computer program can be downloaded and installed from the network through the communication section 809, and / or installed from the removable medium 811. When the computer program is executed by the central processing unit (CPU) 801, the above functions defined in the system of the present invention are executed.

[0133] It should be noted that the computer-readable medium shown in the present invention can be a computer-readable signal medium, a computer-readable storage medium, or any combination of the two. A computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples of a computer-readable storage medium can include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, a computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In the present invention, a computer-readable signal medium can include a data signal propagated in a baseband or as part of a carrier wave, which carries computer-readable program code. Such a propagated data signal can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium can also be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on a computer-readable medium can be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical fiber, RF, etc., or any suitable combination of the above.

[0134] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of systems, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagram can represent a module, a program segment, or a part of code that contains one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than marked in the accompanying drawings. For example, two consecutive blocks shown may actually be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram or flowchart, and the combination of blocks in the block diagram or flowchart, can be implemented by a dedicated hardware-based system that performs the specified functions or operations, or by a combination of dedicated hardware and computer instructions.

[0135] The modules involved in the embodiments of the present invention can be implemented in software or in hardware. The described modules can also be provided in a processor. For example, it can be described as: a processor includes a template query module, an instance creation module, and a file parsing module. Among them, the names of these modules do not constitute a limitation to the module itself in some cases. For example, the template query module can also be described as "a module that receives a bill file to be parsed and queries a bill parsing template that matches the bill file to be parsed according to the target object data of the bill file to be parsed".

[0136] As another aspect, the present invention also provides a computer-readable medium. The computer-readable medium can be included in the device described in the above embodiments; it can also exist separately without being assembled into the device. The above computer-readable medium carries one or more programs. When the one or more programs are executed by the device, the device includes: receiving a bill file to be parsed, querying a bill parsing template that matches the bill file to be parsed according to the target object data of the bill file to be parsed; obtaining configuration information of the bill parsing template, and creating a corresponding parser instance according to the parser information in the configuration information; where the configuration information includes first position information of a parsing area of the bill parsing template and the parser information, and the parsing area corresponds to data items of the bill parsing template; using the parser instance to convert the first position information into second position information of the same data item in the bill file to be parsed, and reading data information recorded at the second position information to complete parsing.

[0137] According to the technical solution of the embodiments of the present invention, a bill parsing template is pre-constructed for the invoicing party. When it is necessary to parse a bill file to be parsed, by obtaining a bill parsing template that matches the bill file to be parsed, and then converting the positions of the data items corresponding to the parsing areas in the bill parsing template into the positions of the same data items in the bill file to be parsed, it is possible to read the data information of the bill file to be parsed based on this position and complete the bill parsing, which has good versatility.

[0138] The above product can execute the method provided by the embodiments of the present invention, and has corresponding functional modules and beneficial effects for executing the method. For technical details not described in detail in this embodiment, reference can be made to the method provided by the embodiments of the present invention.

[0139] The above specific embodiments do not constitute a limitation to the protection scope of the present invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can occur depending on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for parsing a bill document, characterized in that, it includes: Receiving the bill document to be parsed, and querying a bill parsing template that matches the bill document to be parsed according to the target object data of the bill document to be parsed; Obtaining the configuration information of the bill parsing template, and creating a corresponding parser instance according to the parser information in the configuration information; wherein, the configuration information includes the first position information of the parsing area of the bill parsing template and the parser information, and the parsing area corresponds to the data item of the bill parsing template; the first position information includes the vertex coordinates of the parsing area; Using the parser instance to convert the first position information into the second position information of the same data item in the bill document to be parsed, including: calculating the starting position ratio, data width ratio and data height ratio of the corresponding data item in the bill parsing template according to the vertex coordinates of the parsing area, the first total width and the first total height of the bill parsing template; calculating the second position information of the same data item in the bill document to be parsed according to the starting position ratio, data width ratio and data height ratio of the data item in the bill parsing template, and the second total width and the second total height of the bill document to be parsed; Reading the data information recorded at the second position information to complete the parsing.

2. The method according to claim 1, characterized in that, the bill parsing template includes a main ticket area composed of bill basic information and a detail area composed of bill detail information, the parsing area located in the main ticket area corresponds to one of the data items, and the parsing area located in the detail area corresponds to multiple data items; The calculation of the starting position ratio, data width ratio and data height ratio of the corresponding data item in the bill parsing template includes: In the case where the parsing area is located in the main ticket area, dividing the starting abscissa and the starting ordinate of the parsing area by the first total width and the first total height respectively to obtain the starting position ratio of the corresponding data item in the bill parsing template; and Calculating the width and height of the parsing area, and dividing the width and height of the parsing area by the first total width and the first total height respectively to obtain the data width ratio and the data height ratio of the corresponding data item in the bill parsing template; In the case where the parsing area is located in the detail area, calculating the width and height of the parsing area, and calculating the width and height of each data item according to the total number of rows and the total number of columns of the parser information; and Calculating the starting position ratio, data width ratio and data height ratio of each data item in the bill parsing template according to the starting abscissa, the starting ordinate of the parsing area and the width and height of each data item.

3. The method according to claim 1, characterized in that, the bill parsing template includes a main ticket area composed of bill basic information and a detail area composed of bill detail information; the parser information includes the parser type, and the parser type of the main ticket area is different from the parser type of the detail area; Creating a corresponding parser instance according to the parser information in the configuration information includes: Dividing the configuration information into basic configuration and detailed configuration according to the parser type in the parser information; Creating corresponding main parsing instances and detailed parsing instances according to the basic configuration and the detailed configuration, where the main parsing instance and the detailed parsing instance constitute a parser instance; Using the parser instance includes: when the parsing area is in the main ticket area, using the main parsing instance; and When the parsing area is in the detailed area, using the detailed parsing instance.

4. The method according to claim 3, wherein, The parser types in the main ticket area include ordinary type and delimiter type; Reading the data information recorded at the second position information includes: When the parsing area is in the main ticket area and the parser type is ordinary type, directly reading the data information recorded at the second position information; When the parsing area is in the main ticket area and the parser type is delimiter type, respectively reading the data information before and after the set delimiter at the second position information.

5. The method according to claim 2, wherein, The method further includes: Abstracting the data item as a data node and creating a node identifier for the data node; Writing the node identifier, the start position ratio, data width ratio, and data height ratio of the corresponding data item as the node information of the data node into the data node set; Calculating the second position information of the same data item in the bill file to be parsed includes: Repeatedly executing the following steps until all data nodes are processed: indexing the node information of the corresponding data node from the data node set according to the node identifier to calculate the second position information of the same data item in the bill file to be parsed; After the step of reading the data information recorded at the second position information, the method further includes: assigning the data information to the data node.

6. The method according to any one of claims 1 to 5, wherein, The method further includes: Receiving an original bill file, and when detecting an editing operation on the original bill file, using the operation area of the editing operation as the parsing area and returning an attribute editing interface for configuring the parsing area; Receiving the configuration information input by the user in the attribute editing interface, assembling the configuration information of the parsing area, and generating a corresponding bill parsing template; Establishing an association relationship between the bill parsing template and the target object data; wherein, the target object data includes the invoicing party identifier.

7. A parsing device for a bill file, wherein, includes: A template query module, configured to receive a bill file to be parsed and query a bill parsing template that matches the bill file to be parsed according to the target object data of the bill file to be parsed; An instance creation module, configured to obtain configuration information of the bill parsing template, and create a corresponding parser instance according to the parser information in the configuration information; wherein, the configuration information includes first position information of a parsing area of the bill parsing template and the parser information, and the parsing area corresponds to data items of the bill parsing template; the first position information includes vertex coordinates of the parsing area. A file parsing module, configured to use the parser instance to convert the first position information into second position information of the same data item in the bill file to be parsed, including: calculating a starting position ratio, a data width ratio, and a data height ratio of the corresponding data item in the bill parsing template according to the vertex coordinates of the parsing area, and the first total width and the first total height of the bill parsing template; calculating the second position information of the same data item in the bill file to be parsed according to the starting position ratio, the data width ratio, and the data height ratio of the data item in the bill parsing template, and the second total width and the second total height of the bill file to be parsed; reading data information recorded at the second position information to complete the parsing.

8. An electronic device characterized in that it includes one or more processors; a storage device for storing one or more programs which, when executed by the one or more processors, cause the one or more processors to implement the method according to any one of claims 1-6.

9. A computer-readable medium having a computer program stored thereon characterized in that the program, when executed by a processor, implements the method according to any one of claims 1-6.

Citation Information

Patent Citations

  • Bill identification method and system

    CN110457973A