Self-adaptive OCR (optical character recognition) method, system, equipment and medium

By using a meta-learning framework and multi-source information fusion OCR technology, the text recognition problem in complex scenarios is solved, improving the recognition accuracy and adaptability of multilingual documents and meeting personalized needs.

CN120997840APending Publication Date: 2025-11-21CHINA RONGXIN CLOUD TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202511232696.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-01
Publication Date
2025-11-21

AI Technical Summary

Technical Problem

Existing OCR technology has poor adaptability in complex scenarios, struggles to handle diverse layouts, has low accuracy in multilingual recognition, lacks adaptability, and cannot meet personalized needs.

Method used

A meta-learning framework is used to train the recognition model. By integrating multi-source information through layout analysis, semantic role labeling, and context-aware segmentation, recognition results are generated. The model performance is optimized by weighted fusion of features through gated recurrent units and by using the Monte Carlo algorithm and online incremental learning.

Benefits of technology

It effectively handles multi-column mixed-format documents, eliminates stamp coverage errors, improves the recognition accuracy of multilingual documents, reduces cursive errors, and achieves stable recognition performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120997840A_ABST
    Figure CN120997840A_ABST
Patent Text Reader

Abstract

The invention discloses a self-adaptive OCR (Optical Character Recognition) method. The method comprises the following steps: acquiring an image; the method comprises the following steps: training based on a meta-learning framework to obtain an identification model, inputting an image into the identification model for identification, dynamically analyzing a text in the image to obtain multi-source information of the image, and fusing the multi-source information to generate an identification result, the dynamic analysis comprising layout analysis, semantic role labeling and context sensing segmentation; according to the method, the text positioning problem in the multi-column mixed arrangement document can be effectively solved, the coordinate offset error caused by seal coverage is eliminated, and the character segmentation effect in the low-quality image is improved. For a multilingual document containing technical terms, the recognition accuracy of uncommon vocabularies is improved through conjoint analysis of semantic roles and spatial positions. In a continuous handwritten recognition scene, a context association mechanism can reduce recognition errors caused by continuous handwritten characters.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image recognition, and more particularly to an adaptive OCR recognition method, system, device, and medium. Background Technology

[0002] Optical Character Recognition (OCR) is a technology that converts text in images into editable and searchable text. While traditional OCR technology has been widely applied in document digitization, invoice processing, license plate recognition, and natural scene text recognition, it still faces several technical bottlenecks. First, traditional OCR technology has poor adaptability to complex scenes, struggling to cope with challenges such as varying lighting conditions, shooting angles, and background interference. Second, existing methods have weak generalization capabilities for diverse layouts, failing to effectively handle complex document formats such as tables and mixed text / image layouts. Furthermore, the recognition accuracy for multiple languages ​​and special fonts needs improvement, particularly for unconventional fonts like handwriting and artistic fonts. Regarding real-time performance and accuracy, traditional methods often struggle to balance these aspects, either sacrificing recognition speed for accuracy or lowering accuracy requirements to meet real-time demands. More importantly, existing OCR systems lack adaptability, failing to continuously optimize model performance based on user feedback, making it difficult to meet the personalized needs of different users in practical deployments. These technical shortcomings severely restrict the performance of OCR technology in real-world applications and the user experience. Summary of the Invention

[0003] To overcome the shortcomings of existing technologies, such as the lack of adaptive capabilities in OCR systems, which prevents continuous optimization of model performance based on user feedback and makes it difficult to meet the personalized needs of different users in actual deployment.

[0004] First aspect This invention provides an adaptive OCR recognition method, comprising the following steps: Image acquisition; The recognition model is trained based on the meta-learning framework. The image is input into the recognition model for recognition. The text in the image is dynamically parsed to obtain multi-source information of the image. The multi-source information is fused to generate the recognition result. The dynamic parsing includes layout analysis, semantic role labeling, and context-aware segmentation.

[0005] Optionally, layout analysis includes detecting layout elements in the image and establishing spatial relationships between elements; semantic role labeling includes syntactic analysis to identify core semantic roles and correcting character positioning errors by combining the position of layout elements; and context-aware segmentation includes predicting the character segmentation boundaries of the current page by combining the previously identified text content.

[0006] Optionally, the multi-source information includes text visual features obtained based on the spatial relationship of elements, text semantic features obtained based on the correction of character positioning error, and text context features obtained based on the prediction of the character segmentation boundary of the current page.

