Text recognition method and system, electronic device, and storage medium

By performing a preliminary review of image type and quality on the client side, qualified images are selected and sent to the server for text recognition. This solves the inefficiency problem caused by the terminal device directly retrieving images, and achieves more efficient and accurate text recognition.

CN115761746BActive Publication Date: 2026-06-02CHINA PING AN LIFE INSURANCE CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CHINA PING AN LIFE INSURANCE CO LTD
Filing Date
2022-11-17
Publication Date
2026-06-02

AI Technical Summary

Technical Problem

In existing technologies, terminal devices retrieve images through relevant interfaces for review, judgment, and recognition, resulting in low efficiency in text recognition.

Method used

The client performs image type and quality checks on the images, filters out images that meet the preset type and quality, and sends them to the server for text recognition. The server generates image identifiers and performs text recognition processing, and the client displays the recognition results.

Benefits of technology

It improves the efficiency and accuracy of text recognition and reduces the performance requirements of the server.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115761746B_ABST
    Figure CN115761746B_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a character recognition method and system, an electronic device and a storage medium, and belong to the technical field of artificial intelligence. The method comprises: a client generating an image scanning area in response to a touch operation of a preset first recognition control; the client performing image type recognition on a to-be-recognized image according to a preset type recognition model to obtain a recognition result; if the recognition result indicates that the image type of the to-be-recognized image is a preset type, the client performs quality detection on the to-be-recognized image to obtain a detection result; if the detection result indicates that the quality of the to-be-recognized image is qualified, the client sends the to-be-recognized image to a server; the server generates an image identifier of the to-be-recognized image according to the to-be-recognized image, and sends the image identifier to the client; the server performs character recognition processing on the to-be-recognized image to obtain recognition data; and the client acquires the to-be-recognized image and the recognition data from the server according to the image identifier. The embodiments of the present application can improve the efficiency of character recognition.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of artificial intelligence technology, and in particular to a text recognition method and system, electronic device and storage medium. Background Technology

[0002] Currently, terminals that perform text recognition need to retrieve images through relevant interfaces and perform operations such as review, judgment, and recognition on the images, which affects the efficiency of text recognition. Summary of the Invention

[0003] The main objective of this application is to provide a character recognition method and system, electronic device and storage medium, which aims to improve the efficiency of character recognition.

[0004] To achieve the above objectives, a first aspect of this application proposes a character recognition method, the method comprising:

[0005] The client responds to the touch operation of the preset first recognition control and generates an image scanning area;

[0006] The client performs an image capture operation on the target object based on the image scanning area to obtain the image to be recognized;

[0007] The client performs image type recognition on the image to be recognized according to a preset type recognition model, and obtains the recognition result;

[0008] If the recognition result indicates that the image type of the image to be recognized is a preset type, then the client performs quality detection on the image to be recognized and obtains the detection result;

[0009] If the detection result indicates that the image to be identified is of acceptable quality, the client sends the image to be identified to the server.

[0010] The server generates an image identifier for the image to be identified based on the image to be identified, and sends the image identifier to the client;

[0011] The server performs text recognition processing on the image to be recognized to obtain recognition data;

[0012] The client obtains the image to be identified and the identification data from the server based on the image identifier, and displays the preset interface based on the image to be identified and the identification data.

[0013] In some embodiments, the client performs image type recognition on the image to be recognized according to a preset type recognition model to obtain a recognition result, including:

[0014] The client performs image filtering on the image to be identified according to a preset filtering model, and obtains the filtering results;

[0015] If the filtering result indicates that the image to be identified is within the preset filtering range, the client performs image type identification on the image to be identified according to the type identification model to obtain the identification result.

[0016] In some embodiments, the preset type includes an ID card type, and the detection result includes a first result;

[0017] If the recognition result indicates that the image type of the image to be recognized is a preset type, then the client performs quality detection on the image to be recognized to obtain a detection result, including at least one of the following steps:

[0018] If the recognition result indicates that the image type of the image to be recognized is the ID card type, then the client performs a sharpness detection on the image to be recognized to obtain sharpness data;

[0019] If the recognition result indicates that the image type of the image to be recognized is the ID card type, then the client performs exposure detection on the image to be recognized to obtain exposure data;

[0020] If the recognition result indicates that the image type of the image to be recognized is the ID card type, then the client performs a first integrity check on the image to be recognized to obtain integrity data;

[0021] The client obtains the first result based on at least one of the following data: the sharpness data, the exposure data, and the integrity data.

[0022] In some embodiments, the preset type includes a bank card type, and the detection result includes a second result;

[0023] If the recognition result indicates that the image type of the image to be recognized is a preset type, then the client performs quality detection on the image to be recognized and obtains the detection result, including:

[0024] If the recognition result indicates that the image type of the image to be recognized is the bank card type, then the client obtains the card number area and the image area of ​​the image to be recognized;

[0025] The client performs text recognition on the card number area to obtain the recognized numbers;

[0026] If the number of identified digits is greater than a preset threshold, the client expands the image region to obtain an initial image.

[0027] The client rotates the initial image according to a preset angle to obtain the target image;

[0028] The client inputs the target image into a preset detection model for a second integrity detection, and obtains the second result.

[0029] In some embodiments, the method further includes:

[0030] The client responds to the touch operation of the preset second recognition control. If the detection result indicates that the image to be recognized is complete, the client assigns a number to the recognition digit.

[0031] The client performs a legality check based on the number and the identification digit, and obtains a check result;

[0032] If the judgment result indicates that the identified number is valid, the client displays the preset interface based on the identified number and the image to be identified.

[0033] In some embodiments, the preset type includes a document type, and the detection result includes a third result;

[0034] If the recognition result indicates that the image type of the image to be recognized is a preset type, then the client performs quality detection on the image to be recognized and obtains the detection result, including:

[0035] If the recognition result indicates that the image type of the image to be recognized is the document type, then the client preprocesses the image to be recognized to obtain a reference image;

[0036] The client extracts a cropped image from the reference image based on a preset region.

[0037] The client performs the blur detection on the captured image to obtain the third result.

[0038] In some embodiments, the server generates an image identifier for the image to be identified, including:

[0039] The server obtains the delivery timestamp of the image to be identified and gets the initial identifier based on the delivery timestamp;

[0040] The server obtains the client's terminal identifier;

