Automatic extraction method of bank information from mobile account opening materials based on machine learning

By using the image classifier and table regressor model of supervised machine learning on the mobile terminal to identify and extract account opening information and bank information, it solves the problems of large application volume and high power consumption of traditional methods on the mobile terminal, and realizes efficient banking. Information is automatically extracted, reducing back-end pressure and improving user experience.

CN112464925BActive Publication Date: 2024-10-18湖北省楚建易网络科技有限公司
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202011253879.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-11-11
Publication Date
2024-10-18
Estimated Expiration
2040-11-11

AI Technical Summary

Technical Problem

Existing technology is difficult to automatically extract account opening data and bank information on the mobile terminal. Traditional imaging methods result in large applications, high power consumption, and are not suitable for mobile terminal operation. The existing neural network model is also large in size and cannot be used on the mobile terminal. Integrated in mobile application package.

Method used

The image classifier model and table regressor model trained based on supervised machine learning are used to identify the type and direction of the account opening information picture, rotate the picture, identify the text area, and use the table regressor model to predict the location information of the text area to realize the bank's Automatic extraction of information reduces model size and is suitable for mobile applications.

Benefits of technology

It realizes the automatic extraction of account opening data and bank information on the mobile terminal, reduces back-end service pressure, saves costs, and improves user experience. The model is small in size and suitable for mobile applications.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112464925B_ABST
    Figure CN112464925B_ABST
Patent Text Reader

Abstract

The present invention discloses a method for automatically extracting bank information from mobile account opening documents based on machine learning, using a trained image classification model to identify the type of account opening document pictures; identifying the direction of the account opening document pictures; performing image operations based on the recognition results, rotating the non-positive account opening document pictures to positive processing; identifying the text area in the account opening document pictures; for account opening document pictures of the type of account opening license, using a trained table regressor model to predict the position information of the text area; verifying the predicted position information, intercepting the picture of the target text area; performing OCR text extraction on the intercepted picture to obtain the text information of the target text area. The present invention realizes automatic recognition and extraction of bank information in account opening documents on the mobile terminal, can greatly reduce the pressure of back-end services, save costs, and greatly reduce the model volume, and is more suitable for mobile terminal applications.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a method for solving the problem of target image extraction by using a tool method of machine learning, especially the extraction of specific text areas, and more particularly to a method for classifying and identifying account opening information based on an image classifier model and a table regressor model trained by supervised machine learning, and automatically identifying the account number and name of the account opening bank of the account opening license type, specifically a method for automatically extracting bank information from mobile account opening information based on machine learning. Background Art

[0002] When registering on a B2B platform (such as an online bidding platform), the registered company is generally required to provide some qualification information, and usually requires the bank information. When registering on a mobile phone, the user is required to take a photo or select the bank account information containing the company's bank name and account number from the mobile phone gallery and upload it. The platform must not only retain the registered company's account opening information pictures as information, but also extract the bank information from it. At this time, the platform may ask the user to enter it manually or ask the platform backend staff to enter it; or use the account opening license as a template to perform template feature extraction on the backend and then perform OCR text recognition extraction. For example, by purchasing the services of Baidu or Alibaba, buy their account opening license OCR templates, and pass the account opening information pictures to them through the API interface. They will return the recognition results after processing.

[0003] Before 2020, account opening information basically refers to the account opening license, such as Figure 1 There is no problem with the backend directly using templates to extract uploaded materials, but the country cancelled the paper account opening license in July 2019. The current account opening materials include not only the account opening license, but also the basic deposit account information style provided by the bank, such as Figure 2 , and a small number of other bank-issued certification documents, such as Figure 3 Therefore, if you want to automatically extract bank information from account opening documents, you cannot directly use templates to extract it, but must first classify the data types. In addition, from a technical perspective, mobile use has become the mainstream. If the recognition and extraction function can be completed on the user's mobile terminal, it can greatly reduce the pressure on back-end services and save costs.

