Bank card information identification method, training method, device and equipment

Through the preprocessing of the information identification model, interpretability processing and identification sub-model identification of bank card information, the problem of poor identification in the existing technology is solved, efficient identification of bank card information is achieved, and the efficiency of financial business processing is improved. .

CN119251847APending Publication Date: 2025-01-03PING AN TECH (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411254607.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-06
Publication Date
2025-01-03

AI Technical Summary

Technical Problem

In the bank card information identification, template matching and feature extraction methods lead to poor identification convenience, which requires a lot of manual and time to formulate template and feature extraction rules, especially when different types of bank cards do not formulate corresponding rules. Identify.

Method used

Preprocessing, interpretability processing and recognition sub-model of the information recognition model are adopted to obtain bank card images for image preprocessing, character block images and target recognition areas are determined, and bank card information is then identified, improving recognition convenience.

Benefits of technology

It does not require a lot of manpower and time to obtain bank card information, which improves the efficiency of financial business processing, simplifies the identification process of bank card information, and improves the accuracy and convenience of identification.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119251847A_ABST
    Figure CN119251847A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of information identification, and provides a bank card information identification method, training method, device and equipment, and the method comprises the steps: obtaining a bank card image; performing image preprocessing on the bank card image based on a preprocessing sub-model of the information identification model to obtain a character block image corresponding to the bank card image; based on an interpretability sub-model of the information identification model, performing interpretability processing on the character block image to obtain a target identification area corresponding to the character block image; and based on the identification sub-model of the information identification model, identifying the character block image and the target identification area to obtain the bank card information corresponding to the character block image, thereby improving the identification convenience of the bank card information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of information identification technology, and in particular to a bank card information identification method, training method, device and equipment. Background Art

[0002] With the development of the modern financial industry, bank cards have become one of the indispensable payment tools in people's daily lives. The financial industry still needs to use a large number of physical bank cards to complete related financial services, such as identifying and recording bank card information.

[0003] At present, in the related art, methods based on template matching and feature extraction are generally used to identify bank card information. However, when identifying bank card information through the method based on template matching, it is necessary to formulate a template corresponding to the bank card information. And, when identifying bank card information through the method based on feature extraction, it is necessary to formulate feature extraction rules corresponding to the bank card information. Based on this, it is easy to lead to poor convenience in identifying bank card information. For example, for different types of bank cards, if the corresponding templates or feature extraction rules are not formulated, the bank card information of the corresponding bank card cannot be identified, so it is necessary to consume extra manpower and time to obtain the bank card information. Summary of the invention

[0004] The main purpose of this application is to provide a bank card information recognition method, training method, device and equipment, aiming to improve the convenience of bank card information recognition.

[0005] In a first aspect, the present application provides a method for identifying bank card information, comprising the following steps:

[0006] Get bank card image;

[0007] Based on the preprocessing sub-model of the information recognition model, the bank card image is preprocessed to obtain a character block image corresponding to the bank card image;

[0008] Based on the interpretability sub-model of the information recognition model, the character block image is processed for interpretability to obtain a target recognition area corresponding to the character block image;

[0009] Based on the recognition sub-model of the information recognition model, the character block image and the target recognition area are recognized to obtain the bank card information corresponding to the character block image.

[0010] In a second aspect, the present application also provides a training method for an information recognition model, the training method comprising:

[0011] Acquire a training sample set, wherein the training sample set includes a plurality of bank card images and bank card information labels corresponding to each of the bank card images;

[0012] Based on the preprocessing sub-model of the information recognition model, the bank card image is preprocessed to obtain a character block image corresponding to the bank card image;

[0013] Based on the interpretability sub-model of the information recognition model, the character block image is processed for interpretability to obtain a target recognition area corresponding to the character block image;

[0014] Based on the recognition sub-model of the information recognition model, the character block image and the target recognition area are recognized to obtain the bank card information corresponding to the character block image;

[0015] Determining model optimization parameters of the information recognition model according to the bank card information and the bank card information tag;

[0016] According to the model optimization parameters, the model parameters of the information recognition model are adjusted.

[0017] In a third aspect, the present application further provides a bank card information recognition device, the recognition device comprising:

[0018] An image acquisition module, used to acquire bank card images;

[0019] A character block image determination module, used to perform image preprocessing on the bank card image based on a preprocessing sub-model of an information recognition model to obtain a character block image corresponding to the bank card image;

[0020] The recognition area determination module is used to identify the character block image and the target recognition area based on the recognition sub-model of the information recognition model to obtain the bank card information corresponding to the character block image.

[0021] In a fourth aspect, the present application further provides a computer device, the computer device comprising a memory and a processor;

[0022] The memory is used to store computer programs;

[0023] The processor is used to execute the computer program and implement the steps of the bank card information recognition method as described above, or implement the steps of the information recognition model training method as described above when executing the computer program.

[0024] The present application provides a method, training method, device and equipment for identifying bank card information. The method for identifying bank card information includes: obtaining a bank card image; performing image preprocessing on the bank card image based on a preprocessing sub-model of an information recognition model to obtain a character block image corresponding to the bank card image; performing interpretability processing on the character block image based on an interpretability sub-model of the information recognition model to obtain a target recognition area corresponding to the character block image; and identifying the character block image and the target recognition area based on a recognition sub-model of the information recognition model to obtain bank card information corresponding to the character block image, so as to improve the convenience of identifying bank card information. For example, it can be used for financial services related to bank cards in the financial field. When processing related financial services, if it is necessary to obtain the bank card information corresponding to the bank card, the bank card information can be determined by the bank card information recognition method, which is conducive to improving the convenience of identifying bank card information. In addition, there is no need to spend a lot of manpower and time to obtain the bank card information required for processing financial services, or to formulate recognition templates and feature extraction rules corresponding to the bank card information, which is conducive to improving the processing efficiency of financial services. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0026] Figure 1 It is a flow chart of a bank card information identification method provided in an embodiment of the present application;

