Table identification reconstruction method and system, terminal and medium

By using multi-scale segmentation and adaptive clustering algorithms to process large-size table images, the problems of low recognition accuracy and difficulty in cross-page stitching in traditional techniques are solved, and high-precision structured data generation is achieved.

CN121600533APending Publication Date: 2026-03-03INSPUR YUNZHOU (SHANDONG) IND INTERNET CO LTD

Patent Information

Application Number
CN202511465984.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-14
Publication Date
2026-03-03

AI Technical Summary

Technical Problem

Existing technologies struggle to process high-resolution, large-size table images, resulting in the loss of detailed information, decreased recognition accuracy, and a lack of adaptability to complex tables and cross-page splicing mechanisms, making it difficult to understand the logical relationships and semantic information of the tables.

Method used

By using multi-scale segmentation and parallel processing, the table image is segmented into multiple sub-images. An adaptive clustering algorithm is used to identify cell types. A multi-dimensional verification mechanism is combined to perform cross-page stitching, and semantic analysis is integrated to generate structured data.

Benefits of technology

It achieves high-precision recognition of tables of any size, automatically distinguishes complex cell structures, ensures the integrity and consistency of table data, improves recognition accuracy and generalization ability, and breaks through the limitations of traditional technologies.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121600533A_ABST
    Figure CN121600533A_ABST
Patent Text Reader

Abstract

The invention relates to the field of computer vision, and particularly provides a table recognition reconstruction method and system, a terminal and a medium, and the method comprises the steps: firstly decomposing a large-size table image into a plurality of overlapped sub-images, and carrying out the table structure detection and OCR character recognition of each sub-image through parallel recognition; then, sub-graph recognition results are integrated through a coordinate mapping and confidence coefficient weighted fusion algorithm, and boundary errors are eliminated; then, automatically distinguishing common cells based on an area clustering algorithm, merging the cells and a header region, and reconstructing a complete table logic structure; further understanding header semantics through a natural language model and repairing identification errors; and finally, realizing intelligent splicing and standardized output of the cross-page table. According to the method, the memory limitation of the traditional OCR technology is broken through, an oversized table can be processed, the recognition accuracy of a complex structure is improved, and the digitization efficiency of professional documents such as financial statements and engineering drawings is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer vision, specifically to a table recognition and reconstruction method, system, terminal, and medium. Background Technology

[0002] The demand for converting tabular information in paper documents into structured data is growing, but related table recognition technologies suffer from the following problems: Traditional OCR systems, limited by memory and computing resources, cannot directly process high-resolution, large-size table images, such as engineering drawings and financial statements. Related technologies often employ downsampling, leading to the loss of detailed information and a significant drop in recognition accuracy. For complex tables containing merged cells, nested tables, and irregular borders, existing methods often require manually preset rules or templates, lacking adaptability and generalization. When tables span multiple pages or require stitching together multiple images, related technologies lack effective stitching and alignment mechanisms, easily resulting in duplicate recognition or omissions. Furthermore, related technologies primarily focus on the physical structure of the table, neglecting its logical relationships and semantic information, making it difficult to accurately understand the correspondence between table headers and data areas. Summary of the Invention

[0003] To address the aforementioned issues, this invention provides a table recognition and reconstruction method, system, terminal, and medium. It achieves high-precision recognition of ultra-large tables through multi-scale segmentation and parallel processing, automatically parses complex table structures based on an adaptive clustering algorithm, completes intelligent splicing of cross-page tables by combining a multi-dimensional verification mechanism, and integrates semantic analysis to improve data usability, ultimately outputting highly accurate structured table data.

[0004] In a first aspect, the technical solution of the present invention provides a table recognition and reconstruction method, comprising the following steps: Based on the size of the table image and the preset reference unit size, the table image is divided into multiple sub-images with a certain range of overlap between adjacent sub-images. The segmentation information of each sub-image is recorded, including offset coordinates, size information and overlap area markings. Parallel local recognition processing is performed on the sub-image, including selecting a matching table recognition model through a table classification model, recognizing the table structure information of the sub-image through the table recognition model, and performing OCR processing to obtain OCR text data; the table structure information includes the number of rows and columns, cell boundary coordinates, and cross-row and cross-column information of merged cells; the OCR text data includes text content, text coordinates, text attributes, confidence scores, and logical grouping information; Based on the offset coordinates of the sub-figures, the local coordinates of each sub-figure are converted into global coordinates, and deduplication and fusion are performed based on the overlapping area markers and OCR text data to obtain complete table structure information and OCR text data. The complete table structure information and OCR text data are matched to extract cell area, aspect ratio, and text density features. Based on these features, an adaptive clustering algorithm is used to identify cell types and distinguish between ordinary cells, merged cells, and header areas. Reconstruct the logical structure of the table based on the cell classification results, including row and column topology, cross-row and cross-column information of merged cells, and mapping relationship between cells and OCR text; Semantic analysis is performed on the reconstructed table to identify the meaning of the table headers and data types, and data that is incorrectly identified or missing is repaired based on the context. If the table spans multiple pages, the table will be automatically spliced ​​and aligned through column alignment analysis, header similarity matching, and content pattern consistency detection. Standardized structured tabular data is generated based on logical structure, semantic analysis results, and cross-page splicing results.

[0005] In an optional implementation, the table image is divided into multiple sub-images based on its size and a preset reference unit size, specifically including: Get the dimensions of the table image, including the total width and total height; Using a preset reference unit size as the dividing unit, the number of horizontal divisions is calculated based on rounding up. and the number of vertical divisions ; according to and Divide the table image into An initial subgraph; A fixed-ratio overlap area is set between adjacent sub-images, and the offset coordinates of the sub-images in the original table image are calculated based on the preset reference unit size and the fixed ratio. Perform Hough transform detection on each sub-image to identify the distribution of table lines. If the segmentation boundary of the middle sub-image cuts the table lines or text area, dynamically adjust the segmentation position and record the offset coordinates and overlapping area markers of the adjusted sub-image. Segmentation information is generated for each subgraph, including offset coordinates, size information, and overlapping region markers; the overlapping region markers include the coordinate range of the overlapping region and the association markers of adjacent subgraphs.

[0006] In an optional implementation, parallel local recognition processing is performed on the subgraph, including selecting a matching table recognition model through a table classification model, and recognizing the table structure information of the subgraph through the table recognition model, specifically including: The subgraph is input into a pre-trained table classification model, which is a binary classifier based on a convolutional neural network. The table classification model outputs the classification probability of a subgraph belonging to a wired table or a wireless table, and selects the corresponding table recognition model based on the table type with the highest probability. Use a table recognition model to process subgraphs to obtain table structure information.