[0004] Traditional methods are not suitable for direct implementation on mobile terminals. Traditional image methods require the introduction of graphics libraries (such as openCV), which increase the size of the application and the power consumption of the application. In addition, graphics libraries are not designed specifically for mobile systems. When running on mobile systems, they will also cause problems such as increased power consumption and battery heating due to operating efficiency issues, further reducing the application experience. Therefore, traditional methods are more suitable for back-end implementation. Using neural network machine learning methods to directly create image target detection models, the size of the generated model is not small (using Apple's optimized pre-trained model for training, after quantization and optimization of the volume, it is still no less than 16Mb). This is also very unfriendly for mobile applications where the image recognition part is not the main function. Therefore, it is necessary to provide a solution that can achieve the goal on the mobile terminal and meet the constraints on the application volume on the mobile terminal.

[0005] Both iOS and Android systems now support machine learning (Core ML in iOS, Neural Networks API in Android). This allows developers to deploy their trained models to mobile devices for application, and on-device applications have many advantages:

[0006] Latency: No need to send a request over a network connection and wait for a response.

[0007] Availability: The app can run even when there is no network coverage.

[0008] Speed: New hardware specific to neural network processing can provide significantly faster computation times than general-purpose CPUs alone.

[0009] Privacy: Data does not leave the device.

[0010] Cost: All computation is performed on the device, no server expenses are required.

[0011] Application size: You only need to consider controlling the model size. You do not need to consider other dependent packages because the system already supports them.

[0012] In summary, if we can use machine learning methods to train the model to realize image classification recognition and information extraction on the mobile terminal, we can solve the problem of extracting bank information from account opening information pictures on the mobile terminal.

[0013] The prior art also discloses some documents that deploy trained models to mobile devices for application. For example, the Chinese patent with publication number CN109460769A disclosed a mobile terminal system and method based on table character detection and recognition on March 12, 2019. Through the integration of image segmentation, character detection and recognition, a table character recognition scanning application based on a convolutional neural network was realized. The Chinese patent with publication number CN110705398A disclosed a real-time detection method for test paper layout images and texts for mobile terminals on January 17, 2020. The test paper image data is obtained from a mobile terminal device (camera or photo, etc.), and the text and picture areas in the image data are detected in real time through the tflite format target detection model built into the mobile terminal. A series of processes from data acquisition to model output results are completed on the mobile terminal. Although the aforementioned patent applications are all aimed at mobile terminals, they essentially use neural network algorithms to perform image feature recognition to achieve the purpose of target detection. They are applications of image target detection models. Such models need to store image features and weights obtained during training, resulting in large model size. It is impossible to integrate multiple models in the mobile application package, resulting in a poor user experience. Summary of the invention

[0014] In order to overcome the shortcomings of the above-mentioned prior art, the present invention provides a method for automatically extracting bank information of account opening documents on a mobile terminal based on machine learning. The method is based on an image classifier model and a table regressor model trained by supervised machine learning, which converts the image feature recognition problem into a data regression problem of a data table, realizes the classification and recognition of account opening document images on the mobile terminal, and automatically extracts the bank information of the account opening license type that is classified and recognized.

[0015] The present invention is achieved through the following technical solutions:

[0016] The automatic extraction method of bank information of mobile terminal account opening materials based on machine learning includes:

[0017] Identify the type of account opening information picture;

[0018] Identify the direction of the account opening information picture;

[0019] Perform image manipulation based on the recognition results and rotate the non-positive account opening information images to positive orientation;

[0020] Identify the text area in the account opening information picture;

[0021] For an account opening document image of the type of account opening license, a trained table regressor model is used to predict the position information of the text area; the table regressor model is a regression model established through training based on the relatively fixed position relationship between the anchor text area and the target text area; the table regressor model takes the normalized data of the anchor text area position information as input, predicts the position information of the target text area by using the data regularity between the positions of the text areas in the image, and outputs the normalized data of the target text area position information;

[0022] Verify the predicted location information and capture the image of the target text area;

[0023] Perform OCR text extraction on the captured image to obtain the text information of the target text area.

[0024] In the above technical solution, an image classifier model and a table regressor model based on supervised machine learning training are provided to first classify and identify the account opening information picture, and then automatically extract the bank information of the account opening license type information therein. This technical solution uses the spatial position law of the text area layout of the target image to digitize and tabulate the text area position information, and then regress and predict the data of the target position. Compared with the existing method of directly extracting image features, identifying and detecting targets in the target area on the image, this technical solution does not require a dedicated graphics library, and the model used is small in size and more suitable for use on mobile terminals.

[0025] In the above technical solution, for images whose type is identified as basic bank deposit account information style, since the layout of this type of image is simple and clear, the format is fixed, and the effective content part has no background interference, logical reasoning based on the position relationship of the identified text area information can be performed to obtain the target text area, so only classification recognition is required.

[0026] The above technical solution trains and optimizes the model on the PC side, and uses the model on the mobile side to classify data, correct direction, and extract effective target text areas, thereby realizing automatic recognition and extraction of bank information in account opening documents, which can greatly reduce the pressure on back-end services and save costs; and uses a table regressor model to predict the coordinate information of the target text area. Compared with the existing image target detection model, the model size is greatly reduced, making it more suitable for mobile applications.

[0027] As a further technical solution, the first image classifier model is used to distinguish the type of the input account opening document picture; and the second image classifier model is used to distinguish the direction of the input account opening document picture.

[0028] As a further technical solution, the types of account opening document images include: account opening license, bank basic deposit account information style and other certification styles. Among the existing valid account opening document images, account opening license and bank basic deposit account information style occupy the vast majority, and the number of other certification styles is very small. According to this classification, based on the supervised machine learning method, a first image classifier model is trained to determine the classification category of the input account opening document image; a second type of image separator model is trained to predict the direction of the input account opening document image and perform direction correction processing.

[0029] As a further technical solution, a third-party text area recognition model is used to identify the text area in the account opening information picture to obtain a rectangular position array describing the text area. The third-party text area recognition model can be implemented through the Vision framework provided by the iOS system. Apple iOS's Vision is an image recognition framework launched by Apple at WWDC2017, which can perform face and facial feature landmark detection, text detection, barcode recognition, image registration and general feature tracking. Here, its text detection function can be used to obtain the coordinate array of the text position rectangle of the information picture. If this function is to be implemented on other platforms, the text position target detection model can be trained by itself.

[0030] As a further technical solution, if the type of the account opening information picture is the bank's basic deposit account information style, the identified text area information is subjected to logical reasoning based on the position relationship to obtain the target text area information, and then the target text area is range-enhanced to form a new target rectangle, the target rectangle is captured from the original image, the image of the captured target rectangle is subjected to OCR text recognition and extraction, and the extracted text is subjected to semantic-based filtering to obtain the extracted bank information.

[0031] For account opening documents in the style of basic bank deposit account information, since there is no background information to interfere with the effective information, the text area recognition is relatively accurate. The text layout order characteristics of the document can be used to perform logical judgment on the recognized text area information based on the position relationship to obtain the target text area information. The range of this area is then strengthened, and it is connected and expanded with the nearest recognized text area horizontally. The upper and lower boundaries are each enlarged by 30% of the original rectangle height without intersecting with other text areas to form a new target rectangle. The target rectangle is cut from the original image, and OCR text extraction is performed on the cut image. The extracted text is filtered based on semantics, and the function is completed.

[0032] As a further technical solution, if the account opening document image type is other certification styles, it will be forwarded to the backend for manual identification. There are currently very few account opening documents of other certification styles, and they can be forwarded to the backend for manual processing.

[0033] As a further technical solution, if the type of the account opening information picture is an account opening license, then based on the position relationship of the text in the account opening license style, three text areas in the identified text areas are selected as anchor positions, normalized into table data parameters, and input into the trained table regressor model, and the model is processed to output the predicted position information of the target text area; further, the above-mentioned anchor position includes the top rectangle, the top and second top rectangles on the right side of the center line except the first selected rectangle; further, the position information of the target text area output after model processing is normalized data, and the position coordinate information of the target text area is obtained after inverse normalization.

[0034] As a further technical solution, the position information of the predicted target text area is compared with the position information of other text areas to verify the predicted position. After the verification, a rectangular image of the target text area is captured from the original image.

[0035] As a further technical solution, image classification models and table regressor models are designed and trained on the PC side, including designing model solutions, collecting and preprocessing training data, optimizing training parameters, and selecting training algorithms.

[0036] A mobile terminal account opening data bank information automatic extraction system based on machine learning is implemented by using the method described, and the system includes:

[0037] Input module, used to input account opening information pictures;

[0038] A first image classifier module is connected to the input module and is used to receive an input account opening information picture and identify the type of the account opening information picture;

[0039] A second image classifier module is connected to the first image classifier module, and is used to identify the direction of the account opening information picture and rotate the non-positive account opening information picture to the positive direction;

[0040] A third-party text region recognition module is used to recognize text regions in positive images;

[0041] A table regressor module is used to take the normalized data of the anchor text area position information as input, predict the position information of the target text area by using the data regularity between the text area positions in the image, and output the normalized data of the target text area position information;

[0042] OCR text extraction module, used to extract the text in the target text area;

[0043] Output module, used to output the extracted text information.

[0044] Compared with the prior art, the present invention has the following beneficial effects:

[0045] (1) The present invention uses an image classifier model to determine the type and direction of the account opening information, rotates the image to the positive direction, and uses the system's own framework to identify the text area; selects different processing methods for different account opening information types. If it is an image of an account opening license type, the anchor text area and the target text area are marked, the position information is extracted, and then converted into a data table, and the table regressor model is trained to numerically predict the coordinate information of the target text area. By comparing it with the position of other text recognition areas, the predicted target position information is verified, and then a rectangular image of the target text area is captured from the original image; the screenshot image is subjected to OCR text extraction to obtain the target text information; if it is a bank basic deposit account information style, the text area recognition is relatively accurate because there is no background information to interfere with the effective information. The text layout order characteristics of the information can be used to perform logical judgment based on the position relationship on the identified text area information to obtain the target text area information. The present invention is suitable for mobile terminal recognition and extraction of most existing bank information of account opening information, does not require network transmission, has a fast processing speed, and greatly improves the user experience of mobile terminal users.

[0046] (2) The present invention is specially designed for use on mobile terminals. It uses mobile terminals to automatically identify and extract bank information from account opening documents, which can greatly reduce back-end service pressure and save costs. In addition, the present invention uses a table regressor model to predict the coordinate information of the target text area. Compared with the existing image target detection model, the model size is greatly reduced and is more suitable for mobile terminal applications.

[0047] (3) The present invention utilizes the text target detection function that is already available in the Apple mobile phone system but cannot guarantee 100% accuracy. Based on the relatively fixed rule of the template text position, the present invention utilizes the three text positions that can determine the accuracy to create a regression model to predict the target position that may be inaccurate, thereby achieving the same purpose as target detection. However, because the relationship parameters between the regression model analysis variables are not huge image features, but normalized coordinate information, the volume is very small, and compared with the text target detection model used in the above patent application, it is more suitable for mobile terminal applications. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] Figure 1 A schematic diagram of the existing account opening permits;

