Payee Information Identification Method, Device, Equipment and Storage Medium

The method enhances OCR technology by preprocessing and using machine learning models to accurately identify complex recipient information from non-standardized image formats, improving transaction processing accuracy.

CN115116061BActive Publication Date: 2025-07-15PING AN BANK CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210666215.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-14
Publication Date
2025-07-15
Estimated Expiration
2042-06-14

AI Technical Summary

Technical Problem

The prior art is difficult to accurately identify complex forms of payee information, resulting in low recognition accuracy, especially in scenarios such as cross-border remittances and corporate account transfers.

Method used

By receiving the payee information image sent by the transfer terminal, grayscale image conversion and inverting color processing are performed, text areas are extracted, text areas are divided and recognized using a full convolutional network and end-to-end neural network, and the payment information is generated by a preset format analysis.

Benefits of technology

It improves the accuracy and efficiency of the recognition of the payee information, ensuring accurate identification and secure transmission in complex scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115116061B_ABST
    Figure CN115116061B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of artificial intelligence technology, and discloses a payee information recognition method, device, equipment and storage medium, which are used to improve the accuracy of payee information recognition. The payee information recognition method includes: receiving an image of payee information sent by a transfer terminal, and extracting a first text area through a grayscale image corresponding to the image of payee information; performing an anti-color processing on the first text area to obtain the anti-color value of each pixel point in the first text area, and determining a second text area according to the anti-color value; performing text area segmentation on the second text area to obtain a third text area; performing character recognition on the third text area to obtain target text information, where the target text information includes a plurality of text strings; performing format parsing on the plurality of text strings to obtain payee information, and returning the payee information to the transfer terminal. In addition, the present invention also relates to blockchain technology, and the payee information can be stored in a blockchain node.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of OCR recognition, and in particular, to a method, device, equipment and storage medium for recognizing payee information. Background Art

[0002] With the development of Internet technology, online transfer has become a common transfer method. Users can achieve online transfer by entering payee information on the transfer software. Some transfer software also provides the function of photographing and recognizing the bank card number, making online transfer more convenient.

[0003] The ways to obtain transfer information include text and image. Among them, the recognition of images is generally the recognition of bank card numbers, and other payee information still needs to be obtained by text entry. It is difficult to recognize some complex payee information, such as cross-border remittance information for international students, corporate account transfers, etc. It can be seen that the existing technology can only recognize single transfer information and is difficult to meet complex application scenarios. For payee information carrier images in different forms and without a unified standard, there is a problem of inaccurate payee information positioning, resulting in low accuracy of payee information recognition. Summary of the Invention

[0004] The present invention provides a method, device, equipment and storage medium for recognizing payee information, which is used to improve the accuracy of payee information recognition.

[0005] In the first aspect of the present invention, a method for recognizing payee information is provided, including:

[0006] Receiving a payee information image sent by a transfer terminal, and extracting a first text area in the payee information image;

[0007] Performing color inversion processing on the first text area to obtain the inverted color value of each pixel point in the first text area, and determining a second text area according to the inverted color value of each pixel point;

[0008] Performing text area segmentation on the second text area to obtain a third text area;

[0009] Performing character recognition on the third text area to obtain target text information, where the target text information includes multiple text strings;

[0010] Performing format parsing on the multiple text strings in the target text information to obtain payee information, and returning the payee information to the transfer terminal.

[0011] Optionally, in the first implementation manner of the first aspect of the present invention, the receiving a payee information image sent by a transfer terminal, and extracting a first text area in the payee information image includes:

[0012] Receive the image of the payee information sent by the transfer receiving terminal, and convert the image of the payee information into a grayscale image to obtain a target grayscale image;

[0013] Scan the grayscale value of each pixel point in the target grayscale image to obtain the grayscale value corresponding to each pixel point;

[0014] Extract the first text area in the target grayscale image through a preset text sliding window according to the grayscale value corresponding to each pixel point.

[0015] Optionally, in the second implementation manner of the first aspect of the present invention, the performing color inversion processing on the first text area to obtain the color inversion value of each pixel point in the first text area, and determining the second text area according to the color inversion value of each pixel point includes:

[0016] Determine the text pixel points in the first text area according to the grayscale value of each pixel point in the first text area;

[0017] Calculate the color inversion value of the text pixel points in the first text area, and identify the connected areas in the first text area through the color inversion value;

[0018] Determine the second text area according to the text pixel points in the connected area.

[0019] Optionally, in the third implementation manner of the first aspect of the present invention, the determining the text pixel points in the first text area according to the grayscale value of each pixel point in the first text area includes:

[0020] Calculate the text probability value corresponding to each pixel point according to the grayscale value of each pixel point in the first text area;

[0021] Judge whether the text probability value corresponding to each pixel point is greater than a preset text pixel point probability threshold;

[0022] If the text probability value corresponding to the pixel point is greater than the preset text pixel point probability threshold, set the corresponding pixel point as a text pixel point.

