A file cross-page table restoration method and device

By combining adaptive modal determination and geometric constraints with the intersection-union ratio algorithm and column topology feature matching, the problem of accurately restoring cross-page tables in mixed documents is solved, achieving efficient and accurate cross-page table reorganization and logical continuity restoration.

CN122176735APending Publication Date: 2026-06-09BEIJING ZHONGHONG AN TECH DEV CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
BEIJING ZHONGHONG AN TECH DEV CO LTD
Filing Date
2026-03-03
Publication Date
2026-06-09

AI Technical Summary

Technical Problem

Existing technologies struggle to accurately identify and reconstruct cross-page tables when processing complex business documents with mixed modalities, especially in scenarios involving a mix of electronic PDFs and scanned PDFs. Existing methods suffer from misjudgments, large errors, high computational costs, and a lack of logical continuity across pages.

Method used

By employing an adaptive modal determination mechanism, combined with electronic analysis and visual recognition paths, a physical grid structure is constructed. Seamless reorganization of cross-page tables is achieved through geometric constraints and logical continuity verification. The intersection-union algorithm and column topology feature matching are used to accurately match text with cells and perform index offset.

Benefits of technology

It achieves high-quality automated restoration of cross-page tables in mixed document scenarios, reduces computing costs, enhances robustness, restores the logical continuity of business data, and simplifies system integration.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122176735A_ABST
    Figure CN122176735A_ABST
Patent Text Reader

Abstract

The present application relates to a kind of file cross-page table restoration method and device, belong to data processing technical field, by column topological feature matching and line index benchmark offset algorithm, realize the seamless logical reorganization of physical fragmentation table in global data structure, restore the logical continuity of business data;Adaptive modal shunt mechanism is constructed, accurately distinguish electronic and visual modal and call exclusive processing path, avoid the waste of computing power and secondary error caused by blindly calling visual model;Strong geometric constraint processing is applied to the preliminary extraction result of double-path heterogeneous, which is forced to be normalized to standard closed physical grid structure, greatly enhance the robustness of system to deal with complex layout such as broken line and dashed line, decouple the front-end extraction mode and the spatial logic mapping of rear end, significantly reduce the engineering integration difficulty of system, so as to realize the high-quality, automated restoration of complex cross-page table in mixed document scene.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to a method and apparatus for restoring cross-page tables in a document, belonging to the field of data processing technology, and is classified under classification number G06V30*. Background Technology

[0002] In processing complex business documents such as bidding documents, engineering audit documents, and financial statements, tables are the core information carriers. With the development of electronic office, PDF documents in real-world business scenarios often exhibit high modality hybridity. That is, the same document contains both electronic pages directly generated by typesetting software and visual pages formed by scanning after printing and stamping. Among them, the electronic pages have complete text objects and precise vector drawing instructions, while the visual pages only contain pixel bitmaps and lack text objects and vector information.

[0003] Currently, the following two conventional technical approaches are commonly used in this field to restore the table structure in such documents, but both have significant inherent drawbacks: Existing technology one is rule-based PDF internal structure parsing. This type of technology infers table structure, such as lines and rectangles, by parsing the underlying text objects and graphic drawing instructions of the PDF. This technology heavily relies on the document's built-in vector information; once it encounters scanned documents or purely image pages, the algorithm will fail because the vector instructions cannot be extracted. In actual documents, table borders are often composed of numerous scattered drawing instructions. Due to the lack of an effective geometric constraint reconstruction mechanism, existing rules are prone to misjudgment, resulting in unclosed table borders and fragmented structures.

[0004] Existing technology two is end-to-end visual recognition technology based on deep learning. This type of technology renders all PDF pages uniformly as images and uses convolutional neural networks (CNNs) or visual Transformer models for pixel-level segmentation of table regions and cells. However, existing visual technologies lack a pre-configured modality adaptive discrimination mechanism. Forcing the conversion of electronic PDFs, which inherently contain vector coordinates, into images for deep learning models not only consumes enormous inference computing power but also, due to the model's generalization bottleneck, easily breaks down originally clear thin lines or dashed lines, introducing unnecessary secondary visual errors. Furthermore, deep learning outputs are often probability masks or visual bounding boxes, while electronic analysis outputs geometric vector coordinates. Existing technologies lack a mechanism to normalize these coordinates into a unified physical grid structure, forcing subsequent data extraction modules to maintain two completely different processing logics, greatly complicating system engineering.

[0005] Furthermore, regardless of the technology used, existing solutions generally treat a single page as the maximum processing boundary. When a large table spans multiple physical pages, existing technologies often fall into the trap of image-level cross-page stitching. Attempting to visually stitch two pages together, such as at the pixel or physical coordinate level, is extremely difficult and prone to errors. This is because physical barriers such as headers, footers, and margins inevitably exist between adjacent pages, and there may even be scanning tilt and scaling distortions; at the same time, the table header usually appears repeatedly at the top of the continuation page. Existing independent page processing mechanisms cannot recognize this logical relationship, resulting in a complete business data table being incorrectly cut into multiple independent, fragmented tables with duplicate headers, disrupting the continuity of the data's business logic.

[0006] Therefore, existing technologies have shortcomings and need further improvement and refinement. Summary of the Invention

[0007] In view of the shortcomings of the prior art, the purpose of the present invention is to provide a method and apparatus for restoring cross-page tables in a document.

[0008] According to an embodiment of the present invention, a first solution is provided: a method for restoring a cross-page table in a document, comprising the following steps: S1: Obtain the document page to be processed, and parse the object composition features of the document page to determine the document modality of the document page; S2: Based on the document modality, call the corresponding processing path, locate the table area in the document page and construct a physical grid structure through the corresponding processing path. The physical grid structure consists of a closed coordinate set describing the spatial range of the cell. S3: Obtain the text content of the document page, match the text content with the physical grid structure in terms of spatial coordinates, establish the relationship between the text and the cell based on the matching result, and generate a page-level logical list containing row and column index information based on the relationship. S4: Verify the logical continuity between the page-level logical lists of the current document page and the adjacent subsequent document pages. If the verification passes, perform row index offset and table header removal processing on the page-level logical lists of the subsequent document pages, and merge the processed page-level logical lists into the page-level logical lists of the current document page to generate a continuous global cross-page table object.