[0041] The server obtains the image identifier based on the initial identifier; or, the server obtains the image identifier based on the initial identifier and the terminal identifier.

[0042] To achieve the above objectives, a second aspect of this application provides a character recognition system, the system comprising:

[0043] The client is configured to respond to a touch operation of a preset first recognition control, generate an image scanning area; perform an image capture operation on a target object according to the image scanning area to obtain an image to be recognized; perform image type recognition on the image to be recognized according to a preset type recognition model to obtain a recognition result; if the recognition result indicates that the image type of the image to be recognized is a preset type, then perform quality detection on the image to be recognized to obtain a detection result; if the detection result indicates that the image to be recognized is of acceptable quality, then send the image to be recognized to the server.

[0044] The server is configured to generate an image identifier for the image to be identified based on the image to be identified, and send the image identifier to the client; the server performs text recognition processing on the image to be identified to obtain recognition data;

[0045] The client is further configured to obtain the image to be identified and the identification data from the server based on the image identifier, and to display the preset interface based on the image to be identified and the identification data.

[0046] To achieve the above objectives, a third aspect of the present application provides an electronic device, the electronic device including a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the method described in the first aspect.

[0047] To achieve the above objectives, a fourth aspect of the present application provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the method described in the first aspect.

[0048] The text recognition method, system, electronic device, and storage medium proposed in this application perform image capture operations on the target object through a client, and then perform image type recognition, quality detection, and other operations on the image to be recognized obtained from the image capture operation. The client sends the image to be recognized, which has a preset image type and a qualified detection result, to the server. The server generates a corresponding image identifier based on the image to be recognized, and performs text recognition processing on the image to be recognized to obtain recognition data. The client obtains the corresponding image to be recognized and recognition data based on the image identifier and displays them on a preset interface. Therefore, the embodiments of this application perform preliminary review of factors affecting the efficiency and accuracy of text recognition, such as the image type and image quality of the image to be recognized, through the client. Therefore, compared to related technologies where the image to be recognized is obtained through a related interface and then directly reviewed, judged, and recognized, the text recognition method improved in the embodiments of this application can improve both text recognition efficiency and accuracy. Attached Figure Description

[0049] Figure 1 This is a flowchart illustrating the character recognition method according to an embodiment of this application;

[0050] Figure 2 This is a schematic diagram of the scanning interface in an embodiment of this application;

[0051] Figure 3 This is a schematic diagram of the scanning interface when the third sub-identification control is touched according to an embodiment of this application;

[0052] Figure 4 This is a flowchart illustrating the character recognition method according to an embodiment of this application;

[0053] Figure 5 This is a flowchart illustrating the character recognition method according to an embodiment of this application;

[0054] Figure 6 This is a flowchart illustrating the character recognition method according to an embodiment of this application;

[0055] Figure 7A This is a schematic diagram of the image scanning area according to an embodiment of this application;

[0056] Figure 7B This is another schematic diagram of the image scanning area in an embodiment of this application;

[0057] Figure 7C This is another schematic diagram of the image scanning area in an embodiment of this application;

[0058] Figure 8 This is a schematic diagram of the scanning interface in an embodiment of this application;

[0059] Figure 9This is a schematic diagram of an image captured according to an embodiment of this application;

[0060] Figure 10 This is a flowchart illustrating the character recognition method according to an embodiment of this application;

[0061] Figure 11 This is a schematic diagram illustrating the display processing of a preset interface according to an embodiment of this application;

[0062] Figure 12 This is a flowchart illustrating the character recognition method according to an embodiment of this application;

[0063] Figure 13 This is a schematic diagram of the character recognition system according to an embodiment of this application;

[0064] Figure 14 This is a schematic diagram of the hardware structure of the electronic device according to an embodiment of this application. Detailed Implementation

[0065] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0066] It should be noted that although functional modules are divided in the system diagram and a logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the device or the order in the flowchart. The terms "first," "second," etc., in the specification, claims, and the aforementioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.

[0067] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit this application.

[0068] First, let's analyze some of the terms used in this application:

[0069] Artificial intelligence (AI) is a new branch of computer science that studies, develops, and applies theories, methods, technologies, and systems to simulate, extend, and expand human intelligence. It aims to understand the essence of intelligence and produce intelligent machines that can react in a way similar to human intelligence. Research in this field includes robotics, speech recognition, image recognition, natural language processing, and expert systems. AI can simulate the information processes of human consciousness and thought. Furthermore, AI utilizes digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceiving the environment, acquiring knowledge, and using that knowledge to achieve optimal results.

[0070] Natural Language Processing (NLP): NLP uses computers to process, understand, and utilize human language (such as Chinese and English). NLP is a branch of artificial intelligence and an interdisciplinary field of computer science and linguistics, often referred to as computational linguistics. NLP includes syntactic analysis, semantic analysis, and discourse understanding. It is commonly used in machine translation, handwritten and printed character recognition, speech recognition and text-to-speech conversion, intent recognition, information extraction and filtering, text classification and clustering, sentiment analysis, and opinion mining. It involves data mining, machine learning, knowledge acquisition, knowledge engineering, artificial intelligence research, and linguistic research related to language computation.

[0071] Optical Character Recognition (OCR): OCR refers to the process by which electronic devices examine characters printed on paper, determine their shapes by detecting dark and light patterns, and then translate the shapes into corresponding text using character recognition methods. Correspondingly, OCR text recognition refers to the process of directly converting text content from images and photographs into editable text using OCR technology.

[0072] Document recognition refers to the process of recognizing the text content on images of documents such as ID cards, bank cards, birth certificates, and business licenses into structured text using Optical Character Recognition (OCR) technology.

[0073] AVFoundation is a multimedia framework in iOS, based on the Objective-C / SWITCH interface. It can be used to play, edit, and re-encode audio and video files. Furthermore, it allows real-time capture and processing of image information via the AVCaptureSession input device within AVFoundation.

[0074] TensorFlow is an open-source, Python-based machine learning framework. TensorFlow allows the computation of deep neural networks to be deployed on servers, PCs, and mobile devices with any number of CPUs or GPUs, utilizing only a single TensorFlow API. Compared to other machine learning frameworks, TensorFlow offers automatic differentiation, is open-source, supports various CPUs / GPUs, has pre-trained models, and supports common neural network architectures such as recurrent neural networks, convolutional neural networks, and deep belief networks.

