CN111291726B - Medical bill sorting method, device, equipment and medium - Google Patents

Medical bill sorting method, device, equipment and medium Download PDF

Info

Publication number
CN111291726B
CN111291726B CN202010169928.8A CN202010169928A CN111291726B CN 111291726 B CN111291726 B CN 111291726B CN 202010169928 A CN202010169928 A CN 202010169928A CN 111291726 B CN111291726 B CN 111291726B
Authority
CN
China
Prior art keywords
bill
bill image
determining
ellipse
image
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.)
Active
Application number
CN202010169928.8A
Other languages
Chinese (zh)
Other versions
CN111291726A (en
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.)
Taikang Insurance Group Co Ltd
Taikang Online Property Insurance Co Ltd
Original Assignee
Taikang Insurance Group Co Ltd
Taikang Online Property Insurance Co 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 Taikang Insurance Group Co Ltd, Taikang Online Property Insurance Co Ltd filed Critical Taikang Insurance Group Co Ltd
Priority to CN202010169928.8A priority Critical patent/CN111291726B/en
Publication of CN111291726A publication Critical patent/CN111291726A/en
Application granted granted Critical
Publication of CN111291726B publication Critical patent/CN111291726B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/40Document-oriented image-based pattern recognition
    • G06V30/41Analysis of document content
    • G06V30/412Layout analysis of documents structured with printed lines or input boxes, e.g. business forms or tables
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/255Detecting or recognising potential candidate objects based on visual cues, e.g. shapes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/10Character recognition

Abstract

The invention discloses a medical bill sorting method, a device, equipment and a medium, which are used for improving the sorting efficiency of medical bills. The method comprises the steps of identifying each ellipse and the length of the major axis and the minor axis of each ellipse in a bill image; judging whether a target ellipse with the ratio of the major axis to the minor axis within a preset ratio range exists in the bill image or not; if yes, determining a region containing a target ellipse in the bill image; inputting the region into a trained character recognition model, and determining a character recognition result of the character recognition model on the region; if the text recognition result comprises a preset keyword corresponding to the medical bill, determining that the bill image is the bill image of the medical bill, and recognizing the text at the head of the determined bill image containing the target ellipse according to the text recognition result and the preset keyword corresponding to the medical bill, thereby improving the sorting efficiency and accuracy of the medical bill.

Description