[0027] Figure 2 It is a flowchart of a training method for an information recognition model provided in an embodiment of the present application;

[0028] Figure 3 is a schematic block diagram of a bank card information recognition device provided in an embodiment of the present application;

[0029] Figure 4 It is a schematic block diagram of the structure of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0030] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0031] The flowcharts shown in the accompanying drawings are only examples and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps may also be decomposed, combined or partially merged, so the actual execution order may change according to actual conditions.

[0032] The embodiments of the present application provide a method, training method, device and equipment for identifying bank card information. Among them, the method for identifying bank card information and the training method of the information recognition model can be applied to computer devices, which can be mobile phones, tablet computers, laptops, desktop computers and other devices. It can also be applied to a server, which can be a separate 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 networks (CDNs), and big data and artificial intelligence platforms.

[0033] In conjunction with the accompanying drawings, some embodiments of the present application are described in detail below. In the absence of conflict, the following embodiments and features in the embodiments can be combined with each other.

[0034] See also Figure 1 , Figure 1 It is a flow chart of a bank card information recognition method provided in an embodiment of the present application. It should be noted that the bank card information recognition method provided in the embodiment of the present application can be used in a computer device, and of course can also be used in a server. For example, the server can obtain a bank card image from a computer device, process the bank card image according to the bank card information recognition method, and obtain the bank card information. Exemplarily, the server can, for example, send the bank card information to a computer device; of course, it is not limited to this and is not limited here.

[0035] In specific implementation, computer devices include but are not limited to: any one of mobile phones, tablet computers, laptop computers, and desktop computers; the server can be a single server or a server cluster, or a cloud server that provides cloud computing services.

[0036] like Figure 1 As shown, the bank card information identification method includes steps S101 to S104.

[0037] Step S101, obtaining a bank card image.

[0038] For example, when a bank card is obtained, the bank card can be photographed or scanned to obtain a bank card image, which can be used to subsequently determine the bank card information.

[0039] Exemplarily, when a bank card image is obtained, the information recognition model can enhance the contrast between the area corresponding to the bank card information and the area corresponding to the bank card background in the bank card image, so as to subsequently enhance the convenience of identifying the bank card information.

[0040] In some embodiments, when a bank card image is acquired, the bank card image may be subjected to image enhancement processing to achieve image enhancement of the bank card image. When the bank card image is subjected to image enhancement processing, the brightness of the bank card image may be increased, thereby increasing the contrast between the area corresponding to the bank card information and the area corresponding to the bank card background in the bank card image.

[0041] For example, an adaptive histogram equalization algorithm can be used to process a bank card image. For example, the adaptive histogram equalization algorithm can dynamically adjust the brightness and contrast of the bank card image according to the local area of ​​the bank card image, thereby enhancing the details and clarity of the bank card image. Of course, the image enhancement method for the bank card image is not limited to this and is not limited here.

[0042] In some embodiments, when a bank card image is acquired, the bank card image may contain noise, for example, and based on this, the bank card image may be denoised to enhance the contrast between the area corresponding to the bank card information and the area corresponding to the bank card background in the bank card image.

[0043] For example, the information recognition model can perform smoothing filtering on the bank card to denoise the bank card image. For example, the information recognition model can perform smoothing filtering on the bank card image through OpenCV. Taking Gaussian blur denoising as an example, the information recognition model can use a Gaussian kernel to perform smoothing filtering on the bank card image to reduce random noise and details in the bank card image, thereby improving the contrast between the area corresponding to the bank card information and the area corresponding to the background information in the bank card image. Of course, the denoising processing method of the bank card image is not limited to this and is not limited here.

[0044] By improving the contrast between the area corresponding to the bank card information and the area corresponding to the bank card background in the bank card image, the convenience of identifying the bank card information can be improved in the future.