[0023] Optionally, in the fourth implementation manner of the first aspect of the present invention, the performing text area segmentation on the second text area to obtain a third text area includes:

[0024] Perform text edge erosion processing on the second text area through a preset erosion algorithm to obtain an eroded image;

[0025] Obtain the prior data of the text rows and columns, and perform row-column text pixel recognition on the eroded image according to the prior data of the text rows and columns to obtain row-column text pixels;

[0026] Perform text region segmentation on the second text region according to the row-column text pixels to obtain a third text region.

[0027] Optionally, in the fifth implementation manner of the first aspect of the present invention, the performing character recognition on the third text region to obtain target text information includes:

[0028] Map each character in the third text region to a target grid according to a preset grid ratio to obtain the grid coordinate information of each character;

[0029] Perform character classification on the grid coordinate information of each character through a preset grid character classifier to obtain the matching degree corresponding to each candidate character information;

[0030] Set the candidate character information with the highest matching degree as the corresponding target character to obtain target text information.

[0031] Optionally, in the sixth implementation manner of the first aspect of the present invention, the performing format parsing on multiple text strings in the target text information to obtain payee information and returning the payee information to the transfer terminal includes:

[0032] Perform format parsing on each text string in the target text information according to a preset payee field format to obtain the payee information keywords in each text string;

[0033] Generate payee information according to the payee information keywords in each text string;

[0034] Encrypt the payee information through a preset digital certificate public key and return the encrypted payee information to the transfer terminal so that the transfer terminal decrypts it through the private key to obtain the payee information.

[0035] The second aspect of the present invention provides a payee information recognition device, including:

[0036] A receiving module, configured to receive a payee information image sent by a transfer terminal and extract a first text region in the payee information image;

[0037] An inverse color module, configured to perform inverse color processing on the first text region to obtain the inverse color value of each pixel point in the first text region, and determine a second text region according to the inverse color value of each pixel point;

[0038] A segmentation module, configured to perform text region segmentation on the second text region to obtain a third text region;

[0039] An identification module, configured to perform character recognition on the third text area to obtain target text information, where the target text information includes a plurality of text strings;

[0040] A parsing module, configured to perform format parsing on the plurality of text strings in the target text information to obtain payee information, and return the payee information to the transfer terminal.

[0041] Optionally, in the first implementation manner of the second aspect of the present invention, the receiving module is specifically configured to:

[0042] Receive an image of payee information sent by a transfer terminal, and convert the image of payee information into a grayscale image to obtain a target grayscale image;

[0043] Perform grayscale value scanning on each pixel point in the target grayscale image to obtain the grayscale value corresponding to each pixel point;

[0044] According to the grayscale value corresponding to each pixel point, extract a first text area in the target grayscale image through a preset text sliding window.

[0045] Optionally, in the second implementation manner of the second aspect of the present invention, the color inversion module includes:

[0046] A determination unit, configured to determine text pixel points in the first text area according to the grayscale values of each pixel point in the first text area;

[0047] A calculation unit, configured to calculate the color inversion value of the text pixel points in the first text area, and identify a connected area in the first text area through the color inversion value;

[0048] A connection unit, configured to determine a second text area according to the text pixel points in the connected area.

[0049] Optionally, in the third implementation manner of the second aspect of the present invention, the determination unit is specifically configured to:

[0050] According to the grayscale values of each pixel point in the first text area, calculate the text probability value corresponding to each pixel point;

[0051] Judge whether the text probability value corresponding to each pixel point is greater than a preset text pixel point probability threshold;

[0052] If the text probability value corresponding to a pixel point is greater than the preset text pixel point probability threshold, set the corresponding pixel point as a text pixel point.

[0053] Optionally, in the fourth implementation manner of the second aspect of the present invention, the segmentation module is specifically configured to:

[0054] Perform text edge erosion processing on the second text area through a preset erosion algorithm to obtain an eroded image;

[0055] Obtain the prior data of the text rows and columns, and perform row and column text pixel recognition on the eroded image according to the prior data of the text rows and columns to obtain row and column text pixels;

[0056] Perform text area segmentation on the second text area according to the row and column text pixels to obtain a third text area.

[0057] Optionally, in the fifth implementation manner of the second aspect of the present invention, the recognition module is specifically configured to:

[0058] Map each character in the third text area to a target grid according to a preset grid ratio to obtain the grid coordinate information of each character;

[0059] Perform character classification on the grid coordinate information of each character through a preset grid character classifier to obtain the matching degree corresponding to each candidate character information;

[0060] Set the candidate character information with the highest matching degree as the corresponding target character to obtain target text information.

[0061] Optionally, in the sixth implementation manner of the second aspect of the present invention, the parsing module is specifically configured to:

[0062] Perform format parsing on each text string in the target text information according to a preset payee field format to obtain the payment information keywords in each text string;

[0063] Generate payee information according to the payment information keywords in each text string;