[0007] In an optional implementation, after recognizing the table structure information of the sub-image using a table recognition model and performing OCR processing to obtain OCR text data, the following steps are also included: Based on the overlapping region markers of subgraphs, an information transmission channel is established between adjacent subgraphs through a shared memory mechanism. The overlapping region markers include the association relationship between adjacent subgraphs and the overlapping coordinate range. The recognition results within the overlapping areas of each sub-image generated by parallel local recognition are cached in real time through the information transmission channel. Compare and analyze the overlapping region identification results of the cache to detect whether there are boundary coordinate deviations or text content differences in the identification results of different sub-images for the same region, and mark the conflicting results with differences. Based on the confidence scores in the recognition results, a confidence-weighted fusion algorithm is used to fuse the conflicting results of the markers, calculate the unified cell boundary coordinates and text coordinates, and generate the fused overlapping area recognition results.

[0008] In an optional implementation, the local coordinates of each sub-image are converted to global coordinates based on the offset coordinates of the sub-images, and deduplication and fusion are performed based on overlapping region markers and OCR text data, specifically including: Extract the offset coordinates of the sub-figure, and convert the cell boundary coordinates and text coordinates into global coordinates based on the offset coordinates; Based on the overlapping region markers of the subgraphs, the detection results located in the overlapping regions of multiple subgraphs are identified, and an overlapping object association table is established. The table records multiple detection results of the same physical object from different subgraphs, the source subgraph ID of each detection result, the corresponding local and global coordinate information, and the identification confidence score. For table structure information, calculate the IoU value of the cell bounding box for different sub-images. If the IoU value is not less than the IoU threshold, it is judged as a duplicate detection. For OCR text data, the edit distance of the text content is calculated. When the edit distance is not greater than the distance threshold and the spatial coccyx overlaps, it is judged as a duplicate recognition. For repetitive table structure information, a confidence-weighted average algorithm is used to fuse cell boundary coordinates; For repeated OCR text data, the text content with the highest confidence is selected as the final result, and the text attributes of each sub-image are merged.

[0009] In one optional implementation, the logical structure of the table is reconstructed based on the cell classification results, specifically including: For regular cells, calculate the average row height and average column width to generate an initial row and column index matrix; For merged cells, update the row and column index matrix according to their row and column span attributes, including marking the position of the merged cell as occupied in the matrix and recording the position and span information of the main cell; For the header area, establish a mapping relationship between the header and the data area, including associating a single-level header with all data rows below it, and constructing a hierarchical association tree for multi-level headers; Generate a table logical structure, which includes a row and column index matrix, the span attribute of merged cells, the relationship between the table header and the data area, and a mapping table between cells and OCR text.

[0010] In an optional implementation, cross-page tables are automatically spliced ​​and aligned through column alignment analysis, header similarity matching, and content pattern consistency detection, specifically including: Extract column features from the tables on the front and back pages, calculate column matching degree based on column features, determine whether columns are aligned based on column matching degree, and obtain column alignment detection results; Multi-dimensional matching is performed on the header areas of the front and back pages, including text similarity, semantic similarity, and format similarity. Based on the multi-dimensional matching results, it is determined whether they are continuations of the same table, and the header similarity detection results are obtained. Analyze the distribution characteristics of each column of data, and obtain the content pattern consistency detection results based on the distribution characteristics; The column alignment detection results, header similarity detection results, and content pattern consistency detection results are weighted and fused to obtain a weighted score. If the weighted score is not less than the weighted threshold, a splicing operation is triggered, including column-level alignment and row-level splicing.

[0011] Secondly, the technical solution of the present invention provides a table recognition and reconstruction system, comprising: The table image segmentation module is used to segment a table image into multiple sub-images based on the size of the table image and the preset reference unit size. There is a certain range of overlap between adjacent sub-images. The module records the segmentation information of each sub-image, including offset coordinates, size information and overlap area markings. The sub-image local recognition module is used to perform parallel local recognition processing on sub-images. This includes selecting a matching table recognition model through a table classification model, recognizing the table structure information of the sub-image through the table recognition model, and performing OCR processing to obtain OCR text data. The table structure information includes the number of rows and columns, cell boundary coordinates, and cross-row and cross-column information of merged cells. The OCR text data includes text content, text coordinates, text attributes, confidence scores, and logical grouping information. The complete recognition result generation module is used to convert the local coordinates of each sub-image into global coordinates based on the offset coordinates of the sub-image, and to perform deduplication and fusion based on the overlapping area markers and OCR text data to obtain complete table structure information and OCR text data. The cell type determination module is used to match complete table structure information and OCR text data, extract cell area, aspect ratio, and text density features, and use an adaptive clustering algorithm to identify cell type based on these features, distinguishing between ordinary cells, merged cells, and header areas. The logical structure reconstruction module is used to reconstruct the logical structure of the table based on the cell classification results, including row and column topology, cross-row and cross-column information of merged cells, and mapping relationship between cells and OCR text; The semantic analysis module is used to perform semantic analysis on the reconstructed table, identify the meaning of the table header and data type, and repair data that has been identified incorrectly or is missing based on context. The cross-page splicing module is used to automatically splice and align tables that span multiple pages by analyzing column alignment, matching table header similarity, and detecting content pattern consistency. The structured table generation module is used to generate standardized structured table data based on logical structure, semantic analysis results, and cross-page splicing results.

[0012] Thirdly, the technical solution of the present invention provides a terminal, comprising: Memory, used to store the table recognition and reconstruction program; A processor, configured to implement the steps of the table recognition and reconstruction method as described above when executing the table recognition and reconstruction program.

[0013] Fourthly, the present invention provides a computer-readable storage medium storing a table recognition and reconstruction program, wherein the table recognition and reconstruction program, when executed by a processor, implements the steps of the table recognition and reconstruction method as described in any of the above claims.

[0014] As can be seen from the above technical solutions, this application has the following advantages: 1. By adopting a multi-scale segmentation strategy based on a preset reference unit size, large-size table images are adaptively decomposed into sub-images that can be processed in parallel, avoiding the loss of details caused by traditional downsampling processing, and achieving high-precision recognition of table images of any size, which is especially suitable for ultra-large table scenarios such as engineering drawings and financial statements.

[0015] 2. No manual pre-set rules or templates are required. The adaptive clustering algorithm analyzes features such as cell area, aspect ratio, and text density, and can automatically distinguish between ordinary cells, merged cells, and header areas. It effectively solves the problem of recognizing complex table structures such as merged cells and nested tables, and has stronger generalization ability.