[0045] Step S102: Based on the preprocessing sub-model of the information recognition model, the bank card image is preprocessed to obtain a character block image corresponding to the bank card image.

[0046] When a bank card image is obtained, the bank card image may be input into a preprocessing sub-model of an information recognition model, so as to perform image preprocessing on the bank card image through the preprocessing sub-model to obtain a character block image corresponding to the bank card image.

[0047] For example, when a bank card image is input into the preprocessing sub-model, the preprocessing sub-model can determine the area corresponding to the bank card information in the bank card image. For example, the preprocessing sub-model can improve the contrast between the area corresponding to the bank card information and the area corresponding to the bank card background in the bank card image by performing image preprocessing on the bank card image. Based on the improvement in contrast, the preprocessing sub-model can determine the area corresponding to the bank card information from the bank card image, and determine the character block image corresponding to the bank card image based on the area corresponding to the bank card information. The character block image can be used to indicate the image corresponding to each character included in the bank card information.

[0048] When the character block image corresponding to the bank card image is determined, the character block image corresponding to the bank card image can be used for subsequent determination of the bank card information.

[0049] In some embodiments, a bank card image is subjected to grayscale conversion processing and image binarization processing to obtain a processed bank card image; in the processed bank card image, a target image area is determined, and the target image area is the area corresponding to the bank card information; based on the target image area, a character block image is determined.

[0050] For example, when the preprocessing sub-model obtains a bank card image, it can perform grayscale conversion processing on the bank card image to convert the bank card image into a grayscale image. Since the grayscale image only contains brightness information but not color information, the preprocessing sub-model can perform image preprocessing on the grayscale image more conveniently than the color image. Based on this, by converting the bank card image into a grayscale image, it is helpful to reduce the dimension and complexity of the bank card image, so as to simplify the image preprocessing process of the bank card image by the preprocessing sub-model.

[0051] For example, after the bank card image is converted to a grayscale image, the preprocessing sub-model can perform image binarization on the bank card image. The preprocessing sub-model can classify each pixel in the bank card image as black or white according to a preset grayscale threshold. The preprocessing sub-model can use the maximum inter-class variance method (OTSU algorithm) or the adaptive threshold method to perform image binarization on the bank card image, without limitation. For example, when the grayscale value of pixel A in the grayscale image corresponding to the bank card image is less than or equal to the preset grayscale threshold, pixel A can be classified as black. When the grayscale value of pixel B in the grayscale image corresponding to the bank card image is greater than the preset grayscale threshold, pixel B can be classified as white. By analogy, determine the color of each pixel in the bank card image.

[0052] Since the color of the area corresponding to the bank card information in the bank card image is generally different from the color of the area corresponding to the bank card background, when the preprocessing sub-model performs grayscale image conversion and image binarization processing on the bank card image to obtain the processed bank card image, the difference between the area corresponding to the bank card information and the area corresponding to the bank card background in the processed bank card image is more obvious. Based on this, the preprocessing sub-model can determine the target image area in the processed bank card image according to the difference between the area corresponding to the bank card information and the area corresponding to the bank card background in the processed bank card image, and the target image area is the area corresponding to the bank card information.

[0053] Accordingly, when the target image area is determined, the preprocessing sub-model can determine the character block image according to the target image area.

[0054] Take bank card information including bank card number as an example. The bank card number may include multiple characters, such as multiple numbers. Based on this, when the preprocessing sub-model obtains the target image area, the target image area may include image areas corresponding to multiple characters. Then, the preprocessing sub-model may divide the target image area to determine the image areas corresponding to the multiple characters and obtain the character block image.

[0055] In this way, the bank card image is converted into grayscale and binarized through the preprocessing model of the information recognition model to obtain a processed bank card image. The processed bank card image can be used to determine the target image area to determine the character block image, which is conducive to improving the convenience of determining the character block image.

[0056] In some embodiments, the processed bank card image is expanded according to an expansion kernel of a preset size to obtain a preset image area; the preset image area is the area corresponding to the bank card information after the expansion process; and the target image area is determined from the processed bank card image according to the position information of the preset image area.

[0057] For example, when a processed bank card image is obtained, the preprocessing sub-model can perform expansion processing on the processed bank card image by using an expansion kernel of a preset size. By expanding the processed bank card, the area corresponding to the bank card information in the processed bank card image is expanded. In the process of expanding the area corresponding to the bank card information, the multiple characters included in the area corresponding to the bank card information are all expanded, and the gaps between any two adjacent characters in the multiple characters can be gradually reduced until any two adjacent characters in the multiple characters are connected to each other. Correspondingly, the multiple characters included in the area corresponding to the bank card information can be connected as a whole to obtain an expanded bank card image. Based on this, the preprocessing sub-model can identify the area corresponding to the bank card information based on the expanded bank card image to obtain a preset image area. The preset image area includes the bank card information after the expansion processing, and the preset image area is the area corresponding to the bank card information after the expansion processing.