[0009] Furthermore, the document modality includes electronic parsing modality and visual recognition modality; The document page corresponding to the electronic analysis mode includes text objects and vector drawing objects, while the document page corresponding to the visual recognition mode includes raster image objects or lacks valid text objects.

[0010] Further, the step of parsing the object composition features of the document page to determine the document modality of the document page in step S1 includes: Traverse the object tree of the document page and check whether there are text objects, vector drawing objects and raster image objects in the object tree; If the text object is detected, and at the same time there is a vector drawing object that can form a potential table border, then the document page is determined to be in electronic parsing mode, wherein the vector drawing object includes vector lines and rectangle objects; If the raster image object is detected or no valid text object is detected, the document page is determined to be a visual recognition modality.

[0011] Furthermore, the steps of determining whether there are vector drawing objects in the document page that can form potential table borders, and verifying whether they form actual table borders and constructing the physical grid structure include: Parse the underlying vector drawing instructions of the document page and extract the graphic objects. Filter out non-linear graphic elements from the graphic objects and extract line objects and rectangle objects with horizontal or vertical attributes from the graphic objects to construct an initial set of line segments as potential table borders. For the discrete line segments formed by rendering instructions in the initial line segment set, a line segment merging process based on geometric constraints is performed. The line segment merging process based on geometric constraints includes: determining whether discrete line segments in the same direction simultaneously satisfy collinearity constraints and direction consistency constraints, and whether the Euclidean distance between the endpoints of the line segments is less than a preset distance threshold. Discrete line segments that meet the above constraints are dynamically spliced ​​into a continuous long line of the candidate table in memory. Calculate the spatial coordinates between the long lines of the candidate tables, and determine whether there is a valid intersection between the long lines of the candidate tables in orthogonal directions; If the formed valid intersections can constitute a closed two-dimensional topological enclosure relationship, then it is confirmed that the extracted vector drawing object constitutes a real table border, and the coordinate set corresponding to the closed two-dimensional topological enclosure relationship is extracted and output as a physical mesh structure. The constructed physical grid structure is a set of rectangular coordinate quadruples that describe the spatial range of the smallest closed cell, specifically [x_min, y_min, x_max, y_max].

[0012] Furthermore, the steps in step S2 for the visual recognition processing path invoked for the visual recognition modality include: The document page corresponding to the visual recognition modality is rendered as a document image of uniform resolution; The document image is input into a pre-trained deep learning model for feature extraction, and the deep learning model outputs preliminary visual features including table line segmentation results or cell candidate regions. To address the missing lines and broken boundaries in the preliminary visual features, a geometric constraint algorithm is invoked to perform structural completion on the preliminary visual features. The specific steps of the geometric constraint algorithm include: Discrete line segment pixel features are extracted based on the preliminary visual features; The broken line segments in a collinear state are extended and completed based on the linear fitting algorithm. Based on orthogonal topology rules, connectivity analysis is performed on the intersection points of the extended and completed line segments, and forced closure is performed on the grid boundaries that fail to form closed regions. By integrating the table borders and grid lines after the geometric constraints have been repaired, the physical grid structure consisting of a closed coordinate set is generated.

[0013] Furthermore, step S3 specifically includes: Get the bounding box coordinates of each text object within the document page; Calculate the intersection-union ratio (IoU) between the bounding box of each text object and the coordinate set of each cell in the physical grid structure; The text object is assigned to the cell with the largest intersection-union ratio (IU) that is greater than a preset threshold. A page-level logical list is generated based on the spatial arrangement order of cells in the physical grid structure. Each element in the page-level logical list contains at least: cell content, row start index, row end index, column start index, and column end index.

[0014] Furthermore, the formula for calculating the intersection-union ratio (IUU) between the bounding box of each text object and the coordinate sets of each cell in the physical grid structure is as follows:

[0015] Where IoU represents the intersection-union ratio, The bounding box representing the text object. This represents the bounding box of the cell. This represents the area of ​​the overlapping region between the bounding box of the text object and the bounding box of the cell. This represents the area of ​​the bounding box of the text object. This represents the area of ​​the bounding box of the cell.

[0016] Furthermore, the step S4 of verifying the logical continuity between the current document page and the page-level logical lists of adjacent subsequent document pages includes: Extract the column topology features of the table area at the bottom of the current document page and the column topology features of the table area at the top of the adjacent subsequent document pages. The column topology features include a set of column number and column width ratio. Compare the column topology features of the current document page with those of subsequent document pages to see if they are consistent and whether the difference in column width ratios is within the preset tolerance range. If both the consistency condition and the tolerance range condition are met, the logic continuity verification passes.

[0017] Furthermore, the step of generating consecutive global cross-page table objects in step S4 includes: Identify and remove cell elements with duplicate headers from the page-level logical list of adjacent subsequent document pages; Get the maximum line end index value from the page-level logical list of the current document page as the base offset; Iterate through the page-level logical list of subsequent document pages after removing the table header, and add the baseline offset to the row start index and row end index of each cell; The page-level logical list of subsequent document pages that have completed row index offset processing is appended and merged into the page-level logical list of the current document page to form a unified global cross-page table object.

[0018] According to an embodiment of the present invention, a second solution is provided: a document cross-page table restoration apparatus for applying the document cross-page table restoration method described in any one of the first solutions, the apparatus comprising: The modality parsing module is used to acquire the document page to be processed and parse the object composition features of the document page to determine the document modality of the document page; The grid construction module is used to call the corresponding processing path based on the document modality, locate the table area in the document page and construct a physical grid structure through the corresponding processing path. The physical grid structure consists of a closed coordinate set describing the spatial range of the cell. The logical list generation module is used to obtain the text content of the document page, match the text content with the physical grid structure in terms of spatial coordinates, establish the belonging relationship between the text and the cell based on the matching structure, and generate a page-level logical list containing row and column index information based on the belonging relationship. The cross-page table generation module is used to verify the logical continuity between the page-level logical lists of the current document page and the adjacent subsequent document pages. If the verification is successful, row index offset and table header removal processing are performed on the page-level logical lists of the subsequent document pages. The processed page-level logical lists are then merged into the page-level logical lists of the current document page to generate a continuous global cross-page table object.

