Intelligent labeling method and system fusing OCR text optimization and GB standard normal form

By employing a multi-round iterative alignment and constraint rule fusion method, physical errors in GB standard documents are corrected using the GB standard knowledge ontology model. This solves the problem of OCR parsing errors being propagated to higher-level processes, thereby improving the accuracy and reliability of semantic annotation.

CN121921790APending Publication Date: 2026-04-24ZHEJIANG INSTITUTE OF QUALITY SCIENCES
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
ZHEJIANG INSTITUTE OF QUALITY SCIENCES
Filing Date
2025-11-26
Publication Date
2026-04-24

AI Technical Summary

Technical Problem

When processing GB standard documents, existing technologies are susceptible to OCR parsing issues due to variations in document clarity and layout. This can cause low-level perceptual errors to propagate to higher-level cognitive processes, affecting the reliability of semantic annotation results. Furthermore, there is a lack of cross-process error correction and knowledge feedback mechanisms.

Method used

By integrating OCR text optimization with the GB standard paradigm, an intelligent annotation method is used. The GB standard knowledge ontology model is used for multi-round iterative alignment and constraint rule fusion to identify and correct structural errors in the text content. The optimized text sequence is then input into a semantic analysis model for entity and relation recognition.

Benefits of technology

It effectively corrects physical errors in OCR parsing and layout analysis, prevents errors from propagating downstream, and improves the accuracy and reliability of intelligent annotation of GB standard documents, especially when processing GB standard documents with complex physical features.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121921790A_ABST
    Figure CN121921790A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of natural language processing, in particular to an intelligent labeling method fusing OCR text optimization and GB standard normal form, which comprises the following steps: obtaining text content and layout information through OCR analysis; performing multi-round iterative alignment on the layout information and a pre-constructed GB standard knowledge ontology model, identifying and correcting structural errors in the text content through a comparison and feedback mechanism, and generating an optimized text sequence; and performing entity and relationship recognition by fusing a structured constraint rule in the GB standard knowledge ontology model with an internal decision logic of the semantic analysis model to generate semantic annotation, and deeply fusing the GB standard knowledge ontology model into OCR analysis, structural error repair and semantic annotation processes, so that the semantic annotation efficiency is improved, and the semantic annotation efficiency is improved. And more accurate conversion from an unstructured GB standard document to a structured semantic annotation result is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of natural language processing technology, and in particular to an intelligent annotation method and system that integrates OCR text optimization and GB standard paradigm. Background Technology

[0002] GB documents are normative guidance documents with a rigorous content structure and strict writing paradigms. Currently, these standards are mostly published in unstructured PDF format, which poses a great challenge to machine direct understanding and processing. As domain documents with strict structural paradigms and semantic rules, their text content and layout information are strongly correlated. However, in actual processing, OCR parsing is easily affected by physical factors such as document clarity and layout variations, resulting in errors. Furthermore, if layout analysis and semantic annotation lack a global understanding of the GB standard paradigm, low-level perceptual errors will be transmitted to high-level cognitive processes, ultimately affecting the reliability of semantic annotation results.

[0003] Existing technologies treat OCR recognition, layout analysis, and text annotation as serial and relatively independent subtasks in a decoupled mode. In this decoupled mode, minor errors in upstream OCR and layout analysis will be amplified downstream because downstream tasks lack an understanding of the overall document paradigm to correct these errors. Furthermore, this decoupled mode lacks cross-stage error correction and knowledge feedback mechanisms between modules, making it difficult to cope with processing deviations caused by uncertainties in physical characteristics (such as blurred characters and non-standard layout) in GB standard documents. Summary of the Invention

[0004] The main objective of this invention is to provide an intelligent annotation method and system that integrates OCR text optimization and GB standard paradigm, aiming to solve the technical problems mentioned in the background.

[0005] This invention proposes an intelligent annotation method that integrates OCR text optimization and the GB standard paradigm, including: Obtain text content and layout information through OCR parsing; The layout information is iteratively aligned with a pre-built GB standard knowledge ontology model in multiple rounds. Structural errors in the text content are identified and corrected through comparison and feedback mechanisms to generate an optimized text sequence. The GB standard knowledge ontology model includes the structured constraint rules of GB standard documents, document structure paradigms, and type attributes of each structural node. The optimized text sequence is input into the semantic analysis model. By integrating the structured constraint rules in the GB standard knowledge ontology model with the internal decision logic of the semantic analysis model, entity and relation recognition is performed to generate semantic annotations.

[0006] Preferably, the step of performing multi-round iterative alignment of the layout information with a pre-constructed GB standard knowledge ontology model, identifying and correcting structural errors in the text content through comparison and feedback mechanisms, and generating an optimized text sequence includes: The document structure paradigm is obtained according to the GB standard knowledge ontology model, the layout information is matched with the document structure paradigm in the GB standard knowledge ontology model, and the document macro structure prediction data is generated based on the matching results. Based on the document macrostructure prediction data, structural conflict areas in the text content that conflict with the document structure paradigm are identified; Contextual semantic clues related to the structural conflict region are obtained from the GB standard knowledge ontology model, and the contextual semantic clues are used to perform targeted re-identification and semantic disambiguation of the structural conflict region to obtain the repair region. Calculate the overall confidence score of the repaired area, and verify whether the content of the repaired area passes the test based on the overall confidence score; If it fails, the reason for failure is obtained, and based on the reason for failure, the process returns to the step of obtaining contextual semantic clues related to the structural conflict area from the GB standard knowledge ontology model, and the process is repeated until the verification passes. Integrate all verified text content to form an optimized text sequence.

[0007] Preferably, the steps of obtaining contextual semantic clues related to the structural conflict region from the GB standard knowledge ontology model, and using the contextual semantic clues to perform targeted re-identification and semantic disambiguation of the structural conflict region to obtain the repair region include: Based on the physical location data of the structural conflict region and the text content of the structural conflict region, the corresponding target structural node is obtained from the GB standard knowledge ontology model; Obtain the type attributes of the target structural node, call the structured constraint rules corresponding to the target structural node in the GB standard knowledge ontology model according to the type attributes of the target structural node, count the frequency of violation of each type of structured constraint rule in the currently processed text content fragment, and generate a rule conflict spectrum; Based on the rule-based conflict spectrum, obtain the dominant conflict type and systematic deviation data; Obtain the currently processed text content fragment, extract the non-text element density, layout irregularity, and domain term density from the currently processed text content fragment, generate a document complexity vector based on the non-text element density, layout irregularity, and domain term density, and obtain the repair difficulty value of the structural conflict area based on the document complexity vector. The historical repair case library is queried, and a set of similar historical cases is obtained by using the type attribute of the target structural node, the dominant conflict type, and the document complexity vector as composite search conditions. Successful cases are selected from the historical case set, the contextual semantic clues of the successful cases are extracted, and contextual semantic clue templates for the structural conflict areas are generated and calibrated by combining the systematic deviation data and the repair difficulty value. The calibrated contextual semantic cue template guides a pre-defined multimodal understanding model to perform targeted re-identification and semantic disambiguation of the structural conflict region, thereby obtaining the repaired region.

