PDF (Portable Document Format) document structured analysis method based on weighted overlap ratio

By combining a weighted consistency scoring method with a configurable rule engine, the problems of inaccurate layout recognition and missing content in PDF document parsing are solved, achieving high-precision and robust structured parsing, which is suitable for parsing documents in multiple fields.

CN121807828APending Publication Date: 2026-04-07IOL WUHAN INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-16
Publication Date
2026-04-07

AI Technical Summary

Technical Problem

Existing PDF document parsing technologies suffer from problems such as inaccurate layout recognition, incorrect content classification, and missing document content when processing complex documents, making it difficult to meet the refined parsing needs of different fields.

Method used

By employing a weighted scalar approach, combined with a pre-trained layout analysis model and a configurable rule engine, and through cross-validation and correction of layout boxes and content object boxes, the layout-document content object tree is dynamically updated to achieve high-precision structured parsing.

Benefits of technology

It significantly improves the accuracy and robustness of layout recognition, can adapt to the document parsing needs of different fields, and improves the utilization efficiency of document data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121807828A_ABST
    Figure CN121807828A_ABST
Patent Text Reader

Abstract

The invention discloses a PDF (Portable Document Format) document structured analysis method based on weighted overlap ratio, which comprises the following steps of: performing layout analysis, standardization and sorting processing on an original PDF document to obtain a layout frame of the original PDF document and a corresponding category label data set; carrying out content object extraction on the original PDF document and constructing to obtain a content object box set of the original PDF document; based on a weighted coincidence degree scoring method, obtaining an optimal attribution layout of the original PDF document content object, and identifying an abnormal scene; based on a configurable rule engine, performing cross validation and deviation correction on the layout frame and the content object frame, and dynamically updating the layout-document content object tree; and based on the dynamically updated layout-document content object tree, outputting an analysis result, and converting and storing the analysis result. According to the method, the problems of inaccurate layout identification, wrong content classification, document content missing and the like are solved, and high-precision, high-robustness and high-flexibility structured analysis of the complex PDF document is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of document processing technology, and more specifically, to a method for structured parsing of PDF documents based on weighted approximation. Background Technology

[0002] In the context of digital office and data management, raw PDF documents have become the primary carrier for information transmission and storage across various fields due to their stable format and strong cross-platform compatibility. However, existing raw PDF document parsing technologies generally suffer from problems such as inaccurate layout recognition, incorrect content classification, and missing document content when processing complex documents such as papers, financial reports, and medical test reports, which seriously affect the efficiency of subsequent utilization of document data.

[0003] Analysis revealed the following main causes of the aforementioned problems: First, relying solely on Optical Character Recognition (OCR) or PDF parsing libraries fails to provide a comprehensive understanding of the document's hierarchical structure and layout logic. Second, the output of the layout analysis model is disconnected from the content parsing process, lacking an effective cross-validation mechanism and making it difficult to detect errors during parsing. Third, there is a lack of automatic error correction capabilities for unexpected content, such as layout tags labeled as titles when the actual content is a table. Fourth, the generalization ability of the layout analysis model has an upper limit, making it difficult to meet the refined document parsing needs of different fields.

[0004] Therefore, there is an urgent need for a method that can improve the accuracy and robustness of structured parsing of original PDF documents. Summary of the Invention

[0005] This invention provides a structured parsing method for PDF documents based on weighted consistency, which solves problems such as inaccurate layout recognition, incorrect content classification, and missing document content, and achieves high-precision, robust, and flexible structured parsing of complex original PDF documents.

[0006] The technical solution adopted in this invention is: A structured parsing method for PDF documents based on weighted approximation includes the following steps: S1. Perform layout analysis, standardization, and sorting on the original PDF document to obtain the layout frame and corresponding category label dataset of the original PDF document; S2. Extract content objects from the original PDF document and construct a set of content object frames for the original PDF document; S3. Based on the weighted fit scoring method, the optimal layout of the content objects in the original PDF document is obtained, and abnormal scenarios are identified. S4. Based on a configurable rule engine, cross-validate and correct the layout box and content object box, and dynamically update the layout-document content object tree. S5. Based on a dynamically updated layout-document content object tree, output the parsing results and convert and store them.