[0058] In the case of determining the preset image area, the preprocessing sub-model can determine that the position information of the preset image area corresponds to the position information of the area corresponding to the bank card information on the processed bank card image, and the preprocessing sub-model can determine the target image area from the processed bank card image according to the position information of the preset image area. If the target image area includes the bank card information, the target image area is the area corresponding to the bank card information.

[0059] In this way, by dilating the processed bank card image, the area corresponding to the bank card information in the bank card image can be connected as a whole, which is conducive to improving the convenience of identifying the area corresponding to the bank card information, that is, it is conducive to improving the convenience of identifying the target image area. Based on the improvement of the convenience of identifying the target image area, the target image area can be used for the subsequent determination of the character block image, which is conducive to improving the convenience of determining the character block image, thereby improving the convenience of subsequently identifying the bank card information corresponding to the character block image.

[0060] In some implementations, vertical projection processing is performed on the target image area to obtain a character block image.

[0061] In the case of acquiring the target image area, the preprocessing submodel can segment the characters included in the target image area by performing vertical projection processing on the target image area to obtain a character block image. For example, when the target image area is determined from a processed bank card image, and the processed bank card image is obtained by grayscale conversion processing and image binarization processing on the bank card image, the preprocessing submodel can project on the target image area in the vertical direction to obtain a vertical projection histogram corresponding to the target image area. For example, for each pixel column in the target image area, any one of the number of white pixels and the number of black pixels in the pixel column is counted. At least one of the number of white pixels and the number of black pixels obtained by counting is determined as the value of the pixel column on the vertical projection histogram. By analogy, when determining the value of each pixel column in the target image area on the vertical projection histogram, the vertical projection histogram can display the peaks and troughs between the values ​​of the multiple pixel columns corresponding to the target image area. Among them, the peaks can be used to indicate the character area in the target image area, and the troughs can be used to indicate the non-character area in the target image area, such as the interval between adjacent characters. Based on this, the preprocessing sub-model can determine the segmentation position of the target image area according to the trough position on the vertical projection histogram, thereby segmenting the target image area into corresponding character block images.

[0062] Thus, by vertically projecting the target image area, a character block image can be obtained, which is conducive to improving the convenience of determining the character block image. The character block image can be used for subsequent determination of bank card information, which is conducive to improving the convenience of identifying bank card information.

[0063] In some implementations, the character block image is interpolated and enlarged to obtain a character block image of a preset size.

[0064] For example, when a character block image is obtained by vertically projecting the target image area, the sizes of the character block images corresponding to the multiple characters included in the bank card information may be different. In order to avoid the adverse effect of the size of the character block image on the convenience and accuracy of recognition of the bank card information, the character block image may be interpolated and enlarged to obtain a character block image of a preset size.

[0065] Taking the preset size of 64×64 as an example, the preprocessing sub-model can perform interpolation and enlargement processing on the character block image according to the preset size. Of course, the preset size is not limited to this, and the preset size can be preset or set by the user, which is not limited here.

[0066] Step S103: Based on the interpretability sub-model of the information recognition model, interpretability processing is performed on the character block image to obtain a target recognition area corresponding to the character block image.

[0067] When the character block image corresponding to the bank card image is determined, the character block image can be input into the interpretability sub-model of the information recognition model so that the character block image can be interpretably processed through the interpretability sub-model to obtain the target recognition area corresponding to the character block image.

[0068] For example, when a character block image is input into the interpretability sub-model, the character corresponding to the character block image needs to be determined based on the information recognition model to determine the bank card information corresponding to the character block image. Then, the interpretability sub-model can evaluate the recognition importance of each pixel in the character block image to the character corresponding to the character block image according to the interpretability method to obtain the target recognition area corresponding to the character block image. The target recognition area is used to indicate the area where the pixel points whose recognition importance to the character corresponding to the character block image is greater than or equal to a preset threshold are located.

[0069] Based on the determination of the target recognition area, the information recognition model can subsequently improve the recognition accuracy of the characters corresponding to the character block image, thereby improving the recognition accuracy of the bank card information corresponding to the character block image.

[0070] In some implementations, interpretability processing is performed on each pixel of the character block image to obtain a heat map corresponding to the character block image; based on the heat map, a target recognition area corresponding to the character block image is determined.

[0071] For example, the interpretability sub-model can perform interpretability processing on each pixel of the character block image to evaluate the recognition importance of each pixel in identifying the character corresponding to the character block image. Accordingly, the interpretability sub-model can generate a heat map corresponding to the character block image based on the recognition importance of each pixel. The heat map can intuitively show the recognition importance of each pixel to the character corresponding to the character block image. Based on this, the interpretability sub-model can determine the corresponding target recognition area from the character block image according to the heat map.

[0072] For example, the interpretability sub-model can determine the target recognition area corresponding to the character block image based on all the pixels whose recognition importance is greater than or equal to a preset threshold included in the character block image indicated by the heat map. The target recognition area can be used by the information recognition model to subsequently determine the bank card information corresponding to the character block image.