[0019] Compared with the prior art, the unique advantages of the technical solution provided in this application are as follows: This invention abandons the easily failing image-level cross-page splicing scheme and creatively achieves seamless logical reorganization of physically fragmented tables in the global data structure through column topology feature matching and row index baseline offset algorithms at the data logic layer, restoring the logical continuity of business data. Simultaneously, this invention constructs an adaptive modal splitting mechanism that accurately distinguishes between electronic and visual modalities and calls dedicated processing paths. This fully leverages the high efficiency and high precision advantages of native vector parsing while avoiding the waste of computing power and secondary errors caused by blindly calling visual models. Furthermore, this invention applies strong geometric constraints to the preliminary extraction results of dual-path heterogeneity, forcibly normalizing them into a standard closed physical grid structure. This significantly enhances the system's robustness against complex layouts such as broken lines and dashed lines, decouples the front-end extraction method from the back-end spatial logic mapping, and significantly reduces the engineering integration difficulty of the system. Thus, it achieves high-quality, automated restoration of complex cross-page tables in mixed document scenarios. Attached Figure Description

[0020] 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 only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0021] in: Figure 1 This is a flowchart illustrating a method for restoring a cross-page table in a document, as shown in one embodiment. Figure 2 This is a structural block diagram of a document cross-page table restoration device in one embodiment; Figure 3 This is a structural block diagram of a computer device in one embodiment. Detailed Implementation

[0022] To enable those skilled in the art to better understand the technical solutions in this application, the technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of the embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0023] Example 1 In practical business scenarios such as bidding documents, engineering audit documents, and financial statements, tables are the core information carriers. With the development of electronic bidding systems, document formats have become a mix of electronic PDFs and scanned PDFs, with many tables spanning multiple pages. Existing table extraction technologies mainly fall into two categories: one is rule-based electronic PDF internal structure parsing technology, which relies on complete text objects and vector drawing objects within the PDF. This technology cannot parse the table structure of scanned PDF files, and it is prone to misjudgment when faced with borders composed of scattered drawing instructions in actual documents, resulting in unclosed borders; the other is deep learning-based end-to-end visual recognition technology, which typically treats all pages as image processing objects. This not only underutilizes the vector information in electronic PDFs and has high computational costs, but it is also sensitive to line breaks and noise. More critically, existing technologies usually process each page as a unit, lacking an analysis mechanism for the continuity of tables between adjacent pages. When tables span multiple pages, they are easily incorrectly split into multiple independent tables.

[0024] To address the technical problems in existing technologies, such as narrow modal applicability, poor noise resistance, and lack of cross-page logical connection mechanisms due to a one-size-fits-all approach, this embodiment provides a method for restoring cross-page tables in files. This method abandons the easily failing image-level cross-page stitching scheme and instead solves the cross-page problem at the data logic layer through index operations of the underlying data structure. Specifically, see [link to relevant documentation]. Figure 1 As shown, the method includes the following steps: S1: Obtain the document page to be processed, and parse the object composition features of the document page to determine the document modality of the document page; To address the complexity of mixed documents, this step introduces an adaptive modality determination mechanism. By analyzing whether the underlying layer of the page contains text / vector objects or only bitmap objects in the pre-processing stage, it provides a basis for subsequent processing, avoiding the huge waste of computing power and secondary precision loss caused by blindly performing image rendering and visual model inference on electronic PDFs in existing technologies, and achieving unified adaptation for electronic PDFs and scanned PDFs.

[0025] S2: Based on the document modality, call the corresponding processing path, locate the table area in the document page and construct a physical grid structure through the corresponding processing path. The physical grid structure consists of a closed coordinate set describing the spatial range of the cell. This step employs a multi-path parallel or selective physical structure perception strategy for different modalities. Whether it directly extracts vector lines by calling the electronic analysis path or performs image segmentation by calling the deep learning vision path, the core mechanism of this step lies in applying geometric constraints to the preliminary extraction results, thereby merging scattered line segments or completing broken lines. This overcomes the problem of incomplete table lines in existing technologies and forces the heterogeneous extraction results from the dual-path front end to be normalized into a standard and unified closed physical grid structure.

[0026] S3: Obtain the text content of the document page, match the text content with the physical grid structure in terms of spatial coordinates, establish the relationship between the text and the cell based on the matching result, and generate a page-level logical list containing row and column index information based on the relationship. After obtaining the closed physical grid structure, a logical relationship is established between the text content and the table structure. Through a spatial coordinate comparison algorithm, discrete text objects are accurately filled into the corresponding cell coordinate sets, and a page-level logical list (Logic List) containing row and column indices (such as row start and row end) is generated. This achieves the transformation from physical coordinates to a computer-readable logical data structure, establishes a stable mapping relationship between structure and text, and solves the problem of text misalignment or loss in existing technologies.

[0027] S4: Verify the logical continuity between the page-level logical lists of the current document page and the adjacent subsequent document pages. If the verification passes, perform row index offset and table header removal processing on the page-level logical lists of the subsequent document pages, and merge the processed page-level logical lists into the page-level logical lists of the current document page to generate a continuous global cross-page table object.

[0028] This step is the core mechanism for resolving the physical fragmentation problem of cross-page tables. Instead of visually stitching the two pages together, it verifies logical consistency by comparing the column topology features of adjacent pages. Once verification is successful, calculations are performed directly in the in-memory data structure to remove redundant duplicate headers from the next page and remap the data row indices of the next page by accumulating offsets based on the maximum row index of the previous page. This cleverly transforms the visual challenge of cross-page stitching into a data structure index calculation problem, thus restoring the complete business data structure at the logical level.

[0029] The method provided in this embodiment can uniformly adapt to multiple document modalities, making it more widely applicable. By fully utilizing vector and visual information and combining geometric constraints, it enhances robustness to broken lines, dotted lines, and complex layouts, resulting in more accurate structure restoration. Most importantly, this solution achieves automatic logical continuity restoration of cross-page tables, avoiding the drawbacks of existing technologies that incorrectly split cross-page tables. It ultimately outputs a standardized, logically continuous global cross-page table object, greatly facilitating the integration and secondary development of subsequent business systems.