[0016] 3. Through multi-dimensional verification mechanisms such as column alignment analysis, header similarity matching, and content pattern consistency detection, automatic splicing and alignment of cross-page tables are achieved, overcoming the defects of traditional technologies that are prone to duplicate recognition or omission of cross-page tables, and ensuring the integrity and continuity of table data.

[0017] 4. By identifying the meaning and data type of the table header through the semantic analysis module, and repairing identification errors or missing data based on context, it breaks through the limitation of traditional technology that only focuses on physical structure, and realizes deep processing from table structure recognition to semantic understanding, thereby improving the usability of the output structured data.

[0018] 5. By adopting a subgraph parallel recognition and overlapping region confidence weighted fusion mechanism, the processing speed is improved, while the boundary error caused by subgraph segmentation is eliminated through global coordinate transformation and deduplication fusion algorithm, which significantly improves the recognition accuracy of table structure and text content. Attached Figure Description

[0019] To more clearly illustrate the technical solution of this application, the accompanying drawings used in the description will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0020] Figure 1 This is a schematic diagram of a table recognition and reconstruction method provided in an embodiment of the present invention.

[0021] Figure 2 This is a schematic block diagram of a table recognition and reconstruction system provided in an embodiment of the present invention.

[0022] Figure 3 This is a schematic diagram of the structure of a terminal provided in an embodiment of the present invention. Detailed Implementation

[0023] To make the purpose, features, and advantages of this application more apparent and understandable, specific embodiments and accompanying drawings will be used to clearly and completely describe the technical solution protected by this application. Obviously, the embodiments described below are only some embodiments of this application, and not all embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0024] Unless otherwise defined, all technical and scientific terms used in this application have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. The terminology used in this application and in the specification of this invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention.

[0025] Figure 1 This is a schematic flowchart of a table recognition and reconstruction method provided in an embodiment of the present invention. Figure 1 The executing entity can be a table recognition and reconstruction system. The table recognition and reconstruction method provided in this embodiment of the invention is executed by a computer device; correspondingly, the table recognition and reconstruction system runs on the computer device. Depending on different requirements, the order of the steps in this flowchart can be changed, and some steps can be omitted.

[0026] like Figure 1 As shown, the method includes the following steps.

[0027] S1. Based on the size of the table image and the preset reference unit size, the table image is divided into multiple sub-images with a certain range of overlap between adjacent sub-images. The segmentation information of each sub-image is recorded, including offset coordinates, size information and overlap area markings.

[0028] S2, perform parallel local recognition processing on the sub-image, including selecting a matching table recognition model through a table classification model, recognizing the table structure information of the sub-image through the table recognition model, and performing OCR processing to obtain OCR text data; the table structure information includes the number of rows and columns, cell boundary coordinates, and cross-row and cross-column information of merged cells; the OCR text data includes text content, text coordinates, text attributes, confidence scores, and logical grouping information.

[0029] S3 converts the local coordinates of each sub-figure into global coordinates based on the offset coordinates of the sub-figures, and performs deduplication and fusion based on the overlapping area markers and OCR text data to obtain complete table structure information and OCR text data.

[0030] S4 matches the complete table structure information with the OCR text data, extracts cell area, aspect ratio, and text density features, and uses an adaptive clustering algorithm based on these features to identify cell types, distinguishing between ordinary cells, merged cells, and header areas.

[0031] S5 reconstructs the logical structure of the table based on the cell classification results, including row and column topology, cross-row and cross-column information of merged cells, and mapping relationship between cells and OCR text.

[0032] S6 performs semantic analysis on the reconstructed table to identify the meaning of the table headers and data types, and repairs data that has been identified incorrectly or is missing based on context.

[0033] S7. If the table spans multiple pages, the table will be automatically spliced ​​and aligned through column alignment analysis, header similarity matching, and content pattern consistency detection.

[0034] S8 generates standardized structured tabular data based on logical structure, semantic analysis results, and cross-page splicing results.

[0035] As a refinement and extension of the specific implementation of the above embodiments, in order to fully explain the specific implementation process of this embodiment, the following will provide possible embodiments to describe the specific implementation of the above steps in a non-limiting manner.

[0036] In some optional implementations, step S1 involves dividing the table image into multiple sub-images based on the size of the table image and the preset reference unit size, specifically including the following steps.

[0037] S1.1, Obtain the dimensions of the table image, including the total width. and total height .

[0038] S1.2, using a preset reference unit size as the dividing unit, calculate the number of horizontal divisions based on rounding up. and the number of vertical divisions .

[0039] , .

[0040] S1.3, according to and Divide the table image into An initial subgraph.

[0041] S1.4, Set a fixed-ratio overlapping area between adjacent sub-figures, and calculate the offset coordinates of the sub-figures in the original table image according to the preset reference unit size and fixed ratio.

[0042] No. The coordinates of the top left corner of the subgraph for:

[0043]

[0044] The fixed ratio in the above formula is the fixed ratio of the overlapping area of ​​adjacent subgraphs.

[0045] The width and height of the sub-image are dynamically adjusted to ensure that it covers all overlapping areas without exceeding the boundaries of the original image.

[0046] S1.5 Perform Hough transform detection on each sub-image to identify the distribution of table lines. If the segmentation boundary of the middle sub-image cuts the table lines or text area, dynamically adjust the segmentation position and record the offset coordinates and overlapping area markers of the adjusted sub-image.

[0047] When dynamically adjusting the segmentation position, prioritize redefining the sub-figure boundaries along table lines or text gaps.

[0048] S1.6 generates segmentation information for each subgraph, including offset coordinates, size information, and overlapping area markers.

[0049] Offset coordinates are the offset coordinates of the sub-image within the original image. The size information is the actual width and height of the subgraph; the overlapping area marker includes the coordinate range of the overlapping area and the associated markers of adjacent subgraphs.

[0050] Specifically, the process begins by segmenting the image using 1024 pixels as the baseline unit. The image's width and height are divided by 1024 and rounded up to obtain the number of segments. For example, a 2048×2048 pixel image is segmented into 4 sub-images (2×2), and a 4096×4096 pixel image is segmented into 16 sub-images (4×4). Then, a 15% intelligent overlap area is set between adjacent sub-images to ensure that boundary cells are not cut. Table lines are detected using Hough transform, and text is pre-detected using OCR. The segmentation boundaries are automatically adjusted to protect text integrity and table line continuity.

[0051] In some optional implementations, step S2 involves parallel local recognition processing of the subgraph, including selecting a matching table recognition model through a table classification model and recognizing the table structure information of the subgraph through the table recognition model. Specifically, this includes the following steps.