[0007] Optionally, visual features, semantic features, and contextual features are weighted and fused through a gated recurrent unit to generate the final recognition result.

[0008] Optionally, the Monte Carlo algorithm is used to perform multiple inferences on the recognition model, the probability distribution of the results is statistically analyzed, a confidence score is output, and the recognition result is output based on the confidence score.

[0009] Optionally, a training dataset is collected, and the training dataset is divided into a support set and a query set based on a meta-learning framework. The support set and query set are input into the base model to generate meta-parameters. Small sample data is collected, and the small sample data is input into the trained base model to output an evaluation report. Hyperparameter tuning suggestions are generated based on the evaluation report.

[0010] Optionally, the recognition model training process also includes online incremental learning, which includes obtaining feedback information from mobile phone users, generating updated parameters based on the user feedback information, adjusting the base model based on the updated parameters, and generating the final recognition model.

[0011] Second aspect An adaptive OCR recognition method system includes: The image acquisition module is used to acquire images captured by the terminal. The output module trains a recognition model based on a meta-learning framework, inputs the image into the recognition model for recognition, dynamically parses the text in the image to obtain multi-source information of the image, and fuses the multi-source information to generate the recognition result. The dynamic parsing includes layout analysis, semantic role labeling, and context-aware segmentation.

[0012] Third aspect The present invention provides a computer device, wherein the memory stores a computer program, characterized in that the processor executes the computer program to implement the steps of the method described in the first aspect.

[0013] Fourth aspect The present invention provides a computer-readable storage medium having a computer program stored thereon, characterized in that the computer program, when executed by a processor, implements the steps of the method described in the first aspect.

[0014] The beneficial effects of this invention are: it effectively handles text positioning problems in multi-column mixed-format documents, eliminates coordinate offset errors caused by stamp coverage, and improves character segmentation results in low-quality images. For multilingual documents containing technical terms, it improves the recognition accuracy of obscure words through joint analysis of semantic roles and spatial locations. In continuous handwriting recognition scenarios, the context association mechanism can reduce recognition errors caused by cursive writing. Attached Figure Description

[0015] The present invention will be further described below with reference to the accompanying drawings and embodiments.

[0016] Figure 1 These are flowcharts from some embodiments; Figure 2 These are system block diagrams from some embodiments. Detailed Implementation

[0017] The following will clearly and completely describe the concept, specific structure, and technical effects of the present invention in conjunction with embodiments and accompanying drawings, so as to fully understand the purpose, features, and effects of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, not all of them. Other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are all within the scope of protection of the present invention. Furthermore, all connections / linkages involved in the patent do not simply refer to direct contact between components, but rather to the ability to form a better connection structure by adding or reducing connecting accessories according to specific implementation conditions. The various technical features in this invention can be combined interactively without contradicting each other.

[0018] In existing technologies, optical character recognition (OCR) technology is widely used in document digitization, invoice processing, and license plate recognition. However, traditional methods are prone to text positioning errors when handling complex document layouts, such as medical documents with nested tables and multilingual text. When dealing with customs declarations containing a mix of handwritten and printed text, fixed segmentation strategies struggle to accurately distinguish character boundaries. Furthermore, traditional semantic analysis methods often suffer from recognition errors in multilingual contract documents due to a lack of contextual understanding regarding technical terms.

[0019] To address these issues, researchers found that static feature extraction methods are ill-suited to diverse layouts, and fixed segmentation thresholds are prone to character overlap under complex background interference. Analysis revealed a correlation between the layout features of text elements and their semantic roles, with preceding recognition results providing a reference for subsequent segmentation. Based on this, a dynamic parsing mechanism is proposed to collaboratively analyze visual features and semantic information, iteratively optimizing the recognition process using contextual information.

[0020] This invention provides an adaptive OCR recognition method, comprising the following steps: S1. Acquire images captured by the terminal; S2. A recognition model is trained based on a meta-learning framework. The image is input into the recognition model for recognition. The text in the image is dynamically parsed to obtain multi-source information of the image. The multi-source information is fused to generate the recognition result. The dynamic parsing includes layout analysis, semantic role labeling, and context-aware segmentation.

