Interactive size model collaborative public service complex document parsing method and device

CN121415423BActive Publication Date: 2026-10-30INSPUR SOFTWARE CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202511517816.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-10-23
Publication Date
2026-10-30
Estimated Expiration
2045-10-23

AI Technical Summary

Technical Problem

[0003]1.多栏与复杂排版解析受限

Benefits of technology

[0132](1)本发明承担高效的局部任务(方向分类、几何矫正、区域检测、OCR识别),保证处理的轻量化与实时性;负责全局语义推理、逻辑编排和跨模态语义关联,保证复杂文档解析的完整性与语义一致性;通过反馈执行与调度控制模块建立交互回路:大模型发现低置信度或逻辑冲突→下发指令→小模型执行局部修正→更新结果再反馈给大模型。该机制实现了传统方法难以覆盖的动态协同优化。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121415423B_ABST
    Figure CN121415423B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of artificial intelligence document analysis and processing, and specifically provides an interactive large-small model cooperative public service complex document analysis method and device, which has the following steps: S1, converting an original document image into a standardized input required for structured processing; S2, dividing the standardized document image into logical regions to form an input for subsequent OCR recognition and semantic reasoning; S3, converting the regional image blocks into texts and providing a confidence index for each text segment; S4, driving a large model, integrating OCR results and layout structures, and restoring the reading order and logical structure of the document; S5, triggering local correction when low confidence or logical conflicts are found; S6, consistency checking; S7, scheduling control; S8, a large-small model interaction mechanism; and S9, structured output. Compared with the prior art, the application can realize high-precision analysis and semantic consistency reconstruction of complex documents while ensuring efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of artificial intelligence document parsing and processing technology, specifically providing a method and apparatus for parsing complex public service documents using interactive size model collaboration. Background Technology

[0002] With the increasing demand for document digitization in fields such as finance, law, and scientific research, traditional OCR (Optical Character Recognition) and layout analysis tools can already perform basic character detection and text recognition. However, when processing documents containing multimodal elements and complex layouts, existing technologies still have significant shortcomings:

[0003] 1. Limited parsing of multi-column and complex layouts.

[0004] Existing methods are mostly based on line-by-line scanning or simple page division, which makes it difficult to correctly handle complex layouts such as two-column and three-column layouts. As a result, problems such as disordered column order and broken paragraph logic often occur, making it impossible to restore the semantic coherence of the document.

[0005] 2. Missing document hierarchy

[0006] While there are methods that can identify elements such as headings, body text, and footnotes, most of them only remain at the level of flat text blocks, lacking modeling of the logical relationships between different levels, making it difficult to generate a hierarchical structure consistent with the original document.

[0007] 3. Insufficient analysis of multimodal elements

[0008] Parsing non-pure text information such as multi-page tables, embedded charts, seals, and formulas is generally limited. It can often only extract the location or partial content, and cannot achieve consistent alignment and semantic association with the context, resulting in the loss of key information.

[0009] 4. Lack of consistency between reading order and semantics.

[0010] The text blocks output by OCR lack a unified reading order model, resulting in the inability to integrate multimodal elements and text into a complete semantic sequence, which affects subsequent retrieval and data analysis.

[0011] 5. Large models are inefficient when used alone.

[0012] Although large language models have demonstrated outstanding performance in document semantic understanding in recent years, their inference overhead and computational resource consumption make them unsuitable for direct page-by-page parsing of large-scale documents. Furthermore, relying solely on large models lacks integration with page layout structure, often resulting in parsing results that lack physical layout constraints.

[0013] In addition, several published patents have attempted to solve the problem of parsing complex documents. For example:

[0014] Publication number CN120340055A proposes a document processing method based on a multimodal large model, which extracts text through OCR and combines it with the large model to generate a summary, but the result is limited to a page-by-page summary and fails to restore the complete hierarchical structure of the document.

[0015] Publication number CN119623650A describes a multimodal document processing scheme based on a large model intelligent agent. The large model is responsible for parsing input instructions and calling small model tools such as OCR and table parsing, but it is mainly used for verification tasks and lacks the ability to restore the overall structure of the document.

[0016] In summary, existing technologies still have shortcomings in areas such as complex layout adaptation, multimodal information fusion, reading order modeling, hierarchical structure restoration, and efficiency control. There is an urgent need for a collaborative method that combines the advantages of lightweight models and large semantic models to achieve high-precision parsing and semantic consistency reconstruction of complex documents while ensuring efficiency. Summary of the Invention

[0017] This invention addresses the shortcomings of the prior art by providing a highly practical method for parsing complex documents in interactive, size-based collaborative public services.

[0018] A further technical objective of this invention is to provide a reasonably designed, safe, and applicable interactive size model collaborative public service complex document parsing device.

[0019] The technical solution adopted by this invention to solve its technical problem is:

[0020] An interactive, size-model-based collaborative method for parsing complex public service documents comprises the following steps:

[0021] S1. Convert the original document image into standardized input required for structured processing;

[0022] S2. Divide the standardized document image into logical regions to form the input for subsequent OCR recognition and semantic reasoning;

[0023] S3. Convert the region image patch into text and provide a confidence index for each text fragment;

[0024] S4. Driven by a large model, integrate OCR results and layout structure to restore the reading order and logical structure of the document;

[0025] S5. Trigger local correction when low confidence or logical conflict is detected;

[0026] S6, Consistency check;

[0027] S7, Dispatch Control;

[0028] S8, interaction mechanism between large and small models;

[0029] S9, Structured Output.

[0030] Furthermore, step S1 includes:

[0031] S1-1. The lightweight convolutional network LCNet is used to automatically identify the orientation of the input document image. When the confidence of the recognition result is greater than or equal to the threshold T1, the orientation is directly used as the correction basis. If the confidence is less than T1, a secondary detection mechanism is triggered. The secondary detection mechanism includes rotating and enhancing the image to generate four candidate orientations, and then reclassifying and voting them through LCNet.

[0032] If the threshold still cannot be reached, it is marked as "direction uncertain" and will be subject to subsequent OCR confidence combined with semantic features for auxiliary determination;

[0033] S1-2. Introduce the UVDoc model, which automatically detects the document's four boundaries and key lines through deep learning and outputs the correction transformation matrix.

[0034] S1-3, Noise Removal;

[0035] Convolutional filtering for noise reduction: eliminates high-frequency noise.

[0036] Adaptive threshold segmentation: distinguishes between text and background areas, and removes light-colored background patterns;

[0037] If "suspected text region loss" is detected after noise removal, the threshold is lowered and the process is repeated;

[0038] S1-4. Enhanced algorithms improve overall readability:

[0039] Adjust the brightness and contrast to balance the dark and bright areas;

[0040] Improve image sharpness to make text edges clearer;

[0041] In low-resolution scanned documents, a super-resolution reconstruction method is used.

[0042] Furthermore, step S2 includes:

[0043] S2-1, Analysis of Two-Column and Multi-Column Structures;

[0044] First, generate a set of candidate vertical dividing lines, combine projection analysis to determine the column position, use a detection network for further correction, and generate the area boxes for the left and right columns.

[0045] If the confidence level of the dividing line is less than the threshold T2, the system will perform a second detection or rely on subsequent large model semantic reasoning to assist in the judgment.

[0046] S2-2, Page layout inspection;

[0047] The DocLayout YOLO algorithm is used to detect titles, body text, footers, tables, images, seals, and formula areas; for objects with large size differences, a multi-scale detection strategy is adopted.

[0048] If two candidate regions overlap significantly, the system will perform non-maximum suppression to retain the region with higher confidence.

[0049] S2-3. Based on the detected areas, the system assigns hierarchical labels to each area:

[0050] Titles are usually located at the top of the page or the beginning of a paragraph and are assigned to a higher level.

[0051] Body paragraphs inherit from their parent headings;

[0052] Appendix and footnotes serve as lower-level additional nodes;

[0053] This ultimately forms a region tree structure, which serves as the input for the large model.

[0054] S2-4, Seal Inspection;

[0055] Embed the YOLOv8 model in the layout inspection and output the bounding box of the stamp position as the basis for OCR preprocessing;

[0056] S2-5, Dynamic layout recognition;

[0057] Trained on a multi-template document dataset, the detector is able to recognize layouts of different styles;

[0058] If irregular layout is detected, the system will output a "compound region" label, which will be handed over to the subsequent large model for processing.

[0059] Furthermore, step S3 includes:

[0060] S3-1. Use appropriate OCR models for different regions;

[0061] Body and Title: General OCR model for recognizing continuous text;

[0062] Table cells: Structured OCR outputs text with cell position information;

[0063] Formula: Formula OCR, supports mathematical symbol recognition;

[0064] If the recognition result contains large areas of blank space or garbled characters, the system will mark the area as an "abnormal area" and hand it over to the feedback module for reprocessing;

[0065] S3-2. Each OCR output generates a confidence score to measure the reliability of recognition.

[0066] When the confidence level is greater than or equal to the threshold T3, output directly;

[0067] When the confidence level is less than T3, it is marked as "low confidence level", triggering the fixed-point correction of the feedback execution module;

[0068] S3-3, Seal Text Recognition;

[0069] First, CycleGAN is used to remove the seal background and complex background, and then the TroOCR model is used to recognize the text content. The output results include the seal text, recognition confidence, and seal boundary.

[0070] Furthermore, step S4 includes:

[0071] S4-1. Utilize the Transformer large model, combined with regional location and text context, to restore the reading order;

[0072] In two-column documents, the system automatically determines whether the left column should be read before the right column; in multi-page documents, it determines the continuity of the main text.

[0073] If the confidence difference between the two candidate orders is less than δ, then the consistency verification module will confirm it.

[0074] S4-2. Based on large-scale model semantic understanding, identify the logical relationship between the title and the body text;

[0075] S4-3. Establish semantic links between different types of content by leveraging the cross-modal reasoning capabilities of large models;

[0076] S4-4. Integrate the sorting, hierarchical, and semantic association results to output a preliminary document structure tree;

[0077] Step S5 includes:

[0078] S5-1. When generating the structure tree, the semantic reasoning and orchestration module will issue a correction instruction if it finds low-confidence text or hierarchical conflicts.

[0079] The instruction types include re-OCR, re-region segmentation, and geometric correction; the instruction format is JSON.

[0080] S5-2, The small model performs local processing on the target region according to the instructions:

[0081] Re-OCR the specified area using a high-precision but low-speed model;

[0082] If the detection fails, rerun DocLayout YOLO to detect only the target area;

[0083] When the area distortion is severe, UVDoc re-correction is triggered;

[0084] If the re-identification result is still below the threshold, then return to the "manual review" flag;

[0085] S5-3. The correction results are directly fed back to the semantic reasoning module to update the corresponding tree structure nodes.

[0086] Furthermore, step S6 includes:

[0087] S6-1. Check if the heading levels are continuous and if the numbering is reasonable;

[0088] S6-2. When the main text mentions Table X, the structure tree must contain a table node numbered X, the seal node text must contain the signing unit of the main text, and when the main text mentions a formula, the formula area must contain a corresponding number.

[0089] S6-3. Output consistency score. If the score is lower than the threshold T4, trigger the scheduling control module to perform re-optimization.

[0090] Define the scoring formula and trigger threshold. The consistency score S is defined as a weighted average of multiple sub-indicators:

[0091] S=α·S logic +β·S cross +γ·S ocr ;

[0092] Wherein: S logic Logical consistency score; S cross Cross-modal consistency score; S ocr : OCR confidence score normalized score; weights α, β, γ are configurable;

[0093] When S≥T accept At this point, the structured output stage begins;

[0094] When T warn ≤S <T accept At that time, a feedback iteration is triggered;

[0095] When S <T warn At that time, multiple rounds of feedback are initiated, and manual review is marked when necessary.

[0096] Furthermore, step S7 includes:

[0097] S7-1, The scheduling control module calls the score result S generated by the consistency verification module and makes a judgment according to the hierarchical threshold rules:

[0098] When S≥T accept At that time, the results were considered to have reached an acceptable level;

[0099] When T warn ≤S <Taccept At that time, the result was in the questionable range and required further correction;

[0100] When S <T warn At this point, the results are clearly unreliable and feedback correction must be triggered;

[0101] The scheduling control module also introduces computing power and latency budgeting, defining a cost function C as a constraint on resource dimensions:

[0102]

[0103] Where: t iter : Cumulative delay of the current iteration; T max Maximum allowable delay; r use Current computing resource usage; R max : Maximum available computing power threshold; ω lat ,ω res Weighting coefficients are used to adjust the balance between latency and computing power constraints.

[0104] S7-2. The scheduler makes a joint decision based on the score S and the cost function C during each iteration:

[0105] When S≥T accept When C < 1.0, proceed directly to the output stage;

[0106] When S <T accept Furthermore, if C < 1.0, iterative feedback is allowed to continue;

[0107] When C > 1.0, the process will be forcibly terminated even if the score does not reach the threshold, and the current best result will be output.

[0108] When the number of iterations is ≥ N max If the results do not converge, output the last result;