[0064] Encrypt the payee information through a preset digital certificate public key and return the encrypted payee information to the transfer terminal so that the transfer terminal decrypts it through the private key to obtain the payee information.

[0065] The third aspect of the present invention provides a payee information recognition device, including: a memory and at least one processor, wherein a computer program is stored in the memory; the at least one processor calls the computer program in the memory so that the payee information recognition device executes the above-mentioned payee information recognition method.

[0066] The fourth aspect of the present invention provides a computer-readable storage medium, wherein a computer program is stored in the computer-readable storage medium, and when it runs on a computer, it causes the computer to execute the above-mentioned payee information recognition method.

[0067] In the technical solution provided by the present invention, an image of payee information sent by a transfer receiving terminal is received, and a first text area in the payee information image is extracted through a grayscale image corresponding to the payee information image; the first text area is subjected to color inversion processing to obtain the inverted value of each pixel point in the first text area, and a second text area is determined according to the inverted value; the second text area is subjected to text area segmentation to obtain a third text area; the third text area is subjected to character recognition to obtain target text information, where the target text information includes multiple text strings; the multiple text strings in the target text information are subjected to format parsing to obtain payee information, and the payee information is returned to the transfer receiving terminal. In the embodiments of the present invention, in order to improve the accuracy of text area positioning in the payee information image, the first text area is extracted through the corresponding grayscale image, then the second text area in the first text area is extracted through color inversion processing, then the second text area is subjected to text area segmentation to obtain the third text area, then the target text information is obtained through character recognition, and finally the payee information is obtained by parsing the target text information. The present invention can provide the accuracy of payee information recognition. BRIEF DESCRIPTION OF THE DRAWINGS

[0068] Figure 1 FIG. is a schematic diagram of an embodiment of a payee information recognition method in an embodiment of the present invention;

[0069] Figure 2 FIG. is a schematic diagram of another embodiment of a payee information recognition method in an embodiment of the present invention;

[0070] Figure 3 FIG. is a schematic diagram of an embodiment of a payee information recognition device in an embodiment of the present invention;

[0071] Figure 4 FIG. is a schematic diagram of another embodiment of a payee information recognition device in an embodiment of the present invention;

[0072] Figure 5 FIG. is a schematic diagram of an embodiment of a payee information recognition device in an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0073] Embodiments of the present invention provide a payee information recognition method, device, device and storage medium for improving the accuracy of payee information recognition.

[0074] In the description and claims of the present invention and the above-mentioned accompanying drawings, the terms "first", "second", "third", "fourth", etc. (if any) are used to distinguish similar objects and do not necessarily describe a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances so that the embodiments described herein can be implemented in an order different from that shown or described herein. In addition, the term "comprising" or "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that comprises a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products, or devices.

[0075] The embodiments of the present application can acquire and process relevant data based on artificial intelligence technology. Among them, artificial intelligence (AI) is the theory, method, technology, and application system that uses a digital computer or a machine controlled by a digital computer to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use knowledge to obtain the best results.

[0076] Artificial intelligence basic technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, mechatronics, etc. Artificial intelligence software technologies mainly include several major directions such as computer vision technology, robotics, biometric technology, speech processing technology, natural language processing technology, and machine learning / deep learning.

[0077] The present application can be used in numerous general-purpose or special-purpose computer system environments or configurations. For example: personal computers, server computers, handheld devices or portable devices, tablet devices, multi-processor systems, microprocessor-based systems, set-top boxes, programmable consumer electronic devices, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, and so on. The present application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application can also be practiced in a distributed computing environment where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.

[0078] It can be understood that the execution subject of the present invention can be a payee information recognition device, or a terminal or a server. Specifically, it is not limited here. In the embodiments of the present invention, the server is taken as the execution subject for illustration. The server can be an independent server, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, Content Delivery Network (CDN), and big data and artificial intelligence platforms.

[0079] For ease of understanding, the specific process of the embodiments of the present invention will be described below. Please refer to Figure 1 , an embodiment of the payee information recognition method in the embodiments of the present invention includes:

[0080] 101. Receive the payee information image sent by the transfer terminal, and extract the first text area in the payee information image;

[0081] It should be noted that the server receives the payee information image sent by the transfer terminal. Among them, the payee information image can be an image including necessary transfer information such as a remittance form, a receipt notice, a receipt guidance form, etc. Since the payee information image can be an image of a payee information carrier in different forms and without a unified standard, there is a technical problem of inaccurate positioning when positioning the payee information. Therefore, the present application performs multiple identifications on the text area positioning of the payee information, thereby improving the accuracy of payee information positioning and further improving the accuracy of transfer.

[0082] In this embodiment, since there may be other text areas in the payee information image that are not payee information, the server first extracts the first text area in the payee information image through the grayscale image corresponding to the payee information image. The first text area is used to indicate all text areas in the payee information image and is a preliminary positioning of the text area of the payee information image. This embodiment uses grayscale image recognition of the text area to distinguish the text area from the background color, thereby improving the accuracy of subsequent text recognition.

