Document semantic DOM network construction method and system
By building a semantic DOM network of PDF documents through a large language model, the problem of the inability to understand deep semantic logical relationships in existing technologies is solved, and efficient information acquisition and intelligent document processing capabilities are achieved.
Patent Information
- Application Number
- CN202511088141.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-05
- Publication Date
- 2025-09-09
- Estimated Expiration
- 2045-08-05
AI Technical Summary
Existing technologies are unable to effectively understand the deep semantic logical relationships of PDF documents, resulting in insufficient intelligent retrieval and analysis capabilities, and poor adaptability to different templates and fields.
A large language model is used to perform semantic analysis on PDF documents, constructing a DOM network with hierarchical and cross-hierarchical semantic relationships. By identifying node types and semantic roles, a semantic DOM tree is established and a semantic network is formed.
It achieves an understanding of the deep logical relationships of PDF documents, supports complex semantic queries, improves the accuracy and efficiency of information acquisition, and can be used for knowledge graph construction and intelligent question-answering systems.
Smart Images

Figure CN120611104A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of document processing and natural language processing, and in particular to a document semantic DOM network construction method and system. Background Art
[0002] PDF, a cross-platform electronic document format that maintains consistent content formatting, has been widely used in a wide range of fields, including scientific papers, legal contracts, and technical manuals. However, its initial design focused on visual consistency rather than machine-readable structured semantics, posing significant challenges for automated and intelligent document processing.
[0003] To address this issue, several structured processing methods have been proposed in the prior art. One representative technique is based on layout analysis and heuristic rules. This type of method typically infers the hierarchical structure of a document by identifying layout features such as font size, bolding, indentation, and position. For example, it will identify text with the largest font size and centering as a first-level heading, and paragraphs with bullet points or numbers as list items. However, this type of method has fundamental flaws: First, it completely lacks the ability to truly understand semantics. It can recognize that "this is a paragraph," but cannot understand whether this paragraph is "putting forward an argument," "providing evidence," or "defining a concept." This processing method often results in a tree of physical structures rather than a network of semantic logic, making it impossible to conduct in-depth intelligent retrieval and analysis. Secondly, because it relies on fixed parent-child hierarchical relationships, it cannot recognize and express complex semantic associations across different chapters. For example, an experimental result in Chapter 5 of a document may be intended to support a core argument put forward in Chapter 2. This long-range, non-hierarchical logical relationship is completely incapable of being captured by layout- and rule-based methods. In addition, the rule base of such methods requires manual maintenance, has poor generalization capabilities, and is extremely weak in adaptability to documents of different templates and different fields. It fails to effectively utilize the deep reasoning capabilities of large language models to solve the above-mentioned semantic problems. Therefore, there is an urgent need for a semantic processing method and system for PDF documents based on large language models. Summary of the Invention
[0004] The purpose of the present invention is to solve the defects in the prior art and to propose a document semantic DOM network construction method and system.
[0005] In order to achieve the above object, the present invention adopts the following technical solutions: A document semantic DOM network construction method includes the following steps: Step S101: Traversing the layout-block-tree of the PDF document to generate an initial semantic information flow containing multiple information units; Step S102: using a large language model to perform semantic analysis on the information units in the semantic information flow to generate semantic nodes including node types and semantic roles; Step S103: constructing a semantic DOM tree with a hierarchical relationship based on the layout features and semantic content between the semantic nodes; Step S104: Based on the semantic nodes, cross-level semantic relationships between nodes are analyzed and established to form the semantic DOM network.
[0006] Furthermore, the step of performing semantic analysis using the large language model in step S102 specifically includes: Generate a request containing the content of the information unit to be analyzed according to a preset prompt word template containing a structured output format definition; Sending the request to the large language model; Receive an analysis result returned by the large language model, which includes preset structured data (such as JSON format), and extract the node type and semantic role from the analysis result.
[0007] Furthermore, the step of constructing a semantic DOM tree with a hierarchical relationship in step S103 specifically includes: Based on the layout features of the PDF document, including font size, indentation or numbering, the semantic nodes are preliminarily divided into hierarchical levels; The large language model is used to confirm or modify the result of the preliminary hierarchical division at a semantic level to determine the final parent-child node relationship.
[0008] Furthermore, the method further includes optimizing the semantic DOM tree after constructing it, and the optimization step includes at least one of the following: Based on the preset semantic similarity threshold, adjacent semantic nodes of the same type are merged; Alternatively, an isolated semantic node whose parent node is the root node is reattached to a new parent node based on its semantic relevance to other nodes in the document.
[0009] Furthermore, the steps of analyzing and establishing cross-level semantic relationships in step S104 are specifically as follows: The large language model is used to determine the type of semantic relationship between at least two semantic nodes, and to generate a preliminary relationship confidence.
[0010] Furthermore, the step S104 further includes: The final relationship confidence is calculated based on the preliminary relationship confidence and in combination with the physical distance information and node type combination information between the at least two semantic nodes through a preset weighted formula.
[0011] Furthermore, the data structure of the semantic node includes: a unique node identifier, a node type, a node content, a semantic role, and a list for storing semantic relationships with other nodes.
[0012] The present invention also provides a document semantic DOM network construction system for implementing the above method.
[0013] A document semantic DOM network construction system, comprising: An information flow generation module is configured to traverse a layout-block-tree of a PDF document and generate an initial semantic information flow containing multiple information units; a semantic analysis module configured to perform semantic analysis on information units in the semantic information flow using a large language model to generate semantic nodes including node types and semantic roles; A DOM tree construction module is configured to construct a semantic DOM tree with a hierarchical relationship based on the layout features and semantic content between the semantic nodes; The semantic network forming module is configured to analyze and establish cross-level semantic relationships between nodes based on the semantic nodes to form the semantic DOM network.
[0014] Furthermore, the semantic analysis module is further configured to: Generate a request containing the content of the information unit to be analyzed according to a preset prompt word template containing a structured output format definition; Sending the request to the large language model; The analysis result returned by the large language model and containing preset structured data (such as JSON format) is received to extract the node type and semantic role.
[0015] The present invention also provides a computer-readable storage medium for implementing the above method and system.
[0016] Compared with the prior art, the present invention has the following beneficial effects: Large language models recognize the physical structure of documents (such as titles and paragraphs) and the logical functions (such as "argument" and "evidence") and semantic roles (such as "raising a question" and "data support") of each content unit. This allows for a deeper understanding of "what a document does" rather than just "what it is," thus improving understanding. By establishing cross-level semantic relationships (such as "support" and "refute"), the document's tree structure is upgraded to a network structure, revealing the complex and hidden argumentation within the document. For example, it can clearly link the experimental data in Chapter 5 with the core argument in Chapter 2, solving a fundamental problem that cannot be solved by existing technologies. The semantic network constructed above can support complex semantic queries that far exceed traditional keyword searches. Users are no longer limited to finding "paragraphs containing a certain word", but can instead make advanced search requests based on logical relationships, such as "find all evidence refuting 'argument A'" or "list all definitions and application instances of 'concept B'", thereby improving the accuracy and efficiency of information acquisition. In addition, by outputting the semantic DOM network, it can not only directly improve the intelligence level of document processing, but also serve as a high-quality data source, seamlessly connecting to more advanced downstream AI applications such as automatic knowledge graph construction, intelligent question-answering systems, and automated report generation, thereby having higher practical value and application prospects. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The accompanying drawings are used to provide further understanding of the present invention and constitute a part of the specification. They are used to explain the present invention together with the embodiments of the present invention and do not constitute a limitation of the present invention.
[0018] Figure 1 This is a flow chart of the document semantic DOM network construction method proposed by the present invention; Figure 2 This is a structural diagram of the document semantic DOM network construction system proposed by the present invention; Figure 3 A schematic diagram of the process of constructing and optimizing a DOM tree in an embodiment of the present invention; Figure 4 Schematic diagram of semantic nodes and semantic network structure in an embodiment of the present invention. DETAILED DESCRIPTION
[0019] The technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments.
[0020] In the description of the present invention, it should be understood that the terms "upper", "lower", "front", "back", "left", "right", "top", "bottom", "inside", "outside", etc., indicating directions or positional relationships, are based on the directions or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific direction, be constructed and operated in a specific direction, and therefore should not be understood as limiting the present invention.
[0021] The embodiment of the present invention provides a document semantic DOM network construction method and system.
[0022] like Figure 1-4 As shown, a document semantic DOM network construction method specifically includes the following steps: Step S101: Generate a semantic information flow based on the layout block tree of the PDF document; Step S102: using a large language model to perform semantic analysis on the information flow; Step S103: constructing and optimizing a semantic DOM tree with a hierarchical relationship; Step S104: Analyze and establish cross-level semantic relationships to form a final semantic network.
[0023] As attached Figure 2 As shown, a document semantic DOM network construction system for implementing the above method includes: an information flow generation module, a semantic analysis module, a DOM tree construction module, and a semantic network formation module. The functions of each module will be described in detail in conjunction with the following process.
[0024] In the technical solution of the present invention: The data structure is a semantic node, which represents a unit with independent semantics in the document, where: The specific implementation definition of the semantic node is as follows: self.id: The globally unique identifier of the node, such as a UUID.
[0025] self.type: The type of the node, whose value is a NodeType enumeration. The enumeration types may include: UNKNOWN, SECTION, PARAGRAPH, CONCEPT, ARGUMENT, EVIDENCE, REFERENCE, DEFINITION, TABLE, FORMULA, etc.
[0026] self.content: The raw text content of the node.
[0027] self.role: The semantic role of the node, describing its role in the context, such as "raising questions" or "background introduction".
[0028] self.children: A list used to store the IDs of its child nodes and build a tree-like hierarchical relationship.
[0029] self.relations: A list used to store semantic relations (SemanticRelation) with other nodes.
[0030] self.attributes: A dictionary used to store other attributes of the node, such as font, position, etc.
[0031] self.context: A dictionary used to store the context information of the node, such as the information of the previous node immediately adjacent to it.
[0032] Semantic relations are used to define non-hierarchical relationships between nodes. Their specific implementation can be defined as follows: self.source_id: The ID of the source node.
[0033] self.target_id: The ID of the target node.
[0034] self.type: the type of the relation, whose value is a relation type (RelationType) enumeration, such as SUPPORTS (support), CONTRASTS (contrast), EXAMPLE_OF (is an example of...), etc.
[0035] self.confidence: describes the confidence that the relationship is established, which is a floating point number.
[0036] self.attributes: used to store additional attributes of the relationship.
[0037] The various modules and steps in the embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
[0038] Information flow generation module: The information flow generation module is used to preprocess the input PDF document and convert it from a physical structure into a linear semantic information flow containing preliminary contextual relationships. The specific implementation steps are as follows: First, the system receives a PDF document and parses it into a layout-block-tree using an existing PDF parsing library (such as pdfplumber or PyMuPDF). Each node in the tree represents a physical block in the document, such as a text block, image block, or table block, and retains its physical properties such as position, size, and font. The information flow generation module performs a pre-order traversal of the layout block tree. During the traversal, for each node, the following operations are performed: Extract node information: extract block_info information such as text content, font, font size, coordinates, etc. of the current node; Analyze context information: Analyze the position and logical relationship between the current node and its parent node and sibling nodes to form preliminary context information; Generate information unit: combine block_info and context into an information unit and add it to an information flow list (flow); Finally, after the traversal is completed, the information flow generation module outputs an ordered list containing all information units, namely the semantic information flow, and passes it to the semantic analysis module.
[0039] Semantic analysis module: The semantic analysis module is used to use the large language model (LLM) to perform deep semantic understanding of the information flow. The semantic analysis module receives the information flow list and processes each information unit in it to create a semantic node (SemanticNode) containing rich semantic information.
[0040] In a preferred embodiment of the present invention, the semantic analysis module is further subdivided into the following internal units: Prompt word generation unit: responsible for dynamically and automatically generating structured requests, i.e., prompt words, based on the preset template and the context of the current information unit.
[0041] Large language model interaction unit: responsible for managing API communication with the large language model, including sending generated requests, handling network delays and retries, and receiving returned analysis results.
[0042] Semantic parsing and node creation unit: responsible for parsing the structured data (such as JSON) returned by the large language model and instantiating SemanticNode and SemanticRelation objects based on the parsed information.
[0043] The semantic analysis module performs the following steps for each information unit: a) Constructing prompts: Generate a request based on the preset prompt template used to identify node types and semantic roles. A specific example of this template is as follows: # Role You are a top document structure analysis expert.
[0044] # Task Analyze the given "current text block" and, combined with its "context information", output its most likely node type (type) and semantic role (role) in JSON format.
[0045] # JSON output format { "type": "NodeType", "role": "Describe the role of this text block in the text", "reasoning": "Briefly explain the reasons for your judgment" } # Contextual Information Previous node type: {{previous_node_type}} # Current text block {{current_block_content}} (b) Send the generated request to the large language model (for example, by calling GPT-4, Wenxinyiyan, etc. through the API), and the LLM will return a JSON format string containing the analysis results; (c) Parse the JSON string returned by LLM, extract information such as type and role, and create a SemanticNode instance based on the original text content.
[0046] (d) After generating a certain number of semantic nodes, the semantic analysis module calls the LLM to analyze the relationships between nodes, particularly non-hierarchical semantic relationships (such as SUPPORTS and CONTRASTS). The process is similar to the above. Using a specific prompt word template, the LLM is instructed to determine the type of relationship between two given nodes and assign a preliminary confidence level. This relationship information is created as a SemanticRelation instance and stored in the corresponding node's relations list.
[0047] DOM tree construction module: The DOM tree construction module is used to organize an unordered list of semantic nodes into a semantic DOM tree with a strict hierarchical relationship. The specific steps of the DOM tree construction module are as follows: The DOM tree construction module uses a hybrid strategy of "layout feature preprocessing + LLM semantic confirmation" to determine parent-child relationships. First, a preliminary hierarchical division is performed based on the layout characteristics of the nodes (for example, nodes with a font size larger than 16pt and bold fonts tend to be high-level nodes). Then, the preliminary results are submitted to the LLM for semantic confirmation or correction. (For example, the LLM can determine that one text block is the "summary" of another text block based on its content, thereby establishing a parent-child relationship.) The specific process is as follows: Build a tree structure: According to the determined parent-child relationship, all SemanticNodes are organized into a tree, and the node's children list stores the IDs of all its child nodes; Optimize the tree structure: After the initial tree is built, execute the optimize_tree algorithm for optimization. The specific optimization strategies include: Semantic node merging: Traverse the tree and if two adjacent PARAGRAPH type sibling nodes are found, calculate the semantic similarity of their contents. If the similarity is higher than a preset threshold (such as 0.95), merge the two nodes into one. Remounting isolated nodes: Find an EVIDENCE-type node whose parent node is the root node, calculate its semantic similarity with all ARGUMENT-type nodes, and remount it to the most similar ARGUMENT node as a child node.
[0048] Semantic network formation module: The semantic network formation module is the last step. It is responsible for forming a network-like knowledge structure based on the established DOM tree and using the previously stored cross-hierarchical relationships.
[0049] This module traverses each SemanticNode in the DOM tree and reads its relations list. For each SemanticRelation instance in the list, it creates a directed edge from the source node to the target node in the graph. The edge type is defined by the relation type, and the edge weight can be defined by confidence.
[0050] Preferably, a weighted formula is used to calculate the final relationship confidence This formula combines the initial judgment of LLM, the physical distance information between nodes, and the prior knowledge of node type combinations. The specific formula example is as follows: is the preliminary relation confidence returned by the large language model in step S102, with a value range of [0, 1]; is the normalized physical distance between the source node and the target node. For example, we can calculate the difference in the number of lines between the two nodes in the document and normalize it to the interval [0, 1]. Generally, the closer the physical distance, the more likely it is that the semantic relationship is stronger, so Items will contribute to a higher score; It is a priori knowledge reward value based on the node type combination. This is a preset, discrete reward score. For example, when the relationship type is "SUPPORTS", if the source node type is "EVIDENCE" and the target node type is "ARGUMENT", this is a very classic argument combination. =1; for other less typical combinations, you can set =0.
[0051] , , is the preset weight coefficient and satisfies + + =1, the above weights are used to balance the impact of different factors on the final confidence level; It should be further explained that the weight coefficient , , It is determined by conducting experiments and optimization on a labeled validation dataset. The purpose is to find an optimal balance point so that the final calculated confidence The best match with the real relationship annotated by humans. For example, in a typical scientific paper dataset, it can be found that LLM judgment ( ) usually dominates, but physical distance ( ) and type combinations ( ) as an effective auxiliary feature, which can significantly correct the judgment of LLM in some fuzzy scenarios, such as the weight distribution is =0.7, =0.2, =0.1, and perform data-driven parameter selection.
[0052] At this point, the semantic DOM network of the PDF document has been constructed and can be used for subsequent downstream tasks such as deep semantic retrieval, knowledge question answering, or knowledge graph construction.
[0053] Example 1 Process a typical research paper PDF in the field of computer science, which usually contains sections such as title, authors, abstract, introduction, related work, methodology, experiments, conclusion and references.
[0054] Input: A PDF research paper in the field of computer science.
[0055] The processing steps are as follows: Step S101: The system parses the paper into an ordered information flow containing various text blocks and chart blocks through the information flow generation module.
[0056] Step S102: The semantic analysis module processes the information flow. For example, using a large language model, it identifies a paragraph in the "Introduction" section as NodeType.ARGUMENT (argument), with a role of "proposing the core problem to be solved in this paper." At the same time, it identifies a chart and the text description below it in the "Experiment" section as NodeType.EVIDENCE (evidence), with a role of "demonstrating the performance advantages of this method." Step S103: The DOM tree construction module constructs a hierarchical DOM tree with the paper title as the root node and each chapter as a child node based on the paper's chapter number (e.g., 1, 1.1, 2), font size, and other layout features, combined with the semantic confirmation of the LLM; Step S104: The core task of the semantic network formation module is to establish cross-hierarchical relationships. The module analyzes the relationship between the EVIDENCE node in the "Experiment" section and the ARGUMENT node in the "Introduction" section, and calculates the final confidence by calling the LLM and combining the weighted formula we proposed. , a SUPPORTS relationship can be established from the EVIDENCE node to the ARGUMENT node with high confidence.
[0057] The resulting semantic DOM network can reproduce the chapter structure of the paper and, through semantic links such as SUPPORTS, reveal the core argument chain of the paper: that is, which experimental results support which initial argument, allowing researchers to quickly understand the core contributions and argument logic of the paper.
[0058] Example 2: In this embodiment, a typical API (Application Programming Interface) technical document PDF is processed, which usually includes module introduction, function definition, parameter list, code example, and return value description.
[0059] Input: A PDF of API technical documentation.
[0060] The processing steps are as follows: Step S101: The system parses the API document into information flow; Step S102: The semantic analysis module uses LLM to identify semantic units unique to the technical document, for example: Identify a function signature as NodeType.FUNCTION_DEFINITION, the table below it as NodeType.PARAMETER_DESCRIPTION, and a code block as NodeType.CODE_EXAMPLE; Step S103: The DOM tree construction module organizes each function definition and its related parameters, code examples, etc. into an independent subtree to form a clear modular hierarchical structure.
[0061] Step S104: The semantic network formation module focuses on establishing reference and dependency relationships between different semantic units. For example, the system will establish an EXAMPLE_OF (is an example of...) relationship from the CODE_EXAMPLE node to the FUNCTION_DEFINITION node it demonstrates.
[0062] The resulting semantic DOM network acts like an interactive API map, allowing developers to browse the API structure hierarchically and perform efficient queries through semantic links, such as "find all code examples that use the 'create_user' function," thereby improving the usability of technical documentation and development efficiency.
[0063] In order to better understand the technical solution of the present application, the following is further explained in conjunction with comparative experiments.
[0064] Experimental environment: A standard deep learning server equipped with an NVIDIA A100 GPU was used to conduct experiments on the Ubuntu operating system using Python and the PyTorch framework.
[0065] Dataset: We constructed a dataset of 500 PDF documents from various fields, including scientific papers, legal contracts, and technical manuals. All documents were carefully annotated by humans, including the semantic role of each text block (e.g., argument, evidence) and the logical relationships between blocks (e.g., support, rebuttal), serving as the "gold standard" for evaluation.
[0066] Comparative Example: Baseline method: It is a representative method based on layout analysis and heuristic rules, and does not use a large language model for semantic recognition.
[0067] The present invention adopts all the technical solutions described in the present invention.
[0068] Evaluation Metrics: Semantic role recognition accuracy (Role Accuracy): The proportion of correctly recognized semantic roles (arguments, evidence, etc.) to the total number Relation F1-Score: Comprehensively evaluates the accuracy of relationship detection ( ) and recall ( ) is the core criterion for measuring relationship detection performance. It is calculated as follows Among them, in the relationship detection task: True Positives are genuine examples, which are semantic relationships correctly identified by the method of the present invention and actually exist in the manually annotated "gold standard".
[0069] False Positive is a false positive example, which is a semantic relationship identified by the method of the present invention but actually does not exist in the "gold standard".
[0070] False Negatives are false negative examples, which are semantic relations that exist in the “gold standard” but are not recognized by the method of the present invention.
[0071] The specific results are shown in Table 1 Table 1 It can be seen from the above structure that the method of the present invention has great advantages over the baseline method in terms of key semantic understanding indicators. The present invention innovatively introduces a large language model for deep semantic analysis and network construction. It is not a simple technical improvement, but a major improvement in technical effects. It can solve the problem that existing technologies cannot effectively understand the deep logical relationships of documents.
[0072] The above description is only a preferred specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any technician familiar with the technical field, within the technical scope disclosed by the present invention, who makes equivalent replacements or changes based on the technical solution and inventive concept of the present invention, should be covered by the scope of protection of the present invention.
Claims
1. A document semantic DOM network construction method, characterized in that: The following steps are involved: Step S101: Traversing the layout block tree of the PDF document to generate an initial semantic information flow containing multiple information units; Step S102: using a large language model to perform semantic analysis on the information units in the semantic information flow to generate semantic nodes including node types and semantic roles; Step S103: constructing a semantic DOM tree with a hierarchical relationship based on the layout features and semantic content between the semantic nodes; Step S104: Based on the semantic nodes, cross-level semantic relationships between nodes are analyzed and established to form the semantic DOM network.
2. The document semantic DOM network construction method according to claim 1, characterized in that: The step of performing semantic analysis using the large language model in step S102 specifically includes: Generate a request containing the content of the information unit to be analyzed according to a preset prompt word template containing a structured output format definition; Sending the request to the large language model; An analysis result including preset structured data returned by the large language model is received, and the node type and semantic role are extracted from the analysis result.
3. The document semantic DOM network construction method according to claim 2, characterized in that: The steps of constructing a semantic DOM tree with a hierarchical relationship in step S103 specifically include: Based on the layout features of the PDF document, including font size, indentation or numbering, the semantic nodes are preliminarily divided into hierarchical levels; The large language model is used to confirm or modify the result of the preliminary hierarchical division at the semantic level to determine the final parent-child node relationship.
4. The document semantic DOM network construction method according to claim 3, characterized in that: The method further includes optimizing the semantic DOM tree after constructing it, wherein the optimization step includes at least one of the following: Based on the preset semantic similarity threshold, adjacent semantic nodes of the same type are merged; Alternatively, an isolated semantic node whose parent node is the root node is reattached to a new parent node based on its semantic relevance to other nodes in the document.
5. The document semantic DOM network construction method according to claim 1, characterized in that: The steps of analyzing and establishing cross-level semantic relationships in step S104 are specifically as follows: A large language model is used to determine the semantic relationship type between at least two semantic nodes and generate a preliminary relationship confidence.
6. The document semantic DOM network construction method according to claim 5, characterized in that: The step S104 further includes: The final relationship confidence is calculated based on the preliminary relationship confidence and in combination with the physical distance information and node type combination information between the at least two semantic nodes through a preset weighted formula.
7. The document semantic DOM network construction method according to claim 1, characterized in that: The data structure of the semantic node includes: a node unique identifier, a node type, a node content, a semantic role, and a list for storing semantic relationships with other nodes.
8. A document semantic DOM network construction system, used to implement the document semantic DOM network construction method according to any one of claims 1 to 7, characterized in that: include: An information flow generation module is configured to traverse a layout block tree of a PDF document to generate an initial semantic information flow including a plurality of information units; a semantic analysis module configured to perform semantic analysis on information units in the semantic information flow using a large language model to generate semantic nodes including node types and semantic roles; A DOM tree construction module is configured to construct a semantic DOM tree with a hierarchical relationship based on the layout features and semantic content between the semantic nodes; The semantic network forming module is configured to analyze and establish cross-level semantic relationships between nodes based on the semantic nodes to form the semantic DOM network.
9. The document semantic DOM network construction system according to claim 8, characterized in that: The semantic analysis module is further configured to: Generate a request containing the content of the information unit to be analyzed according to a preset prompt word template containing a structured output format definition; Sending the request to the large language model; And receive the analysis result containing preset structured data returned by the large language model to extract the node type and semantic role.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the document semantic DOM network construction method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Document understanding method and device based on attention enhancement large model
CN117952118A
Generation method and device of presentation file
CN118821749A
Knowledge base construction method based on large language model and intelligent question and answer method
CN120278257A
Text information structured recovery method and system based on large language model and application
CN120409443A
Methods for Reinforcement Document Transformer for Multimodal Conversations and Devices Thereof
US20220405484A1