[0007] Further, step S1 includes: 1) Obtain the original PDF document; 2) Based on the pre-trained layout analysis model, perform layout analysis on each page of the original PDF document to obtain the layout box and corresponding category label of each page in the original PDF document. Specifically, the pre-trained layout analysis model includes YOLO series models or CNN models fine-tuned based on PubLayNet. The input is the rendered image or original structural information of each page in the original PDF document, and the output is a rectangular or quadrilateral layout box sorted according to the initial rules and category labels. The category labels include Title, Text, Table, Figure, Formula, Inline-Formula, PageHeader, PageFooter and picture. 3) Standardize the coordinates of the layout box: Convert the coordinates of the layout box to the same coordinate system as the original PDF document page; where the origin of the coordinates is the top left of the original PDF document page, and the resolution is 72dpi; 4) Sort the layout boxes according to the reading order: Within the column block scale, sort and verify the layout boxes in the order of first the vertical y-axis and then the horizontal x-axis to obtain the layout boxes of the original PDF document. 5) Based on the category labels corresponding to the layout boxes of the original PDF documents, a category label dataset is constructed.

[0008] Further, step S2 includes: 1) Call the open-source library for parsing original PDF documents, traverse the original PDF documents, and extract the content object data and coordinates of each page in the original PDF documents; among them, for scanned original PDF documents, OCR technology is used to extract the page text content in the original PDF documents and set a confidence threshold to filter low confidence text in order to avoid increasing redundant calculations; 2) Organize the content object data of each page in the original PDF document into a unified document content object frame; 3) Based on the document content object frame, construct a set of content object frames for the original PDF document, which includes content object data, object frame coordinates, and optional style information.

[0009] Further, step S3 includes: 1) Using the page as a unit, calculate the overlapping area of ​​each content object box and all layout boxes, the area of ​​the layout boxes, and the area of ​​the content object boxes based on the quadrilateral overlap area method. 2) Based on the overlap area of ​​each content object box and all layout boxes, the area of ​​the layout boxes and the area of ​​the content object box, the overlap score of a document's content object box and all layout boxes is calculated using a weighted overlap scoring method. 3) Obtain the highest overlap score, and the corresponding layout box is the optimal layout to which the document content object belongs. Identify abnormal scenarios where the layout box has no overlapping content objects or the content object has no belonging layout box.

[0010] Furthermore, the formula for calculating the area of ​​the layout frame is as follows:

[0011] In the formula, Let (a1, b1), (a2, b2), (a3, b3), and (a4, b4) be the coordinates of the four vertices of the layout box, which are either clockwise or counterclockwise. The formula for calculating the area of ​​the content object box is as follows:

[0012] In the formula, y1 represents the area of ​​the content object box; (c1, d1), (c2, d2), (c3, y3), and (c4, d4) are the coordinates of the four vertices of the content object box in clockwise or counterclockwise directions, respectively. The calculation process for the overlap area of ​​each content object box and all layout boxes is as follows: ①Based on the Sutherland-Hodgman algorithm, the vertex set of the intersection of the polygons formed by the content object box and the layout box is calculated; ② The area of ​​the polygon intersection, i.e., the shoelace formula, is used to calculate the overlapping area of ​​the content object box and all layout boxes. The calculation formula is as follows:

[0013] In the formula, Let x1, y1, (x2, y2), ..., (x...) represent the overlap area between the content object box and the layout box. n y n ) represents the clockwise or counterclockwise vertex coordinates of the polygon formed by the content object box and the layout box, where x is defined as... n+1 =x1, y n+1 =y1.