Medical bill sorting method, device, equipment and medium
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a medical bill sorting method, apparatus, device, and medium.
Background
In the insurance claim link, the clients upload a plurality of claim bill data, and the information on the medical bill is particularly important. The rapid and effective sorting of medical notes from the information of a plurality of claim notes is a key link for optical character recognition (Optical Character Recognition, OCR) of the whole notes, and the simple, rapid and effective medical note sorting method is a powerful guarantee for successful OCR recognition.
The existing medical bill sorting method still depends on manpower to distinguish by naked eyes in most scenes, and the medical bill sorting method needs to consume a great deal of manpower and has low speed. In order to increase the sorting efficiency of medical notes, the sorting can be performed based on an artificial intelligent deep learning model in the prior art, the artificial intelligent deep learning model is used for identifying the text content in the note images and classifying the note images, and the method is used for identifying all the texts in each note image, so that the notes are classified according to the identified texts, and the text identification is required for all the texts of each note, so that the sorting efficiency of the medical notes is low.
Disclosure of Invention
The embodiment of the invention provides a medical bill sorting method, a device, equipment and a medium, which are used for solving the problem that the existing medical bill sorting method is low in medical bill sorting efficiency due to waste of artificial intelligent deep learning model resources.
The embodiment of the invention provides a medical bill sorting method, which comprises the following steps:
identifying the length of the major axis and the minor axis of each ellipse in the bill image;
judging whether a target ellipse with the ratio of the major axis to the minor axis within a preset ratio range exists in the bill image;
if yes, determining an area containing the target ellipse in the bill image;
inputting the region into a trained character recognition model, and determining a character recognition result of the character recognition model on the region;
and if the text recognition result comprises a keyword corresponding to the preset medical bill, determining that the bill image is a bill image of the medical bill.
Further, the method further comprises:
and if the target ellipse with the ratio of the major axis to the minor axis within the preset ratio range does not exist in the bill image, determining that the bill image is not the bill image of the medical bill.
Further, the method further comprises:
judging whether a first target text group matched with a preset regional keyword exists in the text recognition result;
if so, determining the area to which the bill image belongs according to the matched first target text group.
Further, the determining the area containing the target ellipse in the bill image includes:
identifying the circle center position of a target ellipse in the bill image;
and determining a rectangular area taking the center position as the center position according to the center position of the target ellipse and a preset length value and a preset width value.
Further, before determining the rectangular area with the center position as the center position according to the center position of the target ellipse and the preset length value and width value, the method further includes:
identifying an included angle between a target ellipse in the bill image and a preset reference direction;
and rotating the bill image to the preset reference direction according to the included angle.
Further, the identifying the included angle between the target ellipse in the bill image and the preset reference direction includes:
identifying an included angle between the long axis direction and the horizontal direction of a target ellipse in the bill image; or (b)
And identifying an included angle between the short axis direction and the vertical direction of the target ellipse in the bill image.
Further, the method further comprises:
judging whether a second target word group matched with a preset category keyword exists in the word recognition result;
if so, determining the category to which the bill image belongs according to the matched second target text group.
Accordingly, an embodiment of the present invention provides a medical ticket sorting apparatus, the apparatus comprising:
the identification module is used for identifying the length of each ellipse and the length of the major axis and the minor axis of each ellipse in the bill image;
the judging module is used for judging whether a target ellipse with the ratio of the major axis to the minor axis in a preset ratio range exists in the bill image or not;
the determining module is used for determining the area containing the target ellipse in the bill image if the target ellipse exists in the bill image; inputting the region into a trained character recognition model, and determining a character recognition result of the character recognition model on the region; and if the text recognition result comprises a keyword corresponding to the preset medical bill, determining that the bill image is a bill image of the medical bill.
Further, the determining module is further configured to determine that the bill image is not a bill image of a medical bill if there is no target ellipse in the bill image, where a ratio of a major axis to a minor axis is within a preset ratio range.
Further, the judging module is further configured to judge whether a first target text group matched with a preset regional keyword exists in the text recognition result;
and the determining module is further used for determining the area to which the bill image belongs according to the matched first target text group if the first target text group exists.
Further, the determining module is specifically configured to identify a center position of a target ellipse in the ticket image; and determining a rectangular area taking the center position as the center position according to the center position of the target ellipse and a preset length value and a preset width value.
Further, the identification module is further used for identifying an included angle between the target ellipse in the bill image and a preset reference direction;
the apparatus further comprises:
and the rotation module is used for rotating the bill image to the preset reference direction according to the included angle.
Further, the identification module is specifically configured to identify an included angle between a major axis direction and a horizontal direction of a target ellipse in the bill image; or identifying an included angle between the short axis direction and the vertical direction of the target ellipse in the bill image.
Further, the judging module is further configured to judge whether a second target text group matched with a preset category keyword exists in the text recognition result;
and the determining module is further used for determining the category of the bill image according to the matched second target text group if the second target text group exists.
Accordingly, an embodiment of the present invention provides an electronic device, where the electronic device includes a processor and a memory, where the memory is configured to store program instructions, and where the processor is configured to implement steps of any one of the above-mentioned medical bill sorting methods when executing a computer program stored in the memory.
Accordingly, an embodiment of the present invention provides a computer readable storage medium storing a computer program which when executed by a processor performs the steps of any of the above-described medical ticket sorting methods.
The embodiment of the invention provides a medical bill sorting method, a device, equipment and a medium, wherein the method is characterized in that the lengths of each ellipse and the major axis and the minor axis of each ellipse in a bill image are identified; judging whether a target ellipse with the ratio of the major axis to the minor axis within a preset ratio range exists in the bill image; if yes, determining an area containing the target ellipse in the bill image; inputting the region into a trained character recognition model, and determining a character recognition result of the character recognition model on the region; if the text recognition result comprises a preset keyword corresponding to the medical bill, determining that the bill image is the bill image of the medical bill, determining the region containing the header text of the target ellipse by recognizing the target ellipse in the bill image, recognizing the text at the header of the bill image, and recognizing the bill image of the medical bill according to the text recognition result and the preset keyword corresponding to the medical bill, thereby improving the sorting efficiency and accuracy of the medical bill.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings that are needed in the description of the embodiments will be briefly described below, it will be apparent that the drawings in the following description are only some embodiments of the present invention, and that other drawings can be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic process diagram of a medical bill sorting method according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a bill image of a medical bill according to an embodiment of the present invention;
FIG. 3 is a process schematic diagram of another medical bill sorting method according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of a determined rectangular area provided by an embodiment of the present invention;
FIG. 5 is a schematic image of a rectangular region input to a text recognition model according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of a medical bill sorting apparatus according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention will be described in further detail below with reference to the accompanying drawings, and it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
In order to improve the efficiency of medical bill sorting, the embodiment of the invention provides a medical bill sorting method, a device, equipment and a medium.
Example 1:
fig. 1 is a schematic process diagram of a medical bill sorting method according to an embodiment of the present invention, where the process includes the following steps:
s101: the length of each ellipse and the major and minor axes of each ellipse in the ticket image is identified.
The medical bill sorting method is applied to electronic equipment such as a smart phone, a PC, a server and a tablet personal computer, various bills are converted into bill images, each bill image is input into the electronic equipment, and the electronic equipment sequentially recognizes each received bill image.
A plurality of stamps are generally included in the bill image, and the shape of the stamp is generally elliptical, and the ratio of the long and short axes of the elliptical stamp at the head of the medical bill is within a certain range, so that in order to identify the bill image of the medical bill from the bill image, it is necessary to identify the length of each ellipse and the long and short axes of each ellipse in the bill image.
Specifically, the electronic device identifies the ticket image by using an ellipse detection algorithm, identifies each ellipse included in the ticket image, and can determine the length of the major axis and the minor axis of each ellipse according to each identified ellipse.
The ellipse detection algorithm may be a kalman filter ellipse detection algorithm, or other ellipse detection algorithms, and in particular, embodiments of the present invention are not limited thereto.
S102: and judging whether a target ellipse with the ratio of the major axis to the minor axis within a preset ratio range exists in the bill image.
After the length of each ellipse and the length of the major axis and the minor axis of each ellipse in the bill image are identified, the electronic equipment can determine the ratio of the major axis to the minor axis of each ellipse, and as the ratio of the major axis to the minor axis of the elliptical stamp at the head of the bill image of the medical bill is in a certain ratio range, whether the bill image is a bill image of the medical bill can be determined by judging whether the bill image contains a target ellipse in which the ratio of the major axis to the minor axis is in the ratio range.
The ratio range is determined by counting the ratio of the major axis to the minor axis of the target ellipse at the bill image header of a large number of medical bills.
S103: if so, determining the area containing the target ellipse in the bill image.
If the target ellipse with the ratio of the major axis to the minor axis in the bill image is in the set ratio range, the bill image can be basically determined to be the bill image of the medical bill. Therefore, the characters at the head of the bill image are identified, and whether the bill image is the bill image of the medical bill can be judged more accurately.
In order to more accurately determine that the bill image is a bill image of a medical bill, it is also necessary to determine an area containing a target ellipse in the bill image, that is, an area at the head of the bill image. Specifically, the region may be a rectangular region, or may be a region of another set shape, for example, an elliptical region.
If there are two ellipses in the bill image, the ratio of the lengths of the major axis and the minor axis of the two ellipses is 1.1 and 1.5, respectively, the set ratio range is [1.45,1.55], and the ratio of 1.5 is within the ratio range [1.45,1.55], so that the region of the bill image containing the ellipse with the ratio of the lengths of the major axis and the minor axis of 1.5 is determined.
S104: and if the target ellipse with the ratio of the major axis to the minor axis within the preset ratio range does not exist in the bill image, determining that the bill image is not the bill image of the medical bill.
Since the ratio of the major axis to the minor axis of the ellipse at the header of the ticket image of the medical ticket is necessarily within the preset ratio range. Therefore, if there is no target ellipse in the bill image in which the ratio of the major axis to the minor axis is within the preset ratio range, it is determined that the bill image is not a bill image of a medical bill.
For example, if there are three ellipses in the ticket image, the ratio of the lengths of the major axis and the minor axis of the three ellipses is 1.1, 1.0, and 1.3, respectively; the ratio range is set to [1.45,1.55], and since the ratio of the lengths of the major axis and the minor axis of the three ellipses is not within the ratio range [1.45,1.55], it is determined that the ticket image is not a ticket image of a medical ticket.
S105: and inputting the region into a trained character recognition model, and determining a character recognition result of the character recognition model on the region.
In order to further ensure the accuracy of sorting the medical bill, after determining the region containing the target ellipse in the bill image, since the region containing the target ellipse in the bill image contains part of characters, whether the bill image is the bill image of the medical bill can be further judged by identifying the part of characters.
And inputting the image containing the area in the bill image into a pre-trained character recognition model, recognizing characters in the area, and determining a character recognition result of the area. The character recognition model can be training only according to medical bill images, or character recognition training according to different types of bill images; or the word recognition model can also be a word recognition model existing in the prior art.
S106: and if the text recognition result comprises a keyword corresponding to the preset medical bill, determining that the bill image is a bill image of the medical bill.
Because the header of the medical ticket includes some text unique to the medical ticket, such as identifying what type of ticket the medical ticket is on its own, such as in particular an outpatient type of ticket, a hospitalized type of ticket, etc. Therefore, the keywords can be preset according to the specific characters at the header of the medical bill, so that the keywords corresponding to the medical bill are formed.
Judging whether the text recognition result comprises keywords corresponding to the medical bill according to the text recognition result of the text recognition model on the area, and if the text recognition result comprises the keywords corresponding to the medical bill, determining that the bill image is the bill image of the medical bill.
The embodiment of the invention provides a medical bill sorting method, a device, equipment and a medium, wherein the method is characterized in that the lengths of each ellipse and the major axis and the minor axis of each ellipse in a bill image are identified; judging whether a target ellipse with the ratio of the major axis to the minor axis within a preset ratio range exists in the bill image; if yes, determining an area containing the target ellipse in the bill image; inputting the region into a trained character recognition model, and determining a character recognition result of the character recognition model on the region; if the text recognition result comprises a preset keyword corresponding to the medical bill, determining that the bill image is the bill image of the medical bill, determining the region containing the header text of the target ellipse by recognizing the target ellipse in the bill image, recognizing the text at the header of the bill image, and recognizing the bill image of the medical bill according to the text recognition result and the preset keyword corresponding to the medical bill, thereby improving the sorting efficiency and accuracy of the medical bill.
Example 2:
in order to improve accuracy of sorting medical notes, in the embodiments of the present invention, the determining an area including the target ellipse in the note image includes:
identifying the circle center position of a target ellipse in the bill image;
and determining a rectangular area taking the center position as the center position according to the center position of the target ellipse and a preset length value and a preset width value.
In order to further determine whether the bill image is a bill image of a medical bill, the determined area containing the target ellipse needs to be capable of containing all effective information for identifying the medical bill, but the area cannot be too large, otherwise, a burden is caused to a character identification model, and the efficiency of outputting an identification result is affected. Therefore, the statistical analysis can be performed in advance on the region including the elliptical seal and the characters unique to the medical bill at the header of the medical bill, and the attribute information of the region including the target ellipse can be preset according to the result of the statistical analysis. Specifically, in the embodiment of the present invention, the area including the target ellipse is set as a rectangular area, and according to the result of the statistical analysis, the length value and the width value of the rectangular area are preset, and the position of the rectangular area is set, where the center position of the rectangular area is the center position of the target ellipse.
Specifically, the length value and the width value of the rectangular area are related to the size of the bill image, so that the length value and the width value of the rectangular area can be set according to the size of the bill image, and preferably, the length value of the rectangular area is the length value of the bill image, and the width value of the rectangular area is twice the short axis length value of the target ellipse.
When the electronic equipment provided by the embodiment of the invention identifies the ellipses in the bill image through the ellipse detection algorithm, the circle center position of each ellipse in the bill image and the lengths of the major axis and the minor axis of the ellipse can be identified, and the length of the major axis and the minor axis and the information of the circle center position of each ellipse in the bill image are stored.
When determining the area, firstly determining the center position of the target ellipse in the bill image according to the length of the long axis and the short axis of the known target ellipse, taking the center position of the target ellipse as the center position of the area, and then determining the rectangular area according to the center position and the preset length value and width value.
In the embodiment of the invention, since the characters at the position of the medical bill gauge head are in a certain range, in order to more accurately comprise the characters at the position of the medical bill gauge head in the area comprising the target ellipse, the rectangular area taking the position of the center of the circle as the center position is determined by identifying the position of the center of the circle of the target ellipse in the bill image and according to the position of the center of the circle of the target ellipse and the preset length value and width value, so that the medical bill can be more effectively and more accurately sorted.
Example 3:
in order to improve accuracy of medical bill sorting, in the above embodiments, before determining the rectangular area with the center position as the center position according to the center position of the target ellipse and the preset length value and width value, the method further includes:
identifying an included angle between a target ellipse in the bill image and a preset reference direction;
and rotating the bill image to the preset reference direction according to the included angle.
When converting a bill into a bill image, the deviation of the placed position may cause the deviation of the transverse direction of the bill in the bill image obtained by conversion from the horizontal direction of the bill image, and the deviation of the longitudinal direction of the bill from the vertical direction of the bill image. In order to improve the accuracy of character recognition and thus the accuracy of medical bill sorting, before determining the rectangular area of the bill image, if there is a deviation between the transverse direction of the bill in the bill image and a reference direction, the bill image needs to be rotated to the reference direction, wherein the reference direction is preset, and the reference direction can be a horizontal direction or a vertical direction.
In order to rotate a bill image to a preset reference direction, an included angle between the target ellipse and the preset reference direction needs to be determined.
The electronic equipment rotates the bill image to the reference direction according to the included angle between the target ellipse in the bill image and the reference direction.
Preferably, the electronic device identifies an included angle between the major axis direction of the target ellipse in the bill image and the horizontal direction of the bill image according to an ellipse detection algorithm, and rotates the bill image according to the included angle, so that the bill in the bill image is positioned at the horizontal position.
Example 4:
in order to determine the deviation between the bill image and the preset reference direction, in the embodiment of the present invention, the identifying the included angle between the target ellipse in the bill image and the preset reference direction includes:
identifying an included angle between the long axis direction and the horizontal direction of a target ellipse in the bill image; or (b)
And identifying an included angle between the short axis direction and the vertical direction of the target ellipse in the bill image.
In order to rotate the bill image to the preset reference direction, an included angle between the target ellipse and the preset reference direction needs to be determined first, and the preset reference direction can be a horizontal direction or a vertical direction. Therefore, in order to determine the deviation between the bill image and the preset reference direction, in the embodiment of the invention, the included angle between the long axis direction and the horizontal direction of the target ellipse in the bill image can be identified, and the included angle between the short axis direction and the vertical direction of the target ellipse in the bill image can also be identified.
According to the determined included angle, the bill image can be rotated to the horizontal direction or the vertical direction.
Example 5:
in order to realize finer sorting of medical notes, on the basis of the embodiments, in the embodiment of the invention, the method further comprises:
judging whether a first target text group matched with a preset regional keyword exists in the text recognition result;
if so, determining the area to which the bill image belongs according to the matched first target text group.
After determining that the bill image is a medical bill image, since the text at the header of the medical bill also includes text of some specific identification areas, such as text identifying what province the medical bill is, text identifying what city and county the medical bill is, etc. Therefore, the region keywords can be preset according to the characters of the specific identification region, and the region to which the medical bill belongs can be determined by judging the region keywords included in the character recognition result.
Specifically, in order to identify the region to which the bill image belongs, the text recognition result of the region including the target ellipse in the bill image may be determined according to the text recognition model.
If the character recognition result contains a first target character group matched with the regional keyword, determining that the bill image belongs to the region represented by the first target character group according to the first target character group. For example, taking the first target character set as the Heilongjiang as an example, if the character set Heilongjiang exists in the character recognition result, determining that the bill image belongs to the bill image of the medical bill of Heilongjiang.
Since the text at the header of the medical bill also includes some specific text identifying the category of the medical bill, for example, a specific clinic bill, a hospitalized bill, and the like. Therefore, the category keywords can be preset according to the specific characters for identifying the category of the medical bill, and the category of the medical bill can be determined by judging the category keywords included in the character recognition result.
After determining the region to which the bill image belongs, in order to realize finer sorting of the bill image, determining the category to which the bill image belongs, the method further comprises:
judging whether a second target word group matched with a preset category keyword exists in the word recognition result;
if so, determining the category to which the bill image belongs according to the matched second target text group.
The keywords are preset, and may be keywords of clinic, hospitalization, etc., which is not limited in the embodiment of the present invention.
In order to determine the category to which the bill image belongs, whether a second target text group matched with the category keyword exists in the text recognition result is required to be judged, and if the second target text group matched with the category keyword exists in the text recognition result, the category to which the bill image belongs can be determined according to the matched second target text group.
Specifically, taking the second target text group as an example of hospitalization, if the text group is included in the text recognition result, determining that the bill image belongs to the bill image of the hospitalized medical bill.
The method for sorting medical bills according to the present invention is described below by using a specific embodiment, in which the electronic device is a computer, the bill image is a medical clinic fee bill in the state of the hybrid dragon river as an example, and fig. 2 is a schematic diagram of the bill image of the medical bill according to the embodiment of the present invention, and as shown in fig. 2, the bill image of the medical bill includes two ellipses.
After receiving the bill image of the medical bill through the scanner, fig. 3 is a schematic process diagram of another medical bill sorting method according to an embodiment of the present invention, where the process includes the following steps:
s301: the computer uses an ellipse detection algorithm to identify two ellipses in the bill image and to identify the lengths of the major and minor axes of the two ellipses.
S302: and determining the ratio of the major axis to the minor axis of the two ellipses, and judging whether a target ellipse with the ratio of the major axis to the minor axis within a preset ratio range exists in the two ellipses.
S303: and (3) identifying an included angle between the major axis direction of the target ellipse in the bill image and the horizontal direction of the bill image, and rotating the bill image of the medical bill according to the value of the included angle and the position of the bill in the bill image so that the bill in the bill image is positioned at the horizontal position.
S304: and identifying the center position of a target ellipse in the bill image, taking the center position as the center position of a rectangular area, taking the length value of the bill image as the length value of the rectangular area, taking the short axis value of the target ellipse as the width value of the rectangular area, and determining the rectangular area.
Fig. 4 is a schematic diagram of determining a rectangular area according to an embodiment of the present invention, and as shown in fig. 4, the rectangular area is framed with black border lines.
S305: and inputting the image of the rectangular area into a character recognition model to obtain a character recognition result.
Fig. 5 is an image schematic diagram of a rectangular area input to a character recognition model according to an embodiment of the present invention, and as shown in fig. 5, characters in the rectangular area are black dracaena medical clinic fee notes.
S306: the text recognition result comprises a keyword clinic, and the bill image is determined to be a bill image of a medical bill.
S307: the text recognition result comprises a regional keyword Heilongjiang, and the bill image is determined to be a bill image of a medical bill of Heilongjiang; the keyword outpatient service in the character recognition result belongs to the category keyword, so that the bill image is determined to be the bill image of the medical bill of the outpatient service class in the Heilongjiang province.
Example 6:
fig. 6 is a schematic structural diagram of a medical bill sorting apparatus according to an embodiment of the present invention, and on the basis of the foregoing embodiments, the embodiment of the present invention further provides a medical bill sorting apparatus, where the apparatus includes:
an identification module 601, configured to identify lengths of each ellipse and major and minor axes of each ellipse in the bill image;
a judging module 602, configured to judge whether a target ellipse in which a ratio of a major axis to a minor axis is within a preset ratio range exists in the ticket image;
a determining module 603, configured to determine an area including the target ellipse in the ticket image if the target ellipse exists in the ticket image; inputting the region into a trained character recognition model, and determining a character recognition result of the character recognition model on the region; and if the text recognition result comprises a keyword corresponding to the preset medical bill, determining that the bill image is a bill image of the medical bill.
The determining module 603 is further configured to determine that the bill image is not a bill image of a medical bill if there is no target ellipse in the bill image, where a ratio of a major axis to a minor axis is within a preset ratio range.
The judging module 602 is further configured to judge whether a first target text group matched with a preset regional keyword exists in the text recognition result;
the determining module 603 is further configured to determine, if the first target text group exists, a region to which the ticket image belongs according to the matched first target text group.
The determining module 603 is specifically configured to identify a center position of a target ellipse in the ticket image; and determining a rectangular area taking the center position as the center position according to the center position of the target ellipse and a preset length value and a preset width value.
The identifying module 601 is further configured to identify an included angle between a target ellipse in the ticket image and a preset reference direction;
the apparatus further comprises:
and the rotating module 604 is configured to rotate the bill image to the preset reference direction according to the included angle.
The identifying module 601 is specifically configured to identify an included angle between a major axis direction and a horizontal direction of a target ellipse in the ticket image; or identifying an included angle between the short axis direction and the vertical direction of the target ellipse in the bill image.
The judging module 602 is further configured to judge whether a second target word group matched with a preset category keyword exists in the word recognition result;
the determining module 603 is further configured to determine, if the second target text group exists, a category to which the ticket image belongs according to the matched second target text group.
Example 7:
fig. 7 is a schematic structural diagram of an electronic device according to an embodiment of the present invention, and on the basis of the foregoing embodiments, the embodiment of the present invention further provides an electronic device, which includes a processor 701 and a memory 702, where the processor 701 is configured to implement the steps of the medical bill sorting method when executing a computer program stored in the memory 702.
Alternatively, the processor 701 may be a CPU (Central processing Unit), ASIC (Application Specific Integrated Circuit ), FPGA (Field-Programmable Gate Array, field programmable Gate array), or CPLD (Complex Programmable Logic Device ).
A processor 701 for executing the following steps according to a computer program stored in a memory 702:
identifying the length of the major axis and the minor axis of each ellipse in the bill image;
judging whether a target ellipse with the ratio of the major axis to the minor axis within a preset ratio range exists in the bill image;
if yes, determining an area containing the target ellipse in the bill image;
inputting the region into a trained character recognition model, and determining a character recognition result of the character recognition model on the region;
and if the text recognition result comprises a keyword corresponding to the preset medical bill, determining that the bill image is a bill image of the medical bill.
And if the target ellipse with the ratio of the major axis to the minor axis within the preset ratio range does not exist in the bill image, determining that the bill image is not the bill image of the medical bill.
Judging whether a first target text group matched with a preset regional keyword exists in the text recognition result;
if so, determining the area to which the bill image belongs according to the matched first target text group.
The determining the area containing the target ellipse in the bill image comprises the following steps:
identifying the circle center position of a target ellipse in the bill image;
and determining a rectangular area taking the center position as the center position according to the center position of the target ellipse and a preset length value and a preset width value.
Before determining the rectangular area taking the center position as the center position according to the center position of the target ellipse and the preset length value and width value, the method further comprises:
identifying an included angle between a target ellipse in the bill image and a preset reference direction;
and rotating the bill image to the preset reference direction according to the included angle.
The identifying the included angle between the target ellipse in the bill image and the preset reference direction comprises the following steps:
identifying an included angle between the long axis direction and the horizontal direction of a target ellipse in the bill image; or (b)
And identifying an included angle between the short axis direction and the vertical direction of the target ellipse in the bill image.
Judging whether a second target word group matched with a preset category keyword exists in the word recognition result;
if so, determining the category to which the bill image belongs according to the matched second target text group.
The embodiment of the invention provides a medical bill sorting method, a device, equipment and a medium, wherein the method is characterized in that the lengths of each ellipse and the major axis and the minor axis of each ellipse in a bill image are identified; judging whether a target ellipse with the ratio of the major axis to the minor axis within a preset ratio range exists in the bill image; if yes, determining that the bill image is the bill image of the medical bill, and determining the bill image of the medical bill by identifying the target ellipse in the bill image, thereby improving the sorting efficiency of the medical bill.
Example 8:
on the basis of the above embodiments, the embodiments of the present invention also provide a computer-readable storage medium storing a computer program, the computer program being executed by a processor to:
identifying the length of the major axis and the minor axis of each ellipse in the bill image;
judging whether a target ellipse with the ratio of the major axis to the minor axis within a preset ratio range exists in the bill image;
if yes, determining an area containing the target ellipse in the bill image;
inputting the region into a trained character recognition model, and determining a character recognition result of the character recognition model on the region;
and if the text recognition result comprises a keyword corresponding to the preset medical bill, determining that the bill image is a bill image of the medical bill.
And if the target ellipse with the ratio of the major axis to the minor axis within the preset ratio range does not exist in the bill image, determining that the bill image is not the bill image of the medical bill.
Judging whether a first target text group matched with a preset regional keyword exists in the text recognition result;
if so, determining the area to which the bill image belongs according to the matched first target text group.
The determining the area containing the target ellipse in the bill image comprises the following steps:
identifying the circle center position of a target ellipse in the bill image;
and determining a rectangular area taking the center position as the center position according to the center position of the target ellipse and a preset length value and a preset width value.
Before determining the rectangular area taking the center position as the center position according to the center position of the target ellipse and the preset length value and width value, the method further comprises:
identifying an included angle between a target ellipse in the bill image and a preset reference direction;
and rotating the bill image to the preset reference direction according to the included angle.
The identifying the included angle between the target ellipse in the bill image and the preset reference direction comprises the following steps:
identifying an included angle between the long axis direction and the horizontal direction of a target ellipse in the bill image; or (b)
And identifying an included angle between the short axis direction and the vertical direction of the target ellipse in the bill image.
Judging whether a second target word group matched with a preset category keyword exists in the word recognition result;
if so, determining the category to which the bill image belongs according to the matched second target text group.
The embodiment of the invention provides a medical bill sorting method, a device, equipment and a medium, wherein the method is characterized in that the lengths of each ellipse and the major axis and the minor axis of each ellipse in a bill image are identified; judging whether a target ellipse with the ratio of the major axis to the minor axis within a preset ratio range exists in the bill image; if yes, determining that the bill image is the bill image of the medical bill, and determining the bill image of the medical bill by identifying the target ellipse in the bill image, thereby improving the sorting efficiency of the medical bill.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It will be apparent to those skilled in the art that various modifications and variations can be made in the present application without departing from the spirit or scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims and the equivalents thereof, the present application is intended to cover such modifications and variations.