[0052] S2.1 Input the subgraph into the trained table classification model, which is a binary classifier based on a convolutional neural network.

[0053] S2.2, the table classification model outputs the classification probability of the subgraph belonging to wired table and wireless table, and selects the corresponding table recognition model according to the table type with the highest probability.

[0054] S2.3, use the table recognition model to process the subgraph to obtain table structure information.

[0055] Specifically, the system integrates wired and wireless table models, and uses a trained binary classification convolutional neural network (CNN) to classify and recognize sub-images. The network outputs probability values ​​for two categories: wired and wireless tables. The appropriate recognition model is automatically selected for subsequent processing based on the highest probability value. A distributed processing architecture is adopted, distributing sub-images to multiple GPUs for parallel processing. The specific processing steps for each sub-image include: first, detecting the number of rows and columns, cell boundary coordinates, and cross-row and cross-column information of merged cells using a table structure recognition network; then, using an OCR model to recognize text regions, extracting text content and its precise coordinate position, preparing for subsequent matching with table structure coordinates.

[0056] The table classification model is based on a lightweight convolutional neural network architecture, using MobileNetV3-small as the backbone network. The specific structure includes: an input layer, a feature extraction layer, a global feature aggregation layer, and an output layer.

[0057] A total of 50,000 table images from various scenarios, including engineering drawings, financial statements, and academic papers, were collected. Of these, 30,000 were wired tables (with complete borders) and 20,000 were wireless tables (without borders or with incomplete borders). These were divided into training and validation sets in an 8:2 ratio. Each image was manually labeled with its table type (wired / wireless) as a supervisory signal for model training. The cross-entropy loss function and the Adam optimizer were used. The initial learning rate was set to 0.001, decaying to 0.5 every 5 epochs. The total number of training epochs was 30, with a batch size of 32. Training was stopped when the validation set accuracy failed to improve for three consecutive epochs.

[0058] Input the subgraph to be classified into the trained model, and output P1 and P2. If P1 > P2, it is determined to be a wired table, and the wired table recognition model is selected; otherwise, it is determined to be a wireless table, and the wireless table recognition model is selected.

[0059] Based on the output of the table classification model, either a wired table recognition model or a wireless table recognition model is used. The wired table recognition model is designed for table sub-images with clearly defined border lines, and focuses on structural recognition through table line detection and analysis.

[0060] The wired table recognition model includes a table line detection layer, a row and column division layer, a cell boundary calculation layer, and a merged cell recognition layer.

[0061] The table line detection layer adopts a semantic segmentation model based on U-Net. It takes sub-image data as input and outputs a binary table line mask (the pixel value of the line region is 1 and the background is 0). The coordinate parameters of the horizontal and vertical table lines are extracted from the mask by Hough transform (the horizontal line is represented by y=a and the vertical line is represented by x=b).

[0062] The horizontal table lines are sorted in ascending order by y-coordinate, the spacing between adjacent lines is calculated, and redundant lines with a spacing of less than 2 pixels are filtered out to obtain the set of valid horizontal lines. The total number of rows in the corresponding table is m-1; similarly, by sorting the vertical table lines in ascending order of their x-coordinates, we can obtain the set of valid vertical lines. The total number of columns in the corresponding table is n-1.

[0063] The cell boundary calculation layer is based on H and V, and the boundary coordinates of a single cell are... .

[0064] The merged cell recognition layer calculates the continuity of the boundary lines of adjacent cells. If the upper / lower boundary lines of adjacent cells in a horizontal direction are completely coincident and there is no vertical dividing line, it is determined to be a horizontally merged cell and its column span is recorded. If the left / right boundary lines of adjacent cells in a vertical direction are completely coincident and there is no horizontal dividing line, it is determined to be a vertically merged cell and its row span is recorded.

[0065] The wireless table recognition model targets table sub-images with no borders or incomplete borders. The model is based on a text layout and semantic association inference structure, including a text region clustering layer, a column boundary inference layer, a cell mapping layer, and a header-data association layer.

[0066] Text region clustering layer: Input text coordinates from OCR text data, and use the DBSCAN clustering algorithm to cluster the text center points. The clustering radius is set to 1.5 times the average character height of the sub-image, resulting in a set of line text clusters. ; Column boundary inference layer: The left boundary coordinates of each line of text cluster are statistically analyzed, and an adaptive threshold method is used to determine the column dividing line position. The density distribution of the left boundary of all lines of text is calculated, and the valley points between the density peaks are used as column dividing lines to obtain the column boundary set. ; Cell mapping layer: This maps line text clusters. and column boundaries Matching determines the boundary coordinates of the cell to which each text cluster belongs. ; Header-Data Association Layer: Identifies header rows by text attributes (bold font, font size), calculates the semantic vector cosine similarity between header text and data text, establishes a mapping relationship between header and data columns, and helps correct cell boundary deviations.

[0067] In some optional implementations, adjacent subgraphs establish information transmission channels through a shared memory mechanism, cache the recognition results of overlapping areas (including cell boundaries, text coordinates, etc.), and use a confidence-weighted fusion algorithm to process conflicting results in overlapping areas, ensuring the consistency of recognition results across subgraphs. Specifically, after step S2, which identifies the table structure information of the subgraph through a table recognition model and performs OCR processing to obtain OCR text data, the following steps are also included.

[0068] S2.4, Based on the overlapping region marker of the subgraph, an information transmission channel is established between adjacent subgraphs through a shared memory mechanism. The overlapping region marker includes the association relationship between adjacent subgraphs and the overlapping coordinate range.

[0069] S2.5, The recognition results in the overlapping areas of each sub-graph generated by parallel local recognition are cached in real time through the information transmission channel.

[0070] The recognition results include cell boundary coordinates, text coordinates, text content, and corresponding confidence scores.

[0071] S2.6 compares and analyzes the recognition results of the cached overlapping areas, detects whether there are boundary coordinate deviations or text content differences in the recognition results of different sub-images for the same area, and marks conflicting results with differences.

[0072] S2.7 Based on the confidence score in the recognition results, the confidence weighted fusion algorithm is used to fuse the conflict results of the markers, calculate the unified cell boundary coordinates and text coordinates, and generate the fused overlapping area recognition results.

[0073] S2.7.1 Obtain the text content confidence score of the recognition results in the overlapping area of ​​each sub-image, normalize the confidence score, and obtain the weight value corresponding to the recognition result of each sub-image, wherein the weight value is positively correlated with the confidence score.