[0008] Preferably, the step of calculating the comprehensive confidence score of the repaired region and verifying whether the content of the repaired region passes the test based on the comprehensive confidence score includes: A comprehensive confidence score is calculated based on the confidence level, the rigid constraint compliance, and the flexible constraint compliance. The iteration termination threshold is dynamically set and adjusted based on the dominant conflict type. Determine whether the overall confidence score is greater than the iteration termination threshold; If the value is greater than the value, the verification result of the repaired area is determined to be passed. If the result is not greater than the value, the verification result of the repaired area is determined to be unsuccessful. Based on the composition of the comprehensive confidence score, a set of features for reasons for failure is obtained. Based on the set of features for reasons for failure, the process returns to the step of obtaining contextual semantic clues related to the structural conflict area from the GB standard knowledge ontology model to extract reinforcement clues. The reinforcement clues are used to perform targeted re-identification and semantic disambiguation of the structural conflict area. The process is iteratively executed until the verification is successful.

[0009] Preferably, the step of inputting the optimized text sequence into the semantic analysis model, and performing entity and relation recognition to generate semantic annotations by fusing the structured constraint rules in the GB standard knowledge ontology model with the internal decision logic of the semantic analysis model, includes: A subset of constraint rules is generated from the structured constraint rules, the subset of constraint rules including context constraints that define the legal context of an entity and entity relationship constraints; During the reasoning process of the semantic analysis model, a constraint satisfaction layer is constructed, and the candidate annotation results output by the semantic analysis model are captured in real time through the constraint satisfaction layer. By applying the constraint rule subset through the constraint satisfaction layer, online correction or rejection operations are performed on the candidate annotation results that violate the constraint rule subset; The candidate annotation results after online correction or rejection are used as entity and relation recognition results, and the entity and relation recognition results are output to form the semantic annotation.

[0010] Preferably, the step of applying the constraint rule subset through the constraint satisfaction layer to perform online correction or rejection operations on the candidate annotation results that violate the constraint rule subset includes: The candidate annotation results are scanned through the constraint satisfaction layer to identify all candidate instances that violate the subset of constraint rules. Obtain the overall confidence score for each of the repaired regions; The overall confidence score is used as a negative correlation factor to calculate the tolerance value for each candidate instance; Based on the tolerance value, perform online correction or rejection operations on the candidate instances.

[0011] This invention also provides an intelligent annotation system that integrates OCR text optimization and GB standard paradigm, including multiple modules, which are used to implement the steps of an intelligent annotation method that integrates OCR text optimization and GB standard paradigm.

[0012] Preferably, the module includes multiple units, which are used to implement the steps of an intelligent annotation method that integrates OCR text optimization and GB standard paradigm.

[0013] The present invention also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of an intelligent annotation method that integrates OCR text optimization and GB standard paradigm.

[0014] The present invention also provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of an intelligent annotation method that integrates OCR text optimization and GB standard paradigm.

[0015] The beneficial effects of this invention are as follows: This invention adopts a multi-round iterative alignment and constraint rule fusion scheme, using the GB standard knowledge ontology model as the unified decision-making basis, to realize bidirectional data interaction and knowledge reverse guidance in each stage. This can effectively correct physical errors in OCR parsing and layout analysis, and prevent errors from propagating downstream. At the same time, it uses high-level knowledge of the GB standard to guide semantic annotation decisions, so that the entity and relation recognition results conform to the domain paradigm, improving the accuracy and reliability of intelligent annotation of GB standard documents. The advantages are more obvious, especially when processing GB standard documents with complex physical features. Attached Figure Description

[0016] Figure 1This is a schematic diagram of a method flow according to an embodiment of this application.

[0017] Figure 2 This is a schematic diagram of the system structure according to an embodiment of this application.

[0018] The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0019] It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.

[0020] like Figure 1 As shown, this application provides an intelligent annotation method that integrates OCR text optimization and the GB standard paradigm, including: S1, obtain text content and layout information through OCR parsing; S2, the layout information is iteratively aligned with the pre-built GB standard knowledge ontology model in multiple rounds, and structural errors in the text content are identified and corrected through comparison and feedback mechanisms to generate an optimized text sequence; wherein, the GB standard knowledge ontology model includes the structured constraint rules of GB standard documents, document structure paradigms and type attributes of each structural node; S3, input the optimized text sequence into the semantic analysis model, and perform entity and relation recognition by integrating the structured constraint rules in the GB standard knowledge ontology model with the internal decision logic of the semantic analysis model to generate semantic annotations.

[0021] As described in steps S1-S3 above, since GB standard documents are domain documents with strict structural paradigms and semantic rules, their text content and layout information are strongly correlated. However, in actual processing, OCR parsing is easily affected by physical factors such as document clarity and layout variations, resulting in errors. Furthermore, if layout analysis and semantic annotation lack a global understanding of the GB standard paradigm, low-level perceptual errors will be transmitted to high-level cognitive stages, ultimately affecting the reliability of semantic annotation results. Therefore, this invention deeply integrates the GB standard knowledge ontology model into the OCR parsing, structural error repair, and semantic annotation processes, achieving a more accurate conversion from unstructured GB standard documents to structured semantic annotation results. Compared to the existing technology that treats OCR recognition, layout analysis, and text annotation as serial and relatively independent subtasks, this decoupled model can address subtle errors in upstream OCR and layout analysis. Errors are amplified downstream because downstream tasks lack an understanding of the overall document paradigm to correct them. Furthermore, this decoupled model lacks cross-stage error correction and knowledge feedback mechanisms between modules, making it difficult to address processing deviations caused by physical uncertainties in GB standard documents (such as blurred characters or irregular layout). This solution employs a "multi-round iterative alignment" and "constraint rule fusion" approach, using the GB standard knowledge ontology model as a unified decision-making basis to achieve bidirectional data interaction and knowledge feedback across stages. This effectively corrects physical errors in OCR parsing and layout analysis, preventing errors from propagating downstream. Simultaneously, it utilizes high-level GB standard knowledge to guide semantic annotation decisions, ensuring that entity and relation recognition results conform to the domain paradigm, thus improving the accuracy and reliability of intelligent annotation for GB standard documents. Its advantages are particularly evident when processing GB standard documents with complex physical features.

[0022] In one embodiment of the present invention, the step of performing multi-round iterative alignment of the layout information with a pre-built GB standard knowledge ontology model, identifying and correcting structural errors in the text content through comparison and feedback mechanisms, and generating an optimized text sequence includes: S21, Obtain the document structure paradigm according to the GB standard knowledge ontology model, match the layout information with the document structure paradigm in the GB standard knowledge ontology model, and generate document macrostructure prediction data based on the matching result; S22, Based on the document macrostructure prediction data, identify structural conflict areas in the text content that conflict with the document structure paradigm; S23, obtain contextual semantic clues related to the structural conflict region from the GB standard knowledge ontology model, and use the contextual semantic clues to perform targeted re-identification and semantic disambiguation on the structural conflict region to obtain the repair region; S24, calculate the overall confidence score of the repaired area, and verify whether the content of the repaired area passes the test based on the overall confidence score; If it fails, the reason for failure is obtained, and based on the reason for failure, the process returns to the step of obtaining contextual semantic clues related to the structural conflict area from the GB standard knowledge ontology model, and the process is repeated until the verification passes. S25, integrate all verified text content to form an optimized text sequence.