[0073] In some embodiments, each pixel of the character block image is processed for interpretability to obtain a feature image corresponding to the character block image; the feature image is back-propagated according to a preset gradient class activation mapping algorithm to obtain gradient information corresponding to the feature image; and a heat map corresponding to the character block image is determined based on the feature image and the gradient information.

[0074] For example, when a character block image is input into the interpretability sub-model, the interpretability sub-model can forward propagate the character block image to obtain a feature image corresponding to the character block image. Accordingly, the interpretability sub-model can backpropagate the feature image according to a preset gradient class activation mapping algorithm to obtain gradient information corresponding to the feature image. When the feature image and gradient information are determined, the interpretability sub-model can generate a heat map corresponding to the character block image by weighted summation. The heat map can be used to indicate the target recognition area corresponding to the character block image.

[0075] In this way, when the heat map corresponding to the character block image is determined, the heat map can be used to determine the target recognition area corresponding to the character block image, and the target recognition area corresponding to the character block image can be determined visually.

[0076] Step S104: Based on the recognition sub-model of the information recognition model, the character block image and the target recognition area are recognized to obtain the bank card information corresponding to the character block image.

[0077] For example, in the case of determining the character block image and the target recognition area corresponding to the character block image, the character block image and the target recognition area can be input into the recognition sub-model of the information recognition model, and the recognition sub-model can set different weight information for the target recognition area corresponding to the character block image and the area other than the target recognition area corresponding to the character block image, so as to recognize the characters corresponding to the character block image. For example, the recognition sub-model can smooth the area other than the target recognition area in the character block image to obtain the smoothed character block image, thereby recognizing the smoothed character block image to obtain the characters corresponding to the character block image. Accordingly, in the case of identifying the characters corresponding to the character block image, the recognition sub-model can determine the bank card information by combining the characters corresponding to all the character block images.

[0078] Taking the financial services related to bank cards in the financial field as an example, when a bank card image is obtained, the information recognition model can determine the character block image corresponding to the bank card image, and determine the characters corresponding to the character block image by combining the character block image and the target recognition area corresponding to the character block image, thereby determining the bank card information, which is conducive to improving the convenience and accuracy of identifying bank card information. Based on this, relevant personnel can process financial services based on the bank card information determined by the information recognition model, which is conducive to improving the processing efficiency of financial services.

[0079] In this way, when the information recognition model identifies the character block image and the target recognition area through the recognition sub-model and obtains the bank card information corresponding to the character block image, it can comprehensively identify the character block image and the target recognition area corresponding to the character block image to determine the bank card information, which is conducive to improving the convenience and accuracy of bank card information recognition.

[0080] The bank card information recognition method provided in the above embodiment obtains a bank card image; based on the preprocessing sub-model of the information recognition model, the bank card image is preprocessed to obtain a character block image corresponding to the bank card image; based on the interpretability sub-model of the information recognition model, the character block image is processed for interpretability to obtain a target recognition area corresponding to the character block image; based on the recognition sub-model of the information recognition model, the character block image and the target recognition area are recognized to obtain the bank card information corresponding to the character block image, so as to improve the convenience of identifying the bank card information. For example, it can be used for financial services related to bank cards in the financial field. When processing related financial services, if it is necessary to obtain the bank card information corresponding to the bank card, the bank card information can be determined by the bank card information recognition method, which is conducive to improving the convenience of identifying the bank card information. In addition, it is not necessary to spend a lot of manpower and time to obtain the bank card information required for processing financial services, which is conducive to improving the processing efficiency of financial services.

[0081] See also Figure 2 , Figure 2It is a flow chart of a training method for an information recognition model provided in an embodiment of the present application. It should be noted that the training method for the information recognition model provided in the embodiment of the present application can be used in a computer device, and of course can also be used in a server. For example, the server can obtain a training sample set from a computer device, process the training sample set according to the training method of the information recognition model, and obtain model optimization parameters for the information recognition model. And according to the model optimization parameters, adjust the model parameters of the information recognition model to obtain an optimized information recognition model. Exemplarily, the server can, for example, send the optimized information recognition model to a computer device, so that when the computer device obtains a bank card image, it can determine the bank card information through the optimized information recognition model; of course, it is not limited to this, and no limitation is made here.

[0082] In specific implementation, computer devices include but are not limited to: any one of mobile phones, tablet computers, laptop computers, and desktop computers; the server can be a single server or a server cluster, or a cloud server that provides cloud computing services.

[0083] like Figure 2 As shown, the training method of the information recognition model includes steps S201 to S206.

[0084] Step S201: Acquire a training sample set, where the training sample set includes a plurality of bank card images and bank card information labels corresponding to each bank card image.

[0085] For example, when training the information recognition model, a training sample set may be obtained. The training sample set may include multiple bank card images. Each bank card image in the training sample set may be provided with a corresponding bank card information label. The training sample set may be used for subsequent training of the information recognition model.