[0083] In one embodiment, after the server receives the payee information image sent by the transfer terminal, it further includes rotating and correcting the payee information image to obtain a rotated and corrected payee information image. This embodiment can correct the payee image with an image tilt problem due to the shooting angle, thereby improving the efficiency and accuracy of subsequent text recognition.

[0084] 102. Perform color inversion processing on the first text area to obtain the inverted value of each pixel point in the first text area, and determine the second text area according to the inverted value of each pixel point;

[0085] It should be noted that, in order to further determine the text area in the payee information image, the server performs an inversion process on the first text area to obtain the inverted value of each pixel point in the first text area. Specifically, the server obtains the original color value of each pixel point in the first text area and calculates the inverted value of each pixel point according to a preset inversion calculation formula, so as to obtain the inverted value of each pixel point in the first text area. Herein, the original color value refers to the RGB color value. After obtaining the inverted value of each pixel point in the first text area, the server then determines whether the inverted value of each pixel point in the first text area is greater than a preset inversion threshold. If the inverted value of a pixel point is greater than the preset inversion threshold, the corresponding pixel point is set as a pixel point of the second text area, thereby obtaining the second text area. This embodiment can narrow the range of the first text area through the inverted value, so as to improve the efficiency of subsequent text recognition.

[0086] 103. Perform text area segmentation on the second text area to obtain a third text area;

[0087] In one embodiment, the server performs text area recognition and segmentation on the second text area through a trained text area recognition model to obtain a third text area. The text area recognition model is a fully convolutional network structure model, including multiple convolutional layers and upsampling layers. The server predicts the text probability distribution of the second text area through the multiple convolutional layers and upsampling layers in the text area recognition model to obtain a text probability distribution image, and performs binarization processing on the text probability distribution image through a clustering algorithm to obtain a binary image. Finally, text area segmentation is performed according to the binary image to obtain a third text area. This embodiment can accurately recognize the text area through a machine learning algorithm, so as to improve the accuracy of payee information recognition.

[0088] 104. Perform character recognition on the third text area to obtain target text information, where the target text information includes multiple text strings;

[0089] In one embodiment, to improve the accuracy of text recognition, the trained text recognition model is used to perform text recognition on the third text region to obtain the target text information. The text recognition model is an end-to-end neural network model, including a convolutional neural network (CNN) and a recurrent neural network (RNN), and an attention mechanism is used for model training so that the text recognition model can fully learn and absorb important information. Specifically, the server performs text recognition on the third text region through the convolutional neural network and the recurrent neural network in the trained text recognition model to obtain the target text information. This embodiment can improve the accuracy of text recognition through machine learning algorithms, thereby improving the accuracy of payee information recognition.

[0090] Among them, the target text information includes multiple text strings. The server divides the target text information into strings according to punctuation marks or delimiters to obtain multiple text strings, and the text strings contain payee information for subsequent string parsing.

[0091] 105. Parse the formats of multiple text strings in the target text information to obtain the payee information and return the payee information to the transfer terminal.

[0092] It should be noted that since the payee information is usually in a preset format, such as the receiving account is a digital combination of variable length, and the last keyword of the receiving bank usually contains "bank", based on these format rules, the server parses the format of the text string to obtain the payee information in each text string and sends the payee information to the transfer terminal so that the transfer terminal fills in the transfer form according to the payee information. This embodiment can quickly identify the payee information in the target text information, thereby improving the recognition efficiency of the payee information.

[0093] Furthermore, the server stores the payee information in the blockchain database, and the specific details are not limited here.

[0094] In the embodiment of the present invention, to improve the accuracy of text region localization in the payee information image, the first text region is extracted through the corresponding grayscale image, then the second text region in the first text region is extracted through color inversion processing, then the second text region is segmented into text regions to obtain the third text region, then the target text information is obtained through text recognition, and finally the target text information is parsed to obtain the payee information. The present invention can provide the accuracy of payee information recognition.

[0095] Please refer to Figure 2 , another embodiment of the payee information recognition method in the embodiment of the present invention includes:

[0096] 201. Receive the payee information image sent by the transfer terminal, and extract the first text area in the payee information image;

[0097] Specifically, receive the payee information image sent by the transfer terminal, convert the payee information image into a grayscale image to obtain a target grayscale image; scan the grayscale value of each pixel point in the target grayscale image to obtain the grayscale value corresponding to each pixel point; according to the grayscale value corresponding to each pixel point, extract the first text area in the target grayscale image through a preset text sliding window.

[0098] In this embodiment, after the server converts the payee information image into a grayscale image to obtain a target grayscale image, it determines the sliding parameters of the text sliding window by scanning the grayscale values of each pixel point in the target grayscale image, and extracts the first text area in the target grayscale image through the text sliding window set according to the sliding parameters. Among them, the sliding parameters include the sliding window height, the starting point of the sliding window, and the ending point of the sliding window. This embodiment can extract the text area based on the characteristic that the height of the in-line text is the same, thereby improving the accuracy of text area recognition and further improving the accuracy of payee information recognition.