[0023] As described in steps S21-S25 above, since GB standard documents are domain documents with strong normative requirements, their layout information (including the physical location of text blocks, font size, line spacing, numbering arrangement, etc.) and the logical structure of the text content (such as chapter order, content belonging to a chapter, and the structural position of entities) have a fixed and strict correlation. This correlation is the core physical manifestation of the GB standard paradigm. For example, the "Terms and Definitions" chapter in the GB standard is usually numbered "Chapter 3", the title is in bold 14pt and left-aligned, and its content must immediately follow the "Normative References" chapter. This correlation is a key feature that distinguishes GB standards from other general documents. However, in actual processing scenarios, OCR parsing is easily affected by the physical state of the document, resulting in deviations. For example, after scanning old GB documents, there may be blurry characters (such as "3" being misidentified as "5"), page number offsets, and tables or formulas obscuring chapter headings. The problem is that some GB documents with non-standard layouts may have inconsistent title fonts or partial adjustments to the chapter order. These physical factors cause a break in the inherent connection between the layout information and the text content, resulting in structural errors. If these errors are not corrected, the downstream semantic analysis model will be unable to locate entities based on the structural logic of the GB standard (e.g., mistakenly labeling the terminology content of "Chapter 5" as the entity "Technical Requirements"), ultimately affecting the accuracy of semantic annotation. Therefore, this invention uses a pre-constructed GB standard knowledge ontology model as a basis to perform multi-round iterative alignment, structural conflict identification, targeted repair, confidence verification, and content integration on the layout information and text content obtained by OCR parsing. Finally, it generates an optimized text sequence. By reconstructing the correct connection between the layout information and the text content, the inherent structural logic of the GB standard document is restored, thereby blocking the propagation of OCR parsing or layout analysis errors to the semantic annotation stage from the upstream.

[0024] The document structure paradigm is obtained based on the GB standard knowledge ontology model. This GB standard knowledge ontology model is a pre-built machine-readable knowledge base that includes the structured constraint rules of GB standard documents, document structure paradigms, and type attributes of each structural node. The document structure paradigms are classified into hierarchical dynamic templates according to GB document types (technical standards, management standards, etc.). Each template specifies the expected chapter sequence, chapter title format, numbering rules, and structural node attributes of the corresponding type of GB document. After obtaining the document structure paradigm, the layout information (the GB document PDF is parsed page by page by the OCR engine, outputting the physical location of text blocks, layout attributes, and preliminary text recognition) is matched with the document structure paradigm. The matching adopts a feature-weighted similarity calculation algorithm, which quantifies the font matching degree (weight 0.3), position offset degree (weight 0.4), and text keyword matching degree (weight 0.3) into values ​​in the range of 0-1, and calculates the similarity by weighted summation. Based on this, the macro-structure prediction data of the document is generated.

[0025] Based on the document's macro-structure prediction data, structural conflict areas in the text content are identified. During identification, the actual attributes of each structural element in the text content (actual chapter number, title text, page number, body text affixation, etc.) are first extracted, and then compared element by element with the expected attributes in the prediction data. If the deviation exceeds the allowable range of the structured constraint rules in the GB standard knowledge ontology model (divided into rigid constraints and flexible constraints; rigid constraints such as continuous chapter numbering, and flexible constraints such as allowing ±1pt deviation for title font), the corresponding text area is marked as a structural conflict area, thus clarifying the direction for subsequent repair.

[0026] The contextual semantic clues related to the structural conflict region are obtained from the GB standard knowledge ontology model, and the contextual semantic clues are used to perform targeted re-identification and semantic disambiguation on the structural conflict region to obtain the repair region. In this process, the cross-attention layer design of the multimodal understanding model can strengthen the association between clues and image and text features, making the repair more accurate and directly improving the ability to handle complex physical scenes such as blur and occlusion, thus solving the problem of poor repair effect of existing technologies for such scenes.

[0027] The comprehensive confidence score of the repaired region is calculated, and the content of the repaired region is verified based on the comprehensive confidence score. If it fails, the reason for failure is obtained, and the process returns to the step of obtaining contextual semantic clues related to the structural conflict region from the GB standard knowledge ontology model based on the reason for failure. This process is iterated until the verification is successful. This verification and iteration mechanism based on the comprehensive confidence score can avoid the uncertainty of single repair in existing technologies and improve the reliability of repair.

[0028] All verified text content is integrated to form an optimized text sequence. The integration follows the document structure logic of the ontology model. First, the final structural position of each text block is determined based on the macro-structure prediction data. Then, the text block concatenation algorithm (based on dual sorting of chapter number and physical position) is used for integration. At the same time, the semantic connection verification module is called to verify the semantic relevance of adjacent text blocks to ensure that the structure and semantic logic are smooth.

[0029] In one embodiment of the present invention, the steps of obtaining contextual semantic clues related to the structural conflict region from the GB standard knowledge ontology model, and using the contextual semantic clues to perform targeted re-identification and semantic disambiguation of the structural conflict region to obtain the repair region include: S231, based on the physical location data of the structural conflict region and the text content of the structural conflict region, obtain the corresponding target structural node from the GB standard knowledge ontology model; S232, obtain the type attribute of the target structure node, call the structured constraint rules corresponding to the target structure node in the GB standard knowledge ontology model according to the type attribute of the target structure node, count the frequency of violation of each type of structured constraint rule in the currently processed text content fragment, and generate a rule conflict spectrum; S2321, Obtain dominant conflict type and systematic deviation data based on the rule conflict spectrum; S233, obtain the currently processed text content fragment, extract the non-text element density, layout irregularity and domain term density in the currently processed text content fragment, generate a document complexity vector based on the non-text element density, layout irregularity and domain term density, and obtain the repair difficulty value of the structural conflict area based on the document complexity vector. S234, query the historical repair case library, using the type attribute of the target structural node, the dominant conflict type, and the document complexity vector as composite search conditions to obtain a set of similar historical cases; S235, Select successful cases from the historical case set, extract the contextual semantic clues of the successful cases, and generate and calibrate the contextual semantic clue template for the structural conflict area by combining the systematic deviation data and the repair difficulty value. S236, using the calibrated contextual semantic cue template to guide the preset multimodal understanding model to perform targeted re-identification and semantic disambiguation of the structural conflict region, thereby obtaining the repaired region.

[0030] As described in steps S231-S236 above, the text content and layout information of GB standard documents are strongly correlated. This correlation is a concrete manifestation of the GB standard paradigm. For example, the text content of the "Terms and Definitions" section should correspond to the page number of "Chapter 3," and the text of "Technical Parameters" needs to be associated with the page position of a specific table. However, in actual processing, insufficient document scanning clarity can lead to OCR misrecognition of characters (e.g., "3" mistakenly identified as "5"), and layout variations can cause errors in the attribution of text blocks to page positions (e.g., appendix text blocks belonging to main text sections). These physical factors disrupt the inherent correlation between text content and layout information, forming structural conflict areas. If only a general repair strategy is relied upon, it is impossible to accurately match the conflict characteristics under different physical scenarios, which can easily lead to... Incomplete repairs allow low-level perceptual errors (such as character misrecognition) to propagate to higher-level stages such as layout analysis and semantic annotation, ultimately leading to misjudgments of entities and relationships in semantic annotation (e.g., labeling the terminology of "Chapter 5" as the entity "Technical Requirements"). Therefore, this invention combines the structured constraint rules of the GB standard knowledge ontology model, global document state data (rule conflict spectrum, document complexity vector), and historical repair experience to dynamically generate and calibrate contextual semantic clue templates adapted to the current conflict scenario. This guides the multimodal understanding model to complete the targeted re-identification and semantic disambiguation of structural conflict areas, thereby more accurately correcting errors in OCR parsing caused by physical factors such as document clarity and layout variations, and preventing the transmission of low-level perceptual errors to higher-level cognitive stages.

