Financial card number identification method and device, electronic equipment and storage medium

By using a deep learning model to perform tilt correction and text recognition on financial card images, the problem of low recognition accuracy in traditional recognition methods is solved and high-precision card number recognition is achieved.

CN120708234APending Publication Date: 2025-09-26INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510794525.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-13
Publication Date
2025-09-26

AI Technical Summary

Technical Problem

Traditional financial card information recognition methods are limited by the selection of manual features, are difficult to cope with diverse image quality and complex background interference, and have low recognition accuracy.

Method used

A deep learning model is used to detect the card number position, and the card number positioning model and card number recognition model are used to perform tilt correction and text recognition on financial card images. This includes steps such as feature extraction, multi-scale feature merging, card number position prediction, and text transcription.

Benefits of technology

It can accurately locate the card number position and accurately identify the card number information, thereby improving the accuracy of financial card number recognition.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120708234A_ABST
    Figure CN120708234A_ABST
Patent Text Reader

Abstract

The invention discloses a financial card number identification method and device, electronic equipment and a storage medium, and relates to the field of artificial intelligence and other related technical fields, and the method comprises the steps: obtaining a financial card image of a target financial card, and carrying out the preprocessing of the financial card image; performing tilt correction processing on the preprocessed financial card image to obtain a financial card image after tilt correction; the financial card image subjected to tilt correction is input into a financial card number identification model, card number information of a target financial card is output, the financial card number identification model comprises a card number positioning model and a card number identification model, the card number positioning model is used for detecting the card number position from the financial card image, and the card number identification model is used for identifying the card number information of the target financial card. The card number recognition model is used for performing text recognition based on the card number position. According to the method and the device, the technical problem of relatively low identification precision of a mode of identifying financial card information based on a preset characteristic template or characteristic in related technologies is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of artificial intelligence, financial technology or other related technologies, and more specifically, to a method for identifying a financial card number, a device thereof, an electronic device and a storage medium. Background Art

[0002] With the rapid development and widespread adoption of mobile internet, digital financial transactions have become an integral part of daily life, particularly in e-commerce and online payments. As a crucial component of the modern financial system, debit cards, with their frequency and convenience, have significantly facilitated economic activity. However, the traditional method of manually entering debit card information—entering the card number—is time-consuming and error-prone, particularly in the fast-paced mobile payment landscape. The user experience is far from optimal. Therefore, automated and accurate recognition of debit card information is crucial for improving the quality and efficiency of financial services.

[0003] Related technologies utilize computer vision technology to identify financial card information using pre-defined templates or features, along with image processing techniques such as edge detection and connected domain analysis. However, these methods are limited by the manual selection of features, struggle to cope with diverse image quality and complex background interference, and result in low recognition accuracy.

[0004] To address the above-mentioned problems, no effective solutions have been proposed so far. Summary of the Invention

[0005] Embodiments of the present invention provide a method and apparatus for identifying a financial card number, an electronic device, and a storage medium thereof, to at least address the technical problem in related technologies of low recognition accuracy in identifying financial card information based on preset characteristic templates or features.

[0006] According to one aspect of an embodiment of the present invention, a method for recognizing a financial card number is provided, comprising: obtaining a financial card image of a target financial card and preprocessing the financial card image; performing tilt correction on the preprocessed financial card image to obtain a tilt-corrected financial card image; and inputting the tilt-corrected financial card image into a financial card number recognition model to output card number information of the target financial card. The financial card number recognition model is a pre-built model for recognizing financial card numbers, and includes a card number positioning model and a card number recognition model. The card number positioning model is configured to detect a card number position from the financial card image, and the card number recognition model is configured to perform text recognition based on the card number position.

[0007] Furthermore, the step of inputting the tilt-corrected financial card image into the financial card number recognition model to output the card number information of the target financial card includes: inputting the tilt-corrected financial card image into a card number positioning model of the financial card number recognition model, detecting the position of the card number in the financial card image based on the card number positioning model, and outputting a text image; and inputting the text image into a card number recognition model of the financial card number recognition model, recognizing text in the text image based on the card number recognition model, and outputting the card number information of the target financial card.

[0008] Furthermore, the step of detecting the card number location of the financial card image based on the card number location model includes: extracting features from the financial card image through a feature extraction layer of the card number location model to obtain a multi-scale feature map, wherein the feature extraction layer includes K convolutional layers, each convolutional layer corresponds to feature extraction at a different scale, and K is a positive integer; merging the multi-scale feature maps to obtain merged features; inputting the merged features into N branch prediction layers of the card number location model respectively to output N position prediction vectors, wherein N is a positive integer; and inputting the position prediction vectors into an output layer of the card number location model, constructing a text image based on the output layer, and outputting the text image.

[0009] Furthermore, the step of recognizing the text in the text image based on the card number recognition model includes: extracting features of the text image through the convolutional neural network layer of the card number recognition model to obtain text features; inputting the text features into the recurrent neural network layer of the card number recognition model to output sequence modeling results; inputting the sequence modeling results into the transcription layer of the card number recognition model to convert the sequence modeling results into a character label sequence.

[0010] Furthermore, the steps of performing tilt correction on the pre-processed financial card image to obtain the tilt-corrected financial card image include: determining an edge region of the financial card image based on an edge detection algorithm, and extracting a financial card outline based on the edge region; analyzing the financial card outline to determine a tilt angle of the financial card outline relative to a reference outline; rotating the financial card image based on the tilt angle to adjust the financial card image to a horizontal state; and performing perspective transformation on the rotated financial card image to obtain the tilt-corrected financial card image.

[0011] Furthermore, the step of analyzing the financial card contour to determine the tilt angle of the financial card contour relative to the reference contour includes: determining the card type of the target financial card and calling a card template based on the card type; extracting the reference contour based on a horizontal card image of the card template; and comparing the financial card contour with the reference contour to determine the tilt angle of the financial card contour relative to the reference contour.

[0012] Furthermore, the step of pre-processing the financial card image includes: performing denoising on the financial card image; converting the denoised financial card image into a grayscale image; and performing binarization on the grayscale image to enhance text edges in the grayscale image.