[0049] Figure 2 This is a schematic diagram of the existing basic bank deposit account information style;

[0050] Figure 3 Schematic diagram of other existing proof styles;

[0051] Figure 4A schematic diagram of making a rectangular mark on a target text area of ​​an account opening permit according to an embodiment of the present invention;

[0052] Figure 5 is a structural diagram of the location information with labels obtained according to an embodiment of the present invention;

[0053] Figure 6 is a schematic diagram of table data according to an embodiment of the present invention;

[0054] Figure 7 The present invention is a flowchart of a method for automatically extracting bank information from mobile account opening materials based on machine learning according to an embodiment of the present invention.

[0055] Figure 8 Schematic diagram of a composite picture marking a text area according to an embodiment of the present invention. DETAILED DESCRIPTION

[0056] The following will clearly and completely describe the technical solutions of various embodiments of the present invention in conjunction with the accompanying drawings. 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 making creative work are within the scope of protection of the present invention.

[0057] The present invention provides an image classifier model and a table regressor model based on supervised machine learning training on a mobile terminal, which first classifies and identifies the account opening information, and automatically extracts the bank information of the account opening license type information. Since the other type of basic deposit account information style has a simple and clear layout, a fixed format, and no background interference in the effective content part, the recognized text area information is logically reasoned based on the position relationship to obtain the target text area, so only the recognition classification model is needed. Originally, after determining the data classification, an image target detection model is trained based on supervised machine learning directly for the type of data, and the target area can be directly detected and identified, but the original volume of the target detection model trained by the test has reached 60MB, and even after 8bit quantization processing, it can only be reduced to 16MB, which is still too large for general mobile applications, so it is turned to use the system's own framework to first identify the text area, then mark the anchor text area and the target area, extract the position information, and then convert it into a digital data table, train the table regressor model, and predict the target area coordinates through regression data analysis data rules to achieve the purpose. This converts the image feature recognition problem into a data regression problem of a data table, and the models that solve this type of problem are usually very small.