[0030] In existing hybrid document processing solutions, the conventional thinking of technicians is to piece together tools: for electronic documents, a parsing tool is called; for scanned documents, an AI model is called, and then two completely different sets of subsequent extraction code are maintained. This thinking leads to an extremely bloated system architecture and makes it very difficult to integrate heterogeneous data because there is no mature tool to unify the processing of discrete line segments output by the parsing tool and pixel masks output by the AI ​​model. The creativity of this invention lies in breaking through this path silo mentality and innovatively introducing forced normalization in the architecture. After adaptive modal splitting in step S1, although parallel extraction is allowed in step S2, the two paths are not left to output independently. Instead, this solution applies low-level geometric constraints to the coarse outputs of both paths, forcing them to converge and reconstruct into a unified physical mesh structure. This hourglass-shaped architecture, which is characterized by wide input and strict output and heterogeneous convergence, allows the logical mapping in step S3 and the cross-page reorganization in step S4 to completely ignore the physical source of the front-end document. When faced with the problem of mixed modalities, those skilled in the art usually tend to train a universal AI model. However, this invention solves the problem with minimal computational cost by decoupling the architecture and normalizing the standard data structure, demonstrating outstanding system-level architectural wisdom and significant progress.

[0031] For the reconstruction of cross-page tables, there has long been a technical bias in the field, namely that cross-page tables are images cut off by physical pagination. Therefore, image processing techniques (such as cropping headers and footers, pixel alignment, and image stitching) must be used to reassemble them into a complete long image before table recognition. However, due to practical factors such as scanning tilt, inconsistent scaling ratios, and interference from duplicate table headers, this visual stitching approach not only consumes huge amounts of computational power but is also extremely prone to failure due to a misalignment of a few pixels. This embodiment abandons the image-level cross-page stitching approach and completes the transformation from the visual processing layer to the data logic layer. Step S4 in this embodiment is no longer limited to the visual representation of physical pages, but after step S3 converts the physical grid into a page-level logical list, it directly operates on the computer abstract data structure in memory. Through index operations of the underlying data structure, that is, using the maximum row index of the previous page as the base offset, it is directly added to the start / end index of the row of the subsequent page, and combined with logical table header removal, the table stitching can be completed quickly. This technical concept of cleverly transforming the complex two-dimensional visual alignment problem into a one-dimensional array index offset problem is not found in existing technologies. It makes merging cross-page tables as precise and stable as a mathematical formula, avoiding interference caused by physical page deformation and layout misalignment. This simplification achieves unexpected technical results, transcending the cognitive boundaries of those skilled in the art and demonstrating a high level of creativity.

[0032] Example 2

[0033] This embodiment is a detailed refinement of steps S1 and S2 in Embodiment 1, mainly explaining how the system performs traffic splitting through an adaptive modal determination mechanism, and how the dual heterogeneous processing paths ultimately generate a unified physical mesh structure through geometric constraints.

[0034] For the input document page, the system first traverses the underlying object tree of the document page to detect the presence of text objects, vector drawing objects such as lines and rectangles, and raster image objects. Based on the parsing results of the object tree, the system executes strict modal determination logic: If the system detects the text object and simultaneously there are vector drawing objects that can form potential table borders, then the document page is determined to be in electronic parsing mode. This mode means that the page retains the high-precision coordinate data of the native typesetting software, allowing for direct geometric-level structural reconstruction.

[0035] If the system detects that the document page is mainly composed of raster image objects, such as a pure scan, or if there are a few objects but no valid text objects are detected (i.e., the text layer is missing and text coordinates cannot be directly extracted), then the document page is determined to be in a visual recognition modality. This modality means that the system must use computer vision technology to read the page at the pixel level.

[0036] Based on the document modality determined above, the system will call the corresponding processing path to locate the table area within the document page and construct a physical grid structure.

[0037] Path A: The electronic analysis path for the electronic analysis mode is as follows.

[0038] In the electronic parsing mode, in order to solve the problem that rendering instructions in native PDFs often split a long table line into multiple discrete short lines, the system performs the following low-level verification and reconstruction steps: The underlying vector drawing instructions of the document page are parsed and graphic objects are extracted. In this process, non-linear graphic elements such as curves are actively filtered out, and only straight line objects and rectangle objects with horizontal or vertical attributes are extracted to construct an initial set of line segments as potential table borders.

[0039] For discrete line segments in the initial set of line segments, the system performs a strict triple geometric constraint check: it checks whether discrete line segments in the same direction simultaneously satisfy collinearity constraints and direction consistency constraints, and whether the Euclidean distance between the endpoints of the line segments is less than a preset distance threshold. The system dynamically concatenates the discrete line segments that meet the above constraints into a continuous candidate table long line in memory.

[0040] Calculate the spatial coordinates between the candidate table lines and determine whether orthogonal candidate table lines form valid intersections. If the valid intersections form a closed two-dimensional topological enclosure, it confirms that the initially extracted vector drawing object is not an ordinary underline or decorative line, but constitutes a real table border.

[0041] Extract the coordinate set corresponding to the closed two-dimensional topological enclosure relationship and output it as a physical grid structure. The physical grid structure is specifically represented as a set containing multiple rectangular coordinate quadruples describing the spatial range of the smallest closed cell, with the format uniformly [x_min, y_min, x_max, y_max].

[0042] Path B: The visual recognition path for the visual recognition modality is as follows.

[0043] In visual recognition modalities, deep learning models often suffer from probabilistic defects such as missing lines and broken boundaries. To address this, the system forcibly applies a deterministic geometric constraint algorithm after the AI ​​model's inference: First, the document page corresponding to the visual recognition modality is rendered into a document image with a uniform resolution. Then, the document image is input into a pre-trained deep learning model for feature extraction. The deep learning model outputs preliminary visual features containing table line segmentation results or cell candidate regions.