[0013] According to another aspect of an embodiment of the present invention, a financial card number recognition device is provided, comprising: an acquisition unit configured to acquire a financial card image of a target financial card and pre-process the financial card image; a processing unit configured to perform tilt correction on the pre-processed financial card image to obtain the tilt-corrected financial card image; and an output unit configured to input the tilt-corrected financial card image into a financial card number recognition model and output the card number information of the target financial card. The financial card number recognition model is a pre-built model for recognizing financial card numbers, and comprises a card number positioning model and a card number recognition model. The card number positioning model is configured to detect a card number position from the financial card image, and the card number recognition model is configured to perform text recognition based on the card number position.

[0014] Furthermore, the output unit includes: a first detection module, configured to input the tilt-corrected financial card image into a card number positioning model of the financial card number recognition model, detect the card number position of the financial card image based on the card number positioning model, and output a text image; and a first recognition module, configured to input the text image into a card number recognition model of the financial card number recognition model, recognize text in the text image based on the card number recognition model, and output the card number information of the target financial card.

[0015] Furthermore, the first detection module includes: a first extraction submodule, used to extract features from the financial card image through the feature extraction layer of the card number positioning model to obtain a multi-scale feature map, wherein the feature extraction layer includes K convolution layers, each convolution layer corresponds to feature extraction at a different scale, and K is a positive integer; a first merging submodule, used to merge the multi-scale feature maps to obtain merged features; a first output submodule, used to input the merged features into N branch prediction layers of the card number positioning model respectively, and output N position prediction vectors, wherein N is a positive integer; and a first construction submodule, used to input the position prediction vector into the output layer of the card number positioning model, construct a text image based on the output layer, and output it.

[0016] Furthermore, the first recognition module includes: a second extraction submodule, used to extract features from the text image through the convolutional neural network layer of the card number recognition model to obtain text features; a second output submodule, used to input the text features into the recurrent neural network layer of the card number recognition model and output sequence modeling results; and a first conversion submodule, used to input the sequence modeling results into the transcription layer of the card number recognition model and convert the sequence modeling results into a character label sequence.

[0017] Furthermore, the processing unit includes: a first determination module for determining an edge region of the financial card image based on an edge detection algorithm and extracting a financial card outline based on the edge region; a second determination module for analyzing the financial card outline and determining a tilt angle of the financial card outline relative to a reference outline; a first rotation module for rotating the financial card image based on the tilt angle to adjust the financial card image to a horizontal state; and a first transformation module for performing a perspective transformation on the rotated financial card image to obtain a tilt-corrected financial card image.

[0018] Furthermore, the second determination module includes: a first determination submodule, configured to determine the card type of the target financial card and call a card template based on the card type; a third extraction submodule, configured to extract the reference outline based on a horizontal card image of the card template; and a first comparison submodule, configured to compare the financial card outline with the reference outline to determine an inclination angle of the financial card outline relative to the reference outline.

[0019] Furthermore, the acquisition unit includes: a first processing module for performing denoising on the financial card image; a first conversion module for converting the denoised financial card image into a grayscale image; and a second processing module for performing binarization on the grayscale image to enhance text edges in the grayscale image.

[0020] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is further provided, wherein the computer-readable storage medium includes a stored computer program, wherein when the computer program is executed, the device where the computer-readable storage medium is located is controlled to execute any of the above-mentioned financial card number recognition methods.

[0021] According to another aspect of an embodiment of the present invention, an electronic device is also provided, comprising one or more processors and a memory, wherein the memory is used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement any of the above-mentioned methods for identifying a financial card number.

[0022] In this application, the following steps are performed: obtaining a financial card image of a target financial card, preprocessing the financial card image, then performing tilt correction on the preprocessed financial card image to obtain a tilt-corrected financial card image, and finally inputting the tilt-corrected financial card image into a financial card number recognition model to output the card number information of the target financial card. The financial card number recognition model is a pre-built model for recognizing financial card numbers, and the financial card number recognition model includes a card number positioning model and a card number recognition model. The card number positioning model is used to detect the card number position from the financial card image, and the card number recognition model is used to perform text recognition based on the card number position.

[0023] In this application, a tilt correction process is performed on a financial card image to reduce inaccuracies caused by image deformation. A deep learning model is then used to detect the card number position, accurately locating the card number and providing a more precise input area for the card number recognition model. The card number recognition model then performs precise text recognition to obtain the card number information, achieving the goals of accurately locating the card number position and accurately identifying the card number information, and achieving the technical effect of improving the accuracy of financial card number recognition. This solves the technical problem of low recognition accuracy in related technologies that use preset feature templates or characteristics to identify financial card information. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:

[0025] Figure 1 A hardware structure block diagram of a computer terminal (or mobile device) for implementing a method for identifying a financial card number is shown;

[0026] Figure 2 is a flow chart of an optional financial card number recognition method according to an embodiment of the present invention;

[0027] Figure 3 is a schematic diagram of an optional financial card number recognition process according to an embodiment of the present invention;

[0028] Figure 4 is a schematic diagram of an optional financial card number recognition device according to an embodiment of the present invention;

[0029] Figure 5 This is a hardware structure block diagram of an optional electronic device (or mobile device) for executing a financial card number recognition method according to an embodiment of the present invention. DETAILED DESCRIPTION

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

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

[0032] It should be noted that the financial card number recognition method and device in this application can be used in the field of artificial intelligence when financial card numbers are accurately recognized based on artificial intelligence, and can also be used in any field other than the field of artificial intelligence when financial card numbers are accurately recognized based on artificial intelligence. This application does not limit the application field of the financial card number recognition method and device.

[0033] It should be noted that the collected information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for display, data for analysis, etc.) involved in this application are information and data authorized by the user or fully authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of the relevant data comply with relevant laws, regulations and standards, take necessary confidentiality measures, do not violate public order and good morals, and provide corresponding operation portals for users to choose to authorize or refuse. For example, an interface is set up between this system and relevant users or institutions to provide users with corresponding operation portals for users to choose to agree or refuse the automated decision-making results; if the user chooses to refuse, the expert decision-making process will be entered.