[0074] S2.7.2, based on the extracted weight values, calculate the weighted average of the cell boundary coordinates of each sub-figure in the conflict results marked in the conflict detection step. The formula is: Top left corner: , ; Top right corner: , .

[0075] Let be the weight value of the i-th subgraph.

[0076] S2.7.3, the text coordinates in the overlapping area are calculated using the same weighting method as in step S2.7.2 to obtain the fused text coordinates; for the text content, the text content corresponding to the sub-image with the highest weight value is selected as the fused text. If the text content with the highest weight is ambiguous (such as missing characters), it is supplemented by the text content with the second highest weight.

[0077] S2.7.4 Integrate the fused cell boundary coordinates obtained in step S2.7.2 with the fused text coordinates and text content obtained in step S2.7.3 to generate a unified recognition result for the overlapping area. The fusion result carries fusion weight information, which is used as the global coordinate transformation benchmark and confidence reference for duplicate detection in the intelligent coordinate mapping and deduplication steps.

[0078] In some optional implementations, since each sub-image has a different offset position in the original large image, it is necessary to convert the local coordinates (relative to the top-left corner of the sub-image) of each sub-image to global coordinates (relative to the top-left corner of the original large image). A pixel-level accurate conversion is achieved through a simple coordinate translation transformation, i.e., global coordinates = local coordinates + sub-image offset, with the coordinate conversion error controlled within 0.1 pixels. Then, deduplication is performed: since adjacent sub-images have a 15% overlap area, table cells and text in the overlapping parts will be repeatedly identified. It is necessary to determine which detection results are duplicates and perform deduplication and merging. The specific implementation process is as follows: calculate the IoU overlap of the detection boxes in different sub-images. When the IoU is greater than a preset threshold (e.g., 0.8), it is determined as a duplicate detection. A comprehensive judgment is made based on the confidence weight and OCR text similarity to confirm the duplication. For cell detections across sub-images, a weighted average fusion algorithm is used to generate complete bounding boxes, and the fused confidence is recalculated. Finally, the table structures of multiple small sub-images are merged into a complete large table structure.

[0079] In step S3, the local coordinates of each sub-image are converted into global coordinates based on the offset coordinates of the sub-image, and deduplication and fusion are performed based on the overlapping area markers and OCR text data. Specifically, the steps are as follows.

[0080] S3.1 Extract the offset coordinates of the sub-figure, and convert the cell boundary coordinates and text coordinates into global coordinates based on the offset coordinates.

[0081] If the offset coordinates are (x_offset, y_offset), then the cell boundary coordinates (x_local, y_local) can be converted to global coordinates using the following formula: x_global=x_local+x_offset, y_global=y_local+y_offset.

[0082] Transform the text bounding box coordinates using the same offset. S3.2 Based on the overlapping area markers of the subgraphs, identify the detection results located in the overlapping areas of multiple subgraphs, and establish an overlapping object association table. The table records multiple detection results of the same physical object from different subgraphs, the source subgraph ID of each detection result, the corresponding local and global coordinate information, and the identification confidence score.

[0083] S3.3 Calculate the IoU value of the cell bounding box of different sub-images for the table structure information. If the IoU value is not less than the IoU threshold, it is determined as a duplicate detection.

[0084] S3.4 For OCR text data, calculate the edit distance of the text content. When the edit distance is not greater than the distance threshold and the spatial coccyx overlaps, it is determined as a duplicate recognition.

[0085] S3.5, for repetitive table structure information, a confidence-weighted average algorithm is used to fuse cell boundary coordinates.

[0086] The calculation formula in step S2.7.2 will not be repeated here.

[0087] S3.6 For repeated OCR text data, select the text content with the highest confidence as the final result and merge the text attributes of each sub-image.

[0088] In some optional implementations, after coordinate mapping and deduplication, the table structure information needs to be precisely matched with the text boxes recognized by OCR. This algorithm extracts multi-dimensional features such as area, aspect ratio, and text density of the OCR-recognized cells, and can also combine features such as position and border strength, using an adaptive DBSCAN clustering algorithm to identify different types of cells. By analyzing area ratio relationships (2x, 3x, etc.), it automatically determines the span and direction of merged cells, supporting the recognition of horizontal, vertical, and bidirectional merges. After identifying merged cells, the system verifies and matches their span information with the table information in the corresponding area: for example, if the OCR result shows no row span, but the table information shows row span, and the intersection of the two results contains two OCR results, then the OCR result is considered correct. Conversely, if the OCR result shows row span, but the table information shows no row span, and the intersection of the two results contains only one OCR result, then the OCR result is considered correct. The system automatically detects special areas such as table headers and sub-headers based on location information and formatting features (such as font size, bolding, background color, and other visual characteristics), and establishes a correspondence between table headers and data areas (ordinary cell areas in the table that store specific values ​​or content). The clustering tolerance is set to 10%-15% to accommodate different table sizes.

[0089] In some optional implementations, step S5 involves reconstructing the logical structure of the table based on the cell classification results, specifically including the following steps.

[0090] S5.1 For ordinary cells, calculate the average row height and average column width to generate an initial row and column index matrix.

[0091] Cluster along the vertical direction using the y-coordinate to establish a row structure and calculate the average row height; cluster along the horizontal direction using the x-coordinate to establish a column structure and calculate the average column width; generate an initial row and column index matrix M[m][n], where m is the number of rows and n is the number of columns.

[0092] S5.2 For merged cells, update the row and column index matrix according to their row and column span attributes, including marking the position of the merged cell as occupied in the matrix and recording the position and span information of the main cell.

[0093] S5.3 For the header area, establish the mapping relationship between the header and the data area, including associating the header with all data rows below for a single-level header, and constructing a hierarchical association tree for multi-level headers.

[0094] S5.4 generates the table's logical structure, which includes a row and column index matrix, the span attribute of merged cells, the relationship between the table header and the data area, and a mapping table between cells and OCR text.

[0095] In some optional implementations, after reconstructing the table's logical structure, the complete table undergoes semantic checking and data repair, including identifying the meaning and data type of the table headers, and repairing incorrectly identified or missing data based on context. The system first performs anomaly detection on the content of each cell, identifying duplicate data (e.g., a cell identified as "16.5816.58", directly changed to "16.58"), format errors (e.g., while others detect the $ symbol, one is identified as an "S", changed to $), missing characters (others detect the presence of "%", one cell contains only numbers, adding "%"), and other issues, and performs intelligent repair. A natural language model (Qwen3-32B) is integrated to identify the meaning and expected data type of the table headers through semantic vector extraction and category matching. Regular expressions and pattern matching techniques are used to infer the data type of the cells, including common types such as numbers, dates, currencies, and percentages. The system verifies the data type inference results based on column content consistency analysis and calculates the inference confidence level. For incorrectly identified or missing cells, intelligent repair and filling are performed using contextual information and table logical relationships.