[0109] S7-3. Based on the above evaluation and rule constraints, the scheduler performs the following operations:

[0110] If the score is insufficient and the budget allows, a re-optimization instruction is issued to the semantic reasoning and orchestration module, and the feedback execution module is called to perform targeted corrections.

[0111] If the budget is exceeded or the returns are insufficient, stop the iteration and output the current result;

[0112] When the score meets the requirements or the budget is exhausted, the system proceeds to the structured output module to generate the final document structure tree.

[0113] Furthermore, step S8 includes:

[0114] S8-1. When the large model detects the following situations during the inference process of the document structure tree, an interactive command will be triggered:

[0115] (1) The confidence level of OCR recognition is lower than the preset threshold;

[0116] (2) The heading levels are not continuous or jump around;

[0117] (3) The table numbering is inconsistent with the reference in the text;

[0118] (4) The seal was not correctly associated with the signature paragraph in the main text;

[0119] S8-2. During the collaboration between large and small models, scheduling and feedback are accomplished through a unified JSON command protocol;

[0120] S8-3, Interaction Flow:

[0121] (1) The scheduling and control module generates and issues interactive instructions;

[0122] (2) The feedback execution module calls the small model to perform local corrections;

[0123] (3) The corrected results are returned to the large model, which updates the document structure tree and recalculates the confidence and consistency scores.

[0124] (4) If there is still a conflict or low confidence, the large model will trigger the interaction again to form a multi-round closed loop.

[0125] Furthermore, step S9 includes:

[0126] S9-1. Output the document structure tree, including node types and node attributes;

[0127] S9-2. Structured output results are used for knowledge graph construction, document retrieval, and automatic contract review.

[0128] An interactive and collaborative public service complex document parsing device, comprising: at least one memory and at least one processor;

[0129] The at least one memory is used to store a machine-readable program;

[0130] The at least one processor is configured to invoke the machine-readable program to execute an interactive, size-model-coordinated method for parsing complex public service documents.

[0131] Compared with existing technologies, the interactive size model collaborative method and apparatus for parsing complex public service documents of the present invention have the following outstanding advantages:

[0132] (1) This invention undertakes efficient local tasks (directional classification, geometric correction, region detection, OCR recognition), ensuring lightweight and real-time processing; it is responsible for global semantic reasoning, logical arrangement, and cross-modal semantic association, ensuring the integrity and semantic consistency of complex document parsing; and it establishes an interactive loop through a feedback execution and scheduling control module: the large model discovers low confidence or logical conflicts → issues instructions → the small model performs local corrections → updates the results and feeds them back to the large model. This mechanism achieves dynamic collaborative optimization that is difficult to cover with traditional methods.

[0133] (2) It supports the parsing of two-column and multi-column layouts and can restore the correct reading order; it supports the detection and recognition of multimodal elements such as tables, images, formulas, and seals, and establishes cross-modal semantic links through a large model. Compared with the existing technology, which can only recognize a single element, this invention can realize multimodal integrated parsing and ensure the restoration of the overall document structure.

[0134] (3) The system introduces a consistency verification module to verify the title hierarchy, numbering order, and cross-modal reference relationship; combined with the scheduling control module, it realizes automated iterative optimization under computing power / latency constraints, avoiding the direct output of erroneous results; and improves the robustness and credibility of the results without the need for manual intervention.

[0135] (4) Modular design with clear input and output, which can be seamlessly integrated with existing OCR systems, knowledge graph systems and government document management systems; the embodiments verify the applicability of the present invention in three typical scenarios: official documents, financial reports and contract documents: it can ensure recognition accuracy and meet the resource constraints in practical applications; compared with a single large model solution, the present invention significantly reduces the computing cost and improves the feasibility of deployment while maintaining high accuracy.

[0136] In summary, this invention not only overcomes the shortcomings of existing technologies in complex typesetting, multimodal fusion, and semantic consistency, but also achieves a complex document parsing method that balances efficiency, accuracy, and practicality through model interaction and collaboration, demonstrating significant innovation and application value. Attached Figure Description

[0137] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0138] Figure 1 This is a flowchart illustrating a collaborative, interactive, size-model-based method for parsing complex public service documents.

[0139] Figure 2 This is a schematic diagram of the framework for an interactive, size-model-based collaborative method for parsing complex public service documents. Detailed Implementation

[0140] To enable those skilled in the art to better understand the present invention, the present invention will be further described in detail below with reference to specific embodiments. Obviously, the described embodiments are merely some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0141] The following is a preferred embodiment:

[0142] Example 1:

[0143] like Figure 1-2 As shown, the interactive size model collaborative method for parsing complex public service documents in this embodiment has the following steps:

[0144] S1. Document preprocessing (small model);

[0145] The document preprocessing module is the entry point for the entire system. Its main task is to convert the raw document images into standardized input required for structured processing. Since the input documents may originate from scanned copies, photographs, or exported image files, their quality varies greatly. Common problems include incorrect shooting angles, uneven lighting, noise interference, and image blurring. Insufficient preprocessing will severely impact the performance of layout detection, OCR recognition, and large-scale model inference.

[0146] Input: Original document images, including photos of paper documents, scanned copies of contracts, and screenshots of PDFs generated by government systems.

[0147] Output: Standardized image data with correct orientation, regular geometric shape, clean background, and clear text, which can be directly used by the layout inspection module.

[0148] Specifically, it includes:

[0149] S1-1. A lightweight convolutional network, LCNet, is used to automatically identify the orientation of the input document image. LCNet can distinguish four common orientations: 0°, 90°, 180°, and 270° by extracting the overall edge features of the document and the text distribution pattern. When the confidence level of the recognition result is greater than or equal to the threshold T1 (e.g., 0.8), the orientation is directly used as the correction basis; if the confidence level is less than T1, a secondary detection mechanism is triggered.

[0150] The secondary detection mechanism includes: rotating the image to enhance it, generating four candidate directions, and then reclassifying and voting using LCNet.

[0151] If the threshold still cannot be reached, it is marked as "direction uncertain" and will be subject to subsequent OCR confidence combined with semantic features for auxiliary determination.

[0152] Example scenario: In batches of scanned archival materials, some pages are often upside down. This step can automatically correct this, preventing subsequent OCR from recognizing the text as garbled characters.

[0153] S1-2. Input images may have issues such as tilt, perspective distortion (caused by photography), or even warping due to bookbinding. To address this, this module introduces the UVDoc model, which automatically detects the document's boundaries and key lines using deep learning and outputs a correction transformation matrix. The correction process includes:

[0154] Boundary detection: Locate document edges and identify cropping boxes;