[0044] The deep learning model used in this embodiment is a table-structured detection network. The overall architecture consists of three layers: backbone feature extraction, boundary enhancement, and instance segmentation. The processing logic of each layer and the feature correspondence with the input image are as follows: The backbone feature extraction layer uses an improved ResNet-50 as the main feature extraction network to perform four levels of downsampling feature extraction on the input document image: The first layer has a stride of 2 and outputs a 1 / 2 resolution feature map, responsible for extracting low-order visual elements in the image, including basic pixel features such as stroke edges, ink dot textures, and local line inflection points; the second layer has a stride of 2 and outputs a 1 / 4 resolution feature map, responsible for extracting mid-order structural features, including continuous line segments in the horizontal / vertical direction, cell corners, and short-distance line endpoints; the third layer has a stride of 2 and outputs a 1 / 8 resolution feature map, responsible for extracting high-order semantic features, including the overall arrangement of table rows / columns, the distribution features of the table header and body regions, and the cross-domain structure of merged cells; the fourth layer performs bidirectional fusion of the multi-scale features output by the first three layers, aligning high-level semantic features with low-level edge features through upsampling and skip connection mechanisms, and outputting a fused feature map that combines global semantic information and local detail information.

[0045] The boundary enhancement layer is connected to the table boundary enhancement branch after the backbone feature extraction layer to perform boundary enhancement processing on the fused feature map: deformable convolution is used to perform convolution operation on the fused feature map to adaptively capture the irregular table line features caused by page tilt and curvature, and output the table line segmentation mask. The value of each pixel in the mask represents the probability that the position belongs to the table border.

[0046] The instance segmentation layer, building upon the boundary enhancement layer, incorporates an instance segmentation branch to achieve precise cell localization: It employs a center keypoint-based detection algorithm to predict cell centers on the fused feature map, outputting predictions for each cell's center coordinates, width, height, row index offset, and column index offset. The cell center predictions are logically aligned with the table line segmentation mask: for each predicted cell center, the four boundary coordinates of the cell are determined based on the surrounding line segmentation results, forming candidate bounding boxes. Non-maximum suppression is applied to the candidate bounding boxes, ultimately outputting the set of closed boundary coordinates for each cell, i.e., the preliminary visual features.

[0047] The entire model's inference process achieves an end-to-end mapping from the original document image to structured cell coordinates: the input is a single-channel grayscale document image, and the output is a list of N cell boundary coordinate quadruples, where each element is in the format [x1, y1, x2, y2], representing the pixel coordinates of the top-left and bottom-right corners of the cell, providing structured input for subsequent geometric constraint completion.

[0048] To address the breakage defects present in the initial visual features, the system extracts discrete line segment pixel features. Subsequently, it calls a straight line fitting algorithm to perform extension and completion processing on the broken line segments that are collinear. Finally, based on orthogonal topology rules, it performs connectivity analysis on the intersection points of the extended and completed line segments and performs forced closure processing on the grid boundaries that fail to form closed regions.

[0049] Orthogonal topology rules are deterministic constraint rules designed for the geometric characteristics of table structures. They are used to verify and repair the topological connectivity of broken line segments output by deep learning models, and specifically include the following three constraints: Orthogonal constraint: All line segments belonging to the table structure must have a strictly horizontal or vertical orientation. Line segments whose orientation does not conform to this constraint are judged as noise and are removed. Intersection closure constraint: The two endpoints of any horizontal line segment must intersect with two different vertical line segments respectively; the two endpoints of any vertical line segment must intersect with two different horizontal line segments respectively; for line segment endpoints that do not meet this closure condition, the nearest orthogonal line segment is searched along its extension direction. If the search distance is less than a preset threshold, the endpoint is forcibly connected to the searched orthogonal line segment to form a closed intersection point. Grid consistency constraints: The vertical distance between all horizontal line segments should conform to the statistical distribution of table row height, and the horizontal distance between all vertical line segments should conform to the statistical distribution of table column width; isolated line segments whose distances deviate significantly from the statistical distribution are identified as false borders and removed to ensure that the final closed area conforms to the grid arrangement characteristics of a real table.

[0050] By applying the constraints of the above orthogonal topology rules, defects such as broken lines and isolated line segments in the output of deep learning models can be effectively repaired. The scattered line segment pixel features can be reconstructed into a closed physical grid structure that conforms to the geometric characteristics of a table, thereby improving the accuracy of table structure reconstruction.

[0051] By integrating the table borders and grid lines after the geometric constraints have been corrected, the coordinate system of the closed region is extracted, and finally a physical grid structure composed of closed coordinate sets is generated.

[0052] Through steps S1 and S2 detailed in this embodiment, the present invention not only achieves intelligent modal splitting, but more importantly, regardless of whether the front-end input is precise but fragmented vector instructions or fuzzy and defective pixel features, the system ultimately outputs a physical mesh structure with completely consistent data structure through a powerful geometric constraint post-processing algorithm. This forced normalization of heterogeneous data solves the underlying data obstacles in subsequent steps S3 (text mapping) and S4 (cross-page reorganization).

[0053] Example 3 This embodiment is a detailed refinement of steps S3 and S4 in Embodiment 1, focusing on how the system accurately mounts text content into the physical grid to form a single-page logical structure, and finally completes the seamless stitching of cross-page tables through index operations of the underlying data structure.

[0054] After outputting the standardized physical grid structure in step S2, the system needs to accurately assign the detached text content to the corresponding cells. Specifically, the following low-level computer step S3 is executed: First, the system obtains the bounding box coordinates of each text object within the document page, such as a piece of text or a number, and simultaneously extracts the coordinate set of each cell in the physical grid structure as the bounding box of the cell.

[0055] Secondly, to overcome text overflow issues caused by scanning tilt or minor layout misalignment, the system does not use a simple center point inclusion judgment, but instead introduces the intersection-union ratio (IUGR) algorithm. For any given text object, the low-level computer instructions calculate the IUGR value between its bounding box and the bounding boxes of each candidate cell. The specific formula for calculating the IUGR is as follows:

[0056] Where IoU represents the intersection-union ratio, The bounding box representing the text object. This represents the bounding box of the cell. This represents the area of ​​the overlapping region between the bounding box of the text object and the bounding box of the cell. This represents the area of ​​the bounding box of the text object. This represents the area of ​​the bounding box of the cell.