[0099] 202. Perform color inversion processing on the first text area to obtain the inverted color value of each pixel point in the first text area, and determine the second text area according to the inverted color value of each pixel point;

[0100] Specifically, determine the text pixel points in the first text area according to the grayscale values of each pixel point in the first text area; calculate the inverted color values of the text pixel points in the first text area, and identify the connected areas in the first text area through the inverted color values; determine the second text area according to the text pixel points in the connected areas.

[0101] In this embodiment, the server determines the text pixel points in the first text area through the grayscale values of each pixel point in the first text area. The text pixel points are used to indicate that the corresponding pixel points are text, then calculates the inverted color values of the text pixel points, and determines the connected areas in the first text area through the inverted color values. Finally, take the intersection of the connected areas and the text pixel points to obtain the second text area. This embodiment can combine the grayscale value and the inverted color value for text area recognition, improving the accuracy of text area recognition and thus improving the accuracy of payment information recognition.

[0102] Further, determining text pixel points in the first text area according to the gray values of each pixel point in the first text area includes: calculating a text probability value corresponding to each pixel point according to the gray value of each pixel point in the first text area; determining whether the text probability value corresponding to each pixel point is greater than a preset text pixel point probability threshold; and if the text probability value corresponding to a pixel point is greater than the preset text pixel point probability threshold, setting the corresponding pixel point as a text pixel point.

[0103] In this embodiment, the server performs binary judgment on the first text area through the gray values of each pixel point in the first text area. Specifically, according to a preset text probability calculation formula, the server calculates the text probability value for the gray value of each pixel point in the first text area to obtain the text probability value corresponding to each pixel point, and determines whether the text probability value corresponding to each pixel point is greater than the preset text pixel point probability threshold. If the text probability value corresponding to a pixel point is greater than the preset text pixel point probability threshold, the corresponding pixel point is set as a text pixel point, indicating that the corresponding pixel point is a text pixel point. If the text probability value corresponding to a pixel point is less than the preset text pixel point probability threshold, the corresponding pixel point is set as a non-text pixel point, indicating that the corresponding pixel point is a non-text pixel point. This embodiment can identify text pixel points through binary processing, thereby improving the accuracy of text area recognition and further improving the accuracy of collection information recognition.

[0104] 203. Perform text area segmentation on the second text area to obtain a third text area;

[0105] Specifically, perform text edge erosion processing on the second text area through a preset erosion algorithm to obtain an eroded image; obtain prior data of text rows and columns, and perform row-column text pixel recognition on the eroded image according to the prior data of text rows and columns to obtain row-column text pixels; and perform text area segmentation on the second text area according to the row-column text pixels to obtain a third text area.

[0106] It should be noted that the preset erosion algorithm is a binary morphological algorithm in mathematical morphology, which can eliminate the boundary points of the second text area, retain the boundaries of the text, and avoid omission of text boundaries, thereby improving the accuracy of text area recognition. In this embodiment, the server performs text edge erosion on the second text area through the preset erosion algorithm to obtain an eroded image, then performs row-column text pixel recognition on the eroded image through the prior data of text rows and columns to obtain row-column text pixels, and finally performs text area segmentation on the second text area according to the row-column text pixels to obtain a third text area.

[0107] 204. Perform character recognition on the third text area to obtain target text information, where the target text information includes multiple text strings;

[0108] Specifically, according to a preset grid ratio, each character in the third text area is mapped to a target grid to obtain the grid coordinate information of each character; through a preset grid character classifier, the grid coordinate information of each character is classified to obtain the matching degree corresponding to each candidate character information; the candidate character information with the highest matching degree is set as the corresponding target character to obtain the target text information.

[0109] It should be noted that the grid character classifier is a trained character classification model. The server trains the grid character classifier with the grid coordinate information of preset characters as training samples, so as to obtain a trained character classification model. In actual applications, the server first maps each character in the third text area to a target grid according to the preset grid ratio to obtain the grid coordinate information of each character, and then uses the grid character classifier to classify the grid coordinate information of each character, outputting the candidate character information corresponding to each grid coordinate information and the matching degree between each candidate character information and the corresponding grid coordinate information. Finally, the candidate character information with the highest matching degree is set as the target character corresponding to the grid coordinate information to obtain the target character information corresponding to each character in the third text area, that is, the target text information. For example, the grid coordinate information is A, and the corresponding multiple candidate character information is A1, A2, A3, A4. The matching degrees of the candidate character information A1, A2, A3, A4 corresponding to the grid coordinate information A are X1, X2, X3, X4 respectively. Assuming that the value of X2 is the largest among X1, X2, X3, X4, then the candidate character information A2 corresponding to X2 is set as the target character corresponding to the grid coordinate information A. This embodiment can quickly perform character recognition, thereby improving the efficiency of recognizing payment information.