[0075] Device ID: Used to record the hardware information of a mobile terminal device at the time of manufacture. It includes the International Mobile Equipment Identity (IMEI) and the Mobile Equipment Identifier (MEID). The device ID is used to uniquely identify a single flashing operation of a mobile terminal device. Therefore, while the device ID cannot completely guarantee the uniqueness of a mobile terminal device, it can filter out duplicate mobile terminal devices to a certain extent.

[0076] Page ID: This refers to the information used to identify page attributes. Page IDs are used to distinguish different page attributes.

[0077] Webpage ID: Information used to identify webpage attributes within a browser. Webpage ID is used to distinguish different webpage attributes in a browser.

[0078] Currently, terminals that perform text recognition need to retrieve images through relevant interfaces and perform operations such as review, judgment, and recognition on the images, which affects the efficiency of text recognition.

[0079] Based on this, embodiments of this application provide a text recognition method and system, an electronic device, and a storage medium, aiming to improve the efficiency of text recognition.

[0080] The text recognition method, system, electronic device, and storage medium provided in this application are specifically described through the following embodiments. First, the text recognition method in this application is described.

[0081] The embodiments of this application can acquire and process relevant data based on artificial intelligence technology. Artificial intelligence (AI) is the theory, method, technology, and application system that uses digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use that knowledge to obtain optimal results.

[0082] Foundational technologies for artificial intelligence generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing, operating / interactive systems, and mechatronics. AI software technologies mainly encompass computer vision, robotics, biometrics, speech processing, natural language processing, and machine learning / deep learning.

[0083] The text recognition method provided in this application relates to the field of artificial intelligence technology. The text recognition method provided in this application can be applied to a terminal, a server, or software running on either a terminal or a server. In some embodiments, the terminal can be a smartphone, tablet, laptop, desktop computer, etc.; the server can be configured as an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms; the software can be an application implementing the text recognition method, but is not limited to the above forms.

[0084] This application can be used in a wide variety of general-purpose or special-purpose computer system environments or configurations. Examples include: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, and distributed computing environments including any of the above systems or devices. This 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. This application can also be practiced in distributed computing environments where tasks are performed by remote processing devices connected via a communication network. In distributed computing environments, program modules can reside in local and remote computer storage media, including storage devices.

[0085] It should be noted that in all specific embodiments of this application, when processing data related to user identity or characteristics, such as user information, user behavior data, user historical data, and user location information, user permission or consent is obtained first. Furthermore, the collection, use, and processing of this data comply with relevant laws, regulations, and standards of the relevant countries and regions. In addition, when embodiments of this application require access to sensitive personal information of users, separate permission or consent from the user is obtained through pop-ups or redirects to confirmation pages. Only after obtaining the user's separate permission or consent is the necessary user-related data for the proper functioning of the embodiments of this application obtained.

[0086] Figure 1 This is an optional flowchart of the text recognition method provided in the embodiments of this application. Figure 1 The method may include, but is not limited to, steps S101 to S108.

[0087] Step S101: The client responds to the touch operation of the preset first recognition control and generates an image scanning area;

[0088] Step S102: The client performs an image capture operation on the target object according to the image scanning area to obtain the image to be recognized;

[0089] Step S103: The client performs image type recognition on the image to be recognized according to the preset type recognition model and obtains the recognition result;

[0090] Step S104: If the recognition result indicates that the image type of the image to be recognized is a preset type, the client performs quality detection on the image to be recognized and obtains the detection result;

[0091] Step S105: If the detection result indicates that the image to be identified is of acceptable quality, the client sends the image to be identified to the server.

[0092] Step S106: The server generates an image identifier for the image to be identified based on the image to be identified, and sends the image identifier to the client;

[0093] Step S107: The server performs text recognition processing on the image to be recognized to obtain recognition data;

[0094] Step S108: The client obtains the image to be recognized and the recognition data from the server based on the image identifier, and displays the preset interface based on the image to be recognized and the recognition data.

[0095] Steps S101 to S108 of this embodiment involve capturing an image of the target object via a client, and then performing image type recognition and quality detection on the image to be recognized obtained from the image capture operation. The client sends the image to be recognized, which has a preset image type and passes the detection, to the server. The server generates a corresponding image identifier based on the image to be recognized and performs text recognition processing on the image to be recognized to obtain recognition data. The client obtains the corresponding image to be recognized and recognition data based on the image identifier and displays them on a preset interface. Therefore, this embodiment uses the client as a text recognition intermediary between the image to be recognized and the server, performing preliminary review of factors affecting text recognition efficiency and accuracy, such as image type and image quality. Therefore, compared to related technologies where the image to be recognized is obtained through an interface and then directly reviewed, judged, and recognized, the text recognition method provided in this embodiment improves text recognition efficiency and accuracy. Furthermore, it reduces the performance requirements of the server.

[0096] In step S101 of some embodiments, such as Figure 2 As shown, a first recognition control 101 is pre-set on the client's scanning interface. When the first recognition control 101 is touched, the client will generate an image scanning area 103 on the scanning interface 102. This image scanning area 103 is the area where the client performs image capture operations on the target object. That is, when the user takes a picture of the target object using the client's own camera module, the client displays the target object on the scanning interface 102 based on the signal generated by the camera module. Specifically, the client will perform image capture operations on the target object appearing within the image scanning area 103, and will not perform image capture operations on other objects outside the image scanning area 103, or on parts of the target object outside the image scanning area 103. It can be understood that, as... Figure 3As shown, multiple first recognition controls can be set on the scanning interface according to actual needs. The client generates image scanning areas of the same or different sizes based on the touch operation of each first recognition control. For example, depending on the type of the target object being scanned, a first sub-recognition control 104 corresponding to the ID card type, a second sub-recognition control 105 corresponding to the bank card type, and a third sub-recognition control 106 corresponding to the document type can be set. Among them, based on the characteristics of the document type target object, compared with the image scanning area corresponding to the first sub-recognition control, and compared with the image scanning area corresponding to the second sub-recognition control, the area of ​​the image scanning area corresponding to the third sub-recognition control can be adaptively increased (for example, as shown in the image scanning area corresponding to the document type target object). Figure 3 (As shown). It is understandable that the image scanning area, except for... Figure 2 , Figure 3 Besides the rectangular shape shown, other shapes can be set according to actual needs, and this application embodiment does not specifically limit this.