[0031] Based on the physical location data and text content of structural conflict areas, the corresponding target structural nodes are matched from the GB standard knowledge ontology model. The structural conflict areas specifically include the page number of the conflict area in the document, the coordinate range within the page, and the hierarchical position of the conflict area in the document structure. The text content of the structural conflict areas comes from the OCR parsing results, that is, the preliminary identification text of the conflict area by the OCR. During matching, these two types of data are input into the GB standard knowledge ontology model, and the target structural nodes are located through "location-content dual-dimensional retrieval": first, the structural role of the conflict area is determined based on the physical location data (such as whether it belongs to the chapter title or appendix title), and then the matching range is narrowed by combining the keywords in the text content (such as "terms and definitions" and "appendix"), and finally the GB standard structural nodes that the area should conform to are determined (such as "terms and definitions chapter node" and "normative appendix node").

[0032] The system obtains the type attributes of the target structural nodes and, combined with the currently processed text content fragments, generates a rule conflict spectrum. The type attributes of the target structural nodes are obtained from the GB standard knowledge ontology model, which defines the core constraint features of the nodes (e.g., the chapter "Terminology and Definitions" is designated as a "core essential chapter" with rigid constraints including number 3 and a title containing 'Terminology and Definitions', and flexible constraints including a bold, 14pt font). The currently processed text content fragments are the text portions for which the system has completed OCR parsing and preliminary structural judgment up to the time of this step, covering conflict areas and related normal text. When generating the rule conflict spectrum, the system first calls the structured constraint rules corresponding to the type attributes of the target structural nodes from the ontology model (e.g., "numbered consecutive rules"). The system first analyzes the "title keyword rule" and "font formatting rule," then counts the frequency of violations of each rule in the processed text fragments. For example, in the processed text "Chapters 2-5," the "numbering sequence rule" was violated twice (Chapter 2 jumps directly to Chapter 5, and Chapter 3 is missing), the "title keyword rule" was violated once (Chapter 5's title is "Terminology" instead of "Terminology and Definitions"), and the "font formatting rule" was not violated. These frequencies are categorized and recorded according to rule type to form a rule conflict spectrum. The rule conflict spectrum can clearly reflect the core conflict types and frequency distribution caused by physical factors (such as scan blur leading to misidentification of numbers) in the current document, providing a global conflict pattern basis for subsequent clue calibration and avoiding focusing only on local conflicts while ignoring systemic errors.

[0033] The dominant conflict type and systematic deviation data are obtained based on the rule conflict spectrum. The dominant conflict type is the constraint rule type with the highest violation frequency in the rule conflict spectrum. The systematic deviation data is the regularity and characteristics derived from the analysis of the dominant conflict type. For example, violations of the "numbered consecutive rule" are concentrated in the first 3 chapters of the document and mostly follow a "2→5" skipping number pattern. This data is generated from the rule parsing module of the GB standard knowledge ontology model. The module identifies the distribution pattern and deviation characteristics of the dominant conflict type through cluster analysis of the spectrum data (using the K-means algorithm, with the number of clusters set to 3, corresponding to high, medium and low frequency conflict intervals). This provides a basis for supplementing targeted constraints for subsequent clues and ensures that the clues can cover errors caused by systematic physical factors.

[0034] The historical repair case database is queried using a combination of target structure node type, dominant conflict type, and document complexity vector as search criteria to obtain a set of similar historical cases. This database pre-stores case data from past processing of GB standard documents. Each case includes information such as "target structure node type of the conflict area, rule conflict spectrum, document complexity vector, contextual semantic clues used, and repair result (success / failure)." The document complexity vector is generated by statistically analyzing non-text element density (number of non-text elements / total text length), layout irregularity (difference between actual layout and GB standard recommended layout, quantified as 0-1), and domain terminology density (number of domain terms / total text length), weighted (with weights of 0.4, 0.3, and 0.3 respectively), summed, and normalized to the 0-1 range. During retrieval, a "multi-feature" approach is employed. The "weighted similarity matching" algorithm quantifies the target structure node type matching degree (weight 0.3), dominant conflict type matching degree (weight 0.4), and document complexity vector cosine similarity (weight 0.3) into 0-1 values. After weighted summation, cases with similarity ≥ 0.7 are selected to form a set of similar historical cases. For example, if the current target structure node is "term definition chapter", the dominant conflict type is "numbering continuity rule violation", and the document complexity vector is [0.7, 0.8, 0.6] (high non-text element density, high unconventional typesetting), then cases with the same node type, the same dominant conflict type, and a complexity vector similarity ≥ 0.7 will be retrieved from the case library. The repair clues of these cases are mostly aimed at the scenario of "ambiguous numbering in high complexity documents", which can provide effective experience reference for the current repair and reduce repair errors caused by unfamiliar physical scenarios.

[0035] Successful cases are selected from the historical case set, and contextual semantic clues are extracted from these cases. These clues are then combined with the systematic deviation data and the repair difficulty value to generate and calibrate contextual semantic clue templates for the structural conflict areas. The core elements of the contextual semantic clues extracted from the successful cases are as follows: for example, for a successful case of "incorrect terminology chapter numbering," the clue elements include "the number should be 3, the previous chapter is a normative reference document, and the title contains complete keywords." The repair difficulty value is calculated based on the document complexity vector using a weighted summation formula. D = 0.5 × d1 + 0.4 × d2 + 0.3 × d3; Where D represents the repair difficulty value, d1 represents the density of non-text elements, d2 represents the degree of irregularity in layout, and d3 represents the density of domain terms. The higher the repair difficulty value, the greater the repair difficulty. 0.5, 0.4 and 0.3 represent the weighting coefficients of non-text element density, irregularity in layout and density of domain terms, respectively. The values ​​here are for an implementation example. The calibration process consists of two parts: First, supplementing constraints based on systematic deviation data. For example, if the dominant conflict type is "violation of consecutive numbering rules" and the systematic deviation is "the first three chapters are prone to skipping numbers," then based on historical clues, a strengthened constraint is added: "Numbering must be arranged consecutively in '2→3→4', and skipping numbers in the first three chapters is prohibited." This specifically addresses numbering errors caused by systematic physical factors. Second, adjusting clue details based on the repair difficulty value. If the repair difficulty is ≥0.7 (high difficulty, such as containing a large number of charts obscuring text or chaotic layout), then a refined constraint is added: "If there are technical tables near the conflict area, it is necessary to confirm the relationship between the chapter titles and the table content." The auxiliary model uses related elements such as tables to help make judgments and correct OCR errors caused by occlusion. If the difficulty is less than 0.3 (low difficulty), the clues are simplified to the core elements (such as only retaining "numbered 3, title containing 'terms and definitions'") to avoid redundant information affecting the repair efficiency. The final integrated contextual semantic clue template not only includes effective strategies from historical experience, but also adapts to the conflict patterns and repair difficulty of the current document. This ensures that the clues can accurately deal with various conflicts caused by physical factors and effectively correct errors caused by similar physical factors, further improving the reliability of the current clue template and reducing the risk of repair failure due to clue failure.

[0036] Using calibrated contextual semantic cue templates, a pre-defined multimodal understanding model is guided to perform targeted re-identification and semantic disambiguation of structurally conflicting regions. The multimodal understanding model adopts an architecture of "image feature extraction - text feature fusion - attention guidance." Image feature extraction uses a ResNet-50 network, and text feature extraction uses a BERT-base model. The two are fused through a cross-attention layer, enabling the model to simultaneously focus on image details and text semantics. During the guidance process, the contextual semantic cue template is input into the model in the form of "task instructions." For example, for the cue template "incorrect terminology chapter number," the instruction is "This area is a terminology definition chapter, the number should be 3, the previous chapter is Chapter 2, the title must contain 'terminology and definition,' and if there is a terminology explanation table nearby, the association must be confirmed." Based on this instruction, the model adjusts the attention weights, prioritizing features related to the cue, correcting OCR errors, clarifying the text semantic attribution, and finally outputting the repaired area.

[0037] Compared to existing solutions, this invention has two advantages: First, it achieves higher accuracy in correcting OCR errors. By combining the physical location of conflict areas, text content, and document complexity, the generated semantic cues can accurately adapt to physical scenarios with varying clarity and layout variations, guiding the multimodal model to focus on key features and effectively correcting issues such as character misrecognition and incorrect text block attribution. Second, it has stronger error propagation blocking capabilities. By identifying systemic physical factors through rule-based conflict spectrum identification and optimizing repair strategies based on historical experience, it completely intercepts OCR errors during the structural repair stage, preventing them from propagating to higher-level stages such as layout analysis and semantic annotation. Thus, this solution can address the problem of OCR parsing errors caused by physical factors and the propagation of low-level errors to higher-level cognitive stages.

[0038] In one embodiment of the present invention, the step of calculating the comprehensive confidence score of the repaired region and verifying whether the content of the repaired region passes the test based on the comprehensive confidence score includes: S241, calculate the comprehensive confidence score based on the confidence level, the rigid constraint compliance, and the flexible constraint compliance. The calculation formula is as follows:

[0039] In the formula, This indicates the overall confidence score. Indicates the confidence weight. Indicates the confidence level (range 0-1, representing the model's self-evaluation of the repair results). Represents the rigid constraint weight. This indicates the degree of compliance with rigid constraints (range 0-1, 1 for full compliance, 0.5 for partial compliance, and 0 for non-compliance). Indicates the weight of the flexible constraint. Indicates the compliance degree of flexible constraints (range 0-1, quantified by compliance probability). S242, dynamically set and adjust the iteration termination threshold according to the dominant conflict type; S243, determine whether the comprehensive confidence score is greater than the iteration termination threshold; S2431, if it is greater than, then the verification result of the repaired area is determined to be passed; S2432, if it is not greater than, then the verification result of the repaired area is determined to be unsuccessful, and the failure reason feature set is obtained based on the composition of the comprehensive confidence score. Based on the failure reason feature set, the process returns to the step of obtaining contextual semantic clues related to the structural conflict area from the GB standard knowledge ontology model to extract reinforcement clues. The reinforcement clues are used to perform targeted re-identification and semantic disambiguation of the structural conflict area, and the process is iteratively executed until the verification is successful.

[0040] As described in steps S241-S243, S2431, and S2432 above, errors in OCR parsing caused by physical factors (such as misrecognition of ambiguous characters or deviation in text block attribution) may still pose a risk of incomplete repair or the introduction of new deviations after targeted repair. For example, when "Chapter 5" is corrected to "Chapter 3", although the numbering skipping problem is solved, there may still be implicit structural deviations due to the font not matching the GB standard paradigm. If such unverified repair results are directly used for downstream semantic annotation, low-level errors will continue to propagate, leading to misjudgment of entities in semantic annotation (such as mislabeling non-term chapter text as term entities). Therefore, this invention uses a quantitative confidence score and dynamic verification mechanism to determine whether the repair results truly conform to the GB standard paradigm. Iterative repair is initiated for results that do not meet the standard, thereby eliminating low-level error residues and preventing errors from propagating upwards and affecting the reliability of semantic annotation.

[0041] Existing technologies primarily rely on the confidence level of the OCR engine or the repair model itself to determine the pass / fail status of the results. This approach suffers from insufficient verification accuracy and error prevention capabilities. For example, repair results that violate rigid constraints and those that violate flexible constraints have different impacts on subsequent semantic annotation, leading to either "too lenient verification of critical errors" or "too strict verification of minor deviations." Furthermore, relying on a single confidence index makes it difficult to identify implicit deviations in the repair results that conform to the model's confidence level but violate the GB paradigm. This allows some low-level errors to still pass verification and propagate downwards. Our proposed solution, however, deeply integrates the conformity of the repair results to GB standard constraints into the verification logic through multi-dimensional weighted confidence scoring and dynamic threshold adjustment based on constraint type. This addresses the shortcomings of existing technologies in terms of verification accuracy and error prevention capabilities.

[0042] The comprehensive confidence score of the repaired region is calculated using a constraint strength-weighted fusion strategy. The confidence score of the multimodal understanding model itself is directly output by the model and represents its self-evaluation of the repair results (range 0-1). For example, after correcting "5" to "3", the model outputs a confidence score of 0.92 based on character stroke matching and contextual relevance. Secondly, the conformity of the repair results with the rigid constraints in the GB standard knowledge ontology model is calculated by comparing the degree of matching between the repair results and rigid constraints (1.0 for complete conformity, 0.5 for partial conformity, and 0 for non-conformity). Thirdly, the conformity of the repair results with flexible constraints is calculated by statistically quantifying the probability of conformity between the repair results and flexible constraints (range 0-1). For example, the corrected title font is 13pt bold, which, although not a perfect match to 14pt, is within the allowable deviation range, resulting in a flexible constraint conformity score of 0.8.

[0043] Based on the type of constraint violated in the current repair, the iteration termination threshold is dynamically set and adjusted. This scheme can adapt to different repair scenarios and balance verification accuracy and efficiency. The determination of the constraint type is based on the type attribute of the structural conflict region. If the conflict region violates a rigid constraint in the GB standard knowledge ontology model before repair, it indicates that the error has a significant impact on subsequent semantic annotation, requiring a higher initial iteration termination threshold (e.g., 0.8) and a faster convergence speed (the threshold decreases by 0.1 per iteration, down to a minimum of 0.6) to ensure that critical errors are fully repaired. If the constraint violates a flexible constraint... Constraints and errors have a relatively small impact on semantic annotation. A lower initial threshold (e.g., 0.6) and a slower convergence speed (the threshold is reduced by 0.05 per iteration, down to a minimum of 0.5) are used to avoid excessive computational consumption due to excessive iteration. If a new rigid constraint violation is triggered during the iterative repair process (e.g., the chapter number is mistakenly changed to "4" when correcting the font), the current threshold is temporarily increased to 80% of the corresponding initial threshold (e.g., the rigid constraint initial threshold is 0.8, temporarily increased to 0.64). This forces strict verification of newly introduced critical errors, prevents error propagation, and achieves more accurate verification of critical errors.

[0044] When the overall confidence score is not greater than the iteration termination threshold, the verification is deemed unsuccessful and iterative repair is initiated. This can eliminate residual errors and prevent error propagation. First, a feature set of reasons for failure is obtained based on the composition of the overall confidence score. For example, a score of 0.65 is lower than the threshold of 0.7. After decomposition, it is found that... =0.5 (The rigid constraint part is compliant, the chapter number is correct but the title is missing the word "and") =0.8、 =0.7, the reason for failure is "insufficient rigid constraint compliance, missing title keywords". Then, based on this feature set, we return to the step of obtaining contextual semantic clues from the GB standard knowledge ontology model and extract strengthening clues. For example, for "missing title keywords", we obtain the refined clue from the ontology model that "the title of the terminology definition chapter must contain the complete keyword 'terminology and definition', and missing any character does not meet the rigid constraint". Then, we use the strengthening clue to guide the multimodal understanding model to re-identify the conflict area (such as correcting "terminology definition" to "terminology and definition"). This process is executed iteratively until the comprehensive confidence score is higher than the threshold or the preset maximum number of iterations is reached (set to 3 times to balance accuracy and efficiency). This ensures that the repair results that do not meet the standard will not enter the downstream steps, thereby more thoroughly blocking the transmission of underlying errors.

[0045] In one embodiment of the present invention, the step of inputting the optimized text sequence into a semantic analysis model, and performing entity and relation recognition to generate semantic annotations by fusing the structured constraint rules in the GB standard knowledge ontology model with the internal decision logic of the semantic analysis model, includes: S31, extract and generate a subset of constraint rules from the structured constraint rules, the subset of constraint rules including context constraints that define the legal context of an entity and entity relationship constraints; S32, During the reasoning process of the semantic analysis model, a constraint satisfaction layer is constructed, and the candidate annotation results output by the semantic analysis model are captured in real time through the constraint satisfaction layer; S33, by applying the constraint rule subset through the constraint satisfaction layer, online correction or rejection operations are performed on the candidate annotation results that violate the constraint rule subset; S34, the candidate annotation results after online correction or rejection are used as entity and relation recognition results, and the entity and relation recognition results are output to form the semantic annotation.

[0046] As described in steps S31-S34 above, due to errors in OCR parsing caused by variations in document clarity and layout, implicit semantic biases may still exist even after structural repair. For example, if OCR mistakenly identifies "compressive strength" as "anti-pillar strength," and the semantic analysis model lacks the guidance of GB standard terminology rules, it may be unable to recognize this error, thus incorrectly labeling "anti-pillar strength" as a technical parameter entity. This low-level perception error, when transmitted to the semantic annotation stage, will directly cause the annotation results to deviate from the GB standard semantic rules, affecting subsequent applications based on the annotation results. Therefore, this application integrates the structured constraint rules of the GB standard into the semantic analysis process. Through real-time verification and correction, it blocks low-level perception errors transmitted from physical errors in OCR parsing (such as character blurring and text block attribution bias) during the semantic analysis stage, ensuring that the entity and relation recognition results conform to the semantic rules and structural paradigm of the GB standard, thereby improving the reliability of the semantic annotation results.

[0047] The structured constraint rules stored in the GB standard knowledge ontology model cover the structural and semantic rules of GB documents. Extraction requires consideration of the semantic annotation task requirements (entity recognition and relation extraction) to select a subset of rules directly related to semantic logic. These include two categories: context constraints and entity relation constraints. Context constraints define the legal context in which an entity appears, such as "term entities are only allowed to appear in the 'Terms and Definitions' section or the 'Symbols and Abbreviations' section" or "technical parameter entities must be located in the 'Technical Requirements' section or the 'Test Methods' section." Entity relation constraints define the legal relationships between entities, such as "technical parameter entities and technical requirement entities have an 'attribution' relationship" or "referenced document entities and normative referenced document sections have a 'source' relationship." The extraction of these constraint rules is achieved through the ontology model's rule retrieval interface. The interface automatically matches and derives relevant rules based on the "semantic annotation" task tags, forming a constraint rule set.

[0048] A constraint satisfaction layer is constructed during the inference process of the semantic analysis model. The semantic analysis model adopts a "BERT-BiLSTM-CRF" architecture, where the BERT layer is used to extract deep semantic features of the text, the BiLSTM layer is used to capture the contextual dependencies of the text, and the CRF layer is used to output the globally optimal annotation sequence. The constraint satisfaction layer is designed as a pre-decision unit of the CRF layer. It is linked with the semantic analysis model through an API interface and captures the candidate annotation results output by the CRF layer in real time during the model inference process (including the entity label probability distribution of each token, such as "B-TERM" and "I-PARAM"). It also verifies them in real time. The key to this embedded design is that the constraint satisfaction layer can intervene in the decision-making process before the model generates the final annotation result, avoiding the model from generating a large number of invalid annotations due to low-level errors. Compared with the posterior filtering of existing technologies, it significantly improves the timeliness of error blocking. For example, when the model generates the candidate label "B-PARAM" (technical parameter entity start) for "anti-garbage strength", the constraint satisfaction layer can capture this information in real time, preventing the model from further annotating it as a technical parameter entity.

[0049] By applying a set of constraint rules at the constraint satisfaction layer, online correction or rejection operations are performed on candidate annotation results that violate the rules. Subsequently, based on the type of rule violation (contextual constraint or entity relationship constraint) and the degree of violation, differentiated online correction or rejection operations are performed: For candidate instances that seriously violate rigid constraints (such as terminology entity annotations appearing in non-terminology chapters, or entity relationships that do not conform to the GB standard at all), the candidate annotation is directly rejected, the label probability of the corresponding token is reset to 0, and the model is forced to reselect a label that conforms to the rules; For candidate instances that slightly violate flexible constraints (such as technical parameter entity annotations being located outside the technical requirements chapter but still within the experimental methods chapter, or entity relationship annotations having expression deviations), online correction is performed based on constraint rules, for example, adjusting the annotation boundary of "technical parameter entity" to within the technical requirements chapter, or correcting the "attribution" relationship to a "reference" relationship. For example, in the case of a violation where "compressive strength" is labeled as a technical parameter entity in the terminology section, the constraint satisfaction layer directly rejects the "B-PARAM" label. At the same time, based on the GB standard terminology rules, the model is prompted to re-identify whether the text is a miswritten terminology entity. The model is guided to find that "compressive strength" should be "compressive strength". Combined with the context constraints, it is determined that if it is in the terminology section, it should be labeled as a terminology entity, and if it is in the technical requirements section, it should be labeled as a technical parameter entity, thus achieving real-time correction of errors.

[0050] The output after constraint satisfaction layer processing is used as the final entity and relation recognition result. After online correction and rejection, the candidate annotation results have eliminated the deviations caused by low-level errors that violate GB standard rules. At this time, the CRF layer will recalculate the globally optimal annotation sequence based on the corrected label probability distribution and output the final entity and relation recognition result.

[0051] In one embodiment of the present invention, the step of applying the subset of constraint rules through the constraint satisfaction layer to perform online correction or rejection operations on the candidate annotation results that violate the subset of constraint rules includes: S331, The candidate annotation results are scanned through the constraint satisfaction layer to identify all candidate instances that violate the subset of constraint rules; S332, Obtain the comprehensive confidence score for each repaired region; S333, using the comprehensive confidence score as a negative correlation factor, calculate the tolerance value for each candidate instance, using the following formula:

[0052] In the formula, Indicates the tolerance value. This represents the basic tolerance factor (a fixed value of 1.0, ensuring...). and (Strictly negative correlation) Indicates the position of the candidate instance The overall confidence score of each repair area (range 0-1); S334, Perform online correction or rejection operations on the candidate instance based on the tolerance value.

[0053] As described in steps S331-S334 above, the quality of different repaired areas varies after structural repair of GB standard documents. Areas with clear scans and standardized layouts have small OCR parsing errors and high overall confidence scores after repair (e.g., 0.9), with few residual low-level perceptual errors. However, areas with blurry scans, chart occlusions, or layout variations are prone to character misrecognition and text block attribution errors during OCR parsing. Even after iterative repair, the overall confidence score may still be low (e.g., 0.6), with a higher risk of implicit structural deviations. If a uniform verification standard is applied to all repaired areas, minor errors that violate the rules in high-confidence areas may be excessively tolerated, or reasonable annotations caused by repair deviations in low-confidence areas may be strictly rejected, which may exacerbate the impact of low-level error propagation on semantic annotation. Therefore, this invention combines the comprehensive confidence score of the repaired area to dynamically adjust the strictness of semantic annotation verification, thereby blocking low-level perceptual errors caused by physical errors in OCR parsing from being transmitted to the semantic annotation stage. This ensures that the semantic annotation results of areas with different repair quality meet the requirements of the constraint rule subset in the GB standard knowledge ontology model, thereby improving the overall reliability of semantic annotation.

[0054] The constraint satisfaction layer scans the candidate annotation results to identify all candidate instances that violate the constraint rule subset. The candidate annotation results are the real-time output captured by the constraint satisfaction layer during the semantic analysis model inference process, including the entity label of each token (such as "B-TERM" and "I-PARAM") and preliminary relationship prediction (such as "attribution" and "reference"). During the scanning process, the constraint satisfaction layer adopts the logic of "rule-annotation bidirectional comparison": on the one hand, it directly compares the entity type and relationship type in the candidate annotation results with the requirements of the constraint rule subset (such as determining whether "technical parameter entity" appears in the chapter allowed by the rule); on the other hand, it compares the text content corresponding to the annotation results (such as "compressive strength" and "Chapter 3") with the semantic features in the rules (such as keywords and chapter number range). After double verification, the candidate instances that violate the rules are identified. For example, if the constraint rule subset stipulates that "technical parameter entities are only located in the 'technical requirements' chapter", and the candidate annotation results annotate "compressive strength" as "B-PARAM" and the text is located in the "terms and definitions" chapter, then the bidirectional comparison identifies the annotation as a violation instance, providing a clear object for subsequent verification.

[0055] A comprehensive confidence score is obtained for each repaired region. Each repaired region corresponds to a unique comprehensive confidence score. For example, the comprehensive confidence score of the "Terms and Definitions" section after repair is 0.92, and the score of its corresponding repaired region is also 0.92; the comprehensive confidence score of the text area near the blurred chart after repair is 0.65, and the score of the corresponding area is also 0.65. Through the comprehensive confidence score, downstream semantic verification can be correlated with the upstream repair quality. The comprehensive confidence score is used as a negative correlation factor to calculate the tolerance value of each candidate instance. The tolerance value is used to characterize the degree of allowable deviation for that instance during verification. If the candidate instance is located in a high-reliability region with an extremely high comprehensive confidence score, the tolerance value is extremely low, meaning that the deviation of that instance must be strictly controlled during verification. If the candidate instance is located in a low-reliability region, the tolerance is higher, and the requirements for deviation can be appropriately relaxed during verification. Through this negative correlation calculation logic, the tolerance value can reflect the quality characteristics of the repaired region, making the verification standards for high-reliability regions more stringent and the verification standards for low-reliability regions more suitable for their current repair status, avoiding a one-size-fits-all verification bias.

[0056] Online correction or rejection operations are performed on candidate instances based on the tolerance value. When the tolerance value is low, a strict verification strategy is adopted. If a candidate instance violates the rigid constraints in the constraint rule subset, the candidate label is directly rejected, the probability of the corresponding entity label is reset to 0, and the semantic analysis model is forced to regenerate a labeling result that conforms to the rules. If the violation is a flexible constraint, the labeling position is corrected or semantic feature verification is supplemented based on the context requirements in the constraint rule subset. When the tolerance value is high, a lenient verification strategy is adopted. Only candidate instances that violate rigid constraints and have a semantic similarity of less than 0.5 are rejected. Instances that violate flexible constraints are not corrected for the time being, but are only marked as "pending review" and associated with the repair history of the area (such as the original OCR error and the number of iterations for repair). These will be manually confirmed in the subsequent human-machine collaboration stage to avoid misjudgment due to low area repair quality.

[0057] like Figure 2 As shown, the present invention also provides an intelligent annotation system that integrates OCR text optimization and GB standard paradigm, including: The data parsing module is used to extract text content and layout information through OCR parsing. The alignment optimization module is used to perform multi-round iterative alignment between the layout information and the pre-built GB standard knowledge ontology model. Through comparison and feedback mechanisms, it identifies and corrects structural errors in the text content and generates an optimized text sequence. The GB standard knowledge ontology model includes the structured constraint rules of GB standard documents, document structure paradigms, and type attributes of each structural node. The intelligent analysis module is used to input the optimized text sequence into the semantic analysis model, and to perform entity and relation recognition and generate semantic annotations by integrating the structured constraint rules in the GB standard knowledge ontology model with the internal decision logic of the semantic analysis model.

[0058] The alignment optimization module includes: The data prediction unit is used to obtain the document structure paradigm according to the GB standard knowledge ontology model, match the layout information with the document structure paradigm in the GB standard knowledge ontology model, and generate document macro structure prediction data based on the matching results. The identification unit is used to identify structural conflict areas in the text content that conflict with the document structure paradigm based on the document macrostructure prediction data; The iterative repair unit is used to obtain contextual semantic clues related to the structural conflict region from the GB standard knowledge ontology model, and to use the contextual semantic clues to perform targeted re-identification and semantic disambiguation of the structural conflict region to obtain the repaired region. The verification unit is used to calculate the comprehensive confidence score of the repaired region, and verify whether the content of the repaired region passes the verification based on the comprehensive confidence score; if it fails, the reason for failure is obtained, and the unit returns to the step of obtaining the contextual semantic clues related to the structural conflict region from the GB standard knowledge ontology model based on the reason for failure, and iterates until the verification passes. The integration unit is used to integrate all verified text content to form an optimized text sequence.

[0059] The present invention also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement a step of an intelligent annotation method that integrates OCR text optimization and GB standard paradigm.

[0060] The present invention also provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of an intelligent annotation method that integrates OCR text optimization and GB standard paradigm.

[0061] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, apparatus, article, or method that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, apparatus, article, or method. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, apparatus, article, or method that includes that element.

[0062] The above description is merely a preferred embodiment of the present invention and does not limit the patent scope of the present invention. Any equivalent structural or procedural transformations made based on the content of the present invention's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of the present invention.

Claims

1. An intelligent annotation method integrating OCR text optimization and GB standard paradigm, characterized in that, include: Obtain text content and layout information through OCR parsing; The layout information is iteratively aligned with a pre-built GB standard knowledge ontology model in multiple rounds. Structural errors in the text content are identified and corrected through comparison and feedback mechanisms to generate an optimized text sequence. The GB standard knowledge ontology model includes the structured constraint rules of GB standard documents, document structure paradigms, and type attributes of each structural node. The optimized text sequence is input into the semantic analysis model. By integrating the structured constraint rules in the GB standard knowledge ontology model with the internal decision logic of the semantic analysis model, entity and relation recognition is performed to generate semantic annotations.

2. The intelligent annotation method integrating OCR text optimization and GB standard paradigm as described in claim 1, characterized in that, The steps of performing multi-round iterative alignment of the layout information with the pre-constructed GB standard knowledge ontology model, identifying and correcting structural errors in the text content through comparison and feedback mechanisms, and generating an optimized text sequence include: The document structure paradigm is obtained according to the GB standard knowledge ontology model, the layout information is matched with the document structure paradigm in the GB standard knowledge ontology model, and the document macro structure prediction data is generated based on the matching results. Based on the document macrostructure prediction data, structural conflict areas in the text content that conflict with the document structure paradigm are identified; Contextual semantic clues related to the structural conflict region are obtained from the GB standard knowledge ontology model, and the contextual semantic clues are used to perform targeted re-identification and semantic disambiguation of the structural conflict region to obtain the repair region. Calculate the overall confidence score of the repaired area, and verify whether the content of the repaired area passes the test based on the overall confidence score; If it fails, the reason for failure is obtained, and based on the reason for failure, the process returns to the step of obtaining contextual semantic clues related to the structural conflict area from the GB standard knowledge ontology model, and the process is repeated until the verification passes. Integrate all verified text content to form an optimized text sequence.

3. The intelligent annotation method integrating OCR text optimization and GB standard paradigm as described in claim 2, characterized in that, The steps of obtaining contextual semantic clues related to the structural conflict region from the GB standard knowledge ontology model, and using the contextual semantic clues to perform targeted re-identification and semantic disambiguation of the structural conflict region to obtain the repair region include: Based on the physical location data of the structural conflict region and the text content of the structural conflict region, the corresponding target structural node is obtained from the GB standard knowledge ontology model; Obtain the type attributes of the target structural node, call the structured constraint rules corresponding to the target structural node in the GB standard knowledge ontology model according to the type attributes of the target structural node, count the frequency of violation of each type of structured constraint rule in the currently processed text content fragment, and generate a rule conflict spectrum; Based on the rule-based conflict spectrum, obtain the dominant conflict type and systematic deviation data; Obtain the currently processed text content fragment, extract the non-text element density, layout irregularity, and domain term density from the currently processed text content fragment, generate a document complexity vector based on the non-text element density, layout irregularity, and domain term density, and obtain the repair difficulty value of the structural conflict area based on the document complexity vector. The historical repair case library is queried, and a set of similar historical cases is obtained by using the type attribute of the target structural node, the dominant conflict type, and the document complexity vector as composite search conditions. Successful cases are selected from the historical case set, the contextual semantic clues of the successful cases are extracted, and contextual semantic clue templates for the structural conflict areas are generated and calibrated by combining the systematic deviation data and the repair difficulty value. The calibrated contextual semantic cue template guides a pre-defined multimodal understanding model to perform targeted re-identification and semantic disambiguation of the structural conflict region, thereby obtaining the repaired region.

4. The intelligent annotation method integrating OCR text optimization and GB standard paradigm as described in claim 3, characterized in that, The step of calculating the overall confidence score of the repaired region and verifying whether the content of the repaired region passes the test based on the overall confidence score includes: A comprehensive confidence score is calculated based on the confidence level, the rigid constraint compliance, and the flexible constraint compliance. The iteration termination threshold is dynamically set and adjusted based on the dominant conflict type. Determine whether the overall confidence score is greater than the iteration termination threshold; If the value is greater than the value, the verification result of the repaired area is determined to be passed. If the result is not greater than the value, the verification result of the repaired area is determined to be unsuccessful. Based on the composition of the comprehensive confidence score, a set of features for reasons for failure is obtained. Based on the set of features for reasons for failure, the process returns to the step of obtaining contextual semantic clues related to the structural conflict area from the GB standard knowledge ontology model to extract reinforcement clues. The reinforcement clues are used to perform targeted re-identification and semantic disambiguation of the structural conflict area. The process is iteratively executed until the verification is successful.

5. The intelligent annotation method integrating OCR text optimization and GB standard paradigm as described in claim 4, characterized in that, The steps of inputting the optimized text sequence into the semantic analysis model, and performing entity and relation recognition to generate semantic annotations by fusing the structured constraint rules in the GB standard knowledge ontology model with the internal decision logic of the semantic analysis model, include: A subset of constraint rules is generated from the structured constraint rules, the subset of constraint rules including context constraints that define the legal context of an entity and entity relationship constraints; During the reasoning process of the semantic analysis model, a constraint satisfaction layer is constructed, and the candidate annotation results output by the semantic analysis model are captured in real time through the constraint satisfaction layer. By applying the constraint rule subset through the constraint satisfaction layer, online correction or rejection operations are performed on the candidate annotation results that violate the constraint rule subset; The candidate annotation results after online correction or rejection are used as entity and relation recognition results, and the entity and relation recognition results are output to form the semantic annotation.

6. The intelligent annotation method integrating OCR text optimization and GB standard paradigm as described in claim 5, characterized in that, The step of applying the constraint rule subset through the constraint satisfaction layer to perform online correction or rejection operations on the candidate annotation results that violate the constraint rule subset includes: The candidate annotation results are scanned through the constraint satisfaction layer to identify all candidate instances that violate the subset of constraint rules. Obtain the overall confidence score for each of the repaired regions; The overall confidence score is used as a negative correlation factor to calculate the tolerance value for each candidate instance; Based on the tolerance value, perform online correction or rejection operations on the candidate instances.

7. An intelligent annotation system integrating OCR text optimization and GB standard paradigm, characterized in that, It includes multiple modules for implementing the steps of the method according to any one of claims 1 to 6.

8. The intelligent annotation system integrating OCR text optimization and GB standard paradigm as described in claim 7, characterized in that, The module includes multiple units, which are used to implement the steps of the method according to any one of claims 1 to 6.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 6.

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 6.