[0110] 205. According to the preset payee field format, parse the format of each text string in the target text information to obtain the payment information keywords in each text string;

[0111] It should be noted that the server parses the format of each text string in the target text information through the preset payee field format to obtain the payment information keywords in each text string. For example, the payee name, payee account number, payee bank, etc. This embodiment can quickly identify the payment information keywords in the target text information through the field format of the payee information, thereby improving the efficiency of recognizing payment information.

[0112] 206. Generate payee information according to the payment information keywords in each text string;

[0113] It can be understood that after obtaining the collection information keywords in multiple text strings, each collection information keyword is bound to the corresponding collection information field. For example, the collection name is bound to the "name" field, the collection account is bound to the "id" field, and the collection bank is bound to the "bank" field. There is no specific limitation. This embodiment can convert the collection information keywords into machine-recognizable information, thereby improving the efficiency of collection information recognition.

[0114] 207. Encrypt the payee information with the pre-set digital certificate public key, and return the encrypted payee information to the transfer terminal, so that the transfer terminal decrypts it with the private key to obtain the payee information.

[0115] In this embodiment, in order to improve the security of collection information during transmission, after the server encrypts the payee information with the pre-set digital certificate public key, it sends the encrypted payee information to the transfer terminal, so that the transfer terminal decrypts the encrypted payee information with the private key to obtain the payee information. This embodiment can improve the security of collection information transmission.

[0116] In the embodiment of the present invention, in order to improve the accuracy of text region localization in the payee information image, the first text region is extracted through the corresponding grayscale image, then the second text region in the first text region is extracted through color inversion processing, and then the second text region is segmented to obtain the third text region. Then, the target text information is obtained through character recognition, and finally the target text information is parsed according to the pre-set payee field format to obtain the payee information. The present invention can provide the accuracy of payee information recognition.

[0117] The payee information recognition method in the embodiment of the present invention has been described above. Next, the payee information recognition device in the embodiment of the present invention will be described. Please refer to Figure 3 , an embodiment of the payee information recognition device in the embodiment of the present invention includes:

[0118] A receiving module 301, configured to receive a payee information image sent by a transfer terminal, and extract a first text region in the payee information image;

[0119] An inverse color module 302, configured to perform inverse color processing on the first text region to obtain the inverse color value of each pixel point in the first text region, and determine a second text region according to the inverse color value of each pixel point;

[0120] A segmentation module 303, configured to perform text region segmentation on the second text region to obtain a third text region;

[0121] An identification module 304, configured to perform character recognition on the third text region to obtain target text information, where the target text information includes multiple text strings;

[0122] The parsing module 305 is configured to perform format parsing on multiple text strings in the target text information to obtain payee information, and return the payee information to the transfer terminal.

[0123] Furthermore, the payee information is stored in the blockchain database, and specific implementation here is not limited.

[0124] In an embodiment of the present invention, in order to improve the accuracy of text region localization in the payee information image, a first text region is extracted through a corresponding grayscale image, and then a second text region in the first text region is extracted through color inversion processing. Then, the second text region is segmented to obtain a third text region. Next, the target text information is obtained through character recognition. Finally, the target text information is parsed to obtain the payee information. The present invention can provide the accuracy of payee information recognition.

[0125] Please refer to Figure 4 , another embodiment of the payee information recognition device in an embodiment of the present invention includes:

[0126] The receiving module 301 is configured to receive the payee information image sent by the transfer terminal and extract the first text region in the payee information image;

[0127] The color inversion module 302 is configured to perform color inversion processing on the first text region to obtain the color inversion value of each pixel point in the first text region, and determine the second text region according to the color inversion value of each pixel point;

[0128] The segmentation module 303 is configured to perform text region segmentation on the second text region to obtain a third text region;

[0129] The recognition module 304 is configured to perform character recognition on the third text region to obtain target text information, where the target text information includes multiple text strings;

[0130] The parsing module 305 is configured to perform format parsing on multiple text strings in the target text information to obtain payee information, and return the payee information to the transfer terminal.

[0131] Optionally, the receiving module 301 is specifically configured to:

[0132] Receive the payee information image sent by the transfer terminal, and convert the payee information image into a grayscale image to obtain a target grayscale image;

[0133] Perform grayscale value scanning on each pixel point in the target grayscale image to obtain the grayscale value corresponding to each pixel point;

[0134] Extract a first text region in the target grayscale image according to the grayscale value corresponding to each pixel point through a preset text sliding window.

[0135] Optionally, the color inversion module 302 includes:

[0136] A determination unit 3021, configured to determine text pixel points in the first text region according to the grayscale values of each pixel point in the first text region;

[0137] A calculation unit 3022, configured to calculate the color inversion values of the text pixel points in the first text region, and identify connected regions in the first text region through the color inversion values;

[0138] A connection unit 3023, configured to determine a second text region according to the text pixel points in the connected region.

[0139] Optionally, the determination unit 3021 is specifically configured to:

[0140] Calculate a text probability value corresponding to each pixel point according to the grayscale value of each pixel point in the first text region;

[0141] Determine whether the text probability value corresponding to each pixel point is greater than a preset text pixel point probability threshold;

[0142] If the text probability value corresponding to the pixel point is greater than the preset text pixel point probability threshold, set the corresponding pixel point as a text pixel point.

[0143] Optionally, the segmentation module 303 is specifically configured to:

[0144] Perform text edge erosion processing on the second text region through a preset erosion algorithm to obtain an eroded image;

[0145] Obtain prior data of text rows and columns, and perform row and column text pixel recognition on the eroded image according to the prior data of the text rows and columns to obtain row and column text pixels;

[0146] Perform text region segmentation on the second text region according to the row and column text pixels to obtain a third text region.

[0147] Optionally, the recognition module 304 is specifically configured to:

[0148] Map each character in the third text region to a target grid according to a preset grid ratio to obtain grid coordinate information of each character;

[0149] Perform character classification on the grid coordinate information of each character through a preset grid character classifier to obtain a matching degree corresponding to each candidate character information;

[0150] Set the candidate character information with the highest matching degree as the corresponding target character to obtain the target text information.

[0151] Optionally, the parsing module 305 is specifically configured to:

[0152] Perform format parsing on each text string in the target text information according to a preset payee field format to obtain the payment information keywords in each text string;

[0153] Generate payee information according to the payment information keywords in each text string;

[0154] Encrypt the payee information with a preset digital certificate public key and return the encrypted payee information to the transfer terminal, so that the transfer terminal decrypts it with the private key to obtain the payee information.

[0155] In the embodiment of the present invention, in order to improve the accuracy of text region localization in the payee information image, the first text region is extracted through the corresponding grayscale image, then the second text region in the first text region is extracted through color inversion processing, and then the second text region is segmented to obtain the third text region. Then, the target text information is obtained through character recognition. Finally, the target text information is parsed according to the preset payee field format to obtain the payee information. The present invention can provide the accuracy of payee information recognition.

[0156] Above Figure 3 And Figure 4 The payee information recognition device in the embodiment of the present invention is described in detail from the perspective of modular functional entities. Next, the payee information recognition device in the embodiment of the present invention is described in detail from the perspective of hardware processing.

[0157] Figure 5FIG. 0 is a schematic structural diagram of a payee information recognition device provided by an embodiment of the present invention. The payee information recognition device 500 may vary greatly due to configuration or performance differences, and may include one or more processors (central processing units, CPUs) 510 (for example, one or more processors) and a memory 520, and one or more storage media 530 for storing application programs 533 or data 532 (for example, one or more mass storage devices). Among them, the memory 520 and the storage media 530 may be transient storage or persistent storage. The program stored in the storage media 530 may include one or more modules (not shown in the figure), and each module may include a series of computer program operations in the payee information recognition device 500. Further, the processor 510 may be configured to communicate with the storage media 530 and execute a series of computer program operations in the storage media 530 on the payee information recognition device 500.

[0158] The payee information recognition device 500 may further include one or more power supplies 540, one or more wired or wireless network interfaces 550, one or more input / output interfaces 560, and / or one or more operating systems 531, such as Windows Serve, Mac OS X, Unix, Linux, FreeBSD, etc. Those skilled in the art can understand that Figure 5 the shown structure of the payee information recognition device does not constitute a limitation on the payee information recognition device, and it may include more or fewer components than shown, or combine certain components, or have different component arrangements.

[0159] The present invention also provides a computer device, which includes a memory and a processor. A computer-readable computer program is stored in the memory. When the computer-readable computer program is executed by the processor, the processor executes the steps of the payee information recognition method in the above embodiments.

[0160] The present invention also provides a computer-readable storage medium. The computer-readable storage medium may be a non-volatile computer-readable storage medium, or may also be a volatile computer-readable storage medium. A computer program is stored in the computer-readable storage medium. When the computer program runs on a computer, the computer executes the steps of the payee information recognition method.

[0161] Further, the computer-readable storage medium may mainly include a program storage area and a data storage area. Among them, the program storage area may store an operating system, application programs required for at least one function, etc.; the data storage area may store data created according to the use of the blockchain node, etc.

[0162] The blockchain referred to in the present invention is a new application mode of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, and encryption algorithm. Blockchain, in essence, is a decentralized database, a series of data blocks generated by using cryptographic methods. Each data block contains information on a batch of network transactions, which is used to verify the validity of the information (anti-counterfeiting) and generate the next block. The blockchain can include the blockchain underlying platform, the platform product service layer, and the application service layer, etc.

[0163] Those skilled in the art can clearly understand that for the convenience and conciseness of description, the specific working processes of the above-described systems, devices, and units can refer to the corresponding processes in the foregoing method embodiments, and will not be described herein again.

[0164] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several computer programs for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The foregoing storage medium includes: various media that can store program codes such as USB flash drives, mobile hard disks, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical discs.