[0097] In step S102 of some embodiments, the client performs an image capture operation on the target object within the image scanning area according to a preset time limit to obtain multiple video frames. Then, the client obtains the image to be recognized based on these multiple video frames. For example, taking an iOS system as an example, the client responds to the touch operation of the first recognition control and obtains a UI Image (i.e., the image to be recognized) within a 5-second scanning time limit based on the AVFoundation framework. It is understood that, depending on actual needs, the image to be recognized can also be obtained by selecting from the system album, taking a photo, etc., and this application embodiment does not specifically limit this.

[0098] In step S103 of some embodiments, the client pre-sets a type recognition model for image type recognition. The client performs image type recognition on the captured image to be recognized according to the type recognition model to obtain the recognition result of the image to be recognized. It is understood that the type recognition model can be a model set independently in the client, or a model obtained by fine-tuning the corresponding pre-trained model loaded in the client's TensorFlow. This application embodiment does not specifically limit this.

[0099] like Figure 4 As shown, in some embodiments, step S103 includes, but is not limited to, steps S401 to S402.

[0100] Step S401: The client performs image filtering on the image to be recognized according to the preset filtering model and obtains the filtering results;

[0101] Step S402: If the filtering result indicates that the image to be identified is within the preset filtering range, the client performs image type identification on the image to be identified according to the type identification model to obtain the identification result.

[0102] In step S401 of some embodiments, the client pre-sets a filtering model for image filtering. For example, this filtering model is a model obtained by fine-tuning the TF Lite model in TensorFlow. This filtering model is used to determine whether the image to be recognized is within a preset filtering range and obtain the corresponding filtering result. The preset filtering range is used to limit the range of image types that the text recognition method of this application embodiment can recognize. Taking the image type range including ID card type, bank card type, and document type as an example, the image to be recognized is used as input data for the filtering model to obtain a filtering value. When the filtering value is greater than or equal to a preset threshold, it indicates that the image to be recognized is within the preset filtering range, that is, the image type of the image to be recognized is within the image type range. When the filtering value is less than the preset threshold, it indicates that the image to be recognized is not within the preset filtering range, that is, the image type of the image to be recognized is not within the image type range.

[0103] In step S402 of some embodiments, when the filtering result indicates that the image to be recognized is within a preset filtering range, i.e., the filtering value is greater than or equal to a preset threshold, the client performs image type recognition on the image to be recognized according to a preset type recognition model to obtain the recognition result of the image to be recognized. When the filtering result indicates that the image to be recognized is not within the preset filtering range, i.e., the filtering value is less than the preset threshold, the client can generate a prompt message through a pop-up window or other means to inform the user that the client does not support text recognition of the current target object.

[0104] The text recognition method provided in this application embodiment first uses a screening model to make a preliminary judgment on the image to be recognized. When the preliminary judgment determines that the image to be recognized is within a preset screening range, the image type is then recognized according to the type recognition model. This avoids the situation where invalid image data is directly input into the type recognition model, which would cause a waste of client computing resources.

[0105] In step S104 of some embodiments, when the image recognition result indicates that the image type of the image to be recognized corresponds to a preset type, it indicates that the target object is a recognition object supported by the text recognition method provided in this application embodiment. At this time, the client performs quality detection on the image to be recognized to obtain the corresponding detection result. The quality detection is used to detect factors affecting the recognition efficiency and accuracy of text recognition, such as completeness, exposure, and clarity, to ensure the image quality of the final image to be recognized, thereby improving the efficiency and accuracy of text recognition. It is understood that when the image recognition result indicates that the image type of the image to be recognized is not a preset type, it indicates that the target object is not a recognition object supported by the text recognition method provided in this application embodiment. At this time, the client can generate a prompt message through a pop-up window or similar means to inform the user that the client does not support text recognition of the current target object.

[0106] like Figure 5 As shown, in some embodiments, the preset type includes the ID card type, the detection result includes the first result, and step S104 includes, but is not limited to, steps S501 to S504.

[0107] Step S501: If the recognition result indicates that the image type of the image to be recognized is an ID card type, the client performs a sharpness detection on the image to be recognized and obtains the sharpness data.

[0108] Step S502: If the recognition result indicates that the image type of the image to be recognized is an ID card type, the client performs exposure detection on the image to be recognized to obtain exposure data;

[0109] Step S503: If the recognition result indicates that the image type of the image to be recognized is an ID card type, the client performs a first integrity check on the image to be recognized to obtain integrity data;

[0110] Step S504: The client obtains the first result based on at least one of the following data: sharpness data, exposure data, and integrity data.

[0111] In step S501 of some embodiments, the type recognition model is a model capable of identifying whether the image to be recognized includes ID card features, that is, the type recognition model can identify whether the image type of the image to be recognized is an ID card type. When the recognition result indicates that the image type of the image to be recognized is an ID card type, the client performs sharpness detection on the image to be recognized and obtains the corresponding sharpness data. It is understood that sharpness detection can be performed by the Tenengrad gradient method, the Laplacian gradient method, the variance method, or by fine-tuning the model obtained by the corresponding pre-trained model loaded in the client's tensorflow. This application embodiment does not specifically limit this. It is understood that the sharpness data can be data used to characterize whether the image to be recognized is sharp, such as data 0 and data 1, where data 0 indicates unclear and data 1 indicates clear; or data used to characterize the degree of sharpness of the image to be recognized (such as any value in [0,1]). This application embodiment does not specifically limit this.

[0112] In step S502 of some embodiments, when the recognition result indicates that the image type of the image to be recognized is an ID card type, the client performs exposure detection on the image to be recognized and obtains the corresponding exposure data. It is understood that exposure detection can be performed using a histogram method, or by fine-tuning the pre-trained model loaded in the client's TensorFlow. This application embodiment does not specifically limit this. Taking the histogram method as an example, if the histogram data of the RGB channels of the image to be recognized is uniformly distributed, it indicates that the pixel distribution in each brightness range of the image to be recognized is uniform, i.e., the image to be recognized is not exposed. It is understood that the exposure data can be data used to characterize whether the image to be recognized is exposed, such as data 0 and data 1, where data 0 represents exposure and data 1 represents no exposure; or data used to characterize the degree of exposure of the image to be recognized (such as any value in [0,1]). This application embodiment does not specifically limit this.

