An end-side adaptive document structure understanding method and system
By employing a distributed processing architecture and LoRA parameter fine-tuning technology, the problems of low performance, low efficiency, and poor adaptability in edge document parsing are solved, enabling parallel, accurate parsing and rapid adaptation of elements such as tables, formulas, and text.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHENZHEN XINGSHENG DIGITAL TECH CO LTD
- Filing Date
- 2026-02-11
- Publication Date
- 2026-05-12
AI Technical Summary
Existing technologies for edge document parsing suffer from low performance, low efficiency, and poor adaptability, especially the precision-efficiency paradox of end-to-end VLM, error propagation and coordination overhead of pipeline architecture, as well as poor adaptability and high deployment costs.
It adopts a distributed processing architecture, which uses lightweight layout analysis and region classification to route document regions to dedicated parsing channels for parallel parsing. It also introduces a cross-channel collaborative controller for consistency verification and completion inference, and combines LoRA parameter efficient fine-tuning technology to achieve rapid adaptation to new document types.
It achieves parallel and accurate parsing of elements such as tables, formulas, and text, lowers the deployment and maintenance threshold, and can adapt to new document types with extremely low parameter update volume within 24 hours, improving the system's adaptability and efficiency.
Smart Images

Figure CN121706767B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of artificial intelligence computing technology, and in particular to an edge-adaptive document structure understanding method and system. Background Technology
[0002] With the increasing demand for intelligent solutions in scenarios such as office automation and medical record analysis, edge document understanding technology has become crucial.
[0003] Existing technologies can be mainly divided into three categories: First, traditional methods based on rules and templates, which are effective for documents with fixed formats but have poor generalization ability; second, methods based on end-to-end visual-language models (VLMs), such as IBM Granite-Docling, which attempt to process all types of document elements with a unified neural network; and third, methods based on dedicated model pipelines, such as the Docling library, which integrates multiple single-function models such as table recognition (e.g., Tableformer), formula parser, and OCR engine to work together in a pipeline manner to achieve structured information extraction.
[0004] The main problems and shortcomings of existing technologies are as follows:
[0005] 1. The precision-efficiency paradox of end-to-end VLM: While unified VLM models (such as Granite-Docling) are ingeniously designed, accurately understanding heterogeneous elements such as text, tables, formulas, and charts while maintaining their complex structural relationships places extremely high demands on the model's capabilities. To ensure accuracy, it is difficult to achieve an extremely lightweight model size, and computational latency and memory pressure still exist when running on the device. Furthermore, the "one-size-fits-all" approach is less accurate than dedicated models when facing certain specialized tasks (such as parsing the logical relationships of complex tables).
[0006] 2. Error propagation and coordination overhead in pipelined architectures: While multi-model pipelines decompose tasks and may achieve optimal accuracy on each subtask, they pose a significant risk of error accumulation. For example, errors in the layout analysis of preceding modules can directly lead to failures in subsequent table or formula parsing. Furthermore, the sequential execution of multiple models introduces cumulative latency, and data exchange and coordination between models require complex engineering scheduling, increasing system complexity and instability. Therefore, although this approach may achieve optimal accuracy on each subtask, it suffers from the risks of error accumulation, latency accumulation, and high system complexity.
[0007] 3. Poor adaptability and high deployment cost. When new document types (such as new invoice styles or report templates) appear, whether it is retraining the end-to-end VLM or adjusting the entire pipeline, a large amount of new labeled data and computing resources are required for full parameter fine-tuning, which is costly and time-consuming (usually several weeks), and cannot meet the business needs of rapid iteration.
[0008] Therefore, there is an urgent need for a terminal document parsing solution that balances high performance, high efficiency, and high adaptability. Summary of the Invention
[0009] To address the problems in existing technologies, this invention provides a client-side adaptive document structure understanding method. Through an innovative split-processing architecture, it can achieve parallel and accurate parsing of different elements such as tables, formulas, and text, significantly reducing the deployment and maintenance threshold. It unifies the "current parsing capability" and the "future self-evolution capability," solving the problems of low performance, low efficiency, and weak adaptability in client-side document parsing in existing technologies.
[0010] The present invention provides an edge-side adaptive document structure understanding method, applied to a system consisting of a cloud server and a mobile terminal, comprising the following steps:
[0011] Step 1: Obtain the document to be parsed and perform unified rendering and normalization, outputting page-level pixel raster and basic metadata;
[0012] Step 2: Perform lightweight layout analysis and region classification on the page-level pixel grid to obtain the bounding boxes, reading order and region type labels of each region on the page;
[0013] Step 3: Based on the type tag, route each document area to the corresponding dedicated parsing channel for parallel parsing. The dedicated parsing channels include at least a text parsing channel, a table parsing channel, a formula parsing channel, and a chart parsing channel.
[0014] Step 4: Output structured intermediate results and confidence levels for each parsing channel;
[0015] Step 5: The intermediate results output by each channel are checked for consistency and inferred by the cross-channel collaborative controller, and a traceable verification evidence chain is generated for low-confidence segments.
[0016] Step 6: The structured assembly engine merges the verified results from each channel into a unified document-level structured output.
[0017] Step 7: When a new document type or a persistent low-confidence pattern is detected, the adaptation process based on parameter efficient fine-tuning technology is initiated to generate channel-level incremental weight packages, update the model parameters of the corresponding parsing channels, and achieve rapid adaptation to the new document type without affecting the existing capabilities, and load and use it as needed in subsequent inference.
[0018] The present invention is further improved in that, in step 1, the document to be parsed includes image files, PDF files and document files; the basic metadata includes page number, resolution and orientation.
[0019] The present invention is further improved in that, in step 2, the area type label includes text area, table area, formula area and chart area.
[0020] The present invention is further improved in that, in step 4, the text parsing channel performs multi-level dynamic semantic segmentation on the text region, including generating candidate segments of various granularities based on layout features and semantic features, scoring each candidate boundary through the segmentation confidence evaluation module, adaptively adjusting the segmentation boundary according to the score, and performing closed-loop correction on the segmentation boundary based on the feedback of the downstream entity recognition and relation extraction results, and outputting a "semantic block-entity-relationship" structure.
[0021] The present invention is further improved in that, in step 4, the table parsing channel performs row and column semantic alignment on the table area, including converting the table area into an HTML skeleton representation containing rowspan and colspan attributes, performing noise filtering and dynamic semantic segmentation on the HTML skeleton, adding cross-dimensional semantic annotations to merged cells, generating semantic descriptions, constructing a table graph structure, generating row and column semantic contexts for each data cell through backtracking of the table header tree, and outputting a "table graph structure - semantic annotation - logical relationship" structure.
[0022] In a further improvement, in step 4, the formula parsing channel performs symbol detection and structure parsing on the formula region and outputs the LaTeX sequence and alignment information with the page coordinates.
[0023] In a further improvement to this invention, in step 4, the chart parsing channel performs legend, coordinate axis recognition and curve data extraction on the chart area, and outputs a structured numerical sequence, units and source evidence.
[0024] The present invention is further improved in that, in step 5, the verification content of the cross-channel collaborative controller includes the matching of table header terms with the text description, the consistency of numerical units of the same indicator in the text and table, the logical closure of statistical rows and data areas, the consistency of chart data with table values, and the consistency of chart data with text values.
[0025] The present invention is further improved in that, in step 7, the parameter efficient fine-tuning technology is Low-Rank Adaptation, or LoRA. The adaptation process includes injecting only a trainable low-rank matrix into the attention module of the model for incremental training, training with a small sample labeled set, generating an incremental weight package, and dynamically loading the corresponding incremental weight package according to the document type during inference.
[0026] The present invention also provides a system for implementing the endpoint adaptive document structure understanding method described in any of the above claims, characterized in that it includes:
[0027] The document rendering and normalization module is used to convert input documents into page-level pixel raster and basic metadata;
[0028] The layout analysis and classification module is used to identify document regions and their types;
[0029] Multiple dedicated parsing channels are used to parse document areas of corresponding types, including at least text parsing channels, table parsing channels, formula parsing channels, and chart parsing channels;
[0030] A cross-channel collaborative controller is used to perform consistency verification and evidence chain generation on the outputs of text parsing channel, table parsing channel, formula parsing channel and chart parsing channel;
[0031] The structured assembly engine is used to merge the results from the text parsing channel, table parsing channel, formula parsing channel, and chart parsing channel and output unified structured data;
[0032] The LoRA adaptation module is used to efficiently fine-tune the parameters of the text parsing channel, table parsing channel, formula parsing channel, and chart parsing channel when a new document type or low confidence pattern is detected.
[0033] The beneficial effects of this invention are as follows: The edge-side adaptive document structure understanding method provided by this invention achieves parallel and accurate parsing of different elements such as tables, formulas, and text through an innovative split-processing architecture. At the same time, through an efficient parameter fine-tuning mechanism, the system can adapt to new document types within 24 hours with extremely low parameter update volume (e.g., <100KB), significantly reducing the deployment and maintenance threshold. It introduces a cross-channel collaborative controller and consistency verification mechanism to perform consistency verification and output traceable evidence chains for intermediate results of channels such as text, tables, formulas, and charts. When a new format is detected or a persistent low-confidence pattern appears, low-confidence samples are automatically aggregated and LoRA incremental adaptation is driven, thereby achieving the unification of "current parsing capability" and "future self-evolution capability". This solves the problems of low performance, low efficiency, and weak adaptability in edge-side document parsing in the prior art. Attached Figure Description
[0034] Figure 1 This is a flowchart of an edge-side adaptive document structure understanding method according to the present invention. Detailed Implementation
[0035] The present invention will now be described in further detail with reference to the accompanying drawings and embodiments.
[0036] Please see Figure 1 The present invention provides an edge-side adaptive document structure understanding method, applied to a system consisting of a cloud server and a mobile terminal, comprising the following steps:
[0037] Step 1: Obtain the document to be parsed and perform unified rendering and normalization, outputting page-level pixel raster and basic metadata; wherein, the document to be parsed includes image files, PDF files and document files; the basic metadata includes page number, resolution and orientation.
[0038] Step 2: Perform lightweight layout analysis and region classification on the page-level pixel grid to obtain the bounding boxes, reading order, and region type labels for each region on the page; among which, the region type labels include text regions, table regions, formula regions, and chart regions.
[0039] Step 3: Based on the type tag, each document area is routed to the corresponding dedicated parsing channel for parallel parsing. The dedicated parsing channels include at least a text parsing channel, a table parsing channel, a formula parsing channel, and a chart parsing channel.
[0040] Step 4: Each parsing channel outputs structured intermediate results and confidence scores. Specifically, the text parsing channel performs multi-level dynamic semantic segmentation on the text region, including generating candidate blocks of various granularities based on layout and semantic features. The segmentation confidence evaluation module scores each candidate boundary and adaptively adjusts the segmentation boundaries based on the scores. Closed-loop correction is performed on the segmentation boundaries based on feedback from downstream entity recognition and relation extraction, outputting a "semantic block-entity-relationship" structure. The table parsing channel performs row and column semantic alignment on the table region, including converting the table region to include rowspan and colspan. The HTML skeleton representation of the n attribute is used to perform noise filtering and dynamic semantic segmentation on the HTML skeleton. Cross-dimensional semantic annotations are added to merged cells to generate semantic descriptions and construct a table / graph structure. Row and column semantic contexts are generated for each data cell through backtracking of the header tree, and the output structure is "table / graph structure - semantic annotation - logical relationship". The formula parsing channel performs symbol detection and structure parsing on the formula area and outputs LaTeX sequence and alignment information with page coordinates. The chart parsing channel performs legend, coordinate axis recognition and curve data extraction on the chart area and outputs a structured numerical sequence, units and source evidence.
[0041] Step 5: The cross-channel collaborative controller performs consistency verification and completion reasoning on the intermediate results output by each channel, and generates a traceable verification evidence chain for low-confidence segments. The verification content of the cross-channel collaborative controller includes the matching of table header terms with the text description, the consistency of numerical units of the same indicator in the text and table, the logical closure of statistical rows and data areas, the consistency of chart data with table values, and the consistency of chart data with text values.
[0042] Step 6: The structured assembly engine merges the verified results from each channel into a unified document-level structured output.
[0043] Step 7: When a new document type or a persistent low-confidence pattern is detected, an adaptation process based on efficient parameter fine-tuning technology is initiated to generate channel-level incremental weight packages, update the model parameters of the corresponding parsing channels, and achieve rapid adaptation to the new document type without affecting existing capabilities, allowing for on-demand loading and use in subsequent inference. The efficient parameter fine-tuning technology is Low-Rank Adaptation (LoRA). The adaptation process includes incremental training by injecting only a trainable low-rank matrix into the model's attention module, training using a small sample labeled set, generating incremental weight packages, and dynamically loading the corresponding incremental weight packages based on the document type during inference.
[0044] In this embodiment, the present invention employs a divide-and-conquer parallel pipeline architecture and a parameter-efficient fine-tuning mechanism to achieve fast, accurate, and easily adaptable structured parsing of complex documents on the client side. The core of the system is a distributed processing pipeline. First, a lightweight document classification and layout analysis module quickly determines the type (text, table, formula, chart) of each region in the document. Then, different types of regions are routed to corresponding dedicated parsing channels: the text parsing channel performs semantic segmentation, named entity recognition (NER), and relation extraction; the table parsing channel performs cell detection, row and column structure reconstruction, and cell semantic alignment; the formula parsing channel performs symbol detection, syntax tree parsing, and outputs a LaTeX sequence; the parsing results from each channel are integrated into a unified JSON by a structured assembly engine. To enhance the reliability and traceability of structured results, the system employs a cross-channel collaborative controller to verify the consistency of intermediate outputs and confidence levels across multiple channels and generate a chain of evidence (e.g., whether table header terms match the text descriptions, whether the numerical units of the same indicator are consistent in the text and table, whether statistical rows and data areas can be deduced to be closed, whether chart curve readings are consistent with table values, and whether chart data is consistent with text values). The LoRA adaptation process is triggered only when the system identifies a new format or a persistent low-confidence pattern. It learns the proprietary formatting and terminology of this new format through incremental small-sample learning, representing a "future-oriented" rapid adaptation capability that does not affect the main workflow of channel-specific parsing and JSON assembly.
[0045] Table 1: Input / Output and Function Description of Key System Modules
[0046] Module Name enter Output Function Description Document rendering and normalization module Images / PDFs / Office Page grid, metadata Standardize resolution and orientation to ensure consistency in subsequent modules. Page Layout Analysis and Classification Module Page Grid Region frame, type, order Decompose the document into routable heterogeneous regions Text parsing channel Text area Semantic blocks, entities / relationships, confidence Dynamic chunking avoids semantic fragmentation and extracts semantic structure from the main text. Table parsing channel Table area Table structure, semantic annotations, confidence level Reconstruct the row and column hierarchy and complete semantic alignment and logical completion. Formula Analysis Channel formula area LaTeX sequence, structural information, confidence level Parse the formula structure and output an editable expression. Chart Analysis Channel Chart area Numerical sequence, unit, confidence level Structure chart information into computable data representations Cross-channel collaborative controller Intermediate results of each channel Consistency verification results, chain of evidence Mutual verification and complementarity, identifying low confidence levels and triggering a learning loop. Structured assembly engine Channel output Unified JSON Integrate multi-channel results and provide structured interfaces to external systems. LoRA adapter module Small sample labeled set, channel model Incremental weight package Rapid knowledge injection on the device side, enabling the expansion of new format capabilities.
[0047] Key implementation details:
[0048] I. Multi-level Dynamic Semantic Segmentation Mechanism of Text Channels
[0049] Input Data and Basic Representation: The text channel receives OCR / text extraction results in units of text areas output by layout analysis, including text content, character / line coordinates, font size / bold style features, and reading order. The system encodes the above information into sequence representations and layout feature vectors, and retains the mapping relationship with the original page coordinates to support subsequent cross-channel alignment and evidence chain tracing.
[0050] Dynamic granularity candidate generation: The system simultaneously generates multiple candidate block granularities, including sentence-level, phrase-level, sentence-level, multi-sentence-level, and structural blocks such as "heading-paragraph-list item". Candidate generation not only relies on punctuation and line breaks, but also combines layout features (indentation, alignment, heading style, bullet points, table reference marks) and semantic features (entity density, frequency of numerical / unit occurrences, probability of occurrence of words in fields such as medical examination items / amount items), thereby avoiding semantic fragmentation or cross-paragraph pollution caused by traditional fixed window block segmentation.
[0051] Block-based confidence assessment and boundary selection: The system introduces a block-based confidence assessment module, which uses a lightweight neural network to output a confidence score for each candidate boundary. The confidence assessment uses "semantic integrity, context recoverability, entity closure, and cross-sentence reference risk" as comprehensive discrimination objectives. When the boundary confidence score is lower than the threshold, the system automatically expands the block window or introduces overlapping anchors to ensure that downstream tasks can still recover the necessary context after block segmentation.
[0052] Feedback loop with downstream tasks: After performing NER and relation extraction, the text channel obtains entity recognition confidence and relation consistency scores. The system uses this score as a feedback signal to send back to the block confidence evaluation module, forming a closed-loop self-correction mechanism of "blocking - extraction - feedback - re-blocking": when the extraction results show that entities are truncated, relations are broken across blocks, or referential issues cannot be resolved, the block segmentation module automatically adjusts the boundaries and regenerates blocks, ensuring that the text channel maintains semantic coherence under different document complexities.
[0053] Output structure: Each semantic block output by the text channel contains a block ID, original text fragment, corresponding coordinate range, block granularity type, boundary confidence, extracted entities / relationships, and cross-block reference pointers to other blocks, providing a computable evidence structure for cross-channel verification and structured assembly.
[0054] II. Row and Column Semantic Alignment and Explicit Enhancement Mechanisms for Table Channels
[0055] Lightweight structural skeleton preprocessing: The system preferentially uses lightweight conversion from Excel / PDF to HTML as the preprocessing basis. This step explicitly encodes the topology of merged cells using the HTML's colspan and rowspan attributes, eliminating physical redundancy caused by empty cells or visual whitespace in the original table, forming an unambiguous structural skeleton. For image tables that cannot be directly converted to HTML, the system first performs cell detection and segmentation, and then constructs a pseudo-HTML skeleton containing rowspan / colspan in an equivalent manner to ensure consistency in subsequent processing.
[0056] Adaptive table cleanup and dynamic semantic chunking:
[0057] 2.1 Noise Filtering Submodule: Automatically identifies and deletes meaningless blank lines, decorative separator lines, duplicate headers and footers, and other interfering labels; deletes confidence scores for suspected noise rows and columns for cross-channel collaborative controller verification.
[0058] 2.2 Dynamic Semantic Segmentation Submodule: Based on the physical complexity of the table (number of rows and columns, density of merged cells, depth of nested headers) and logical complexity (multi-level headers, hierarchical statistical rows, cross-page continuation markers), the large table is divided into logically coherent semantic units. Key header information and cross-block relationship hints are dynamically reproduced at the block boundaries, forming "block-context" anchor points, ensuring that the table semantics remain complete and traceable when crossing blocks.
[0059] Enhanced explicit semantics for merged cells: Addressing the issue that the semantics of merged cells typically only appear in the first cell after HTML conversion, this solution adds a cross-dimensional semantic annotation layer to each merged cell spanning x rows and y columns. The system not only records its span and coverage area but also generates a merge semantic description based on a cell content analysis model and injects it as a structured attribute (e.g., merge type, summary / heading tags, row and column semantic indexes of the covered area) to improve the understanding of table hierarchy, summary relationships, and grouping structures.
[0060] The system constructs a table graph structure using an HTML skeleton as input, with nodes representing cells and edges encompassing (right adjacency, lower adjacency, merge overlay, and semantic pointing from the header to the data). First, the system identifies the header area (determined jointly by style, position, rowspan / colspan shape, and domain dictionary), then parses the header area into a hierarchical header tree. Subsequently, for each data cell, the system traces back along both column and row directions to obtain the combined semantic context of "column header path + row header path." The system then standardizes and associates header terms using a domain knowledge graph, ultimately generating a unique or multiple candidate semantic alignment result and confidence score for each data cell.
[0061] Logical Relationship Completion Engine: This engine integrates rule-based reasoning with lightweight graph neural networks to reconstruct logical relationships such as subordination, summarization, and calculation between cells. For example, it automatically binds statistical rows to corresponding data areas and verifies verifiable relationships such as "total = sum of items". When the verification fails, it outputs a conflict evidence chain and sends it back to the cross-channel collaborative controller, triggering a re-evaluation of the header tree or block boundaries, thereby achieving self-correction of table semantic alignment.
[0062] Output structure: The table channel output includes a header tree, data matrix, cell attributes (span, semantic tags, unit, source evidence), logical relationship graph (edge type and weight), and block anchor information, ensuring that downstream systems can directly perform machine reasoning and business extraction.
[0063] III. LoRA Rapid Adaptation Process and "Future-Oriented" Continuous Learning Mechanism
[0064] Triggering conditions: When the cross-channel collaborative controller continuously observes that a certain type of document has a systematic low confidence level in a specific channel (e.g., the item name of the new test report cannot be aligned with the header level, the statistical row relationship cannot be closed, or the presence of new terms in the text causes entity extraction to fail), or when the layout analysis determines that it is a new template, the system starts the LoRA adaptation process.
[0065] Small sample annotation and task definition: The system automatically samples from the low-confidence queue and generates annotation task packages. The annotation content can include: header tree / merged cell semantics, key field extraction, entity relationships, cross-channel consistency labels, etc. The sample size can be 50-100 samples, and weak supervision is allowed to supplement it (e.g., using the "total relationship" obtained by rule validation as automatic labels).
[0066] Low-rank injection and parameter freezing: The system locks more than 99.9% of the parameters of the base model, maintains the existing general capabilities, and injects a trainable low-rank matrix (which can be applied to Q / K / V projection or output projection) only at the adjacent positions of the attention module of the target channel model, and trains incremental weights for each channel separately, so that the adaptation process has controllable, lightweight and rollback-friendly engineering properties.
[0067] Rapid fine-tuning and validation: Training is performed in a few epochs under edge computing power conditions. The training objective includes both channel task loss and cross-channel consistency constraints (e.g., values extracted from tables should be consistent with text descriptions, and units should be aligned). After training, the system validates key metrics on the retained set and outputs incremental weight packets (e.g., <0.1% of parameter size, approximately 100KB) after passing threshold judgment.
[0068] Deployment and version management: Incremental weight packages are registered to the model repository in the form of "channel-template-version". The structured assembly engine selects the corresponding LoRA branch to load during inference based on the layout analysis results, so as to achieve real-time coverage of new document types. When regression monitoring finds that it causes negative migration risk to old templates, it can quickly roll back to the previous version to ensure online stability.
[0069] Closed-loop evolution: LoRA adaptation is not a one-time operation, but forms a closed loop with the cross-channel collaborative controller: low-confidence samples generated during the inference phase continuously enter the incremental learning queue, and the annotation and training results inversely improve the channel capabilities, enabling the system to continuously expand the "parseable template library" and "domain terminology library" in real business flows, forming a continuously evolving adaptive system.
[0070] IV. Structured Analysis Mechanism of Formula Analysis Channel
[0071] Input and Detection: The formula parsing channel receives the formula area output by the layout analysis, and combines local high-resolution cropping and symbol candidate detection to obtain the symbol set and its spatial relationships (left and right adjacency, superscript and subscript, fraction bar, square root cover, etc.).
[0072] Structural parsing and syntax constraints: The system performs structural parsing based on spatial relationship graphs, generates syntax trees or intermediate representations of mathematical expressions, and applies syntax constraints during the decoding stage to reduce illegal structure outputs; for ambiguous structures (such as hyphens and minus signs, unclear subscripts and superscripts), candidate structures and confidence scores are output for cross-channel collaborative controllers to review.
[0073] Output and Alignment: The formula parsing channel outputs a LaTeX sequence, a structured syntax tree summary, coordinate mappings and confidence scores of key symbols, enabling a consistent representation of "formula object - page position - editable expression" in JSON.
[0074] V. Numerical Extraction Mechanism of Chart Analysis Channel
[0075] Coordinate system and legend recognition: The chart parsing channel identifies the coordinate axis position, scale and unit, parses the legend items and color / line type mapping relationship, and establishes the binding of "legend item - data series".
[0076] Data extraction and restoration: For common chart types such as line charts, bar charts, and scatter plots, the system extracts key points and restores them into numerical sequences based on coordinate system mapping; when grid lines, background textures, or annotation occlusions exist, robust filtering and local resampling are used to improve extraction stability, and the system outputs extraction confidence and source evidence.
[0077] Output structure: The chart parsing channel output includes chart type, series name, numerical sequence, unit, coordinate mapping parameters and evidence chain information, which facilitates the structured assembly engine to uniformly store it in the database and support subsequent calculations and verifications.
[0078] Please see Figure 1 The present invention also provides a terminal-side adaptive document structure understanding system for implementing the terminal-side adaptive document structure understanding method described in any of the above claims, characterized in that it includes:
[0079] The document rendering and normalization module is used to convert input documents into page-level pixel raster and basic metadata;
[0080] The layout analysis and classification module is used to identify document regions and their types;
[0081] Multiple dedicated parsing channels are used to parse document areas of corresponding types, including at least text parsing channels, table parsing channels, formula parsing channels, and chart parsing channels;
[0082] A cross-channel collaborative controller is used to perform consistency verification and evidence chain generation on the outputs of text parsing channel, table parsing channel, formula parsing channel and chart parsing channel;
[0083] The structured assembly engine is used to merge the results from the text parsing channel, table parsing channel, formula parsing channel, and chart parsing channel and output unified structured data;
[0084] The LoRA adaptation module is used to efficiently fine-tune the parameters of the text parsing channel, table parsing channel, formula parsing channel, and chart parsing channel when a new document type or low confidence pattern is detected.
[0085] In this embodiment, the system of the present invention includes a document rendering and normalization module, a layout analysis and classification module, a text parsing channel, a table parsing channel, a formula parsing channel, a chart parsing channel, a cross-channel collaborative controller, a structured assembly engine, and a LoRA adaptation module. During operation, the document is first rendered as a page grid, and after layout analysis, it is classified into different regions. Each region is routed to the corresponding parsing channel for parallel processing. The text channel performs dynamic semantic segmentation and entity relationship extraction; the table channel performs structural reconstruction and semantic alignment; the formula parsing channel parses symbols and structures; and the chart parsing channel extracts numerical information. The cross-channel collaborative controller verifies and merges the results of each channel, ultimately outputting a unified JSON. When a new format appears, the LoRA adaptation module is activated, achieving rapid adaptation with minimal parameter updates. The text channel employs a multi-level dynamic semantic segmentation mechanism, combining layout and semantic features to generate candidate segments, and optimizes segment boundaries through confidence evaluation and a closed-loop feedback mechanism with downstream tasks. The table channel explicitly encodes and merges cells based on the HTML skeleton, improving parsing accuracy through row and column semantic alignment and logical relationship completion. LoRA adaptation is triggered only when low confidence or new formats are detected, updating the channel model with incremental learning using few samples to achieve continuous evolution.
[0086] As can be seen from the above, the beneficial effects of the present invention are as follows: The end-side adaptive document structure understanding method provided by the present invention achieves parallel and accurate parsing of different elements such as tables, formulas, and text through an innovative split-processing architecture. At the same time, through an efficient parameter fine-tuning mechanism, the system can adapt to new document types within 24 hours with extremely low parameter update volume (e.g., <100KB), significantly reducing the deployment and maintenance threshold. It introduces a cross-channel collaborative controller and consistency verification mechanism to perform consistency verification and output traceable evidence chains for intermediate results of channels such as text, tables, formulas, and charts. When a new format is detected or a persistent low-confidence pattern appears, the low-confidence samples are automatically aggregated and LoRA incremental adaptation is driven, thereby achieving the unification of "current parsing capability" and "future self-evolution capability", solving the problems of low performance, low efficiency, and weak adaptability in the end-side document parsing of the prior art.
[0087] The specific embodiments described above are preferred embodiments of the present invention and are not intended to limit the specific scope of the present invention. The scope of the present invention includes, but is not limited to, these specific embodiments. All equivalent changes made in accordance with the present invention are within the protection scope of the present invention.
Claims
1. A client-side adaptive document structure understanding method, comprising the following steps: Step 1: Obtain the document to be parsed and perform unified rendering and normalization, outputting page-level pixel raster and basic metadata; Step 2: Perform lightweight layout analysis and region classification on the page-level pixel grid to obtain the bounding boxes, reading order and region type labels of each region on the page; Step 3: Based on the type tag, route each document area to the corresponding dedicated parsing channel for parallel parsing. The dedicated parsing channels include at least a text parsing channel, a table parsing channel, a formula parsing channel, and a chart parsing channel. Step 4: Each parsing channel outputs structured intermediate results and confidence scores. Specifically, the text parsing channel performs multi-level dynamic semantic segmentation on the text region, including generating candidate blocks of various granularities based on layout and semantic features, scoring each candidate boundary using a segmentation confidence evaluation module, adaptively adjusting the segmentation boundaries based on the scores, and performing closed-loop correction on the segmentation boundaries based on feedback from downstream entity recognition and relation extraction, outputting a "semantic block-entity-relationship" structure. The table parsing channel performs row and column semantic alignment on the table region, including converting the table region into an HTML skeleton representation containing rowspan and colspan attributes, performing noise filtering and dynamic semantic segmentation on the HTML skeleton, adding cross-dimensional semantic annotations to merged cells, generating semantic descriptions, constructing a table graph structure, and generating row and column semantic contexts for each data cell through header tree backtracking, outputting a "table graph structure-semantic annotation-logical relationship" structure. Step 5: The cross-channel collaborative controller performs consistency verification and completion reasoning on the intermediate results output by each channel, and generates a traceable verification evidence chain for low-confidence segments; wherein, the verification content of the cross-channel collaborative controller includes the matching of table header terms with the text description, the consistency of numerical units of the same indicator in the text and table, the logical closure of statistical rows and data areas, the consistency of chart data with table values, and the consistency of chart data with text values. Step 6: The structured assembly engine merges the verified results from each channel into a unified document-level structured output. Step 7: When a new document type or a persistent low-confidence pattern is detected, an adaptation process based on efficient parameter fine-tuning technology is initiated to generate channel-level incremental weight packages, update the model parameters of the corresponding parsing channels, and achieve rapid adaptation to the new document type without affecting existing capabilities, and load and use them on demand in subsequent inference. The efficient parameter fine-tuning technology is Low-Rank Adaptation, or LoRA. The adaptation process includes injecting only a trainable low-rank matrix into the model's attention module for incremental training, training with a small sample labeled set, generating incremental weight packages, and dynamically loading the corresponding incremental weight packages according to the document type during inference.
2. The edge-side adaptive document structure understanding method as described in claim 1, characterized in that: In step 1, the document to be parsed includes image files, PDF files, and document files; the basic metadata includes page numbers, resolution, and orientation.
3. The edge-side adaptive document structure understanding method as described in claim 2, characterized in that: In step 2, the area type labels include text areas, table areas, formula areas, and chart areas.
4. The endpoint adaptive document structure understanding method as described in claim 3, characterized in that: In step 4, the formula parsing channel performs symbol detection and structure parsing on the formula region, and outputs the LaTeX sequence and alignment information with the page coordinates.
5. The endpoint adaptive document structure understanding method as described in claim 4, characterized in that: In step 4, the chart parsing channel performs legend, coordinate axis recognition and curve data extraction on the chart area, and outputs a structured numerical sequence, units and source evidence.
6. A client-side adaptive document structure understanding system, used to implement the client-side adaptive document structure understanding method according to any one of claims 1-5, characterized in that, include: The document rendering and normalization module is used to convert input documents into page-level pixel raster and basic metadata; The layout analysis and classification module is used to identify document regions and their types; Multiple dedicated parsing channels are used to parse document areas of corresponding types, including at least text parsing channels, table parsing channels, formula parsing channels, and chart parsing channels; A cross-channel collaborative controller is used to perform consistency verification and evidence chain generation on the outputs of text parsing channel, table parsing channel, formula parsing channel and chart parsing channel; The structured assembly engine is used to merge the results from the text parsing channel, table parsing channel, formula parsing channel, and chart parsing channel and output unified structured data; The LoRA adaptation module is used to efficiently fine-tune the parameters of the text parsing channel, table parsing channel, formula parsing channel, and chart parsing channel when a new document type or low confidence pattern is detected.