Claims (9)

1. A medical ticket sorting method, the method comprising:
identifying the length of the major axis and the minor axis of each ellipse in the bill image;
judging whether a target ellipse with the ratio of the major axis to the minor axis within a preset ratio range exists in the bill image;
if yes, determining an area containing the target ellipse in the bill image;
inputting the region into a trained character recognition model, and determining a character recognition result of the character recognition model on the region;
if the text recognition result comprises a keyword corresponding to a preset medical bill, determining that the bill image is a bill image of the medical bill;
wherein the determining the area containing the target ellipse in the bill image comprises the following steps:
identifying the circle center position of a target ellipse in the bill image;
and determining a rectangular area taking the center position as the center position according to the center position of the target ellipse and a preset length value and a preset width value.
2. The method according to claim 1, wherein the method further comprises:
and if the target ellipse with the ratio of the major axis to the minor axis within the preset ratio range does not exist in the bill image, determining that the bill image is not the bill image of the medical bill.
3. The method according to claim 1, wherein the method further comprises:
judging whether a first target text group matched with a preset regional keyword exists in the text recognition result;
if so, determining the area to which the bill image belongs according to the matched first target text group.
4. The method according to claim 1, wherein before determining the rectangular area centered on the center position of the target ellipse according to the center position of the target ellipse and the preset length and width values, the method further comprises:
identifying an included angle between a target ellipse in the bill image and a preset reference direction;
and rotating the bill image to the preset reference direction according to the included angle.
5. The method of claim 4, wherein identifying the included angle of the target ellipse in the ticket image with a preset reference direction comprises:
identifying an included angle between the long axis direction and the horizontal direction of a target ellipse in the bill image; or (b)
And identifying an included angle between the short axis direction and the vertical direction of the target ellipse in the bill image.
6. A method according to claim 1 or 3, characterized in that the method further comprises:
judging whether a second target word group matched with a preset category keyword exists in the word recognition result;
if so, determining the category to which the bill image belongs according to the matched second target text group.
7. A medical document sorting apparatus, the apparatus comprising:
the identification module is used for identifying the length of each ellipse and the length of the major axis and the minor axis of each ellipse in the bill image;
the judging module is used for judging whether a target ellipse with the ratio of the major axis to the minor axis in a preset ratio range exists in the bill image or not;
the determining module is used for determining the area containing the target ellipse in the bill image if the target ellipse exists in the bill image; inputting the region into a trained character recognition model, and determining a character recognition result of the character recognition model on the region; if the text recognition result comprises a keyword corresponding to a preset medical bill, determining that the bill image is a bill image of the medical bill;
the determining module is specifically used for identifying the circle center position of the target ellipse in the bill image; and determining a rectangular area taking the center position as the center position according to the center position of the target ellipse and a preset length value and a preset width value.
8. An electronic device comprising a processor and a memory for storing program instructions, the processor being adapted to implement the steps of the method of any of claims 1-6 when executing a computer program stored in the memory.
9. A computer-readable storage medium, characterized in that it stores a computer program which, when executed by a processor, implements the steps of the method according to any of claims 1-6.
CN202010169928.8A 2020-03-12 2020-03-12 Medical bill sorting method, device, equipment and medium Active CN111291726B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010169928.8A CN111291726B (en) 2020-03-12 2020-03-12 Medical bill sorting method, device, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010169928.8A CN111291726B (en) 2020-03-12 2020-03-12 Medical bill sorting method, device, equipment and medium