[0113] In step S503 of some embodiments, when the recognition result indicates that the image type of the image to be recognized is an ID card type, the client performs a first integrity check on the image to be recognized to determine whether the image to be recognized contains complete ID card features and obtains the corresponding integrity data. Here, containing complete ID card features means that the image to be recognized is rectangular and that the image to be recognized does not lack template data (including "name", "gender", "ethnicity", "birth", "address", "citizen ID number", etc.), etc., which are not specifically limited in this embodiment. It is understood that the model used for the first integrity check can be a model independently set in the client, or a model obtained by fine-tuning the corresponding pre-trained model loaded in the TensorFlow on the client, which is not specifically limited in this embodiment. It is understood that the integrity data can be data used to characterize whether the image to be recognized is complete, such as data 0 and data 1, where data 0 indicates incompleteness and data 1 indicates completeness; or data used to characterize the degree of completeness of the image to be recognized (such as any value in [0,1]), which is not specifically limited in this embodiment.

[0114] In step S504 of some embodiments, the client obtains a first result based on at least one of sharpness data, exposure data, and integrity data. For example, when the sharpness data indicates sharpness, the exposure data indicates underexposure, and the integrity data indicates completeness, the client generates a first result indicating acceptable quality. When any one of the following conditions exists—sharpness data indicating unclearness, exposure data indicating overexposure, and integrity data indicating incompleteness—the client generates a first result indicating unacceptable quality.

[0115] The text recognition method provided in this application embodiment, when the image type of the image to be recognized is an ID card type, the client performs at least one of the following on the image to be recognized: clarity detection, exposure detection, and first integrity detection, in order to conduct a preliminary review of the factors affecting the text recognition efficiency and accuracy, thereby improving the text recognition efficiency and accuracy of the image to be recognized on the server.

[0116] like Figure 6 As shown, in some embodiments, the preset type includes bank card type, the detection result includes a second result, and step S104 includes, but is not limited to, steps S601 to S605.

[0117] Step S601: If the recognition result indicates that the image type of the image to be recognized is a bank card type, then the client obtains the card number area and image area of ​​the image to be recognized;

[0118] Step S602: The client performs text recognition on the card number area to obtain the recognized numbers;

[0119] Step S603: If the number of recognized digits is greater than a preset threshold, the client expands the image area to obtain an initial image.

[0120] Step S604: The client rotates the initial image according to a preset angle to obtain the target image;

[0121] Step S605: The client inputs the target image into the preset detection model to perform a second integrity detection and obtain a second result.

[0122] In step S601 of some embodiments, the type recognition model is a model capable of identifying whether the image to be recognized includes bank card features; that is, the type recognition model can identify whether the image type of the image to be recognized is a bank card type. When the recognition result indicates that the image type of the image to be recognized is a bank card type, such as... Figure 7A As shown, the client obtains the card number area 107 and the image area 108.

[0123] In step S602 of some embodiments, the client performs text recognition on the card number area based on OCR recognition to obtain multiple recognized digits contained in the card number area.