[0014] Furthermore, the formula for calculating the overlap score between the document content object box and all layout boxes is as follows:

[0015] In the formula, This represents the overlap area between the content object box and the layout box. This represents the area of ​​the layout box; The area of ​​the content object box; These are preset or adaptive weights.

[0016] Furthermore, step S4 specifically includes: Build a configurable rule engine, load the corresponding rule set according to the document domain, perform cross-validation on the layout box and content object box, perform correction operations for mismatches, and dynamically update the layout-document content object tree; The rule set includes the matching / restriction relationship between the document content object box and the layout box, the content form verification rules of the content object box, and the redundancy judgment rules of the layout box. The rule carrying forms include calculation scripts, regular expressions, and relational tables. The correction operation includes calling the LaTeX formula recognition engine to process inline formulas, calling the table engine to reconstruct tables, resetting the layout box category, performing OCR recognition, content reconstruction, redundant layout, and content elimination.

[0017] Further, step S5 includes: 1) Based on the updated layout-document content object tree, the output is the original PDF document parsing result; 2) Convert the original PDF document parsing results into a structured format, attach metadata, and then perform persistent storage; The metadata includes document source, parsing time, confidence score, and preview location information; the persistent storage stores the structured data in Elasticsearch, MongoDB database, or file system.

[0018] Another technical solution adopted by the present invention is: A structured parsing system for raw PDF documents based on weighted alpha, comprising: The layout analysis module is used to perform layout analysis, standardization, and sorting on the original PDF document to obtain the layout frame of the original PDF document and the corresponding category label dataset. The content extraction module is used to extract content objects from the original PDF document and construct a collection of content object frames for the original PDF document; The attribution determination module is used to obtain the optimal attribution layout of the original PDF document content objects based on the weighted adequacy scoring method, and to identify abnormal scenarios. The cross-validation and correction module is used to perform cross-validation and correction on the layout box and content object box based on the configurable rule engine, and dynamically update the layout-document content object tree. The structured output module is used to output parsed results, transform them, and store them based on a dynamically updated layout-document content object tree.

[0019] Compared with the prior art, the present invention has the following advantages: This invention significantly improves the accuracy of original PDF document layout recognition by introducing a weighted consistency scoring method, effectively solving problems such as inaccurate layout recognition, incorrect content classification, and missing document content in existing technologies. This method can understand the hierarchical structure and layout logic of a document as a whole, and promptly detects and corrects errors in the parsing process through a cross-validation mechanism, enhancing the system's robustness. Simultaneously, the configurable rule engine design allows this invention to flexibly adapt to document parsing needs in different fields, improving the system's generalization ability. Furthermore, this invention provides convenience for subsequent document management and utilization through additional metadata and persistent storage, further improving the efficiency of document data utilization. Attached Figure Description

[0020] The present invention will be further described below with reference to the accompanying drawings and specific embodiments: Figure 1 This is a flowchart illustrating a PDF document structured parsing method based on weighted approximation degree according to the present invention. Detailed Implementation

[0021] Example 1

