CN114357986A - Transaction data extraction method, equipment terminal and storage medium - Google Patents

Transaction data extraction method, equipment terminal and storage medium Download PDF

Info

Publication number
CN114357986A
CN114357986A CN202111482156.4A CN202111482156A CN114357986A CN 114357986 A CN114357986 A CN 114357986A CN 202111482156 A CN202111482156 A CN 202111482156A CN 114357986 A CN114357986 A CN 114357986A
Authority
CN
China
Prior art keywords
area
transaction data
image
text information
transaction
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111482156.4A
Other languages
Chinese (zh)
Inventor
吴志超
黄明星
李银锋
董婉
刘海伦
王月宝
沈鹏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Absolute Health Ltd
Original Assignee
Beijing Absolute Health Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Absolute Health Ltd filed Critical Beijing Absolute Health Ltd
Priority to CN202111482156.4A priority Critical patent/CN114357986A/en
Publication of CN114357986A publication Critical patent/CN114357986A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Character Input (AREA)

Abstract

The embodiment of the application provides a transaction data extraction method, a device terminal and a storage medium, wherein in the transaction data extraction method, after a transaction data image is obtained, the transaction data image is segmented based on image characteristics and position characteristics of content in the transaction data image to obtain corresponding segmented images, each segmented image is subjected to character recognition to obtain text information corresponding to each segmented image, transaction key fields in the corresponding segmented images and specific text information corresponding to the transaction key fields are extracted from the text information, so that key fields contained in corresponding text information in each segmented image can be directly extracted after image segmentation is carried out on a bill of any layout, the integrity of information extraction is improved, and user experience is improved.

Description