[0086] In some embodiments, when a bank card image is obtained, the bank card image can be rotated according to a preset rotation angle to obtain a rotated bank card image. Both the rotated bank card image and the bank card image can be used as bank card images in a training sample set to train an information recognition model. The bank card information labels corresponding to the rotated bank card image and the bank card image are the same. Based on the fact that the preset rotation angles corresponding to the rotated bank card image and the bank card image are different, the diversity and robustness of the bank card images in the training sample set can be improved. Accordingly, when the information recognition model is trained according to the training sample set, it is beneficial to improve the recognition robustness of the information recognition model to the bank card image.

[0087] In some implementations, when a bank card image is acquired, the bank card information tag corresponding to the bank card image may be determined by a preset annotation method, which is not limited herein.

[0088] In this way, when the bank card image and the bank card information label corresponding to the bank card image are determined, the information recognition model can be trained subsequently.

[0089] Step S202: Based on the preprocessing sub-model of the information recognition model, perform image preprocessing on the bank card image to obtain a character block image corresponding to the bank card image.

[0090] For example, when training the information recognition model, it is necessary to learn how to determine the character block image corresponding to the bank card image. Based on this, the bank card image can be input into the preprocessing sub-model of the information recognition model, so that the preprocessing sub-model can perform image preprocessing on the bank card image to obtain the character block image corresponding to the bank card image.

[0091] In this way, when the character block image corresponding to the bank card image is determined, the information recognition model can optimize the model parameters of the information recognition model based on the character block image to improve the training effect of the information recognition model.

[0092] Step S203: Based on the interpretability sub-model of the information recognition model, interpretability processing is performed on the character block image to obtain the target recognition area corresponding to the character block image.

[0093] For example, when training the information recognition model, it is necessary to learn how to determine the target recognition area corresponding to the character block image. Based on this, the character block image can be input into the interpretability sub-model to perform interpretability processing on the character block image based on the interpretability sub-model to obtain the target recognition area corresponding to the character block image.

[0094] In this way, when the target recognition area corresponding to the character block image is determined, the information recognition model can optimize the model parameters of the information recognition model based on the target recognition area to improve the training effect of the information recognition model.

[0095] Step S204: Based on the recognition sub-model of the information recognition model, the character block image and the target recognition area are recognized to obtain the bank card information corresponding to the character block image.

[0096] For example, when training the information recognition model, it is necessary to learn how to determine the bank card information corresponding to the character block image. Based on this, the character block image and the target recognition area can be input into the recognition sub-model, so as to recognize the character block image and the target recognition area based on the recognition sub-model and obtain the bank card information corresponding to the character block image.

[0097] In this way, when the bank card information corresponding to the character block image is determined, the information recognition model can integrate the bank card information and optimize the model parameters of the information recognition model to improve the training effect of the information recognition model.

[0098] Step S205: Determine the model optimization parameters of the information recognition model according to the bank card information and the bank card information tag.

[0099] For example, the bank card information determined by the information recognition model is equivalent to the prediction result of the information recognition model for the bank card image. The bank card information label corresponding to the bank card image is equivalent to the actual result of the information recognition model for the bank card image. Based on the bank card information and the bank card information label, the loss value between the actual result and the prediction result of the information recognition model when determining the bank card information can be determined.

[0100] The information recognition model can determine the model optimization parameters of the information recognition model according to the loss value. The model optimization parameters can be used to subsequently adjust the model parameters of the information recognition model so that the information recognition model can more accurately move the prediction result of the information recognition model for the bank card information corresponding to the bank card image closer to the actual result, thereby achieving the purpose of training.

[0101] Step S206: adjust the model parameters of the information recognition model according to the model optimization parameters.

[0102] For example, the information recognition model can adjust the model parameters of the information recognition model according to the model optimization parameters. For example, the information recognition model can adjust the model parameters of at least one of the preprocessing sub-model, the interpretability sub-model, and the recognition sub-model according to the model optimization parameters, which is not limited here.

[0103] By adjusting the model parameters of the information recognition model, the information recognition model can more accurately bring the predicted results of the bank card information corresponding to the bank card image closer to the actual results, thereby achieving the purpose of training, which is conducive to improving the information recognition model's recognition accuracy of bank card information.