[0021] Meta-learning refers to a machine learning paradigm that rapidly adapts to new scenarios through small-sample learning. Specifically, it can be implemented using Model-Agnostic Meta-Learning (MAML) algorithms, enabling the model to quickly adjust parameters with limited training data. Layout analysis involves detecting the spatial distribution of elements such as titles, paragraphs, tables, and icons in an image. This can be achieved using Graph Neural Networks (GNNs) to model the spatial relationships between elements, solving text localization problems in complex layouts and improving the parsing accuracy of complex layouts. Semantic role annotation identifies core semantic roles in text (such as "subject," "object," "time," and "location") and their associated arguments. This can be achieved by combining dependency parsing with position offset correction algorithms to correct the impact of character localization errors on semantic understanding. (e.g., correcting text box coordinate offsets caused by tilting) Context-aware segmentation refers to using the identified text content to predict the boundaries of subsequent characters. It uses a Transformer-based segmentation model (such as SegFormer, a lightweight semantic segmentation network based on the Transformer architecture) and combines the previously identified text content (such as "Page 1 of 5") to predict the character segmentation boundaries of the current page, thus solving the problem of false detection of text and non-text regions in mixed text and image scenarios.

[0022] Specifically, when processing financial statements containing mixed Chinese and English text, the layout analysis module first identifies the spatial relationship between the table borders and the numerical areas, establishing a row and column coordinate mapping. The semantic role labeling module, when identifying the "amount" field, corrects coordinate offsets caused by stamp coverage by incorporating cell position information. The context-aware segmentation module predicts the ending position of subsequent numerical strings based on the previously identified currency symbol "$". The multi-source information fusion stage performs joint reasoning using table structural features, corrected coordinate data, and context prediction results to accurately reconstruct numerical information obscured by table lines.

[0023] Compared to existing technologies, traditional methods use fixed template matching to process table documents, which cannot accurately locate text areas when encountering merged cells. This solution dynamically establishes spatial relationships between elements, enabling adaptive handling of irregular table structures. Existing segmentation algorithms rely on fixed thresholds to segment characters, which can easily lead to breaks or adhesion in low-contrast scenes. This solution utilizes contextual information to dynamically adjust segmentation boundaries, significantly improving character integrity against complex backgrounds.

[0024] Through the above technical solutions, this application can effectively handle the text positioning problem in multi-column mixed documents, eliminate coordinate offset errors caused by stamp coverage, and improve character segmentation results in low-quality images. For multilingual documents containing technical terms, the joint analysis of semantic roles and spatial locations improves the recognition accuracy of rare words. In continuous handwriting recognition scenarios, the context association mechanism can reduce recognition errors caused by cursive writing.

[0025] The image comes from the front-end network device. Preprocessing of the image includes the following steps: Adaptive denoising: A hybrid model based on nonlocal mean (NLM) and deep learning denoising (such as DnCNN) dynamically selects the denoising intensity according to the image noise variance (calculated through statistical pixel gradient distribution); Dynamic enhancement: GANs (such as CycleGAN) are used to perform style transfer on low-light and blurry images to generate enhanced samples for real-time inference; Binarization optimization: Adaptive thresholding with attention mechanism (such as Adaptive Thresholding with Attention) is introduced to replace the traditional global / local thresholding method.

[0026] Multi-scale feature extraction: An improved YOLOv8 is used as the detection backbone network, combined with the cross-attention mechanism of FPN (Feature Pyramid Network) and Transformer to achieve multi-scale feature fusion of text of different sizes (from 5pt small font to 72pt large title).

[0027] Lightweight inference is performed on the preprocessed image. The lightweight inference includes the following steps: Cross-modal alignment: The detected text regions (ROIs) are aligned with visual features (CNN local features) and semantic features (word embeddings of the pre-trained language model BERT). Contrastive learning is used to minimize the cosine distance between visual and semantic features, thereby enhancing the "what you see is what you mean" association ability. The CNN local feature extraction includes the following steps: MobileNetV3 extracts local texture features (128 dimensions), ViT-Tiny extracts global context features (256 dimensions), and dynamically weights and generates visual features (384 dimensions).

[0028] In some embodiments, layout analysis includes detecting layout elements in an image and establishing spatial relationships between elements; semantic role labeling includes syntactic analysis to identify core semantic roles and correcting character positioning errors by combining the positions of layout elements; and context-aware segmentation includes predicting character segmentation boundaries of the current page by combining the previously identified text content.