Transaction data extraction method, equipment terminal and storage medium
[ technical field ] A method for producing a semiconductor device
The embodiment of the application relates to the technical field of intelligent terminals, in particular to a transaction data extraction method, a device terminal and a storage medium.
[ background of the invention ]
In the field of insurance claim settlement, insurance companies can receive a large amount of claim settlement materials, and carry out claim settlement on users after inputting and examining various materials. The important thing is that the user information and the item details in the medical bill are entered and audited, but the insurance company usually adopts manual entry, so that a large amount of manpower is needed, the labor cost is extremely high, the entry is time-consuming, the efficiency is low, the situations of missing entry, incomplete information and the like are easy to occur, and the final claim settlement result is influenced.
In the prior art, in order to solve the problem of low efficiency of manual entry, after OCR (Optical Character Recognition) is performed on a bill, intelligent matching transcoding and verification are performed on a field Recognition result of each field by combining a medical knowledge base and a business logic rule, and finally a transcoding result is output as required.
[ summary of the invention ]
The embodiment of the application provides a transaction data extraction method, a device terminal and a storage medium, so that bills of any layout can be processed in the bill information extraction process, extraction of key fields can be carried out without the support of an additional knowledge base, the integrity of information extraction is improved, and the user experience is improved.
In a first aspect, an embodiment of the present application provides a transaction data extraction method, which is applied to an electronic device terminal, and the method includes: acquiring a transaction data image, and segmenting the transaction data image based on image characteristics and position characteristics of contents in the transaction data image to obtain a corresponding segmentation image; respectively carrying out character recognition on each segmented image to obtain text information corresponding to each segmented image; and extracting the transaction key field in the corresponding segmented image and the specific text information corresponding to the transaction key field from the text information.
In the transaction data extraction method, after a transaction data image is obtained, the transaction data image is segmented based on image features and position features of content in the transaction data image to obtain corresponding segmented images, character recognition is performed on each segmented image respectively to obtain text information corresponding to each segmented image, and a transaction key field in the corresponding segmented image and specific text information corresponding to the transaction key field are extracted from the text information.
In one embodiment, the segmenting the transaction data image based on the image feature and the position feature of the content in the transaction data image includes: identifying a transaction data header area of the transaction data image according to area characteristics of a pre-stored transaction data header area; and identifying a row and column arrangement area in the transaction data image, identifying the row and column arrangement area as a transaction data detail area, and determining the rest image areas except the header area based on the relative position relation with the transaction data detail area.
In one embodiment, the determining the remaining image areas except the header area based on the relative position relationship with the transaction data detail area includes: determining an image area between the transaction data title area and the transaction data detail area as a transaction data identification area, wherein the transaction data identification area is an area representing unique identification information of the transaction data; and determining an image area between the transaction data detail area and the bottom layer blank area of the transaction data image as a transaction data aggregation area.
In one embodiment, the electronic device terminal is preset with a data set storing the transaction key field, where the data set includes a first key field, the first key field includes a key field representing the detailed area of the transaction data, and the extracting, from the text information, the transaction key field in the corresponding segmented image and the specific text information corresponding to the transaction key field includes: obtaining first text information in a preset range area where the vertex coordinates of the transaction data detail area are located, and when the first text information contains the first key field, determining that the first text information is a title line of the transaction data detail area; extracting second text information except the title line in the text information of the transaction data detail area, establishing a first corresponding relation between the title line and the second text information, and establishing a corresponding relation between the first corresponding relation and the transaction data detail area.
In one embodiment, the extracting, from the text information, a transaction key field in a corresponding segmented image and specific text information corresponding to the transaction key field further includes: and when the first text information does not contain the first key field, taking a secondary vertex coordinate adjacent to the vertex coordinate as a current vertex coordinate, and executing the step of obtaining the first text information in a preset range area where the vertex coordinate of the transaction data detail area is located.
In one embodiment, the data set includes key fields respectively representing the title region of the transaction data, the identification region of the transaction data, and the total region of the transaction data, and the extracting of the transaction key field in the corresponding segmented image and the specific text information corresponding to the transaction key field from the text information further includes: and when the text information of the transaction data title area, the transaction data identification area and the transaction data aggregation area contains the corresponding key fields, respectively establishing the corresponding relation among the text information of the transaction data title area, the transaction data identification area and the transaction data aggregation area and the corresponding areas.
In a second aspect, an embodiment of the present application provides an electronic device terminal, where the terminal includes: the image segmentation module is used for acquiring a transaction data image, segmenting the transaction data image based on the image characteristics and the position characteristics of the content in the transaction data image and acquiring a corresponding segmentation image; the text information acquisition module is used for respectively carrying out character recognition on each segmented image to acquire text information corresponding to each segmented image; and the keyword extraction module is used for extracting the transaction key fields in the corresponding segmented images and the specific text information corresponding to the transaction key fields from the text information.
In one embodiment, the image segmentation module includes: the title area identification submodule is used for identifying the transaction data title area of the transaction data image according to the area characteristics of the pre-stored transaction data title area; the detail area identification submodule is used for identifying a row and column arrangement area in the transaction data image and identifying the row and column arrangement area as a transaction data detail area; and the other area identification submodule is used for determining the other image areas except the header area based on the relative position relation with the transaction data detail area.
In one embodiment, the other region identification submodule includes: the identification area identification subunit is used for determining that an image area between the transaction data title area and the transaction data detail area is a transaction data identification area, and the transaction data identification area is an area representing unique identification information of the transaction data; and the totaling area identification subunit is used for determining an image area between the transaction data detail area and the bottom layer blank area of the transaction data image as a transaction data totaling area.
In one embodiment, the electronic device terminal is preset with a data set storing the transaction key fields, the data set includes a first key field, the first key field includes a key field representing the detailed area of the transaction data, and the key word extraction module includes: the detail area header line extraction submodule is used for obtaining first text information in a preset range area where the vertex coordinates of the transaction data detail area are located, and when the first text information contains the first key field, determining that the first text information is the header line of the transaction data detail area; and the detail area corresponding relation establishing submodule is used for extracting second text information except the title line from the text information of the transaction data detail area, establishing a first corresponding relation between the title line and the second text information, and establishing a corresponding relation between the first corresponding relation and the transaction data detail area.
In one embodiment, the detail area header line extraction sub-module is further configured to, when the first text information does not include the first key field, use a secondary vertex coordinate adjacent to the vertex coordinate as a current vertex coordinate, and execute the step of obtaining the first text information in a preset range area where the vertex coordinate of the transaction data detail area is located.
In one embodiment, the data set includes key fields respectively representing a header area of the transaction data, an identifier area of the transaction data, and an aggregate area of the transaction data, and the keyword extraction module further includes: and the corresponding relation establishing submodule is used for respectively establishing the corresponding relation among the text information of the trade data title area, the trade data identification area and the trade data aggregation area and the corresponding area when the text information of the trade data title area, the trade data identification area and the trade data aggregation area contains the corresponding key fields.
In a third aspect, embodiments of the present application provide a computer-readable storage medium having stored thereon computer instructions, which when executed by a processor, implement the steps of the transaction data extraction method.
It should be understood that the second to third aspects of the embodiment of the present application are consistent with the technical solution of the first aspect of the embodiment of the present application, and beneficial effects achieved by the aspects and the corresponding possible implementation are similar, and are not described again.
[ description of the drawings ]
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed to be used in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present specification, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a schematic flow chart diagram illustrating a transaction data extraction method according to an embodiment of the present application;
FIG. 2 is a schematic representation of an image of a medical ticket provided in accordance with one embodiment of the present application;
fig. 3 is a schematic diagram of an image after each region is identified according to an embodiment of the present application;
FIG. 4 is a schematic text identification diagram of an identification area according to an embodiment of the present application;
FIG. 5 is a schematic diagram of an image of a detail area before alignment according to an embodiment of the present application;
FIG. 6 is a schematic diagram of an image of a row-column aligned detail region provided in accordance with an embodiment of the present application;
fig. 7 is a schematic structural diagram of an electronic device terminal according to an embodiment of the present application.
[ detailed description ] embodiments
For better understanding of the technical solutions in the present specification, the following detailed description of the embodiments of the present application is provided with reference to the accompanying drawings.
It should be understood that the described embodiments are only a few embodiments of the present specification, and not all embodiments. All other embodiments obtained by a person skilled in the art based on the embodiments in the present specification without any inventive step are within the scope of the present specification.
The terminology used in the embodiments of the present application is for the purpose of describing particular embodiments only and is not intended to be limiting of the specification. As used in the examples of this application and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
First, some terms referred to in the embodiments of the present application are explained so that those skilled in the art can understand that:
transaction data: the transaction identification formed by the two parties in the transaction process comprises the identity information of the two parties, the transaction content and the transaction code number of the transaction and the like, and the main carriers of the transaction identification comprise a receipt, an invoice, a settlement sheet and the like.
The transaction data extraction method provided by the embodiment of the application can be executed by an electronic device terminal, and the electronic device terminal can be terminal equipment such as a smart phone, a tablet computer, a PC (personal computer), a notebook computer and the like. In an alternative embodiment, the electronic device may have installed thereon a service program for executing the transaction data extraction method.
The transaction data takes the extraction of text information in the medical bill as an example, which illustrates the technical problem to be actually solved by the technical scheme provided by the embodiment of the application:
when extracting the text information of the medical bill, acquiring the bill type of the bill, converting the bill type into a corresponding medical knowledge base, if the bill type of the medical bill does not exist in the knowledge base, extracting the text, matching the OCR result of the medical bill with the key fields stored in the medical knowledge base, and outputting the identification result of each field as required. Therefore, the type of the medical bill in the prior art must conform to the bill type in the medical knowledge base, the medical bill with any layout cannot be processed, the matching is required to be carried out according to the standard field of the medical knowledge base when the field matching is carried out on the medical bill, and the extraction of the fields except the medical knowledge base cannot be carried out.
Fig. 1 is a schematic flow chart of a transaction data extraction method provided in the present application, where the transaction data extraction method is applicable to an electronic device terminal, and the transaction data extraction method includes the following steps:
step S101, a transaction data image is obtained, and the transaction data image is segmented based on the image characteristics and the position characteristics of the content in the transaction data image to obtain a corresponding segmentation image.
Alternatively, the transaction data image may be divided into a transaction data header area, a transaction data identification area, a transaction data detail area, and a transaction data aggregation area.
Optionally, the specific dividing manners may be the following two manners:
the first division method comprises the following steps: the segmentation of the transaction data image can be subjected to identification classification according to the image characteristics and the position characteristics of each segmented image region, the transaction data image can be classified and trained by establishing a deep learning model in advance during classification, for example, the transaction data image is divided into a title, a detail, an identification and a total, and after the deep learning model outputs the identification region of the title, the detail, the identification and the total, segmented images of the title, the detail, the identification and the total are obtained.
Optionally, before the deep learning model is trained, the transaction data sample image may be further preprocessed, for example, a certain number of different types of multiple medical bill images are screened out as sample medical bills, the multiple bill images are scaled and normalized to a predetermined format, for example, a matrix size of 512 × 512, where the transaction data sample image includes identification information, such as a target matrix, marked with corresponding image area information.
And a second division mode: specific analysis is carried out on specific characteristics of the transaction data title area, the transaction data identification area, the transaction data detail area and the transaction data total area:
optionally, the process of segmenting the transaction data header region may include:
in step S1011, the transaction data header area of the transaction data image is identified according to the area characteristics of the transaction data header area stored in advance.
Alternatively, the region characteristic of the transaction data header region may be the largest font size compared to other regions, or may be a top-level and centered position region in the transaction data image. After the transaction data header area is identified based on the area characteristics of the transaction data header area, the transaction data header area is marked, such as with an object matrix. It should be noted that the font size is determined in the image recognition field after determining the number and the dispersion condition of the pixel points in the corresponding region, and the specific font size determination method is set by a person skilled in the art according to an actual condition, which is not limited in the embodiment of the present application.
Optionally, the process of segmenting the transaction data detail area may include:
step S1012, identifying a row and column arrangement region in the transaction data image, identifying the row and column arrangement region as a transaction data detail region, and determining the remaining image regions except the header region based on the relative position relationship with the transaction data detail region.
Optionally, the row-column arrangement region may be characterized by equal longitudinal row spacing between every two fields in the region, may also be characterized by an external frame line in the region, and may also be characterized by consistent font types of each field in the region, but since one of the above features in the actual transaction data is a judgment feature and is easily confused with other non-transaction data detail regions, a combined feature may be formed based on the above features in the actual segmentation process for comprehensive judgment.
Optionally, the process of segmenting the transaction data identification region comprises:
step S1013, determining an image area between the transaction data header area and the transaction data detail area as a transaction data identification area, where the transaction data identification area is an area representing unique identification information of the transaction data.
Optionally, the transaction data identification area is generally located between the transaction data header area and the transaction data detail area, so after the transaction data header area and the transaction data detail area are determined, the transaction data identification area can be further determined.
Optionally, the process of dividing the transaction data aggregating area includes:
step S1014, determining an image area between the transaction data detail area and the bottom blank area of the transaction data image as a transaction data total area.
Optionally, after the transaction data detail area is determined, an image area between the transaction data detail area and an underlying blank area of the transaction data image may be further determined as a transaction data aggregation area.
It should be noted that step S1011 and step S1012 may be performed simultaneously or sequentially, the order between step S1011 and step S1012 may be exchanged, and the actual order setting between step S1013 and step S1014 may be set by a person skilled in the art according to actual situations, and the embodiment of the present application is not limited.
And step S102, respectively carrying out character recognition on each segmented image, and acquiring text information corresponding to each segmented image.
Optionally, the character recognition process may employ OCR technology to determine, after character recognition, text boxes in each segmented image, and position information and text information of each text box, where a text box is a square box for framing one or more quadrangles of a text character string in the segmented image, and each text box surrounds a part of the text character string in the segmented image, where the position information of a text box includes an abscissa and an ordinate of an upper left point of the text box in the segmented image, a width and a height of the text box, and the text information of a text box is content of the text character string framed by the text box.
Step S103, extracting the transaction key field in the corresponding segmented image and the specific text information corresponding to the transaction key field from the text information.
Optionally, the electronic device terminal is preset with a data set storing transaction key fields, and the data set includes transaction key fields representing a transaction data header area, a transaction data identification area, a transaction data detail area, and a transaction data aggregation area.
Optionally, the data set includes a first key field characterizing a transaction data header area, and the process of matching the first key field from the transaction data header area includes:
step S1031, obtaining first text information in a preset range area where the vertex coordinates of the transaction data detail area are located, and when the first text information contains the first key field, determining that the first text information is a title line of the transaction data detail area.
Optionally, before extracting the text information and performing the key field matching, the row-column arrangement structure of the transaction data detail area may be aligned, that is, after determining the position coordinates of the first row of text boxes in the transaction data detail area, the text boxes in each remaining row are aligned based on the position coordinates of each first row of text boxes, and the alignment manner is, for example, centered, left aligned, right aligned, and the like, so as to form a regular row-column arrangement structure, and determine the number of rows and columns of the row-column arrangement structure.
Optionally, a coordinate system is established with a blank area at the upper left corner of the transaction data detail area as an origin, the origin is used as a vertex, a preset range area at the position of the vertex is determined, where the preset range is, for example, a range of a horizontal preset length x or a vertical preset length y, that is, a range from coordinates (0, 0) to (x, 0) or a range from coordinates (0, 0) to (0, y), and if text information in the range includes a first key field representing the transaction data detail area, for example, a project name, a specification model, a unit price, a quantity, an amount, and the like, the text information is used as a header line of the transaction data detail area and is used for representing the category information of each line or each column in the transaction data detail area.
In one embodiment, when the first text message does not include the first key field, the step of obtaining the first text message in the preset range area where the vertex coordinate of the transaction data detail area is located is executed by taking the secondary vertex coordinate adjacent to the vertex coordinate as the current vertex coordinate.
Optionally, if the first key field is not matched in the preset range area of the position where the origin is located, the secondary vertex coordinate close to the vertex coordinate is used as the current vertex coordinate, and the secondary vertex coordinate is, for example, the coordinate (1, 0) or the coordinate (0, 1) close to the vertex coordinate (0, 0), and if the text information in the preset range area of the position where the secondary vertex coordinate is located includes the first key field representing the transaction data detail area, such as the item name, the specification model, the unit price, the quantity, the amount, and the like, the text information is used as the title line of the transaction data detail area.
It should be noted that the preset range area may be longer than the interval between the vertex coordinate and the secondary vertex coordinate, may also be shorter than the interval between the vertex coordinate and the secondary vertex coordinate, or may both be equal, and the specific numerical value is set by a person skilled in the art according to the actual situation, which is not limited in the present application.
Step S1032 is to extract second text information, excluding the title line, from the text information in the transaction data detail area, establish a first correspondence between the title line and the second text information, and establish a correspondence between the first correspondence and the transaction data detail area.
Optionally, after the title line is determined, the corresponding relationship between each title line text box and each remaining text box is determined according to the row-column arrangement structure, for example, the title line text box sequentially includes text information of "project name", "amount", "unit", and the text information of a certain line text box sequentially is "hospitalization", "50", "meta", and the established corresponding relationship between the title line and the line is "project name" — "hospitalization", "amount" — "50", "unit" — "meta", and after the corresponding relationship between the title line and each remaining line is established, the corresponding relationship between the corresponding relationship and the transaction data detail area is established, for example, the transaction data detail area corresponds to information of "hospitalization (project name)", "50 (amount)", and "meta (unit)".
Optionally, the data set further includes key fields respectively representing the transaction data header area, the transaction data identification area, and the transaction data aggregation area, for example, a second key field representing the transaction data header area, a third key field representing the transaction data identification area, and a fourth key field representing the transaction data aggregation area.
Wherein the data set includes a second key field characterizing a transaction data header region, and the process of matching the second key field from the transaction data header region includes:
and when the text information of the transaction data title area contains a second key field, establishing a corresponding relation between the text information and the transaction data title area.
Alternatively, the matching process of the key fields of the transaction data header area may be performed by using a Named Entity Recognition (NER) technology, where the location name and the receipt category in the transaction data header area are identified and extracted, where the receipt category is, for example, outpatient service, hospitalization, and the like, and then the text information corresponding to the transaction data header area is the location name and the receipt category in the transaction data header area.
Wherein, the data set contains a third key field for representing the transaction data identification area, and the process of matching the third key field from the transaction data identification area comprises the following steps:
and when the text information of the transaction data identification area contains a third key field, establishing a corresponding relation between the text information and the transaction data identification area.
Alternatively, the matching process of the key fields of the transaction data identification area may be performed by using a Named Entity Recognition (NER) technology, identification information in the transaction data identification area is identified and extracted, where the identification information is, for example, an invoice code, an invoice number, discharge time, admission time, number of days of hospitalization, and the like, and then the text information corresponding to the transaction data identification area is the text information in the text box to which the invoice code, the invoice number, the discharge time, the admission time, the number of days of hospitalization, and the like belong in the transaction data identification area.
Wherein, the data set includes a fourth key field for representing a transaction data aggregation area, and the process of matching the fourth key field from the transaction data aggregation area includes:
and when the text information of the transaction data aggregation area contains a fourth key field, establishing a corresponding relation between the text information and the transaction data aggregation area.
Alternatively, the matching process of the key fields of the transaction data aggregation area may be performed by using a Named Entity identification (NER) technology, and the aggregation information in the transaction data aggregation area is identified and extracted, where if the aggregation information is, for example, personal payment, amount aggregation, medical insurance pool payment, and the like, the text information corresponding to the transaction data aggregation area is the text information in the text box to which the personal payment, amount aggregation, medical insurance pool payment, and the like belong in the transaction data aggregation area.
In the transaction data extraction method, after a transaction data image is obtained, the transaction data image is segmented based on the image characteristics and the position characteristics of the content in the transaction data image to obtain corresponding segmented images, character recognition is respectively carried out on each segmented image to obtain text information corresponding to each segmented image, and a transaction key field in the corresponding segmented image and specific text information corresponding to the transaction key field are extracted from the text information, so that key fields contained in corresponding text information in each segmented image can be directly extracted after image segmentation is carried out on bills of any layout, the integrity of information extraction is improved, and the user experience is improved.
Fig. 2 is a schematic image of a medical bill provided by the present application, and the process of extracting the image includes:
step S201, performing image classification on the medical bill by using a convolutional neural network, where the convolutional neural network can perform image classification on the medical bill by using a target rectangular identifier after being trained in advance, and the image classification is mainly divided into a header area, an identifier area, a detail area and a total area, and a schematic diagram of the image after the identification is shown in fig. 3.
Step S202, respectively performing text recognition on the header area, the identification area, the detail area, and the summary area, and after the text recognition is completed, identifying an area containing text information in the area, where a text identification diagram of the identification area is shown in fig. 4.
In the present embodiment, the header area, the logo area, the detail area, and the total area are separated and character recognition is performed, or each area may be recognized based on the entire medical sheet image.
Step S203, performing keyword matching on the header area by using the NER technology, extracting the location name and the receipt type, for example, performing text extraction on "shanghai city" and "outpatient service charge" in fig. 2, that is, establishing a corresponding relationship between the header area of the medical bill and the "shanghai city" and "outpatient service charge", that is, the information of the medical bill belonging to the location name is "shanghai city" and the information of the receipt type is "outpatient service charge".
Step S204, identifying the row-column arrangement structure of the detail area according to the coordinate relationship of the detail area, removing the image information which does not conform to the row-column arrangement structure, such as the stamp belonging to the original medical bill in the middle of the detail area in FIG. 4, i.e. the lower semicircular stamp frame line and the "financial department monitoring" character sample belonging to the stamp, then performing centered alignment on the text of each row of the detail area, the image schematic diagram before alignment is shown in FIG. 5, the image schematic diagram after alignment is shown in FIG. 6, extracting the title lines in the detail area after alignment, such as the "item name", "quantity/unit", "amount (unit)" and "remark" in FIG. 2, performing character extraction, using the extracted lines as the title lines, and identifying "the item name" corresponding to "examination fee", "(examination fee)" and "(examination fee)" respectively according to the row-column arrangement structure, the "amount/unit" corresponds to information such as "1.00", "1.00" and "1.00", the "amount (element)" corresponds to "25.00", "6.00" and "19.00", the "remark" corresponds to "self-fee" and "medical insurance", that is, the "examination fee (item name) 25.00 (amount (element)) 1.00 (amount/unit)", "examination fee (item name) 6.00 (amount (element)) 1.00 (amount/unit)) self-fee (remark)" and "examination fee (item name) 19.00 (amount (element)) 1.00 (amount/unit)) medical insurance (remark)" are corresponded to in the detailed area of the medical note.
Step S205, performing keyword matching on the identified region by using the NER technology, and extracting information such as an invoice code and an invoice number therein, for example, "bill code: 11111111111 "and" Ticket number: the ' note code ' and ' note number ' fields in the 111111111 ' are used for character extraction, namely ' note code ' information of ' 11111111111 ' corresponding to the identification area and ' note number ' information of ' 111111111 ' corresponding to the identification area.
Step S206, performing keyword matching on the total area by using the NER technology, and extracting information such as personal payment, amount total, medical insurance pool payment, and the like, for example, "medical insurance pool fund payment" in fig. 2: 0.00 "," personal self-payment: 19.00 and the 'sum of money (capital) two-ten-yuan' field, namely '0.00' corresponding to the 'medical insurance aggregate fund payment' information of the aggregation area, '19.00' corresponding to the 'personal self-payment' information of the aggregation area, and 'sum of money' corresponding to the 'sum of money' information of the aggregation area.
And step S207, storing the information obtained in the steps S203-S206 into a storage space corresponding to the medical bill.
Fig. 7 is a schematic structural diagram of an electronic device terminal according to the present application, where the electronic device terminal includes:
the image segmentation module 301 is configured to obtain a transaction data image, segment the transaction data image based on image features and position features of content in the transaction data image, and obtain a corresponding segmented image.
A text information obtaining module 302, configured to perform character recognition on each segmented image, and obtain text information corresponding to each segmented image.
A keyword extracting module 303, configured to extract, from the text information, a transaction key field in the corresponding segmented image and specific text information corresponding to the transaction key field.
In one embodiment, the image segmentation module 301 includes:
and the title area identification submodule is used for identifying the transaction data title area of the transaction data image according to the area characteristics of the pre-stored transaction data title area.
And the detail area identification submodule is used for identifying a row and column arrangement area in the transaction data image and identifying the row and column arrangement area as the transaction data detail area.
And the other area identification submodule is used for determining the other image areas except the header area based on the relative position relation with the transaction data detail area.
In one embodiment, the other region identification submodule includes:
and the identification area identification subunit is used for determining that an image area between the transaction data title area and the transaction data detail area is a transaction data identification area, and the transaction data identification area is an area representing unique identification information of the transaction data.
And the totaling area identification subunit is used for determining an image area between the transaction data detail area and the bottom layer blank area of the transaction data image as a transaction data totaling area.
In one embodiment, the electronic device terminal is preset with a data set storing the transaction key field, where the data set includes a first key field, and the first key field includes a key field representing the detailed area of the transaction data, and the key word extraction module 303 includes:
and the detail area header line extraction submodule is used for obtaining first text information in a preset range area where the vertex coordinates of the transaction data detail area are located, and when the first text information contains the first key field, determining that the first text information is the header line of the transaction data detail area.
And the detail area corresponding relation establishing submodule is used for extracting second text information except the title line from the text information of the transaction data detail area, establishing a first corresponding relation between the title line and the second text information, and establishing a corresponding relation between the first corresponding relation and the transaction data detail area.
In one embodiment, the detail area header line extraction sub-module is further configured to, when the first text information does not include the first key field, use a secondary vertex coordinate adjacent to the vertex coordinate as a current vertex coordinate, and execute the step of obtaining the first text information in a preset range area where the vertex coordinate of the transaction data detail area is located.
In one embodiment, the data set includes key fields respectively representing a header area of the transaction data, an identifier area of the transaction data, and an aggregate area of the transaction data, and the keyword extraction module 303 includes:
and the corresponding relation establishing submodule is used for respectively establishing the corresponding relation among the text information of the trade data title area, the trade data identification area and the trade data aggregation area and the corresponding area when the text information of the trade data title area, the trade data identification area and the trade data aggregation area contains the corresponding key fields.
Embodiments of the present application also provide a computer-readable storage medium, on which computer instructions are stored, and the computer instructions, when executed by a processor, implement the steps of the above transaction data extraction method. The readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
The foregoing description has been directed to specific embodiments of this disclosure. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
In the description of embodiments of the invention, reference to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the specification. In this specification, the schematic representations of the terms used above are not necessarily intended to refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, various embodiments or examples and features of different embodiments or examples described in this specification can be combined and combined by one skilled in the art without contradiction.
Any process or method descriptions in flow charts or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or more executable instructions for implementing steps of a custom logic function or process, and alternate implementations are included within the scope of the preferred embodiment of the present description in which functions may be executed out of order from that shown or discussed, including substantially concurrently or in reverse order, depending on the functionality involved, as would be understood by those reasonably skilled in the art of the embodiments of the present description.
The word "if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination" or "in response to a detection", depending on the context. Similarly, the phrases "if determined" or "if detected (a stated condition or event)" may be interpreted as "when determined" or "in response to a determination" or "when detected (a stated condition or event)" or "in response to a detection (a stated condition or event)", depending on the context.
It should be noted that the terminal referred to in the embodiments of the present application may include, but is not limited to, a Personal Computer (PC), a Personal Digital Assistant (PDA), a wireless handheld device, a tablet computer (tablet computer), a mobile phone, an MP3 player, an MP4 player, and the like.
In the several embodiments provided in this specification, it should be understood that the disclosed system, apparatus, and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and there may be other divisions in actual implementation, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
In addition, functional units in the embodiments of the present description may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional unit.
The integrated unit implemented in the form of a software functional unit may be stored in a computer readable storage medium. The software functional unit is stored in a storage medium and includes several instructions to enable a computer device (which may be a personal computer, a server, or a network device) or a processor (processor) to execute some steps of the methods described in the embodiments of the present disclosure. And the aforementioned storage medium includes: various media capable of storing program codes, such as a U disk, a removable hard disk, a Read Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The above description is only a preferred embodiment of the present disclosure, and should not be taken as limiting the present disclosure, and any modifications, equivalents, improvements, etc. made within the spirit and principle of the present disclosure should be included in the scope of the present disclosure.