[0058] The present invention provides a method for automatically extracting bank information from mobile account opening materials based on machine learning. The key lies in designing and training three types of models for data classification, data direction judgment, and prediction of a specified location based on positional relationships. The following is an explanation of the design and training process of the three types of models in turn according to the application order of the models in the use process:

[0059] Step 1: Classify the uploaded account opening image data and train an image classifier model. The trained model can distinguish the data classification types of the input data images, including account opening licenses, bank basic deposit account information styles and other certification styles.

[0060] Step 2: Train an image classifier model that can distinguish the direction of the input data image. After determining the direction, rotate the image to the positive direction through image operations to facilitate the next step of text area recognition.

[0061] Step 3, using the Vision framework provided by the iOS system, identify the text area in the data image and obtain a rectangular position array describing the text area.

[0062] Step 4-1, if the type of data is the basic bank deposit account information style, perform logical reasoning based on the position relationship on the identified text area information to obtain the target text area information, then enhance the range of the area to form a new target rectangle, capture the target rectangle from the original image, perform OCR text recognition and extraction on the captured image, and perform semantic-based filtering on the extracted text, and the function is completed.

[0063] Step 4-2, if the type is other proof and the quantity is small, forward it to the background for manual identification and the function is completed.

[0064] Step 4-3, if the type is an account opening license, the text area information (obtained in step 3) and the target range location information are annotated, the label data is extracted, and after normalization, it is converted into tabular data. Then, a tabular regressor model is trained using this tabular data as the source to predict the location information of the target information (name of the account opening bank, account number of the account opening bank).