[0104] The training method of the information recognition model provided in the above embodiment is by obtaining a training sample set, the training sample set includes multiple bank card images and bank card information labels corresponding to each bank card image; based on the preprocessing sub-model of the information recognition model, the bank card image is preprocessed to obtain the character block image corresponding to the bank card image; based on the interpretability sub-model of the information recognition model, the character block image is interpretably processed to obtain the target recognition area corresponding to the character block image; based on the recognition sub-model of the information recognition model, the character block image and the target recognition area are recognized to obtain the bank card information corresponding to the character block image; according to the bank card information and the bank card information label, the model optimization parameters of the information recognition model are determined; according to the model optimization parameters, the model parameters of the information recognition model are adjusted to improve the recognition accuracy of the bank card information, thereby improving the training effect of the information recognition model. The information recognition model can be subsequently applied to financial services related to bank cards, which is conducive to improving the convenience of identifying bank card information. For example, for financial services related to bank cards. When processing related financial services, if it is necessary to obtain the bank card information corresponding to the bank card, the bank card information can be identified through the information recognition model to improve the convenience of identifying the bank card information. In addition, there is no need to spend a lot of manpower and time to obtain the bank card information required for processing financial services, or to formulate the recognition template and feature extraction rules corresponding to the bank card information, which is conducive to improving the processing efficiency of financial services.

[0105] See also Figure 3 , Figure 3 This is a schematic block diagram of a bank card information recognition device provided in an embodiment of the present application. The recognition device can be configured in a server or an electronic device to execute the bank card information recognition method described above.

[0106] like Figure 3 As shown, the recognition device includes: an image acquisition module 110, a character block image determination module 120, a recognition area determination module 130 and a recognition module 140.

[0107] The image acquisition module 110 is used to acquire a bank card image.

[0108] The character block image determination module 120 is used to perform image preprocessing on the bank card image based on the preprocessing sub-model of the information recognition model to obtain the character block image corresponding to the bank card image.

[0109] The recognition area determination module 130 is used to perform interpretability processing on the character block image based on the interpretability sub-model of the information recognition model to obtain the target recognition area corresponding to the character block image.

[0110] The recognition module 140 is used to recognize the character block image and the target recognition area based on the recognition sub-model of the information recognition model to obtain the bank card information corresponding to the character block image.

[0111] It should be noted that technicians in the relevant field can clearly understand that for the convenience and simplicity of description, the specific working processes of the above-described devices and modules and units can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0112] The method of the present application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld devices or portable devices, tablet devices, multiprocessor 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, etc. 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 distributed computing environments, in which 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.

[0113] Exemplarily, the above method and apparatus may be implemented in the form of a computer program, which may be run on a computer device.

[0114] See also Figure 4 , Figure 4 1 is a schematic block diagram of a computer device provided in an embodiment of the present application. The computer device may be a server or an electronic device.

[0115] like Figure 4 As shown, the computer device includes a processor, a memory, and a network interface connected via a system bus, wherein the memory may include a storage medium and an internal memory.

[0116] The storage medium can store an operating system and a computer program. The computer program includes program instructions, and when the program instructions are executed, the processor can execute any bank card information recognition method, or can execute any information recognition model training method.

[0117] The processor is used to provide computing and control capabilities and support the operation of the entire computer equipment.

[0118] The internal memory provides an environment for the operation of the computer program in the storage medium. When the computer program is executed by the processor, the processor can execute any bank card information recognition method, or can execute any information recognition model training method.

[0119] The network interface is used for network communication, such as sending assigned tasks, etc. Those skilled in the art will understand that Figure 4 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0120] It should be understood that the processor may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0121] In one embodiment, the processor is used to execute a computer program and implement the following steps when executing the computer program:

[0122] Get bank card image;

[0123] Based on the preprocessing sub-model of the information recognition model, the bank card image is preprocessed to obtain a character block image corresponding to the bank card image;

[0124] Based on the interpretability sub-model of the information recognition model, the character block image is processed for interpretability to obtain a target recognition area corresponding to the character block image;

[0125] Based on the recognition sub-model of the information recognition model, the character block image and the target recognition area are recognized to obtain the bank card information corresponding to the character block image.

[0126] It should be noted that those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of bank card information recognition described above can refer to the corresponding process in the aforementioned bank card information recognition method embodiment, and will not be repeated here.

[0127] In another embodiment, the processor is used to execute a computer program and implement the following steps when executing the computer program:

[0128] Acquire a training sample set, wherein the training sample set includes a plurality of bank card images and bank card information labels corresponding to each of the bank card images;

[0129] Based on the preprocessing sub-model of the information recognition model, the bank card image is preprocessed to obtain a character block image corresponding to the bank card image;

[0130] Based on the interpretability sub-model of the information recognition model, the character block image is processed for interpretability to obtain a target recognition area corresponding to the character block image;

[0131] Based on the recognition sub-model of the information recognition model, the character block image and the target recognition area are recognized to obtain the bank card information corresponding to the character block image;

[0132] Determining model optimization parameters of the information recognition model according to the bank card information and the bank card information tag;

[0133] According to the model optimization parameters, the model parameters of the information recognition model are adjusted.

[0134] It should be noted that technical personnel in the relevant field can clearly understand that, for the convenience and conciseness of description, the specific working process of the training of the above-mentioned information recognition model can refer to the corresponding process in the aforementioned information recognition model training method embodiment, and will not be repeated here.