[0155] Perspective transformation: performing affine or perspective correction based on the position of corner points;

[0156] Curvature correction: For documents with curved surfaces, the image is restored by restoring the grid deformation using the curvature field learned by the UVDoc network.

[0157] Example scenario: In contract documents photographed with a mobile phone, the phenomenon of "trapezoidal perspective" is common. This step can restore the document to a standard rectangle, ensuring that table cells and text rows remain horizontally aligned.

[0158] S1-3, Noise Removal;

[0159] Many scanned documents contain background watermarks, blemishes, handwritten marks, etc., which can interfere with OCR. This step combines two methods:

[0160] Convolutional filtering for noise reduction: eliminates high-frequency noise while preserving text edges;

[0161] Adaptive threshold segmentation: distinguishes between text and background areas, and removes light-colored background patterns.

[0162] If a "suspected text region loss" is detected after noise removal, the threshold is lowered and the process is repeated to ensure that real characters are not mistakenly deleted.

[0163] Example scenario: In government documents, the "sending and receiving stamps" are often superimposed on the main text. The noise reduction module can weaken the background noise while retaining the edge information of the stamps for subsequent recognition.

[0164] S1-4, Image Enhancement;

[0165] In the final step of preprocessing, overall readability is improved through algorithm enhancement:

[0166] Adjust the brightness and contrast to balance the dark and bright areas;

[0167] Improve image sharpness to make text edges clearer;

[0168] In low-resolution scans, super-resolution reconstruction methods are used to improve detail resolution.

[0169] Simultaneously, image quality metrics (such as PSNR or sharpness score) are generated as a reference for subsequent confidence assessment.

[0170] Example scenario: In scanned old documents, the strokes of the text are blurry. Enhancing the reading quality can significantly improve readability and increase the OCR recognition rate.

[0171] S2, Page Layout Detection and Region Division (Small Model);

[0172] Standardized document images are divided into logical regions to form the input for subsequent OCR recognition and semantic reasoning;

[0173] Input: A pre-processed, standardized document image;

[0174] Output: A collection of regions with bounding boxes, category labels, and hierarchical information.

[0175] Specifically, it includes:

[0176] S2-1, Analysis of Two-Column and Multi-Column Structures;

[0177] Many official documents and academic papers use two-column or multi-column layouts, which can easily disrupt the reading order when traditional OCR reads them line by line. This step uses a layout detection model to identify the dividing lines between columns:

[0178] First, a set of candidate vertical dividing lines is generated, and the column positions are determined by combining projection analysis; then, a detection network is used for further correction to generate the area boxes for the left and right columns.

[0179] If the confidence level of the dividing line is less than the threshold T2 (e.g., 0.85), the system will perform a second detection or rely on subsequent large model semantic reasoning for assistance in the judgment.

[0180] Example: In two-column academic journals, this step can distinguish between paragraphs in the left and right columns, preventing the text in the right column from being incorrectly appended to the left column.

[0181] S2-2, Page layout inspection;

[0182] The DocLayout YOLO algorithm is used to detect areas such as titles, body text, footers, tables, images, seals, and formulas.

[0183] Each candidate box contains a category label (e.g., “table”), location coordinates (x, y, w, h), and confidence score;

[0184] For objects with significant size differences (such as large tables and small formulas), a multi-scale detection strategy is adopted.

[0185] If two candidate regions severely overlap, the system will perform non-maximum suppression to retain the region with higher confidence.

[0186] In annual reports, this step can identify the main text, footer page numbers, and illustration areas, avoiding the misidentification of page numbers as main text content.

[0187] S2-3, Region segmentation and hierarchical labeling;

[0188] Based on the detected regions, the system assigns hierarchical labels to each region:

[0189] Titles are usually located at the top of the page or the beginning of a paragraph and are assigned to a higher level.

[0190] Body paragraphs inherit from their parent headings;

[0191] Appendix and footnote are added as lower-level nodes.

[0192] The final result is a region tree structure, which serves as the input for the large model.

[0193] Example: In the approval document, the title "Notice Regarding ×× Matters" is marked as the root node, the body text is a child node, and the attachments are additional child nodes.

[0194] S2-4, Seal Inspection;

[0195] Embedding a YOLOv8 model in page layout inspection:

[0196] Output the bounding box of the stamp position, including categories such as circle, ellipse, and square; identify the stamp color (red / blue) as the basis for OCR preprocessing.

[0197] Example: In a scanned contract, the system can accurately locate the seal across the seam and output its red circular seal category.

[0198] S2-5, Dynamic layout recognition;

[0199] By training on a multi-template document dataset, the detector is able to recognize different style layouts.

[0200] If irregular layout is detected (such as a horizontal table spanning two columns), the system will output a "compound area" label, which will be handed over to the subsequent large model for processing.

[0201] Example: In financial reports, the system can identify areas containing tables that span multiple pages and maintain overall table consistency.

[0202] S3. OCR Recognition and Confidence Generation (Small Model):

[0203] This module converts regional image blocks into text, and provides a confidence index for each text segment to ensure the reliability of subsequent reasoning.

[0204] Input: Regional image blocks (body text, table cells, seals, etc.); Output: Text segment + coordinate position + confidence.

[0205] It includes the following steps:

[0206] S3-1. Regional OCR Recognition;

[0207] Use adapted OCR models for different regions:

[0208] Body text and titles: General OCR model, for recognizing continuous text;

[0209] Table cells: Structured OCR, outputting text with cell position information;

[0210] Formulas: Formula OCR, supporting mathematical symbol recognition.

[0211] If there is a large area of blank or garbled characters in the recognition result, the system will mark the region as "abnormal region" and send it to the feedback module for reprocessing.

[0212] Example: In a statistical bulletin, "GDP (100 million yuan)" in a table cell will be accurately recognized with the cell position attached.

[0213] S3-2. Confidence Generation;

[0214] A confidence score is generated for each OCR output result to measure the recognition reliability.

[0215] When the confidence level is greater than or equal to the threshold T3 (e.g., 0.7), output directly;

[0216] When the confidence level is less than T3, mark it as "low confidence" and trigger the fixed-point correction of the feedback execution module.

[0217] Example: The font of a scanned document is blurred, OCR recognizes "official letter" as "official huan" with a confidence level of only 0.4, and this region will be marked and re-recognized.

[0218] S3-3. Seal Text Recognition;

[0219] Seal text recognition is an extended function of this module:

[0220] First, CycleGAN is used to remove the seal's background and complex textures. Then, a TroOCR model is used to recognize the text content. The output includes the seal text, recognition confidence score, and seal boundaries.