Publications (2)

Publication Number Publication Date
CN111291726A CN111291726A (en) 2020-06-16
CN111291726B true CN111291726B (en) 2023-08-08

Family

ID=71027464

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010169928.8A Active CN111291726B (en) 2020-03-12 2020-03-12 Medical bill sorting method, device, equipment and medium

Country Status (1)

Country Link
CN (1) CN111291726B (en)

Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004164674A (en) * 2004-01-23 2004-06-10 Oki Electric Ind Co Ltd Format recognition device and character reader
JP2013061839A (en) * 2011-09-14 2013-04-04 Ricoh Co Ltd Image processor, image processing method, image forming device and image processing program
WO2013052812A1 (en) * 2011-10-05 2013-04-11 Siemens Healthcare Diagnostics Inc. Generalized fast radial symmetry transform for ellipse detection
CN107610138A (en) * 2017-10-20 2018-01-19 四川长虹电器股份有限公司 A kind of bill seal regional sequence dividing method
CN108446621A (en) * 2018-03-14 2018-08-24 平安科技(深圳)有限公司 Bank slip recognition method, server and computer readable storage medium
CN108921166A (en) * 2018-06-22 2018-11-30 深源恒际科技有限公司 Medical bill class text detection recognition method and system based on deep neural network
CN109800747A (en) * 2018-12-14 2019-05-24 平安科技(深圳)有限公司 Medical invoice recognition methods, user equipment, storage medium and device
JP2019168856A (en) * 2018-03-22 2019-10-03 セイコーエプソン株式会社 Image processing apparatus, image processing method, and image processing program
CN110321760A (en) * 2018-03-29 2019-10-11 北京和缓医疗科技有限公司 A kind of medical document recognition methods and device
WO2019223391A1 (en) * 2018-05-23 2019-11-28 阿里巴巴集团控股有限公司 Bill photographing interaction method and apparatus, processing device, and client
CN110659647A (en) * 2019-09-11 2020-01-07 杭州睿琪软件有限公司 Seal image identification method and device, intelligent invoice identification equipment and storage medium
CN110688998A (en) * 2019-09-27 2020-01-14 中国银行股份有限公司 Bill identification method and device
CN110781877A (en) * 2019-10-28 2020-02-11 京东方科技集团股份有限公司 Image recognition method, device and storage medium