[0065] Step 5: Verify the predicted position by comparing it with the positions of other text recognition areas, and extract the target information rectangle from the original image.

[0066] Step 6: Perform OCR text extraction on the captured image to obtain the target information text, and the function is completed.

[0067] Example

[0068] This embodiment provides a method for automatically extracting bank information from mobile account opening materials based on machine learning, such as Figure 7 As shown, the following steps are included:

[0069] Step 1

[0070] Create a model for detecting image certificate classification:

[0071] The existing valid account opening picture materials can be classified into three categories by quantity: A. Account opening license style (such as Figure 1 )B. Basic deposit account information format provided by the bank (A4 print format) (such as Figure 2 )C. Other bank certification materials (such as Figure 3 ). Among them, A and B occupy the vast majority. Based on this classification, we train an image classifier model based on supervised machine learning methods to identify the classification category (A, B, C) of the input data picture.

[0072] First, create a Training Data folder and a Testing Data folder to store the training data set and the test data set respectively. In the Training Data folder and the Testing Data folder, create three folders named kaiHuXuKeZheng, bankBaseInfoA4, and other to store three classified style files. To improve the accuracy of the training model, select and collect various classified samples with different shooting lighting, angles, and directions, and add them to the corresponding folders.

[0073] Then, we preprocessed the dataset and set the training parameters: We used the createML toolset provided by Apple for developers to train the model. We first selected the image classifier model for training. When training the image classifier model, the official recommendation is to use images of at least 299x299 pixels. We eliminated training data that did not meet the standards.

[0074] By creating a create ML instance, we can apply the following parameter settings:

[0075] Noise (Add Noise uses this operation to tell the image classifier to augment the training dataset by adding noise to the original image; the classifier creates four new images, one with random noise for each of the original images);

[0076] Blur (Blur uses this option to tell the image classifier to augment the training dataset by creating blurred versions of the original images; the classifier creates four new images with a random amount of blur per the original image);

[0077] Cropping (the Crop operation tells the image classifier to augment the training dataset by creating cropped versions of the original image; the classifier creates four new images with random crops for each original image);

[0078] Exposure (Expose uses this operation to tell the image classifier to augment the training dataset by creating darker or lighter original images; the classifier creates four new images with random variations in the exposure of each original image);

[0079] Flip (Flip uses this operation to tell the image classifier to augment the training dataset by flipping the original image; the classifier creates three new images by flipping the original image horizontally, vertically, and horizontally and vertically);

[0080] Rotate (Using this operation, you can tell the image classifier to augment the training dataset by rotating the original images. The classifier creates four new images with random rotation angles for each original.)

[0081] The above image enhancement function makes the model more accurate. Here, choose to apply flip (Flip) and rotation (Rotate), set the training iteration number parameter to 30, specify the training data source (Training Data) address as the previously created and filled with data source pictures Training Data folder, similarly specify the test data source (Testing Data) address as the Testing Data folder filled with test pictures; select Automatic for validation data (Validation data), and automatically reorganize the model through random reorganization of training data. The above parameter settings are optimized after summarizing and analyzing the training results for multiple times. When the final training result reaches a training accuracy of 100%, and the test data test accuracy is 100%, the model is exported, and the model size is 34KB. When using this model, the original image of the data is used as input, and the output is the predicted probability of judging that the input image may be of three types.

[0082] Step 2

[0083] Make a model for determining the direction of input type certificate:

[0084] Since the orientation of some data images is not positive, this will hinder the subsequent recognition of image text areas. Therefore, it is necessary to train an image classifier model for each type of data to determine the current orientation of the data (up, down, left, right).

