Image text recognition method, device and electronic equipment applicable to bank statements

By performing layout analysis and longitude and latitude projection conversion on bank flow templates, chart text boxes are generated, which solves the problem of manual annotation of training data in bank flow recognition that consumes manpower and time, and achieves efficient image text recognition.

CN114187599BActive Publication Date: 2025-01-24ZHEJIANG HUIRONG NETWORK TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111288627.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-02
Publication Date
2025-01-24
Estimated Expiration
2041-11-02

AI Technical Summary

Technical Problem

A large amount of training data is required to manually mark in bank statement identification, resulting in labor and time-consuming problems.

Method used

Through the layout of the borderless flowing template, the latitude and longitude value is projected into the transformation method to generate the text box of the chart, and the bank running water text is effectively boxed to automatically add the text box to reduce artificial marking.

Benefits of technology

It achieves the technical effect of eliminating manual labeling, saves a lot of manpower and time, and effectively improves the efficiency of image text recognition.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114187599B_ABST
    Figure CN114187599B_ABST
Patent Text Reader

Abstract

The present invention discloses an image text recognition method, device and electronic device suitable for bank flow, wherein the method comprises: performing layout analysis on borderless flow templates in different bank flow templates to determine the width and length of the borderless flow template; determining the number of longitude and latitude lines to be added according to the width and length of the borderless flow template and the latitude and longitude values ​​between different rows and columns; generating a text box with the same number of longitude and latitude lines, and adding the text box to the borderless flow template to obtain a bordered flow template; and recognizing the image of the bordered flow template. The present invention performs layout analysis on the borderless flow template, utilizes the latitude and longitude value projection conversion method, generates a chart text box, and effectively frames the bank flow text, thereby achieving the technical effect of avoiding manual labeling, and solving the problem of wasting manpower and time in bank flow recognition due to manual labeling training of a large amount of data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image text recognition, and in particular to an image text recognition method, device and electronic equipment suitable for bank flow. Background Art

[0002] Current image text recognition generally includes two parts: image detection and image recognition. First, image detection is performed, which requires a large number of text box annotations on the image, annotation of training data and image text boxes, and then image recognition is performed.

[0003] However, when image text recognition is required for bank statements, it is often necessary to manually annotate and train a large amount of data during the image detection stage, which is labor-intensive and time-consuming.

[0004] There is currently no effective solution to the problem of manually labeling and training large amounts of data in bank statement recognition, which is labor-intensive and time-consuming. Summary of the invention

[0005] The main purpose of the present invention is to provide an image text recognition method, device and electronic equipment suitable for bank statements, so as to solve the problem of manually annotating and training a large amount of data in bank statement recognition, which leads to a waste of manpower and time.

[0006] In order to achieve the above object, the first aspect of the present invention provides an image text recognition method applicable to bank statements, comprising:

[0007] Conduct layout analysis on borderless bank statement templates in different bank statement templates to determine the width and length of borderless bank statement templates;

[0008] Determine the number of longitude and latitude lines to be added according to the width and length of the borderless water flow template and the latitude and longitude values ​​between different rows and columns;

[0009] Generate a text box with the same number of longitude and latitude lines as the longitude and latitude lines, and add the text box to the borderless water flow template to obtain a bordered water flow template;

[0010] Recognize the image of the border-shaped water flow template.

[0011] Optionally, before performing layout analysis on borderless bank statement templates among different bank statement templates, the method further includes:

[0012] Different bank statement templates are divided into borderless statement templates and bordered statement templates according to whether they have borders or not.

[0013] Optionally, determining the width and length of the borderless water flow template includes:

[0014] Determine the total width and length of the borderless flow page;

[0015] Determine the width and length of different rows and columns in a borderless flow page.

[0016] Optionally, generating a text box having the same number of longitude and latitude lines comprises:

[0017] Use the add_table function in the python-docx package to generate text boxes with the same number of longitude and latitude lines.

[0018] Optionally, after obtaining the bordered water flow template, the method further includes:

[0019] Generate an image of a bounding box template.

[0020] Optionally, the identifying the image of the bordered water flow template includes:

[0021] Input the image with border-shaped flow template into the DBNET detection model;

[0022] The DBNET detection model is used to detect the text position of the text box in the image of the bordered pipeline template and generate a label.