[0057] Secondly, the system assigns text objects to target cells with the largest intersection-union ratio (IUR) greater than a preset threshold (e.g., 0.5). After mapping all text content, the system generates a page-level logical list based on the spatial arrangement of cells in the physical grid structure. Each element in this list is structured and contains at least five key pieces of information: cell content, row start index, row end index, column start index, and column end index. This structure not only records basic cells but also accommodates and uniformly represents the topological span of complex merged cells.

[0058] After obtaining the independent page-level logical lists for each page, the system initiates the cross-page merging mechanism. This stage abandons the traditional image-level cross-page stitching scheme and performs operations entirely at the memory-based data logic layer, i.e., step S4: The system first verifies the logical continuity between the page-level logical lists of the current document page (Page N) and the adjacent subsequent document page (Page N+1). The specific judgment steps are as follows: Extract the column topology features of the table area at the bottom of the current document page, and the column topology features of the table area at the top of the adjacent subsequent document pages. The column topology features mainly include the set of column number and column width ratio.

[0059] Compare the column topology features of the current document page with those of subsequent document pages to see if they are consistent, and whether the difference in column width ratio of the corresponding columns is within the preset tolerance range. The preset tolerance range is used to absorb minor deformations caused by page bending or stretching in the scanned document.

[0060] If both the consistency condition and the tolerance range condition are met, the system determines that the tables on these two pages are logically continuous, i.e., they belong to the same cross-page table, and the verification passes.

[0061] After successful verification, the system performs a critical data structure reorganization operation on the logical list of subsequent document pages (Page N+1): Identify cells with duplicate headers in the page-level logical lists of adjacent subsequent document pages and remove them from the lists to avoid business data redundancy. Obtain the maximum row end index value in the page-level logical list of the current document page (Page N), for example, the index of the last row on the current page is 20, and use this as the base offset. Traverse the page-level logical lists of subsequent document pages after removing the headers, adding the base offset to the row start and end indices of each data cell. For example, the row index of the original first row of a continuation page is updated to 21 after adding an offset of 20. The page-level logical lists of subsequent document pages with the row index offset processed are then directly appended and merged into the page-level logical list of the current document page. Since the row indices are now continuous, the two physically separated table fragments are seamlessly connected in the data structure, ultimately generating a unified, continuous global cross-page table object.

[0062] Through steps S3 and S4 detailed in this embodiment, the present invention cleverly solves the problem of cross-page table processing. The IoU formula in step S3 ensures high fault tolerance and high accuracy for text mounting under complex layouts; while step S4 completes the table stitching through simple column topology matching and index addition operations of the underlying array. The entire process does not require any complex image cropping, alignment, and rendering operations, has extremely low computational complexity, and avoids header and footer interference and physical page misalignment. The final output global cross-page table object can be directly called and parsed by downstream business systems, possessing extremely high engineering application value.

[0063] Example 4

[0064] When the input document is a scanned copy of a thickly bound book or an audit report, step S1 determines it to be a visual recognition modality. Severe nonlinear surface deformation occurs near the binding spine. This physical deformation causes the physical mesh structure extracted in step S2 to become distorted, no longer a standard horizontal / vertical rectangle. In this case, if a standard, parallel-axis-based text bounding box is directly used to calculate the intersection-union ratio (IoU) with the distorted cell mesh in step S3, the intersection area calculation will be severely distorted, leading to errors where text is incorrectly mapped to adjacent cells that are misaligned vertically.

[0065] In this embodiment, before performing spatial coordinate matching between the text content and the physical grid structure in step S3, the system adds an adaptive grid calibration and coordinate flattening step, specifically including: Extract the horizontal grid lines from the physical grid structure generated in step S2, and use a polynomial curve fitting algorithm to calculate the overall curvature field of the document page, such as least squares quadratic / cubic fitting. Based on the curvature field, a reverse spatial perspective transformation matrix is ​​constructed; using this matrix, the bounding box coordinates of all text objects within the document page, as well as all closed coordinate sets in the physical grid structure, are synchronously calculated for reverse flattening projection, and mapped to a normalized two-dimensional flattening coordinate system that eliminates deformation. In the standardized two-dimensional flattened coordinate system, the IoU formula calculation in the aforementioned embodiment three is performed, and the page-level logical list is generated.

[0066] This embodiment converts image-level deformation correction and dimensionality reduction into coordinate-level curvature inverse projection. It does not alter the original image pixels, saving significant rendering computational power, and only performs mathematical transformations on the extracted coordinate system. Even with extremely distorted, heavy scanned documents, it ensures accurate spatial mapping between text and the mesh, greatly improving the system's robustness in extreme scenarios under visual modalities.

[0067] Example 5 In financial, auditing, or large-scale engineering cost detail tables, to meet human reading habits, typesetting systems often forcibly insert a "Carryover to Next Page / Subtotal" row at the last line of the previous page and a "Carryover from Previous Page / Previous Page" row below the table header on the next page when encountering page breaks. If step S4 only performs geometric topology matching and header removal, these pagination statistics artifacts located inside the table body will not be recognized. They will be merged into the global page break table object as normal business data rows as the row index offset is calculated. This will severely disrupt the data accounting logic of downstream business systems.

[0068] In this embodiment, in step S4, the row index offset and header removal processing for the page-level logical list of subsequent document pages is performed. Before the row index offset calculation, a pagination statistics artifact semantic filtering and dynamic offset correction step is added, specifically including: Extract the text features of the preset number of lines at the end of the logical list of the current document page, and the text features of the preset number of lines at the top of the logical list of subsequent document pages; use a preset regular expression library, including keyword features such as previous page, next page, and carry-over, to perform semantic regular expression matching on them.

[0069] If a match is found, the matched logical list element is determined to be a pagination statistics artifact, and it is logically removed from the corresponding page-level logical list.

[0070] When obtaining the baseline offset of the current document page, instead of directly using the maximum line-end index value, the maximum line-end index value of the actual business data of the current page after removing tail statistical artifacts is obtained and updated as the new dynamic baseline offset. Subsequently, this dynamic baseline offset is used to perform row index accumulation on the data of subsequent pages (which have also had artifacts removed).