[0085] First, create a TrainingData folder and a TestingData folder to store the training data set and the test data set respectively. In the Training Data folder and the Testing Data folder, create four folders up, down, left, and right to store the corresponding processed images.

[0086] Then, preprocess the data set and set the training parameters: In order to enhance the features of the training data, it is necessary to capture the original image data of the four categories of direction, down, left, and right. Take the upper left corner of the image as the origin, and take a screenshot with a rectangular range of 100% of the image width to the right and 50% of the image height to the bottom. The upper half of the original image is used as the actual training data. Fill them into the up, down, left, and right folders respectively. Here, those images that do not meet the minimum 299*299 pixels should also be eliminated. Create a create ML instance and select the image classifier type. Here, select the enhancement setting to Rotate, set the training iteration number parameter to 41, specify the training data source and test data source address to the previously prepared TrainingData folder and TestingData folder, and select Automatic for validation data to automatically reorganize the model through random reorganization of training data. The above parameter settings are optimized after summarizing and analyzing the training results for multiple times. When the final training result reaches a training accuracy of 100%, the test accuracy of the test data is 92%, and the exported model size is 116KB. When using this model, the upper half of the original image needs to be captured as input, and the output is the predicted probabilities in four directions.

[0087] Step 3

[0088] After the model determines the direction of the input image data, the image can be rotated through image operations to obtain a positive data image, and then the text area recognition is performed on the image, that is, the position of the text in the image is found and their rectangular coordinate information array is returned. This function is implemented on the iOS system, so it is implemented using the Vision framework on iOS. Apple iOS's Vision is an image recognition framework launched by Apple at WWDC 2017, which can perform face and facial feature landmark detection, text detection, barcode recognition, image registration and general feature tracking. Here, its text detection function is used to obtain the rectangular coordinate array of the text position of the data image. If you want to implement this function on other platforms, you can train the text position target detection model yourself.

[0089] Step 4

[0090] If the data type is in the style of basic bank deposit account information, the text area recognition is relatively accurate because there is no background information to interfere with the effective information. The text layout order characteristics of the data can be used to perform logical judgment on the recognized text area information based on the position relationship to obtain the target text area information. The range of this area is then strengthened, and it is connected and expanded with the nearest recognized text area horizontally. The upper and lower boundaries are each enlarged by 30% of the original rectangle height without intersecting with other text areas to form a new target rectangle. The target rectangle is captured from the original image, and OCR text extraction is performed on the captured image. The extracted text is filtered based on semantics, and the function is completed.

[0091] If the data type is not the bank's basic deposit account information format or account opening permit, but other types or unknown, the current logic transfers it to manual processing.

[0092] If the type is an account opening license, the data obtained in step 3, together with the newly marked target area data, are converted into a data table, and a prediction model based on a tabular regressor is trained to predict the target area location. Here, the display area of ​​the name of the account opening bank of the account opening enterprise is used as the target area.

[0093] Step 3 obtains the rectangular coordinate array of the text position of the image recognition, but the text position recognition is sometimes inaccurate. Through a large amount of data observation, it is found that although the layout of the account opening license has a fixed style, the effective information printed on it is sometimes skewed, and some even overlap with the underline of the content area. Some pictures have fine text content in a darker shadow area due to shooting brightness problems, and the background of the center of the account opening license has complex background patterns. These will lead to text area recognition errors. However, after observing a large amount of text area recognition result data, the account opening license ( Figure 1), there are several text areas in the image that are basically unaffected by the above conditions, namely "Account Opening Permit", "Number: xxxx-xxxxxxxx", "Meet the account opening conditions, approved", and "After review, xxxx". The reason is summarized as large font size, bold font, and less interference at the edge. Among them, the three text areas of "Account Opening Permit", "Number: xxxx-xxxxxxxx" and "Meet the account opening conditions, approved" are selected as anchor points. The reason for not selecting "After review. xxxx" as the anchor point is that this text area will change with the length of the company name, and the reason for not selecting "Opening a basic deposit account" as the anchor point is that the right end of the text area is close to the center. In some account opening license images with obvious central background patterns, the text area recognition will be affected, resulting in incomplete recognition. Since the content layout of the account opening license has a unified template style, the various text areas have a relatively fixed position relationship in space. Based on this feature, the rectangular information of the three selected anchor points and the rectangular information of the target bank information area can be abstracted to form a table, thereby training a model based on a tabular regressor to predict the target position of the bank information.