[0034] The following embodiments of the present invention can be applied to various financial card number recognition systems / applications / devices. Through tilt correction, card number position detection, and card number information recognition mechanisms, the present invention accurately recognizes financial card numbers, improves recognition accuracy, and enhances user experience.

[0035] The present invention will be described in detail below with reference to various embodiments.

[0036] Example 1

[0037] According to an embodiment of the present invention, an embodiment of a method for identifying a financial card number is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0038] The method embodiment provided in the first embodiment of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Figure 1 The hardware structure block diagram of a computer terminal (or mobile device) for implementing a method for identifying a financial card number is shown. Figure 1 As shown, the computer terminal 10 (or mobile device) may include one or more (illustrated as 102a, 102b, ..., 102n in the figure) processors 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 104 for storing data, and a transmission device 106 for communication functions. In addition, it may also include: a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of the BUS bus), a network interface, a power supply and / or a camera. It will be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above electronic device. Figure 1 More or fewer components than shown, or with Figure 1 Different configurations shown.

[0039] It should be noted that the one or more processors 102 and / or other data processing circuits described above may generally be referred to herein as "data processing circuitry". The data processing circuitry may be embodied in whole or in part as software, hardware, firmware, or any other combination thereof. In addition, the data processing circuitry may be a single independent processing module, or may be incorporated in whole or in part into any of the other components of the computer terminal 10 (or mobile device). As described in the embodiments of the present application, the data processing circuitry serves as a processor control (e.g., selection of a variable resistor terminal path connected to an interface).

[0040] The memory 104 can be used to store software programs and modules for application software, such as the program instructions / data storage device corresponding to the financial card number recognition method in the embodiments of the present application. The processor 102 executes the software programs and modules stored in the memory 104 to perform various functional applications and data processing, thereby implementing the above-mentioned financial card number recognition method. The memory 104 may include high-speed random access memory and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include memory remotely located relative to the processor 102, and these remote memories may be connected to the computer terminal 10 via a network. Examples of such networks include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0041] The transmission device 106 is configured to receive or transmit data via a network. A specific example of the aforementioned network may include a wireless network provided by the communications provider of the computer terminal 10. In one embodiment, the transmission device 106 includes a network interface controller (NIC), which can be connected to other network devices via a base station to enable communication with the Internet. In another embodiment, the transmission device 106 may be a radio frequency (RF) module, which is configured to communicate with the Internet wirelessly.

[0042] The display may be, for example, a touch screen liquid crystal display (LCD) that enables a user to interact with a user interface of the computer terminal 10 (or mobile device).

[0043] Under the above operating environment, this application provides Figure 2 The financial card number identification method shown is implemented by a financial card number identification system.

[0044] Figure 2 FIG. 1 is a flow chart of an optional method for identifying a financial card number according to an embodiment of the present invention. Figure 2 As shown, the method includes the following steps:

[0045] In today's digital economy, online payments have become an integral part of daily life. They not only represent convenience and efficiency, but also represent a crucial frontier for financial security and personal privacy protection. As a core element of online payments, the importance of accurate identification of debit card numbers is self-evident. Accurate card number recognition is a prerequisite for smooth payment transactions. Even the slightest error can lead to transaction failures, delays for users, and even unnecessary financial disputes, damaging user experience and trust. Furthermore, the secure handling of debit card numbers is crucial to the safety of personal funds. Accurate identification effectively mitigates financial risks caused by misidentification, providing solid protection for every transaction.

[0046] Step S201: Acquire a financial card image of a target financial card and pre-process the financial card image.

[0047] In step S201, an image of the target financial card may be acquired through a camera, scanner, or other image acquisition device to obtain a financial card image. The acquired financial card image is then subjected to a series of preprocessing operations to optimize image quality and make it more suitable for processing by a deep learning model. The preprocessing operations may include denoising, normalization, grayscale conversion, image enhancement, and other operations.

[0048] Furthermore, the step of pre-processing the financial card image includes: performing denoising on the financial card image; converting the denoised financial card image into a grayscale image; and performing binarization on the grayscale image to enhance text edges in the grayscale image.

[0049] Specifically, preprocessing of financial card images includes denoising. Algorithms such as Gaussian filtering, median filtering, or bilateral filtering can be applied to remove random noise and speckle from the financial card image, ensuring image clarity and quality, reducing uncertainty in subsequent processing, and improving feature detection accuracy. The denoised financial card image is then converted from color to grayscale by converting the color space. This simplifies the dimensionality of the image data and reduces computing resource requirements. Grayscale images also better highlight the outlines of text and numbers, facilitating subsequent feature extraction and analysis. Finally, the grayscale image is binarized, dividing the pixels in the image into "foreground" and "background" categories, typically achieved by setting a threshold. This process aims to enhance text edges, making them more visible in the image and facilitating subsequent morphological processing and card number detection and location. By appropriately reducing the grayscale value of the background and increasing the grayscale value of the foreground (i.e., the card number area), the card number region can be clearly highlighted against a complex background, providing higher-quality data input for subsequent deep learning models.

[0050] Step S202 : performing tilt correction on the pre-processed financial card image to obtain a tilt-corrected financial card image.

[0051] In step S202, tilted images can be distorted, leading to inaccurate image recognition. Tilt correction is performed on the financial card image to improve recognition accuracy. Tilt correction involves tilt angle detection and perspective transformation. Tilt angle detection identifies the tilt of the financial card image relative to the horizontal plane, while perspective transformation restores the distorted financial card image to a near-frontal perspective by calculating an appropriate transformation matrix.

[0052] Furthermore, the steps of performing tilt correction on the pre-processed financial card image to obtain a tilt-corrected financial card image include: determining an edge region of the financial card image based on an edge detection algorithm, and extracting a financial card outline based on the edge region; analyzing the financial card outline to determine a tilt angle of the financial card outline relative to a reference outline; rotating the financial card image based on the tilt angle to adjust the financial card image to a horizontal state; and performing perspective transformation on the rotated financial card image to obtain a tilt-corrected financial card image.