[0022] like Figure 1 As shown, a PDF document structured parsing method based on weighted approximation includes: S1. Perform layout analysis, standardization, and sorting on the original PDF document to obtain the layout frame and corresponding category label dataset of the original PDF document; Specifically, 1) Obtain the original PDF document; 2) Based on the pre-trained layout analysis model, perform layout analysis on each page of the original PDF document to obtain the layout box and corresponding category label of each page in the original PDF document. Specifically, the pre-trained layout analysis model includes YOLO series models or CNN models fine-tuned based on PubLayNet. The input is the rendered image or original structural information of each page in the original PDF document, and the output is a rectangular or quadrilateral layout box sorted according to the initial rules and category labels. The category labels include Title, Text, Table, Figure, Formula, Inline-Formula, PageHeader, PageFooter and picture. 3) Standardize the coordinates of the layout box: Convert the coordinates of the layout box to the same coordinate system as the original PDF document page; where the origin of the coordinates is the top left of the original PDF document page, and the resolution is 72dpi; 4) Sort the layout boxes according to the reading order: Within the column block scale, sort and verify the layout boxes in the order of first the vertical y-axis and then the horizontal x-axis to obtain the layout boxes of the original PDF document. 5) Based on the category labels corresponding to the layout boxes of the original PDF document, construct the category label dataset; S2. Extract content objects from the original PDF document and construct a set of content object frames for the original PDF document; Specifically, 1) Call the open-source library for parsing original PDF documents, traverse the original PDF documents, and extract the content object data and coordinates of each page in the original PDF documents; among them, for scanned original PDF documents, OCR technology is used to extract the page text content in the original PDF documents and set a confidence threshold to filter low-confidence text in order to avoid increasing redundant calculations; 2) Organize the content object data of each page in the original PDF document into a unified document content object frame; 3) Based on the document content object frame, construct a set of content object frames for the original PDF document, which includes content object data, object frame coordinates, and optional style information; Among them, the original PDF document parsing open source libraries include MuPDF and Pypdf2; the OCR models include TesseractOCR and PP-OCR; the content object box content data includes text, image base64 encoded data or image file paths, and verified table structure data, which is extracted by open source libraries such as Camelot and Tabula. S3. Based on the weighted fit scoring method, the optimal layout of the content objects in the original PDF document is obtained, and abnormal scenarios are identified. Specifically, 1) Taking the page as a unit, based on the quadrilateral overlap area method, the overlap area of ​​each content object box and all layout boxes, the area of ​​the layout boxes and the area of ​​the content object box are calculated; wherein, the quadrilateral overlap area method is used to calculate the overlap area of ​​each content object box and all layout boxes, which is implemented through the Polygon class library of Python's Shaple module. The formula for calculating the area of ​​the layout box is as follows:

[0023] In the formula, Let (a1, b1), (a2, b2), (a3, b3), and (a4, b4) be the coordinates of the four vertices of the layout box, which are either clockwise or counterclockwise. The formula for calculating the area of ​​the content object box is as follows:

[0024] In the formula, y1 represents the area of ​​the content object box; (c1, d1), (c2, d2), (c3, y3), and (c4, d4) are the coordinates of the four vertices of the content object box in clockwise or counterclockwise directions, respectively. The calculation process for the overlap area of ​​each content object box and all layout boxes is as follows: ①Based on the Sutherland-Hodgman algorithm, the vertex set of the intersection of the polygons formed by the content object box and the layout box is calculated; ② The area of ​​the polygon intersection, i.e., the shoelace formula, is used to calculate the overlapping area of ​​the content object box and all layout boxes. The calculation formula is as follows:

[0025] In the formula, Let x1, y1, (x2, y2), ..., (x...) represent the overlap area between the content object box and the layout box. n y n ) represents the clockwise or counterclockwise vertex coordinates of the polygon formed by the content object box and the layout box, where x is defined as... n+1 =x1, y n+1 =y1; 2) Based on the overlap area of ​​each content object box and all layout boxes, the area of ​​the layout boxes, and the area of ​​the content object box, the overlap score of a document's content object box and all layout boxes is calculated using a weighted overlap scoring method; the calculation formula is as follows:

[0026] In the formula, This represents the overlap area between the content object box and the layout box. This represents the area of ​​the layout box; The area of ​​the content object box; The formula takes into account the relative sizes of the layout box and the object box, preventing small object boxes from being incorrectly assigned to large layout boxes, or vice versa. 3) Obtain the highest overlap score, and the corresponding layout box is the optimal layout to which the document content object belongs. Identify abnormal scenarios where the layout box has no overlapping content objects and the content object has no belonging layout box. S4. Based on a configurable rule engine, cross-validate and correct the layout box and content object box, and dynamically update the layout-document content object tree. Specifically, a configurable rule engine is built, which loads the corresponding rule set according to the document domain, performs cross-validation on the layout box and the content object box, performs correction operations on mismatches, and dynamically updates the layout-document content object tree. The rule set includes the matching / restriction relationship between the document content object box and the layout box, the content form verification rules of the content object box, and the redundancy judgment rules of the layout box. The rule carrying forms include calculation scripts, regular expressions, and relational tables. The correction operation includes at least one of calling the LaTeX formula recognition engine to process inline formulas, calling the table engine to reconstruct tables, resetting the layout box category, performing OCR recognition, content reconstruction, redundant layout, and content elimination. S5. Based on the dynamically updated layout-document content object tree, output the parsing results and convert and store them; Specifically, 1) Based on the updated layout-document content object tree, the original PDF document parsing result is output; 2) Convert the original PDF document parsing results into a structured format, attach metadata, and then perform persistent storage; The metadata includes document source, parsing time, confidence score, and preview location information; the persistent storage stores the structured data in Elasticsearch, MongoDB database, or file system.

[0027] This invention first uses a pre-trained layout analysis model to perform layout analysis, standardization, and sorting of the original PDF document to obtain the original PDF document. Then, it extracts the content objects from the original PDF document and constructs a set of content object bounding boxes. A weighted assortment algorithm is used to accurately assign content objects to layout boxes. Finally, a configurable rule engine performs bidirectional cross-validation and correction to generate and store structured data. This invention combines geometric algorithms and rule-based reasoning, balancing model prediction and knowledge constraints, significantly improving the accuracy, robustness, and flexibility of parsing complex original PDF documents. It is suitable for structured parsing scenarios in various fields such as academic papers, financial reports, and medical reports.

[0028] Example 2

[0029] Taking the structured parsing of original PDF documents of academic papers as an example, the implementation process of this invention will be explained in detail: 1) A CNN model based on PubLayNet fine-tuning is used to analyze the layout of each page of the paper PDF, and output layout boxes such as Title, Abstract, Text, Table, Formula, and Figure. The coordinates of the layout boxes are converted to a 72dpi page coordinate system, and sorted in the column blocks first by the y-axis and then by the x-axis to ensure that it is consistent with the reading order of the paper. 2) Extract preliminary data of text, images and tables from the paper using MuPDF. Table data is extracted and verified using Camelot. For the formula section of the scanned copy in the paper, PP-OCR is used to extract the text. A confidence threshold of 0.8 is set to filter low-confidence text, and a set of content object boxes containing content data, bounding box coordinates and font styles is constructed. 3) Use the Shaple module to calculate the overlap area between each content object box and the layout box. Content object box area and layout frame area Set the weight k=0.6, calculate the score using the weighted appropriateness formula, and determine the optimal layout box to which the content object belongs; identify a Figure layout box with no overlapping content objects and mark it as a redundant layout box to be corrected. 4) Load the domain rule set of the paper and perform cross-validation and correction operations: 1) A certain Inline-Formula layout box corresponds to a box containing " The plain text "" was recognized as a LaTeX formula by the Mathpix engine. 2) A certain Table layout box corresponds to several independent text blocks. The SLANet engine is called to rebuild the table structure. 3) Delete any marked redundant Figure layout boxes; 4) After correcting the errors, update the layout-content object tree to obtain the parsed results; 5) Convert the parsing results to Markdown format, add metadata such as paper source, parsing time, and confidence score, and store them in a MongoDB database for the construction of academic knowledge bases.

[0030] Example 3

[0031] Taking the structured parsing of original PDF documents of medical reports as an example, the application of this invention is illustrated: 1) Use the YOLO series model to reason about each page of the medical report, and output layout boxes such as Title, CheckItem, Result, Conclusion, and Picture to complete coordinate standardization and sequence verification.