[0094] First, prepare training data and test data: use the vision framework to identify the text area of ​​the prepared account opening license images and use the rectangular coordinates of these text areas to draw red wireframes on the images to represent them, and export the composite image marked with red wireframes in the text areas (such as Figure 8 ), use labelImg (LabelImg is a graphic image annotation tool written in Python) to mark the three anchor point areas specified above according to the wireframe, and draw a rectangular mark in the target area according to the width and height of the "Account Opening License" and the lower left coordinate point is on the left end of the underline of the "Account Opening Bank" area, such as Figure 4 Then the marked area annotations are exported to obtain 4 sets of labeled position information. The program output is as follows Figure 5 , normalize the coordinates, convert the absolute coordinates to relative coordinates and convert them into csv format table data, such as Figure 6 (Here item1, item2, item3 represent three anchor points, item4 represents the predicted target, x represents the horizontal axis value of the coordinate point, y represents the vertical axis value of the coordinate point, h represents length, and w represents width).

[0095] Then, use create ML to create a Tabular Regressor template. Specify the Training Data as a csv file containing 180 data items, specify the target as item4 / x, and specify the tabular parameters as Features: item1 / h, item1 / w, item1 / x, item1 / y, item2 / h, item2 / w, item2 / x, item2 / y, item3 / h, item3 / w, item3 / x, item3 / y.

[0096] The specified algorithm is Boosted Tree. The Boosted Trees model is an additive model that makes predictions by combining the decisions of a series of base models; more formally, we can write such a model as: g(x) = f0(x) + f1(x) + f2(x) + ..., where the final classifier g is the sum of simple base classifiers fi; for the boosted tree model, each base classifier is a simple decision tree, and multiple models are used to obtain better prediction performance.

[0097] The training parameters are specified as follows: (1) Max iterations is 14; it controls the number of trees in the final model. Generally, the more trees, the higher the accuracy. However, the training and prediction time also increase linearly with the number of trees. (2) Max Depth is 5; it limits the depth of each tree to prevent overfitting. (3) Min Loss Reduction is 0; it is another criterion for decision tree construction. This limits the reduction of the loss function of node splitting. The larger the value, the simpler the generated tree. (4) Min Child Weight is 0.18; it is one of the criteria for decision tree construction. In classification problems, this corresponds to the minimum number of observations required at a leaf node. The larger the value, the simpler the generated tree. (5) Row Subsample Raitio is 1; it uses only a small part of the data in each iteration. This is similar to the mini-batch stochastic gradient descent method. It not only reduces the computational cost of each iteration, but also produces a more robust model. It is calculated by proportional value. (6) Column Subsample Raitio is 1; it uses only a part of the column in each iteration. It is calculated by proportional value. (7) Step Size is 0.28; also called shrinkage, it works similarly to the learning rate of the gradient descent process: smaller values ​​will require more iterations to reach the same level of training error with a larger step size, so there is a trade-off between step_size and the number of iterations.

[0098] Final training results: Root Mean Square Error, 0.00083138394484784, the mean of the square root of the error between the predicted value and the true value, the smaller the better; Maximum Error, 0.0020183324813842773, the maximum error metric is the maximum absolute difference between the predicted value and the true value, the smaller the better.

[0099] The same method is used to train the model with target item / y. Through these two models, after inputting the normalized coordinate data of the three anchor points, the coordinates (x, y) of the lower left corner of the target area of ​​the account opening bank can be obtained. Then, the length and width of the rectangle of the anchor point "account opening license" are taken as the length and width, and the rectangular position information of the predicted account opening bank name is obtained. In actual application, after taking the normalized data corresponding to the position identification information of the three anchor points as input parameters, the driving model can obtain the x, y coordinate values ​​of the lower left corner of the target area of ​​the account opening bank.

[0100] The predicted position is verified by comparing it with the positions of other text recognition areas.

[0101] Finally, when intercepting the target rectangle, the model will predict the rectangular area upward and downward, and overflow the rectangle by 30% of its height to ensure that a small amount of skewed printed text intersecting with underlines and the account opening license information printed close to the top can also be completely intercepted.

[0102] The target rectangle is captured from the original image. The captured area only contains the target information, and then OCR text recognition is used to obtain the target text.

[0103] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the technical solutions of the embodiments of the present invention.

Claims