[0053] Specifically, an edge detection algorithm is used to determine the edge of the financial card image—the boundary between the card and background—to extract the card's outline. The outline is then fitted to find the minimum bounding rectangle (MBR), which may be at an angle to the horizontal. The tilt angle of the MBR is then calculated by comparing it with a reference outline, determining the card's tilt relative to a horizontal reference. The reference outline refers to the outline of a reference financial card on a horizontal reference. The card image is then rotated based on the tilt angle to level it.

[0054] Even if an object in an image (such as a bank card) is adjusted to be horizontal through rotation, the true shape and proportion of the object in the image may still be distorted if the camera and the object are not at the same height or the relative position of the object and the lens is not perpendicular. This distortion cannot be corrected by rotation alone. Therefore, a perspective transformation is required on the rotated bank card image. The perspective transformation can eliminate perspective distortion and ensure that each part of the bank card image is in the correct relative position, providing the optimal image input for the final card number recognition.

[0055] Furthermore, the steps of analyzing the financial card contour and determining the tilt angle of the financial card contour relative to the reference contour include: determining the card type of the target financial card and calling a card template based on the card type; extracting a reference contour based on a horizontal card image of the card template; and comparing the financial card contour with the reference contour to determine the tilt angle of the financial card contour relative to the reference contour.

[0056] Specifically, the reference outline is determined based on the type of financial card. The target financial card type is identified, such as a credit card, debit card, or other specific types of financial cards. Different types of cards may have different shapes. Based on the card type, the card template corresponding to the type of financial card is called. The card template is an image template pre-created according to the standard size and layout of various types of financial cards. It represents the ideal state of the financial card in the horizontal direction without tilt or distortion. From the card template, the system extracts a horizontally placed reference outline. Finally, the financial card outline of the target financial card is compared with the reference outline. The minimum circumscribed rectangle between the actual financial card outline and the reference outline, and by comparing the angle difference between the two rectangles, the tilt angle of the financial card outline relative to the reference outline can be determined.

[0057] Step S203: Input the tilt-corrected financial card image into a financial card number recognition model to output the card number information of the target financial card.

[0058] In step S203, the financial card image of the target financial card is recognized using a financial card number recognition model to obtain the target financial card number information. The financial card number recognition model is a pre-built model for recognizing financial card numbers. The financial card number recognition model includes a card number location model and a card number recognition model. The card number location model is used to detect the card number location from the financial card image and may include a feature extraction layer, a feature merging layer, and an output layer. The card number recognition model is used to perform text recognition based on the card number location and may include a feature extraction layer, a recurrent neural network layer, and a transcription layer.

[0059] Furthermore, the step of inputting the tilt-corrected financial card image into the financial card number recognition model and outputting the card number information of the target financial card includes: inputting the tilt-corrected financial card image into a card number positioning model of the financial card number recognition model, detecting the card number position of the financial card image based on the card number positioning model, and outputting a text image; inputting the text image into a card number recognition model of the financial card number recognition model, recognizing text in the text image based on the card number recognition model, and outputting the card number information of the target financial card.

[0060] Specifically, a tilt-corrected financial card image is fed into a pre-built financial card number recognition model, which aims to accurately output the target financial card's card number information. This recognition model consists of two sub-models: a card number localization model and a card number recognition model, which work together to ensure accurate card number information capture. The card number localization model is responsible for detecting the specific location of the card number within the tilt-corrected financial card image. This model is typically based on deep learning techniques, such as convolutional neural networks or object detection networks. By analyzing texture and layout features in the image, it locates the card number region and outputs the coordinate range of the card number within the image. The card number localization model narrows the search range, avoiding the introduction of irrelevant information when processing the entire financial card image, thereby ensuring the efficiency and accuracy of subsequent card number recognition steps. Once the card number location is determined, the card number recognition model begins text recognition based on the card number region. The card number recognition model requires advanced character recognition and sequence understanding capabilities to parse the image of the card number region and convert it into a numerical sequence to obtain the card number information.

[0061] Furthermore, the step of detecting the card number position of the financial card image based on the card number positioning model includes: extracting features from the financial card image through a feature extraction layer of the card number positioning model to obtain a multi-scale feature map, wherein the feature extraction layer includes K convolutional layers, each convolutional layer corresponds to feature extraction at a different scale, and K is a positive integer; merging the multi-scale feature maps to obtain merged features; inputting the merged features into N branch prediction layers of the card number positioning model respectively, and outputting N position prediction vectors, wherein N is a positive integer; inputting the position prediction vectors into an output layer of the card number positioning model, constructing a text image based on the output layer, and outputting the text image.

[0062] Specifically, a financial card image is input into the card number localization model. The feature extraction layer first performs an in-depth analysis of the financial card image to extract key features that can be used to locate the card number area. The feature extraction layer consists of K convolutional layers, where K is a positive integer. These convolutional layers each process information at different scales of the image. For example, the first convolutional layer may focus on extracting large-scale features, such as the overall layout of the card, while subsequent convolutional layers gradually focus on finer textures until reaching the level of detail required to identify individual digits. The multi-scale feature extraction design ensures that the model can both grasp the overall picture of the financial card image and accurately locate the card number at the detailed level. This is the basis for achieving high-precision card number localization.

[0063] After each convolutional layer completes feature extraction, the multi-scale feature maps are merged. This integrates information at different scales to generate a merged feature map that comprehensively reflects the card number location characteristics. The merged features are input into the N branch prediction layers of the card number location model. Each branch prediction layer is independently responsible for predicting a specific aspect of the card number, such as the starting point, end point, or other key locations. This is similar to parallel processing. Each prediction layer extracts relevant information from the merged features based on its own task and generates a position prediction vector. The design of N branch prediction layers allows the model to analyze the card number location from multiple angles simultaneously, improving prediction speed and accuracy.

[0064] Finally, all position prediction vectors obtained from the N branch prediction layers are aggregated into the output layer of the card number localization model. The output layer analyzes these vectors and constructs a text image containing the area where the card number is located, known as the card number selection image. This image clearly indicates the exact location of the card number within the original image, facilitating accurate reading by the subsequent card number recognition model.