[0124] In step S603 of some embodiments, the client pre-sets a preset threshold (e.g., a threshold of 13) to characterize the average number of digits identified by different banks. The client compares the number of identified digits with this preset threshold. When the number of identified digits is greater than the preset threshold, it indicates that the image to be identified is basically complete, that is, it is preliminarily determined that the target object falls entirely within the image scanning area (e.g., ...). Figure 7A (As shown). When the recognized number is less than the preset threshold, it indicates that the image to be recognized is incomplete, that is, it is initially determined that the target object exists in an area that falls within the image scanning area (e.g., Figure 7B (As shown). When the number of recognized digits exceeds a preset threshold, the client expands the image region 108, for example, as shown. Figure 7C As shown, the image region is expanded in the vertical and horizontal directions to obtain the initial image.

[0125] In step S604 of some embodiments, the client performs multiple rotations on the initial image according to a preset angle, for example, the preset angle is 90°, and the client performs four clockwise rotations on the initial image to obtain multiple target images.

[0126] In step S605 of some embodiments, the client is pre-set with a detection model capable of determining whether an image is complete based on the UnionPay logo, the relative position of the UnionPay logo area, and the card number area. The client uses multiple target images obtained from the above steps as input data for this detection model to perform a second integrity detection on the target images and obtain a corresponding second result. It is understood that the model used for the second integrity detection can be a model independently set in the client, or a model obtained by fine-tuning a pre-trained model loaded in the client's TensorFlow. This application embodiment does not specifically limit this.

[0127] This application embodiment inputs initial images (i.e., multiple target images) from different angles into the detection model for integrity detection, which avoids the situation where the detection model only judges based on the UnionPay logo, thereby improving the accuracy of the second integrity detection.

[0128] like Figure 8 As shown, in some embodiments, the preset type includes document type, the detection result includes third result, and step S104 includes, but is not limited to, steps S801 to S803.

[0129] Step S801: If the recognition result indicates that the image type of the image to be recognized is a document type, the client preprocesses the image to be recognized to obtain a reference image;

[0130] Step S802: The client extracts a cropped image from the reference image according to a preset area.

[0131] Step S803: The client performs blur detection on the captured image to obtain the third result.

[0132] In step S801 of some embodiments, the type recognition model is a model capable of identifying whether the image to be recognized includes document features; that is, the type recognition model can identify whether the image type of the image to be recognized is a document type. When the recognition result indicates that the image type of the image to be recognized is a document type, the client performs preprocessing such as standardization and normalization on the image to be recognized to obtain a reference image.

[0133] In step S802 of some embodiments, the client cropes a portion of the reference image according to a preset region to obtain a cropped image. For example, the preset region includes the four corner regions of the reference image (e.g., Figure 9 As shown, this includes regions 109, 110, 111, and 112, as well as the central region of the reference image (e.g., Figure 9(See region 113). It is understood that the sizes of the multiple preset regions can be the same or different, and this embodiment of the application does not specifically limit this. For example, the four corner regions can be set to be the same size, and the central region can be larger than the four corner regions, so that more feature information of the reference image can be obtained through the central region.

[0134] In step S803 of some embodiments, the client performs blur detection on the cropped image obtained according to the above steps and obtains the corresponding third result. For example, the client performs blur detection according to the Laplacian variance method, or performs blur detection according to the model obtained by fine-tuning the corresponding pre-trained model loaded in the client's TensorFlow. This application embodiment does not specifically limit the specific implementation of this method.

[0135] It is understood that in some embodiments, the type recognition model is a model capable of simultaneously identifying whether the image to be recognized includes ID card features, bank card features, and document features; that is, the type recognition model is a multi-classification model. When the output data index of the type recognition model is 0, it indicates that the image type of the image to be recognized is an ID card type, and it is the front of an ID card; when the output data index of the type recognition model is 1, it indicates that the image type of the image to be recognized is an ID card type, and it is the back of an ID card; when the output data index of the type recognition model is 2, it indicates that the image type of the image to be recognized is a bank card type; when the output data index of the type recognition model is 3, it indicates that the image type of the image to be recognized is a document type. Document types include household registration book types, invoice types, medical record types, etc., which are not specifically limited in this embodiment.

[0136] In step S105 of some embodiments, when the detection result indicates that the image to be recognized is of acceptable quality, the client sends the image to the server via an API (Application Programming Interface) or similar method. When the detection result indicates that the image to be recognized is of unacceptable quality, the client can generate a prompt message through a pop-up window or similar means to prompt the user to touch the first recognition control again, so that the client responds to the touch operation of the first recognition control and performs image capture operation on the target object again. It can be understood that whether the image to be recognized is acceptable can be determined according to preset conditions. For example, when the quality detection includes integrity detection, the preset condition is that the image to be recognized is complete. That is, when the detection result is that the image to be recognized is complete, it indicates that the image to be recognized is of acceptable quality; when the detection result is that the image to be recognized is incomplete, it indicates that the image to be recognized is of unacceptable quality.

[0137] In step S106 of some embodiments, the server receives the image to be identified and generates a corresponding image identifier based on the features of the image. The features of the image to be identified include the timestamp of the image being sent to the server, the terminal identifier of the client that sent the image, and the image's color features, texture features, shape features, spatial relationship features, etc., which are not specifically limited in this embodiment. The server sends the image identifier to the client. It is understood that the image identifier can be represented by a string or other forms, which are not specifically limited in this embodiment.

[0138] like Figure 10 As shown, in some embodiments, step S106 includes, but is not limited to, steps S1001 to S1003.

[0139] Step S1001: The server obtains the delivery timestamp of the image to be identified and obtains the initial identifier based on the delivery timestamp;

[0140] Step S1002: The server obtains the client's terminal identifier;

[0141] Step S1003: The server obtains the image identifier based on the initial identifier; or, the server obtains the image identifier based on the initial identifier and the terminal identifier.

[0142] In step S1001 of some embodiments, the server obtains the image to be identified sent by the client through the relevant API interface and uses the delivery timestamp of the image to be identified as the initial identifier.

[0143] In step S1002 of some embodiments, the server obtains the client's terminal identifier according to the relevant API interface.

[0144] In step S1003 of some embodiments, the server uses the initial identifier as the image identifier of the image to be identified, or performs a splicing process on the initial identifier and the terminal identifier, and uses the spliced ​​identifier as the image identifier.

[0145] Understandably, depending on actual needs, the page identifier, webpage identifier, terminal identifier, and initial identifier of the client's preset interface can be arbitrarily combined to obtain an image identifier that can uniquely identify the image to be identified.

[0146] The text recognition method provided in this application embodiment obtains an image identifier for uniquely identifying the image to be recognized through an initial identifier and a terminal identifier. This enables other clients that have not performed image capture operations on the target object, in addition to the client used for image capture operations in this application embodiment, to obtain the image to be recognized and recognition data from the server based on the image identifier, thereby enriching the application scenarios of the text recognition method in this application embodiment embodiment.

[0147] In step S107 of some embodiments, the server performs text recognition processing on the image to be recognized according to a preset text recognition model or by calling an external text recognition model through a relevant API interface, and obtains the corresponding recognition data.

[0148] In step S108 of some embodiments, the server stores the recognition data obtained from the above steps and the corresponding image to be recognized into a preset database. The server establishes a mapping relationship between the recognition data and the image to be recognized, using an image identifier as the index of this mapping relationship. The client retrieves the corresponding image to be recognized and recognition data from the server's preset database based on the image identifier sent by the server, and displays the image to be recognized and recognition data on a preset interface. For example, as... Figure 11 As shown, taking an ID card as an example, an ID card image will be displayed on a preset interface to provide feedback on the image capture operation and display the recognition data corresponding to the ID card image. It is understood that, depending on the text recognition requirements, the recognition data can also be set to include template data (including "name", "gender", "ethnicity", "birth", "address", and "citizen identification number"), which is not specifically limited in comparison to the embodiments of this application. It is understood that the recognition data, in addition to... Figure 11 In addition to the arrangement shown in the preset interface, other display methods can also be set, and this application embodiment does not specifically limit this.

[0149] It is understood that, in addition to the client used for image capture operations in this application embodiment, other clients that do not perform image capture operations can also obtain the corresponding image to be recognized and recognition data from the server through image identifiers, thereby enriching the applicable scenarios of text recognition. Furthermore, this avoids different clients performing image capture operations on the same target object, thus preventing the server from repeatedly performing text recognition processing on the same image to be recognized, and consequently, to a certain extent, avoiding waste of server-side recognition resources.

[0150] like Figure 12 As shown, the text recognition method provided in this application embodiment also includes, but is not limited to, steps S1201 to S1203.

[0151] Step S1201: The client responds to the touch operation of the preset second recognition control. If the detection result indicates that the image to be recognized is complete, the client assigns a number to the recognition digit.

[0152] Step S1202: The client performs a validity check based on the number and identification digit, and obtains the check result;

[0153] Step S1203: If the judgment result indicates that the recognized number is valid, the client displays the preset interface according to the recognized number and the image to be recognized.

[0154] In step S1201 of some embodiments, for bank card types, the client can also perform OCR recognition without going through the server, that is, the client directly performs text recognition processing on the image to be recognized of the bank card type locally. Specifically, the client has a second recognition control pre-set on a preset interface. When the second recognition control is touched, the client performs local recognition on the image to be recognized. When the second recognition control is not touched, the client sends the image to be recognized to the server for remote recognition. When the second recognition control is touched, the client determines whether the image to be recognized is complete based on the detection result. If the detection result indicates that the image to be recognized is complete, the client sorts and numbers the recognized numbers according to a preset order. For example, based on the relative position of the recognized numbers and the UnionPay logo, the recognized numbers are encoded from the direction away from the UnionPay logo to the direction closer to the UnionPay logo, i.e., as shown below. Figure 7C As shown, the identification numbers are numbered from left to right.

[0155] In step S1202 of some embodiments, the client judges the legality of the identified number based on the Luhn algorithm (modulo 10 algorithm) and the number to determine whether the identified number is a genuine bank card number.

[0156] In step S1203 of some embodiments, when the judgment result indicates that the recognized number is a valid number, the client displays the recognized number and the image to be recognized on a preset interface, thereby enabling the client to perform text recognition on the image to be recognized, which is of the bank card type.

[0157] The text recognition method provided in this application embodiment performs image capture operations on the target object through a client, and performs image type recognition, quality detection, and other operations on the image to be recognized obtained from the image capture operation. The client sends the image to be recognized, which has a preset image type and a qualified detection result, to the server. The server generates a corresponding image identifier based on the image to be recognized, and performs text recognition processing on the image to be recognized to obtain recognition data. The client obtains the corresponding image to be recognized and recognition data based on the image identifier, and displays them on a preset interface. Therefore, this application embodiment uses the client as a "transfer station" between the image to be recognized and the server, and performs preliminary review of factors affecting text recognition efficiency and accuracy, such as image type and image quality, through the client. Therefore, compared to related technologies where the image to be recognized is obtained through a related interface and then directly reviewed, judged, and recognized, the text recognition method provided in this application embodiment can improve text recognition efficiency and accuracy. Furthermore, it can reduce the performance requirements of the server. An image identifier is obtained by using an initial identifier and a terminal identifier to uniquely identify the image to be identified. This enables other clients that have not performed image capture operations on the target object, in addition to the client used for image capture operations in this application embodiment, to obtain the image to be identified and the recognition data from the server based on the image identifier, thereby enriching the application scenarios of the text recognition method in this application embodiment.

[0158] like Figure 13 As shown in the figure, this application embodiment also provides a character recognition system that can implement the above-described character recognition method. The system includes:

[0159] Client 1301 is used to respond to the touch operation of the preset first recognition control, generate an image scanning area; perform an image capture operation on the target object according to the image scanning area to obtain the image to be recognized; perform image type recognition on the image to be recognized according to the preset type recognition model to obtain the recognition result; if the recognition result indicates that the image type of the image to be recognized is the preset type, then perform quality detection on the image to be recognized to obtain the detection result; if the detection result indicates that the quality of the image to be recognized is qualified, then send the image to be recognized to the server.

[0160] Server 1302: The server generates an image identifier for the image to be recognized and sends the image identifier to the client; the server performs text recognition processing on the image to be recognized to obtain the recognition data.

[0161] The client is also used to obtain the image to be recognized and the recognition data from the server based on the image identifier, and to display the preset interface based on the image to be recognized and the recognition data.

[0162] The specific implementation of this text recognition system is basically the same as the specific implementation of the text recognition method described above, and will not be repeated here.

[0163] This application also provides an electronic device, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the above-described character recognition method. This electronic device can be any smart terminal, including tablet computers, in-vehicle computers, etc.

[0164] like Figure 14 As shown, Figure 14 The hardware structure of an electronic device according to another embodiment is illustrated. The electronic device includes:

[0165] The processor 1401 can be implemented using a general-purpose CPU (Central Processing Unit), microprocessor, application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this application.

[0166] The memory 1402 can be implemented as a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 1402 can store the operating system and other applications. When the technical solutions provided in the embodiments of this specification are implemented through software or firmware, the relevant program code is stored in the memory 1402 and is called and executed by the processor 1401 using the text recognition method of the embodiments of this application.

[0167] The input / output interface 1403 is used to implement information input and output;

[0168] The communication interface 1404 is used to enable communication and interaction between this device and other devices. Communication can be achieved through wired means (such as USB, Ethernet cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.).

[0169] Bus 1405 transmits information between various components of the device (e.g., processor 1401, memory 1402, input / output interface 1403, and communication interface 1404);

[0170] The processor 1401, memory 1402, input / output interface 1403 and communication interface 1404 are connected to each other within the device via bus 1405.

[0171] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described character recognition method.

[0172] Memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs. Furthermore, memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, memory may optionally include memory remotely located relative to the processor, and these remote memories can be connected to the processor via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.

[0173] The embodiments described in this application are for the purpose of more clearly illustrating the technical solutions of the embodiments of this application, and do not constitute a limitation on the technical solutions provided by the embodiments of this application. As those skilled in the art will know, with the evolution of technology and the emergence of new application scenarios, the technical solutions provided by the embodiments of this application are also applicable to similar technical problems.

[0174] Those skilled in the art will understand that the technical solutions shown in the figures do not constitute a limitation on the embodiments of this application, and may include more or fewer steps than shown, or combine certain steps, or different steps.

[0175] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.

[0176] Those skilled in the art will understand that all or some of the steps in the methods disclosed above, as well as the functional modules / units in the systems and devices, can be implemented as software, firmware, hardware, or suitable combinations thereof.

[0177] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms “comprising” and “having,” and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0178] It should be understood that in this application, "at least one (item)" means one or more, and "more than" means two or more. "And / or" is used to describe the relationship between related objects, indicating that three relationships can exist. For example, "A and / or B" can represent three cases: only A exists, only B exists, and both A and B exist simultaneously, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one (item) of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one (item) of a, b, or c can represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.

[0179] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of the units described above is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.

[0180] The units described above as separate components may or may not be physically separate. 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 network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0181] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0182] If the integrated unit is implemented as 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 this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes multiple instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing programs, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0183] The preferred embodiments of the present application have been described above with reference to the accompanying drawings, but this does not limit the scope of the claims of the present application. Any modifications, equivalent substitutions, and improvements made by those skilled in the art without departing from the scope and substance of the embodiments of the present application shall be within the scope of the claims of the present application.

