Intelligent processing and retrieval enhancement system and method for cross-page tables
Patent Information
- Application Number
- CN202610364075.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-03-24
- Publication Date
- 2026-08-28
- Estimated Expiration
- 2046-03-24
AI Technical Summary
[0005]因此,本发明提供了跨页表格智能处理与检索增强方法解决了跨页表格结构连续性判定不稳定及表格结构化结果检索关联性不足的问题
[0016] The beneficial effects of this invention are as follows: By constructing a cross-page continuity operator and generating a cross-page determination threshold, the consistency between the column position structure and the header term set is measured, thereby achieving stable generation of the cross-page connection relationship set and thus stable determination of the continuity of the cross-page table structure; by constructing retrieval enhancement index records and performing text vectorization processing, the association between the summary vector and the logical table structured representation text is realized, and natural language query matching is completed by combining hit verification, thereby achieving a consistent association between the logical table structured representation text and the retrieval expression.
Smart Images

Figure CN122262247B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of document information processing and natural language processing technology, and in particular to a system and method for intelligent processing and retrieval enhancement of cross-page tables, with its main IPC classification number being G06F16. Background Technology
[0002] Split-page tables are widely found in paginated electronic documents such as financial statements, testing and inspection reports, statistical yearbooks, and various technical archives. These documents typically contain a large amount of data organized in tabular form and are laid out according to page number order. When the table data is large, it is often split into multiple pages for continuous presentation. To address the data utilization needs of such documents, engineering practice typically employs techniques such as layout parsing, text recognition, table area location, and structured representation to extract and organize the table content. Based on this, keyword indexing or semantic representation methods are used to achieve the querying, locating, and reuse of table information, supporting applications such as document information retrieval, data analysis, and knowledge management.
[0003] However, existing methods still have two limitations: First, cross-page tables may be affected by factors such as changes in page margins, layout adjustments, or the side-by-side arrangement of multiple tables during actual typesetting. When relying solely on page adjacency relationships or local layout similarity to determine cross-page connections, it is difficult to stably characterize the structural continuity of tables in cross-page scenarios. Second, in query-oriented applications, table content is often indexed in the form of text fragments or keywords. There is a lack of a unified structured association mechanism between table structure information and retrieval expressions, resulting in insufficient consistency and verifiability of query results in locating specific table structures and their cross-page ranges. Summary of the Invention
[0004] In view of the aforementioned existing problems, the present invention is proposed.
[0005] Therefore, this invention provides an intelligent processing and retrieval enhancement method for cross-page tables, which solves the problems of unstable determination of the structural continuity of cross-page tables and insufficient relevance of the retrieval of structured table results.
[0006] To solve the above-mentioned technical problems, the present invention provides the following technical solution: In a first aspect, the present invention provides a method for intelligent processing and retrieval enhancement of cross-page tables, comprising: performing text recognition and table region detection on each page of the input document, identifying candidate table block regions and removing header and footer text to generate a purified set of table block records; extracting column position structure and table header term set based on the purified set of table block records, constructing a cross-page continuous operator and generating a cross-page judgment threshold to form a set of cross-page connection relationships; merging cross-page tables and restoring the row and column structure through the set of cross-page connection relationships to generate logical table records and construct retrieval enhancement index records to complete the retrieval enhancement database entry; using the retrieval enhancement index records to match natural language queries and perform hit verification, outputting the logical table structured representation text and the page number range of the cross-page connection group.
[0007] As a preferred embodiment of the cross-page table intelligent processing and retrieval enhancement method of the present invention, the step of performing text recognition on each page of the input document includes: parsing the input document page by page according to the page number order, converting each page of the input document into a page image; performing text recognition processing on the page image, recognizing the text regions in the page and recording the text content, left boundary horizontal coordinate, right boundary horizontal coordinate, top boundary vertical coordinate, and bottom boundary vertical coordinate of the text regions, binding the text regions with the recognized text content and rectangular boundary coordinates to generate page text boxes; summarizing the page text boxes in the same page and binding them with the page number to generate a set of page text boxes.
[0008] As a preferred embodiment of the cross-page table intelligent processing and retrieval enhancement method of the present invention, the step of identifying candidate table block regions and removing header and footer text includes: performing table region detection processing according to the coordinate distribution of page text boxes in the page text box set, identifying candidate table block regions, and aggregating page text boxes within the candidate table block regions to form a candidate table block text box set; binding the page number, the boundary of the candidate table block region, and the candidate table block text box set to generate candidate table block records, and summarizing them to form a candidate table block record set; performing header and footer text recognition processing on the page text box set to obtain a header and footer text box set, removing the page text boxes corresponding to the header and footer text box set from the candidate table block record set, registering the removed candidate table block text box set as a purified table block text box set, and generating a purified table block record set.
[0009] As a preferred embodiment of the cross-page table intelligent processing and retrieval enhancement method of the present invention, the step of extracting the column position structure and the header term set based on the purified table block record set includes: within each purified table block record, extracting the left boundary horizontal coordinate of the page text boxes in the purified table block text box set and sorting them in ascending order of value; calculating the horizontal spacing value of adjacent left boundary horizontal coordinates and selecting the horizontal spacing value located in the middle position as the column spacing scale; grouping the left boundary horizontal coordinates into columns according to the column spacing scale; selecting the median horizontal coordinate in each column group to form column position elements; and summarizing to generate the column position structure; identifying the first row of page text box sets based on the upper boundary vertical coordinate of the page text boxes; performing normalization, delimiter segmentation, and term deduplication processing on the text content of the first row of page text box sets to generate the header term set.
[0010] As a preferred embodiment of the cross-page table intelligent processing and retrieval enhancement method of the present invention, the following steps are included: constructing cross-page continuous operators and generating cross-page judgment thresholds: sorting and grouping the purified table block record set according to page number; pairing the purified table block records in two consecutive page number groups to form a set of adjacent page table block pairings; constructing a column structure continuity function based on the column position structure, calculating the column structure continuity based on the column structure continuity function, calculating the header terminology consistency based on the header terminology set, and generating a cross-page continuous operator by taking the smaller value between the column structure continuity and the header terminology consistency; selecting the pair with the largest cross-page continuous operator value in the set of adjacent page table block pairings to form a set of best-matching pairings; summarizing and sorting the cross-page continuous operators in the set of best-matching pairings; using the cross-page continuous operator in the middle position as the cross-page judgment threshold; marking adjacent page table block pairings with cross-page continuous operators not less than the cross-page judgment threshold as valid cross-page connections; and performing chain merging processing on the valid cross-page connections to generate a set of cross-page connection relationships.
[0011] As a preferred embodiment of the intelligent processing and retrieval enhancement method for cross-page tables described in this invention, the step of merging cross-page tables and restoring the row and column structure through a set of cross-page connection relationships includes: sorting the cross-page connection groups in the set of cross-page connection relationships in ascending order according to the first page number of the cross-page connection group, and generating a unique logical table identifier according to the sorting sequence; summarizing the horizontal coordinates of the left boundary of the page text boxes within the cross-page connection group to generate a logical column position structure, and summarizing the vertical coordinates of the upper boundary to generate a cross-page row index; performing unit mapping on the page text boxes according to the logical column position structure and the cross-page row index to generate table cell records, and merging records with the same row index and column index to generate merged table cell records; outputting the structured representation text of the logical table according to the row index and column index order, and binding it with the unique logical table identifier and the page number range of the cross-page connection group to generate logical table records.
[0012] As a preferred embodiment of the cross-page table intelligent processing and retrieval enhancement method of the present invention, the construction of the retrieval enhancement index record includes: performing anchor term construction, summary generation, summary coverage verification, and text vectorization processing on the logical table record; generating an anchor term set through the logical table header term set, row title term set, and unit term set, and generating a summary table summary text and sub-table summary text according to the cross-page connection group page number range and the anchor term set; performing summary coverage verification on the summary table summary text and adding uncovered terms from the anchor term set when the coverage is insufficient; performing text vectorization processing on the summary table summary text and sub-table summary text to generate summary vectors, and binding and registering the summary vectors with the logical table unique identifier, the cross-page connection group page number range, and the logical table structured representation text position identifier to generate the retrieval enhancement index record.
[0013] As a preferred embodiment of the cross-page table intelligent processing and retrieval enhancement method of the present invention, the step of using retrieval enhancement index records to match natural language queries includes performing text content normalization processing, delimiter segmentation processing, and token deduplication processing on the natural language query to generate a query token set; calculating query token components based on the query token set to generate a query vector, and calculating the vector inner product similarity between the query vector and the summary vector, and determining a candidate index record set based on the similarity.
[0014] As a preferred embodiment of the cross-page table intelligent processing and retrieval enhancement method of the present invention, the execution of hit verification includes: performing candidate aggregation processing on the candidate index record set to generate a unique identifier for the candidate logical table, and performing hit verification processing on the candidate index records associated with the unique identifier for the candidate logical table; the hit rate is formed by calculating the ratio of the number of intersection tokens of the query token set and the candidate summary token set to the number of tokens in the query token set; when the hit rate is not less than the cross-page determination threshold, the unique identifier for the candidate logical table is registered as the unique identifier for the target logical table, and the structured representation text of the logical table and the page number range of the cross-page connection group are output.
[0015] Secondly, this invention provides an intelligent processing and retrieval enhancement system for cross-page tables, comprising: a document parsing module, used to perform text recognition and table region detection on each page of the input document, identify candidate table block regions and remove header and footer text, generating a purified set of table block records; a cross-page structure recognition module, used to extract column position structure and header term set based on the purified set of table block records, construct cross-page continuous operators and generate cross-page judgment thresholds, forming a set of cross-page connection relationships; an index building module, used to merge cross-page tables through the set of cross-page connection relationships and restore the row and column structure, generate logical table records and construct retrieval enhancement index records, completing the retrieval enhancement and database entry; and a query matching module, used to match natural language queries using the retrieval enhancement index records and perform hit verification, outputting the logical table structured representation text and the page number range of the cross-page connection group.
[0016] The beneficial effects of this invention are as follows: By constructing a cross-page continuity operator and generating a cross-page determination threshold, the consistency between the column position structure and the header term set is measured, thereby achieving stable generation of the cross-page connection relationship set and thus stable determination of the continuity of the cross-page table structure; by constructing retrieval enhancement index records and performing text vectorization processing, the association between the summary vector and the logical table structured representation text is realized, and natural language query matching is completed by combining hit verification, thereby achieving a consistent association between the logical table structured representation text and the retrieval expression. Attached Figure Description
[0017] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. 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.
[0018] Figure 1 The flowchart shows the method for intelligent processing and enhanced retrieval of cross-page tables.
[0019] Figure 2 This is a schematic diagram of an intelligent processing and retrieval enhancement system for cross-page tables.
[0020] Figure 3 A flowchart for enhancing index building for cross-page table processing and retrieval.
[0021] Figure 4 A flowchart for enhanced matching and hit verification for retrieval.
[0022] Figure 5 This is a comparison chart of cross-page link stability.
[0023] Figure 6 This is a comparison chart of search hit rates.
[0024] Specific implementation methods
[0025] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
[0026] Many specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways different from those described herein, and those skilled in the art can make similar extensions without departing from the spirit of the invention. Therefore, the invention is not limited to the specific embodiments disclosed below.
[0027] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The phrase "in one embodiment" appearing in different places in this specification does not necessarily refer to the same embodiment, nor is it a single or selective embodiment that is mutually exclusive with other embodiments.
[0028] Reference Figures 1-6 This is one embodiment of the present invention, which provides a method for intelligent processing and retrieval enhancement of cross-page tables, including the following steps: S1. Perform text recognition and table region detection on each page of the input document, identify candidate table block regions and remove header and footer text, and generate a cleaned set of table block records.
[0029] Furthermore, the input document is parsed page by page number, and each page is converted into a page image.
[0030] The input document is a paginated electronic document file, including portable document format files, printable layout format files, or scanned image files. When the input document is a portable document format file or a printable layout format file, the page content is rasterized according to the original layout ratio by parsing the layout coordinate information of the text and graphic objects on the page, generating a page image in the form of a pixel matrix. When the input document is a scanned image file, the scanned image is directly used as the page image.
[0031] The page image records page number information, page width, and page height. The page width is the horizontal pixel length of the page image pixel matrix, and the page height is the vertical pixel length of the page image pixel matrix.
[0032] Furthermore, text recognition processing is performed on the page image to identify text regions on the page, and for each text region, the text content, the left boundary x-coordinate, the right boundary x-coordinate, the top boundary y-coordinate, and the bottom boundary y-coordinate are recorded.
[0033] The text recognition process includes two stages: text region localization and text content recognition. The text region localization stage analyzes the pixel grayscale distribution and connected component distribution in the page image to identify rectangular regions with text structural features. Pixel grayscale distribution analysis includes performing grayscale processing on the page image and generating a grayscale image. Connected component distribution analysis includes performing binarization processing on the grayscale image and performing connected component labeling processing on the foreground pixels, using the smallest bounding rectangle of the connected components as the rectangular region. In the binarization process, pixels with grayscale values less than the grayscale mean are assigned a value of 1, and pixels with grayscale values greater than or equal to the grayscale mean are assigned a value of 0. Foreground pixels are pixels in the binary image with a value of 1.
[0034] Each identified rectangular region is defined as a text region. In the text content recognition stage, character images are extracted from the identified text regions in order from left to right and from top to bottom. The character content is then identified by character template matching, and the character recognition results are sequentially spliced to form the text content. Character image extraction includes scanning the pixel matrix horizontally within the text region and locating the blank columns between characters. The pixel column segments between adjacent blank columns are taken as single character images. Blank columns are pixel columns with a pixel value of 1 and a pixel count of zero.
[0035] After the text content is recognized, the text area is bound to the recognized text content and the coordinates of the rectangular boundary to form a text box on the page.
[0036] It should be noted that the character template is a set of standard character images; the set of standard character images includes, but is not limited to, images of numeric characters, images of English alphabet characters, and images of commonly used symbols; each standard character image is a single character image and is uniformly in the form of a pixel matrix of the same size; the standard character images are obtained by generating single character images from clear printed fonts and performing binarization processing; in the standard character images, the foreground pixels of the characters have a value of 1, and the background pixels have a value of 0; all standard character images are numbered and stored according to character category to form a character template library.
[0037] In the character recognition process, the extracted single-character image is converted into a pixel matrix of the same size as the standard character image; the single-character image is compared pixel by pixel with each standard character image in the character template library, the number of positions with the same pixel value is counted, and the ratio of the number of the same pixels to the total number of pixels is calculated; the character corresponding to the standard character image with the largest ratio is selected as the recognition result; according to the arrangement order of the character images in the text area, the recognition results are sequentially spliced to form the text content.
[0038] Furthermore, all page text boxes on the same page are grouped together to form a page text box set, which is then bound to the page number.
[0039] The page text box set includes multiple page text boxes; the page text box is a structured representation of a text area after text content recognition; each page text box contains text content, left boundary x-coordinate, right boundary x-coordinate, top boundary y-coordinate, and bottom boundary y-coordinate; the page text box set is used to represent the spatial location and text content distribution of all recognizable text areas on the current page.
[0040] Furthermore, after the set of page text boxes is formed, table area detection is performed based on the coordinate distribution of the page text boxes in the set.
[0041] After the set of page text boxes is formed, the left boundary x-coordinates of the page text boxes in the set are extracted and sorted in ascending order of value to form a horizontal coordinate sequence; the difference between the left boundary x-coordinates of adjacent page text boxes in the horizontal coordinate sequence is calculated to form a horizontal coordinate difference sequence; the top boundary y-coordinates of the page text boxes in the set are extracted and sorted in ascending order of value to form a vertical coordinate sequence; the difference between the top boundary y-coordinates of adjacent page text boxes in the vertical coordinate sequence is calculated to form a vertical coordinate difference sequence.
[0042] For the horizontal coordinate difference sequence and the vertical coordinate difference sequence, perform difference interval generation processing and difference interval frequency statistics processing respectively. The difference interval generation processing sorts the difference sequence by value from smallest to largest, and groups adjacent differences whose difference is less than the median difference of the difference sequence into the same difference interval. The difference interval frequency statistics processing counts the number of differences within each difference interval. For the difference interval frequency statistics results of the horizontal coordinate difference sequence, the difference interval with the largest number of differences is selected as the horizontal arrangement difference interval. For the difference interval frequency statistics results of the vertical coordinate difference sequence, the difference interval with the largest number of differences is selected as the vertical arrangement difference interval.
[0043] In the set of page text boxes, page text boxes whose left boundary horizontal coordinate difference is within the horizontally arranged difference range are grouped to form a horizontal group set; page text boxes whose upper boundary vertical coordinate difference is within the vertically arranged difference range are grouped to form a vertical group set; when there is more than one group in the horizontal group set or more than one group in the vertical group set, the bounding rectangle of the union of the boundary coordinates of all page text boxes in the horizontal group set and the vertical group set is calculated, and the bounding rectangle of the union is used as the candidate table block area.
[0044] After the candidate table block area is determined, all page text boxes within the candidate table block area are collected to form a candidate table block text box set. When there is more than one page text box in the candidate table block text box set, the page number, the boundary of the candidate table block area, and the candidate table block text box set are bound together to form a candidate table block record. If the condition that there is more than one page text box in the candidate table block text box set is not met, no candidate table block record is generated. The candidate table block records generated for all pages are summarized to form a candidate table block record set. The boundary of the candidate table block area is the coordinate of the boundary of the smallest bounding rectangle of the candidate table block area.
[0045] Furthermore, after the candidate table block record set is formed, header and footer text recognition processing is performed on the page text box set to generate a header and footer text box set.
[0046] Header and footer text recognition processing includes text content normalization, text content grouping, cross-page occurrence count statistics, vertical coordinate dispersion calculation, and dispersion ratio comparison. Specifically, normalization processing is performed on the text content in the set of page text boxes, including removing whitespace characters and standardizing the representation of numeric characters. The normalized text content is then grouped, with page text boxes containing identical content grouped into the same group. For each text content group, the occurrence count across different page numbers is counted. When an occurrence occurs more than once, the difference between the maximum and minimum vertical coordinate values of the upper boundary of all page text boxes within the text content group is calculated, and this difference is then compared with the page height to obtain the vertical coordinate difference ratio of the text content group. Within the set of page text boxes... The algorithm calculates the difference between the maximum and minimum vertical coordinates of the top boundaries of all page text boxes, and then uses this difference to calculate the ratio of the page height to obtain the overall vertical coordinate difference ratio of the page. When the vertical coordinate difference ratio of the text content group is less than the overall vertical coordinate difference ratio of the page, a table area exclusion check is performed on the page text boxes in the text content group. Within the candidate table block record set, the table area exclusion check matches the candidate table block area boundaries based on the page number. When a page text box falls within the candidate table block area boundary, the text content group is determined to be a table content group and is not included in the header / footer text box set. When none of the page text boxes in the text content group fall within any candidate table block area boundary, the page text boxes in the text content group are included in the header / footer text box set.
[0047] Furthermore, after the header and footer text box set is generated, header and footer text removal processing is performed on the candidate table block record set.
[0048] The header and footer text removal process iterates through the candidate table block text box set for each candidate table block record in the candidate table block record set. When a page text box in the candidate table block text box set has the same text content and the same upper boundary y-coordinate as a record in the header and footer text box set, the page text box is removed from the candidate table block text box set. After the removal process is completed, the candidate table block text box set after the removal process is registered as the cleaned table block text box set.
[0049] Bind the page number, the candidate table block area boundary, and the cleaned table block text box set to generate cleaned table block records; summarize all cleaned table block records to form a cleaned table block record set.
[0050] The purified table block record is the record format after the candidate table block records have had their header and footer text removed.
[0051] S2. Based on the cleaned table block record set, extract the column position structure and the table header word set, construct the cross-page continuous operator and generate the cross-page judgment threshold to form a cross-page connection relationship set.
[0052] Furthermore, based on the cleaned table block record set, column position structure extraction processing is performed on the cleaned table block text box set within each cleaned table block record.
[0053] The column position structure extraction process uses the left boundary horizontal coordinate of the text boxes in the cleaned table block text box set as the structural benchmark. All left boundary horizontal coordinates are sorted in ascending order of value. The horizontal spacing value is calculated for each adjacent left boundary horizontal coordinate after sorting, and the results are summarized to form a set of horizontal spacing values. The set of horizontal spacing values is then sorted in ascending order of value. The horizontal spacing value located in the middle position after sorting is used as the column spacing scale. When the number of horizontal spacing values is odd, the middle horizontal spacing value is taken. When the number of horizontal spacing values is even, the middle horizontal spacing value is taken.
[0054] After determining the column spacing scale, the horizontal spacing values of adjacent left boundary x-coordinates are compared one by one. When the horizontal spacing value is not greater than the column spacing scale, the corresponding left boundary x-coordinates are divided into the same column group. When the horizontal spacing value is greater than the column spacing scale, they are divided into new column groups. After completing the grouping of all left boundary x-coordinates, the left boundary x-coordinates within each column group are sorted in ascending order of value. The left boundary x-coordinate in the middle position after sorting is taken as the column position element. All column position elements are summarized to form the column position structure.
[0055] Extract the candidate table block region boundary from the cleaned table block records; the candidate table block region boundary includes the left boundary x-coordinate and the right boundary x-coordinate; use the difference between the right boundary x-coordinate and the left boundary x-coordinate as the candidate table block region width to limit the definition range of the continuous expression of column position structure.
[0056] Furthermore, within the width of the candidate table block area, the column position structure is represented continuously.
[0057] Using the width of the candidate table block area as the horizontal definition interval, arbitrarily select a horizontal position within the horizontal definition interval; calculate the distance between the horizontal position and each column position element in the column position structure, and select the minimum distance; square the minimum distance and construct an exponential decay value by combining it with the column spacing scale; normalize the exponential decay value within the width of the candidate table block area so that the integral of the normalized result over the interval is one; the normalized result represents the continuous intensity of the horizontal position belonging to the column boundary position; the continuous intensity values of all horizontal positions constitute the column structure continuous function, expressed as: ; in, This represents the continuous strength value of the column boundary at the lateral position. This is the horizontal position variable within the candidate table block area; It is the set of all column position elements in the column position structure; For any column position element in the column position structure; The width of the candidate table block area; For positional variables in the integral; The column spacing scale.
[0058] Furthermore, within each cleaned table block record, header row recognition processing is performed on the cleaned table block text box set.
[0059] The header row recognition process uses the top boundary ordinate of the page text boxes in the cleaned table block text box set as the vertical sorting benchmark; all page text boxes are sorted in ascending order of their top boundary ordinate; the page text box with the smallest top boundary ordinate value after sorting is selected as the first row reference page text box; the top boundary ordinates of all page text boxes in the cleaned table block text box set are extracted and sorted in ascending order of value; the vertical spacing value is calculated for two adjacent top boundary ordinates after sorting, and a set of vertical spacing values within the candidate table block is formed; the set of vertical spacing values within the candidate table block is sorted in ascending order of value, and the vertical spacing value in the middle position after sorting is used as the line spacing scale; page text boxes whose top boundary ordinate is not greater than the line spacing scale are included in the first row page text box set; the page text boxes in the first row page text box set represent the text lines of the candidate table block that are closest to the top in the vertical position.
[0060] Normalization is performed on the text content in the first row of the page text box set. Normalization includes removing space characters and unifying the representation of numeric characters in the text content. The normalized text content is then segmented into tokens based on delimiters, including spaces, punctuation marks, and tabs. All tokens obtained from the segmentation are deduplicated. The deduplicated tokens are then summarized to form a header token set.
[0061] The header term set represents the set of term features of the top text line of the candidate table block; each term in the header term set corresponds to the column header keyword of the top column of the candidate table block.
[0062] Furthermore, the purified table block record set is sorted by page number in ascending order and grouped by page number to obtain a page number group set; two consecutive page number groups are selected from the page number group set; the purified table block records in the two page number groups are paired up to form an adjacent page table block pairing set; and the cross-page continuity operator is calculated for each pair of purified table block records in the adjacent page table block pairing set.
[0063] For each cleaned table block record in the page number group with the smaller page number, compare its cross-page continuation operator with all cleaned table block records in the page number group with the larger page number, and select the pair with the largest cross-page continuation operator value as the best matching pair on the smaller page number side; for each cleaned table block record in the page number group with the larger page number, compare its cross-page continuation operator with all cleaned table block records in the page number group with the smaller page number, and select the pair with the largest cross-page continuation operator value as the best matching pair on the larger page number side; register the pairs that simultaneously satisfy the best matching pair on the smaller page number side and the best matching pair on the larger page number side pointing to each other as a set of mutually best matching pairs.
[0064] The cross-page continuity operator includes column structure continuity and header term consistency.
[0065] For each pair of purified table block records, the column structure continuity function is integrally correlated over the horizontal interval to obtain the column structure continuity, expressed as: ; in, For column structure continuity; This represents the continuous strength value of the column boundary in the horizontal position on the first page; This is the continuous strength value of the column boundary in the horizontal position on the second page; This is the width of the candidate table block area on the first page; This is the width of the candidate table block area on the second page.
[0066] The column structure continuity value ranges from zero to one. The larger the column structure continuity value, the more consistent the horizontal column structure distribution.
[0067] For each pair of cleaned table block records, the ratio of the intersection to the union of the header term sets is calculated to obtain the header term consistency, expressed as: ; in, Consistency of header terms; The set of words in the header of the first page; The set of words in the header of the second page; The number of intersecting lexical units; The number of words in the union set.
[0068] The consistency score of the header terminology ranges from zero to one. The higher the consistency score, the higher the semantic consistency of the header terminology.
[0069] Taking the smaller value between column structure continuity and header term consistency, we obtain the cross-page continuity operator, expressed as: ; in, This is a continuous operator spanning multiple pages.
[0070] The value of the cross-page continuation operator ranges from zero to one. The larger the value of the cross-page continuation operator, the higher the probability that the two cleaned table block records belong to the same cross-page table.
[0071] Furthermore, the cross-page determination threshold generation process takes the cross-page continuous operators in the best-match pairing set as input, and eliminates the influence of unstable pairings of multiple tables on the same page through the cross-page continuous operators in the best-match pairing set; the cross-page continuous operators in the best-match pairing set are summarized to form a cross-page continuous operator set; the cross-page continuous operator set is sorted in ascending order of value; the cross-page continuous operator in the middle position after sorting is used as the cross-page determination threshold; when the number of cross-page continuous operators is odd, the middle cross-page continuous operator is selected; when the number of cross-page continuous operators is even, the middle cross-page continuous operator at the beginning is selected; wherein, the cross-page determination threshold is used to characterize the lowest consistency lower bound of the cross-page connection relationship.
[0072] After the cross-page determination threshold is determined, the set of cross-page continuum operators is compared one by one; when the number of cross-page continuum operators is not less than the cross-page determination threshold, the corresponding adjacent page table blocks are paired and marked as valid cross-page connections; when the number of cross-page continuum operators is less than the cross-page determination threshold, the corresponding adjacent page table blocks are paired and marked as disconnected.
[0073] All valid cross-page connections are chained together. Cleaned table block records with consecutive page numbers and consecutively valid cross-page connections are grouped into the same cross-page connection group. For example, if there is a valid cross-page connection between the first and second pages, and also between the second and third pages, then the first, second, and third pages are grouped into the same cross-page connection group. This process is repeated to merge all valid cross-page connections, resulting in several cross-page connection groups. Each cross-page connection group contains cleaned table block records corresponding to consecutive page numbers. All cross-page connection groups are then aggregated to form a cross-page connection relationship set.
[0074] It should be noted that, to verify the ability of the cross-page table intelligent processing and retrieval enhancement method to suppress column position drift and interference from multiple candidate table blocks on the same page when generating a cross-page connection relationship set, a mixed document of multi-page scanned PDF and electronic PDF was selected as the test material in the detection environment. The scanned PDF was rendered into page images at a uniform resolution, and then text recognition and table region detection were performed. The electronic PDF directly parsed the table region and text layer information, generating a unified cleaned set of table block records. Taking the pairing of candidate table blocks on adjacent pages as the object, the cross-page table intelligent processing and retrieval enhancement method calculates the cross-page continuity operator based on the column position structure and the table header term set, and calculates the cross-page judgment threshold to generate a cross-page connection relationship set by using the best matching pairing set. The control method directly makes connection judgments within the same candidate pairing range using fixed judgment rules, without calculating the cross-page judgment threshold. The evaluation index uses the cross-page connection matching F1 value to measure the consistency between the generated cross-page connection relationship set and the true connection set.
[0075] like Figure 5As shown, the horizontal axis represents the column position translation magnitude (pixels), and the vertical axis represents the cross-page connection matching F1 value. The same-color curves represent the same number of candidate table blocks on the same page (1, 2, 3), used to characterize the intensity of candidate interference introduced by parallel tables on the same page. Under the same color, solid dots represent the cross-page table intelligent processing and retrieval enhancement method, and dashed squares represent the control method. As the column position translation magnitude increases and the number of candidate table blocks on the same page increases, the cross-page connection matching F1 value of the control method decreases more significantly, while the cross-page table intelligent processing and retrieval enhancement method maintains a more stable trend across all levels. This indicates that the method of this invention can suppress false and missed connections under candidate interference enhancement conditions, improving the stability and reliability of the generated cross-page connection relationship set.
[0076] S3. Merge cross-page tables by combining cross-page join relationships and restore the row and column structure to generate logical table records and build retrieval-enhanced index records to complete the retrieval-enhanced database entry.
[0077] Furthermore, the cross-page connection groups in the cross-page connection relationship set are sorted in ascending order according to the first page number of the cross-page connection group, and a unique identifier for the logical table is generated according to the sorting sequence number; cross-page table merging and row and column structure restoration are performed on each cross-page connection group to generate logical table records.
[0078] The cross-page table merging and row / column structure restoration process includes column position structure merging, row group merging, cell mapping, and structured output.
[0079] Furthermore, the column position structure merging process performs left boundary horizontal coordinate aggregation on all cleaned table block records within the cross-page connection group, extracts the left boundary horizontal coordinates of page text boxes from the cleaned table block text box set, and aggregates them within the cross-page connection group to form a sequence of left boundary horizontal coordinates for the cross-page connection group; the sequence of left boundary horizontal coordinates for the cross-page connection group is sorted in ascending order of value; the horizontal spacing value is calculated for two adjacent left boundary horizontal coordinates after sorting, and aggregated to form a set of horizontal spacing values for the cross-page connection group; the set of horizontal spacing values for the cross-page connection group is sorted in ascending order of value, and the horizontal spacing value located in the middle position after sorting is selected as the column merging scale; the rule for taking the middle position of the column merging scale is that when the number of horizontal spacing values is odd, the exact middle horizontal spacing value is taken, and when the number of horizontal spacing values is even, the middle horizontal spacing value from the beginning is taken.
[0080] After the column merging scale is determined, the horizontal spacing values of adjacent left boundary x-coordinates of the sorted cross-page connection groups are compared one by one. Continuous left boundary x-coordinates with horizontal spacing values not greater than the column merging scale are grouped into the same column group. When the horizontal spacing value is greater than the column merging scale, a new column grouping is started. The left boundary x-coordinates within each column group are sorted in ascending order of value, and the left boundary x-coordinate in the middle position after sorting is selected as the column position element. All column position elements are summarized to form the logical column position structure.
[0081] Furthermore, the row group merging process performs upper boundary ordinate grouping on each cleaned table block record within the cross-page connection group, extracts the upper boundary ordinates of the page text boxes in the candidate table block text box set, and sorts them in ascending order of value within each candidate table block text box set; calculates the vertical spacing value for two adjacent upper boundary ordinates after sorting, and summarizes them to form a set of vertical spacing values within the candidate table block; sorts the set of vertical spacing values within the candidate table block in ascending order of value, and selects the vertical spacing value in the middle position after sorting as the row merging scale; the rule for taking the middle position of the row merging scale is that when the number of vertical spacing values is odd, the exact middle vertical spacing value is taken, and when the number of vertical spacing values is even, the middle vertical spacing value at the beginning is taken.
[0082] After the row merging scale is determined, the vertical spacing values of adjacent vertical coordinates of the sorted upper boundary are compared one by one. Continuous upper boundary vertical coordinates with a vertical spacing value not greater than the row merging scale are grouped into the same row group. When the vertical spacing value is greater than the row merging scale, a new row group is started. A row group number is assigned to each row group, and the minimum and maximum values of the upper boundary vertical coordinates of the page text boxes contained in the row group are recorded to limit the vertical coverage of the row group.
[0083] The cleaned table block records are arranged in ascending order of page number. The row group number of each page is added to the number of row groups in the previous page to obtain the cross-page row index, so that all row groups in the cross-page join group are consecutively numbered in the same row index sequence; the number of row groups in the previous page is used as the cross-page row index offset.
[0084] Furthermore, the cell mapping uses the logical column position structure and cross-page row index as constraints to traverse the set of cleaned table block text boxes of each cleaned table block record in the cross-page connection group one by one; calculate the column index for each page text box, and select the column position element index that has the smallest distance between the horizontal coordinate of the left boundary of the page text box and the column position element in the logical column position structure; if the distances are the same, take the column position element index with the smaller index.
[0085] For each page text box, calculate the row index. The row index is selected by taking the row group number into which the upper boundary ordinate of the page text box belongs and adding the cross-page row index offset. When the upper boundary ordinate falls on the vertical coverage boundary of the adjacent row group, it is assigned to the row group with the smaller ordinate.
[0086] Bind text content, page number, row index, and column index to form a table cell record; when there are more than one table cell record with the same row index and the same column index, concatenate the text content according to the left boundary horizontal coordinate of the page text box from smallest to largest to form a merged table cell record; when concatenating, write a space or tab symbol between adjacent text content.
[0087] Summarize the page numbers of all cleaned table block records within the cross-page join group, and take the minimum and maximum page numbers to generate the page number range for the cross-page join group.
[0088] Furthermore, structured output processing is performed on the merged table cell records, sorting them by row index in ascending order and column index in ascending order, and outputting the logical table structured representation text row by row and column by column according to the sorting order.
[0089] The logical table structure represents the text. The example uses HTML table text. In the HTML table text, each row writes the cell content corresponding to the row index, each column writes the cell content corresponding to the column index, and each cell writes the text content of the merged table cell record corresponding to the intersection of the row index and the column index.
[0090] The logical table record is formed by binding the unique identifier of the logical table, the page number range of the cross-page connection group, the logical column position structure, the merged table cell record, and the logical table structured representation text.
[0091] Furthermore, the logical table records undergo retrieval enhancement index record construction processing, which includes anchor term construction, summary generation, summary coverage verification, and vectorized database insertion.
[0092] Furthermore, anchor term construction includes generating logical header term sets, row title term sets, and unit term sets.
[0093] Logical header term set generation reads the header term sets associated with each cleaned table block record within the cross-page join group, performs deduplication, and summarizes them to obtain the logical header term set; Row title term set generation performs text content normalization, delimiter segmentation, and deduplication processing on the cell text of the smallest column index in the logical table record, and summarizes it to obtain the row title term set; Unit term set generation filters terms containing unit symbols or unit marks from the logical header term set and summarizes them to obtain the unit term set; Unit symbols include percentage signs, currency symbols, length unit symbols, and mass unit symbols.
[0094] The set of logical header terms, the set of row title terms, and the set of unit terms are deduplicated and summarized to obtain the set of anchor terms.
[0095] Furthermore, the summary generation incorporates the page number range of cross-page join groups, the set of logical table header terms, the set of row title terms, and the set of unit terms into the summary generation rules to generate the summary text of the master table and the summary text of each sub-table.
[0096] The summary text of the master table includes a description of the page number range across the page link group, a description of the logical table header terms, a description of the row title terms, and a description of the unit terms. The summary text of each sub-table is grouped by page number and includes page number information and a description of the keywords within the page.
[0097] Furthermore, the summary coverage check performs delimiter segmentation and deduplication on the summary text of the master table, summarizing it to obtain the summary term set; the coverage ratio of the summary term set to the anchor term set is calculated to form the summary coverage rate, expressed as: ; in, Abstract coverage; A set of abstract terms; Anchor word set; ; represents the number of intersecting lexical units; This represents the number of anchor lexical units.
[0098] When the summary coverage rate is less than the cross-page determination threshold, it is determined that the summary coverage consistency has not reached the lowest consistency lower bound of the cross-page connection relationship. The uncovered terms in the anchor term set are appended to the end of the summary text of the main table according to the writing order of the summary generation rules. The writing order of the summary generation rules is logical table header term description, row title term description and unit term description. The summary coverage rate is then recalculated until the summary coverage rate is not less than the cross-page determination threshold.
[0099] Furthermore, the vectorization process involves performing text vectorization on the summary text of the master table and the summary text of each sub-table, resulting in a summary vector of the master table and a summary vector of each sub-table. The summary vector of the master table is bound to the summary text of the master table, and the summary vector of each sub-table is bound to the summary text of the sub-table, while retaining the page number information.
[0100] Text vectorization processing involves segmenting the abstract text to obtain a word set; counting the occurrences of each word in the abstract text, and using this occurrence count as the word frequency; counting the number of abstract texts containing the word across the entire abstract text, and calculating the inverse document frequency based on the total number of abstract texts; multiplying the word frequency by the inverse document frequency as the word component; and summarizing all word components to form the abstract vector, which is stored in key-value pairs between words and word components.
[0101] The word components of the abstract vector are represented as follows: ; ; in, The abstract text includes the summary table abstract text and the sub-table abstract text; For words in the abstract text; Abstract text In lexical Dimensional lexical components; as a word element In the summary text The number of times it appears in; as a word element Inverse document frequency; The total number of summary texts is the sum of the total number of summary texts in the main table and the sum of the sum of summary texts in each sub-table. For containing word elements The number of summary texts.
[0102] Logical table structured representations text location identifiers are storage paths, filenames, or database primary keys.
[0103] The abstract vector is bound and registered with the unique identifier of the logical table, the page number range of the cross-page link group, and the location identifier of the structured text of the logical table to form a search-enhanced index record; after all logical table records are registered, they are summarized to form a search-enhanced index record.
[0104] S4. Utilize retrieval enhancement index records to match natural language queries and perform hit checks, outputting a logical table structured representation of text and page number ranges for cross-page join groups.
[0105] Furthermore, text content normalization is performed on the natural language query, which includes removing whitespace characters and unifying the representation of numeric characters; the normalized natural language query is then segmented using delimiters, including whitespace, punctuation, and tab characters; the segmented terms are deduplicated and then aggregated to form a query term set.
[0106] Furthermore, candidate recall processing is performed using the summary vectors in the retrieval-enhanced index records.
[0107] The number of occurrences of each term in the query term set is counted, and the number of summary texts containing the term and the total number of summary texts are counted within the scope of the enhanced retrieval index records. The query term components are calculated according to the term component calculation rules used in the summary vector, and all query term components are summarized to form the query vector.
[0108] The vector dot product similarity calculation method is used to calculate the vector dot product similarity between the query vector and the summary vector of each enhanced index record. The calculation rules are as follows: taking each query term in the query vector as the traversal object, when there is a summary term in the summary vector with the same key value as the query term, the query term component corresponding to the query term is multiplied by the summary term component corresponding to the summary term and the summed to obtain the vector dot product similarity; when there is no summary term in the summary vector with the same key value as the query term, the contribution value of the query term to the vector dot product similarity is recorded as zero; when there is no term with the same key value between the query vector and the summary vector, the vector dot product similarity is zero. No normalization processing is performed on the query vector and the summary vector during the vector dot product similarity calculation process.
[0109] The logical table unique identifier of each enhanced index record is bound and registered with the corresponding vector dot product similarity, and the results are summarized to form a vector dot product similarity sequence. The vector dot product similarity sequence is sorted from largest to smallest, and the vector dot product similarity at the median position after sorting is taken as the lower bound of the vector dot product similarity. The enhanced index records with vector dot product similarity not less than the lower bound of the vector dot product similarity are registered as a set of candidate index records.
[0110] Furthermore, the candidate index record set undergoes candidate aggregation processing, which merges candidate index records with the same logical table unique identifier to obtain a candidate logical table unique identifier set; the number of candidate index records is counted for each logical table unique identifier in the candidate logical table unique identifier set, and the logical table unique identifier with the largest number of candidate index records is registered as the candidate logical table unique identifier.
[0111] When the number of candidate index records is the same, select the logical table unique identifier with the larger maximum value of the vector dot product similarity among the candidate index records. If the maximum value of the vector dot product similarity is still the same, extract the page number of the candidate index record corresponding to the tied logical table unique identifier and take the smallest page number. Select the logical table unique identifier with the smaller smallest page number.
[0112] Furthermore, a hit verification process is performed on the candidate index records associated with the unique identifier of the candidate logical table; the hit verification process performs delimiter segmentation and deduplication on the summary text of the candidate index records, and summarizes them to form a candidate summary term set; the number of intersection terms between the query term set and the candidate summary term set is calculated, and the ratio of the number of intersection terms to the number of terms in the query term set is calculated to form the hit rate.
[0113] When the hit rate is not less than the cross-page judgment threshold, the query matching consistency is determined to have reached the lowest consistency lower bound of the cross-page join relationship, and the candidate logical table unique identifier is registered as the target logical table unique identifier; when the hit rate is less than the cross-page judgment threshold, the query matching consistency is determined to have not reached the lowest consistency lower bound of the cross-page join relationship, and is not registered as the target logical table unique identifier.
[0114] Furthermore, the system reads the location identifier of the structured text in the target logical table and the page number range of the cross-page connection group associated with the unique identifier of the target logical table; locates the structured text in the logical table based on the location identifier of the structured text in the logical table; and outputs the structured text in the logical table and the page number range of the cross-page connection group.
[0115] It should be noted that, to verify the effect of the cross-page table intelligent processing and retrieval enhancement method on improving the hit stability of natural language queries after retrieval enhancement and database insertion, the test environment was selected with... Figure 5 Using a mix of multi-page scanned PDFs and electronic PDFs from the same source as test materials, the process involved generating a cleaned set of table block records, a set of cross-page connection relationships, and merging cross-page tables to obtain logical table records. Based on these logical table records, a retrieval-enhanced index was constructed and compared with two control methods under the same query set conditions: Control Method 1 used keyword matching for candidate matching without building a retrieval-enhanced index; Control Method 2 used vector recall to generate a candidate set without performing hit verification. The cross-page table intelligent processing and retrieval enhancement method performed hit verification on candidates based on vector recall and output the hit results. The evaluation metric used was the hit rate, which represents the proportion of the query target logical table that was matched.
[0116] like Figure 6 As shown, the horizontal axis represents the number of candidate truncations (i.e., the size of the Top-k candidates returned by vector recall), and the vertical axis represents the hit rate. The three curves correspond to the control method 1 (keyword matching), control method 2 (vector recall), and the cross-page table intelligent processing and retrieval enhancement method, respectively. As the number of candidate truncations increases, the hit rate of each method shows an upward trend. However, the cross-page table intelligent processing and retrieval enhancement method maintains a higher hit rate for each number of candidate truncations. This indicates that the present invention can suppress false hits and improve the stable hit capability of the target logical table by enhancing the index records and the hit verification, thereby making the output of the logical table structured representation text and its cross-page connection group page number range more reliable.
[0117] This embodiment also provides an intelligent processing and retrieval enhancement system for cross-page tables, including: The document parsing module is used to perform text recognition and table region detection on each page of the input document, identify candidate table block regions and remove header and footer text, and generate a cleaned set of table block records. The cross-page structure recognition module is used to extract the column position structure and the table header word set based on the cleaned table block record set, construct cross-page continuous operators and generate cross-page judgment thresholds to form a set of cross-page connection relationships; The index building module is used to merge cross-page tables and restore the row and column structure by merging cross-page join relationship sets, generate logical table records and build search-enhanced index records, and complete the search-enhanced database entry. The query matching module is used to match natural language queries with enhanced index records and perform hit checks, outputting a logical table structured representation of text and page number ranges for cross-page join groups.
[0118] In summary, this invention achieves stable generation of cross-page connection relationship sets by: constructing a cross-page continuity operator and generating a cross-page determination threshold; measuring the consistency between column position structure and header term set; and thus achieving stable determination of cross-page table structure continuity. Furthermore, by constructing retrieval enhancement index records and performing text vectorization processing, it achieves the association between summary vectors and logical table structured representation text, and combines hit verification to complete natural language query matching, thereby achieving consistent association between logical table structured representation text and retrieval expression.
[0119] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.
Claims
1. A method for intelligent processing and enhanced retrieval of cross-page tables, characterized in that, include: Perform text recognition and table region detection on each page of the input document, identify candidate table block regions and remove header and footer text, and generate a cleaned set of table block records. Based on the purified table block record set, the column position structure and the table header word set are extracted, a cross-page continuity operator is constructed and a cross-page judgment threshold is generated to form a cross-page connection relationship set. The construction of the cross-page continuation operator and the generation of the cross-page judgment threshold include: sorting the cleaned table block record set according to the page number and grouping it according to the page number; performing pairwise pairing of the cleaned table block records in two consecutive page number groups to form a pairing set of adjacent page table blocks. Construct a column structure continuity function based on the column position structure, calculate the column structure continuity based on the column structure continuity function, calculate the header term consistency based on the header term set, and generate a cross-page continuity operator by taking the smaller value between the column structure continuity and the header term consistency. In the set of adjacent page table block pairings, the pairings with the largest cross-page continuous operator values are selected to form the best matching pairing set. The cross-page continuous operators in the best matching pairing set are summarized and sorted. The cross-page continuous operator in the middle position is used as the cross-page judgment threshold. The adjacent page table block pairings with cross-page continuous operators not less than the cross-page judgment threshold are marked as valid cross-page connections. The valid cross-page connections are then chained and merged to generate a set of cross-page connection relationships. By merging cross-page tables and restoring the row and column structure through the cross-page connection relationship set, logical table records are generated and search-enhanced index records are built to complete the search-enhanced database entry. The construction of the enhanced retrieval index records includes performing anchor term construction, summary generation, summary coverage verification, and text vectorization processing on logical table records; Anchor point term set is generated by using the logical header term set, row title term set, and unit term set. Then, based on the page number range of the cross-page connection group and the anchor point term set, the summary text of the main table and the summary text of each sub-table are generated. Perform summary coverage verification on the summary text of the master table and add uncovered terms from the anchor term set if the coverage is insufficient; Perform text vectorization processing on the summary text of the master table and the summary text of the sub-table to generate summary vectors. Then bind and register the summary vectors with the unique identifier of the logical table, the page number range of the cross-page connection group, and the location identifier of the structured representation text of the logical table to generate retrieval enhancement index records. The system leverages retrieval enhancements to match indexed records with natural language queries and performs hit checks, outputting a logical table-based structured representation of text and page number ranges for cross-page join groups.
2. The intelligent processing and retrieval enhancement method for cross-page tables as described in claim 1, characterized in that, The step of performing text recognition on each page of the input document includes parsing the input document page by page according to the page number order and converting each page of the input document into a page image. Perform text recognition processing on the page image, identify the text region in the page and record the text content, left boundary x-coordinate, right boundary x-coordinate, top boundary y-coordinate and bottom boundary y-coordinate of the text region, bind the text region with the identified text content and rectangular boundary coordinates to generate a page text box; Collect all text boxes on the same page and bind them to the page number to generate a collection of text boxes.
3. The intelligent processing and retrieval enhancement method for cross-page tables as described in claim 2, characterized in that, The process of identifying candidate table block regions and removing header and footer text includes performing table region detection processing based on the coordinate distribution of page text boxes in the page text box set, identifying candidate table block regions, and aggregating page text boxes within the candidate table block regions to form a candidate table block text box set, binding the page number, the boundary of the candidate table block region, and the candidate table block text box set to generate candidate table block records, and summarizing them to form a candidate table block record set. Perform header and footer text recognition processing on the set of page text boxes to obtain a set of header and footer text boxes. Remove the page text boxes corresponding to the set of header and footer text boxes from the set of candidate table block records. Register the set of candidate table block text boxes after removal as the set of purified table block text boxes and generate the set of purified table block records.
4. The method for intelligent processing and retrieval enhancement of cross-page tables as described in any one of claims 1 to 3, characterized in that, The extraction of column position structure and header term set based on the purified table block record set includes: within each purified table block record, extracting the left boundary horizontal coordinate of the page text box in the purified table block text box set and sorting it by value from smallest to largest; calculating the horizontal spacing value of adjacent left boundary horizontal coordinates and selecting the horizontal spacing value in the middle position as the column spacing scale; grouping the left boundary horizontal coordinates into columns according to the column spacing scale; selecting the median horizontal coordinate in each column group to form column position elements; and summarizing to generate the column position structure. The first set of page text boxes is identified based on the y-coordinate of the upper boundary of the page text boxes. Normalization, delimiter segmentation, and word deduplication are performed on the text content of the first set of page text boxes to generate a header word set.
5. The intelligent processing and retrieval enhancement method for cross-page tables as described in claim 1, characterized in that, The step of merging cross-page tables and restoring the row and column structure by using a set of cross-page connection relationships includes sorting the cross-page connection groups in the set of cross-page connection relationships in ascending order according to the first page number of the cross-page connection group, and generating a unique logical table identifier according to the sorting sequence number. Within the cross-page connection group, summarize the horizontal coordinates of the left boundary of the page text box to generate a logical column position structure, and summarize the vertical coordinates of the upper boundary to generate a cross-page row index; Based on the logical column position structure and the cross-page row index, the page text boxes are mapped to cells to generate table cell records. Records with the same row index and column index are merged to generate merged table cell records. Output the logical table structured representation text in the order of row index and column index, and bind it with the logical table unique identifier and the page number range of cross-page join group to generate logical table records.
6. The intelligent processing and retrieval enhancement method for cross-page tables as described in claim 1 or 5, characterized in that, The method of using retrieval enhancement index records to match natural language queries includes performing text content normalization, delimiter segmentation, and word deduplication on the natural language query to generate a query word set; Query vectors are generated by calculating query term components based on the query term set, and the dot product similarity between the query vector and the summary vector is calculated. Candidate index record sets are determined based on the similarity.
7. The intelligent processing and retrieval enhancement method for cross-page tables as described in claim 6, characterized in that, The execution hit verification includes performing candidate aggregation processing on the candidate index record set, generating a unique identifier for the candidate logical table, and performing hit verification processing on the candidate index records associated with the unique identifier for the candidate logical table. The hit rate is formed by calculating the ratio of the number of intersection tokens of the query token set and the candidate summary token set to the number of tokens in the query token set. When the hit rate is not less than the cross-page judgment threshold, the unique identifier of the candidate logical table is registered as the unique identifier of the target logical table, and the structured representation text of the logical table and the page number range of the cross-page connection group are output.
8. A cross-page table intelligent processing and retrieval enhancement system, based on the cross-page table intelligent processing and retrieval enhancement method according to any one of claims 1 to 7, characterized in that, include: The document parsing module is used to perform text recognition and table region detection on each page of the input document, identify candidate table block regions and remove header and footer text, and generate a cleaned set of table block records; The cross-page structure recognition module is used to extract the column position structure and the table header word set based on the cleaned table block record set, construct cross-page continuous operators and generate cross-page judgment thresholds to form a set of cross-page connection relationships; The index building module is used to merge cross-page tables and restore the row and column structure by merging cross-page join relationship sets, generate logical table records and build search-enhanced index records, and complete the search-enhanced database entry. The query matching module is used to match natural language queries with enhanced index records and perform hit checks, outputting a logical table structured representation of text and page number ranges for cross-page join groups.
Citation Information
Patent Citations
Method, device and equipment for retrieving table in file, medium and product
CN118550880A
Comparison method for single PDF (Portable Document Format) file tables in power industry based on multi-modal large model retrieval enhancement
CN121659924A