A knowledge extraction method and system based on hierarchical semantic path perception
By using a hierarchical semantic path-aware knowledge extraction method, the hierarchical structure of regulatory compliance texts is restored, a path-aware context is generated, and a compliance knowledge graph is output. This solves the accuracy and reliability problems of regulatory compliance text processing in existing technologies and realizes the structured representation and traceability of rule knowledge and risk knowledge.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- WUHAN UNIV OF SCI & TECH
- Filing Date
- 2026-04-03
- Publication Date
- 2026-07-10
AI Technical Summary
Existing technologies struggle to effectively restore hierarchical semantic structure when processing regulatory compliance texts, leading to errors in obligation attribution, missing conditions, disconnected reference clauses, propagation of structural noise, and a disconnect between rule knowledge and textual knowledge. This fails to meet the requirements for high-credibility review and risk identification.
A hierarchical semantic path-aware knowledge extraction method is adopted. Through layout parsing, hierarchical correction, hierarchical semantic tree construction and recursive structured summary generation, the logical skeleton of regulatory compliance text is restored, path-aware context is generated, and clause-level compliance knowledge graph is output, realizing the structured representation of rule knowledge and risk knowledge and evidence backlink.
It improves the accuracy and credibility of regulatory compliance text processing, reduces the probability of structural noise propagation, enhances the accessibility of rule knowledge and risk identification capabilities, and supports compliance retrieval, policy Q&A, risk alerts, and intelligent review.
Smart Images