[0029] Among these, layout elements refer to visual units with specific functions in an image, which can be specifically detected using object detection algorithms to detect titles, paragraphs, table areas, and images. Spatial relationships refer to the relative positions and hierarchical associations between elements (such as the hierarchical relationship of "paragraph → table → title"), which can be specifically modeled using graph neural networks (GNNs) to model the adjacency and containment relationships between elements, providing spatial constraints for character localization. Core semantic roles refer to the lexical components in a sentence that act as subject, predicate, and object (such as "subject," "object," "time," and "place"), which can be specifically identified using dependency parsing to identify the main structure of the sentence and then weighted and corrected for character coordinates by combining the positional information of layout elements. Character segmentation boundaries refer to the cutting positions of characters within a text line.

[0030] Specifically, in the layout analysis stage, a graph of layout element relationships is constructed using graph neural networks (GNNs) to provide prior knowledge of document structure for subsequent processing. In the semantic role labeling stage, semantic role labeling (SRL) and bidirectional encoder representations from transformers (BERT) are used to identify roles and output role sequences. These sequences are then combined with the spatial coordinates of layout elements to correct character-level positioning errors in the initial character positions (e.g., correcting text box coordinate offsets caused by tilting). In the context-aware segmentation stage, a transformer-based segmentation model (such as SegFormer) is used, combined with previously identified text content (e.g., "Page 1 of 5"), to predict the character segmentation boundaries of the current page, addressing the problem of false detections of text and non-text regions in mixed text and image layout scenarios.

[0031] Compared to existing technologies, traditional OCR relies solely on local image features for character localization and segmentation. This solution, however, constructs a multi-dimensional analysis framework by building a layout spatial topology, semantic role association, and contextual sequence model. Existing technologies are prone to coordinate shifts in complex layout documents, while this solution utilizes the spatial constraints of layout elements to correct localization errors. Furthermore, existing technologies are prone to sentence segmentation errors when segmenting long texts, while this solution optimizes segmentation boundaries through contextual semantic coherence.

[0032] Through the above technical solutions, this application can effectively solve the problem of character positioning deviation in complex layout documents, such as accurately distinguishing the title and body text areas in mixed text and image layout scenarios; at the same time, it can improve the continuity of long text segmentation, such as avoiding cross-column character adhesion when recognizing multi-column text. For text content with strong contextual relevance, such as consecutive numbered or tabular data, reasonable character cutting positions can be predicted based on the preceding semantics.

[0033] In some embodiments, the multi-source information includes text visual features obtained based on element spatial relationships, text semantic features obtained based on corrected character positioning error thickness, and text context features obtained based on predicted character segmentation boundaries of the current page.

[0034] Specifically, visual features address the shortcomings of traditional methods in handling irregular layouts by constructing a graph of layout element relationships and extracting spatial features such as table cell alignment and paragraph indentation patterns. Semantic features utilize syntactic analysis to identify subject-verb-object structures and perform secondary calibration based on the actual position of characters within the layout; for example, misplaced title characters are remapped to the correct area based on their semantic importance. Contextual features dynamically adjust the segmentation threshold for the current page by recording the semantic coherence of the identified text; for example, when identifying continuous dialogue, the starting point of subsequent text is predicted based on the position of the preceding colon.

[0035] Furthermore, the visual features are combined with the local features extracted from the CNN in the preprocessing, and the semantic features are combined with the semantic features extracted from the word embeddings of the pre-trained language model BERT in the preprocessing.

[0036] In some embodiments, visual features, semantic features, and contextual features are weighted and fused through a gated recurrent unit to generate the final recognition result.

[0037] Specifically, the gated recurrent unit receives three types of feature vectors sorted by spatial location as temporal input, and calculates the activation values ​​of the update gate and reset gate at each time step. The update gate determines how much historical feature information is retained, and the reset gate controls how much irrelevant feature component is forgotten. Through gating operations, the spatial distribution characteristics of visual features, the logical correlation characteristics of semantic features, and the sequential continuity of context features are nonlinearly combined to generate a fusion vector containing multi-dimensional information. This fusion process preserves the independent representational ability of each feature while automatically learning the contribution weights of various features in different scenarios through gating parameters. For example, it enhances the weight of visual features in table recognition scenarios and increases the weight of context features in natural paragraph recognition.

[0038] Compared to existing technologies, traditional methods typically employ fixed-weight linear superposition or simple feature concatenation, which struggle to handle nonlinear correlations between multi-source features and scene differences. This solution utilizes a gating mechanism to achieve dynamic feature selection, automatically adjusting the fusion ratio of each feature based on the specific text content, effectively addressing the issues of feature redundancy or information loss.