[0065] Furthermore, the step of recognizing text in a text image based on a card number recognition model includes: extracting features of the text image through a convolutional neural network layer of the card number recognition model to obtain text features; inputting the text features into a recurrent neural network layer of the card number recognition model to output a sequence modeling result; inputting the sequence modeling result into a transcription layer of the card number recognition model to convert the sequence modeling result into a character label sequence.

[0066] Specifically, the text image generated by the card number localization model serves as input data for the card number recognition model. In the initial stage of card number recognition, the convolutional neural network layer performs feature extraction on the text image. This convolutional neural network layer extracts features from the image that are crucial for card number recognition, such as digit shape, edges, and texture. Through the successive processing of multiple convolutional layers, features at different levels are captured, from small local features to large global layout features of the entire card number. This process provides a solid foundation for subsequent card number recognition. The text features obtained from the convolutional neural network layer are then transferred to the recurrent neural network layer of the card number recognition model. The recurrent neural network layer performs sequence modeling on the extracted text features, capturing the sequential relationship between digits and outputting a sequence modeling result that contains the most likely character information at each position.

[0067] Finally, the sequence modeling results are fed into the card number recognition model's transcription layer, which converts the sequence modeling output from the recurrent neural network layer into a sequence of actual character labels, i.e., the card number. This step typically involves mapping the modeling results to specific characters in a character set (including numbers and possibly other characters), ultimately converting them into the numeric sequence of the card number. The transcription layer converts the model's internal representation into user-readable card number information and is the final step in the entire recognition process, delivering results to practical applications.

[0068] In the embodiments of the present invention, through the layered application of deep learning technology, the goal of automatically identifying card numbers from financial card images is achieved, significantly improving the accuracy and speed of card number recognition.

[0069] Through the above steps, a financial card image of a target financial card is obtained, and the financial card image is preprocessed. Then, the preprocessed financial card image is tilt-corrected to obtain a tilt-corrected financial card image. Finally, the tilt-corrected financial card image is input into a financial card number recognition model to output the card number information of the target financial card. The financial card number recognition model is a pre-built model for recognizing financial card numbers. The financial card number recognition model includes a card number positioning model and a card number recognition model. The card number positioning model is used to detect the card number position from the financial card image, and the card number recognition model is used to perform text recognition based on the card number position.

[0070] In this embodiment, tilt correction is performed on the financial card image to reduce inaccuracies caused by image deformation. A deep learning model is then used to detect the card number position, accurately locating the card number and providing a more precise input area for the card number recognition model. The card number recognition model then performs precise text recognition to obtain the card number information. This achieves the goal of accurately locating the card number position and accurately identifying the card number information, achieving the technical effect of improving the accuracy of financial card number recognition. This solves the technical problem of low recognition accuracy in related technologies that use preset feature templates or characteristics to identify financial card information.

[0071] The following describes in detail another optional specific implementation.

[0072] Figure 3 FIG. 1 is a schematic diagram of an optional financial card number recognition process according to an embodiment of the present invention. Figure 3 As shown, the financial card number recognition process includes:

[0073] Step 1, start;

[0074] Step 2: Image acquisition: obtaining a financial card image of the target financial card to be identified using an image acquisition tool;

[0075] Step 3: Image preprocessing, including denoising, standardization, grayscale processing, image enhancement and other operations;

[0076] Specifically, preprocessing of financial card images includes denoising. Algorithms such as Gaussian filtering, median filtering, or bilateral filtering can be applied to remove random noise and speckle from the financial card image, ensuring image clarity and quality, reducing uncertainty in subsequent processing, and improving feature detection accuracy. The denoised financial card image is then converted from color to grayscale by converting the color space. This simplifies the dimensionality of the image data and reduces computing resource requirements. Grayscale images also better highlight the outlines of text and numbers, facilitating subsequent feature extraction and analysis. Finally, the grayscale image is binarized, dividing the pixels in the image into "foreground" and "background" categories, typically achieved by setting a threshold. This process aims to enhance text edges, making them more visible in the image and facilitating subsequent morphological processing and card number detection and location. By appropriately reducing the grayscale value of the background and increasing the grayscale value of the foreground (i.e., the card number area), the card number region can be clearly highlighted against a complex background, providing higher-quality data input for subsequent deep learning models.

[0077] Step 4: Tilt correction: detect the tilt angle of the pre-processed image and rotate it based on the tilt angle, then perform perspective transformation to convert the distorted image into an image in the horizontal direction;

[0078] Specifically, an edge detection algorithm is used to determine the edge of the financial card image—the boundary between the card and background—to extract the card's outline. The outline is then fitted to find the minimum bounding rectangle (MBR), which may be at an angle to the horizontal. The tilt angle of the MBR is then calculated by comparing it with a reference outline, determining the card's tilt relative to a horizontal reference. The reference outline refers to the outline of a reference financial card on a horizontal reference. The card image is then rotated based on the tilt angle to level it.

[0079] Even if an object in an image (such as a bank card) is adjusted to be horizontal through rotation, the true shape and proportion of the object in the image may still be distorted if the camera and the object are not at the same height or the relative position of the object and the lens is not perpendicular. This distortion cannot be corrected by rotation alone. Therefore, a perspective transformation is required on the rotated bank card image. The perspective transformation can eliminate perspective distortion and ensure that each part of the bank card image is in the correct relative position, providing the optimal image input for the final card number recognition.

[0080] Step 5: Position detection: detect the card number position using the pre-built card number positioning model and output a text image;

[0081] Specifically, a financial card image is input into the card number localization model. The feature extraction layer first performs an in-depth analysis of the financial card image to extract key features that can be used to locate the card number area. The feature extraction layer consists of K convolutional layers, where K is a positive integer. These convolutional layers each process information at different scales of the image. For example, the first convolutional layer may focus on extracting large-scale features, such as the overall layout of the card, while subsequent convolutional layers gradually focus on finer textures until reaching the level of detail required to identify individual digits. The multi-scale feature extraction design ensures that the model can both grasp the overall picture of the financial card image and accurately locate the card number at the detailed level. This is the basis for achieving high-precision card number localization.