Claims (10)

1. A transaction data extraction method is applied to an electronic equipment terminal, and is characterized by comprising the following steps:
acquiring a transaction data image, and segmenting the transaction data image based on image characteristics and position characteristics of contents in the transaction data image to obtain a corresponding segmentation image;
respectively carrying out character recognition on each segmented image to obtain text information corresponding to each segmented image;
and extracting the transaction key field in the corresponding segmented image and the specific text information corresponding to the transaction key field from the text information.
2. The method of claim 1, wherein the segmenting the transaction data image based on image features and location features of content in the transaction data image comprises:
identifying a transaction data header area of the transaction data image according to area characteristics of a pre-stored transaction data header area;
and identifying a row and column arrangement area in the transaction data image, identifying the row and column arrangement area as a transaction data detail area, and determining the rest image areas except the header area based on the relative position relation with the transaction data detail area.
3. The method of claim 2, wherein said determining the remaining image area other than the header area based on the relative positional relationship with the transaction data detail area comprises:
determining an image area between the transaction data title area and the transaction data detail area as a transaction data identification area, wherein the transaction data identification area is an area representing unique identification information of the transaction data;
and determining an image area between the transaction data detail area and the bottom layer blank area of the transaction data image as a transaction data aggregation area.
4. The method of claim 2, wherein the electronic device terminal is preset with a data set storing the transaction key fields, the data set includes a first key field, the first key field includes a key field representing a detailed region of the transaction data, and the extracting the transaction key field in the corresponding segmented image and the specific text information corresponding to the transaction key field from the text information includes:
obtaining first text information in a preset range area where the vertex coordinates of the transaction data detail area are located, and when the first text information contains the first key field, determining that the first text information is a title line of the transaction data detail area;
extracting second text information except the title line in the text information of the transaction data detail area, establishing a first corresponding relation between the title line and the second text information, and establishing a corresponding relation between the first corresponding relation and the transaction data detail area.
5. The method of claim 4, wherein extracting the transaction key field in the corresponding segmented image and the specific text information corresponding to the transaction key field from the text information further comprises:
and when the first text information does not contain the first key field, taking a secondary vertex coordinate adjacent to the vertex coordinate as a current vertex coordinate, and executing the step of obtaining the first text information in a preset range area where the vertex coordinate of the transaction data detail area is located.
6. The method of claim 4, wherein the data set includes key fields respectively representing the transaction data header area, the transaction data identification area and the transaction data aggregation area, and the extracting the transaction key field in the corresponding segmented image and the specific text information corresponding to the transaction key field from the text information further comprises:
and when the text information of the transaction data title area, the transaction data identification area and the transaction data aggregation area contains the corresponding key fields, respectively establishing the corresponding relation among the text information of the transaction data title area, the transaction data identification area and the transaction data aggregation area and the corresponding areas.
7. An electronic device terminal, characterized in that the terminal comprises:
the image segmentation module is used for acquiring a transaction data image, segmenting the transaction data image based on the image characteristics and the position characteristics of the content in the transaction data image and acquiring a corresponding segmentation image;
the text information acquisition module is used for respectively carrying out character recognition on each segmented image to acquire text information corresponding to each segmented image;
and the keyword extraction module is used for extracting the transaction key fields in the corresponding segmented images and the specific text information corresponding to the transaction key fields from the text information.
8. The terminal of claim 7, wherein the image segmentation module comprises:
the title area identification submodule is used for identifying the transaction data title area of the transaction data image according to the area characteristics of the pre-stored transaction data title area;
the detail area identification submodule is used for identifying a row and column arrangement area in the transaction data image and identifying the row and column arrangement area as a transaction data detail area;
and the other area identification submodule is used for determining the other image areas except the header area based on the relative position relation with the transaction data detail area.
9. The terminal of claim 8, wherein the other region identifier sub-module comprises:
the identification area identification subunit is used for determining that an image area between the transaction data title area and the transaction data detail area is a transaction data identification area, and the transaction data identification area is an area representing unique identification information of the transaction data;
and the totaling area identification subunit is used for determining an image area between the transaction data detail area and the bottom layer blank area of the transaction data image as a transaction data totaling area.
10. A computer-readable storage medium having stored thereon computer instructions, which when executed by a processor, perform the steps of the method of any one of claims 1 to 6.
CN202111482156.4A 2021-12-07 2021-12-07 Transaction data extraction method, equipment terminal and storage medium Pending CN114357986A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111482156.4A CN114357986A (en) 2021-12-07 2021-12-07 Transaction data extraction method, equipment terminal and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111482156.4A CN114357986A (en) 2021-12-07 2021-12-07 Transaction data extraction method, equipment terminal and storage medium