[0221] Example: The system can identify "×× City" in the red circular official seal with a confidence level of 0.92.

[0222] S4, Semantic Reasoning and Arrangement (Large Model);

[0223] Driven by a large model, it integrates OCR results and layout structure to restore the reading order and logical structure of the document.

[0224] Input: OCR text, region coordinates, confidence level;

[0225] Output: Preliminary document structure tree (node ​​content, hierarchical relationship, semantic links).

[0226] The specific steps are as follows:

[0227] S4-1, Inferring the reading order;

[0228] By using a large Transformer model, combined with region location and text context, the reading order can be restored:

[0229] In a two-column document, the system automatically determines that the left column should be read first, followed by the right column.

[0230] In multi-page documents, determine the continuity of the main text to avoid mistakenly including the footer in the main text.

[0231] If the confidence difference between the two candidate orders is less than δ (e.g., 0.05), then the consistency verification module will confirm it.

[0232] Example: In a two-column government affairs report, the "Background Introduction" paragraph can be correctly joined together without being confused with the "Attachment Description" in the right column.

[0233] S4-2, Generation of Hierarchical Structures;

[0234] Based on large-scale model semantic understanding, the logical relationship between the title and the body text is identified:

[0235] A hierarchical structure of title → body text → footnotes / appendices;

[0236] Heading levels are determined based on font size, position, and semantic features.

[0237] Example: In the official document "Notification Regarding ×× Matters", the system can identify the relationship between the main title, the main text, and "Attachment 1".

[0238] S4-3, Cross-modal semantic association;

[0239] Through the cross-modal reasoning capabilities of large models, semantic links are established for different types of content, including:

[0240] Tables and explanatory text;

[0241] Images and titles;

[0242] Seal and signature at the end of the text;

[0243] Formula and context explanation.

[0244] Example: In the contract document, the correspondence between "Table 1: Payment Schedule" and the text "Party B shall pay in accordance with Table 1" can be identified.

[0245] S4-4, Initial structure tree generation;

[0246] The sorting, hierarchy, and semantic association results are integrated to output a preliminary document structure tree.

[0247] Each node contains: text content, boundary coordinates, category, confidence level, and related information.

[0248] The output format can be JSON / XML, which can be used by the consistency verification module.

[0249] Example: In a government annual report, the generated structure tree nodes include "Title: 2023 Statistical Report", "Text Paragraphs", "Table Nodes", and "Seal Nodes", and have cross-modal association information.

[0250] S5, Feedback Execution (small model is the main component, large model participates in instruction generation);

[0251] This module is responsible for triggering local corrections when low confidence or logical conflicts are detected, thereby improving the robustness of the overall document parsing.

[0252] Input: low-confidence text blocks, inconsistency area hints, correction instructions;

[0253] Output: Updated local OCR results, corrected region segmentation or layout information.

[0254] Specifically, it includes:

[0255] S5-1, Command Reception;

[0256] When generating the structure tree, the semantic reasoning and orchestration module will issue a correction instruction if it finds low-confidence text (such as OCR confidence < 0.7) or hierarchical conflicts (such as heading level jumps).

[0257] Instruction types: Re-OCR, Re-region segmentation, Geometric correction;

[0258] Instruction format: JSON, such as {"action":"reOCR","regionID":12}.

[0259] Example: The "Party A" in the contract signature block is OCRed as "Jia Yu" with a confidence of only 0.35 → the system issues a "reOCR" instruction.

[0260] S5-2. Fixed-point correction;

[0261] The small model performs local processing on the target area according to the instruction:

[0262] OCR re-recognition: Re-perform OCR on the specified area using a high-precision but low-speed model;

[0263] Region re-segmentation: When detection fails, re-run DocLayout YOLO to detect only the target area;

[0264] Geometric correction: When the region is severely distorted, trigger UVDoc to perform re-correction.

[0265] If the re-recognition result is still lower than the threshold, return a mark of "manual review".

[0266] Example: The edge of the red seal at the contract stamping position is blurred due to scanning, and the first OCR fails → trigger CycleGAN for background removal + TrOCR secondary recognition → the result "People's Government" has a confidence of 0.89.

[0267] S5-3. Incremental update;

[0268] The correction result is directly fed back to the semantic reasoning module to update the corresponding structure tree node, instead of re-running the whole process, so as to reduce the computational overhead.

[0269] Example: Only replace the node of the "signatory entity" in the structure tree, and keep other body paragraphs unchanged.

[0270] S6. Consistency verification;

[0271] This module ensures that the output document maintains consistency in logic, hierarchy and cross-modal relationships.

[0272] Input: preliminary document structure tree, OCR confidence, and document layout information; Output: consistency score, conflict list, and correction suggestions.

[0273] Specifically including:

[0274] S6-1. Logical consistency verification;

[0275] Check whether the title hierarchy is continuous (for example, jumping directly from a level-1 title to a level-3 title → an error is reported);

[0276] Check if the numbering is correct ("1.1" must be followed by "1.2" or "2").

[0277] Example: In a work report, if "Part 3" appears directly after "Part 1" is detected, a "Level Skip" error will be output.

[0278] S6-2, Cross-modal consistency verification;

[0279] Table reference consistency: When "Table 1" is mentioned in the text, the tree structure must contain the table node numbered 1;

[0280] Consistency between seal and signature: The text at the seal node must include the signature unit of the main text;

[0281] Formula reference consistency: When “formula (2)” is mentioned in the text, the corresponding number must exist in the formula area.

[0282] Example: In the financial statement, the text mentions "see Table 3 for details", but the maximum table number detected is 2 → output cross-modal conflict.

[0283] S6-3, Rating and Conflict Sets;

[0284] The system outputs a consistency score (0–1);

[0285] If the score is lower than the threshold T4 (e.g., 0.75), the scheduling control module is triggered to perform re-optimization.

[0286] Example: Consistency score 0.62, conflict set includes "missing Table 3" and "header skipping level", marked as requiring feedback and correction.

[0287] To ensure the interpretability and enforceability of the consistency scoring, this invention further defines the scoring formula and trigger threshold:

[0288] The consistency score S is defined as a weighted average of multiple sub-indicators:

[0289] S=α·S logic +β·S cross +γ·S ocr ;

[0290] in:

[0291] S logic Logical consistency score (heading level, numbering continuity), range [0,1];

[0292] S cross Cross-modal consistency score (table reference, seal association, formula correspondence), range [0,1];

[0293] S ocr: OCR confidence score normalized, ranging from [0,1];

[0294] The weights α, β, and γ are configurable. For government documents, the recommended values ​​are α = 0.4, β = 0.4, and γ = 0.2.