[0082] After each convolutional layer completes feature extraction, the multi-scale feature maps are merged. This integrates information at different scales to generate a merged feature map that comprehensively reflects the card number location characteristics. The merged features are input into the N branch prediction layers of the card number location model. Each branch prediction layer is independently responsible for predicting a specific aspect of the card number, such as the starting point, end point, or other key locations. This is similar to parallel processing. Each prediction layer extracts relevant information from the merged features based on its own task and generates a position prediction vector. The design of N branch prediction layers allows the model to analyze the card number location from multiple angles simultaneously, improving prediction speed and accuracy.

[0083] Finally, all position prediction vectors obtained from the N branch prediction layers are aggregated into the output layer of the card number localization model. The output layer analyzes these vectors and constructs a text image containing the area where the card number is located, known as the card number selection image. This image clearly indicates the exact location of the card number within the original image, facilitating accurate reading by the subsequent card number recognition model.

[0084] Step 6: Card number recognition: input the text image into a pre-built card number recognition model, recognize the card number information, and output the financial card number;

[0085] Specifically, the text image generated by the card number localization model serves as input data for the card number recognition model. In the initial stage of card number recognition, the convolutional neural network layer performs feature extraction on the text image. This convolutional neural network layer extracts features from the image that are crucial for card number recognition, such as digit shape, edges, and texture. Through the successive processing of multiple convolutional layers, features at different levels are captured, from small local features to large global layout features of the entire card number. This process provides a solid foundation for subsequent card number recognition. The text features obtained from the convolutional neural network layer are then transferred to the recurrent neural network layer of the card number recognition model. The recurrent neural network layer performs sequence modeling on the extracted text features, capturing the sequential relationship between digits and outputting a sequence modeling result that contains the most likely character information at each position.

[0086] Finally, the sequence modeling results are fed into the card number recognition model's transcription layer, which converts the sequence modeling output from the recurrent neural network layer into a sequence of actual character labels, i.e., the card number. This step typically involves mapping the modeling results to specific characters in a character set (including numbers and possibly other characters), ultimately converting them into the numeric sequence of the card number. The transcription layer converts the model's internal representation into user-readable card number information and is the final step in the entire recognition process, delivering results to practical applications.

[0087] Step seven, end.

[0088] The embodiments of the present invention accurately identify financial card numbers through tilt correction, card number position detection, and card number information recognition mechanisms, thereby improving recognition accuracy and enhancing user experience.

[0089] The following describes it in detail with reference to another embodiment.

[0090] Example 2

[0091] The financial card number recognition device provided in this embodiment includes multiple implementation units, each implementation unit corresponds to each implementation step in the above embodiment 1. Its specific implementation methods and beneficial effects can be referred to the above method embodiments and will not be repeated here.

[0092] Figure 4 is a schematic diagram of an optional financial card number recognition device according to an embodiment of the present invention, such as Figure 4 As shown, the financial card number recognition device may include: an acquisition unit 41, a processing unit 42, and an output unit 43, wherein:

[0093] an acquisition unit 41 for acquiring a financial card image of a target financial card and preprocessing the financial card image;

[0094] a processing unit 42 configured to perform tilt correction on the pre-processed financial card image to obtain a tilt-corrected financial card image;

[0095] The output unit 43 is configured to input the tilt-corrected financial card image into a financial card number recognition model and output the card number information of the target financial card. The financial card number recognition model is a pre-built model for recognizing financial card numbers. The financial card number recognition model includes a card number positioning model and a card number recognition model. The card number positioning model is configured to detect the card number location from the financial card image, and the card number recognition model is configured to perform text recognition based on the card number location.

[0096] The above-mentioned financial card number recognition device obtains a financial card image of a target financial card through an acquisition unit 41 and pre-processes the financial card image; performs tilt correction processing on the pre-processed financial card image through a processing unit 42 to obtain a tilt-corrected financial card image; and inputs the tilt-corrected financial card image into a financial card number recognition model through an output unit 43, which outputs the card number information of the target financial card. The financial card number recognition model is a pre-built model for recognizing financial card numbers. The financial card number recognition model includes a card number positioning model and a card number recognition model. The card number positioning model is used to detect the card number position from the financial card image, and the card number recognition model is used to perform text recognition based on the card number position.

[0097] In this embodiment, tilt correction is performed on the financial card image to reduce inaccuracies caused by image deformation. A deep learning model is then used to detect the card number position, accurately locating the card number and providing a more precise input area for the card number recognition model. The card number recognition model then performs precise text recognition to obtain the card number information. This achieves the goal of accurately locating the card number position and accurately identifying the card number information, achieving the technical effect of improving the accuracy of financial card number recognition. This solves the technical problem of low recognition accuracy in related technologies that use preset feature templates or characteristics to identify financial card information.

[0098] Furthermore, the output unit 43 includes: a first detection module, which is used to input the tilt-corrected financial card image into a card number positioning model of a financial card number recognition model, detect the card number position of the financial card image based on the card number positioning model, and output a text image; a first recognition module, which is used to input the text image into a card number recognition model of the financial card number recognition model, recognize the text in the text image based on the card number recognition model, and output the card number information of the target financial card.

[0099] Furthermore, the first detection module includes: a first extraction submodule, used to extract features from the financial card image through the feature extraction layer of the card number positioning model to obtain a multi-scale feature map, wherein the feature extraction layer includes K convolution layers, each convolution layer corresponds to feature extraction at a different scale, and K is a positive integer; a first merging submodule, used to merge the multi-scale feature maps to obtain merged features; a first output submodule, used to input the merged features into N branch prediction layers of the card number positioning model respectively, and output N position prediction vectors, wherein N is a positive integer; a first construction submodule, used to input the position prediction vector into the output layer of the card number positioning model, construct a text image based on the output layer, and output it.

[0100] Furthermore, the first recognition module includes: a second extraction submodule, used to extract features of the text image through the convolutional neural network layer of the card number recognition model to obtain text features; a second output submodule, used to input the text features into the recurrent neural network layer of the card number recognition model and output the sequence modeling results; a first conversion submodule, used to input the sequence modeling results into the transcription layer of the card number recognition model and convert the sequence modeling results into a character label sequence.