1. A method for automatically extracting bank information from mobile account opening materials based on machine learning, characterized in that: The image feature recognition is converted into data regression of a data table, and the classification recognition of the account opening document image is realized on the mobile terminal, and the bank information of the classified and recognized account opening license type is automatically extracted. The method includes: Identify the type of account opening information picture; Identify the direction of the account opening information picture; Perform image manipulation based on the recognition results and rotate the non-positive account opening information images to positive orientation; Identify the text area in the account opening information picture; For an account opening document image of the type of account opening license, a trained table regressor model is used to predict the position information of the text area; the table regressor model is a regression model established through training based on the relatively fixed position relationship between the anchor text area and the target text area; the table regressor model takes the normalized data of the anchor text area position information as input, predicts the position information of the target text area by using the data regularity between the positions of the text areas in the image, and outputs the normalized data of the target text area position information; Verify the predicted location information and capture the image of the target text area; Perform OCR text extraction on the captured image to obtain the text information of the target text area.

2. The method for automatically extracting bank information from mobile account opening materials based on machine learning according to claim 1, characterized in that: The first image classifier model is used to distinguish the type of the input account opening document picture; the second image classifier model is used to distinguish the direction of the input account opening document picture.

3. The method for automatically extracting bank information from mobile account opening materials based on machine learning according to claim 2, characterized in that: The types of account opening information pictures include: account opening license, bank basic deposit account information style and other certification styles.

4. The method for automatically extracting bank information from mobile account opening materials based on machine learning according to claim 1, characterized in that: A third-party text area recognition model is used to identify the text area in the account opening information image, and a rectangular position array describing the text area is obtained.

5. The method for automatically extracting bank information from mobile account opening materials based on machine learning according to claim 4 is characterized in that: If the type of the account opening information image is the bank's basic deposit account information style, logical reasoning based on positional relationships is performed on the identified text area information to obtain the target text area information, and then the target text area is range-enhanced to form a new target rectangle, which is captured from the original image. The target rectangle is then subjected to OCR text recognition and extraction on the image of the captured target rectangle, and semantic-based filtering is performed on the extracted text to obtain the extracted bank information.

6. The method for automatically extracting bank information from mobile account opening materials based on machine learning according to claim 4 is characterized in that: If the type of the account opening information picture is other certification styles, it will be forwarded to the background for manual identification.

7. The method for automatically extracting bank information from mobile account opening materials based on machine learning according to claim 4, characterized in that: If the type of the account opening information image is an account opening license, then based on the position relationship of the text in the account opening license style, three text areas in the identified text areas are selected as anchor positions, normalized into table data parameters, and input into the trained table regressor model, and the model is processed to output the predicted position information of the target text area; further, the above-mentioned anchor position includes the top rectangle, the top and second top rectangles on the right side of the center line except the first selected rectangle; further, the position information of the target text area output after model processing is normalized data, and the position coordinate information of the target text area is obtained after inverse normalization.

8. The method for automatically extracting bank information from mobile account opening materials based on machine learning according to claim 7, characterized in that: The predicted position information of the target text area is compared with the position information of other text areas to verify the predicted position. After the verification is passed, a rectangular image of the target text area is captured from the original image.

9. The method for automatically extracting bank information from mobile account opening materials based on machine learning according to claim 7, characterized in that: Design and train image classification models and table regressor models on the PC, including designing model solutions, collecting and preprocessing training data, optimizing training parameters, and selecting training algorithms.

10. A system for automatically extracting bank information from mobile account opening materials based on machine learning for implementing the method described in any one of claims 1 to 9, characterized in that: The system comprises: Input module, used to input account opening information pictures; A first image classifier module is connected to the input module and is used to receive an input account opening information picture and identify the type of the account opening information picture; A second image classifier module is connected to the first image classifier module, and is used to identify the direction of the account opening information picture and rotate the non-positive account opening information picture to the positive direction; A third-party text region recognition module is used to recognize text regions in positive images; A table regressor module is used to take the normalized data of the anchor text area position information as input, predict the position information of the target text area by using the data regularity between the text area positions in the image, and output the normalized data of the target text area position information; OCR text extraction module, used to extract the text in the target text area; Output module, used to output the extracted text information.

Citation Information

Patent Citations

  • A mobile terminal system and method based on table character detection and recognition

    CN109460769A

  • Test paper layout image-text real-time detection method for mobile terminal

    CN110705398A

  • Text detection method and device and text detection training method and device

    CN106446899A

  • Method, device and equipment for text detection and analysis based on depth neural network

    CN109086756A

  • Method and device for identifying table in picture

    CN109993112A