Claims

1. A character recognition method, characterized in that, The method includes: The client responds to the touch operation of the preset first recognition control and generates an image scanning area; The client performs an image capture operation on the target object based on the image scanning area to obtain the image to be recognized; The client performs image type recognition on the image to be recognized according to a preset type recognition model, and obtains the recognition result; If the recognition result indicates that the image type of the image to be recognized is a preset type, then the client performs quality detection on the image to be recognized and obtains the detection result; If the detection result indicates that the image to be identified is of acceptable quality, the client sends the image to be identified to the server. The server generates an image identifier for the image to be identified based on the image to be identified, and sends the image identifier to the client; The server performs text recognition processing on the image to be recognized to obtain recognition data; The client obtains the image to be recognized and the recognition data from the server based on the image identifier, and displays the preset interface based on the image to be recognized and the recognition data; wherein, the client that has not performed an image capture operation on the target object can also obtain the image to be recognized and the recognition data from the server based on the image identifier; Wherein, the preset type includes ID card type, and the detection result includes a first result; or, the preset type includes bank card type, and the detection result includes a second result; or, the preset type includes document type, and the detection result includes a third result; the client obtains the first result based on at least one of the following data: clarity data, exposure data, and integrity data; the client performs blur detection on the cropped image of the image to be recognized to obtain the third result; The client obtains the second result as follows: If the recognition result indicates that the image type of the image to be recognized is the bank card type, then the client obtains the card number area and the image area of ​​the image to be recognized; The client performs text recognition on the card number area to obtain the recognized numbers; If the number of identified digits is greater than a preset threshold, the client expands the image region to obtain an initial image. The client rotates the initial image according to a preset angle to obtain the target image; The client inputs the target image into a preset detection model for a second integrity detection, and obtains the second result; Specifically, the method further includes, for different bank card types: The client responds to the touch operation of the preset second recognition control. If the detection result indicates that the image to be recognized is complete, the client assigns a number to the recognition digit. The client performs a legality judgment based on the number and the identification number, and obtains the judgment result; If the judgment result indicates that the identified number is valid, the client displays the preset interface based on the identified number and the image to be identified.