[0039] Through the above technical solution, this application achieves deep coupling of multi-source heterogeneous features, significantly improving the character positioning accuracy and semantic recognition accuracy of complex layout documents, especially in scenarios with character overlap, layout distortion or lighting interference, it can maintain stable recognition performance.

[0040] In some embodiments, the Monte Carlo algorithm is used to perform multiple inferences on the recognition model, the probability distribution of the results is statistically analyzed, a confidence score is output, and the recognition result is output based on the confidence score.

[0041] The Monte Carlo algorithm simulates the uncertainty of the recognition model under different scenarios through random sampling. This can be achieved by randomly initializing model parameters or input perturbations, covering fluctuations in recognition results caused by interference factors such as image noise and layout changes. Multiple inferences refer to the repeated recognition process on the same image, which can be implemented using a parallel computing framework to generate multiple candidate recognition results to cover possible output distributions. The probability distribution refers to statistically analyzing the frequency of each character or text segment in multiple inferences, which can be achieved using histogram statistics or kernel density estimation methods, used to quantify the confidence level of different recognition results. The confidence score is a reliability index calculated based on the probability distribution for a specific recognition result, which can be achieved using maximum a posteriori probability or entropy calculation methods, used to filter recognition results with a high probability density.

[0042] Specifically, after the image is input into the recognition model, the Monte Carlo algorithm is used to randomly perturb the model parameters or input data, generating multiple inference paths. Each inference path independently performs the text recognition process, outputting candidate character sequences and position information. After all candidate results are aggregated, the frequency of each character appearing in different positions is statistically analyzed to form a character-level probability distribution map. Based on this map, the confidence score of each candidate result is calculated. Results with a confidence score of 95% or higher are directly output, while results below the threshold trigger manual review.

[0043] In some embodiments, a training dataset is collected, and the training dataset is divided into a support set and a query set based on a meta-learning framework. The support set and query set are input into the base model to generate meta-parameters. Small sample data is collected, and the small sample data is input into the trained base model to output an evaluation report. Hyperparameter tuning suggestions are generated based on the evaluation report.

[0044] The meta-learning framework refers to a machine learning method that enables models to quickly adapt to new tasks through a multi-task learning paradigm. Specifically, it can be implemented using model-independent meta-learning algorithms, enhancing the model's generalization ability by constructing a parameter initialization mechanism under task distribution. The support set and query set refer to the data subsets used in the meta-learning framework to simulate training tasks. Specifically, the dataset can be divided using random sampling methods. The support set is used to quickly adapt to new tasks, and the query set is used to verify the model's generalization performance on the task. Meta-parameters refer to the cross-task shared parameters obtained by the model during the meta-learning phase. Specifically, the basic model parameters can be optimized using gradient descent algorithms, enabling the model to quickly adapt to different scenario formats. The evaluation report refers to the quantitative analysis results of the model's performance on small sample data. Specifically, it can be generated using accuracy and recall metrics combined with a confusion matrix to identify feature extraction biases in new scenarios. Hyperparameter tuning suggestions refer to optimization strategies for model structural parameters. Specifically, Bayesian optimization algorithms can be used to generate adjustment schemes for parameters such as learning rate and regularization coefficients, achieving dynamic adaptation of model parameters.

[0045] Specifically, after the training dataset is divided into a support set and a query set, the support set is used to train the base model to learn common features of different layout scenarios, while the query set is used to verify the model's generalization ability on unseen tasks. This process is the meta-training phase. In the meta-training phase, the model obtains initial parameters adapted to new scenarios through cross-task training. When small sample data is introduced, the trained base model performs inference on the new data, generating an evaluation report containing feature extraction errors and classification biases. This process is the meta-testing phase. This report identifies weaknesses in layout adaptability and contextual understanding by analyzing the model's performance on sub-tasks such as character segmentation and semantic annotation. Based on the generated hyperparameter tuning suggestions, the model's learning rate decay strategy and regularization strength can be optimized in a targeted manner, enabling the model to maintain stable feature extraction capabilities under small sample conditions. Through multiple iterations of the "meta-training phase - meta-testing phase," the model learns the ability to "quickly learn new tasks." For example, for newly emerging artistic fonts, only a small number of labeled samples (e.g., 10 images) are needed to complete model fine-tuning.