[0295] Threshold rule:

[0296] When S≥T accept When the value is 0.80, the structured output stage begins;

[0297] When T warn ≤S <T accept When 0.65 ≤ S < 0.80, a feedback iteration is triggered;

[0298] When S <T warn At that time, multiple rounds of feedback are initiated, and manual review is marked when necessary.

[0299] This threshold-based triggering method ensures that the scoring not only reflects the quality of the current result but also provides a clear basis for the scheduling and control module to execute.

[0300] S7, Dispatch Control;

[0301] It acts as a system scheduler, balancing result quality with computing resources.

[0302] Inputs: Consistency score, correction instruction feedback, computing power / latency budget; Outputs: Execution path decision (continue iteration or output results).

[0303] It has the following steps:

[0304] S7-1, Comprehensive Assessment;

[0305] First, the score result S generated by the aforementioned consistency verification module is called, and a judgment is made according to the hierarchical threshold rules:

[0306] When S≥T accept At that time, the results were considered to have reached an acceptable level;

[0307] When T warn ≤S <T accept At that time, the result was in the questionable range and required further correction;

[0308] When S <T warn At that point, the results are clearly unreliable, and feedback correction must be triggered.

[0309] Meanwhile, the scheduling and control module also introduces computing power and latency budgets, defining a cost function C as a constraint condition in the resource dimension:

[0310]

[0311] Where: t iter : Cumulative delay of the current iteration; T max Maximum allowable delay; r use Current computing resource usage (e.g., CPU / GPU usage); R max : Maximum available computing power threshold; ω lat ,ω res Weighting coefficient, used to adjust between latency and computing power constraints.

[0312] S7-2, Cost-Aware Scheduling Rules:

[0313] The scheduler makes a joint decision based on the score S and the cost function C during each iteration:

[0314] When S≥T accept When C < 1.0, proceed directly to the output stage;

[0315] When S <T accept Furthermore, if C < 1.0, iterative feedback is allowed to continue;

[0316] When C > 1.0 (budget exhausted), the process will be forcibly terminated even if the score has not reached the threshold, and the current best result will be output.

[0317] When the number of iterations is ≥ N max If the results do not converge, output the last result.

[0318] S7-3, Decision Implementation;

[0319] Under the above evaluation and rule constraints, the scheduler performs the following operations:

[0320] Trigger feedback: If the score is insufficient and the budget allows, issue a re-optimization instruction to the semantic reasoning and orchestration module, and call the feedback execution module for targeted correction;

[0321] Early termination: If the budget is exceeded or the returns are insufficient, the iteration will stop and the current result will be output.

[0322] Confirm Output: When the score meets the requirements or the budget is exhausted, proceed to the structured output module to generate the final document structure tree.

[0323] Example: In the contract parsing task, if the consistency score is 0.72 (lower than T), accept If the GPU utilization rate has reached 95% and the cost function C exceeds 1.0, the scheduling module will terminate the iteration and output the current optimal structure tree instead of continuing to waste computing power.

[0324] S8, interaction mechanism between large and small models;

[0325] The interaction and collaboration mechanism between the large and small models defines the triggering conditions, instruction formats, and interaction processes to ensure that the large and small models form a dynamic closed-loop optimization during the document parsing process.

[0326] It has the following steps:

[0327] S8-1. When the large model detects the following situations during the inference process of the document structure tree, an interactive command will be triggered:

[0328] (1) The OCR recognition confidence level is lower than the preset threshold (e.g., 0.7);

[0329] (2) The heading levels are not continuous or jump, for example, jumping directly from the second-level heading to the fourth-level heading;

[0330] (3) The table numbering is inconsistent with the reference in the text;

[0331] (4) The seal was not correctly associated with the signature paragraph in the main text.

[0332] S8-2, Command Protocol;

[0333] During the collaboration between large and small models, scheduling and feedback are accomplished through a unified JSON command protocol. This command includes at least the following core fields:

[0334] action: Action type, used to indicate corrective operations, such as OCR re-rendering, region re-segmentation, geometric correction, cross-modal link repair, or reading order adjustment;

[0335] regionID: Target region identifier, uniquely corresponding to a candidate region or node in the document;

[0336] params: Optional parameter, the specific value is determined by the action type, such as the language parameter of OCR, the page number range to be split, etc.

[0337] threshold: The trigger threshold, which reflects the conditions under which the instruction is triggered;

[0338] reason: the triggering cause, such as "low confidence" or "missing cross-modal reference".

[0339] The above fields ensure a unified interface and traceability for interactions between the large and small models. The system can expand the parameter fields as needed, but must at least include the action type and target area identifier.

[0340] S8-3, Interaction Flow:

[0341] (1) The scheduling and control module generates and issues interactive instructions;

[0342] (2) The feedback execution module calls the small model to perform local corrections (such as OCR re-implementation, region segmentation, or geometric correction);

[0343] (3) The corrected results are returned to the large model, which updates the document structure tree and recalculates the confidence and consistency scores.

[0344] (4) If there is still a conflict or low confidence, the large model can trigger the interaction again to form a multi-round closed loop.

[0345] The interaction mechanism supports multiple iterative updates, but it is distinct from the scheduling and control module: the scheduling and control module is responsible for macro-level decisions (whether to continue, when to terminate), while the interaction mechanism module is responsible for micro-level execution details (triggering conditions, instruction content, action flow). Through their collaboration, the system can dynamically optimize the parsing results while also considering computational power and latency constraints.

[0346] This module enables an interactive closed loop of "detection-instruction-execution-feedback-update" between large and small models, significantly improving the accuracy and robustness of complex document parsing.

[0347] S9, Structured Output;

[0348] Responsible for organizing the final parsing results into a hierarchical, machine-readable structured document.

[0349] Input: The final tree structure that has been confirmed to have converged by the scheduler;

[0350] Output: A complete structured document (JSON / XML / database write).

[0351] Specifically, it includes:

[0352] S9-1. Output the document structure tree, including node types and node attributes;

[0353] Node types: title, body text, table, image, seal, formula;

[0354] Node attributes: boundary coordinates, OCR result, confidence level, semantic link.

[0355] Example: In the output JSON structure tree, the table node is associated with the text "Table 1", and the seal node is matched with the signature in the text.

[0356] S9-2, Connecting to downstream applications;

[0357] The structured output results can be directly connected to downstream systems for knowledge graph construction, document retrieval, and automatic contract review.

[0358] Example: In a contract management system, structured output can automatically extract "contract name, signing date, and stamping unit" for retrieval and comparison.

[0359] Example 2:

[0360] Document parsing and structured output:

[0361] In document transfer scenarios, the input is a scanned version of an official document with a red header, containing elements such as a title, body text, footer, attachments, and a red seal.

[0362] Small model processing:

[0363] The document preprocessing module uses LCNet and UVDoc to perform orientation correction and distortion correction;

[0364] The DocLayout YOLO module identifies the main text, attachments, signature, and seal areas;

[0365] The OCR module recognizes the main text, while CycleGAN+TrOCR recognizes the seal text.

[0366] Large model inference:

[0367] A preliminary structure tree is generated based on the OCR results, which identifies logical levels such as title, body text, attachments, and signature.

[0368] The seal text “XX City” does not match the signature “YY City” in the main text → mark conflict.

[0369] Large and small model collaboration:

[0370] The large model issues a reOCR instruction, and the small model performs a re-OCR recognition of the stamp area.

[0371] The corrected result is "YY from a certain city", and the large model is confirmed to be consistent with the signature.

[0372] Final output:

[0373] The output structure tree includes titles, body paragraphs, attachments, signatures, and seals, and establishes a consistent relationship between "seals and signatures".

[0374] Example 3:

[0375] Contract document parsing and stamp verification:

[0376] In the contract management scenario, the input is a scanned contract, with the main text formatted in two columns and including multiple signatures, seals across the binding, and handwritten signatures.

[0377] Small model processing:

[0378] The preprocessing module performs noise reduction and contrast enhancement;

[0379] The layout detection module detects the main text, signature, and seal areas;

[0380] The OCR module identifies the main text clauses, while CycleGAN+TrOCR identifies the text of the seal across the binding.

[0381] Large model inference:

[0382] Restore the order of the clauses based on the OCR results (e.g., "Article 1", "Article 2", "Article 3");

[0383] Check that the text on the seal matches the header of the contract.

[0384] Large and small model collaboration:

[0385] OCR shuffles the order of clause identification: "Article 1, Article 3, Article 2";

[0386] The large model determines conflicts based on logical rules and then issues a reorder instruction.

[0387] The smaller model reprocesses the clause splitting → outputs the correct order.

[0388] Meanwhile, the large model discovered that the seal text was missing "Limited Company" → triggering a second OCR of the seal → the small model corrected it to "XXX Limited Company".

[0389] The output structure tree contains contract terms, signature, and seal, and establishes a "seal-signature" verification relationship.

[0390] Example 4:

[0391] Interactive command protocol definition and application:

[0392] To verify the feasibility of this invention, the complete field definitions of the interactive instructions are further provided, as shown in Table 1:

[0393] Table 1:

[0394]

[0395] Example 1: Low-confidence re-identification in a single region

[0396]

[0397] "reason":"low_confidence",

[0398] "traceID":"a2f8e6d0-2b6e-4c32-9b4b-83d3",

[0399] "version":"v1.0"

[0400] }

[0401] Example 2: Cross-modal reference repair