[0096] In some optional implementations, step S7 automatically splices and aligns cross-page tables through column alignment analysis, header similarity matching, and content pattern consistency detection, specifically including the following steps.

[0097] S7.1 Extract column features from the tables on the previous and next pages, calculate column matching degree based on column features, determine whether columns are aligned based on column matching degree, and obtain column alignment detection results.

[0098] Extract column features from the tables on the previous and next pages, including column width ratio, column boundary coordinates, and column data type. After normalizing the column width ratio, calculate the cosine similarity. Perform positional deviation analysis on the column boundary coordinates. Columns are considered aligned when the number of columns is the same and the overall similarity is ≥0.85.

[0099] S7.2 performs multi-dimensional matching on the header areas of the preceding and following pages, including text similarity, semantic similarity, and format similarity. Based on the multi-dimensional matching results, it determines whether they are continuations of the same table and obtains the header similarity detection results.

[0100] Text similarity is calculated, including the edit distance of the table header text. Semantic similarity is calculated by extracting semantic vectors using a pre-trained language model (Qwen3-32B) and calculating cosine similarity. Format similarity is calculated by comparing visual features such as font, color, and alignment. When the overall similarity is ≥0.9, the table is considered a continuation of the same table.

[0101] S7.3 Analyze the distribution characteristics of each column of data, and obtain the content pattern consistency detection results based on the distribution characteristics.

[0102] Analyze the distribution characteristics of each column of data. For numerical columns, check the consistency of mean and variance. For text columns, check the pattern continuity of named entities (such as people's names / place names). For date columns, verify the coherence of the time series.

[0103] S7.4 Calculate a weighted score by weighting and fusing the column alignment detection results, header similarity detection results, and content pattern consistency detection results. If the weighted score is not less than the weighted threshold, a splicing operation is triggered, including column-level alignment and row-level splicing.

[0104] For column-level alignment, the Hungarian algorithm is used to find the optimal column match, and the width of the deviating columns is adaptively adjusted. For row-level concatenation, duplicate header rows are removed, merged cells that break across pages are corrected, and the table styles (borders, colors, etc.) of the previous page are preserved.

[0105] When generating standardized structured table data based on logical structure, semantic analysis results, and cross-page splicing results, the first step is to extract the row and column index matrix, merged cell span attributes, and the mapping table between cells and OCR text, based on the logical structure generated in the table structure reconstruction step, to construct the basic skeleton of the structured table. This includes: determining the total number of rows and columns of the table based on the row and column index matrix, establishing an initial two-dimensional data container, where ordinary cells correspond to independent coordinate positions within the container, and merged cells are marked with their coverage area within the container based on their row and column span information; and using the mapping table between cells and OCR text, filling the corresponding OCR text content of each cell into the corresponding position in the two-dimensional data container to form the original table data matrix.

[0106] Then, based on the semantic analysis results, the original tabular data matrix is ​​semantically enhanced and formatted: Column header attributes are added to the tabular data matrix based on the header meaning recognition results (e.g., "the text with the highest semantic similarity to the header" is determined as the column name), and an association index between the column name and the data column is established; Based on the data type inference results, the cell content is formatted: Numerical data is uniformly retained to two decimal places, date data is converted to "YYYY-MM-DD" format, and redundant spaces and residual characters after error correction are removed from string data; Anomaly repair results from the semantic analysis are imported to replace the cell content marked as "duplicate data," "format error," or "missing character" in the original data matrix.

[0107] Based on the cross-page splicing results, the multi-page table data is integrated and its consistency is verified: the column order of different pages is adjusted according to the column alignment detection results to ensure that the column structure of the spliced ​​table is consistent; based on the deduplicated table header information, duplicate header rows in the cross-page table are removed, and only the first page header is retained as the global column title; the data rows of subsequent pages are appended to the end of the original data matrix in sequence; based on the content mode consistency detection results, the consecutive data rows after splicing are verified; if the data type matching degree of adjacent rows is <0.8, it is marked as a suspected splicing anomaly and a manual review prompt is triggered.

[0108] The integrated tabular data matrix is ​​converted into a preset standardized format, supporting JSON, Excel, HTML, and other formats.

[0109] The above text provides a detailed description of an embodiment of a table recognition and reconstruction method. Based on the table recognition and reconstruction method described in the above embodiment, this invention also provides a table recognition and reconstruction system corresponding to the method.

[0110] Figure 2This is a schematic block diagram of a table recognition and reconstruction system provided in an embodiment of the present invention. In this embodiment, the table recognition and reconstruction system 200 can be divided into multiple functional modules according to the functions it performs. A module, as referred to in this invention, is a series of computer program segments that can be executed by at least one processor and perform a fixed function, and is stored in memory.

[0111] The table image segmentation module 210 is used to segment a table image into multiple sub-images based on the size of the table image and the preset reference unit size. There is a certain range of overlap between adjacent sub-images. The module records the segmentation information of each sub-image, including offset coordinates, size information and overlap area markings.

[0112] The sub-image local recognition module 220 is used to perform parallel local recognition processing on the sub-image, including selecting a matching table recognition model through a table classification model, recognizing the table structure information of the sub-image through the table recognition model, and performing OCR processing to obtain OCR text data; the table structure information includes the number of rows and columns, cell boundary coordinates, and cross-row and cross-column information of merged cells; the OCR text data includes text content, text coordinates, text attributes, confidence scores, and logical grouping information.

[0113] The complete recognition result generation module 230 is used to convert the local coordinates of each sub-image into global coordinates based on the offset coordinates of the sub-image, and to perform deduplication and fusion based on the overlapping area markers and OCR text data to obtain complete table structure information and OCR text data.

[0114] The cell type determination module 240 is used to match the complete table structure information and OCR text data, extract cell area, aspect ratio, and text density features, and use an adaptive clustering algorithm to identify cell types based on these features, distinguishing between ordinary cells, merged cells, and header areas.

[0115] The logical structure reconstruction module 250 is used to reconstruct the logical structure of the table based on the cell classification results, including row and column topology, cross-row and cross-column information of merged cells, and mapping relationship between cells and OCR text.

[0116] The semantic analysis module 260 is used to perform semantic analysis on the reconstructed table, identify the meaning of the table header and data type, and repair data that has been identified incorrectly or is missing based on context.

[0117] The cross-page splicing module 270 is used to automatically splice and align cross-page tables if the table spans multiple pages, through column alignment analysis, table header similarity matching, and content pattern consistency detection.

[0118] The structured table generation module 280 is used to generate standardized structured table data based on logical structure, semantic analysis results, and cross-page splicing results.

[0119] The table recognition and reconstruction system of this embodiment is used to implement the aforementioned table recognition and reconstruction method. Therefore, the specific implementation of this system can be found in the embodiment section of the table recognition and reconstruction method above. Thus, the specific implementation can be referred to the description of the corresponding embodiments, and will not be elaborated here.

[0120] Furthermore, since the table recognition and reconstruction system in this embodiment is used to implement the aforementioned table recognition and reconstruction method, its function corresponds to the function of the above method, and will not be described again here.

[0121] Figure 3 This is a schematic diagram of a terminal 300 provided in an embodiment of the present invention, including: a processor 310, a memory 320, and a communication unit 330. The processor 310 is used to implement the process steps of the above-described table recognition and reconstruction method embodiment when implementing the table recognition and reconstruction program stored in the memory 320.

[0122] The terminal 300 includes a processor 310, a memory 320, and a communication unit 330. These components communicate via one or more buses. Those skilled in the art will understand that the server structure shown in the figure does not constitute a limitation of the present invention. It can be a bus topology or a star topology, and may include more or fewer components than shown, or combine certain components, or have different component arrangements.

[0123] The memory 320 can be used to store the execution instructions of the processor 310. The memory 320 can be implemented by any type of volatile or non-volatile memory terminal or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. When the execution instructions in the memory 320 are executed by the processor 310, the terminal 300 is able to perform some or all of the steps in the above method embodiments.

[0124] The processor 310 serves as the control center of the storage terminal, connecting various parts of the electronic terminal via various interfaces and lines. It executes software programs and / or modules stored in the memory 320, and calls data stored in the memory to perform various functions of the electronic terminal and / or process data. The processor can be composed of integrated circuits (ICs), such as a single packaged IC or multiple packaged ICs with the same or different functions connected together. For example, the processor 310 may consist only of a central processing unit (CPU). In this embodiment of the invention, the CPU may have a single processing core or include multiple processing cores.

[0125] The communication unit 330 is used to establish a communication channel, enabling the storage terminal to communicate with other terminals. It can receive user data sent by other terminals or send user data to other terminals.

[0126] The present invention also provides a computer storage medium, which may be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM), etc.