[0023] Furthermore, the method further comprises:

[0024] The CRNN model is used to perform text recognition on images with bounding box pipeline templates.

[0025] A second aspect of the present invention provides an image text recognition device suitable for bank statements, comprising:

[0026] A layout analysis unit is used to perform layout analysis on borderless bank statement templates in different bank statement templates to determine the width and length of the borderless bank statement template;

[0027] A line number determination unit, used to determine the number of longitude and latitude lines to be added according to the width and length of the borderless water flow template and the latitude and longitude values ​​between different rows and columns;

[0028] A generating unit, configured to generate a text box having the same number of lines as the longitude and latitude lines, and add the text box to the borderless water flow template to obtain a bordered water flow template;

[0029] The recognition unit is used to recognize the image of the border-shaped water flow template.

[0030] A third aspect of the present invention provides a computer-readable storage medium storing computer instructions for causing a computer to execute the image text recognition method applicable to bank statements provided in any one of the first aspects.

[0031] The fourth aspect of the present invention provides an electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor executes the image text recognition method applicable to bank statements provided in any one of the first aspects.

[0032] In the image text recognition method applicable to bank statements provided by the embodiment of the present invention, the borderless flow templates in different bank statement templates are analyzed for layout, and the width and length of the borderless flow template are determined; the number of longitude and latitude lines to be added is determined according to the width and length of the borderless flow template and the latitude and longitude values ​​between different rows and columns; a text box with the same number of longitude and latitude lines is generated, and the text box is added to the borderless flow template to obtain a bordered flow template; and the image of the bordered flow template is recognized. The present invention analyzes the layout of the borderless flow template, uses the longitude and latitude value projection conversion method, generates a chart text box, and effectively frames the bank statement text, thereby achieving the technical effect of avoiding manual labeling, saving a lot of manpower and time, effectively improving the efficiency of image text recognition, and solving the problem of wasting manpower and time in bank statement recognition due to manual labeling and training of a large amount of data. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0034] Figure 1 A schematic diagram of a method flow chart provided by an embodiment of the present invention;

[0035] Figure 2 A device block diagram provided for an embodiment of the present invention;

[0036] Figure 3 A block diagram of an electronic device provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0037] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0038] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so as to describe the embodiments of the present invention described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0039] In the present invention, the directions or positional relationships indicated by the terms "upper", "lower", "left", "right", "front", "back", "top", "bottom", "inner", "outer", "middle", "vertical", "horizontal", "lateral", "longitudinal" and the like are based on the directions or positional relationships shown in the drawings. These terms are mainly used to better describe the present invention and its embodiments, and are not used to limit the indicated devices, elements or components to have a specific direction, or to be constructed and operated in a specific direction.

[0040] In addition, some of the above terms may be used to express other meanings in addition to indicating orientation or positional relationship. For example, the term "on" may also be used to express a certain dependency or connection relationship in some cases. For those skilled in the art, the specific meanings of these terms in the present invention can be understood according to specific circumstances.

[0041] In addition, the terms "installed", "set", "provided with", "connected", "connected", and "socketed" should be understood in a broad sense. For example, it can be a fixed connection, a detachable connection, or an integral structure; it can be a mechanical connection or an electrical connection; it can be a direct connection, or an indirect connection through an intermediate medium, or it can be an internal connection between two devices, elements, or components. For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0042] It should be noted that, in the absence of conflict, the embodiments of the present invention and the features in the embodiments can be combined with each other. The present invention will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0043] At present, image text recognition generally includes two parts: image detection and image recognition. First, image detection requires a large number of text box annotations on the image, annotated training data and image text boxes, and then image recognition. When image text recognition of bank statements is required, it is often necessary to manually annotate a large amount of training data during the image detection stage, which is labor-intensive and time-consuming.

[0044] In order to solve the above problems, the embodiment of the present invention provides an image text recognition method suitable for bank flow, such as Figure 1 As shown, the method includes the following steps S101 to S104:

[0045] Step S101: Analyze the layout of borderless bank statement templates in different bank statement templates to determine the width and length of the borderless bank statement template;

[0046] Specifically, before performing layout analysis on the borderless bank statement templates in different bank statement templates in step S101, the method further includes:

[0047] Different bank statement templates are divided into borderless statement templates and bordered statement templates according to whether they have borders or not. Different bank statement templates are different. According to whether they have borders or not, they are divided into borderless and bordered templates. For the borderless template, the present invention uses the latitude and longitude projection conversion method to add borders to the borderless statement according to the latitude and longitude values ​​to generate a bordered template.

[0048] Specifically, the step S101 of determining the width and length of the borderless water flow template includes:

[0049] Determine the total width and length of the borderless flow page;

[0050] Determine the width and length of different rows and columns in a borderless flow page.

[0051] Step S102: determining the number of longitude and latitude lines to be added according to the width and length of the borderless water flow template and the latitude and longitude values ​​between different rows and columns;

[0052] The number of longitude and latitude lines to be added, that is, the number of longitude and latitude lines that need to be added to the borderless flow template, is determined based on the layout analysis results and the longitude and latitude values ​​between different rows and columns.

[0053] Step S103: generating a text box with the same number of longitude and latitude lines as the longitude and latitude lines, and adding the text box to the borderless water flow template to obtain a bordered water flow template;

[0054] By generating a chart border text box, the bank statement text can be effectively framed, thereby eliminating the need for manual labeling, saving a lot of manpower time and effectively improving the modeling speed.

[0055] Specifically, the step S103 of generating a text box having the same number of longitude and latitude lines includes:

[0056] The add_table function in the python-docx package is used to generate text boxes with the same number of longitude and latitude lines.

[0057] Furthermore, after obtaining the bordered water flow template in step S103, the method further includes:

[0058] Generate an image of a bounding box template.

[0059] Step S104: Identify the image of the bordered water flow template.

[0060] Specifically, step S104 includes:

[0061] Input the image with the border pipeline template into the DBNET detection model; wherein the DBNET detection model is a text detection model;

[0062] The DBNET detection model is used to detect the text position of the text box in the image of the bordered pipeline template and generate a label.

[0063] Furthermore, the step S104 further includes:

[0064] The CRNN model is used to perform text recognition on images with border pipeline templates. The CRNN model is an image text recognition model.

[0065] By using the DBNET detection model to generate labels and using the CRNN model for text recognition, it is possible to avoid spending a lot of time manually on image frame line annotation. In addition, the text box annotations generated in the present invention have a uniform size, which greatly improves the efficiency of OCR (Optical Character Recognition) image recognition projects.

[0066] The present invention generates a chart frame through image text analysis and utilizes the projection conversion method of longitude and latitude values ​​to effectively frame the text of the bank statement, thereby achieving the effect of avoiding manual labeling, saving a lot of manpower time, and effectively improving the modeling speed; in addition, it avoids spending a lot of time on image frame line labeling manually, and the text box labeling size is unified, which greatly improves the efficiency of the OCR image recognition project.

[0067] From the above description, it can be seen that the present invention achieves the following technical effects:

[0068] The present invention performs layout analysis on the borderless bank statement template, utilizes the latitude and longitude value projection conversion method, generates a chart text frame, and effectively frames the bank statement text, thereby achieving the technical effect of avoiding manual labeling, saving a lot of manpower and time, and effectively improving the efficiency of image text recognition, solving the problem of wasting manpower and time caused by manually labeling and training a large amount of data in bank statement recognition.

[0069] It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and that, although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0070] The embodiment of the present invention further provides an image text recognition device applicable to bank statements for implementing the above-mentioned image text recognition method applicable to bank statements, such as Figure 2 As shown, the device comprises:

[0071] The layout analysis unit 21 is used to perform layout analysis on the borderless bank statement templates in different bank statement templates to determine the width and length of the borderless bank statement template;

[0072] The number determination unit 22 is used to determine the number of longitude and latitude lines to be added according to the width and length of the borderless water flow template and the latitude and longitude values ​​between different rows and columns;

[0073] A generating unit 23 is used to generate a text box with the same number of longitude and latitude lines as the longitude and latitude lines, and add the text box to the borderless water flow template to obtain a bordered water flow template;

[0074] The recognition unit 24 is used to recognize the image of the border-shaped water flow template.

[0075] The embodiment of the present invention further provides an electronic device, such as Figure 3 As shown, the electronic device includes one or more processors 31 and a memory 32. Figure 3 A processor 31 is taken as an example.

[0076] The controller may further include: an input device 33 and an output device 34 .