[0071] This embodiment overcomes the limitations of purely geometric topology matching by introducing lightweight business semantic awareness at the data structure reorganization layer. It not only stitches together cross-page tables in both physical and logical dimensions but also achieves purity cleaning in the business data dimension. By dynamically correcting the baseline offset, it ensures that the final generated global cross-page table is not only structurally continuous but also contains rigorous and uncontaminated data, fully meeting the data extraction accuracy requirements for financial / audit levels.

[0072] Example 6 See Figure 2 As shown, this embodiment provides a document cross-page table restoration device for applying the document cross-page table restoration method described in any one of embodiments one to five. The device includes: Modality parsing module 100 is used to acquire a document page to be processed and parse the object composition features of the document page to determine the document modality of the document page; The grid construction module 200 is used to call the corresponding processing path based on the document modality, locate the table area in the document page and construct a physical grid structure through the corresponding processing path. The physical grid structure is composed of a closed coordinate set describing the spatial range of the cell. The logical list generation module 300 is used to obtain the text content of the document page, match the text content with the physical grid structure in terms of spatial coordinates, establish the belonging relationship between the text and the cell based on the matching structure, and generate a page-level logical list containing row and column index information based on the belonging relationship. The cross-page table generation module 400 is used to verify the logical continuity between the page-level logical lists of the current document page and the adjacent subsequent document pages. If the verification is successful, the row index offset and table header removal processing is performed on the page-level logical lists of the subsequent document pages. The processed page-level logical lists are then merged into the page-level logical lists of the current document page to generate a continuous global cross-page table object.

[0073] This embodiment abandons the easily failing image-level cross-page splicing scheme and creatively achieves seamless logical reorganization of physically fragmented tables in the global data structure through column topology feature matching and row index baseline offset algorithms at the data logic layer, restoring the logical continuity of business data. Simultaneously, this invention constructs an adaptive modal splitting mechanism that accurately distinguishes between electronic and visual modalities and calls dedicated processing paths. This fully leverages the high efficiency and high precision advantages of native vector parsing while avoiding the waste of computing power and secondary errors caused by blindly calling visual models. Furthermore, this invention applies strong geometric constraints to the preliminary extraction results of the dual-path heterogeneity, forcibly normalizing them into a standard closed physical grid structure. This significantly enhances the system's robustness against complex layouts such as broken lines and dashed lines, decouples the front-end extraction method from the back-end spatial logic mapping, and significantly reduces the engineering integration difficulty of the system. Thus, it achieves high-quality, automated restoration of complex cross-page tables in mixed document scenarios.

[0074] Figure 3 An internal structural diagram of a computer device in one embodiment is shown. This computer device can specifically be a terminal or a server. Figure 3 As shown, the computer device includes a processor, memory, and a network interface connected via a system bus. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system and may also store a computer program. When executed by the processor, this computer program enables the processor to implement a method for restoring a file's cross-page table. The memory may also store a computer program, which, when executed by the processor, enables the processor to implement the same method. Those skilled in the art will understand that... Figure 3 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0075] In one embodiment, a computer device is provided, including a memory and a processor, the memory storing a computer program that, when executed by the processor, causes the processor to perform the following steps: S1: Obtain the document page to be processed, and parse the object composition features of the document page to determine the document modality of the document page; S2: Based on the document modality, call the corresponding processing path, locate the table area in the document page and construct a physical grid structure through the corresponding processing path. The physical grid structure consists of a closed coordinate set describing the spatial range of the cell. S3: Obtain the text content of the document page, match the text content with the physical grid structure in terms of spatial coordinates, establish the relationship between the text and the cell based on the matching result, and generate a page-level logical list containing row and column index information based on the relationship. S4: Verify the logical continuity between the page-level logical lists of the current document page and the adjacent subsequent document pages. If the verification passes, perform row index offset and table header removal processing on the page-level logical lists of the subsequent document pages, and merge the processed page-level logical lists into the page-level logical lists of the current document page to generate a continuous global cross-page table object.

[0076] In one embodiment, a computer-readable storage medium is provided storing a computer program that, when executed by a processor, causes the processor to perform the following steps: S1: Obtain the document page to be processed, and parse the object composition features of the document page to determine the document modality of the document page; S2: Based on the document modality, call the corresponding processing path, locate the table area in the document page and construct a physical grid structure through the corresponding processing path. The physical grid structure consists of a closed coordinate set describing the spatial range of the cell. S3: Obtain the text content of the document page, match the text content with the physical grid structure in terms of spatial coordinates, establish the relationship between the text and the cell based on the matching result, and generate a page-level logical list containing row and column index information based on the relationship. S4: Verify the logical continuity between the page-level logical lists of the current document page and the adjacent subsequent document pages. If the verification passes, perform row index offset and table header removal processing on the page-level logical lists of the subsequent document pages, and merge the processed page-level logical lists into the page-level logical lists of the current document page to generate a continuous global cross-page table object.

[0077] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and RAMbus dynamic RAM (RDRAM), etc.

[0078] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0079] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.

Claims

1. A method for restoring a cross-page table in a document, characterized in that, Includes the following steps: Step S1: Obtain the document page to be processed, and parse the object composition features of the document page to determine the document modality of the document page; Step S2: Based on the document modality, call the corresponding processing path, locate the table area in the document page and construct a physical grid structure through the corresponding processing path. The physical grid structure is composed of a closed coordinate set describing the spatial range of the cell. Step S3: Obtain the text content of the document page, match the text content with the physical grid structure in terms of spatial coordinates, establish the relationship between the text and the cell based on the matching result, and generate a page-level logical list containing row and column index information based on the relationship. Step S4: Verify the logical continuity between the page-level logical lists of the current document page and the adjacent subsequent document pages. If the verification passes, perform row index offset and table header removal processing on the page-level logical lists of the subsequent document pages, and merge the processed page-level logical lists into the page-level logical lists of the current document page to generate a continuous global cross-page table object.

2. The method for restoring cross-page tables in a document according to claim 1, characterized in that, The document modality includes electronic parsing modality and visual recognition modality; The document page corresponding to the electronic analysis mode includes text objects and vector drawing objects, while the document page corresponding to the visual recognition mode includes raster image objects or lacks valid text objects.