[0402] {

[0403] "action":"reLink",

[0404] "regionID":"para_p6_002",

[0405] "params":{"target_id":"table_2"},

[0406] "reason":"missing_reference",

[0407] "traceID":"7b1f...d9",

[0408] "version":"v1.0"

[0409] Example 5:

[0410] An interactive, collaborative public service complex document parsing device includes: at least one memory and at least one processor;

[0411] At least one memory for storing machine-readable programs;

[0412] At least one processor is configured to invoke the machine-readable program to execute an interactive, size-model-coordinated method for parsing complex public service documents.

[0413] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for parsing complex public service documents using an interactive size model collaboration, characterized in that: It has the following steps: S1. Convert the original document image into standardized input required for structured processing; S2. Divide the standardized document image into logical regions to form the input for subsequent OCR recognition and semantic reasoning; S3. Convert the region image patch into text and provide a confidence index for each text fragment; S4. Driven by a large model, integrate OCR results and layout structure to restore the reading order and logical structure of the document; S5. Trigger local correction when low confidence or logical conflict is detected; S6, Consistency check; include: S6-1. Check if the heading levels are continuous and if the numbering is reasonable; S6-2. When the main text mentions Table X, the structure tree must contain a table node numbered X, the seal node text must contain the unit of signature in the main text, and when the main text mentions a formula, the formula area must contain a corresponding number. S6-3. Output consistency score. If the score is lower than the threshold T4, trigger the scheduling control module to perform re-optimization. Define the scoring formula and trigger threshold. The consistency score S is defined as a weighted average of multiple sub-indicators: S = α · S logic + β · S cross + γ · S ocr ; in: S logic Logical consistency score; S cross Cross-modal consistency score; S ocr OCR confidence score normalized score; weight α , β , γ Configurable; when S ≥ T accept At this point, the structured output stage begins; when T warn ≤ S < T accept At that time, a feedback iteration is triggered; when S < T warn At that time, multiple rounds of feedback are initiated, and manual review is marked. S7, Dispatch Control; S8, interaction mechanism between large and small models; include: S8-1. When the large model detects the following situations during the inference process of the document structure tree, an interactive command will be triggered: (1) The confidence level of OCR recognition is lower than the preset threshold; (2) The heading levels are not continuous or jump around; (3) The table numbering is inconsistent with the reference in the text; (4) The seal was not correctly associated with the signature paragraph in the main text; S8-2. During the collaboration between large and small models, scheduling and feedback are accomplished through a unified JSON command protocol; S8-3, Interaction Flow: (1) The scheduling and control module generates and issues interactive instructions; (2) The feedback execution module calls the small model to perform local corrections; (3) The corrected results are returned to the large model, which updates the document structure tree and recalculates the confidence and consistency scores; (4) If conflicts or low confidence still exist, the large model triggers the interaction again, forming a multi-round closed loop; S9, Structured Output.

2. The interactive size model collaborative method for parsing complex public service documents according to claim 1, characterized in that, Step S1 includes: S1-1. The lightweight convolutional network LCNet is used to automatically identify the orientation of the input document image. When the confidence of the recognition result is greater than or equal to the threshold T1, the orientation is directly used as the correction basis. If the confidence is less than T1, a secondary detection mechanism is triggered. The secondary detection mechanism includes rotating and enhancing the image to generate four candidate orientations, and then reclassifying and voting them through LCNet. If the threshold still cannot be reached, it is marked as "direction uncertain" and will be subject to further determination by combining OCR confidence with semantic features. S1-2. Introduce the UVDoc model, which automatically detects the document's four boundaries and key lines through deep learning and outputs a correction transformation matrix; S1-3, Noise Removal; Convolutional filtering for noise reduction: eliminates high-frequency noise. Adaptive threshold segmentation: distinguishes between text and background areas, and removes light-colored background patterns; If "suspected text region loss" is detected after noise removal, the threshold is lowered and the process is repeated; S1-4. Enhanced algorithms improve overall readability: Adjust the brightness and contrast to balance the dark and bright areas; Improve image sharpness to make text edges clearer; In low-resolution scanned documents, a super-resolution reconstruction method is used.

3. The interactive size model collaborative method for parsing complex public service documents according to claim 2, characterized in that, Step S2 includes: S2-1, Analysis of Two-Column and Multi-Column Structures; First, generate a set of candidate vertical dividing lines, combine projection analysis to determine the column position, use a detection network for further correction, and generate the area boxes for the left and right columns. If the confidence level of the dividing line is less than the threshold T2, the system will perform a second detection or rely on subsequent large model semantic reasoning to assist in the judgment. S2-2, Page layout inspection; The DocLayout YOLO algorithm is used to detect titles, body text, footers, tables, images, seals, and formula areas; for objects with large size differences, a multi-scale detection strategy is adopted. If two candidate regions overlap significantly, the system will perform non-maximum suppression to retain the region with higher confidence. S2-3. Based on the detected areas, the system assigns hierarchical labels to each area: Titles are usually located at the top of the page or the beginning of a paragraph and are assigned to a higher level. Body paragraphs inherit from their parent headings; Appendix and footnotes serve as lower-level additional nodes; This ultimately forms a region tree structure, which serves as the input for the large model. S2-4, Seal Inspection; Embed the YOLOv8 model in the layout inspection and output the bounding box of the stamp position as the basis for OCR preprocessing; S2-5, Dynamic layout recognition; Trained on a multi-template document dataset, the detector is able to recognize layouts of different styles; If irregular layout is detected, the system will output a "compound region" label, which will be handed over to the subsequent large model for processing.

4. The interactive size model collaborative method for parsing complex public service documents according to claim 3, characterized in that, Step S3 includes: S3-1. Use an appropriate OCR model for different regions; Body and Title: General OCR model for recognizing continuous text; Table cells: Structured OCR outputs text with cell location information; Formula: Formula OCR, supports mathematical symbol recognition; If the recognition result contains large areas of blank space or garbled characters, the system will mark the area as an "abnormal area" and hand it over to the feedback module for reprocessing; S3-2. Each OCR output generates a confidence score to measure the reliability of recognition. When the confidence level is greater than or equal to the threshold T3, output directly; When the confidence level is less than T3, it is marked as "low confidence level", triggering the fixed-point correction of the feedback execution module; S3-3, Seal Text Recognition; First, CycleGAN is used to remove the seal background and complex background, and then the TroOCR model is used to recognize the text content. The output results include the seal text, recognition confidence, and seal boundary.

5. The interactive size model collaborative method for parsing complex public service documents according to claim 4, characterized in that, Step S4 includes: S4-1. Utilize the Transformer large model, combined with regional location and text context, to restore the reading order; In two-column documents, the system automatically determines whether the left column should be read before the right column; in multi-page documents, it determines the continuity of the main text. If the confidence difference between the two candidate orders is less than δ, then the consistency verification module will confirm it. S4-2. Based on large-scale model semantic understanding, identify the logical relationship between the title and the body text; S4-3. Establish semantic links between different types of content by leveraging the cross-modal reasoning capabilities of large models; S4-4. Integrate the sorting, hierarchical, and semantic association results to output a preliminary document structure tree; Step S5 includes: S5-1. When generating the structure tree, the semantic reasoning and orchestration module will issue a correction instruction if it finds low-confidence text or hierarchical conflicts. The instruction types include re-OCR, re-region segmentation, and geometric correction; the instruction format is JSON. S5-2, The small model performs local processing on the target region according to the instructions: Re-OCR the specified area using a high-precision but low-speed model; If the detection fails, rerun DocLayout YOLO to detect only the target area; When the area distortion is severe, UVDoc re-correction is triggered; If the re-identification result is still below the threshold, then return the flag "Manual Review"; S5-3. The correction results are directly fed back to the semantic reasoning module to update the corresponding tree structure nodes.

6. The interactive size model collaborative method for parsing complex public service documents according to claim 5, characterized in that, Step S7 includes: S7-1, The scheduling control module calls the score result S generated by the consistency verification module and makes a judgment according to the hierarchical threshold rules: when S ≥ T accept At that time, the results were considered to have reached an acceptable level; when T warn ≤ S < T accept At that time, the result was in the questionable range and required further correction; when S < T warn At this point, the results are clearly unreliable and feedback correction must be triggered; The scheduling control module also introduces computing power and latency budgeting, defining a cost function C as a constraint on resource dimensions: ; in: t iter : Cumulative delay of the current iteration; T max Maximum allowable delay; r use Current computing resource usage; R max Maximum available computing power threshold; ω lat , ω res Weighting coefficients are used to adjust the balance between latency and computing power constraints. S7-2. The scheduler makes a joint decision based on the score S and the cost function C during each iteration: when S ≥ T accept and C When the value is less than 1.0, proceed directly to the output stage; when S < T accept and C When the value is less than 1.0, iterative feedback is allowed to continue. when C When the score is > 1.0, the process will be forcibly terminated even if the score does not reach the threshold, and the current best result will be output. When the number of iterations ≥ N max If the results do not converge, output the last result; S7-3. Based on the above evaluation and rule constraints, the scheduler performs the following operations: If the score is insufficient and the budget allows, a re-optimization instruction is issued to the semantic reasoning and orchestration module, and the feedback execution module is called to perform targeted corrections. If the budget is exceeded or the returns are insufficient, stop the iteration and output the current result; When the score meets the requirements or the budget is exhausted, the system proceeds to the structured output module to generate the final document structure tree.

7. The interactive size model collaborative method for parsing complex public service documents according to claim 6, characterized in that, Step S9 includes: S9-1. Output the document structure tree, including node types and node attributes; S9-2. Structured output results are used for knowledge graph construction, document retrieval, and automatic contract review.

8. An interactive and collaborative public service complex document parsing device, characterized in that, include: At least one memory and at least one processor; The at least one memory is used to store a machine-readable program; The at least one processor is configured to invoke the machine-readable program to perform the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Multi-modal document information processing method, device and equipment based on large model agent and storage medium

    CN119623650A

  • Document processing method and system based on multi-modal large model

    CN120340055A

  • Document-level resume analysis method based on large-scale pre-training generation model

    CN116205211A

  • Cross-modal knowledge reasoning method based on multi-modal large model

    CN120409639A