Figure CN122366446A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of natural language processing technology, and more specifically, to a knowledge extraction method and system based on hierarchical semantic path awareness. Background Technology
[0002] In scenarios such as financial regulation, data compliance, platform governance, corporate internal control systems, and the implementation of industry standards, regulatory compliance documents typically exist in the form of long documents such as institutional documents, management methods, implementation rules, application guidelines, review standards, and Q&A statements. These documents generally have a multi-level hierarchical structure, including chapters, sections, articles, clauses, and items, and contain a large amount of restrictive information such as cross-article citations, applicable conditions, exceptions, liabilities and consequences, time ranges, and geographical scopes. They are an important source of basic data for conducting compliance Q&A, clause retrieval, system comparison, rule implementation, risk identification, and automated review.
[0003] In existing technologies, knowledge extraction from long documents typically employs a segmentation-first, extraction-later approach. This involves first dividing the original text into segments, then inputting the segmented results into an information extraction model to generate structured results. While this method alleviates the length constraints imposed by the limited model context window, it can easily disrupt the original semantic chain of regulations in regulatory compliance text scenarios. The actors in regulatory compliance texts often appear in higher-level clauses or chapter titles, with subsequent clauses continuing to express obligations, prohibitions, permissions, exceptions, or responsibilities by omitting subjects, pronouns, or continuation phrases. If ordinary segmentation severs the connection between the higher-level structure and the lower-level content, it can easily lead to a disconnect between the actor and the content, resulting in errors in attribution of obligations and misjudgment of applicable objects. Simultaneously, regulatory compliance texts contain numerous references such as "this article," "the preceding paragraph," "the aforementioned provisions," and "Article X, Paragraph Y." If these references cannot be mapped to corresponding clause nodes, the extraction results often fail to retain the regulatory basis, applicable boundaries, and prerequisites for triggering responsibilities.
[0004] Furthermore, existing technologies, such as using sliding windows to supplement local context and using whole-text summaries to supplement global semantics, are insufficient to meet the precise extraction requirements of regulatory compliance texts. While the former can improve the continuity of local semantics to some extent, when constraint information is distributed across distant chapters, cross-level clauses, or cited clauses, the local window still struggles to cover the complete constraint chain. The latter, on the other hand, tends to inject a large amount of information unrelated to the current target clause into the model, leading to noise propagation and increased computational overhead, and makes it difficult to reliably retain key semantics crucial for obligation identification, condition constraints, and exception judgments. For regulatory compliance scenarios, this insufficient structural restoration and inaccurate context injection are not merely extraction errors in the general sense, but directly result in the overgeneralization of compliance requirements, the omission of exception clauses, and the weakening of liability consequences, thereby causing automated review conclusions to deviate from the true regulatory intent.
[0005] Beyond the extraction process itself, existing technologies commonly suffer from a disconnect between rule knowledge and textual knowledge. The core value of regulatory compliance texts lies not only in extracting fields such as subjects, behaviors, and objects, but also in transforming the rules, standards, and constraints within the text into callable, judgmental, and auditable rule knowledge. However, many existing solutions focus more on field extraction or summary generation, lacking a unified data object and semantic interface between the extraction results and rule judgments. This makes it difficult to further transform text content into factual objects that a rule engine can process, and hinders the formation of a stable mapping relationship between rule configuration, rule matching, risk assessment, and the original clauses. In business scenarios requiring high-credibility review, having only extraction results without a rule objectification makes it difficult for the system to complete the closed loop from text recognition to rule execution, thus affecting the rule implementation capability and system usability.
[0006] Meanwhile, existing technologies often fail to adequately model risk knowledge. Risks in regulatory compliance documents are not singular conclusions but are triggered by a combination of factors, including rule violations, missing conditions, misuse of exceptions, mismatched evidence, information gaps, and inconsistencies in multi-source data. If the system cannot clearly define the source, type, basis for judgment, and corresponding handling mechanism of a risk, it easily simplifies risk identification to coarse-grained label output, failing to distinguish between different risk types such as subject mismatch risk, condition overstepping risk, liability triggering risk, and insufficient evidence risk. This also makes it difficult to support subsequent risk grading, review and verification, rectification prompts, and log retention. Existing solutions demonstrate that in complex document review scenarios, issues such as pseudo-null values, inconsistent fields, and heterogeneous differences from multiple sources can directly hinder the timely detection of critical risks. Without a risk-oriented knowledge organization method, the system output cannot meet the accuracy and fine-grained requirements of real-world review scenarios.
[0007] Furthermore, existing technologies still have significant shortcomings in terms of the traceability, auditability, and practical application of knowledge outcomes. While generative information extraction models can output structured results, their outputs often do not directly carry the location relationship with the original text, and do not include character-level position indexes, clause paths, citation bases, or fragments of original text evidence. In scenarios where the credibility of results is highly critical, such as financial risk control, contract review, and regulatory compliance, if the extracted results cannot be linked back to the original text location, source document, and hit rules, the relevant conclusions are difficult to verify, and risk warnings are difficult to review. Existing practices have shown that a truly implementable intelligent review system needs to establish a transparent link between the original text, extracted entities, data fusion, hit rules, and risk outputs, so that every risk output can be restored and reviewed, and supported by evidence from fragments of the original text.
[0008] Furthermore, as regulatory compliance operations become increasingly automated and intelligent, systems not only need to perform text parsing and knowledge extraction, but also support the representation, storage, transmission, and retrieval of rule knowledge, risk knowledge, and evidentiary knowledge. In existing technologies, different modules often employ a loosely coupled approach, lacking a unified data organization format among extraction results, rule configurations, risk conclusions, feedback logs, and report outputs. This leads to difficulties in knowledge reuse, module collaboration, and downstream question-and-answer, retrieval, review, and reporting systems directly consuming the relevant results. Especially in compliance scenarios involving multiple source documents, multiple types of rules, and continuous iteration, the lack of a unified structured representation and callable mechanism easily results in problems such as knowledge silos, broken call chains, and insufficient system scalability. Summary of the Invention
[0009] Based on the analysis of existing technologies, how to restore the hierarchical semantic structure and clause reference relationships of regulatory compliance texts—a special text type with strong hierarchical structure, strong constraints, and strong review requirements—within a limited computing budget, selectively injecting global constraints, chapter semantics, rule standards, and cited clauses directly related to the current text block into the extraction process, and further realize the structured representation, evidence backlink, and auditable output of rule knowledge and risk knowledge, thereby avoiding errors in obligation attribution, loss of condition boundaries, breakage of normative basis, and distortion of risk assessment, has become a key technical problem that existing technologies urgently need to solve.
[0010] This invention provides a knowledge extraction method and system based on hierarchical semantic path awareness to address the technical problems of existing long document extraction technologies in regulatory compliance text processing, such as subject drift, loss of conditions, disconnection of cited clauses, propagation of structural noise, and excessively high context construction costs. Furthermore, it addresses the technical problems of existing technologies, such as the disconnect between rule knowledge and textual knowledge, insufficient expression of risk knowledge, difficulty in linking review criteria, and difficulty in directly supporting rule judgment and risk identification with extraction results. The invention provides a solution that can restore the document's logical skeleton, preserve the chain of clause constraints, form rule-based knowledge expression, output traceable structured compliance knowledge, and support the implementation of risk identification and review.
[0011] To achieve the above objectives, the first aspect of the present invention provides a knowledge extraction method based on hierarchical semantic path awareness, comprising: The regulatory compliance text to be processed is obtained, and the layout is parsed and the text blocks are preprocessed to obtain a structured block sequence arranged in reading order. The structured block sequence includes title candidate blocks and body text blocks. The title candidate blocks are hierarchically corrected to obtain a sequence of title blocks with hierarchical depth tags. Clause citation expressions in the body text are identified, and a set of citation target candidate sets is generated. A hierarchical semantic tree is constructed based on the corrected sequence of title blocks and body blocks, wherein the root node of the hierarchical semantic tree corresponds to the complete document, the intermediate nodes correspond to the structural nodes, and the leaf nodes correspond to the text block nodes that participate in knowledge extraction. Based on the hierarchical semantic tree, a bottom-up recursive structured summary generation is performed to obtain the structured semantic summary corresponding to each intermediate node; For a target text block node, a path-aware context is generated by combining its hierarchical ancestor path and the referenced clause node. The path-aware context includes at least the global context, chapter context, referenced clause context, current text block, and extraction task constraints. The path-aware context is input into the knowledge extraction model, and the output is a clause-level compliance knowledge graph.
[0012] In one implementation, hierarchical correction is performed on the title candidate blocks to obtain a sequence of title blocks with hierarchical depth markers, including: Candidate levels are obtained based on numbering pattern, font size, font bolding attribute, indentation distance, vertical adjacency relationship, and vertical spacing between blocks. The candidate levels are reviewed in conjunction with the semantic content of the subsequent body text of the candidate blocks to determine the final level of the target title block. When a candidate block does not meet the structural title conditions, it is downgraded to a body text block.
[0013] In one implementation, the clause reference expression includes at least one of the following: this article, this paragraph, the preceding paragraph, the foregoing provisions, the previous article, Article X, Article X, paragraph Y, Chapter X, section Y, and implementation pursuant to a certain article. Identifying clause reference expressions in the text and generating a candidate set of reference targets includes: For clause references that can be directly parsed, locate their target nodes based on the numbering mapping results; For clause references that cannot be directly parsed, a candidate set of reference targets is generated by combining the path of the current node, the nearest explicit clause node, and the numbering continuity information.
[0014] In one implementation, a hierarchical semantic tree is constructed based on the corrected sequence of title blocks and body blocks. This includes generating the hierarchical semantic tree using a stack-based construction strategy, which includes: when encountering a higher-level or same-level title, backtracking the current active parent node and creating a new intermediate node; when encountering a body block, accumulating the body content into a buffer, and generating a text block leaf node and attaching it to the current active parent node when the buffer length reaches a preset segmentation threshold or when a new structural node is encountered.
[0015] In one implementation, after constructing a hierarchical semantic tree based on the corrected sequence of header blocks and body blocks, the method further includes: constructing a clause citation graph based on the candidate set of citation targets. In one implementation, for a target text block node, a path-aware context is generated by combining its hierarchical ancestor path and the referenced clause node, including: Retrieve ancestor node summaries upwards along the hierarchical path of the target text block node; Based on the clause citation relationship diagram, a summary of the citation clauses related to the target text block node is introduced; According to the preset assembly strategy, at least a portion of the document root node summary, direct parent node summary, near ancestor node summary, cited clause summary, and high-weight constraint sentences in the current text block are retained. When the total length of candidate contexts exceeds the preset token budget, pruning is performed based on the importance score results.
[0016] In one implementation, after inputting the path-aware context into the knowledge extraction model and outputting a clause-level compliance knowledge graph, the method further includes: The subject, behavior, object, condition, exception, responsibility, basis and evidence fields in the clause-level compliance knowledge graph are standardized and mapped to form rule knowledge entries and evidence objects; Consistency verification, subject restoration, conflict resolution, rule matching, risk assessment, and evidence backlinking are performed on the rule knowledge entries and clause-level compliance knowledge graph to obtain the final knowledge graph result and risk identification result.
[0017] Based on the same inventive concept, a second aspect of this invention provides a knowledge extraction system based on hierarchical semantic path awareness, comprising: The preprocessing module is used to acquire the regulatory compliance text to be processed, perform layout parsing and text block preprocessing, and obtain a structured block sequence arranged in reading order. The structured block sequence includes title candidate blocks and body text blocks. The hierarchy correction module is used to perform hierarchy correction on the candidate title blocks to obtain a sequence of title blocks with hierarchy depth tags, identify clause citation expressions in the body text, and generate a candidate set of citation targets. The structure building module is used to build a hierarchical semantic tree based on the corrected title block sequence and body block, wherein the root node of the hierarchical semantic tree corresponds to the complete document, the intermediate nodes correspond to the structure nodes, and the leaf nodes correspond to the text block nodes that participate in knowledge extraction. The summary generation module is used to perform bottom-up recursive structured summary generation based on the hierarchical semantic tree to obtain the structured semantic summary corresponding to each intermediate node. The context assembly module is used to generate a path-aware context for a target text block node by combining its hierarchical ancestor path and the referenced clause node. The path-aware context includes at least the global context, chapter context, referenced clause context, current text block, and extraction task constraints. The knowledge extraction module is used to input the path-aware context into the knowledge extraction model and output a clause-level compliance knowledge graph.
[0018] Based on the same inventive concept, a third aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is used to implement the above-described knowledge extraction method based on hierarchical semantic path awareness.
[0019] Based on the same inventive concept, a fourth aspect of the present invention provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, it is used to implement the above-described hierarchical semantic path-aware knowledge extraction method.
[0020] Compared with the prior art, the advantages and beneficial technical effects of the present invention are as follows: (1) This invention restores the logical skeleton of regulatory compliance texts through hierarchical correction, so that the block results are consistent with the normative structure of chapters, sections, articles, clauses and items, reducing the probability of structural noise propagating downstream, and reducing the problems of incorrect attribution of obligations, misjudgment of scope of application and breakage of normative basis caused by structural breakage.
[0021] (2) The present invention uses a recursive structured summary caching mechanism, which can be reused by multiple text blocks after one generation. It can significantly reduce the cost of repeated context construction while maintaining the density of key information, and improve the reuse efficiency of rule constraints, condition chains and exception information between different text blocks.
[0022] (3) This invention generates path-aware context by combining ancestor paths and reference clause nodes, enabling local text blocks to obtain global constraints, chapter semantics and basis clauses directly related to them. This is beneficial for restoring omitted subjects, identifying applicable conditions and distinguishing exceptions, and improving the completeness of rule element extraction in complex regulatory texts.
[0023] (4) By further organizing the extraction results into rule knowledge objects, evidence objects and risk knowledge objects, the present invention enables the rules, standards and constraints in regulatory compliance texts to be represented, stored, transmitted and called in a structured form, thereby supporting rule matching, risk identification, result verification and report output, and improving the engineering implementation capability of the system.
[0024] (5) This invention introduces risk source identification, risk type determination, hit rule backlink and risk classification mechanism on the basis of consistency verification and evidence backlink, so that the output results not only have knowledge extraction ability, but also risk judgment and review support ability, which helps to identify risk situations such as subject mismatch, obligation omission, application boundary overstepping, basis mismatch and insufficient evidence.
[0025] (6) The present invention outputs structured compliance knowledge and risk identification results with evidence backlink capability, which can be directly used for compliance retrieval, system Q&A, obligation identification, risk warning, intelligent review and knowledge graph construction, thereby improving the interpretability, auditability and usability of the regulatory text processing system. Attached Figure Description
[0026] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0027] Figure 1 A flowchart illustrating a knowledge extraction method based on hierarchical semantic path awareness provided in an embodiment of the present invention; Figure 2 This is a schematic diagram illustrating the joint construction of hierarchical semantic tree and clause reference relationship in an embodiment of the present invention; Figure 3 This is a schematic diagram of path-aware context assembly in an embodiment of the present invention; Figure 4 This is a schematic diagram of the clause-level compliance knowledge graph structure output in an embodiment of the present invention. Detailed Implementation
[0028] This invention discloses a knowledge extraction method and system based on hierarchical semantic path awareness. The method includes: acquiring regulatory compliance text to be processed; performing layout parsing, structured block preprocessing, and title hierarchy correction on the document; identifying clause citation expressions in the text and constructing a hierarchical semantic tree and clause citation relationship graph; performing bottom-up recursive structured summary generation based on the hierarchical semantic tree to obtain and cache the structured semantic summaries of each intermediate node; generating a path-aware context for the target text block by combining its hierarchical ancestor path and the cited clause node; inputting the path-aware context into a knowledge extraction model to output a clause-level compliance knowledge graph; standardizing and mapping the subject, behavior, object, condition, exception, responsibility, basis, and evidence fields in the graph to form rule knowledge entries and evidence objects; further performing consistency verification, subject restoration, conflict resolution, rule matching, risk assessment, and evidence backlink to obtain the final knowledge graph result and risk identification result. Risk assessment is based on rule knowledge entries, clause-level compliance knowledge graph, and risk knowledge model to identify risk situations such as rule violation, missing conditions, misuse of exceptions, mismatch of basis, and insufficient evidence. This invention can restore the logical framework of regulatory compliance texts, preserve the relationship between global constraints, chapter semantics and supporting clauses, improve the accuracy of extracting omitted subjects, conditional restrictions and exceptions in long documents, and realize the structured representation, storage, transmission, retrieval and traceable output of rule knowledge and risk knowledge. It is applicable to compliance retrieval, policy Q&A, risk identification, automated review and knowledge graph construction scenarios.
[0029] Example 1 This embodiment provides a knowledge extraction method based on hierarchical semantic path awareness, including: S1: Obtain the regulatory compliance text to be processed, perform layout parsing and text block preprocessing to obtain a structured block sequence arranged in reading order, wherein the structured block sequence includes title candidate blocks and body text blocks; S2: Perform hierarchical correction on the candidate title blocks to obtain a sequence of title blocks with hierarchical depth tags, identify clause citation expressions in the body text, and generate a candidate set of citation targets; S3: Construct a hierarchical semantic tree based on the corrected title block sequence and body block. The root node of the hierarchical semantic tree corresponds to the complete document, the intermediate nodes correspond to the structural nodes, and the leaf nodes correspond to the text block nodes that participate in knowledge extraction. S4: Based on the hierarchical semantic tree, perform bottom-up recursive structured summary generation to obtain the structured semantic summary corresponding to each intermediate node; S5: For the target text block node, generate a path-aware context by combining its hierarchical ancestor path and the referenced clause node. The path-aware context includes at least the global context, chapter context, referenced clause context, current text block, and extraction task constraints. S6: Input the path-aware context into the knowledge extraction model and output a clause-level compliance knowledge graph.
[0030] Specifically, the structured block sequence includes at least a title candidate block, a body block, and page metadata, with the page metadata including at least one of the following: position coordinates, page number, and font attribute.
[0031] like Figure 1 As shown, the method of the present invention comprises four main interconnected processing stages: the first stage performs title level correction on the candidate title blocks after page layout parsing to form structural nodes with level identifiers (S2); the second stage constructs a hierarchical semantic tree based on the level correction results and performs recursive structured summary generation on each intermediate node (S3 and S4); the third stage performs path-aware injection on the target text block, assembling the global context, chapter context, and cited clause context as model input, thereby completing clause-level compliance knowledge extraction and graph-based output (S5); the fourth stage constructs rule knowledge items and risk knowledge items based on the clause-level compliance knowledge graph (S6).
[0032] Specifically, the method first performs hierarchical correction on the candidate title blocks in the layout parsing results, then constructs a hierarchical semantic tree and generates intermediate node summaries, and finally performs path-aware injection on the target text blocks, with the knowledge extractor outputting a clause-level compliance knowledge graph. In this embodiment, the method further performs rule knowledge organization, risk knowledge organization, consistency verification, and evidence backlinking on the extracted structured compliance knowledge to form clause-level knowledge results that can be used for subsequent compliance retrieval, policy Q&A, rule matching, risk identification, and review. The method can be deployed on servers, knowledge platforms, compliance Q&A platforms, policy governance platforms, or intelligent review terminals. The text to be processed can be a PDF file, a Word document, web scraping text, text exported from a policy library, or structured text obtained by parsing scanned documents.
[0033] In one implementation, the layout parsing and text block preprocessing in S1 includes: removing headers, footers, page numbers, gutter footnotes, and invalid footnotes; retaining title text blocks and body text blocks; splicing together paragraphs that break across pages; and normalizing the numbering patterns of clauses, sections, and items so that subsequent hierarchical correction can be judged in conjunction with layout features and numbering features.
[0034] In one implementation, S2 performs hierarchical correction on the title candidate blocks to obtain a sequence of title blocks with hierarchical depth markers, including: S2.1: Candidate levels are obtained based on numbering pattern, font size, font bolding attribute, indentation distance, vertical adjacency relationship, and vertical spacing between blocks; S2.2: Review the candidate levels by combining the semantic content of the subsequent body text of the candidate block to determine the final level of the target title block. When a candidate block does not meet the structural title condition, it is downgraded to a body text block.
[0035] Specifically, hierarchical correction is used to distinguish between true structural headings and unstructured headings, and to determine the hierarchical relationship between chapter-level nodes, section-level nodes, article-level nodes, and item-level nodes.
[0036] In one implementation, the clause reference expression includes at least one of the following: this article, this paragraph, the preceding paragraph, the foregoing provisions, the previous article, Article X, Article X, paragraph Y, Chapter X, Section Y, and implementation pursuant to a certain article. S2 identifies the clause reference expression in the text and generates a candidate set of reference targets, including: S2.3: For clause references that can be directly parsed, locate the target node based on the number mapping result; S2.4: For clause reference expressions that cannot be directly parsed, generate a candidate set of reference targets by combining the path of the current node, the nearest explicit clause node, and the numbering continuity information.
[0037] Please see Figure 2 This is a schematic diagram illustrating the joint construction of a hierarchical semantic tree and clause citation relationships.
[0038] In one implementation, S3 constructs a hierarchical semantic tree based on the corrected title block sequence and body block, including generating the hierarchical semantic tree using a stack-based construction strategy. Specifically, when encountering a higher-level or same-level title, the current active parent node is backtracked and a new intermediate node is created; when encountering a body block, the body content is accumulated in a buffer, and when the buffer length reaches a preset segmentation threshold or a new structural node is encountered, a text block leaf node is generated and attached to the current active parent node.
[0039] In one implementation, the recursive structured summary generation adopts a post-order traversal approach; leaf nodes use the original text as semantic representation, and intermediate nodes generate intermediate node summaries by aggregating the semantic representations of all their child nodes; the intermediate node summary generation follows the principles of explicit entity preservation, logical relation preservation, and constraint priority preservation to avoid extraction ambiguity caused by pronounification and generalized descriptions, and to improve the stability of subsequent rule knowledge generation and risk condition identification.
[0040] Specifically, a bottom-up recursive structured summary generation is performed based on a hierarchical semantic tree to obtain the structured semantic summary corresponding to each intermediate node, and the structured semantic summary is cached. During the generation process, the structured semantic summary retains at least a portion of the key information from the normative subject, behavior, applicable objects, triggering conditions, exceptions, liability consequences, time range, and geographical range, and prioritizes the retention of semantic fragments that can represent rule constraints and risk triggering conditions, so as to form a unified representation of rule knowledge and risk knowledge in the future.
[0041] In one implementation, after constructing a hierarchical semantic tree based on the corrected sequence of header blocks and body blocks, the method further includes: constructing a clause citation graph based on a set of candidate citation targets.
[0042] In one implementation, S5 generates a path-aware context for the target text block node by combining its hierarchical ancestor path and the referenced clause node, including: S5.1: Retrieve ancestor node summaries upwards along the hierarchical path of the target text block node; S5.2: Based on the clause citation relationship diagram, introduce a summary of the citation clauses related to the target text block node; S5.3: Retain at least a portion of the document root node summary, direct parent node summary, near ancestor node summary, cited clause summary, and high-weight constraint sentences in the current text block according to the preset assembly strategy; S5.4: When the total length of candidate contexts exceeds the preset token budget, pruning is performed based on the importance score results.
[0043] Specifically, such as Figure 3 As shown, firstly, the complete ancestor path of the target text block is obtained; when the path length exceeds the preset depth limit, the root node and the nearest several levels of ancestor nodes are retained; then, the structured summary of the corresponding citation clause node is introduced according to the citation expression in the current text block; if the context length still exceeds the token budget, the root node summary, the direct parent node summary, the citation clause summary, and the high-weight constraint sentence in the current text block are retained first.
[0044] In one implementation, in step S6, the knowledge extraction model is a generative information extraction model; the structured compliance knowledge output by the model is represented by a clause-level graph, in which each piece of knowledge includes at least a subject field, a behavior field, an object field, and an evidence field, and additional corresponding fields are added when conditions, exceptions, responsibilities, or bases exist; based on this, the system converts the structured compliance knowledge into storable, transmissible, and callable rule knowledge objects and evidence objects, wherein the rule knowledge objects are used for rule matching module invocation, and the evidence objects are used for original text location, result verification, and report generation.
[0045] Please see Figure 4 This is a schematic diagram of the output clause-level compliance knowledge graph structure.
[0046] Specifically, the knowledge graph includes clause nodes, obligation behavior nodes, and associated regulatory body nodes, behavior object nodes, condition nodes, exception nodes, responsibility nodes, basis clause nodes, and evidence nodes. These nodes are connected by relational edges such as applicable, acting upon, limited by, exception to, causing, based on, and evidence location. After the graph is generated, the fields for subject, behavior, object, condition, exception, responsibility, basis, and evidence are normalized and mapped to form rule knowledge entries associated with the clause nodes. Each rule knowledge entry includes at least one or more of the following: regulatory body, behavior requirement, behavior object, modality type, triggering condition, exception condition, liability consequence, basis clause, and evidence anchor point. This section supplements the original clause-level graph output with an objectified representation of the rule knowledge entries, enabling the extracted results to be directly called by the rule judgment module.
[0047] In one implementation, after inputting the path-aware context into the knowledge extraction model and outputting a clause-level compliance knowledge graph, the method further includes: The subjects, behaviors, objects, conditions, exceptions, responsibilities, basis, and evidence fields in the clause-level compliance knowledge graph are standardized and mapped to form rule knowledge entries and evidence objects; Consistency verification, subject restoration, conflict resolution, rule matching, risk assessment, and evidence backlinking are performed on the rule knowledge entries and clause-level compliance knowledge graph to obtain the final knowledge graph results and risk identification results.
[0048] Specifically, the output structured compliance knowledge undergoes consistency verification, subject restoration, conflict resolution, rule matching, risk assessment, and evidence backlinking to obtain the final compliance knowledge graph and risk identification results. The evidence backlink records the original text location, hierarchical path, and relevant clause node corresponding to each knowledge item. Risk assessment is performed based on rule knowledge items, clause-level compliance knowledge graph, and a pre-set risk knowledge model. The risk knowledge model includes at least risk sources, risk types, judgment criteria, and handling mechanisms. Risk sources include at least one of rule violation, missing conditions, misuse of exceptions, mismatch of criteria, information gaps, and multi-source inconsistency. Risk types include at least one of subject mismatch risk, obligation omission risk, application boundary overstepping risk, liability triggering risk, criterion mismatch risk, and insufficient evidence risk. Handling mechanisms include at least one of risk grading, rule hit backlink, review triggering, prompt generation, and log retention.
[0049] When the extracted action statement lacks a clear subject, the normative subject is restored through the hierarchical path of the current text block and the referenced clause node; when multiple text blocks have semantic conflicts, the target result is selected according to the clause hierarchy priority, explicit limitation strength and original evidence completeness; after completing the consistency verification, the system inputs the rule knowledge object into the risk judgment module, performs risk matching based on the preset rule template or rule engine, and outputs risk label, risk level, hit rule identifier and corresponding evidence chain.
[0050] In a specific implementation scenario, the documents to be processed include corporate data export compliance regulations, internal management procedures for personal information protection, and compilations of corresponding regulatory rules. These documents typically contain a multi-level structure including general provisions, scope of application, application requirements, assessment requirements, exceptions, legal liabilities, and supplementary provisions. They also contain references to the materials listed in the preceding paragraph, provisions of this chapter, application of Article 12, and implementation in accordance with the aforementioned standards. The system needs to extract the regulatory body's obligations, application requirements, exception scenarios, consequences, regulatory basis, and evidentiary fragments from this type of text, and further organize them into rule knowledge items and risk knowledge items to support subsequent compliance verification and risk warnings.
[0051] In specific implementation, the method of the present invention includes the following steps.
[0052] Step 1: Page Layout Analysis and Structured Block Preprocessing After obtaining the regulatory compliance text to be processed, the first step is to use a layout parsing component to convert the original document into a sequence of structured blocks. Each structured block contains text content, page number, position information, font size, block type, and its relative coordinates on the page. Subsequently, a cleaning operation is performed on the structured blocks, removing headers, footers, page numbers, gutter footnotes, invalid footnotes, and noise blocks irrelevant to the semantics of the main text. After cleaning, only candidate title blocks and main text blocks are retained, and they are globally sorted according to the reading order to form a basic block sequence.
[0053] In this embodiment, the numbering formats of articles, clauses, and items are simultaneously normalized. For example, different numbering formats such as "First Article," "1.", "I," "One of," and "First Clause" are uniformly mapped to comparable hierarchical markers; splicing is performed on broken paragraphs spanning multiple pages; and preliminary repairs are made for numbering splits, missing characters in titles, and line breaks caused by OCR or page layout parsing. After the above processing, the system obtains a normalized block sequence that can be used for subsequent hierarchical correction.
[0054] Step Two: Title Hierarchy Correction and Citation Recognition After obtaining the basic block sequence, the system performs hierarchical correction on the candidate title blocks. Specifically, the system first assigns candidate levels based on numbering pattern, font size, font bolding attribute, indentation distance, vertical adjacency, and vertical spacing between blocks. Then, it reviews the candidate block against the semantic content of the subsequent body text to determine whether the block is a true structural title and its corresponding level. For candidate blocks that do not meet the structural title criteria, the system downgrades them to body text blocks to avoid misidentifying unstructured short sentences or emphatic text as title nodes.
[0055] In this embodiment, the hierarchical correction results at least distinguish between chapter-level nodes, section-level nodes, article-level nodes, and item-level nodes. For institutional texts with multiple title systems, such as documents that simultaneously contain a first chapter, first section, first article, and items one, two, and three, the system maps them uniformly to the same hierarchical framework to ensure the stability of subsequent tree structure construction.
[0056] Simultaneously, the system identifies clause citations within the text. These citations include forms such as "this article," "this paragraph," "the preceding paragraph," "the foregoing provisions," "the previous article," "Article X," "Article X, paragraph Y," "Chapter X, Section Y," and "implemented in accordance with Article X of these Measures." For directly parsable citations, the system locates the target node based on the numbering mapping result; for citations that cannot be directly parsed, the system generates a candidate set of citation targets by combining the current node's path, the nearest explicit clause node, and numbering continuity information. Through this process, the system obtains a sequence of header blocks with hierarchical depth tags and a candidate set of clause citations.
[0057] Step 3: Construction of Hierarchical Semantic Tree and Clause Reference Graph After completing the heading hierarchy correction, the system constructs a hierarchical semantic tree based on the heading block sequence and body blocks. The root node of the hierarchical semantic tree corresponds to the complete document, the intermediate nodes correspond to structural nodes such as chapters, sections, and articles, and the leaf nodes correspond to the text block nodes that actually participate in knowledge extraction. Each leaf node is uniquely attached to a hierarchical path from the root node to its parent node, thus preserving the structural semantic position of that text block within the entire regulatory compliance document.
[0058] In this embodiment, the system employs a stack-based construction strategy to maintain the currently active parent node. When encountering a higher-level or same-level heading, it backtracks to the current active parent node and creates a new intermediate node. When encountering a text block, the text block content is accumulated in a buffer. When the buffer length reaches a preset segmentation threshold or a new structural node is encountered, a text block leaf node is generated and attached to the current active parent node. In this way, the semantics of the higher-level structure can be preserved while controlling the granularity of text blocks.
[0059] While constructing the hierarchical semantic tree, the system establishes a clause citation relationship graph based on the candidate set of citation targets obtained in step two. Edges in the clause citation relationship graph represent the dependencies between the current clause node and the cited clause node. These dependencies can be used for subsequent context assembly or stored in the final knowledge result as part of the normative basis and rule inheritance relationships. For multi-level nested citation scenarios, the system can recursively expand one or more layers of cited clause summaries to complete the constraint chains upon which the current clause depends.
[0060] Step 4: Recursive Structured Summary Generation and Summary Caching After obtaining the hierarchical semantic tree, the system performs bottom-up recursive structured summary generation on the hierarchical semantic tree. Leaf nodes use the original text as a semantic representation, while intermediate nodes generate structured semantic summaries by aggregating the semantic representations of their child nodes. The structured semantic summary is not an ordinary natural language summary, but a constraint-type summary that prioritizes retaining the normative subject, behavior, applicable objects, triggering conditions, exceptions, consequences, time range, geographical scope, and supporting information.
[0061] In this embodiment, the system uses a post-order traversal approach to generate intermediate node summaries. For a chapter-level or section-level node, the system inputs the summary results of all its child nodes into the summary generator, enabling it to output a structured description that represents the main regulatory matters, scope of application, and key restrictions under this node. This summary result is written to the summary cache after generation and mapped to the unique identifier of the corresponding node, allowing for repeated use in the processing of multiple target text blocks.
[0062] Furthermore, in this embodiment, in addition to retaining the aforementioned constraint fields, the structured semantic summary can also extract elements directly related to the rule knowledge organization and risk knowledge organization. For example, if a certain intermediate node set specifies the triggering conditions for reporting obligations, the threshold for applicable exceptions, or the prerequisites for the application of legal liability, then such information will be preferentially retained in the corresponding summary so that the complete rule constraint chain and risk judgment basis can be restored in the subsequent extraction stage. Through this mechanism, the system reduces the computational overhead of repeatedly constructing the global context and improves the reuse efficiency of key constraint semantics.
[0063] Step 5: Path-aware context assembly For any target text block, the system retrieves the summary of intermediate nodes along its ancestor path by moving up the hierarchical semantic tree, and introduces the summary of the referenced clauses related to the current text block by combining the clause reference relationship graph. The summary information is injected into the current text block in a path-aware manner, forming a path-aware context for the knowledge extractor.
[0064] In this embodiment, the path-aware context does not indiscriminately concatenate all ancestor node summaries and reference clause summaries, but rather selects them according to a preset assembly strategy. The system prioritizes retaining the document root node summary, the direct parent node summary of the target text block, the near ancestor node summary, the reference clause summary directly related to the current obligation, and high-weight constraint sentences within the current text block that carry conditional, exception, responsibility, and deadline semantics. For intermediate node summaries that are far at the same level and have low relevance to the current extraction target, the system performs compression or discarding based on the token budget to control the context length and maintain semantic density.
[0065] Specifically, the path-aware context comprises the following five parts. The first part is the global context, corresponding to the document root node summary, used to provide the overall theme and scope of the complete document. The second part is the chapter context, corresponding to summaries of several ancestor nodes of the target text block, used to provide semantic constraints on the chapter, section, and superior clauses of the current clause. The third part is the cited clause context, corresponding to the target clause summary cited by the current text block, used to supplement key restrictions in the supporting clauses, preceding paragraphs, or subordinate clauses. The fourth part is the current text block, used to carry the fine-grained semantic facts to be extracted. The fifth part is the extraction task constraint, used to limit the output fields and output structure of the knowledge extraction model, enabling the model to generate structured results around the fields of subject, behavior, object, condition, exception, responsibility, basis, and evidence, while prompting the model to retain triggering conditions, exception conditions, liability consequences, and evidence anchors related to rule composition and risk determination.
[0066] When the ancestor path length exceeds a preset depth limit, the system employs a joint root node and near ancestor preservation strategy. This strategy consistently preserves the root node summary and the summaries of the nearest several levels of ancestor nodes, and combines them with the summary of cited clauses to form a candidate context set. If the total length of the candidate contexts exceeds the token budget, pruning is performed according to the importance score results, prioritizing the preservation of the root node summary, the summary of the direct parent node, the summary of cited clauses, and high-weight constraint sentences in the current text block to form the final path-aware context input.
[0067] Step Six: Generation of Clause-Level Compliance Knowledge Graph and Organization of Rule Knowledge Based on the path-aware context obtained in step five, the system inputs it into a generative knowledge extraction model and outputs a clause-level compliance knowledge graph. The knowledge graph is centered on clause nodes and obligation behavior nodes, and generates related nodes around the obligation behavior nodes, such as regulatory subjects, behavior objects, applicable conditions, exceptions, liability consequences, legal clauses, and evidence fragments. Semantic constraint relationships between nodes are expressed through relational edges.
[0068] In this embodiment, the clause-level compliance knowledge graph adopts a clause-anchored organization method. Each extraction result is associated with at least one clause node to identify the normative position to which the knowledge belongs. At the same time, using the obligation behavior node as the core semantic unit, the regulatory subject and the behavior object are respectively connected to the obligation behavior node, and further connected according to the text semantics to the applicable condition node, exception situation node, liability consequence node, basis clause node, and evidence fragment node, thereby forming a graph structure with clause attribution, semantic constraints, and evidence traceability capabilities.
[0069] In this embodiment, the knowledge extraction model focuses on generating the following relationships: a regulatory body is subject to a certain obligation; the obligation acts on a certain object; the obligation is established under specific conditions; there are specific exceptions to the obligation; violating a certain obligation will trigger a certain liability consequence; a certain obligation is based on a certain clause node; the current clause references a certain target clause.
[0070] After generating the rule knowledge graph, the system further performs normalized mapping on the fields of subject, behavior, object, condition, exception, responsibility, basis, and evidence to form rule knowledge entries associated with clause nodes. Rule knowledge entries are used to convert rules, standards, and constraints in regulatory compliance texts into structured objects that are representable, storable, transmissible, and callable. In this embodiment, each rule knowledge entry includes at least one or more of the following fields: rule identifier, regulatory subject, behavioral requirement, behavioral object, modality type, triggering condition, exception condition, liability consequences, scope of application, basis clause, evidence anchor, source document identifier, and version identifier.
[0071] The modality type is used to characterize the nature of the obligation, and may include types such as "shall not," "may," "exempt from application," and "may only be implemented after approval." The triggering condition characterizes the preconditions upon which the rule's establishment depends. The exception condition characterizes the restriction that the rule is not applicable or that the method of application changes under specific circumstances. The evidence anchor point records the original text fragment, page number, block location, and clause path corresponding to the rule knowledge item. These rule knowledge items can be stored as JSON objects, graph node attribute sets, or relational database records, and can be accessed through a unified interface by the rule matching module, risk assessment module, policy Q&A module, and report generation module.
[0072] In a specific example, regarding the provision that personal information processors should conduct a personal information protection impact assessment and retain records of the processing before providing personal information overseas, the system can generate the following rule knowledge entry: the regulatory body is the personal information processor, the behavioral requirement is to conduct an assessment and retain records, the behavioral object is the processing activity of providing personal information overseas, the modal type is "shall," the triggering condition is the intention to provide personal information overseas, the basis is the corresponding clause node, and the evidence anchor is the original page number and text location. If there are other exemptions stipulated by the national cyberspace administration in the same chapter, the preceding requirement may not apply, and the system will further generate an exception condition field and establish a connection with the aforementioned rule knowledge entry.
[0073] Step 7: Consistency verification, risk knowledge organization, risk assessment, and evidence feedback. After obtaining the clause-level compliance knowledge graph and rule knowledge entries, the system performs consistency verification, subject restoration, conflict resolution, risk assessment, and evidence backlink on the output results to obtain the final structured compliance knowledge results and risk identification results.
[0074] The consistency verification includes field integrity verification, hierarchical consistency verification, subject consistency verification, standard basis consistency verification, and citation relationship consistency verification. Field integrity verification is used to determine whether the extracted results are missing key fields such as subject, behavior, object, or basis; hierarchical consistency verification is used to determine whether the current extracted results are consistent with the overall scope of application of its chapter; subject consistency verification is used to determine whether the subject of the current text block is consistent with the subject succession relationship in the superior clause or cited clause; standard basis consistency verification is used to determine whether the basis field in the extracted results matches the clause citation relationship diagram; citation relationship consistency verification is used to determine whether the citations such as this article, this clause, and the foregoing provisions are correctly mapped to the target clause.
[0075] When an extracted action statement lacks a clearly defined subject, the system reconstructs the subject by examining the hierarchical path of the current text block and the referenced clause nodes. For example, if a clause only states that the materials listed in the preceding paragraph should be submitted without repeating the subject of the declaration, the system first searches along the ancestor path for the most recently appearing explicit subject in the superior clauses, and then determines the target subject by combining the successive relationships in the cited clauses. If multiple candidate subjects are suitable, weighted disambiguation is performed by considering the current chapter theme, the object of the action, and the consequences of liability.
[0076] When multiple text blocks conflict semantically, the system selects the target result based on clause hierarchy priority, explicit limitation strength, version relationship, and the completeness of the original text evidence. For example, if a higher-level chapter provides a general obligation while a lower-level clause provides stricter specific conditions, the system prioritizes retaining the lower-level clause with stronger limitations; if the main text and appendices have different time application scopes, the system retains the result consistent with the current version identifier and effective date.
[0077] After completing the consistency verification, the system further organizes risk knowledge entries. These risk knowledge entries describe the risk sources, risk types, judgment criteria, risk levels, and processing mechanisms identified during the regulatory compliance text processing. In this embodiment, risk sources include at least one of the following: rule violation, missing conditions, misuse of exceptions, mismatch of criteria, information gaps, multi-source inconsistency, incorrect subject acceptance, and insufficient evidence. Risk types include at least one of the following: subject mismatch risk, omission of obligations risk, exceeding of applicable boundaries risk, liability triggering risk, mismatch of criteria risk, missing procedures risk, exceeding time limits risk, and insufficient evidence risk. Judgment criteria include at least one of the following: rule knowledge entries, clause-level compliance knowledge graph, original text evidence fragments, cited clause chains, and external comparison results. Processing mechanisms include at least one of the following: risk grading, rule hit feedback chain, prompt generation, manual review triggering, rectification suggestion generation, and log retention.
[0078] In this embodiment, the system inputs rule knowledge entries into the risk assessment module and performs risk matching based on preset rule templates or a rule engine. Rule templates can include single rule templates and composite rule templates. Single rule templates are used to determine whether a single clause obligation has been met, such as whether there are situations where declaration is required but not declared, retention is required but not retained, or assessment is required but not assessed. Composite rule templates are used to combine multiple clauses, multiple condition fields, or external factual objects for assessment; for example, when cross-border transmission, reaching the declaration threshold, and the absence of exemption conditions are simultaneously met, failure to fulfill the assessment obligation is determined as a high-level compliance risk.
[0079] In a specific implementation example, if the system extracts a rule knowledge entry stipulating that a processor should submit a security assessment when certain conditions are met, but no corresponding submission action is found in the same document or externally submitted materials, the risk assessment module generates a program missing risk; if the system extracts an exception clause that only applies to anonymized data, but the current factual object still contains personal information, the system generates an exception misuse risk; if a liability consequence is extracted but the corresponding supporting clause is missing, the system generates a supporting clause mismatch risk; if the subject in a rule knowledge entry is a data processor, but the current text block should belong to a personal information processor after path recovery, the system generates a subject mismatch risk.
[0080] For each risk identification result, the system generates a corresponding risk event object. A risk event object includes at least a risk identifier, risk type, risk level, hit rule identifier, related clause identifier, evidence anchor, triggering condition, processing suggestion, and review status. Risk levels can be divided into three or more levels: high, medium, and low. Processing suggestions may include actions such as supplementing materials, supplementing evidence, manual review, remapping the subject, and re-extracting condition fields. The review status records whether the risk has been manually confirmed, ignored, or corrected.
[0081] Finally, the system performs evidence backlinking for knowledge entries and risk event objects. Specifically, based on the evidence anchor points, the system reverse-locates each structured result back to its start and end positions, page numbers, text block numbers, hierarchical paths, and associated supporting clause nodes in the original text. In this way, the rule knowledge entries and risk event objects output by the system can be restored to their corresponding positions in the original text and the rule hit chain, thereby ensuring that the results are interpretable, traceable, and auditable.
[0082] In this embodiment, the final result includes at least the following three types of objects. The first type is a clause-level compliance knowledge graph result, used to convey the relationships between clauses, obligations, subjects, objects, conditions, exceptions, responsibilities, bases, and evidence. The second type is rule knowledge objects, used by the rule matching, policy Q&A, compliance retrieval, and report generation modules. The third type is risk event objects, used by the risk alert, intelligent review, manual review, and log archiving modules. These objects can be uniformly stored in a graph database, relational database, key-value database, or object storage, and provided for retrieval and access by downstream systems through interface services.
[0083] Through the above steps, this embodiment can restore the hierarchical semantic structure and reference dependencies of regulatory compliance texts under a limited context budget, and further organize the extracted structured results into rule knowledge and risk knowledge. This enables the system to not only output a clause-level knowledge graph with evidence backlink capability, but also to form risk identification results for compliance review, thereby improving the accuracy, interpretability and engineering implementation capability of regulatory compliance text processing.
[0084] Example 2 Based on the same inventive concept, this embodiment discloses a knowledge extraction system based on hierarchical semantic path awareness, including: The preprocessing module is used to acquire the regulatory compliance text to be processed, perform layout parsing and text block preprocessing, and obtain a structured block sequence arranged in reading order. The structured block sequence includes title candidate blocks and body text blocks. The hierarchy correction module is used to perform hierarchy correction on the candidate title blocks to obtain a sequence of title blocks with hierarchy depth tags, identify clause citation expressions in the body text, and generate a candidate set of citation targets. The structure building module is used to build a hierarchical semantic tree based on the corrected title block sequence and body block, wherein the root node of the hierarchical semantic tree corresponds to the complete document, the intermediate nodes correspond to the structure nodes, and the leaf nodes correspond to the text block nodes that participate in knowledge extraction. The summary generation module is used to perform bottom-up recursive structured summary generation based on the hierarchical semantic tree to obtain the structured semantic summary corresponding to each intermediate node. The context assembly module is used to generate a path-aware context for a target text block node by combining its hierarchical ancestor path and the referenced clause node. The path-aware context includes at least the global context, chapter context, referenced clause context, current text block, and extraction task constraints. The knowledge extraction module is used to input the path-aware context into the knowledge extraction model and output a clause-level compliance knowledge graph.
[0085] In one implementation, the system further includes a rule organization module, which is used to standardize and map the subject, behavior, object, condition, exception, responsibility, basis and evidence fields in the clause-level compliance knowledge graph to form rule knowledge entries and evidence objects.
[0086] In one implementation, the system further includes: The risk assessment module is used to call the rule knowledge entries, risk knowledge model and evidence objects, and output the risk identification results; The results management module is used to perform consistency verification, entity restoration, conflict resolution, evidence backlinking, review status updates, and log retention on the clause-level compliance knowledge graph and risk identification results.
[0087] Since the system in Embodiment 2 of this invention is the same system used in the hierarchical semantic path-aware knowledge extraction method in Embodiment 1, those skilled in the art can understand the specific structure and variations of this system based on the method described in Embodiment 1 of this invention, and therefore will not be repeated here. All systems used in the method of Embodiment 1 of this invention fall within the scope of protection of this invention.
[0088] Example 3 Based on the same inventive concept, the present invention also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements a hierarchical semantic path-aware knowledge extraction method according to Embodiment 1.
[0089] Since the computer-readable storage medium described in Embodiment 3 of this invention is the same computer-readable storage medium used in implementing the hierarchical semantic path-aware knowledge extraction method in Embodiment 1 of this invention, those skilled in the art can understand the specific structure and variations of this computer-readable storage medium based on the method described in Embodiment 1 of this invention, and therefore will not be repeated here. All computer-readable storage media used in the method of Embodiment 1 of this invention fall within the scope of protection of this invention.
[0090] Example 4 Based on the same inventive concept, the present invention also provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the method described in Embodiment 1.
[0091] Since the computer device described in Embodiment 4 of this invention is the same computer device used to implement the hierarchical semantic path-aware knowledge extraction method in Embodiment 1 of this invention, those skilled in the art can understand the specific structure and variations of this computer device based on the method described in Embodiment 1 of this invention, and therefore will not be repeated here. All computer devices used in the method of Embodiment 1 of this invention fall within the scope of protection of this invention.
[0092] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0093] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0094] Although preferred embodiments of the invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including both the preferred embodiments and all changes and modifications falling within the scope of the invention. Clearly, those skilled in the art can make various modifications and variations to the embodiments of the invention without departing from the spirit and scope of the invention. Thus, if these modifications and variations of the embodiments of the invention fall within the scope of the claims of the invention and their equivalents, the invention also intends to include these modifications and variations.
Claims
1. A knowledge extraction method based on hierarchical semantic path awareness, characterized in that, include: The regulatory compliance text to be processed is obtained, and the layout is parsed and the text blocks are preprocessed to obtain a structured block sequence arranged in reading order. The structured block sequence includes title candidate blocks and body text blocks. The title candidate blocks are hierarchically corrected to obtain a sequence of title blocks with hierarchical depth tags. Clause citation expressions in the body text are identified, and a set of citation target candidate sets is generated. A hierarchical semantic tree is constructed based on the corrected sequence of title blocks and body blocks, wherein the root node of the hierarchical semantic tree corresponds to the complete document, the intermediate nodes correspond to the structural nodes, and the leaf nodes correspond to the text block nodes that participate in knowledge extraction. Based on the hierarchical semantic tree, a bottom-up recursive structured summary generation is performed to obtain the structured semantic summary corresponding to each intermediate node; For a target text block node, a path-aware context is generated by combining its hierarchical ancestor path and the referenced clause node. The path-aware context includes at least the global context, chapter context, referenced clause context, current text block, and extraction task constraints. The path-aware context is input into the knowledge extraction model, and the output is a clause-level compliance knowledge graph.
2. The knowledge extraction method based on hierarchical semantic path awareness as described in claim 1, characterized in that, The candidate title blocks are subjected to hierarchical correction to obtain a sequence of title blocks with hierarchical depth tags, including: Candidate levels are obtained based on numbering pattern, font size, font bolding attribute, indentation distance, vertical adjacency relationship, and vertical spacing between blocks. The candidate levels are reviewed in conjunction with the semantic content of the subsequent body text of the candidate blocks to determine the final level of the target title block. When a candidate block does not meet the structural title conditions, it is downgraded to a body text block.
3. The knowledge extraction method based on hierarchical semantic path awareness as described in claim 1, characterized in that, Clause references include at least one of the following: this article, this paragraph, the preceding paragraph, the foregoing provisions, the previous article, Article X, Article X, paragraph Y, Chapter X, section Y, and any clause applied under a particular article. The system identifies clause references within the text and generates a candidate set of reference targets, including: For clause references that can be directly parsed, locate their target nodes based on the numbering mapping results; For clause references that cannot be directly parsed, a candidate set of reference targets is generated by combining the path of the current node, the nearest explicit clause node, and the numbering continuity information.
4. The knowledge extraction method based on hierarchical semantic path awareness as described in claim 1, characterized in that, A hierarchical semantic tree is constructed based on the corrected sequence of title blocks and body blocks. This includes using a stack-based construction strategy to generate the hierarchical semantic tree, which involves: when encountering a higher-level or same-level title, backtracking to the current active parent node and creating a new intermediate node; when encountering a body block, accumulating the body content into a buffer, and generating a text block leaf node and attaching it to the current active parent node when the buffer length reaches a preset segmentation threshold or when a new structural node is encountered.
5. The knowledge extraction method based on hierarchical semantic path awareness as described in claim 1, characterized in that, After constructing a hierarchical semantic tree based on the corrected sequence of heading blocks and body blocks, the method further includes: constructing a clause citation relationship graph based on the candidate set of citation targets.
6. The knowledge extraction method based on hierarchical semantic path awareness as described in claim 5, characterized in that, For the target text block node, a path-aware context is generated by combining its hierarchical ancestor path and the referenced clause node, including: Retrieve ancestor node summaries upwards along the hierarchical path of the target text block node; Based on the clause citation relationship diagram, a summary of the citation clauses related to the target text block node is introduced; According to the preset assembly strategy, at least a portion of the document root node summary, direct parent node summary, near ancestor node summary, cited clause summary, and high-weight constraint sentences in the current text block are retained. When the total length of candidate contexts exceeds the preset token budget, pruning is performed based on the importance score results.
7. The knowledge extraction method based on hierarchical semantic path awareness as described in claim 1, characterized in that, After inputting the path-aware context into the knowledge extraction model and outputting a clause-level compliance knowledge graph, the method further includes: The subjects, behaviors, objects, conditions, exceptions, responsibilities, bases, and evidence fields in the aforementioned clause-level compliance knowledge graph are standardized and mapped to form rule knowledge entries and evidence objects; Consistency verification, subject restoration, conflict resolution, rule matching, risk assessment, and evidence backlinking are performed on the rule knowledge entries and clause-level compliance knowledge graph to obtain the final knowledge graph result and risk identification result.
8. A knowledge extraction system based on hierarchical semantic path awareness, characterized in that, include: The preprocessing module is used to acquire the regulatory compliance text to be processed, perform layout parsing and text block preprocessing, and obtain a structured block sequence arranged in reading order. The structured block sequence includes title candidate blocks and body text blocks. The hierarchy correction module is used to perform hierarchy correction on the candidate title blocks to obtain a sequence of title blocks with hierarchy depth tags, identify clause citation expressions in the body text, and generate a candidate set of citation targets. The structure building module is used to build a hierarchical semantic tree based on the corrected title block sequence and body block, wherein the root node of the hierarchical semantic tree corresponds to the complete document, the intermediate nodes correspond to the structure nodes, and the leaf nodes correspond to the text block nodes that participate in knowledge extraction. The summary generation module is used to perform bottom-up recursive structured summary generation based on the hierarchical semantic tree to obtain the structured semantic summary corresponding to each intermediate node. The context assembly module is used to generate a path-aware context for a target text block node by combining its hierarchical ancestor path and the referenced clause node. The path-aware context includes at least the global context, chapter context, referenced clause context, current text block, and extraction task constraints. The knowledge extraction module is used to input the path-aware context into the knowledge extraction model and output a clause-level compliance knowledge graph.
9. A computer-readable storage medium, characterized in that, It stores a computer program that, when executed by a processor, implements a hierarchical semantic path-aware knowledge extraction method as described in any one of claims 1 to 7.
10. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements a knowledge extraction method based on hierarchical semantic path awareness as described in any one of claims 1 to 7.