Patent Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004164674A (en) * 2004-01-23 2004-06-10 Oki Electric Ind Co Ltd Format recognition device and character reader
JP2013061839A (en) * 2011-09-14 2013-04-04 Ricoh Co Ltd Image processor, image processing method, image forming device and image processing program
WO2013052812A1 (en) * 2011-10-05 2013-04-11 Siemens Healthcare Diagnostics Inc. Generalized fast radial symmetry transform for ellipse detection
CN107610138A (en) * 2017-10-20 2018-01-19 四川长虹电器股份有限公司 A kind of bill seal regional sequence dividing method
WO2019174130A1 (en) * 2018-03-14 2019-09-19 平安科技(深圳)有限公司 Bill recognition method, server, and computer readable storage medium
CN108446621A (en) * 2018-03-14 2018-08-24 平安科技(深圳)有限公司 Bank slip recognition method, server and computer readable storage medium
JP2019168856A (en) * 2018-03-22 2019-10-03 セイコーエプソン株式会社 Image processing apparatus, image processing method, and image processing program
CN110321760A (en) * 2018-03-29 2019-10-11 北京和缓医疗科技有限公司 A kind of medical document recognition methods and device
WO2019223391A1 (en) * 2018-05-23 2019-11-28 阿里巴巴集团控股有限公司 Bill photographing interaction method and apparatus, processing device, and client
CN108921166A (en) * 2018-06-22 2018-11-30 深源恒际科技有限公司 Medical bill class text detection recognition method and system based on deep neural network
CN109800747A (en) * 2018-12-14 2019-05-24 平安科技(深圳)有限公司 Medical invoice recognition methods, user equipment, storage medium and device
CN110659647A (en) * 2019-09-11 2020-01-07 杭州睿琪软件有限公司 Seal image identification method and device, intelligent invoice identification equipment and storage medium
CN110688998A (en) * 2019-09-27 2020-01-14 中国银行股份有限公司 Bill identification method and device
CN110781877A (en) * 2019-10-28 2020-02-11 京东方科技集团股份有限公司 Image recognition method, device and storage medium