[0032] 2) Extract text and image data from the report using Pypdf2, with images stored in base64 encoding; for scanned reports, use Tesseract OCR to extract text, with a confidence threshold of 0.75, and construct a set of content object boxes. 3) Calculate the weighted fit score, determine the content object's affiliation, and find that the content object under a certain Result layout box is a table, which is marked as a category mismatch and needs to be corrected; 4) Load the rule set for the medical report domain, reset the layout box category to Table for the case where the Result layout box corresponds to a table, call the Tabula engine to optimize the table structure, update the layout-content object tree, and output the parsing results; 5) Convert the parsing results into JSON format, attach metadata such as report number, parsing time, and preview location, and store them in the Elasticsearch database to support the retrieval and analysis of medical data.

[0033] The original PDF document structured parsing method and system described in this invention can be implemented through software programming and integrated into products such as document processing software, enterprise data management platforms, and medical information systems. It can efficiently handle the structured parsing needs of complex original PDF documents in multiple fields and has significant industrial application value.

[0034] The embodiments described above are merely preferred embodiments of the present invention and are not intended to limit the scope of the present invention. Various modifications and improvements made by those skilled in the art to the technical solutions of the present invention without departing from the principles and essence of the present invention should fall within the protection scope defined by the claims of the present invention.

Claims

1. A PDF document structured parsing method based on weighted consistency, characterized in that, Includes the following steps: S1. Perform layout analysis, standardization, and sorting on the original PDF document to obtain the layout frame and corresponding category label dataset of the original PDF document; S2. Extract content objects from the original PDF document and construct a set of content object frames for the original PDF document; S3. Based on the weighted fit scoring method, the optimal layout of the content objects in the original PDF document is obtained, and abnormal scenarios are identified. S4. Based on a configurable rule engine, cross-validate and correct the layout box and content object box, and dynamically update the layout-document content object tree. S5. Based on a dynamically updated layout-document content object tree, output the parsing results and convert and store them.

2. The PDF document structured parsing method based on weighted consistency according to claim 1, characterized in that, Step S1 includes: 1) Obtain the original PDF document; 2) Based on the pre-trained layout analysis model, perform layout analysis on each page of the original PDF document to obtain the layout box and corresponding category label of each page in the original PDF document. Specifically, the pre-trained layout analysis model includes YOLO series models or CNN models fine-tuned based on PubLayNet. The input is the rendered image or original structural information of each page in the original PDF document, and the output is a rectangular or quadrilateral layout box sorted according to the initial rules and category labels. The category labels include Title, Text, Table, Figure, Formula, Inline-Formula, PageHeader, PageFooter and picture. 3) Standardize the coordinates of the layout box: Convert the coordinates of the layout box to the same coordinate system as the original PDF document page; where the origin of the coordinates is the top left of the original PDF document page, and the resolution is 72dpi; 4) Sort the layout boxes according to the reading order: Within the column block scale, sort and verify the layout boxes in the order of first the vertical y-axis and then the horizontal x-axis to obtain the layout boxes of the original PDF document. 5) Based on the category labels corresponding to the layout boxes of the original PDF document, construct the category label dataset.

3. The PDF document structured parsing method based on weighted consistency according to claim 1, characterized in that, Step S2 includes: 1) Call the open-source library for parsing original PDF documents, traverse the original PDF documents, and extract the content object data and coordinates of each page in the original PDF documents; among them, for scanned original PDF documents, OCR technology is used to extract the page text content in the original PDF documents and set a confidence threshold to filter low confidence text in order to avoid increasing redundant calculations; 2) Organize the content object data of each page in the original PDF document into a unified document content object frame; 3) Based on the document content object frame, construct a set of content object frames for the original PDF document, which includes content object data, object frame coordinates, and optional style information.