3. The method for restoring cross-page tables in a document according to claim 2, characterized in that, The step S1, which involves parsing the object composition features of the document page to determine the document modality of the document page, includes: Traverse the object tree of the document page and check whether there are text objects, vector drawing objects and raster image objects in the object tree; If the text object is detected, and at the same time there is a vector drawing object that can form a potential table border, then the document page is determined to be in electronic parsing mode, wherein the vector drawing object includes vector lines and rectangle objects; If the raster image object is detected or no valid text object is detected, the document page is determined to be a visual recognition modality.

4. The method for restoring cross-page tables in a document according to claim 3, characterized in that, The steps for determining whether there are vector drawing objects in the document page that can form potential table borders, verifying whether they form actual table borders, and constructing the physical grid structure include: Parse the underlying vector drawing instructions of the document page and extract the graphic objects. Filter out non-linear graphic elements from the graphic objects and extract line objects and rectangle objects with horizontal or vertical attributes from the graphic objects to construct an initial set of line segments as potential table borders. For the discrete line segments formed by rendering instructions in the initial line segment set, a line segment merging process based on geometric constraints is performed. The line segment merging process based on geometric constraints includes: determining whether discrete line segments in the same direction simultaneously satisfy collinearity constraints and direction consistency constraints, and whether the Euclidean distance between the endpoints of the line segments is less than a preset distance threshold. Discrete line segments that meet the above constraints are dynamically spliced ​​into a continuous long line of the candidate table in memory. Calculate the spatial coordinates between the long lines of the candidate tables, and determine whether there is a valid intersection between the long lines of the candidate tables in orthogonal directions; If the formed valid intersections can constitute a closed two-dimensional topological enclosure relationship, then it is confirmed that the extracted vector drawing object constitutes a real table border, and the coordinate set corresponding to the closed two-dimensional topological enclosure relationship is extracted and output as a physical mesh structure. The constructed physical grid structure is a set of rectangular coordinate quadruples that describe the spatial range of the smallest closed cell, specifically [x_min, y_min, x_max, y_max].

5. The method for restoring cross-page tables in a document according to claim 3, characterized in that, Step S2, which outlines the visual recognition processing path for visual recognition modality invocation, includes the following steps: The document page corresponding to the visual recognition modality is rendered as a document image of uniform resolution; The document image is input into a pre-trained deep learning model for feature extraction, and the deep learning model outputs preliminary visual features including table line segmentation results or cell candidate regions. To address the missing lines and broken boundaries in the preliminary visual features, a geometric constraint algorithm is invoked to perform structural completion on the preliminary visual features. The specific steps of the geometric constraint algorithm include: Discrete line segment pixel features are extracted based on the preliminary visual features; The broken line segments in a collinear state are extended and completed based on the linear fitting algorithm. Based on orthogonal topology rules, connectivity analysis is performed on the intersection points of the extended and completed line segments, and forced closure is performed on the grid boundaries that fail to form closed regions. By integrating the table borders and grid lines after the geometric constraints have been repaired, the physical grid structure consisting of a closed coordinate set is generated.

6. The method for restoring cross-page tables in a document according to claim 1, characterized in that, Step S3 specifically includes: Get the bounding box coordinates of each text object within the document page; Calculate the intersection-union ratio (IoU) between the bounding box of each text object and the coordinate set of each cell in the physical grid structure; The text object is assigned to the cell with the largest intersection-union ratio (IU) that is greater than a preset threshold. A page-level logical list is generated based on the spatial arrangement order of cells in the physical grid structure. Each element in the page-level logical list contains at least: cell content, row start index, row end index, column start index, and column end index.

7. The method for restoring cross-page tables in a document according to claim 6, characterized in that, The formula for calculating the intersection-union ratio (IoU) between the bounding box of each text object and the coordinate set of each cell in the physical grid structure is as follows: ; Where IoU represents the intersection-union ratio, The bounding box representing the text object, This represents the bounding box of the cell. This represents the area of ​​the overlapping region between the bounding box of the text object and the bounding box of the cell. This represents the area of ​​the bounding box of the text object. This represents the area of ​​the bounding box of the cell.

8. The method for restoring cross-page tables in a document according to claim 1, characterized in that, The step S4, which verifies the logical continuity between the current document page and the page-level logical lists of adjacent subsequent document pages, includes: Extract the column topology features of the table area at the bottom of the current document page and the column topology features of the table area at the top of the adjacent subsequent document pages. The column topology features include a set of column number and column width ratio. Compare the column topology features of the current document page with those of subsequent document pages to see if they are consistent and whether the difference in column width ratios is within the preset tolerance range. If both the consistency condition and the tolerance range condition are met, the logic continuity verification passes.

9. The method for restoring cross-page tables in a document according to claim 1, characterized in that, The step of generating consecutive global cross-page table objects in step S4 includes: Identify and remove cell elements with duplicate headers from the page-level logical list of adjacent subsequent document pages; Get the maximum line end index value from the page-level logical list of the current document page as the base offset; Iterate through the page-level logical list of subsequent document pages after removing the table header, and add the baseline offset to the row start index and row end index of each cell; The page-level logical list of subsequent document pages that have completed row index offset processing is appended and merged into the page-level logical list of the current document page to form a unified global cross-page table object.

10. A device for restoring cross-page tables in a document, characterized in that, The apparatus for restoring cross-page tables in a document using any one of claims 1 to 9, the apparatus comprising: The modality parsing module is used to acquire the document page to be processed and parse the object composition features of the document page to determine the document modality of the document page; The grid construction module is used to call the corresponding processing path based on the document modality, locate the table area in the document page and construct a physical grid structure through the corresponding processing path. The physical grid structure consists of a closed coordinate set describing the spatial range of the cell. The logical list generation module is used to obtain the text content of the document page, match the text content with the physical grid structure in terms of spatial coordinates, establish the belonging relationship between the text and the cell based on the matching structure, and generate a page-level logical list containing row and column index information based on the belonging relationship. The cross-page table generation module is used to verify the logical continuity between the page-level logical lists of the current document page and the adjacent subsequent document pages. If the verification is successful, row index offset and table header removal processing are performed on the page-level logical lists of the subsequent document pages. The processed page-level logical lists are then merged into the page-level logical lists of the current document page to generate a continuous global cross-page table object.