Publications (1)

Publication Number Publication Date
CN114357986A true CN114357986A (en) 2022-04-15

Family

ID=81096873

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111482156.4A Pending CN114357986A (en) 2021-12-07 2021-12-07 Transaction data extraction method, equipment terminal and storage medium

Country Status (1)

Country Link
CN (1) CN114357986A (en)

Similar Documents

Publication Publication Date Title
CN109800761B (en) Method and terminal for creating paper document structured data based on deep learning model
CN102779140B (en) A kind of keyword acquisition methods and device
CN112464781B (en) File image key information extraction and matching method based on graphic neural network
JP2000251012A (en) Method and system for document processing
US9098765B2 (en) Systems and methods for capturing and storing image data from a negotiable instrument
CN111209827B (en) Method and system for OCR (optical character recognition) bill problem based on feature detection
CN112699775A (en) Certificate identification method, device and equipment based on deep learning and storage medium
CN110942061A (en) Character recognition method, device, equipment and computer readable medium
US9031308B2 (en) Systems and methods for recreating an image using white space and check element capture
US11341319B2 (en) Visual data mapping
CN112860905A (en) Text information extraction method, device and equipment and readable storage medium
CN112396079A (en) Number recognition model training method, number recognition method and device
CN112560855A (en) Image information extraction method and device, electronic equipment and storage medium
CN111598099A (en) Method and device for testing image text recognition performance, testing equipment and medium
CN114357986A (en) Transaction data extraction method, equipment terminal and storage medium
CN111428725A (en) Data structuring processing method and device and electronic equipment
CN111062262A (en) Invoice recognition method and invoice recognition device
CN115205884A (en) Bill information extraction method and device, equipment, medium and product thereof
CN113128496B (en) Method, device and equipment for extracting structured data from image
CN114625872A (en) Risk auditing method, system and equipment based on global pointer and storage medium
CN114330240A (en) PDF document analysis method and device, computer equipment and storage medium
CN112395450A (en) Picture character detection method and device, computer equipment and storage medium
CN113474786A (en) Electronic purchase order identification method and device and terminal equipment
US20150030241A1 (en) Method and system for data identification and extraction using pictorial representations in a source document
CN117540721B (en) Bank receipt information extraction method and system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information
CB02 Change of applicant information

Address after: 100102 201 / F, block C, 2 lizezhong 2nd Road, Chaoyang District, Beijing

Applicant after: Beijing Shuidi Technology Group Co.,Ltd.

Address before: 100102 201 / F, block C, 2 lizezhong 2nd Road, Chaoyang District, Beijing

Applicant before: Beijing Health Home Technology Co.,Ltd.