An electronic file intelligent analysis method based on a knowledge graph
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HEBEI COMM INVESTMENT TECH DEV CO LTD
- Filing Date
- 2026-05-07
- Publication Date
- 2026-08-07
AI Technical Summary
然而,上述方法多将文本内容解析与文档结构处理分离进行,缺乏对电子文件整体层级结构的统一建模,导致跨段落、跨章节甚至跨表格单元的实体关系难以准确关联
(1)本发明通过构建多粒度双曲子图并引入跨粒度对齐层,将电子文件中的文档结构信息与实体语义信息纳入统一图结构中进行处理,使不同层级的结构节点与实体节点在同一建模框架内建立关联关系,从而避免仅在单一粒度下进行解析所导致的结构割裂问题,保证解析结果在章节、段落及表格单元之间保持结构一致性。
Smart Images

Figure CN122528873A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of knowledge graph document parsing technology, and in particular to an intelligent parsing method for electronic documents based on knowledge graphs. Background Technology
[0002] With the widespread use of electronic documents in government administration, enterprise operations, and information systems, the number of text reports, technical documents, spreadsheets, and composite documents continues to grow. These electronic documents typically contain natural language text, hierarchical structure information, and various entity and relationship information. Traditional manual parsing methods rely on manual reading and rule organization, resulting in low processing efficiency and difficulty in ensuring consistency. To automate the acquisition of entity, relationship, and structural information from electronic documents, related technologies are gradually incorporating text parsing and structured processing methods.
[0003] In existing technologies, some methods extract entities and relationships from text through word segmentation, part-of-speech tagging, and rule matching, while others segment the document into paragraphs or regions using layout analysis, and then process the segmentation results separately. However, these methods often separate text content parsing from document structure processing, lacking a unified model of the overall hierarchical structure of the electronic document. This makes it difficult to accurately associate entity relationships across paragraphs, chapters, and even table cells. Furthermore, the results from different parsing stages are often independent, and once errors occur, they can easily propagate through subsequent processing.
[0004] Furthermore, while some methods introduce graph structures to represent entity relationships, these graph structures are often built at a single granularity level, failing to fully consider the inherent multi-level structural characteristics of electronic documents. During relation writing and parameter updates, the lack of constraints on structural consistency and parsing stability easily leads to problems such as relation redundancy, relation conflicts, or structural inconsistencies. Therefore, how to uniformly model and collaboratively control document structure, entity relationships, and parameter update processes during electronic document parsing still requires further research and improvement. Summary of the Invention
[0005] One objective of this invention is to propose an intelligent parsing method for electronic documents based on knowledge graphs. This invention introduces a multi-granularity hyperbolic subgraph modeling mechanism and a cross-granularity alignment calculation model to perform joint parsing and dynamic updating of entity, relation, and structural information in electronic documents. Combining a two-stage parameter update process of mirror descent and rollback, a knowledge graph generation process with continuous constraints is constructed, which has the characteristics of high parsing consistency, strong relation writing stability, and good reliability of structured results.
[0006] An intelligent parsing method for electronic documents based on knowledge graphs according to an embodiment of the present invention includes the following steps: The system reads electronic files and performs page segmentation operations to generate a set of structural nodes. It then performs entity parsing and relation candidate parsing operations on the structural node set to generate a set of candidate entities and a set of candidate relations. A multi-granularity hyperbolic subgraph set is constructed, containing document-level, chapter-level, paragraph-level, and table-cell-level subgraphs. Each granularity subgraph consists of structural nodes and candidate entities. Hyperbolic space mapping is performed on each granularity subgraph node to generate node hyperbolic coordinate vectors. A cross-granularity alignment layer is constructed, and the cross-granularity node alignment weight vector and alignment confidence vector are calculated and written to the alignment cache. Under the constraints of the alignment cache, candidate relations are written into the graph structure to generate an initial knowledge graph. A two-stage parameter update operation is performed on the cross-granularity alignment weight vector and relation writing probability vector. This two-stage parameter update operation includes mirror descent update and feasible region projection. A rollback operation is triggered to restore the corresponding parameters when any granularity consistency degradation event is detected. The algorithm iteratively performs multi-granularity hyperbolic subgraph construction, cross-granularity alignment, and two-stage parameter update operations until the termination condition is met, generating a stable knowledge graph; it outputs structured parsing results.
[0007] Optionally, the execution of the page layout segmentation operation specifically includes: The electronic document data stream is parsed to obtain the page sequence, and rendering operations are performed on each page to obtain the page pixel matrix; Perform binarization and connected component labeling operations on the page pixel matrix to obtain a set of connected components, and record the coordinates of the bounding rectangles of the connected components. Perform horizontal and vertical projection statistical operations on the binary page matrix to generate a set of dividing lines, and perform region segmentation operations on the set of dividing lines to obtain a set of candidate blocks. Calculate the bounding rectangle coordinates and pixel density values for candidate blocks, and generate a set of document structure blocks based on the pixel density values; Perform a reading order sorting operation on the document structure block set to generate a structure block position index sequence. Write the document structure block set and the structure block position index sequence into the structure node table and output the structure node set.
[0008] Optionally, the execution of entity resolution and relation candidate resolution operations includes the following steps: For each structural node in the structural node table, read the corresponding document structural block content and perform word segmentation to generate a word sequence. Perform part-of-speech tagging on the word sequence and generate a set of noun terms based on the tagging results; Perform entity matching operation on the set of noun terms. The entity matching operation includes inputting noun terms into an entity dictionary, performing matching, and generating a set of candidate entity identifiers. Perform a position alignment operation on the candidate entity identifier set. The position alignment operation generates an entity position index based on the character position of the noun term in the content of the structure node. Perform a relation window generation operation on the position indices of adjacent entities within the same structural node to generate a set of entity pairs. Perform relation type matching operations on the entity pairs to generate a candidate relation set.
[0009] Optionally, constructing the multi-granularity hyperbolic subgraph set specifically includes: Read the structural node identifier and position index sequence from the structural node table, and divide the node into document-level, chapter-level, paragraph-level, and table cell-level sets according to the position index sequence; Write the candidate entity set into the corresponding granularity node set according to the entity location index, and establish a mapping relationship between node identifier and entity identifier in each granularity node set; Generate a set of structural connection edges within the document-level node set, a set of adjacent paragraph connection edges within the chapter-level node set, a set of entity co-occurrence connection edges within the paragraph-level node set, and a set of cell adjacency connection edges within the table cell-level node set. For each set of granular nodes and its corresponding set of connecting edges, a granular subgraph structure is constructed to obtain document-level subgraphs, chapter-level subgraphs, paragraph-level subgraphs, and table cell-level subgraphs. Perform hyperbolic coordinate initialization operation on the node identifiers in each granularity subgraph. The initialization operation allocates hyperbolic coordinate initial vectors according to the node identifier order. Perform hyperbolic space mapping operations on each granularity subgraph to map node identifiers to node hyperbolic coordinate vectors, forming a set of multi-granularity hyperbolic subgraphs.
[0010] Optionally, constructing the cross-granularity alignment layer includes the following steps: Read the node identifier set and node hyperbolic coordinate vector corresponding to each granularity subgraph in the multi-granularity hyperbolic subgraph set; Granularity pairing operations are performed on subgraphs of different granularities according to the granularity hierarchy. The granularity pairing operations generate node pairing sets between document-level subgraphs and chapter-level subgraphs, between chapter-level subgraphs and paragraph-level subgraphs, and between paragraph-level subgraphs and table cell-level subgraphs. Perform a node pair generation operation on the node identifiers in each node pair set to form a cross-granularity node pair set; For each node pair in the cross-granularity node pair set, read the corresponding hyperbolic coordinate vector of the node, perform hyperbolic distance calculation operation, and generate the node pair distance value; Write the node pair distance values into the distance matrix table, and perform a normalization operation on the node pair distance values corresponding to each row of the distance matrix table to generate a cross-granularity node alignment weight vector. A threshold filtering operation is performed on the cross-granularity node alignment weight vector to retain the weight components that meet the threshold conditions and generate an alignment confidence vector. Write the cross-granularity node alignment weight vector and alignment confidence vector into the alignment cache.
[0011] Optionally, the step of writing to the graph structure to generate the initial knowledge graph specifically includes: Read the head entity identifier, tail entity identifier, and relation type identifier for each candidate relation in the candidate relation set; For each candidate relation, read the alignment weight vector and alignment confidence vector corresponding to the head entity identifier and tail entity identifier from the alignment buffer. Perform alignment consistency check operation on candidate relations. The alignment consistency check operation compares the weight values of the corresponding granular positions in the alignment weight vector with the corresponding components in the alignment confidence vector to generate relations and write them to tags. For each relation, a candidate relation that meets the writing condition is marked. Relationship edge records are generated in the graph structure. Each relation edge record contains a head entity identifier, a tail entity identifier, and a relation type identifier. Write the generated relation edge records into the relation edge table, and record the association index for the corresponding head entity identifier and tail entity identifier in the node table; Traverse the candidate relation set to complete the relation writing operation and generate the initial knowledge graph.
[0012] Optionally, the two-stage parameter update operation includes the following steps: Read the cross-granularity alignment weight vector in the alignment buffer, read the relation write probability vector, and read the step size gating coefficient; Perform a mirror mapping operation on the cross-granularity alignment weight vector to obtain an alignment mirror vector, and perform a mirror mapping operation on the relation writing probability vector to obtain a probability mirror vector; Perform step-size scaling update operation on the aligned mirror vector to generate an aligned mirror temporary vector, and perform step-size scaling update operation on the probabilistic mirror vector to generate a probabilistic mirror temporary vector; Performing an inverse mirror mapping operation on the alignment mirror temporary vector yields an alignment temporary parameter vector, and performing an inverse mirror mapping operation on the probability mirror temporary vector yields a probability temporary parameter vector. Perform feasible region projection operation on the alignment temporary parameter vector to obtain the alignment projection parameter vector, and perform feasible region projection operation on the probability temporary parameter vector to obtain the probability projection parameter vector. The feasible region projection operation includes non-negativity constraint clipping operation and normalization constraint operation. Write the alignment projection parameter vector and the probability projection parameter vector to the parameter snapshot cache, write the alignment projection parameter vector to the alignment cache, and write the probability projection parameter vector to the probability vector cache.
[0013] Optionally, the triggering of the rollback operation includes the following steps: Read the alignment projection parameter vector and probability projection parameter vector corresponding to the current update round from the parameter snapshot cache; Read the granularity consistency index vector corresponding to the current update round and perform a numerical comparison operation with the baseline consistency index vector recorded in the parameter snapshot cache. When the numerical comparison result meets the rollback trigger condition, the cross-granularity alignment weight vector in the current alignment buffer is replaced with the alignment projection parameter vector in the parameter snapshot buffer. When the numerical comparison result meets the rollback trigger condition, the current relation write probability vector is replaced with the probability projection parameter vector in the parameter snapshot cache. After completing the parameter replacement operation, a reduction update operation is performed on the step size gating coefficient, and the updated step size gating coefficient is written back to the parameter update process.
[0014] Optionally, the output structured parsing result includes the following steps: Read the node table, relation edge table, and attribute records from a stable knowledge graph; Extract entity node records from the node table according to the node identifier, and generate an entity node output table. The entity node output table contains entity identifier, entity type identifier and location index. A relation output table is generated based on the head entity identifier and tail entity identifier recorded in the relation edge table. The relation output table contains relation type identifiers and node association indexes. Read the cross-granularity alignment weight vector and alignment confidence vector from the alignment cache, and associate them with the entity node output table according to the node identifier; Perform field concatenation operations on the entity node output table, relation output table, and aligned confidence vector to form a structured parsing result data object; Output a structured parsed result data object.
[0015] The beneficial effects of this invention are: (1) This invention constructs a multi-granularity hyperbolic subgraph and introduces a cross-granularity alignment layer to incorporate the document structure information and entity semantic information in electronic files into a unified graph structure for processing. This enables structural nodes and entity nodes at different levels to establish a relationship within the same modeling framework, thereby avoiding the structural fragmentation problem caused by parsing only at a single granularity and ensuring that the parsing results maintain structural consistency between chapters, paragraphs and table units.
[0016] (2) The present invention introduces a two-stage parameter update mechanism in the relation writing and parameter update stages, combines mirror descent update with feasible region projection, and performs a rollback operation when consistency degradation is detected, so that the parameter update process has the ability to roll back, avoids the accumulation and amplification of erroneous updates in continuous iterations, thereby maintaining the stability and controllability of the knowledge graph generation process.
[0017] (3) The present invention integrates the structural parsing, entity relationship modeling and parameter update process into a co-designed whole. By using the alignment cache and parameter snapshot cache together, the intermediate state in the parsing process can be recorded and reused, ensuring that the final output structured parsing result is consistent in terms of node relationship, alignment confidence and overall graph structure. It is suitable for automatic parsing scenarios of complex electronic documents. Attached Figure Description
[0018] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings: Figure 1 This is a flowchart of a knowledge graph-based intelligent parsing method for electronic documents proposed in this invention. Figure 2 This is a schematic diagram illustrating the process of constructing a multi-granularity hyperbolic subgraph and implementing cross-granularity alignment in an intelligent parsing method for electronic documents based on knowledge graphs proposed in this invention. Figure 3 This is a schematic diagram illustrating the implementation process of the two-stage parameter update and rollback mechanism of the intelligent parsing method for electronic documents based on knowledge graphs proposed in this invention. Detailed Implementation
[0019] The present invention will now be described in further detail with reference to the accompanying drawings. These drawings are simplified schematic diagrams, illustrating only the basic structure of the invention, and therefore only show the components relevant to the invention.
[0020] refer to Figures 1-3 A knowledge graph-based intelligent parsing method for electronic documents includes the following steps: The system reads electronic files and performs page segmentation operations to generate a set of structural nodes. It then performs entity parsing and relation candidate parsing operations on the structural node set to generate a set of candidate entities and a set of candidate relations. A multi-granularity hyperbolic subgraph set is constructed, containing document-level, chapter-level, paragraph-level, and table-cell-level subgraphs. Each granularity subgraph consists of structural nodes and candidate entities. Hyperbolic space mapping is performed on each granularity subgraph node to generate node hyperbolic coordinate vectors. A cross-granularity alignment layer is constructed, and the cross-granularity node alignment weight vector and alignment confidence vector are calculated and written to the alignment cache. Under the constraints of the alignment cache, candidate relations are written into the graph structure to generate an initial knowledge graph. A two-stage parameter update operation is performed on the cross-granularity alignment weight vector and relation writing probability vector. This two-stage parameter update operation includes mirror descent update and feasible region projection. A rollback operation is triggered to restore the corresponding parameters when any granularity consistency degradation event is detected. The algorithm iteratively performs multi-granularity hyperbolic subgraph construction, cross-granularity alignment, and two-stage parameter update operations until the termination condition is met, generating a stable knowledge graph; it outputs structured parsing results.
[0021] In this embodiment, performing the page layout segmentation operation specifically includes: The electronic document data stream is parsed to obtain the page sequence, and rendering operations are performed on each page to obtain the page pixel matrix; Perform binarization and connected component labeling operations on the page pixel matrix to obtain a set of connected components, and record the coordinates of the bounding rectangles of the connected components. Perform horizontal and vertical projection statistical operations on the binary page matrix to generate a set of dividing lines, and perform region segmentation operations on the set of dividing lines to obtain a set of candidate blocks. Calculate the bounding rectangle coordinates and pixel density values for candidate blocks, and generate a set of document structure blocks based on the pixel density values; Perform a reading order sorting operation on the document structure block set to generate a structure block position index sequence. Write the document structure block set and the structure block position index sequence into the structure node table and output the structure node set.
[0022] In this embodiment, performing entity resolution operations and relation candidate resolution operations includes the following steps: For each structural node in the structural node table, read the corresponding document structural block content and perform word segmentation to generate a word sequence. Perform part-of-speech tagging on the word sequence and generate a set of noun terms based on the tagging results; Perform entity matching operation on the set of noun terms. The entity matching operation includes inputting noun terms into an entity dictionary, performing matching, and generating a set of candidate entity identifiers. Perform a position alignment operation on the candidate entity identifier set. The position alignment operation generates an entity position index based on the character position of the noun term in the content of the structure node. Perform a relation window generation operation on the position indices of adjacent entities within the same structural node to generate a set of entity pairs. Perform relation type matching operations on the entity pair set to generate a candidate relation set. Specifically, after obtaining the entity pair set, read the first entity identifier, second entity identifier, and entity position index pair corresponding to each entity pair in the set.
[0023] Based on the preset relationship type table, for each entity pair, the entity type identifier corresponding to the first entity identifier and the second entity identifier is read. The relationship type table records the mapping relationship between the entity type identifier pair and the relationship type identifier.
[0024] For each entity pair, search the relation type table for a relation type identifier that matches the entity type identifier of that entity pair, and generate the corresponding relation type candidate.
[0025] Perform a relation type identifier aggregation operation on multiple relation type candidates obtained by matching the same entity pair to form the candidate relation entries corresponding to the entity pair.
[0026] All candidate relation entries corresponding to all entity pairs are collected to generate a candidate relation set. Each candidate relation record in the candidate relation set contains an entity identifier pair, a relation type identifier, and an entity location index pair. The candidate relation set is then written into the candidate relation cache area.
[0027] In this embodiment, performing rendering operations specifically includes: Parse the electronic document data stream and generate a page sequence according to the page index order.
[0028] For each page in the page sequence, read the corresponding set of page description instructions. The set of page description instructions includes page size parameters, page coordinate system definition parameters, text drawing instructions, graphics drawing instructions, and image embedding instructions.
[0029] Initialize the page pixel matrix based on the page size parameters, and establish the mapping relationship between page coordinates and pixel coordinates according to the page coordinate system definition parameters.
[0030] The rendering process is executed in the order of the instructions in the page description instruction set. The text drawing instructions are parsed into glyph outlines and rasterization is performed. The rasterization results are written into the corresponding pixel areas of the page pixel matrix.
[0031] The drawing instructions are parsed into line segments, curves, or filled areas, and the pixel values in the page pixel matrix are updated according to the corresponding geometric coverage rules.
[0032] The image data corresponding to the image embedding instruction is mapped to the target area of the page pixel matrix according to the scaling and position parameters, and the pixel copy writing is completed.
[0033] After all page description instructions have been executed, the page pixel matrix corresponding to the current page is output and written to the page cache to form a page pixel matrix sequence.
[0034] In this embodiment, the operation of generating the relation window specifically includes: After obtaining the entity location index sequence within the same structural node, the entity location indexes are sorted according to the order in which the entities appear in the text, forming an ordered entity location index sequence.
[0035] Based on the preset window length parameter, a sliding window scan operation is performed on the ordered entity position index sequence. The window starts from the first entity position index and ends at the window position determined by the window length parameter.
[0036] During each window scan, the entity location index within the window is read, and a pairing operation is performed on the entity location indices that are within the same window and whose location indices are adjacent, to generate corresponding entity pairs.
[0037] Perform step updates on the starting position of the window in the order of entity position indices, and repeat window scanning and entity pairing operations until the entire entity position index sequence has been traversed.
[0038] The entity pairs generated during the scanning of all windows are collected into an entity pair set. Each entity pair in the entity pair set records the corresponding entity identifier pair and entity location index pair, and the entity pair set is written into the entity pair cache area.
[0039] In this embodiment, performing horizontal and vertical projection statistical operations on the binary page matrix to generate a set of dividing lines specifically includes: After obtaining the page pixel matrix, perform binarization on the page pixel matrix to generate a binary page matrix. The pixel values in the binary page matrix are used to identify the foreground and background regions.
[0040] Along the row direction of the binary page matrix, perform pixel value accumulation operation on each row of pixels to obtain the horizontal projection statistics value of the corresponding row index, and form a horizontal projection statistics sequence according to the row index order.
[0041] Perform continuous interval scanning operation on the horizontal projection statistical sequence. The continuous interval scanning operation is to traverse the horizontal projection statistical sequence in the order of row index, merge the adjacent row index positions that meet the condition that the statistical value is equal to zero or less than the preset threshold, record the start index and end index of the corresponding continuous row index interval, and record the boundary position of the continuous row index interval as the candidate position of the horizontal dividing line.
[0042] Along the column direction of the binary page matrix, perform pixel value accumulation operation on each column pixel to obtain the vertical projection statistics value of the corresponding column index, and form a vertical projection statistics sequence according to the column index order.
[0043] Perform continuous interval scanning operation on the vertical projection statistical sequence. The continuous interval scanning operation is to traverse the vertical projection statistical sequence in column index order, merge the adjacent column index positions that meet the condition that the statistical value is equal to zero or less than the preset threshold, record the start index and end index of the corresponding continuous column index interval, and record the boundary position of the continuous column index interval as the candidate position of the vertical dividing line.
[0044] The candidate positions of horizontal and vertical dividing lines are combined to form a dividing line set. Each dividing line in the dividing line set records the corresponding direction identifier and position index value.
[0045] Perform position merging and deduplication operations on the set of dividing lines to form the final set of dividing lines, and write the set of dividing lines into the layout segmentation cache area.
[0046] In this embodiment, the specific operations for performing region segmentation include: After obtaining the set of dividing lines, read the direction identifier and position index value corresponding to each dividing line in the set.
[0047] Based on the row index range and column index range of the page pixel matrix, row-direction segmentation and positioning are performed on the position indices marked as horizontal dividing lines in the dividing line set, and column-direction segmentation and positioning are performed on the position indices marked as vertical dividing lines, forming a set of page row-direction segmentation positions and a set of column-direction segmentation positions.
[0048] The page pixel matrix is divided into row intervals according to the set of position divisions in the row direction, generating several non-overlapping row index intervals; the page pixel matrix is divided into column intervals according to the set of position divisions in the column direction, generating several non-overlapping column index intervals.
[0049] Perform interval combination operations on the set of row index intervals and the set of column index intervals. The interval combination operation is to perform pairwise pairing operations on each row index interval and each column index interval according to the index order. Each pairing is determined by a row index interval and a column index interval to define the index range of a two-dimensional rectangular area.
[0050] For each two-dimensional rectangular region, read the page pixel matrix submatrix within the corresponding region, generate region pixel blocks, and assign block identifiers to the region pixel blocks.
[0051] All region pixel blocks are aggregated to form a candidate block set. Each candidate block in the candidate block set records the corresponding block identifier, row index range, column index range and region pixel block data, and the candidate block set is written into the candidate block cache area.
[0052] In this embodiment, constructing a multi-granularity hyperbolic subgraph set specifically includes: Read the structural node identifier and position index sequence from the structural node table, and divide the node into document-level, chapter-level, paragraph-level, and table cell-level sets according to the position index sequence; Write the candidate entity set into the corresponding granularity node set according to the entity location index, and establish a mapping relationship between node identifier and entity identifier in each granularity node set; Generate a set of structural connection edges within the document-level node set, a set of adjacent paragraph connection edges within the chapter-level node set, a set of entity co-occurrence connection edges within the paragraph-level node set, and a set of cell adjacency connection edges within the table cell-level node set. For each set of granular nodes and its corresponding set of connecting edges, a granular subgraph structure is constructed to obtain document-level subgraphs, chapter-level subgraphs, paragraph-level subgraphs, and table cell-level subgraphs. Perform hyperbolic coordinate initialization operation on the node identifiers in each granularity subgraph. The initialization operation allocates hyperbolic coordinate initial vectors according to the node identifier order. Perform hyperbolic space mapping operations on each granularity subgraph to map node identifiers to node hyperbolic coordinate vectors, forming a set of multi-granularity hyperbolic subgraphs.
[0053] In this embodiment, constructing the granularity subgraph structure specifically includes: After obtaining the multi-granularity node set and the corresponding connection edge set, the granularity node set is grouped according to the granularity identifier to form document-level node set, chapter-level node set, paragraph-level node set and table cell-level node set respectively.
[0054] For a document-level node set, read the set of connecting edges corresponding to the document-level node set. Each connecting edge in the set records the starting node identifier, the ending node identifier, and the relation type identifier. Based on the node identifier consistency rule, write the document-level node set and the corresponding set of connecting edges into the same graph structure container to generate a document-level subgraph.
[0055] For a set of chapter-level nodes, read the set of connecting edges corresponding to the set of chapter-level nodes; perform a filtering and writing operation on connecting edges whose start node identifier and end node identifier both belong to the set of chapter-level nodes to generate a chapter-level subgraph.
[0056] For a set of paragraph-level nodes, read the set of connecting edges corresponding to the set of paragraph-level nodes; perform a filtering and writing operation on connecting edges in the set of connecting edges whose start node identifier and end node identifier both belong to the set of paragraph-level nodes, and generate a paragraph-level subgraph.
[0057] For a set of table cell-level nodes, read the set of connecting edges corresponding to the set of table cell-level nodes; perform a filtering and writing operation on connecting edges whose start node identifier and end node identifier both belong to the set of table cell-level nodes, and generate a table cell-level subgraph.
[0058] After each granularity subgraph is generated, the corresponding granularity identifiers are recorded for document-level subgraphs, chapter-level subgraphs, paragraph-level subgraphs, and table cell-level subgraphs, and each granularity subgraph is written into a multi-granularity subgraph set.
[0059] In this embodiment, performing hyperbolic coordinate initialization calculations specifically includes: After obtaining each granularity subgraph, for each granularity subgraph, all node identifiers within that granularity subgraph are read, and an ordered node identifier sequence is generated according to the preset sorting rules of the node identifiers.
[0060] Initialize hyperbolic coordinates for the current granular subgraph and assign an index counter to each node identifier according to its order in the ordered node identifier sequence.
[0061] Based on the coordinate index value, a corresponding hyperbolic coordinate initial vector is generated for each node identifier within the preset hyperbolic space coordinate domain. The dimension of the hyperbolic coordinate initial vector is consistent with the hyperbolic space dimension parameter.
[0062] Establish a one-to-one mapping relationship between the generated hyperbolic coordinate initial vector and the corresponding node identifier, and write the mapping result into the node coordinate storage area of the granular subgraph.
[0063] After all node identifiers within the granular subgraph are assigned initial hyperbolic coordinate vectors, an initial set of node hyperbolic coordinates for that granular subgraph is formed, and this initial set of node hyperbolic coordinates is written into the corresponding subgraph structure in the multi-granular subgraph set.
[0064] In this embodiment, performing hyperbolic space mapping operations on each granularity subgraph specifically includes: After completing the assignment of the initial hyperbolic coordinate vectors of the nodes in each granularity subgraph, for each granularity subgraph, the set of node identifiers, the set of initial hyperbolic coordinate vectors of the nodes, and the set of corresponding connecting edges are read.
[0065] Based on the starting node identifier and ending node identifier recorded in the connection edge set, perform hyperbolic space neighborhood traversal operation on the initial hyperbolic coordinate vector of the node to generate node pair update index set.
[0066] For each node pair in the updated index set, read the initial hyperbolic coordinate vector of the corresponding node and calculate the hyperbolic distance between the node pairs according to the hyperbolic space distance calculation rules.
[0067] Based on the relationship between the hyperbolic distance value of the node and the connecting edge, the initial hyperbolic coordinate vector of the node is adjusted by performing a coordinate adjustment operation to generate the updated hyperbolic coordinate vector of the node. The coordinate adjustment operation is performed under the constraints of hyperbolic space.
[0068] After adjusting the coordinates of all node pairs within the granularity subgraph, the generated hyperbolic coordinate update vectors of the nodes are written back to the corresponding node identifiers, forming the hyperbolic coordinate mapping result of the nodes in the granularity subgraph.
[0069] After the node hyperbolic coordinate mapping result is generated, the mapped node hyperbolic coordinate set is bound and stored with the granular subgraph structure, and the result is written into the corresponding granular subgraph structure in the multi-granular subgraph set.
[0070] In this embodiment, constructing the cross-granularity alignment layer includes the following steps: Read the node identifier set and node hyperbolic coordinate vector corresponding to each granularity subgraph in the multi-granularity hyperbolic subgraph set; Granularity pairing operations are performed on subgraphs of different granularities according to the granularity hierarchy. The granularity pairing operations generate node pairing sets between document-level subgraphs and chapter-level subgraphs, between chapter-level subgraphs and paragraph-level subgraphs, and between paragraph-level subgraphs and table cell-level subgraphs. Perform a node pair generation operation on the node identifiers in each node pair set to form a cross-granularity node pair set; For each node pair in the cross-granularity node pair set, read the corresponding hyperbolic coordinate vector of the node, perform hyperbolic distance calculation operation, and generate the node pair distance value; Write the node pair distance values into the distance matrix table, and perform a normalization operation on the node pair distance values corresponding to each row of the distance matrix table to generate a cross-granularity node alignment weight vector. A threshold filtering operation is performed on the cross-granularity node alignment weight vector to retain the weight components that meet the threshold conditions and generate an alignment confidence vector. Write the cross-granularity node alignment weight vector and alignment confidence vector into the alignment cache.
[0071] In this embodiment, performing the granularity pairing operation specifically includes: Based on the structural hierarchy of electronic documents, a granular hierarchical mapping rule is established. The structural hierarchy is determined by the hierarchical identifier of the structural nodes generated during the page segmentation process. This rule is used to limit document-level nodes to be paired only with their contained chapter-level nodes, chapter-level nodes to be paired only with their contained paragraph-level nodes, and paragraph-level nodes to be paired only with their contained table cell-level nodes.
[0072] Under the premise of satisfying the structural hierarchy mapping rules, the granularity pairing operation performs pairing filtering based on the node source consistency constraint. The node source consistency constraint is used to limit the different granularity nodes participating in the pairing to correspond to the same upper-level structural node identifier or the same structural node index range, ensuring that the nodes in different granularity subgraphs have a clear inclusion relationship in the document structure.
[0073] After completing the structural inclusion relationship and node source consistency screening, the granular pairing operation further performs spatial consistency verification based on the node hyperbolic coordinate mapping result. Pairing records are executed for node pairs in hyperbolic space whose distance meets the preset range constraint, generating a set of node pairings between corresponding granular levels.
[0074] In this embodiment, the execution node's generation operation specifically includes: After obtaining the node pairing sets corresponding to different granularity levels, for each node pairing set, read the upper-level granularity node identifier and the lower-level granularity node identifier recorded in the set.
[0075] According to the record order in the node pairing set, for each upper-level granularity node identifier, read all lower-level granularity node identifiers associated with that upper-level granularity node identifier to form a corresponding candidate lower-level node identifier subset.
[0076] For each upper-level granularity node identifier, traverse the corresponding subset of candidate lower-level node identifiers, and perform one-to-one pairing between the current upper-level granularity node identifier and each lower-level granularity node identifier in the subset of candidate lower-level node identifiers to generate node identifier pairs.
[0077] After generating node identifier pairs for the current upper-level granularity node identifier, the node identifier pair generation process is repeated for the next upper-level granularity node identifier in the node pairing set until the node pairing set is traversed.
[0078] All generated node identifier pairs are aggregated to form a node pair set. Each node pair in the node pair set records the corresponding upper-level granularity node identifier and lower-level granularity node identifier. The node pair set is then written into the node pair cache for subsequent cross-granularity alignment calculations.
[0079] In this embodiment, threshold filtering specifically includes: After obtaining the cross-granularity node alignment weight vector, the weight components in the alignment weight vector are index-aligned according to the node pair generation operation, forming a weight component sequence that corresponds one-to-one with the node pair set.
[0080] Read the preset threshold parameter, perform threshold comparison operation on each weight component in the weight component sequence, and compare the weight component value with the preset threshold parameter item by item.
[0081] For weight components whose weight values are greater than or equal to a preset threshold parameter, record the corresponding node pair index and retain the weight component value; for weight components that do not meet the threshold comparison condition, record the corresponding node pair index and mark them as invalid weight components.
[0082] Weights that meet the threshold comparison criteria are written into the aligned confidence vector in node pair index order, and weights marked as invalid are set to zero or a preset invalid flag at the corresponding position in the aligned confidence vector.
[0083] After threshold filtering of all weight components, a complete alignment confidence vector is formed and written into the alignment buffer for subsequent candidate relation writing and parameter update operations.
[0084] In this embodiment, writing the graph structure to generate the initial knowledge graph specifically includes: Read the head entity identifier, tail entity identifier, and relation type identifier for each candidate relation in the candidate relation set; For each candidate relation, read the alignment weight vector and alignment confidence vector corresponding to the head entity identifier and tail entity identifier from the alignment buffer. Perform alignment consistency check operation on candidate relations. The alignment consistency check operation compares the weight values of the corresponding granular positions in the alignment weight vector with the corresponding components in the alignment confidence vector to generate relations and write them to tags. For each relation, a candidate relation that meets the writing condition is marked. Relationship edge records are generated in the graph structure. Each relation edge record contains a head entity identifier, a tail entity identifier, and a relation type identifier. Write the generated relation edge records into the relation edge table, and record the association index for the corresponding head entity identifier and tail entity identifier in the node table; Traverse the candidate relation set to complete the relation writing operation and generate the initial knowledge graph.
[0085] In this embodiment, performing the two-stage parameter update operation includes the following steps: Read the cross-granularity alignment weight vector in the alignment buffer, read the relation write probability vector, and read the step size gating coefficient; Perform a mirror mapping operation on the cross-granularity alignment weight vector to obtain an alignment mirror vector, and perform a mirror mapping operation on the relation writing probability vector to obtain a probability mirror vector; Perform step-size scaling update operation on the aligned mirror vector to generate an aligned mirror temporary vector, and perform step-size scaling update operation on the probabilistic mirror vector to generate a probabilistic mirror temporary vector; Performing an inverse mirror mapping operation on the alignment mirror temporary vector yields an alignment temporary parameter vector, and performing an inverse mirror mapping operation on the probability mirror temporary vector yields a probability temporary parameter vector. Perform feasible region projection operation on the alignment temporary parameter vector to obtain the alignment projection parameter vector, and perform feasible region projection operation on the probability temporary parameter vector to obtain the probability projection parameter vector. The feasible region projection operation includes non-negativity constraint clipping operation and normalization constraint operation. Write the alignment projection parameter vector and the probability projection parameter vector to the parameter snapshot cache, write the alignment projection parameter vector to the alignment cache, and write the probability projection parameter vector to the probability vector cache.
[0086] In this embodiment, triggering the rollback operation includes the following steps: Read the alignment projection parameter vector and probability projection parameter vector corresponding to the current update round from the parameter snapshot cache; Read the granularity consistency index vector corresponding to the current update round and perform a numerical comparison operation with the baseline consistency index vector recorded in the parameter snapshot cache. When the numerical comparison result meets the rollback trigger condition, the cross-granularity alignment weight vector in the current alignment buffer is replaced with the alignment projection parameter vector in the parameter snapshot buffer. When the numerical comparison result meets the rollback trigger condition, the current relation write probability vector is replaced with the probability projection parameter vector in the parameter snapshot cache. After completing the parameter replacement operation, an update operation is performed on the step size gating coefficient to update the value of the step size gating coefficient, and the updated step size gating coefficient is written back to the parameter update process.
[0087] In this embodiment, reverse mirror mapping specifically includes: After completing the image descent update and obtaining the parameter vector in the image space, read the image space parameter vector and the corresponding image mapping function identifier.
[0088] Based on the mirror mapping function identifier, determine the inverse mirror mapping function that corresponds one-to-one with the mirror mapping function, and load the parameter configuration of the inverse mirror mapping function.
[0089] The mirror space parameter vector is input component by component into the inverse mirror mapping function, and the inverse mapping calculation operation is performed on each component to generate the corresponding original parameter space component value.
[0090] The original parameter space component values obtained by the inverse mapping calculation are combined according to the parameter index order to form the original parameter space parameter vector.
[0091] The generated original parameter space parameter vector is written into the parameter update cache and used as the input parameters for feasible region projection operation and subsequent consistency detection operation.
[0092] In this embodiment, the rollback trigger conditions specifically include: Perform a component-wise numerical comparison operation on the corresponding vector positions of the granular consistency index vector corresponding to the current update round and the baseline consistency index vector recorded in the parameter snapshot cache. When there is at least one granular consistency index component that satisfies that the consistency index value of the current update round is less than the corresponding baseline consistency index value, and the difference exceeds the preset consistency degradation threshold, it is determined that the numerical comparison result satisfies the rollback trigger condition.
[0093] In this embodiment, the output of structured parsing results includes the following steps: Read the node table, relation edge table, and attribute records from a stable knowledge graph; Extract entity node records from the node table according to the node identifier, and generate an entity node output table. The entity node output table contains entity identifier, entity type identifier and location index. A relation output table is generated based on the head entity identifier and tail entity identifier recorded in the relation edge table. The relation output table contains relation type identifiers and node association indexes. Read the cross-granularity alignment weight vector and alignment confidence vector from the alignment cache, and associate them with the entity node output table according to the node identifier; Perform field concatenation operations on the entity node output table, relation output table, and aligned confidence vector to form a structured parsing result data object; Output a structured parsed result data object.
[0094] Example 1: To verify the feasibility of this invention in practice, it was applied to a scenario involving the parsing of electronic documents with complex structures, diverse layouts, and rich semantic levels. These electronic documents typically contain continuous text paragraphs, multi-level heading structures, table cells, and cross-page references. Traditional parsing methods often suffer from unclear structural boundaries, confused entity relationships, and cross-level semantic mismatches, making the final structured results unsuitable for direct use in knowledge management and intelligent retrieval. In this application scenario, the electronic document is first read and parsed into a page sequence as a data stream. Each page is transformed into a page pixel matrix through rendering operations. By performing binarization, horizontal and vertical projection statistics, and segmentation line detection on the page pixel matrix, the page is stably divided into multiple candidate block regions, each corresponding to a clearly defined structural region. After generating a set of structural nodes based on the candidate blocks, the system performs word segmentation and entity parsing operations on the text content within the structural nodes to obtain a set of entities with positional indices. A set of entity pairs is then constructed through a relation window generation operation, and a candidate relation set is further generated by combining this with a relation type table. Building upon this foundation, this invention introduces a multi-granularity hyperbolic subgraph modeling mechanism, mapping structural nodes and entity nodes to document-level, chapter-level, paragraph-level, and table-unit-level granularity subgraphs, respectively. Nodes in each granularity subgraph obtain stable hyperbolic representations through hyperbolic coordinate initialization and hyperbolic space mapping operations, allowing the hierarchical structure and node relationships to be naturally expressed in hyperbolic space. Subsequently, based on the consistency rules of structural hierarchy relationships and node origins, the system performs granularity pairing operations on subgraphs of different granularities, generating cross-granularity node pairing sets and further calculating cross-granularity alignment weight vectors. In the relation writing and parameter update stages, this invention employs a two-stage parameter update mechanism including mirror descent update, feasible region projection, and rollback. The system monitors the granularity consistency index vector in each update round; when consistency degradation is detected, parameter rollback is immediately triggered and the step size gating coefficient is reduced, thereby preventing erroneous updates from having a cumulative impact on the overall graph structure. Through multiple iterations, a structurally stable and hierarchically consistent knowledge graph is finally obtained, and directly usable structured parsing results are output. In this implementation process, by comparing with traditional analytical methods that do not incorporate multi-granularity hyperbolic modeling and rollback mechanisms, it can be observed that the present invention exhibits significant advantages in terms of structural node identification accuracy, entity relationship consistency, and cross-level alignment stability. Especially in complex documents containing numerous table cells and cross-paragraph references, the structured results generated by the present invention remain stable in terms of hierarchical integrity and relationship reliability.
[0095] Table 1: Comparison of Structured Parsing Results
[0096] Table 1 shows the comparison results of different parsing methods on key indicators of structured parsing. The values in the table are all normalized evaluation results, used to reflect the differences in parsing performance of each method under the same electronic document conditions. From the structure node identification accuracy, it can be seen that the traditional parsing method has a value of 0.71, mainly limited by the complexity of the layout and the instability of cross-regional structural boundaries. After introducing multi-granularity subgraphs, this indicator improves to 0.82, indicating that multi-level structural modeling helps to enhance the hierarchical differentiation ability of structure nodes. Further, combined with the rollback update mechanism, this value reaches 0.85, while the overall method of this invention reaches 0.91, indicating that structure nodes maintain stable consistency in multiple iterations.
[0097] In the entity parsing completeness index, the traditional method has a value of 0.69, indicating that entities are missed or parsed repeatedly. After multi-granularity subgraph modeling, the value increases to 0.80, indicating that entities are more fully covered at different structural granularities. After introducing the rollback mechanism, the value reaches 0.83. The method of this invention finally reaches 0.89, demonstrating that the entity parsing process maintains stable convergence under controlled parameter updates.
[0098] Regarding relationship matching consistency, the traditional method yields a value of 0.65, reflecting the tendency for entity relationships to mismatch in cross-paragraph and cross-table scenarios. After multi-granularity modeling, the value is improved to 0.78, and after introducing a rollback mechanism, it reaches 0.81. The method of this invention achieves 0.88, indicating that cross-granularity alignment and rollback control effectively constrain the relationship writing process.
[0099] In the cross-granularity alignment stability index, the traditional method only achieved 0.60, while the method of this invention reached 0.92, showing the most significant change and indicating that the present invention can maintain consistency in the process of aligning multiple granularity nodes. The overall parsing success rate gradually increased from 0.68 in the traditional method to 0.93 in the method of this invention, reflecting that the present invention has stable and reproducible parsing capabilities in the parsing of comprehensive structures, entities, and relationships.
[0100] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.
Claims
1. A knowledge graph-based intelligent parsing method for electronic documents, characterized in that, Includes the following steps: Read the electronic file and perform page segmentation operations to generate a set of structural nodes; perform entity parsing and relation candidate parsing operations on the set of structural nodes to generate a set of candidate entities and a set of candidate relations; construct a multi-granularity hyperbolic subgraph set, which includes document-level subgraphs, chapter-level subgraphs, paragraph-level subgraphs, and table cell-level subgraphs. Each granularity subgraph consists of structural nodes and candidate entities. Perform hyperbolic space mapping on each granularity subgraph node to generate node hyperbolic coordinate vectors. Construct a cross-granularity alignment layer. Calculate the cross-granularity node alignment weight vector and alignment confidence vector in the cross-granularity alignment layer and write them to the alignment cache. Under the constraint of the alignment cache, candidate relations are written into the graph structure to generate an initial knowledge graph; A two-stage parameter update operation is performed on the cross-granularity alignment weight vector and the relation writing probability vector. The two-stage parameter update operation includes mirror descent update and feasible region projection. When any granularity consistency degradation event is detected, a rollback operation is triggered to restore the corresponding parameters. The multi-granularity hyperbolic subgraph construction, cross-granularity alignment and two-stage parameter update operation are performed cyclically until the termination condition is met, and a stable knowledge graph is generated. Output structured parsing results.
2. The method for intelligent parsing of electronic documents based on knowledge graphs according to claim 1, characterized in that, The specific steps of performing the page layout segmentation operation include: The electronic document data stream is parsed to obtain the page sequence, and rendering operations are performed on each page to obtain the page pixel matrix; Perform binarization and connected component labeling operations on the page pixel matrix to obtain a set of connected components, and record the coordinates of the bounding rectangles of the connected components. Perform horizontal and vertical projection statistical operations on the binary page matrix to generate a set of dividing lines, and perform region segmentation operations on the set of dividing lines to obtain a set of candidate blocks. Calculate the bounding rectangle coordinates and pixel density values for candidate blocks, and generate a set of document structure blocks based on the pixel density values; Perform a reading order sorting operation on the document structure block set to generate a structure block position index sequence. Write the document structure block set and the structure block position index sequence into the structure node table and output the structure node set.
3. The method for intelligent parsing of electronic documents based on knowledge graphs according to claim 2, characterized in that, The execution of entity resolution and relation candidate resolution operations includes the following steps: For each structural node in the structural node table, read the corresponding document structural block content and perform word segmentation to generate a word sequence. Perform part-of-speech tagging on the word sequence and generate a set of noun terms based on the tagging results; Perform entity matching operation on the set of noun terms. The entity matching operation includes inputting noun terms into an entity dictionary, performing matching, and generating a set of candidate entity identifiers. Perform a position alignment operation on the candidate entity identifier set. The position alignment operation generates an entity position index based on the character position of the noun term in the content of the structure node. Perform a relation window generation operation on the position indices of adjacent entities within the same structural node to generate a set of entity pairs. Perform relation type matching operations on the entity pairs to generate a candidate relation set.
4. The method for intelligent parsing of electronic documents based on knowledge graphs according to claim 3, characterized in that, The construction of the multi-granularity hyperbolic subgraph set specifically includes: Read the structural node identifier and position index sequence from the structural node table, and divide the node into document-level, chapter-level, paragraph-level, and table cell-level sets according to the position index sequence; Write the candidate entity set into the corresponding granularity node set according to the entity location index, and establish a mapping relationship between node identifier and entity identifier in each granularity node set; Generate a set of structural connection edges within the document-level node set, a set of adjacent paragraph connection edges within the chapter-level node set, a set of entity co-occurrence connection edges within the paragraph-level node set, and a set of cell adjacency connection edges within the table cell-level node set. For each set of granular nodes and its corresponding set of connecting edges, a granular subgraph structure is constructed to obtain document-level subgraphs, chapter-level subgraphs, paragraph-level subgraphs, and table cell-level subgraphs. Perform hyperbolic coordinate initialization operation on the node identifiers in each granularity subgraph. The initialization operation allocates hyperbolic coordinate initial vectors according to the node identifier order. Perform hyperbolic space mapping operations on each granularity subgraph to map node identifiers to node hyperbolic coordinate vectors, forming a set of multi-granularity hyperbolic subgraphs.
5. The method for intelligent parsing of electronic documents based on knowledge graphs according to claim 4, characterized in that, The construction of the cross-granularity alignment layer includes the following steps: Read the node identifier set and node hyperbolic coordinate vector corresponding to each granularity subgraph in the multi-granularity hyperbolic subgraph set; Granularity pairing operations are performed on subgraphs of different granularities according to the granularity hierarchy. The granularity pairing operations generate node pairing sets between document-level subgraphs and chapter-level subgraphs, between chapter-level subgraphs and paragraph-level subgraphs, and between paragraph-level subgraphs and table cell-level subgraphs. Perform a node pair generation operation on the node identifiers in each node pair set to form a cross-granularity node pair set; For each node pair in the cross-granularity node pair set, read the corresponding hyperbolic coordinate vector of the node, perform hyperbolic distance calculation operation, and generate the node pair distance value; Write the node pair distance values into the distance matrix table, and perform a normalization operation on the node pair distance values corresponding to each row of the distance matrix table to generate a cross-granularity node alignment weight vector. A threshold filtering operation is performed on the cross-granularity node alignment weight vector to retain the weight components that meet the threshold conditions and generate an alignment confidence vector. Write the cross-granularity node alignment weight vector and alignment confidence vector into the alignment cache.
6. The method for intelligent parsing of electronic documents based on knowledge graphs according to claim 5, characterized in that, The process of writing to the graph structure to generate the initial knowledge graph specifically includes: Read the head entity identifier, tail entity identifier, and relation type identifier for each candidate relation in the candidate relation set; For each candidate relation, read the alignment weight vector and alignment confidence vector corresponding to the head entity identifier and tail entity identifier from the alignment buffer. Perform alignment consistency check operation on candidate relations. The alignment consistency check operation compares the weight values of the corresponding granular positions in the alignment weight vector with the corresponding components in the alignment confidence vector to generate relations and write them to tags. For each relation, a candidate relation that meets the writing condition is marked. Relationship edge records are generated in the graph structure. Each relation edge record contains a head entity identifier, a tail entity identifier, and a relation type identifier. Write the generated relation edge records into the relation edge table, and record the association index for the corresponding head entity identifier and tail entity identifier in the node table; Traverse the candidate relation set to complete the relation writing operation and generate the initial knowledge graph.
7. The method for intelligent parsing of electronic documents based on knowledge graphs according to claim 6, characterized in that, The two-stage parameter update operation includes the following steps: Read the cross-granularity alignment weight vector in the alignment buffer, read the relation write probability vector, and read the step size gating coefficient; Perform a mirror mapping operation on the cross-granularity alignment weight vector to obtain an alignment mirror vector, and perform a mirror mapping operation on the relation writing probability vector to obtain a probability mirror vector; Perform step-size scaling update operation on the aligned mirror vector to generate an aligned mirror temporary vector, and perform step-size scaling update operation on the probabilistic mirror vector to generate a probabilistic mirror temporary vector; Performing an inverse mirror mapping operation on the alignment mirror temporary vector yields an alignment temporary parameter vector, and performing an inverse mirror mapping operation on the probability mirror temporary vector yields a probability temporary parameter vector. Perform feasible region projection operation on the alignment temporary parameter vector to obtain the alignment projection parameter vector, and perform feasible region projection operation on the probability temporary parameter vector to obtain the probability projection parameter vector. The feasible region projection operation includes non-negativity constraint clipping operation and normalization constraint operation. Write the alignment projection parameter vector and the probability projection parameter vector to the parameter snapshot cache, write the alignment projection parameter vector to the alignment cache, and write the probability projection parameter vector to the probability vector cache.
8. The method for intelligent parsing of electronic documents based on knowledge graphs according to claim 7, characterized in that, The triggering of the rollback operation includes the following steps: Read the alignment projection parameter vector and probability projection parameter vector corresponding to the current update round from the parameter snapshot cache; Read the granularity consistency index vector corresponding to the current update round and perform a numerical comparison operation with the baseline consistency index vector recorded in the parameter snapshot cache. When the numerical comparison result meets the rollback trigger condition, the cross-granularity alignment weight vector in the current alignment buffer is replaced with the alignment projection parameter vector in the parameter snapshot buffer. When the numerical comparison result meets the rollback trigger condition, the current relation write probability vector is replaced with the probability projection parameter vector in the parameter snapshot cache. After completing the parameter replacement operation, a reduction update operation is performed on the step size gating coefficient, and the updated step size gating coefficient is written back to the parameter update process.
9. The method for intelligent parsing of electronic documents based on knowledge graphs according to claim 8, characterized in that, The output structured parsing result includes the following steps: Read the node table, relation edge table, and attribute records from a stable knowledge graph; Extract entity node records from the node table according to the node identifier, and generate an entity node output table. The entity node output table contains entity identifier, entity type identifier and location index. A relation output table is generated based on the head entity identifier and tail entity identifier recorded in the relation edge table. The relation output table contains relation type identifiers and node association indexes. Read the cross-granularity alignment weight vector and alignment confidence vector from the alignment cache, and associate them with the entity node output table according to the node identifier; Perform field concatenation operations on the entity node output table, relation output table, and aligned confidence vector to form a structured parsing result data object; Output a structured parsed result data object.