[0046] In some embodiments, the recognition model training process further includes online incremental learning, which includes obtaining mobile phone user feedback information, generating updated parameters based on the user feedback information, adjusting the base model based on the updated parameters, and generating the final recognition model.

[0047] User feedback information refers to the correction or annotation data of the recognition results by the user. Specifically, it can be achieved by capturing the text content manually corrected by the user through the interactive interface, or by recording the user's annotation behavior on the incorrect recognition results through logs, in order to capture error samples in actual application scenarios.

[0048] Specifically, when a user encounters a recognition error during use, they submit the correct text annotation through the interactive interface. The system automatically constructs a triplet data set by combining the original image, the incorrect recognition result, and the user's annotation. This triplet data set is input into the parameter generation module, which calculates the difference between the model's predicted output and the user's annotation to generate an updated parameter vector reflecting the current model's shortcomings. A lightweight continuous learning module (such as EWC, elastic weight consolidation) is deployed. After loading the updated parameters, the lightweight continuous learning module uses an elastic weight consolidation algorithm to partially cover the original parameters, preserving general recognition capabilities while enhancing adaptability to specific scenarios. This forms a closed-loop optimization process from user feedback to model updates, enabling the recognition model to continuously evolve based on the actual usage environment.

[0049] In some embodiments, the recognition model training process also includes few-shot learning, which combines a prototypical network and prompt learning to generate a "class prototype" from a small number of samples of a new font / language. The similarity between the query sample and the prototype is then calculated to achieve rapid classification.

[0050] This invention provides an adaptive OCR recognition method system, comprising: The image acquisition module is used to acquire images captured by the terminal. The output module trains a recognition model based on a meta-learning framework, inputs the image into the recognition model for recognition, dynamically parses the text in the image to obtain multi-source information of the image, and fuses the multi-source information to generate the recognition result. The dynamic parsing includes layout analysis, semantic role labeling, and context-aware segmentation.

[0051] Furthermore, this invention provides an adaptive OCR recognition method system comprising an edge computing terminal, an intelligent agent core, and a communication module. The edge computing terminal is deployed on a front-end device (such as a scanner, mobile phone, or camera) and is responsible for image acquisition, preprocessing, and lightweight inference. The edge computing terminal includes an image acquisition module, a preprocessing module, and a lightweight inference module. The intelligent agent core is deployed on a cloud or edge server and is responsible for model training, knowledge updating, policy generation, or post-processing optimization (such as adaptive parameter adjustment). The intelligent agent core includes a model training module, a knowledge updating module, and a result output module (used for policy generation or post-processing optimization). The intelligent agent core is connected to the terminal via a communication module that supports 5G / Ethernet / Wi-Fi to enable data interaction between the terminal and the core (such as image uploading and model parameter downloading). The result output module includes a language module correction, which specifically includes deploying a lightweight Transformer language model (such as DistilBERT) to perform contextual correction on the recognition results. The model predicts occluded or misrecognized characters through a masked language model (MLM) task and combines layout information (such as "numerical text should be continuously increasing") to constrain the correction logic.

[0052] The present invention discloses a computer device, wherein the memory stores a computer program, characterized in that the processor executes the computer program to implement the steps of an adaptive OCR recognition method.

[0053] The present invention provides a computer-readable storage medium having a computer program stored thereon, characterized in that the computer program, when executed by a processor, implements the steps of an adaptive OCR recognition method.

[0054] Practical application scenario 1: Document scanning in complex scenarios.

[0055] Scenario description: Scan an old contract (containing handwritten signatures, multiple clauses, and tables) with uneven lighting and blurred areas.

[0056] Workflow: 1. Images are acquired at the edge, and image quality is optimized through an adaptive denoising and dynamic enhancement module; 2. The multi-scale feature extraction module detected text regions (including handwritten signatures and printed terms). 3. The adaptive learning module calls upon prototype features similar to handwritten signatures in historical contracts to quickly match and correct the signature area; 4. The dynamic layout parsing module uses GNN to model the layout relationship of "clause → table → signature" to accurately locate the table rows and columns; 5. The post-processing module uses a legal dictionary to correct professional terms in the clauses (such as "Party A" and "Party B") and outputs high-precision recognition results.

[0057] Practical application scenario 2: Text recognition in natural scenes (such as street-photographed billboards).

[0058] Scene description: Take a picture of a city tourism billboard at an angle (containing mixed text in Chinese, English and Japanese, with some areas obscured by trees).