[0101] Furthermore, the processing unit 42 includes: a first determination module for determining an edge region of the financial card image based on an edge detection algorithm and extracting a financial card outline based on the edge region; a second determination module for analyzing the financial card outline and determining a tilt angle of the financial card outline relative to a reference outline; a first rotation module for rotating the financial card image based on the tilt angle to adjust the financial card image to a horizontal state; and a first transformation module for performing a perspective transformation on the rotated financial card image to obtain a tilt-corrected financial card image.

[0102] Furthermore, the second determination module includes: a first determination submodule, configured to determine the card type of the target financial card and call a card template based on the card type; a third extraction submodule, configured to extract a reference contour based on a horizontal card image of the card template; and a first comparison submodule, configured to compare the financial card contour with the reference contour to determine an inclination angle of the financial card contour relative to the reference contour.

[0103] Furthermore, the acquisition unit 41 includes: a first processing module for denoising the financial card image; a first conversion module for converting the denoised financial card image into a grayscale image; and a second processing module for binarizing the grayscale image to enhance text edges in the grayscale image.

[0104] It should be noted that the acquisition unit 41, processing unit 42, and output unit 43 correspond to steps S201 to S203 in the first embodiment. The examples and application scenarios implemented by the above units and the corresponding steps are the same, but are not limited to the contents disclosed in the first embodiment. It should be noted that the above modules or units can be hardware components or software components stored in a memory (e.g., memory 104) and processed by one or more processors (e.g., processors 102a, 102b, ..., 102n). The above modules or units can also be part of a device and can be run in the computer terminal 10 provided in the first embodiment.

[0105] The present invention is described below in conjunction with another optional embodiment.

[0106] Example 3

[0107] An embodiment of the present invention may further provide an electronic device, Figure 5 FIG. 1 is a hardware structure block diagram of an electronic device (or mobile device) for performing an optional method for identifying a financial card number according to an embodiment of the present invention, such as Figure 5 As shown, the electronic device may include: one or more ( Figure 5 Only one is shown) processor 502, memory 504, storage controller, and peripheral interface, wherein the peripheral interface is connected to the radio frequency module, audio module and display.

[0108] Among them, the memory can be used to store software programs and modules, such as program instructions / modules corresponding to the methods and devices in the embodiments of the present application. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory, that is, implementing the above-mentioned method. The memory may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory may further include a memory remotely arranged relative to the processor, and these remote memories may be connected to the terminal via a network. Examples of the above-mentioned network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network and a combination thereof.

[0109] The processor can call information and applications stored in the memory through the transmission device to perform the following steps: obtain a financial card image of a target financial card and pre-process the financial card image; perform tilt correction on the pre-processed financial card image to obtain a tilt-corrected financial card image; input the tilt-corrected financial card image into a financial card number recognition model, and output the card number information of the target financial card. The financial card number recognition model is a pre-built model for recognizing financial card numbers. The financial card number recognition model includes a card number positioning model and a card number recognition model. The card number positioning model is used to detect the card number position from the financial card image, and the card number recognition model is used to perform text recognition based on the card number position.

[0110] The processor can call the information and application stored in the memory through the transmission device to perform the following steps: input the tilt-corrected financial card image into the card number positioning model of the financial card number recognition model, detect the card number position of the financial card image based on the card number positioning model, and output a text image; input the text image into the card number recognition model of the financial card number recognition model, recognize the text in the text image based on the card number recognition model, and output the card number information of the target financial card.

[0111] The processor can call the information and application stored in the memory through the transmission device to perform the following steps: extract features of the financial card image through the feature extraction layer of the card number positioning model to obtain a multi-scale feature map, wherein the feature extraction layer includes K convolution layers, each convolution layer corresponds to feature extraction at a different scale, and K is a positive integer; merge the multi-scale feature maps to obtain merged features; input the merged features into N branch prediction layers of the card number positioning model respectively, and output N position prediction vectors, wherein N is a positive integer; input the position prediction vectors into the output layer of the card number positioning model, and construct a text image based on the output layer and output it.

[0112] The processor can call the information and application stored in the memory through the transmission device to perform the following steps: extract features of the text image through the convolutional neural network layer of the card number recognition model to obtain text features; input the text features into the recurrent neural network layer of the card number recognition model and output the sequence modeling results; input the sequence modeling results into the transcription layer of the card number recognition model and convert the sequence modeling results into a character label sequence.

[0113] The processor can call information and applications stored in the memory through the transmission device to perform the following steps: determining an edge region of the financial card image based on an edge detection algorithm, and extracting a financial card outline based on the edge region; analyzing the financial card outline to determine an inclination angle of the financial card outline relative to a reference outline; rotating the financial card image based on the inclination angle to adjust the financial card image to a horizontal state; and performing a perspective transformation on the rotated financial card image to obtain a tilt-corrected financial card image.

[0114] The processor can call information and applications stored in the memory through the transmission device to perform the following steps: determining the card type of the target financial card and calling a card template based on the card type; extracting a reference contour based on a horizontal card image of the card template; and comparing the financial card contour with the reference contour to determine an inclination angle of the financial card contour relative to the reference contour.

[0115] The processor can call the information and application stored in the memory through the transmission device to perform the following steps: denoising the financial card image; converting the denoised financial card image into a grayscale image; binarizing the grayscale image to enhance the text edges of the grayscale image.

[0116] An embodiment of the present invention provides a method for recognizing financial card numbers. The method performs tilt correction on a financial card image to reduce inaccuracies caused by image deformation. A deep learning model is then used to detect the card number position, accurately locating the card number and providing a more precise input area for the card number recognition model. The card number recognition model then performs precise text recognition to obtain the card number information, achieving the goals of accurately locating the card number position and accurately identifying the card number information, and achieving the technical effect of improving the accuracy of financial card number recognition. This method further addresses the technical issue in related technologies of low recognition accuracy associated with methods of recognizing financial card information based on preset feature templates or characteristics.

[0117] It can be understood by those skilled in the art that Figure 5 The structure shown is for illustration only, and the electronic device may also be a terminal device such as a smart phone, a tablet computer, a PDA, a mobile Internet device (MID), or a PAD. Figure 5 It does not limit the structure of the above electronic device. For example, the electronic device may also include Figure 5 More or fewer components (such as network interfaces, display devices, etc.) shown in, or with Figure 5 Different configurations shown.