[0135] An embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored. The method implemented when the computer program is executed by a processor can refer to the various embodiments of the bank card information recognition method of the present application, or can refer to the various embodiments of the information recognition model training method of the present application.

[0136] The computer-readable storage medium may be an internal storage unit of the computer device described in the foregoing embodiment, such as a hard disk or memory of the computer device. The computer-readable storage medium may also be an external storage device of the computer device, such as a plug-in hard disk, a smart memory card (SmartMedia Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc., equipped on the computer device.

[0137] It should be understood that the terms used in this application specification are only for the purpose of describing specific embodiments and are not intended to limit the application. As used in this application specification and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.

[0138] It should also be understood that the term "and / or" used in the specification of this application and the appended claims refers to any combination of one or more of the associated listed items and all possible combinations, including these combinations. It should be noted that, in this article, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "including a..." does not exclude the presence of other identical elements in the process, method, article or system including the element.

[0139] The serial numbers of the embodiments of the present application are for description only and do not represent the advantages and disadvantages of the embodiments. The above description is only a specific implementation mode of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present application, and these modifications or replacements should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.

Claims

1. A method for identifying bank card information, characterized in that: include: Get bank card image; Based on the preprocessing sub-model of the information recognition model, the bank card image is preprocessed to obtain a character block image corresponding to the bank card image; Based on the interpretability sub-model of the information recognition model, the character block image is processed for interpretability to obtain a target recognition area corresponding to the character block image; Based on the recognition sub-model of the information recognition model, the character block image and the target recognition area are recognized to obtain the bank card information corresponding to the character block image.

2. The identification method according to claim 1, characterized in that: The preprocessing sub-model based on the information recognition model performs image preprocessing on the bank card image to obtain a character block image corresponding to the bank card image, including: Performing grayscale conversion processing and image binarization processing on the bank card image to obtain a processed bank card image; In the processed bank card image, determining a target image area, the target image area being an area corresponding to the bank card information; The character block image is determined according to the target image area.

3. The identification method according to claim 2, characterized in that: Determining a target image area in the processed bank card image includes: The processed bank card image is expanded according to an expansion kernel of a preset size to obtain the preset image area; the preset image area is the area corresponding to the bank card information after the expansion process; According to the position information of the preset image area, a target image area is determined from the processed bank card image.

4. The identification method according to claim 2, characterized in that: Determining the character block image according to the target image area includes: The target image area is vertically projected to obtain the character block image.

5. The identification method according to claim 4, characterized in that: After the target area is vertically projected to obtain the character block image, the method further includes: The character block image is interpolated and enlarged to obtain a character block image of a preset size.

6. The identification method according to any one of claims 1 to 5, characterized in that: The interpretability sub-model based on the information recognition model performs interpretability processing on the character block image to obtain the target recognition area corresponding to the character block image, including: Perform interpretability processing on each pixel of the character block image to obtain a heat map corresponding to the character block image; According to the heat map, the target recognition area corresponding to the character block image is determined.

7. The identification method according to claim 6, characterized in that: The interpretability processing is performed on each pixel point of the character block image to obtain a heat map corresponding to the character block image, including: Perform interpretability processing on each pixel point of the character block image to obtain a feature image corresponding to the character block image; According to a preset gradient class activation mapping algorithm, back-propagation is performed on the feature image to obtain gradient information corresponding to the feature image; According to the feature image and the gradient information, a thermal map corresponding to the character block image is determined.

8. A training method for an information recognition model, characterized in that: The training method comprises: Acquire a training sample set, wherein the training sample set includes a plurality of bank card images and bank card information labels corresponding to each of the bank card images; Based on the preprocessing sub-model of the information recognition model, the bank card image is preprocessed to obtain a character block image corresponding to the bank card image; Based on the interpretability sub-model of the information recognition model, the character block image is processed for interpretability to obtain a target recognition area corresponding to the character block image; Based on the recognition sub-model of the information recognition model, the character block image and the target recognition area are recognized to obtain the bank card information corresponding to the character block image; Determining model optimization parameters of the information recognition model according to the bank card information and the bank card information tag; According to the model optimization parameters, the model parameters of the information recognition model are adjusted.

9. A bank card information recognition device, characterized in that: The identification device comprises: An image acquisition module, used to acquire bank card images; A character block image determination module, used to perform image preprocessing on the bank card image based on a preprocessing sub-model of an information recognition model to obtain a character block image corresponding to the bank card image; A recognition area determination module, used to perform interpretability processing on the character block image based on the interpretability sub-model of the information recognition model to obtain a target recognition area corresponding to the character block image; The recognition module is used to recognize the character block image and the target recognition area based on the recognition sub-model of the information recognition model to obtain the bank card information corresponding to the character block image.

10. A computer device, characterized in that: The computer device includes a memory and a processor; The memory is used to store computer programs; The processor is used to execute the computer program and implement the bank card information recognition method as described in any one of claims 1 to 6 when executing the computer program, or implement the information recognition model training method as described in claim 7.