2. The method according to claim 1, characterized in that, The client performs image type recognition on the image to be recognized according to a preset type recognition model, and obtains the recognition result, including: The client performs image filtering on the image to be identified according to a preset filtering model, and obtains the filtering results; If the filtering result indicates that the image to be identified is within the preset filtering range, the client performs image type identification on the image to be identified according to the type identification model to obtain the identification result.

3. The method according to claim 2, characterized in that, The preset type includes the ID card type, and the detection result includes the first result; If the recognition result indicates that the image type of the image to be recognized is a preset type, then the client performs quality detection on the image to be recognized to obtain a detection result, including at least one of the following steps: If the recognition result indicates that the image type of the image to be recognized is the ID card type, then the client performs a sharpness detection on the image to be recognized to obtain sharpness data; If the recognition result indicates that the image type of the image to be recognized is the ID card type, then the client performs exposure detection on the image to be recognized to obtain exposure data; If the recognition result indicates that the image type of the image to be recognized is the ID card type, then the client performs a first integrity check on the image to be recognized to obtain integrity data; The client obtains the first result based on at least one of the following data: the sharpness data, the exposure data, and the integrity data.

4. The method according to claim 2, characterized in that, The preset type includes document type, and the detection result includes third result; If the recognition result indicates that the image type of the image to be recognized is a preset type, then the client performs quality detection on the image to be recognized and obtains the detection result, including: If the recognition result indicates that the image type of the image to be recognized is the document type, then the client preprocesses the image to be recognized to obtain a reference image; The client extracts a cropped image from the reference image based on a preset region. The client performs the blur detection on the captured image to obtain the third result.

5. The method according to any one of claims 1 to 4, characterized in that, The server generates an image identifier for the image to be identified, including: The server obtains the delivery timestamp of the image to be identified and gets the initial identifier based on the delivery timestamp; The server obtains the client's terminal identifier; The server obtains the image identifier based on the initial identifier; or, the server obtains the image identifier based on the initial identifier and the terminal identifier.

6. A text recognition system, characterized in that, The system includes: The client is configured to respond to a touch operation of a preset first recognition control, generate an image scanning area; perform an image capture operation on a target object according to the image scanning area to obtain an image to be recognized; perform image type recognition on the image to be recognized according to a preset type recognition model to obtain a recognition result; if the recognition result indicates that the image type of the image to be recognized is a preset type, then perform quality detection on the image to be recognized to obtain a detection result; if the detection result indicates that the image to be recognized is of acceptable quality, then send the image to be recognized to the server; wherein, the preset type includes an ID card type, and the detection result includes a first result; or, the preset type includes a bank card type, and the detection result includes a second result; or, the preset type includes a document type, and the detection result includes a third result; the client obtains the first result based on at least one of the following data: sharpness data, exposure data, and integrity data; the client performs blur detection on a cropped image of the image to be recognized to obtain a third result; the client obtains the second result in the following manner: If the recognition result indicates that the image type of the image to be recognized is the bank card type, then the client obtains the card number area and the image area of ​​the image to be recognized; the client performs text recognition on the card number area to obtain the recognized digits; if the number of recognized digits is greater than a preset threshold, then the client expands the image area to obtain an initial image; the client rotates the initial image according to a preset angle to obtain a target image; the client inputs the target image into a preset detection model for a second integrity detection to obtain the second result; wherein, for the bank card type, the client is further configured to: respond to the touch operation of a preset second recognition control; if the detection result indicates that the image to be recognized is complete, then the client assigns a number to the recognized digits; the client performs a validity judgment based on the number and the recognized digits to obtain a judgment result; if the judgment result indicates that the recognized digits are valid, then the client displays a preset interface based on the recognized digits and the image to be recognized; The server is configured to generate an image identifier for the image to be identified based on the image to be identified, and send the image identifier to the client; the server performs text recognition processing on the image to be identified to obtain recognition data; The client is also used to obtain the image to be identified and the identification data from the server according to the image identifier, and to display the preset interface according to the image to be identified and the identification data; wherein, the client that has not performed an image capture operation on the target object can also obtain the image to be identified and the identification data from the server according to the image identifier.

7. An electronic device, characterized in that, The electronic device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the character recognition method according to any one of claims 1 to 5.

8. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the character recognition method according to any one of claims 1 to 5.