Text recognition method and computing device
By coordinating client and server processing, and optimizing and enhancing images according to the type of fuzziness, the problem of insufficient accuracy in fuzzy handwritten text recognition is solved, achieving efficient text recognition results.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-22
- Publication Date
- 2026-03-27
AI Technical Summary
Existing technologies lack sufficient accuracy in processing blurry handwritten text, making it difficult to effectively preserve useful information in images, resulting in inaccurate recognition results.
By working collaboratively between the client and server, the image processing algorithm is adapted to the type of blur in the image and is used to process the image to be recognized, including environmental optimization, transmission optimization and depth enhancement algorithms, to generate a high-quality target correction image and perform text recognition.
It significantly improves the accuracy of image correction and the recognizability of text features, thereby increasing the accuracy of the final text recognition.
Smart Images

Figure CN121747124A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] Embodiments of the present specification relate to the technical field of text recognition, and particularly relate to a text recognition method and a computing device. BACKGROUND
[0002] With the rapid development of deep learning and computer vision technology, the handwriting recognition technology has been mature in processing clear and regular text images, and has been widely applied in many scenarios. However, the performance of the above technology still has a significant bottleneck when facing the widely existing blurred handwriting in the real world, so that the high-precision recognition of blurred handwriting text becomes a key problem to be solved.
[0003] At present, the main way to recognize blurred handwriting is to use a fixed image processing algorithm to process the image to be recognized, and then perform feature extraction and recognition on the processed image to obtain the text recognition result. However, this way is easy to lose useful information in the image to be recognized, thereby leading to inaccurate recognition results, and therefore, there is an urgent need for a text recognition method with higher recognition accuracy. SUMMARY
[0004] Therefore, the embodiments of the present specification provide a text recognition method. One or more embodiments of the present specification also relate to a computing device, a computer readable storage medium and a computer program product to solve the technical defects in the prior art.
[0005] According to a first aspect of the embodiments of the present specification, a text recognition method is provided, applied to a server, comprising: obtaining a target blur type of an image to be recognized uploaded by a client, wherein the target blur type is obtained by the client performing blur degree recognition on the image to be recognized; processing the image to be recognized by an image processing algorithm corresponding to the target blur type to obtain a target corrected image, wherein different blur types correspond to different image processing algorithms; performing text recognition on the target corrected image to determine a text recognition result of the target corrected image, and returning the text recognition result to the client to enable the client to display the text recognition result.
[0006] According to a second aspect of the embodiments of the present specification, a text recognition method is provided, applied to a client, comprising: obtaining an image to be recognized, performing blur degree recognition on the image to be recognized to determine a target blur type of the image to be recognized, and uploading the target blur type to a server; receive and display the text recognition result returned by the server, wherein the text recognition result is obtained by the server performing text recognition on the target correction image, and the target correction image is obtained by the server processing the to-be-recognized image based on an image processing algorithm corresponding to the target blur type of the to-be-recognized image.
[0007] According to a third aspect of an embodiment of the present specification, a computing device is provided, comprising: a memory and a processor; The memory is configured to store computer executable instructions, and the processor is configured to execute the computer executable instructions, and the computer executable instructions, when executed by the processor, implement the steps of the text recognition method of the first aspect or the text recognition method of the second aspect.
[0008] According to a fourth aspect of an embodiment of the present specification, a computer readable storage medium is provided, which stores computer executable instructions, and the instructions, when executed by a processor, implement the steps of the text recognition method of the first aspect or the text recognition method of the second aspect.
[0009] According to a fifth aspect of an embodiment of the present specification, a computer program product is provided, comprising computer programs / instructions, and the computer programs / instructions, when executed by a processor, implement the steps of the text recognition method of the first aspect or the text recognition method of the second aspect.
[0010] One embodiment of the present specification provides a text recognition method applied to a server, comprising: obtaining a target blur type of a to-be-recognized image uploaded by a client, wherein the target blur type is obtained by the client performing blur degree recognition on the to-be-recognized image; processing the to-be-recognized image by using an image processing algorithm corresponding to the target blur type to obtain a target correction image, wherein different blur types correspond to different image processing algorithms; performing text recognition on the target correction image to determine a text recognition result of the target correction image, and returning the text recognition result to the client to enable the client to display the text recognition result.
[0011] In one embodiment of the present specification, by using an image processing algorithm highly adapted to the image blur type to process the to-be-recognized image, the effective information of the original to-be-recognized image is largely retained, the accuracy of image correction and the distinguishability of text features are fundamentally improved, and thus the accuracy of final text recognition is improved. BRIEF DESCRIPTION OF DRAWINGS
[0012] Figure 1 is a flowchart of a text recognition method provided by one embodiment of the present specification; Figure 2 is a flowchart of another text recognition method provided by one embodiment of the present specification; Figure 3 is an interaction flowchart of a text recognition method provided by one embodiment of the present specification; Figure 4 is a structural schematic diagram of a text recognition system provided by one embodiment of the present specification; Figure 5 is a structural schematic diagram of a text recognition device provided by one embodiment of the present specification; Figure 6 is a structural schematic diagram of another text recognition device provided by one embodiment of the present specification; Figure 7 is a structural block diagram of a computing device provided by one embodiment of the present specification. DETAILED DESCRIPTION
[0013] In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present specification. However, the present specification can be practiced without the specific details, which are not described in the present specification, and it is understood that the scope of the present specification is not limited to the details of the description. In other instances, well-known methods associated with computing devices have not been described in detail in order to avoid unnecessarily obscuring the present specification.
[0014] The terminology used in one or more embodiments of the present specification is for the purpose of describing particular embodiments only and is not intended to be limiting of one or more embodiments of the present specification. As used in one or more embodiments of the present specification and the accompanying claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms "comprises" and / or "comprising," when used in one or more embodiments of the present specification, specify the presence of stated features, integers, steps, operations, elements, and / or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof.
[0015] It is to be understood that the terms first, second, etc. can be employed in one or more embodiments of the present specification to describe various information. Such information should not be limited by these terms. These terms are only used to distinguish one category of information from another category of information. For example, without departing from the scope of one or more embodiments of the present specification, first can be termed second, and similarly, second can be termed first. Depending on the context, the word "if' as used herein can be interpreted to mean "when" or "in response to determining." Depending on the context, the word "if' as used herein can be interpreted to mean "when" or "in response to determining."
[0016] Furthermore, it should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in one or more embodiments of this specification are all information and data authorized by the user or fully authorized by all parties. Moreover, the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and corresponding operation entry points are provided for users to choose to authorize or refuse.
[0017] First, the terms and concepts used in one or more embodiments of this specification will be explained.
[0018] Blurred text images: These are handwritten images with blurred outlines and lost details due to poor shooting conditions (such as dim lighting or inaccurate focus), aging of the medium (such as yellowed or wrinkled paper), or irregular handwriting (such as illegible handwriting or strokes sticking together).
[0019] Existing text recognition technology is relatively mature when processing clear images, but it has significant limitations in the field of fuzzy text recognition. The current mainstream system processing flow is usually "image acquisition - simple noise reduction - feature extraction - single model recognition".
[0020] Image acquisition relies on manual shooting by the user and has not optimized parameters (such as automatic lighting and image stabilization) for blurry scenes.
[0021] Image preprocessing: Using a fixed denoising algorithm (such as mean filtering) results in consistent processing of different blur types (such as Gaussian blur and salt-and-pepper noise), which can easily lead to the loss of useful information.
[0022] Feature extraction: Only extract surface features such as the outline or number of strokes of the text, ignoring the contextual dependence of ambiguous text (such as the stroke order of cursive characters).
[0023] Recognition models: Mostly use a single CNN or OCR (Optical Character Recognition) model, which has a low tolerance for blurry characters with overlapping or missing strokes.
[0024] For example, in medical settings, when patients take photos of doctors' illegible prescriptions with their mobile phones (with overlapping strokes and shadows), the existing system has an error rate of over 40%; and for handwritten images that may have wrinkles or special colors on carbon paper, the recognition results often result in missing or misidentified characters.
[0025] To address the aforementioned technical problems, this specification provides a text recognition system in one embodiment, comprising a client and a server. The client acquires an image to be recognized, performs blur level identification on the image, determines the target blur type, and uploads the target blur type to the server. The server acquires the target blur type of the image uploaded by the client; processes the image to be recognized using an image processing algorithm corresponding to the target blur type to obtain a target corrected image; performs text recognition on the target corrected image, determines the text recognition result, and returns the text recognition result to the client; the client receives and displays the text recognition result returned by the server. Thus, by employing an image processing algorithm highly adapted to the image blur type, the effective information of the original image to be recognized is preserved to the greatest extent, fundamentally improving the accuracy of image correction and the recognizability of text features, thereby increasing the final text recognition accuracy.
[0026] This specification also provides a text recognition method, and also relates to a text recognition device, a computing device, a computer-readable storage medium, and a computer program product, which will be described in detail in the following embodiments.
[0027] See Figure 1 , Figure 1 A flowchart of a text recognition method according to an embodiment of this specification is shown. The text recognition method is applied to a server and specifically includes the following steps 102-106.
[0028] Step 102: Obtain the target blur type of the image to be recognized uploaded by the client. The target blur type is obtained by the client through blur degree recognition of the image to be recognized.
[0029] The process involves the client acquiring the image to be recognized, performing blur level identification on the image, determining the target blur type of the image, and uploading the target blur type to the server.
[0030] Specifically, the client (such as a smartphone with a camera, a high-definition scanner, or other device with image acquisition capabilities) acquires the image to be recognized through manual triggering or automatic sensing by the user. The image can be an image containing blurred handwritten text, supporting common formats such as JPG, PNG, and WEBP, and the resolution can be adaptively set, for example, within the range of 200–1200 dpi (Dots Per Inch), to ensure a balance between image quality and transmission efficiency.
[0031] To ensure optimal image quality and thus improve the accuracy of subsequent recognition, in one optional implementation of this embodiment, the client has intelligent adaptive acquisition capabilities. Its core lies in its ability to dynamically adjust acquisition strategies and parameters in real time based on the device's environmental conditions and its own motion.
[0032] Specifically, the client monitors the environment in real time through built-in sensors and automatically triggers corresponding optimization measures: Ambient light deficiency optimization: If the light intensity sensor detects that the current ambient light intensity is lower than a preset threshold (e.g., below 50 lux), the client will automatically activate the fill light function. This function can be achieved by calling the device's software fill light (such as increasing screen brightness to illuminate the scene) or enabling hardware fill light (such as an LED flash), aiming to significantly enhance the overall brightness of the image and effectively suppress noise caused by insufficient light.
[0033] Device shake optimization: If the accelerometer detects excessive device shake (e.g., greater than the tolerance of 0.5g), the client will automatically invoke a digital image stabilization algorithm to stabilize the image sensor, or use multi-frame synthesis technology (taking multiple photos in quick succession and aligning and merging them) to generate a clearer, blur-free still image.
[0034] For example, a patient uses their mobile phone to photograph their medical record notes, which are illegible, have overlapping strokes, and contain localized shadows. The client first detects that the environment is dark and the hand is shaky, then automatically turns on the flash and enables image stabilization. By continuously acquiring multiple images and selecting or fusing the best one, a final image with a resolution of 700 dpi and in JPG format is generated, laying a good foundation for subsequent text recognition.
[0035] In another implementation, the client also supports a standard acquisition process that requires no optimization intervention. That is, it directly captures images without calling any sensor data or triggering any optimization algorithms, and uploads the raw images captured directly as the images to be identified.
[0036] The "blur level" measures the severity of detail and information loss in an image. It is not a subjective perception of the human eye, but is calculated through specific image algorithms. The "target blur type" is the degree of blur of the image to be identified, determined after quantifying or classifying the blur level.
[0037] It should be understood that classifying the image to be recognized into different blur types aims to discretize the continuous blur levels into finite categories with clear technical meanings, enabling differentiated and efficient processing by the server. For example: "First blur": Images with a blur level quantization value below the threshold T1 are considered to be in the first blur category. Their characteristics are that the image details are slightly lost, but the main structure of the text and the edges of the strokes are still clearly distinguishable, and a high recognition rate can be guaranteed without complex processing.
[0038] "Secondary blur": Images with blur levels quantized between thresholds T1 and T2 are considered secondary blur. They are characterized by a significant decrease in image clarity and visible blurring and adhesion at text edges. They require effective image enhancement algorithms for accurate identification.
[0039] "Third blur": Images with a blur level quantization value higher than the threshold T2 are considered to have third blur. Its characteristics include severe image defocusing or jitter, significant loss of text features, and difficulty in recognizing contours. Powerful restoration techniques must be used or the user must be prompted to re-capture the image.
[0040] It should be noted that there are multiple ways to identify the degree of blur of the image to be recognized and determine its target blur type. The appropriate method can be flexibly selected according to the actual application scenario, computing resources, and requirements for accuracy and efficiency. The embodiments in this specification do not impose any limitations on this.
[0041] One approach is to use a deep learning-based image classification model (such as a convolutional neural network CNN). The model is trained in advance using a large number of image samples labeled with different blur types (such as first blur, second blur, third blur; or motion blur, Gaussian blur, out-of-focus blur; mild blur, moderate blur, severe blur). This enables the model to automatically extract features end-to-end and directly output the most likely blur type classification result.
[0042] Another approach is to quantify the degree of blur by calculating different image sharpness evaluation metrics (such as gradient energy, Laplacian variance, frequency domain features, etc.) and make a comprehensive judgment and classification based on preset thresholds or rule logic (for example, if obvious directional edge trailing is detected, it is determined to be motion blur).
[0043] Developers can choose the most suitable single method or combine multiple methods according to their needs to achieve the best recognition results.
[0044] Step 104: Process the image to be recognized using the image processing algorithm corresponding to the target blur type to obtain the target corrected image. Different blur types correspond to different image processing algorithms.
[0045] It should be noted that image processing algorithms refer to computational methods and programs designed to restore image quality or enhance specific image features. Furthermore, the server pre-defines a mapping table or decision logic, which defines that "if the target blur type is A, then algorithm A is called; if the target blur type is B, then algorithm B is called." This correspondence is based on historical experience; that is, for a certain type of blur, using a certain algorithm yields better results and higher efficiency.
[0046] The process can begin with the client processing the image to be recognized to obtain a processed image. The client then uploads the processed image to the server, which further processes the image based on the target blur type to obtain a target correction image.
[0047] In one optional implementation of this embodiment, after the client determines the target blur type of the image to be recognized, the client optimizes the image to be recognized based on the transmission optimization algorithm corresponding to the target blur type to obtain an initial corrected image, and uploads the initial corrected image to the server. Correspondingly, the server obtains the initial corrected image uploaded by the client. Image processing algorithms include image enhancement algorithms; by using image processing algorithms corresponding to the target blur type, the image to be recognized is processed to obtain the target corrected image, specifically including: The initial corrected image is enhanced using the image enhancement algorithm corresponding to the target blur type to obtain the target corrected image. The target blur type includes first blur, second blur, and third blur with increasing blur degree.
[0048] The embodiments in this specification reasonably allocate and coordinate the image optimization computation task between the client (front end) and the server (back end) to balance processing efficiency, network transmission overhead and final image quality.
[0049] The entire process can be broken down into two stages: Phase 1: Client optimization and uploading.
[0050] The client holds the original image to be identified and has determined the target blur type of the image (e.g., first blur, second blur, etc.) through some means (such as user selection or automatic detection).
[0051] Instead of directly uploading the massive original image, the client utilizes local computing resources to run a lightweight transmission optimization algorithm tailored to the target blur type, generating an initial corrected image. Compared to the original image, this image has more prominent key features, less redundant information, and potentially a smaller size, making it easier to transmit over the network. The client then uploads this optimized initial corrected image to the server.
[0052] Phase Two: Server-side Enhancement and Processing.
[0053] The server receives the initial corrected image uploaded by the client. Based on the target blur type specified by the client, the server then invokes a more powerful and complex image enhancement algorithm (such as a deep learning-based super-resolution model). This algorithm performs intensive computational processing on the initial corrected image, further restoring and enhancing image details. Finally, a high-quality target corrected image is generated for subsequent text recognition tasks.
[0054] In this scheme, the blur type of the image is divided into three levels according to the degree of blur: first blur, second blur, and third blur, and their blur degree increases progressively, that is, in terms of the severity of blur: first blur < second blur < third blur.
[0055] Wherein, if the target blur type is the first blur, then the transmission optimization algorithm is an image denoising algorithm. Based on the transmission optimization algorithm corresponding to the target blur type, the image to be recognized is optimized to obtain an initial corrected image, specifically including: If the target blur type is the first blur, then the image to be identified is denoised using an image denoising algorithm to obtain an initial corrected image; If the target blur type is second or third blur, the transmission optimization algorithm is an image compression algorithm. Based on the transmission optimization algorithm corresponding to the target blur type, the image to be recognized is optimized to obtain an initial corrected image, specifically including: If the target blur type is second blur or third blur, the image to be recognized is compressed using an image compression algorithm to obtain an initial corrected image.
[0056] It should be noted that image denoising algorithms aim to recover the original true signal from an image contaminated by noise as much as possible, and to suppress or eliminate unnecessary random noise.
[0057] Optionally, the image denoising algorithm includes, but is not limited to, median filtering, mean filtering, Gaussian filtering, or nonlocal mean denoising, etc. The specific algorithm can be flexibly selected according to the image noise characteristics, processing efficiency requirements, and accuracy requirements. The embodiments in this specification do not specifically limit this.
[0058] For example, an adaptive median filtering algorithm can be used to effectively suppress salt-and-pepper noise while preserving image edge details.
[0059] It's important to note that image compression algorithms aim to reduce the amount of data (file size) while preserving the visual quality of the image as much as possible. This saves storage space; a high-resolution image has a very large original data size, and compression can save a significant amount of disk space. It also speeds up transmission; in network transmissions (such as webpage loading and app image uploads), smaller files mean faster transmission speeds and lower bandwidth consumption.
[0060] Optionally, image compression algorithms include different implementation methods such as lossy compression, lossless compression, or resolution scaling. The embodiments in this specification do not limit the specific implementation strategy.
[0061] For example, an image size compression algorithm can be used to limit the width and height to within 1024 pixels without changing the image content, which can significantly reduce the amount of data required for transmission and improve the system processing efficiency.
[0062] In this embodiment, a lightweight preprocessing module is integrated into the client side to optimize image transmission based on the identified blur type. An optimized initial corrected image is generated before uploading, significantly reducing the amount of network data transmitted and the dependence on bandwidth. Upon receiving the image, the server invokes an image enhancement algorithm matching the blur type for deep processing, effectively improving image quality. This design significantly reduces network transmission latency and enables precise processing based on the degree of image blur. While removing noise and compressing useless information, it enhances key features, providing high-quality, highly adaptable input data for subsequent feature extraction and recognition tasks, comprehensively improving system processing efficiency and recognition accuracy.
[0063] Alternatively, after determining the target blur type of the image to be recognized, the client can directly upload the image to be recognized and the target blur type to the server. The server then processes the image to be recognized based on the image processing algorithm corresponding to the target blur type to obtain the target corrected image.
[0064] Specifically, if the target blur type is the first blur, the image processing algorithm includes an image denoising algorithm and an image enhancement algorithm. The image to be recognized is processed using the image processing algorithm corresponding to the target blur type to obtain a target corrected image, specifically including: An image denoising algorithm is used to denoise the image to be recognized, thereby obtaining an initial corrected image. The initial corrected image is enhanced using the first blur-corresponding image enhancement algorithm to obtain the target corrected image.
[0065] If the target blur type is second blur or third blur, the image processing algorithm includes an image enhancement algorithm. This algorithm processes the image to be recognized using the image processing algorithm corresponding to the target blur type to obtain a corrected target image. Specifically, this includes: The image to be recognized is enhanced by the image enhancement algorithm corresponding to the target blur type, and the target corrected image is obtained.
[0066] It should be understood that, due to the fundamental differences in the causes and manifestations of different types of image blur, a single, general-purpose image enhancement algorithm often fails to achieve optimal results in all scenarios. Therefore, to achieve accurate and efficient deblurring enhancement, the embodiments in this specification adopt a classification-then-processing approach. That is, firstly, the degree of blur in the image is judged to accurately identify the blur type; then, based on the judgment result, an image processing algorithm tailored to that specific type is adaptively selected and invoked.
[0067] In one optional implementation of this embodiment, when the target blur type is a first blur, the image enhancement algorithm corresponding to the first blur is a contrast enhancement algorithm; the initial corrected image is enhanced using the image enhancement algorithm corresponding to the target blur type to obtain the target corrected image, including: The contrast of the initial corrected image is enhanced using a contrast enhancement algorithm to obtain the target corrected image.
[0068] It should be noted that image contrast refers to the difference in brightness between the brightest and darkest parts of an image.
[0069] Low-contrast images appear grayish, with bright areas not bright enough and dark areas not dark enough. The overall tonal range is narrow, and details are difficult to discern. This is usually caused by uneven lighting, backlighting, or limitations of the imaging equipment.
[0070] High-contrast images: clear black and white, brighter highlights, darker shadows, vibrant colors, and outstanding details.
[0071] Contrast enhancement algorithms aim to expand the grayscale range of an image through mathematical transformations, "stretching" or "mapping" pixel values that are originally concentrated in a narrow range to a wider dynamic range, thereby making the details of the image more clearly visible.
[0072] In this embodiment, optional contrast enhancement algorithms include, but are not limited to: histogram equalization (HE), gamma correction, contrast stretching (linear transformation), and contrast-limited adaptive histogram equalization (CLAHE). The specific algorithm selection can be determined according to the specific characteristics of the image (such as grayscale distribution and noise level) and actual application requirements, and this specification does not limit it.
[0073] As a preferred implementation, a contrast-limited adaptive histogram equalization algorithm can be used. This algorithm divides the image into blocks and performs contrast-limited histogram equalization in each local region, finally synthesizing the global image through interpolation. This method can effectively enhance local image details (such as text strokes) while suppressing excessive amplification of overall background noise, thereby improving the clarity of text areas while maintaining the natural look of the image, making it particularly suitable for document image processing.
[0074] In this embodiment, a contrast enhancement algorithm is used to process the first blurred image. By adaptively enhancing the local contrast of the initial corrected image, the feature differences between the text and the background are effectively strengthened, significantly improving the clarity and recognizability of the strokes. This processing effectively suppresses noise amplification while enhancing useful information, providing higher-quality image data for subsequent feature extraction and recognition tasks, thereby improving the overall recognition accuracy and processing efficiency of the system.
[0075] Furthermore, when the target blur type is second blur, the image enhancement algorithm corresponding to the second blur is a resolution enhancement algorithm; by using the image enhancement algorithm corresponding to the target blur type, the initial corrected image is enhanced to obtain the target corrected image, including: The resolution of the initial corrected image is enhanced by a resolution enhancement algorithm to obtain the target corrected image, wherein the second blur is more blurred than the first blur.
[0076] Resolution enhancement algorithms are a class of advanced image processing techniques designed to overcome the limitations of raw image sensor hardware. Their core task is not simple pixel interpolation, but rather, based on an understanding of the image content, intelligently inferring and filling in lost high-frequency details (such as sharp edges and fine textures), thereby reconstructing a low-resolution, blurry input image into a high-resolution, clear image. This process provides subsequent recognition tasks with input data that is more structurally complete and feature-rich.
[0077] In this embodiment, the optional resolution enhancement algorithms include, but are not limited to: interpolation-based methods (such as bicubic interpolation); reconstruction-based methods (such as inverse filtering and maximum a posteriori probability estimation); and deep learning-based methods (such as convolutional neural networks (CNN), generative adversarial networks (GAN), and super-resolution convolutional neural networks (SRCNN)). The specific algorithm selection can be determined based on the requirements of computational efficiency, enhancement effect, and hardware platform; this specification does not limit its specific implementation.
[0078] As a preferred implementation, a super-resolution reconstruction algorithm based on Generative Adversarial Networks (GANs) can be employed. This algorithm utilizes a generator network to reconstruct high-resolution details from low-resolution images, while a discriminator network adversarially ensures the visual realism and natural texture of the generated result. For example, a blurry 300dpi text image can be reconstructed into a high-resolution 600dpi image, effectively separating fused strokes and repairing broken edges while minimizing the introduction of unnatural artifacts, thus greatly improving the readability of the text.
[0079] In this embodiment, a resolution enhancement algorithm is used to process the second blurred image. By enhancing the resolution and reconstructing details of the initial corrected image, the text stroke structure and edge features lost due to blurring are effectively restored. This processing significantly enhances the high-frequency information of the image, greatly improves the clarity and integrity of the text region, and provides high-quality image data with complete structure and clear features for subsequent recognition tasks, thereby effectively ensuring the system's accuracy in recognizing the second blurred image and the reliability of its processing.
[0080] Furthermore, when the target blur type is third blur, the image enhancement algorithm corresponding to third blur is an attention-driven resolution enhancement algorithm; based on the initial corrected image, the target corrected image is obtained through the image enhancement algorithm corresponding to the target blur type, including: An attention-driven resolution enhancement algorithm is used to enhance the resolution of the initial corrected image to obtain the target corrected image. The third blur is more blurred than the first and second blurs, while the second blur is more blurred than the first blur.
[0081] Among them, attention-driven resolution enhancement algorithms represent an advanced direction in the field of image restoration. Their core lies in using an attention mechanism to enable the model to simulate the human visual cognitive process—"focusing on the important and ignoring the secondary." This algorithm not only aims to improve global resolution but also intelligently identifies the differences in importance between different regions of an image. It prioritizes limited computational resources for reconstructing key features such as text strokes and structural edges, thereby achieving a significant enhancement in the visual readability of key areas while improving overall quality.
[0082] Attention-driven resolution enhancement algorithms perform deep semantic analysis and feature extraction on the initial corrected image, adaptively focusing on key regions (such as text lines and stroke structures) that are crucial to the recognition task, and reconstructing details with high fidelity while effectively suppressing irrelevant background interference, ultimately obtaining a high-quality target corrected image.
[0083] In this embodiment, optional attention-driven resolution enhancement algorithms include, but are not limited to: models based on a combination of deep convolutional networks and attention modules; embedding channel attention or spatial attention mechanisms into generative adversarial networks (GANs) and their variants; and hybrid models that introduce additional supervisory information such as semantic segmentation priors and edge priors to guide the generation of attention weights. This specification does not limit the specific network structure implementation of the embodiments.
[0084] As a preferred implementation, a generative adversarial network (GAN) integrating a spatial attention mechanism can be employed. The generator of this network can automatically generate attention maps, accurately locate text regions in the image, and accordingly weight and adjust the network feature flow, focusing the reconstruction process on these regions. Simultaneously, the discriminator ensures the global consistency and local realism of the generated results. For example, this model can effectively identify and reconstruct blurred text strokes mixed with wrinkles, shadows, and stains, and suppress the reconstruction intensity of these background distractions, thereby maximizing the readability of the text content even under extremely degraded conditions.
[0085] In the embodiments described in this specification, an advanced enhancement algorithm based on an attention mechanism is used to process the third blurred image. This processing achieves high-precision restoration of the core text structure in severely degraded images through intelligent region focusing and feature reconstruction, while effectively suppressing the amplification of background noise and interference information at the global level. This provides high-quality image data with rich details and clear key features for subsequent recognition tasks, significantly improving the system's success rate and recognition accuracy for processing the third blurred image.
[0086] In one optional implementation of this embodiment, after obtaining the enhanced image, to further improve the text recognition accuracy and optimize the input quality of the feature extraction module, the enhanced image is also tilt corrected. Specifically, the tilt angle of the text lines in the image is detected using the Hough Transform, and the image is rotated accordingly to ensure that the text lines are horizontal, providing standardized input for subsequent line segmentation and character recognition. Next, the corrected image is binarized, converting the grayscale image into a high-contrast black-and-white binary image, thereby completely separating the foreground text from the background information, significantly reducing redundant data and highlighting the text's contour features. After the above processing, the system outputs a clear binary image with regular text orientation and a clean background. This binary image is used as the target corrected image and sent to the feature extraction module. This processing step effectively eliminates the interference of geometric deformation and grayscale noise on the recognition process, laying a solid foundation for subsequent feature extraction and sequence recognition, and further ensuring the overall accuracy and stability of the system.
[0087] Step 106: Perform text recognition on the target correction image, determine the text recognition result of the target correction image, and return the text recognition result to the client so that the client can display the text recognition result.
[0088] The server will use the optimized "target correction image" obtained in the previous steps to perform text recognition, ultimately extracting the text information contained in the image (i.e., the "text recognition result"). The server will then return this recognition result to the requesting client, which is responsible for displaying the result to the user, thus completing the entire process from image input to text output.
[0089] To ensure the accuracy of text recognition results, especially when processing target correction images that may still have local or complex background interference after enhancement and restoration, the server employs a multi-stage, confidence-based refined recognition strategy. This strategy not only performs preliminary text extraction but also includes intelligent filtering and multi-dimensional correction of candidate results to select the optimal solution from multiple possible outcomes. In one optional implementation of this embodiment, text recognition is performed on the target correction image to determine the text recognition result, including: Feature extraction is performed on the target correction image to obtain multiple initial text sequences of the target correction image and the matching score of each initial text sequence; Based on preset filtering rules and matching scores of each initial text sequence, at least one candidate text sequence is selected from each initial text sequence. The target candidate text sequence is corrected in at least one dimension using the target text recognition model to obtain the target corrected text sequence corresponding to the target candidate text sequence, and the confidence score of the target corrected text sequence is determined. The target candidate text sequence is any one of the at least one candidate text sequence. Based on the target corrected text sequence corresponding to at least one candidate text sequence, and the confidence score of each target corrected text sequence, the target text sequence is determined, and based on the target text sequence and the confidence score of the target text sequence, the text recognition result of the target corrected image is generated.
[0090] It should be understood that, to achieve high-precision image-to-text conversion and fully address the uncertainties of text recognition in complex scenarios, this solution employs a layered, multi-path optimization text recognition mechanism. The core of this mechanism lies in not relying on a single recognition result, but rather maximizing the accuracy of the output by generating multiple candidates, selecting the best, intelligently correcting, and finally deciding. Specifically, this process may include the following steps: First, the powerful sequence prediction capabilities of deep learning models (such as CNN + bidirectional RNN + attention mechanism) are utilized to decode the corrected image, generating a candidate sequence set containing multiple possible sequences and their corresponding initial confidence scores (matching scores). This step provides a diverse range of alternatives for subsequent decisions, effectively avoiding errors caused by single-prediction biases of the model.
[0091] Second, after obtaining the candidate sequence set, the system does not directly perform complex processing on all candidates. Instead, it first uses preset rules to select the best among multiple sequences in the candidate sequence set to narrow down the scope and focus on high-quality candidates. These rules may include, but are not limited to: confidence threshold filtering (removing unreliable results with too low scores) and length reasonableness checks (excluding abnormal sequences that are obviously too long or too short).
[0092] Third, for the selected high-quality candidate sequences, more advanced and specialized models are used to refine them. These models typically incorporate contextual understanding and relevant domain knowledge.
[0093] For example, a pre-trained language model corresponding to the domain of the image to be identified (e.g., if the image to be identified is a doctor's handwritten prescription, then a large language model fine-tuned with medical corpus is called, or a BERT (Bidirectional Encoder Representations from Transformers) model trained with medical corpus is used to correct the candidate sequence.
[0094] Fourth, after correction, each candidate will receive a new, comprehensive confidence score. Then, the confidence scores of all corrected candidate sequences are compared, and the optimal text sequence is selected to obtain the text recognition result of the image to be recognized.
[0095] In the embodiments of this specification, by generating multiple initial text sequences and filtering them according to matching scores, the diversity and high quality of candidate texts are ensured, effectively avoiding the possibility of missed detections or errors that may occur with a single recognition result; secondly, a multi-dimensional correction mechanism is introduced to deeply optimize the candidate sequences, which greatly improves the accuracy of the text content.
[0096] It should be noted that there are multiple ways to extract features from the target correction image to obtain multiple initial text sequences of the target correction image and the matching scores of each initial text sequence, and the specific method can be selected according to the actual situation.
[0097] In one optional implementation of this embodiment, feature extraction is performed on the target correction image to obtain multiple initial text sequences of the target correction image and matching scores for each initial text sequence, including: The visual feature extraction module obtains the visual feature sequence of the target correction image; Based on the visual feature sequence of the target correction image, the temporal feature sequence of the target correction image is obtained through the temporal feature extraction module; Based on the temporal feature sequence of the target correction image, the importance of features at different positions in the temporal feature sequence is analyzed to obtain multiple initial text sequences and the matching score of each initial text sequence.
[0098] The visual feature extraction module processes the input target correction image to obtain a sequence of visual features rich in spatial semantic information. This module includes, but is not limited to, deep convolutional neural networks (such as ResNet (Residual Network), VGG (Visual Geometry Group)) or variants thereof. This module is responsible for capturing detailed features from low-level strokes to high-level character contours.
[0099] Based on visual feature sequences, a temporal feature extraction module further learns the contextual dependencies between positions in the feature sequence to obtain deeper temporal feature sequences. The temporal feature extraction module includes, but is not limited to, Bidirectional Long Short-Term Memory Networks (Bi-LSTM), Bidirectional Gated Recurrent Units (Bi-GRU), or other bidirectional recurrent neural network structures. Bidirectional structures can simultaneously utilize past and future contextual information, significantly improving feature representation capabilities.
[0100] Decoding is performed based on temporal feature sequences using an attention mechanism. This mechanism dynamically and softly focuses on the part of the temporal feature sequence that is most relevant to the current decoding step, thereby generating multiple possible text sequences (i.e., an N-best list) and calculating the matching score (probability) for each sequence. The matching score is obtained by accumulating the probability at each step of the generation path or by using a beam search strategy.
[0101] In one optional implementation of this embodiment, the above process can be implemented through the following specific architecture: By using CNN as a visual feature extraction module, spatial visual features of the target corrected image are extracted and converted into a series of feature vectors to form a visual feature sequence.
[0102] Based on the above visual feature sequences, a bidirectional recurrent neural network module is used to perform temporal context modeling, capture the bidirectional dependencies between the preceding and following contexts in the feature sequences, and output a temporal feature sequence rich in contextual information.
[0103] Based on the temporal feature sequence, the association weights of each step in the decoding process with all temporal features are dynamically calculated through an attention mechanism (i.e., the importance of features at different positions is analyzed). Based on this, contextual information is weighted and fused to decode and generate multiple possible initial text sequences, and the matching score (probability value) of each sequence is calculated as the recognition result.
[0104] In the embodiments described in this specification, the context modeling capability of the temporal feature extraction module is utilized to fully capture the long-range dependencies between character sequences. Simultaneously, by analyzing the importance of features at different positions in the temporal feature sequence, key regions of the input image are adaptively weighted, significantly improving the robustness of recognition in complex scenes such as blurriness, distortion, and background interference. The high-quality initial text sequence generated by this hybrid model lays a solid foundation for subsequent semantic error correction and scene adaptation modules.
[0105] In another optional implementation of this embodiment, a hybrid model architecture based on the loss function of convolutional neural network (CNN), recurrent neural network (RNN), and connectionist temporal classification (CTC) can be used to generate the initial text sequence and its matching score.
[0106] It should be noted that after obtaining multiple initial text sequences and their matching scores, the server will clean and reduce the initial text sequence set according to pre-configured, flexibly adjustable filtering rules to further improve recognition efficiency and accuracy. This process aims to retain high-potential candidates with further discriminative value while eliminating low-value candidates, thereby providing high-quality, highly relevant input to the downstream target text recognition model and optimizing the allocation of computing resources.
[0107] The filtering rules can be dynamically configured according to the actual application scenario requirements. The following is an example of a combined filtering rule: First-level screening: coarse screening based on matching thresholds.
[0108] First, a screening process is performed based on a matching threshold, directly eliminating initial text sequences with excessively low matching scores. These initial text sequences are usually generated due to factors such as severe image distortion and irrelevant background interference, resulting in extremely low matching scores and virtually no chance of becoming correct results.
[0109] Specifically, the system presets a matching threshold (for example, matching threshold = 0.1). This threshold can be adjusted according to the stringency of different application scenarios (e.g., it can be set to 0.15 for rigorous medical document recognition, and 0.05 for general scenarios).
[0110] Iterate through all initial text sequences and compare their matching scores with the matching threshold; keep all sequences with matching scores greater than or equal to the matching threshold; discard all sequences with matching scores less than the matching threshold.
[0111] For example, the initial text sequence set is [("diagnosis", 0.82)("new diagnosis", 0.15), ("previous diagnosis", 0.02), ("diagnosis", 0.008), ("diagnosis", 0.002)]. After applying a threshold (0.1), [("diagnosis", 0.82), ("new diagnosis", 0.15)] is retained, and the last three items are removed.
[0112] Second-level screening: Top-N based fine screening.
[0113] Based on threshold filtering, this rule controls the upper limit on the number of candidate text sequences. Even if the threshold filtering is passed, the number of candidates may still be too large (e.g., 15 are retained). The Top-N rule ensures that the number of candidate text sequences finally fed into the target text recognition model is controlled within a reasonable upper limit, preventing resource overload in extreme cases.
[0114] Specifically, a maximum number of candidates, N, is preset (e.g., N=5). The candidate set after the previous stage of screening is sorted in descending order of their matching scores, and only the top N candidates with the highest scores are retained. If the total number of candidates is less than or equal to N, all candidates are retained.
[0115] For example, after the first-level screening, the remaining candidates are [("new diagnosis", 0.82), ("new diagnosis", 0.15)] (quantity 2 < 5), so all are retained. If the result is 8 candidates, only the 5 with the highest scores are retained.
[0116] It should be noted that there are multiple ways to modify the target candidate text sequence in at least one dimension through the target text recognition model to obtain the target modified text sequence corresponding to the target candidate text sequence and determine the confidence score of the target modified text sequence. The specific method can be selected according to the actual situation, and the embodiments in this specification do not limit this.
[0117] In one optional implementation of this embodiment, a glyph correction network is used to correct the glyphs of the target candidate text sequence, thereby obtaining the glyph-corrected text sequence and the corresponding glyph confidence. Among them, glyph correction aims to solve the "shape similarity" errors, that is, the visual misidentifications caused by blurred, occluded, or distorted writing. The network structure of glyph correction can adopt character-level CNN (Convolutional Neural Network) or Siamese Network. For each character in the candidate sequence, the corresponding image patch is cropped from its original image; each image patch is input into the trained glyph network; the network outputs a vector representing the probability that the image patch belongs to each character in the predefined set of easily confused characters.
[0118] For example: For the image patch of the character "少", the network may output: P("沙") = 0.88, P("少") = 0.10, P("砂") = 0.02; The glyph-corrected text sequence replaces each character in the original candidate sequence with the character with the highest probability predicted by the glyph network (for example, replacing "少" with "沙"). The glyph confidence can be the probability value of the correction result of each character (for example, 0.88). If multiple characters are corrected, the overall glyph confidence needs to be aggregated based on the confidences of all corrected characters to form a single metric representing the reliability of the glyph correction of the entire sequence. For example, add the confidences of all corrected characters and then divide by the total number of corrected characters.
[0119] The glyph-corrected text sequence is semantically corrected through a semantic correction network to obtain a semantically corrected text sequence.
[0120] Among them, semantic correction aims to solve the "meaning contradiction" errors, that is, the errors that may be reasonable in terms of glyphs but do not conform to language logic and context.
[0121] The network structure of the semantic correction network can adopt pre-trained language models based on Transformer (such as BERT). These models are pre-trained on a large amount of text and have powerful language understanding capabilities.
[0122] The input of the semantic correction network is the glyph-corrected text sequence output by the glyph correction network. The semantic correction network inputs the glyph-corrected text sequence into the language model and uses the Masked Language Modeling (MLM) task for inference: each character in the sequence is masked in turn, and the model is allowed to predict the most likely character at that position.
[0123] For example: Input "左氧氟星" (with a mask), the model should predict that the probability of "沙" is the highest.
[0124] If the model's predicted Top 1 character is inconsistent with the input, and its probability is much higher than the original character, semantic correction is triggered. The semantic correction network corrects the sequence of illogical words based on the language model's predictions, obtaining a semantically corrected text sequence and semantic confidence. Semantic confidence can be measured by the perplexity of the entire sequence or the average probability of the model predicting the correct character.
[0125] Training method for semantic correction networks: Good results can be obtained by directly using pre-trained models on general large-scale corpora (such as Chinese Wikipedia and news corpora).
[0126] To perform better in specific domains (such as healthcare and law), the pre-trained model can be further fine-tuned using specialized text corpora in that domain.
[0127] The scene correction module performs scene correction on the semantically corrected text sequence to obtain the target corrected text sequence.
[0128] Scenario correction aims to address "domain" errors, which are errors that conform to general semantics but not to specific domain knowledge or standards.
[0129] Specifically, a domain knowledge base is identified (such as a standard drug list, disease name database, or legal provision database). Keywords (such as drug names or diagnosis names) in the semantically corrected text sequence are queried against the knowledge base. If no exact match is found, string similarity algorithms (such as edit distance or cosine similarity) or pinyin similarity are used to find relatively similar standard terms in the knowledge base. These relatively similar standard terms are then used as the target corrected text sequence. Alternatively, predefined business rules (such as "diagnosis" should be followed by a disease name) are applied to modify the semantically corrected text sequence to obtain the target corrected text sequence. The final target corrected text sequence is the standardized text corrected by the knowledge base or rules.
[0130] Scene matching confidence: 1.0 for exact match; similarity score (e.g., 0.9) for fuzzy match; and a lower default value if no match is found and no rule is triggered.
[0131] The confidence score of the target corrected text sequence can be determined based on glyph confidence, semantic confidence, and context confidence.
[0132] In another optional implementation of this embodiment, the target candidate text sequence is corrected in at least one dimension using a target text recognition model to obtain the target corrected text sequence corresponding to the target candidate text sequence, including: Input the target candidate text sequence and glyph correction prompts into the target text recognition model. The target text recognition model corrects the glyphs of the target candidate text sequence and outputs the glyph-corrected text sequence and the corresponding glyph confidence. Input the glyph-corrected text sequence and semantic correction prompt words into the target text recognition model. Through the target text recognition model, perform semantic correction on the glyph-corrected text sequence, and output the semantic-corrected text sequence and the corresponding semantic confidence level. Input the semantic-corrected text sequence and scene correction prompt words into the target text recognition model. Through the target text recognition model, perform scene correction on the semantic-corrected text sequence, and output the target-corrected text sequence and the scene confidence level. Based on the glyph confidence level, semantic confidence level, and / or scene confidence level, determine the confidence score of the target-corrected text sequence.
[0133] It should be noted that the essence of these prompt words is a kind of instruction or task description. Their role is to guide and activate a unified target text recognition model (usually a large pre-trained language model), making it focus on performing specific types of correction tasks.
[0134] Specifically, in the glyph correction stage, the glyph correction prompt words guide the model to only focus on the visual morphological features of the text, and correct the errors caused by similar glyphs.
[0135] Exemplarily, the glyph correction prompt words can be "Please correct the errors caused by similar glyphs, stroke errors, or writing blurriness in the following text:", "The following text may contain homophonic characters that look similar. Please correct them to the correct characters:", etc.
[0136] Based on the instructions of the prompt words, the model understands that the current task is "glyph error correction". It will analyze each character in the sequence and compare it with the "visual-character" associated knowledge learned internally, so as to perform glyph correction and obtain the glyph-corrected text sequence and the glyph confidence level.
[0137] Glyph confidence level: The model usually has a generation probability when outputting the correct character. For example, when the model decides that the "少" in the target-corrected text sequence "左氧氟少星" should be "沙", the probability corresponding to this choice may be 0.88. This probability value can be used as the glyph confidence level for this correction.
[0138] In the semantic correction stage, the input is the glyph-corrected text sequence (i.e., the output of the glyph correction stage) and the semantic correction prompt words.
[0139] The semantic correction prompt words guide the model to focus on the context meaning and language logic of the text, and correct the errors that are correct in glyph but illogical when combined.
[0140] Exemplarily, the semantic correction prompt can be "Please ensure that the following text is semantically smooth, conforms to language habits, and corrects the semantic errors therein:", "The following sentence may have grammar or semantic errors. Please correct it and output the most reasonable version:", "According to the context meaning, correct the following text to make its expression clear and reasonable.", etc.
[0141] Based on the semantic correction prompt, the model switches the task mode to "semantic error correction". It will utilize its powerful language model capabilities (trained on a large-scale corpus) to determine whether the entire sequence is smooth and reasonable, thereby performing semantic correction to obtain the semantic correction text sequence and the corresponding semantic confidence level.
[0142] It should be understood that one of the core advantages of large pre-trained models is their deep language understanding ability. For example, it knows that "levofloxacin" is a highly probable reasonable combination, while "levofluorostar" is a low-probability unreasonable combination. This prompt directly utilizes this point.
[0143] Continuing with the above example, the result of the glyph correction stage, "levofloxacin", is already a reasonable drug name itself, so the model may not make any changes. However, if the input is "感冐" (a wrong character combination for "感冒"), the model will correct it to "感冒".
[0144] The model can calculate the perplexity of the entire sequence. The lower the perplexity, the more the sequence conforms to the distribution learned by the language model, that is, the more "smooth" it is and the higher the semantic confidence level.
[0145] In the scenario correction stage, the input is the semantic correction text sequence (i.e., the output of the semantic correction stage) and the scenario correction prompt.
[0146] The scenario correction prompt guides the model to play the role of an expert in a specific field and uses professional domain knowledge to standardize and verify the text.
[0147] Exemplarily, in the medical scenario, the scenario correction prompt can be "Please standardize the following medical terms to the standard names in the Chinese Pharmacopoeia or Medical Terminology"; in the legal scenario, the scenario correction prompt can be "Please ensure that the following legal provision citation format and terms comply with the provisions of the XXX Legislation"; in the financial scenario, the scenario correction prompt can be "Please convert the following financial terms into the standard expressions in line with the Accounting Standards for Business Enterprises". Based on the final prompt, the model enters the "domain adaptation" mode. It will call the knowledge it has learned from professional domain texts (such as medical literature) internally to perform the final verification and standardization of the terms.
[0148] Using the previous example, the output "levofloxacin" in the semantic correction stage is already the standard name, so it passes. However, if the input is a common name such as "cephalosporin," the model may standardize it as "cephalosporin" or specify a particular drug based on the context.
[0149] Context confidence can be measured by the probability that the model generates standard terms when outputting them. Alternatively, if the model has retrieval-enhanced generation capabilities, the degree of matching of its answers to the knowledge base can also be used as a measure of confidence.
[0150] It should be noted that the multi-dimensional text correction framework proposed in this embodiment exhibits high flexibility and scalability. The types and number of correction dimensions are not fixed but can be dynamically adjusted and customized according to the needs of actual application scenarios. In addition to the core glyph, semantic, and scene dimensions, the framework can easily integrate various new correction dimensions such as format unification, style conversion, multilingual standardization, and even logical consistency verification by designing dedicated prompts. This means that without changing the underlying model structure, the same system can adapt to the unique needs of many fields, from medical documents to financial reports, simply by configuring different task instructions, providing a solid technical foundation for addressing unforeseen text processing challenges in the future.
[0151] In this embodiment, the correction process is broken down into three independent and progressive dimensions: character shape, semantics, and context. Each stage uses dedicated prompts (such as character shape correction prompts and semantic correction prompts) to guide the model to focus on a specific problem. Through this progressive error correction, the model first solves the underlying character shape problem (such as correcting similar-looking characters), then addresses the middle-level semantic rationality (such as word collocation errors), and finally adapts to the high-level contextual situation (such as domain terminology optimization). This avoids correction conflicts caused by the mixing of multiple types of errors, improving correction accuracy and interpretability. At the same time, the generated multi-dimensional confidence score also provides users with quantifiable reliability data.
[0152] In one optional implementation of this embodiment, the confidence score of the target corrected text sequence is determined based on glyph confidence, semantic confidence, and / or scene confidence, including: Obtain the matching score of the target candidate text; Determine the fusion weights for the character shape confidence score, semantic confidence score, and / or scene confidence score, as well as the fusion weights for the matching score of the target candidate text. Based on each fusion weight, fuse the matching score, character shape confidence score, semantic confidence score, and / or scene confidence score of the target candidate text to obtain the confidence score of the target corrected text sequence.
[0153] It should be understood that the matching score of the target candidate text indicates the degree of matching between the original recognition result before correction and the image to be recognized; it represents the credibility of the original recognition result. A text with a high original matching score, even after fine-tuning the correction model, will have a more convincing high confidence level in its final result. Conversely, a text with a low original matching score indicates poor image quality or difficulty in recognition; even after correction, a more cautious approach is needed towards the final result. Therefore, introducing the matching score of the target candidate text and fusing it with the confidence scores from the glyph, semantic, and scene correction stages can provide a more comprehensive evaluation benchmark for determining the final confidence score of the target corrected text sequence.
[0154] The weights can be fixed values set in advance based on experience (e.g., if semantic correction is trusted more, then the semantic confidence is given a higher weight), or they can be adaptive dynamic weights (e.g., the proportion of glyph weights is dynamically adjusted according to the image blur).
[0155] For example, the confidence score of the target corrected text sequence = weight 1 × matching score + weight 2 × glyph confidence + weight 3 × semantic confidence + weight 4 × scene confidence.
[0156] In the embodiments described in this specification, the matching score of the target candidate text is introduced and weighted and fused with the confidence scores of glyphs, semantics, and scene corrections, effectively improving the comprehensiveness of the final confidence score. The original matching score is used as a key anchor point: a high original matching score strengthens the support for the corrected high-confidence result, while a low original matching score imposes necessary prudent constraints on the corrected result, thus significantly suppressing the tendency to over-correct low-quality original recognition results. Simultaneously, the introduction of weights gives the system high flexibility and scene adaptability, allowing for dynamic adjustment of the contribution of various indicators according to specific application needs. This ensures that the confidence assessment not only reflects the reliability of multi-level corrections but also takes into account the fundamental factor of original input quality, ultimately forming a more accurate and reliable decision-making basis.
[0157] The process involves selecting a single, relatively accurate text sequence as the final output from all refined candidate sequences, based on at least one target corrected text sequence corresponding to a candidate text sequence and the confidence score of each target corrected text sequence. There are various methods for determining the target text sequence, which can be selected according to the specific circumstances.
[0158] For example, the system simply compares the confidence scores of all target corrected text sequences and directly selects the sequence with the highest score as the final target text sequence.
[0159] For example, the system presets a confidence threshold (e.g., 0.8). If there are sequences with a confidence level higher than this threshold, the maximum confidence selection method is used; if the confidence level of all sequences is lower than this threshold, manual review or alternative processing procedures are triggered (e.g., returning the sequence with the highest matching score and marking it with a low confidence warning).
[0160] The server performs text recognition on the target correction image, determines the text recognition result, and sends the text recognition result to the client. The client receives and displays the text recognition result returned by the server.
[0161] In text recognition, clearly and intuitively conveying the reliability of recognition results to users has always been a key challenge in improving user experience. Traditional plain text return methods struggle to reflect the credibility behind the recognition results, while users often need to make further judgments based on their trust in the content. To bridge the gap between machine output and user perception, we introduce a dynamic visualization labeling mechanism based on confidence scores.
[0162] In one optional implementation of this embodiment, the text recognition result includes the target corrected text sequence and the corresponding confidence score; the text recognition result returned by the server is displayed, including: Based on the confidence score, the target labeling method corresponding to the confidence score is determined in a preset mapping relationship, wherein the mapping relationship is used to characterize the correspondence between different confidence score intervals and labeling methods; The target correction text sequence is displayed based on the target marking method.
[0163] When the server returns the identified text content (the target corrected text sequence), it also provides a confidence score representing its reliability. The client pre-configures a mapping table that defines the visual display (i.e., labeling methods) corresponding to different ranges of confidence scores. Upon receiving the results, the client first parses the confidence score and then determines the range to which the score belongs and its corresponding visual labeling rules by querying the mapping table. Ultimately, the client does not simply display plain text; instead, it renders and displays the text according to defined rules (such as changing colors, adding backgrounds, and attaching icons), thus intuitively conveying the reliability of the results to the user.
[0164] In the embodiments described in this specification, the server, while returning the identified and corrected text sequence, also appends a confidence score characterizing its accuracy. The client then dynamically determines the rendering method to be used for the current result based on a preset mapping relationship—that is, the correspondence between different confidence score intervals and specific visual marking methods (such as color differentiation, background highlighting, icon annotations, etc.). By transforming the abstract score into an intuitive visual form, the credibility of the recognition result is clearly presented. Users can quickly perceive the reliability of the text and the potential error range without interpreting the numbers, thereby significantly improving interaction efficiency and decision-making confidence.
[0165] See Figure 2 , Figure 2 A flowchart of another text recognition method provided according to an embodiment of this specification is shown. The text recognition method is applied to a client and specifically includes the following steps 202-204.
[0166] Step 202: Obtain the image to be recognized, perform blur level recognition on the image to be recognized, determine the target blur type of the image to be recognized, and upload the target blur type to the server.
[0167] Step 204: Receive and display the text recognition result returned by the server. The text recognition result is obtained by the server performing text recognition on the target correction image. The target correction image is obtained by the server processing the image to be recognized based on the image processing algorithm corresponding to the target blur type of the image to be recognized.
[0168] In this embodiment of the specification, the client is responsible for acquiring the front-end image and performing preliminary fuzzy type analysis. Through the collaborative processing of the client and the server, the problem of poor recognition accuracy caused by the inability to run complex algorithms to process the image to be recognized when relying entirely on the client for text recognition is effectively solved, or the problem of long text recognition time caused by high transmission latency when relying entirely on the server for text recognition is solved.
[0169] It should be understood that the above-described client-side text recognition method and server-side text recognition method are based on the same inventive concept and together constitute a complete recognition process. Details and implementation methods not fully described in the client-side system can be found in the corresponding sections of the server-side method described above.
[0170] The following is in conjunction with the appendix Figure 3 Taking the application of the text recognition method provided in this specification in a text recognition system consisting of a client and a server as an example, the text recognition method will be further explained. Figure 3 The diagram illustrates an interactive flowchart of a text recognition method provided in one embodiment of this specification, which specifically includes the following steps.
[0171] Step 302: Obtain the image to be recognized, perform blur degree recognition on the image to be recognized, and determine the target blur type of the image to be recognized.
[0172] Step 304: Optimize the image to be recognized based on the transmission optimization algorithm corresponding to the target blur type to obtain the initial corrected image.
[0173] Step 306: Upload the initial calibrated image and the target blur type of the image to be identified to the server.
[0174] The specific implementation of steps 302-304 can be referred to step 102 above.
[0175] Step 308: Process the initial corrected image using the image enhancement algorithm corresponding to the target blur type to obtain the target corrected image. Different blur types correspond to different image enhancement algorithms.
[0176] Step 310: Perform text recognition on the target correction image to determine the text recognition result of the target correction image. The text recognition result includes the target correction text sequence and the corresponding confidence score.
[0177] Step 312: Send the text recognition results to the client.
[0178] Step 314: Receive the text recognition results.
[0179] Step 316: Based on the confidence score, determine the target labeling method corresponding to the confidence score in the preset mapping relationship, wherein the mapping relationship is used to characterize the correspondence between different confidence score intervals and labeling methods.
[0180] Step 318: Display the target correction text sequence based on the target marking method.
[0181] The specific implementation of steps 308-318 can be referred to steps 104-106 above.
[0182] Corresponding to the above method embodiments, this specification also provides embodiments of a text recognition system. Figure 4 A schematic diagram of the structure of a text recognition system provided in one embodiment of this specification is shown. Figure 4 As shown, the text recognition system 400 includes a client 410 and a server 420; Client 410 is configured to acquire the image to be recognized, perform blur level recognition on the image to be recognized, determine the target blur type of the image to be recognized, and upload the target blur type to the server. Server 420 is configured to obtain the target blur type of the image to be recognized uploaded by the client; process the image to be recognized using the image processing algorithm corresponding to the target blur type to obtain the target corrected image, wherein different blur types correspond to different image processing algorithms; perform text recognition on the target corrected image, determine the text recognition result of the target corrected image, and return the text recognition result to the client; Client 410 is configured to receive and display the text recognition results returned by the server.
[0183] Optionally, the client 410 is further configured to: optimize the image to be recognized using a transmission optimization algorithm corresponding to the target blur type to obtain an initial corrected image; upload the initial corrected image to the server so that the server can enhance the initial corrected image using an image enhancement algorithm corresponding to the target blur type to obtain the target corrected image.
[0184] Accordingly, the image processing algorithm includes an image enhancement algorithm. The server 420 is further configured to: acquire the initial corrected image uploaded by the client; and enhance the initial corrected image using the image enhancement algorithm corresponding to the target blur type to obtain the target corrected image.
[0185] Optionally, the target fuzziness type includes first fuzziness, second fuzziness, and third fuzziness with fuzziness levels increasing sequentially.
[0186] When the target blur type is the first blur, the image enhancement algorithm corresponding to the first blur is the contrast enhancement algorithm; the server 420 is further configured to: enhance the contrast of the initial correction image through the contrast enhancement algorithm to obtain the target correction image.
[0187] When the target blur type is the second blur, the image enhancement algorithm corresponding to the second blur is the resolution enhancement algorithm; the server 420 is further configured to: enhance the resolution of the initial correction image through the resolution enhancement algorithm to obtain the target correction image.
[0188] When the target blur type is third blur, the image enhancement algorithm corresponding to the third blur is an attention-driven resolution enhancement algorithm; the server 420 is further configured to: enhance the resolution of the initial correction image through the attention-driven resolution enhancement algorithm to obtain the target correction image.
[0189] Optionally, the server 420 is further configured to: extract features from the target correction image to obtain multiple initial text sequences of the target correction image and matching scores of each initial text sequence; based on preset filtering rules and matching scores of each initial text sequence, filter at least one candidate text sequence from each initial text sequence; correct the target candidate text sequence in at least one dimension using a target text recognition model to obtain the target corrected text sequence corresponding to the target candidate text sequence, and determine the confidence score of the target corrected text sequence, wherein the target candidate text sequence is any one of the at least one candidate text sequence; determine the target text sequence based on the target corrected text sequence corresponding to the at least one candidate text sequence and the confidence scores of each target corrected text sequence, and generate the text recognition result of the target correction image based on the target text sequence and the confidence score of the target text sequence.
[0190] Optionally, the server 420 is further configured to: obtain a visual feature sequence of the target correction image through a visual feature extraction module; obtain a temporal feature sequence of the target correction image through a temporal feature extraction module based on the visual feature sequence of the target correction image; and analyze the importance of features at different positions in the temporal feature sequence based on the temporal feature sequence of the target correction image to obtain multiple initial text sequences and matching scores for each initial text sequence.
[0191] Optionally, the server 420 is further configured to: input the target candidate text sequence and glyph correction prompts into the target text recognition model, perform glyph correction on the target candidate text sequence through the target text recognition model, and output the glyph-corrected text sequence and the corresponding glyph confidence; input the glyph-corrected text sequence and semantic correction prompts into the target text recognition model, perform semantic correction on the glyph-corrected text sequence through the target text recognition model, and output the semantically corrected text sequence and the corresponding semantic confidence; input the semantically corrected text sequence and scene correction prompts into the target text recognition model, perform scene correction on the semantically corrected text sequence through the target text recognition model, and output the target corrected text sequence and scene confidence; and determine the confidence score of the target corrected text sequence based on the glyph confidence, semantic confidence, and / or scene confidence.
[0192] Optionally, the server 420 is further configured to: obtain the matching score of the target candidate text; determine the fusion weights of the glyph confidence score, semantic confidence score and / or scene confidence score, and the fusion weights of the matching score of the target candidate text; and based on the fusion weights, fuse the matching score, glyph confidence score, semantic confidence score and / or scene confidence score of the target candidate text to obtain the confidence score of the target corrected text sequence.
[0193] Optionally, the text recognition result includes the target corrected text sequence and the corresponding confidence score; the client 410 is further configured to: determine the target labeling method corresponding to the confidence score in a preset mapping relationship based on the confidence score, wherein the mapping relationship is used to characterize the correspondence between different confidence score intervals and labeling methods; and display the target corrected text sequence based on the target labeling method.
[0194] The above is an illustrative scheme of a text recognition system according to this embodiment. It should be noted that the technical solution of this text recognition system and the technical solution of the text recognition method described above belong to the same concept. For details not described in detail in the technical solution of the text recognition system, please refer to the description of the technical solution of the text recognition method described above.
[0195] Corresponding to the above method embodiments, this specification also provides embodiments of a text recognition device applied to a server. Figure 5 A schematic diagram of the structure of a text recognition device according to one embodiment of this specification is shown. Figure 5 As shown, the device includes: The acquisition module 502 is configured to acquire the target blur type of the image to be recognized uploaded by the client, wherein the target blur type is obtained by the client through blur degree recognition of the image to be recognized; The processing module 504 is configured to process the image to be recognized using an image processing algorithm corresponding to the target blur type to obtain a target corrected image, wherein different blur types correspond to different image processing algorithms; The recognition module 506 is configured to perform text recognition on the target correction image, determine the text recognition result of the target correction image, and return the text recognition result to the client so that the client can display the text recognition result.
[0196] The above is an illustrative scheme of a text recognition device according to this embodiment. It should be noted that the technical solution of this text recognition device and the technical solution of the above-described text recognition method belong to the same concept. For details not described in detail in the technical solution of the text recognition device, please refer to the description of the technical solution of the above-described text recognition method.
[0197] Corresponding to the above method embodiments, this specification also provides embodiments of a text recognition device applied to a client. Figure 6 A schematic diagram of another text recognition device provided in one embodiment of this specification is shown. Figure 6 As shown, the device includes: The determination module 602 is configured to acquire an image to be identified, perform blur degree identification on the image to be identified, determine the target blur type of the image to be identified, and upload the target blur type to the server. The display module 604 is configured to receive and display the text recognition result returned by the server, wherein the text recognition result is obtained by the server performing text recognition on the target correction image, and the target correction image is obtained by the server processing the image to be recognized based on the image processing algorithm corresponding to the target blur type of the image to be recognized.
[0198] The above is an illustrative scheme of a text recognition device according to this embodiment. It should be noted that the technical solution of this text recognition device and the technical solution of the above-described text recognition method belong to the same concept. For details not described in detail in the technical solution of the text recognition device, please refer to the description of the technical solution of the above-described text recognition method.
[0199] Figure 7 A structural block diagram of a computing device 700 according to one embodiment of this specification is shown. The components of the computing device 700 include, but are not limited to, a memory 710 and a processor 720. The processor 720 is connected to the memory 710 via a bus 730, and a database 750 is used to store data.
[0200] The computing device 700 also includes an access device 740, which enables the computing device 700 to communicate via one or more networks 760. Examples of these networks include Public Switched Telephone Network (PSTN), Local Area Network (LAN), Wide Area Network (WAN), Personal Area Network (PAN), or combinations of communication networks such as the Internet. The access device 740 may include one or more of any type of wired or wireless network interface (e.g., a network interface card (NIC)), such as an IEEE 802.11 Wireless Local Area Network (WLAN) wireless interface, a Wi-MAX (Worldwide Interoperability for Microwave Access) interface, an Ethernet interface, a Universal Serial Bus (USB) interface, a cellular network interface, a Bluetooth interface, or a Near Field Communication (NFC) interface.
[0201] In one embodiment of this specification, the above-described components of the computing device 700 and Figure 7Other components, not shown, can also be connected to each other, for example, via a bus. It should be understood that... Figure 7 The block diagram of the computing device shown is for illustrative purposes only and is not intended to limit the scope of this specification. Those skilled in the art can add or replace other components as needed.
[0202] The computing device 700 can be any type of stationary or mobile computing device, including mobile computers or mobile computing devices (e.g., tablet computers, personal digital assistants, laptop computers, notebook computers, netbooks, etc.), mobile phones (e.g., smartphones), wearable computing devices (e.g., smartwatches, smart glasses, etc.) or other types of mobile devices, or stationary computing devices such as desktop computers or personal computers (PCs). The computing device 700 can also be a mobile or stationary server.
[0203] The processor 720 is configured to execute the following computer-executable instructions, which, when executed by the processor, implement the steps of the above-described text recognition method.
[0204] The above is an illustrative scheme of a computing device according to this embodiment. It should be noted that the technical solution of this computing device and the technical solution of the above-described text recognition method belong to the same concept. For details not described in detail in the technical solution of the computing device, please refer to the description of the technical solution of the above-described text recognition method.
[0205] An embodiment of this specification also provides a computer-readable storage medium storing computer-executable instructions that, when executed by a processor, implement the steps of the above-described text recognition method.
[0206] The above is an illustrative scheme of a computer-readable storage medium according to this embodiment. It should be noted that the technical solution of this storage medium belongs to the same concept as the technical solution of the text recognition method described above. For details not described in detail in the technical solution of the storage medium, please refer to the description of the technical solution of the text recognition method described above.
[0207] An embodiment of this specification also provides a computer program, wherein when the computer program is executed in a computer, it causes the computer to perform the steps of the above-described text recognition method.
[0208] The above is an illustrative example of a computer program according to this embodiment. It should be noted that the technical solution of this computer program and the technical solution of the text recognition method described above belong to the same concept. Details not described in detail in the technical solution of the computer program can be found in the description of the technical solution of the text recognition method described above.
[0209] The foregoing has described specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than that shown in the embodiments and may still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired result. In some embodiments, multitasking and parallel processing are possible or may be advantageous.
[0210] The computer instructions include computer program code, which may be in the form of source code, object code, executable file, or certain intermediate forms. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording media, USB flash drive, portable hard drive, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content included in the computer-readable medium may be appropriately added or removed according to the requirements of patent practice. For example, in some regions, according to patent practice, computer-readable media may not include electrical carrier signals and telecommunication signals.
[0211] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that the embodiments in this specification are not limited to the described order of actions, because according to the embodiments in this specification, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in this specification are all preferred embodiments, and the actions and modules involved are not necessarily essential to the embodiments in this specification.
[0212] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0213] The preferred embodiments disclosed above are merely illustrative of this specification. The optional embodiments do not exhaustively describe all details, nor do they limit the invention to the specific implementations described. Clearly, many modifications and variations can be made based on the embodiments described herein. These embodiments are selected and specifically described in this specification to better explain the principles and practical applications of the embodiments, thereby enabling those skilled in the art to better understand and utilize this specification. This specification is limited only by the claims and their full scope and equivalents.
Claims
1. A text recognition method, characterized in that, Applied to the server side, including: Obtain the target blur type of the image to be recognized uploaded by the client, wherein the target blur type is obtained by the client through blur degree recognition of the image to be recognized; The image to be identified is processed by the image processing algorithm corresponding to the target blur type to obtain the target corrected image. Different blur types correspond to different image processing algorithms. The target correction image is subjected to text recognition, the text recognition result of the target correction image is determined, and the text recognition result is returned to the client so that the client can display the text recognition result.
2. The method according to claim 1, characterized in that, The method further includes: The initial correction image uploaded by the client is obtained, wherein the initial correction image is obtained by the client after optimizing the image to be recognized based on the transmission optimization algorithm corresponding to the target blur type; The image processing algorithm includes an image enhancement algorithm; the step of processing the image to be identified using the image processing algorithm corresponding to the target blur type to obtain a target corrected image includes: The initial corrected image is enhanced using the image enhancement algorithm corresponding to the target blur type to obtain the target corrected image. The target blur type includes a first blur, a second blur, and a third blur with progressively increasing blur levels.
3. The method according to claim 2, characterized in that, When the target blur type is the first blur, the image enhancement algorithm corresponding to the first blur is a contrast enhancement algorithm. The step of enhancing the initial corrected image using the image enhancement algorithm corresponding to the target blur type to obtain the target corrected image includes: The contrast enhancement algorithm is used to enhance the contrast of the initial corrected image to obtain the target corrected image.
4. The method according to claim 2, characterized in that, When the target blur type is the second blur, the image enhancement algorithm corresponding to the second blur is a resolution enhancement algorithm; The step of enhancing the initial corrected image using the image enhancement algorithm corresponding to the target blur type to obtain the target corrected image includes: The resolution enhancement algorithm is used to enhance the resolution of the initial corrected image to obtain the target corrected image.
5. The method according to claim 2, characterized in that, When the target blur type is the third blur, the image enhancement algorithm corresponding to the third blur is an attention-driven resolution enhancement algorithm. The step of obtaining the target corrected image based on the initial corrected image using an image enhancement algorithm corresponding to the target blur type includes: The resolution of the initial corrected image is enhanced using the attention-driven resolution enhancement algorithm to obtain the target corrected image.
6. The method according to claim 1, characterized in that, The step of performing text recognition on the target corrected image and determining the text recognition result of the target corrected image includes: Feature extraction is performed on the target correction image to obtain multiple initial text sequences of the target correction image and the matching score of each initial text sequence; Based on preset filtering rules and the matching scores of each initial text sequence, at least one candidate text sequence is selected from each initial text sequence; By using a target text recognition model, the target candidate text sequence is corrected in at least one dimension to obtain the target corrected text sequence corresponding to the target candidate text sequence, and the confidence score of the target corrected text sequence is determined, wherein the target candidate text sequence is any one of the at least one candidate text sequences; Based on the target corrected text sequence corresponding to the at least one candidate text sequence, and the confidence score of each target corrected text sequence, the target text sequence is determined, and based on the target text sequence and the confidence score of the target text sequence, the text recognition result of the target corrected image is generated.
7. The method according to claim 6, characterized in that, The step of extracting features from the target correction image to obtain multiple initial text sequences of the target correction image and the matching score of each initial text sequence includes: The visual feature sequence of the target corrected image is obtained through the visual feature extraction module; Based on the visual feature sequence of the target corrected image, the temporal feature sequence of the target corrected image is obtained through the temporal feature extraction module; Based on the temporal feature sequence of the target corrected image, the importance of features at different positions in the temporal feature sequence is analyzed to obtain the multiple initial text sequences and the matching score of each initial text sequence.
8. The method according to claim 6, characterized in that, The step of correcting the target candidate text sequence in at least one dimension using a target text recognition model to obtain the target corrected text sequence corresponding to the target candidate text sequence includes: The target candidate text sequence and the glyph correction prompt are input into the target text recognition model. The target text recognition model performs glyph correction on the target candidate text sequence and outputs the glyph correction text sequence and the corresponding glyph confidence score. The glyph-corrected text sequence and semantic correction prompts are input into the target text recognition model. The target text recognition model performs semantic correction on the glyph-corrected text sequence and outputs the semantically corrected text sequence and the corresponding semantic confidence. The semantically corrected text sequence and the scene correction prompts are input into the target text recognition model. The target text recognition model performs scene correction on the semantically corrected text sequence and outputs the target corrected text sequence and the scene confidence score. The confidence score of the target corrected text sequence is determined based on the glyph confidence, the semantic confidence, and / or the scene confidence.
9. The method according to claim 8, characterized in that, The determination of the confidence score of the target corrected text sequence based on the glyph confidence, semantic confidence, and / or scene confidence includes: Obtain the matching score of the target candidate text; Determine the fusion weights of the glyph confidence score, the semantic confidence score, and / or the scene confidence score, as well as the fusion weight of the matching score of the target candidate text. Based on each fusion weight, fuse the matching score of the target candidate text, the glyph confidence score, the semantic confidence score, and / or the scene confidence score to obtain the confidence score of the target corrected text sequence.
10. A text recognition method, characterized in that, Applied to the client side, including: The process involves acquiring an image to be identified, performing blur level identification on the image to be identified, determining the target blur type of the image to be identified, and uploading the target blur type to the server. The server receives and displays the text recognition result returned by the server, wherein the text recognition result is obtained by the server performing text recognition on the target correction image, and the target correction image is obtained by the server processing the image to be recognized based on the image processing algorithm corresponding to the target blur type of the image to be recognized.
11. The method according to claim 10, characterized in that, The method further includes: The image to be identified is optimized using the transmission optimization algorithm corresponding to the target blur type to obtain an initial corrected image; The initial corrected image is uploaded to the server, so that the server can enhance the initial corrected image using the image enhancement algorithm corresponding to the target blur type to obtain the target corrected image.
12. The method according to claim 10, characterized in that, The text recognition result includes the target corrected text sequence and the corresponding confidence score; displaying the text recognition result returned by the server includes: Based on the confidence score, the target labeling method corresponding to the confidence score is determined in a preset mapping relationship, wherein the mapping relationship is used to characterize the correspondence between different confidence score intervals and labeling methods; Based on the target marking method, the target corrected text sequence is displayed.
13. A computing device, characterized in that, include: Memory and processor; The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions, which, when executed by the processor, implement the steps of the text recognition method according to any one of claims 1-12.
14. A computer-readable storage medium, characterized in that, It stores computer-executable instructions that, when executed by a processor, implement the steps of the text recognition method according to any one of claims 1-12.
15. A computer program product, characterized in that, Includes a computer program / instruction that, when executed by a processor, implements the steps of the text recognition method according to any one of claims 1-12.