[0127] The present invention also provides a computer storage medium, which may be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM), etc.

[0128] The computer storage medium stores a table recognition and reconstruction program. When the table recognition and reconstruction program is executed by the processor, it implements the process steps of the above-described table recognition and reconstruction method embodiment.

[0129] Those skilled in the art will clearly understand that the techniques in the embodiments of the present invention can be implemented using software plus necessary general-purpose hardware platforms. Based on this understanding, the technical solutions in the embodiments of the present invention, or the parts that contribute to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium such as a USB flash drive, mobile hard drive, read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk, or other media capable of storing program code. It includes several instructions to cause a computer terminal (which may be a personal computer, server, or a second terminal, network terminal, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention.

[0130] In the embodiments provided by this invention, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.

[0131] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0132] In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0133] The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A table recognition and reconstruction method, characterized in that, Includes the following steps: Based on the size of the table image and the preset reference unit size, the table image is divided into multiple sub-images with a certain range of overlap between adjacent sub-images. The segmentation information of each sub-image is recorded, including offset coordinates, size information and overlap area markings. Parallel local recognition processing is performed on the sub-image, including selecting a matching table recognition model through a table classification model, recognizing the table structure information of the sub-image through the table recognition model, and performing OCR processing to obtain OCR text data; the table structure information includes the number of rows and columns, cell boundary coordinates, and cross-row and cross-column information of merged cells; the OCR text data includes text content, text coordinates, text attributes, confidence scores, and logical grouping information; Based on the offset coordinates of the sub-figures, the local coordinates of each sub-figure are converted into global coordinates, and deduplication and fusion are performed based on the overlapping area markers and OCR text data to obtain complete table structure information and OCR text data. The complete table structure information and OCR text data are matched to extract cell area, aspect ratio, and text density features. Based on these features, an adaptive clustering algorithm is used to identify cell types and distinguish between ordinary cells, merged cells, and header areas. Reconstruct the logical structure of the table based on the cell classification results, including row and column topology, cross-row and cross-column information of merged cells, and mapping relationship between cells and OCR text; Semantic analysis is performed on the reconstructed table to identify the meaning of the table headers and data types, and data that is incorrectly identified or missing is repaired based on the context. If the table spans multiple pages, the table will be automatically spliced ​​and aligned through column alignment analysis, header similarity matching, and content pattern consistency detection. Standardized structured tabular data is generated based on logical structure, semantic analysis results, and cross-page splicing results.

2. The table recognition and reconstruction method according to claim 1, characterized in that, Based on the dimensions of the table image and the preset baseline cell size, the table image is divided into multiple sub-images, specifically including: Get the dimensions of the table image, including the total width and total height; Using a preset reference unit size as the dividing unit, the number of horizontal divisions is calculated based on rounding up. and the number of vertical divisions ; according to and Divide the table image into An initial subgraph; A fixed-ratio overlap area is set between adjacent sub-images, and the offset coordinates of the sub-images in the original table image are calculated based on the preset reference unit size and the fixed ratio. Perform Hough transform detection on each sub-image to identify the distribution of table lines. If the segmentation boundary of the middle sub-image cuts the table lines or text area, dynamically adjust the segmentation position and record the offset coordinates and overlapping area markers of the adjusted sub-image. Segmentation information is generated for each subgraph, including offset coordinates, size information, and overlapping region markers; the overlapping region markers include the coordinate range of the overlapping region and the association markers of adjacent subgraphs.

3. The table recognition and reconstruction method according to claim 1, characterized in that, Parallel local recognition processing is performed on the subgraph, including selecting a matching table recognition model using a table classification model, and recognizing the table structure information of the subgraph using the table recognition model. Specifically, this includes: The subgraph is input into a pre-trained table classification model, which is a binary classifier based on a convolutional neural network. The table classification model outputs the classification probability of a subgraph belonging to a wired table or a wireless table, and selects the corresponding table recognition model based on the table type with the highest probability. Use a table recognition model to process subgraphs to obtain table structure information.