4. The PDF document structured parsing method based on weighted consistency according to claim 1, characterized in that, Step S3 includes: 1) Using the page as a unit, calculate the overlapping area of ​​each content object box and all layout boxes, the area of ​​the layout boxes, and the area of ​​the content object boxes based on the quadrilateral overlap area method. 2) Based on the overlap area of ​​each content object box and all layout boxes, the area of ​​the layout boxes and the area of ​​the content object box, the overlap score of a document's content object box and all layout boxes is calculated using a weighted overlap scoring method. 3) Obtain the highest overlap score, and the corresponding layout box is the optimal layout to which the document content object belongs. Identify abnormal scenarios where the layout box has no overlapping content objects or the content object has no belonging layout box.

5. The PDF document structured parsing method based on weighted consistency according to claim 4, characterized in that, The formula for calculating the area of ​​the layout frame is as follows: In the formula, Let (a1, b1), (a2, b2), (a3, b3), and (a4, b4) be the coordinates of the four vertices of the layout box, which are either clockwise or counterclockwise. The formula for calculating the area of ​​the content object box is as follows: In the formula, y1 represents the area of ​​the content object box; (c1, d1), (c2, d2), (c3, y3), and (c4, d4) are the coordinates of the four vertices of the content object box in clockwise or counterclockwise directions, respectively. The calculation process for the overlap area of ​​each content object box and all layout boxes is as follows: ①Based on the Sutherland-Hodgman algorithm, the vertex set of the intersection of the polygons formed by the content object box and the layout box is calculated; ② The area of ​​the polygon intersection, i.e., the shoelace formula, is used to calculate the overlapping area of ​​the content object box and all layout boxes. The calculation formula is as follows: In the formula, Let x1, y1, (x2, y2), ..., (x...) represent the overlap area between the content object box and the layout box. n y n ) represents the clockwise or counterclockwise vertex coordinates of the polygon formed by the content object box and the layout box, where x is defined as... n+1 =x1, y n+1 =y1.

6. The PDF document structured parsing method based on weighted consistency according to claim 4, characterized in that, The formula for calculating the overlap score between a document content object box and all layout boxes is as follows: In the formula, This represents the overlap area between the content object box and the layout box. This represents the area of ​​the layout box; The area of ​​the content object box; These are preset or adaptive weights.

7. The PDF document structured parsing method based on weighted consistency according to claim 1, characterized in that, Step S4 is as follows: Build a configurable rule engine, load the corresponding rule set according to the document domain, perform cross-validation on the layout box and content object box, perform correction operations for mismatches, and dynamically update the layout-document content object tree; The rule set includes the matching / restriction relationship between the document content object box and the layout box, the content form verification rules of the content object box, and the redundancy judgment rules of the layout box. The rule carrying forms include calculation scripts, regular expressions, and relational tables. The correction operation includes calling the LaTeX formula recognition engine to process inline formulas, calling the table engine to reconstruct tables, resetting the layout box category, performing OCR recognition, content reconstruction, redundant layout, and content elimination.

8. The PDF document structured parsing method based on weighted consistency according to claim 1, characterized in that, Step S5 includes: 1) Based on the updated layout-document content object tree, the output is the original PDF document parsing result; 2) Convert the original PDF document parsing results into a structured format, attach metadata, and then perform persistent storage; The metadata includes document source, parsing time, confidence score, and preview location information; the persistent storage stores the structured data in Elasticsearch, MongoDB database, or file system.

9. A structured parsing system for raw PDF documents based on weighted consistency, characterized in that, include: The layout analysis module is used to perform layout analysis, standardization, and sorting on the original PDF document to obtain the layout frame of the original PDF document and the corresponding category label dataset. The content extraction module is used to extract content objects from the original PDF document and construct a collection of content object frames for the original PDF document; The attribution determination module is used to obtain the optimal attribution layout of the original PDF document content objects based on the weighted adequacy scoring method, and to identify abnormal scenarios. The cross-validation and correction module is used to perform cross-validation and correction on the layout box and content object box based on the configurable rule engine, and dynamically update the layout-document content object tree. The structured output module is used to output parsed results, transform them, and store them based on a dynamically updated layout-document content object tree.