Also Published As

Publication number Publication date
CN111291726A (en) 2020-06-16

Similar Documents

Publication Publication Date Title
CN107992764B (en) Sensitive webpage identification and detection method and device
CN105574550A (en) Vehicle identification method and device
CN106156766A (en) The generation method and device of line of text grader
CN111583180B (en) Image tampering identification method and device, computer equipment and storage medium
CN111353491A (en) Character direction determining method, device, equipment and storage medium
CN110309301B (en) Enterprise category classification method and device and intelligent terminal
CN111539425A (en) License plate recognition method, storage medium and electronic equipment
CN114218391A (en) Sensitive information identification method based on deep learning technology
CN105740808A (en) Human face identification method and device
CN113033543A (en) Curved text recognition method, device, equipment and medium
CN115080750B (en) Weak supervision text classification method, system and device based on fusion prompt sequence
CN108268641A (en) Invoice information recognition methods and invoice information identification device, equipment and storage medium
CN112686243A (en) Method and device for intelligently identifying picture characters, computer equipment and storage medium
CN112232336A (en) Certificate identification method, device, equipment and storage medium
CN116597466A (en) Engineering drawing text detection and recognition method and system based on improved YOLOv5s
CN112990142B (en) Video guide generation method, device and equipment based on OCR (optical character recognition), and storage medium
CN111291726B (en) Medical bill sorting method, device, equipment and medium
WO2023078264A1 (en) Method and apparatus for training business card information extraction system, and computer-readable storage medium
CN107240185A (en) A kind of crown word number identification method, device, equipment and storage medium
Piekarczyk et al. Hierarchical Graph-Grammar Model for Secure and Efficient Handwritten Signatures Classification.
CN110674678A (en) Method and device for identifying sensitive mark in video
WO2020197428A1 (en) Method and system for checking a set of electronic documents
CN111488452A (en) Webpage tampering detection method, detection system and related equipment
CN109359274A (en) The method, device and equipment that the character string of a kind of pair of Mass production is identified
CN117216249A (en) Data classification method, device, electronic equipment, medium and vehicle

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
GR01 Patent grant
GR01 Patent grant