4. The table recognition and reconstruction method according to claim 1, characterized in that, After recognizing the table structure information of the sub-image using a table recognition model and performing OCR processing to obtain OCR text data, the following steps are also included: Based on the overlapping region markers of subgraphs, an information transmission channel is established between adjacent subgraphs through a shared memory mechanism. The overlapping region markers include the association relationship between adjacent subgraphs and the overlapping coordinate range. The recognition results within the overlapping areas of each sub-image generated by parallel local recognition are cached in real time through the information transmission channel. Compare and analyze the overlapping region identification results of the cache to detect whether there are boundary coordinate deviations or text content differences in the identification results of different sub-images for the same region, and mark the conflicting results with differences. Based on the confidence scores in the recognition results, a confidence-weighted fusion algorithm is used to fuse the conflicting results of the markers, calculate the unified cell boundary coordinates and text coordinates, and generate the fused overlapping area recognition results.

5. The table recognition and reconstruction method according to claim 1, characterized in that, The local coordinates of each sub-image are converted to global coordinates based on the offset coordinates of the sub-images, and deduplication and fusion are performed based on overlapping area markers and OCR text data, specifically including: Extract the offset coordinates of the sub-figure, and convert the cell boundary coordinates and text coordinates into global coordinates based on the offset coordinates; Based on the overlapping region markers of the subgraphs, the detection results located in the overlapping regions of multiple subgraphs are identified, and an overlapping object association table is established. The table records multiple detection results of the same physical object from different subgraphs, the source subgraph ID of each detection result, the corresponding local and global coordinate information, and the identification confidence score. For table structure information, calculate the IoU value of the cell bounding box for different sub-images. If the IoU value is not less than the IoU threshold, it is judged as a duplicate detection. For OCR text data, the edit distance of the text content is calculated. When the edit distance is not greater than the distance threshold and the spatial coccyx overlaps, it is judged as a duplicate recognition. For repetitive table structure information, a confidence-weighted average algorithm is used to fuse cell boundary coordinates; For repeated OCR text data, the text content with the highest confidence is selected as the final result, and the text attributes of each sub-image are merged.

6. The table recognition and reconstruction method according to claim 1, characterized in that, Reconstructing the logical structure of the table based on the cell classification results includes: For regular cells, calculate the average row height and average column width to generate an initial row and column index matrix; For merged cells, update the row and column index matrix according to their row and column span attributes, including marking the position of the merged cell as occupied in the matrix and recording the position and span information of the main cell; For the header area, establish a mapping relationship between the header and the data area, including associating a single-level header with all data rows below it, and constructing a hierarchical association tree for multi-level headers; Generate a table logical structure, which includes a row and column index matrix, the span attribute of merged cells, the relationship between the table header and the data area, and a mapping table between cells and OCR text.

7. The table recognition and reconstruction method according to claim 1, characterized in that, Automatic splicing and alignment of cross-page tables is achieved through column alignment analysis, header similarity matching, and content pattern consistency detection. Specifically, this includes: Extract column features from the tables on the front and back pages, calculate column matching degree based on column features, determine whether columns are aligned based on column matching degree, and obtain column alignment detection results; Multi-dimensional matching is performed on the header areas of the front and back pages, including text similarity, semantic similarity, and format similarity. Based on the multi-dimensional matching results, it is determined whether they are continuations of the same table, and the header similarity detection results are obtained. Analyze the distribution characteristics of each column of data, and obtain the content pattern consistency detection results based on the distribution characteristics; The column alignment detection results, header similarity detection results, and content pattern consistency detection results are weighted and fused to obtain a weighted score. If the weighted score is not less than the weighted threshold, a splicing operation is triggered, including column-level alignment and row-level splicing.

8. A table recognition and reconstruction system, characterized in that, include: The table image segmentation module is used to segment a table image into multiple sub-images based on the size of the table image and the preset reference unit size. There is a certain range of overlap between adjacent sub-images. The module records the segmentation information of each sub-image, including offset coordinates, size information and overlap area markings. The sub-image local recognition module is used to perform parallel local recognition processing on sub-images. This includes selecting a matching table recognition model through a table classification model, recognizing the table structure information of the sub-image through the table recognition model, and performing OCR processing to obtain OCR text data. The table structure information includes the number of rows and columns, cell boundary coordinates, and cross-row and cross-column information of merged cells. The OCR text data includes text content, text coordinates, text attributes, confidence scores, and logical grouping information. The complete recognition result generation module is used to convert the local coordinates of each sub-image into global coordinates based on the offset coordinates of the sub-image, and to perform deduplication and fusion based on the overlapping area markers and OCR text data to obtain complete table structure information and OCR text data. The cell type determination module is used to match complete table structure information and OCR text data, extract cell area, aspect ratio, and text density features, and use an adaptive clustering algorithm to identify cell type based on these features, distinguishing between ordinary cells, merged cells, and header areas. The logical structure reconstruction module is used to reconstruct the logical structure of the table based on the cell classification results, including row and column topology, cross-row and cross-column information of merged cells, and mapping relationship between cells and OCR text; The semantic analysis module is used to perform semantic analysis on the reconstructed table, identify the meaning of the table header and data type, and repair data that has been identified incorrectly or is missing based on context. The cross-page splicing module is used to automatically splice and align cross-page tables if the table spans multiple pages, through column alignment analysis, table header similarity matching, and content pattern consistency detection. The structured table generation module is used to generate standardized structured table data based on logical structure, semantic analysis results, and cross-page splicing results.

9. A terminal, characterized in that, include: The memory is used to store the table recognition and reconstruction program; A processor is configured to implement the steps of the table recognition and reconstruction method as described in any one of claims 1 to 7 when executing the table recognition and reconstruction program.

10. A computer-readable storage medium, characterized in that, The readable storage medium stores a table recognition and reconstruction program, which, when executed by a processor, implements the steps of the table recognition and reconstruction method as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Table semantic information extraction method, system and equipment based on cell coordinate optimization and medium

    CN116543404A

  • Table intelligent identification, intelligent combination and intelligent submission method and system

    CN118038478A

  • Table data recovery method based on OCR model

    CN119904870A

  • OCR-based table layout restoration method and device, electronic apparatus, and storage medium

    WO2021147222A1

  • Table reconstruction method and electronic device

    WO2023216745A1

Cited By

  • Semantic sorting method and recognition system for hydraulic cylinder engineering drawing table

    CN121963216A

  • Table data extraction method and device based on OCR and visual language model collaboration

    CN121982737A

  • Cross-page disassembling and reconstructing method and system for complex merging cells

    CN122090477A

  • Methods and systems for splitting and reconstructing complex merged cells across pages

    CN122090477B

  • Method, system and device for constructing complex merged cell table image and medium

    CN122134846A