[0077] The processor 31, the memory 32, the input device 33 and the output device 34 may be connected via a bus or other means. Figure 3 The example of connecting through bus is taken in the following.

[0078] The processor 31 may be a central processing unit (CPU), or other general-purpose processors, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or a combination of the above chips. The general-purpose processor may be a microprocessor or any conventional processor.

[0079] The memory 32 is a non-transient computer-readable storage medium that can be used to store non-transient software programs, non-transient computer executable programs and modules, such as program instructions / modules corresponding to the control method in the embodiment of the present invention. The processor 31 executes various functional applications and data processing of the server by running the non-transient software programs, instructions and modules stored in the memory 32, that is, the image text recognition method applicable to bank flow in the above method embodiment is realized.

[0080] The memory 32 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of a processing device operated by the server, etc. In addition, the memory 32 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some embodiments, the memory 32 may optionally include a memory remotely arranged relative to the processor 31, and these remote memories may be connected to a network connection device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0081] The input device 33 can receive input digital or character information, and generate key signal input related to user settings and function control of the processing device of the server. The output device 34 can include display devices such as a display screen.

[0082] One or more modules are stored in the memory 32, and when executed by one or more processors 31, the execution is as follows: Figure 1 The method shown.

[0083] Those skilled in the art can understand that the implementation of all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned motor control methods. Among them, the storage medium can be a disk, an optical disk, a read-only memory (ROM), a random access memory (RAM), a flash memory (FM), a hard disk drive (HDD), or a solid-state drive (SSD), etc.; the storage medium can also include a combination of the above-mentioned types of memory.

[0084] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined by the appended claims.

Claims

1. A method for image text recognition suitable for bank statements, characterized in that: include: Conduct layout analysis on borderless bank statement templates in different bank statement templates to determine the width and length of borderless bank statement templates; Determining the width and length of the borderless water flow template includes: Determine the total width and length of the borderless flow page; Determine the width and length of different rows and columns in the borderless flow page; Determine the number of longitude and latitude lines to be added according to the width and length of the borderless water flow template and the latitude and longitude values ​​between different rows and columns; Generate a text box with the same number of longitude and latitude lines as the longitude and latitude lines, and add the text box to the borderless water flow template to obtain a bordered water flow template; Recognize the image of the border-shaped water flow template.

2. The method according to claim 1, characterized in that Before performing layout analysis on the borderless bank statement templates in different bank statement templates, the method further includes: Different bank statement templates are divided into borderless statement templates and bordered statement templates according to whether they have borders or not.

3. The method according to claim 1, characterized in that The generating of the text box having the same number of longitude and latitude lines comprises: Use the add_table function in the python-docx package to generate text boxes with the same number of longitude and latitude lines.

4. The method according to claim 1, characterized in that: After obtaining the bordered water flow template, the method further includes: Generate an image of a bounding box template.

5. The method according to claim 1, characterized in that The recognition of the image of the border-shaped flow template includes: Input the image with border-shaped flow template into the DBNET detection model; The DBNET detection model is used to detect the text position of the text box in the image of the bordered pipeline template and generate a label.

6. The method according to claim 5, characterized in that The method further comprises: The CRNN model is used to perform text recognition on images with bounding box pipeline templates.

7. An image text recognition device suitable for bank statements, characterized in that: include: A layout analysis unit is used to perform layout analysis on borderless bank statement templates in different bank statement templates to determine the width and length of the borderless bank statement template; Determining the width and length of the borderless water flow template includes: Determine the total width and length of the borderless flow page; Determine the width and length of different rows and columns in the borderless flow page; A line number determination unit, used to determine the number of longitude and latitude lines to be added according to the width and length of the borderless water flow template and the latitude and longitude values ​​between different rows and columns; A generating unit, configured to generate a text box having the same number of lines as the longitude and latitude lines, and add the text box to the borderless water flow template to obtain a bordered water flow template; The recognition unit is used to recognize the image of the border-shaped water flow template.

8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the image text recognition method applicable to bank statements as described in any one of claims 1-6.

9. An electronic device, characterized in that: The electronic device includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor executes the image text recognition method applicable to bank statements as described in any one of claims 1-6.

Citation Information

Patent Citations

  • OCR identification method and device based on template matching, and storage medium

    CN110008944A

  • Character image recognition method and device

    CN110443239A