[0165] As described above, the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements on some of the technical features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the various embodiments of the present invention.

Claims

1. A method for identifying payee information, characterized in that, The payee information recognition method includes: Receiving a payee information image sent by a transfer terminal, and extracting a first text area in the payee information image; wherein, the first text area is used to indicate all text areas in the payee information image; Performing an anti-color processing on the first text area to obtain an anti-color value of each pixel point in the first text area, and determining a second text area according to the anti-color value of each pixel point; wherein, the second text area is an area where pixel points with an anti-color value greater than a preset anti-color threshold are located; Performing text area segmentation on the second text area to obtain a third text area; Performing character recognition on the third text area to obtain target text information, where the target text information includes multiple text strings; Performing format parsing on the multiple text strings in the target text information to obtain payee information, and returning the payee information to the transfer terminal.

2. The payee information identification method according to claim 1, wherein The receiving a payee information image sent by a transfer terminal, and extracting a first text area in the payee information image includes: Receiving a payee information image sent by a transfer terminal, and converting the payee information image into a grayscale image to obtain a target grayscale image; Performing a grayscale value scan on each pixel point in the target grayscale image to obtain a grayscale value corresponding to each pixel point; Extracting a first text area in the target grayscale image through a preset text sliding window according to the grayscale value corresponding to each pixel point.

3. The payee information recognition method according to claim 1, wherein, The performing an anti-color processing on the first text area to obtain an anti-color value of each pixel point in the first text area, and determining a second text area according to the anti-color value of each pixel point includes: Determining text pixel points in the first text area according to the grayscale value of each pixel point in the first text area; Calculating the anti-color value of the text pixel points in the first text area, and identifying connected regions in the first text area through the anti-color value; Determining a second text area according to the text pixel points in the connected regions.

4. The method for identifying payee information according to claim 3, wherein The determining text pixel points in the first text area according to the grayscale value of each pixel point in the first text area includes: Calculating a text probability value corresponding to each pixel point according to the grayscale value of each pixel point in the first text area; Judging whether the text probability value corresponding to each pixel point is greater than a preset text pixel point probability threshold; If the text probability value corresponding to a pixel point is greater than the preset text pixel point probability threshold, setting the corresponding pixel point as a text pixel point.

5. The payee information recognition method according to claim 1, wherein The performing text area segmentation on the second text area to obtain a third text area includes: Performing text edge erosion processing on the second text area through a preset erosion algorithm to obtain an erosion image; Obtaining prior data of text rows and columns, and performing row-column text pixel recognition on the erosion image according to the prior data of the text rows and columns to obtain row-column text pixels; Performing text area segmentation on the second text area according to the row-column text pixels to obtain a third text area.

6. The payee information recognition method according to claim 1, wherein, The performing character recognition on the third text area to obtain target text information includes: Map each character in the third text area to the target grid according to the preset grid ratio to obtain the grid coordinate information of each character; Through a preset grid character classifier, classify the grid coordinate information of each character to obtain the matching degree corresponding to each candidate character information; Set the candidate character information with the highest matching degree as the corresponding target character to obtain the target text information.

7. The payee information identification method according to any one of claims 1-6, characterized in that, The format parsing of multiple text strings in the target text information to obtain the payee information and returning the payee information to the transfer terminal includes: According to the preset payee field format, perform format parsing on each text string in the target text information to obtain the payment information keywords in each text string; Generate the payee information according to the payment information keywords in each text string; Encrypt the payee information with the public key of the preset digital certificate and return the encrypted payee information to the transfer terminal so that the transfer terminal decrypts it with the private key to obtain the payee information.

8. A payee information recognition device, characterized in that, The payee information recognition device includes: A receiving module, configured to receive the payee information image sent by the transfer terminal and extract the first text area in the payee information image; wherein, the first text area is used to indicate all text areas in the payee information image; An inverse color module, configured to perform inverse color processing on the first text area to obtain the inverse color value of each pixel point in the first text area, and determine the second text area according to the inverse color value of each pixel point; wherein, the second text area is the area where the pixel points with inverse color values greater than the preset inverse color threshold are located; A segmentation module, configured to perform text area segmentation on the second text area to obtain a third text area; An identification module, configured to perform character recognition on the third text area to obtain target text information, where the target text information includes multiple text strings; An analysis module, configured to perform format analysis on multiple text strings in the target text information to obtain payee information and return the payee information to the transfer terminal.

9. A payee information recognition device, characterized in that, The payee information recognition device includes: a memory and at least one processor, and a computer program is stored in the memory; The at least one processor calls the computer program in the memory so that the payee information recognition device executes the payee information recognition method according to any one of claims 1-7.

10. A computer-readable storage medium, on which a computer program is stored, characterized in that, The computer program, when executed by the processor, implements the payee information recognition method according to any one of claims 1-7.

Citation Information

Patent Citations

  • Text extraction method and device, electronic equipment and storage medium

    CN111767769A