[0118] A person skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing the hardware related to the terminal device through a program, and the program can be stored in a computer-readable storage medium, which may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0119] The present invention is described below in conjunction with another optional embodiment.

[0120] Example 4

[0121] The embodiment of the present invention further provides a computer-readable storage medium. Optionally, in the embodiment of the present invention, the computer-readable storage medium can be used to store the program code executed by the financial card number recognition method provided in the first embodiment.

[0122] Optionally, in an embodiment of the present invention, the above-mentioned storage medium may be located in any computer terminal in a computer terminal group in a computer network, or in any mobile terminal in a mobile terminal group.

[0123] An embodiment of the present invention further provides a computer program product that, when executed on a data processing device, is adapted to perform the steps of a method for recognizing a financial card number: obtaining a financial card image of a target financial card and preprocessing the financial card image; performing tilt correction on the preprocessed financial card image to obtain a tilt-corrected financial card image; and inputting the tilt-corrected financial card image into a financial card number recognition model to output the card number information of the target financial card. The financial card number recognition model is a pre-built model for recognizing financial card numbers, and includes a card number positioning model and a card number recognition model. The card number positioning model is used to detect the card number position from the financial card image, and the card number recognition model is used to perform text recognition based on the card number position.

[0124] The serial numbers of the above embodiments of the present invention are for description only and do not represent the advantages or disadvantages of the embodiments.

[0125] In the above embodiments of the present invention, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0126] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only exemplary. For example, the division of the units can be a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.

[0127] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0128] In addition, the functional units in the various embodiments of the present invention may be integrated into a single processing unit, each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.

[0129] 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 this understanding, the technical solution of the present invention, 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 instructions for enabling a computer device (which can be a personal computer, server or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk, etc. Various media that can store program codes.

[0130] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as within the scope of protection of the present invention.

Claims

1. A method for identifying a financial card number, characterized in that: include: Acquire a financial card image of a target financial card and pre-process the financial card image; performing tilt correction processing on the pre-processed financial card image to obtain the tilt-corrected financial card image; The tilt-corrected financial card image is input into a financial card number recognition model, which outputs the card number information of the target financial card. The financial card number recognition model is a pre-built model for recognizing financial card numbers. The model includes a card number positioning model and a card number recognition model. The card number positioning model is used to detect the card number position from the financial card image, and the card number recognition model is used to perform text recognition based on the card number position.

2. The method according to claim 1, characterized in that The step of inputting the tilt-corrected financial card image into the financial card number recognition model and outputting the card number information of the target financial card includes: inputting the tilt-corrected financial card image into a card number positioning model of the financial card number recognition model, detecting the card number position of the financial card image based on the card number positioning model, and outputting a text image; The text image is input into a card number recognition model of the financial card number recognition model, the text in the text image is recognized based on the card number recognition model, and the card number information of the target financial card is output.

3. The method according to claim 2, characterized in that The step of detecting the card number position of the financial card image based on the card number positioning model includes: Performing feature extraction on the financial card image through the feature extraction layer of the card number location model to obtain a multi-scale feature map, wherein the feature extraction layer includes K convolutional layers, each convolutional layer corresponding to feature extraction at a different scale, and K is a positive integer; Merging the multi-scale feature maps to obtain merged features; Inputting the merged features into N branch prediction layers of the card number positioning model respectively, and outputting N position prediction vectors, where N is a positive integer; The position prediction vector is input into the output layer of the card number positioning model, and a text image is constructed based on the output layer and output.

4. The method according to claim 2, characterized in that The step of recognizing text in the text image based on the card number recognition model includes: Performing feature extraction on the text image through the convolutional neural network layer of the card number recognition model to obtain text features; Inputting the text features into the recurrent neural network layer of the card number recognition model and outputting a sequence modeling result; The sequence modeling result is input into the transcription layer of the card number recognition model, and the sequence modeling result is converted into a character label sequence.

5. The method according to claim 1, wherein The step of performing tilt correction on the pre-processed financial card image to obtain the tilt-corrected financial card image includes: determining an edge region of the financial card image based on an edge detection algorithm, and extracting a financial card outline based on the edge region; Analyzing the financial card contour to determine an inclination angle of the financial card contour relative to a reference contour; rotating the financial card image based on the tilt angle to adjust the financial card image to a horizontal state; Performing perspective transformation on the rotated financial card image to obtain the tilt-corrected financial card image.

6. The method according to claim 5, characterized in that The step of analyzing the financial card contour to determine the tilt angle of the financial card contour relative to the reference contour includes: Determining the card type of the target financial card and calling a card template based on the card type; extracting the reference contour based on a card image of the card template in a horizontal direction; The financial card outline is compared with the reference outline to determine an inclination angle of the financial card outline relative to the reference outline.

7. The method according to claim 1, characterized in that The step of pre-processing the financial card image includes: performing denoising processing on the financial card image; Convert the denoised financial card image into a grayscale image; Binarization is performed on the grayscale image to enhance text edges in the grayscale image.

8. A financial card number recognition device, characterized in that: include: an acquisition unit, configured to acquire a financial card image of a target financial card and pre-process the financial card image; a processing unit, configured to perform tilt correction processing on the pre-processed financial card image to obtain the tilt-corrected financial card image; an output unit, configured to input the tilt-corrected financial card image into a financial card number recognition model and output the card number information of the target financial card, wherein the financial card number recognition model is a pre-built model for recognizing financial card numbers and includes a card number positioning model and a card number recognition model. The card number positioning model is configured to detect the card number position from the financial card image, and the card number recognition model is configured to perform text recognition based on the card number position.

9. A computer-readable storage medium, characterized in that The computer-readable storage medium includes a stored computer program, wherein when the computer program is executed, the device where the computer-readable storage medium is located is controlled to execute the financial card number recognition method according to any one of claims 1 to 7.

10. An electronic device, characterized in that: The invention comprises one or more processors and a memory, wherein the memory is used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the financial card number recognition method according to any one of claims 1 to 7.