[0059] Workflow: 1. The edge preprocessing module uses an attention mechanism to denoise and enhance the texture of occluded areas; 2. The multimodal perception module integrates visual features (tilt angle) and semantic features (keywords such as "tourist attraction" and "opening hours") to locate potential areas of occluded text; 3. The adaptive learning module calls upon the features of the cross-language pre-trained model (mBERT) to complete the joint recognition of Chinese, English, and Japanese; 4. The dynamic layout parsing module analyzes the semantics of the text using SRL (e.g., "Opening hours: 9:00-18:00" is a time-related semantic), and corrects character order errors caused by slant. 5. The post-processing module uses a multilingual dictionary to correct proper nouns (such as "Asakusa Temple" and "Senso-ji"), and outputs accurate translations and structured layout results.

[0060] Results verification: The character recognition accuracy of trilingual mixed text reached 92% (compared to 78% for traditional OCR), and the semantic error rate decreased from 15% to 4%.

[0061] Performance verification: Compared with traditional OCR, this device improves the accuracy of handwritten signature recognition from 65% to 89%, and reduces the misalignment rate of multi-column characters from 12% to 3%.

[0062] The above is a detailed description of the preferred embodiments of the present invention. However, the present invention is not limited to the embodiments described. Those skilled in the art can make various equivalent modifications or substitutions without departing from the spirit of the present invention. All such equivalent modifications or substitutions are included within the scope defined by the claims of this application.

Claims

1. An adaptive OCR recognition method, characterized in that, Includes the following steps: Image acquisition; The recognition model is trained based on the meta-learning framework. The image is input into the recognition model for recognition. The text in the image is dynamically parsed to obtain multi-source information of the image. The multi-source information is fused to generate the recognition result. The dynamic parsing includes layout analysis, semantic role labeling, and context-aware segmentation.

2. The adaptive OCR recognition method according to claim 1, characterized in that, Layout analysis includes detecting layout elements in the image and establishing spatial relationships between elements. Semantic role labeling includes syntactic analysis to identify core semantic roles and correcting character positioning errors by combining the position of layout elements. Context-aware segmentation includes predicting the character segmentation boundaries of the current page by combining the identified text content from the preceding context.

3. The adaptive OCR recognition method according to claim 1, characterized in that, The multi-source information includes text visual features obtained based on the spatial relationship of elements, text semantic features obtained based on the correction of character positioning error, and text context features obtained based on the prediction of the character segmentation boundary of the current page.

4. The adaptive OCR recognition method according to claim 3, characterized in that, The final recognition result is generated by weighted fusion of visual features, semantic features, and contextual features through gated recurrent units.

5. The adaptive OCR recognition method according to claim 1, characterized in that, The Monte Carlo algorithm is used to perform multiple inferences on the recognition model, the probability distribution of the results is statistically analyzed, the confidence score is output, and the recognition result is output based on the confidence score.

6. The adaptive OCR recognition method according to claim 1, characterized in that, Collect training datasets, divide the training datasets into support sets and query sets based on the meta-learning framework, input the support sets and query sets into the base model to generate meta-parameters, collect small sample data, input the small sample data into the trained base model to output an evaluation report, and generate hyperparameter tuning suggestions based on the evaluation report.

7. The adaptive OCR recognition method according to claim 6, characterized in that, The recognition model training process also includes online incremental learning, which involves obtaining feedback information from mobile phone users, generating updated parameters based on the user feedback information, adjusting the base model based on the updated parameters, and generating the final recognition model.

8. An adaptive OCR recognition method system, characterized in that, include: The image acquisition module is used to acquire images captured by the terminal. The output module trains a recognition model based on a meta-learning framework, inputs the image into the recognition model for recognition, dynamically parses the text in the image to obtain multi-source information of the image, and fuses the multi-source information to generate the recognition result. The dynamic parsing includes layout analysis, semantic role labeling, and context-aware segmentation.

9. A computer device, characterized in that, The memory stores a computer program, characterized in that the processor executes the computer program to implement the steps of the method according to any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Picture book image recognition method and system combined with character information

    CN119068500A

  • Patent image few-sample classification method based on multi-modal representation fusion

    CN120375133A

  • LLM-driven complex report OCR error self-correction method and system

    CN120412000A

  • OCR-based document automatic identification intelligent management system

    CN120564202A