A method and system for constructing and automatically reasoning multiple knowledge bases for compliance review

By constructing a multi-knowledge base system and utilizing natural language processing and knowledge graph technologies, we can achieve efficient matching and compliance determination of regulations and review texts, solve the semantic distance problem of compliance review under complex engineering constraints, and improve retrieval accuracy and robustness.

CN123115376APending Publication Date: 2026-11-17GUANGXI UNIV FOR NATITIES
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611231457.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-13
Publication Date
2026-11-17

AI Technical Summary

Technical Problem

Existing compliance review technologies struggle to effectively bridge the semantic distance between abstract regulatory expressions and concrete review records when faced with complex engineering constraints. They are also unable to effectively model multi-parameter joint constraints and complex conditional logic, resulting in low retrieval accuracy.

Method used

A multi-knowledge base system is constructed, which uses natural language processing and knowledge graph technology to perform structured parsing, semantic reconstruction, and multi-perspective querying of documents. Combined with a dual-channel reasoning mechanism of explicit verification channel and implicit fallback channel, it achieves efficient matching and compliance determination of regulations and review texts.

Benefits of technology

It significantly improves the accuracy of retrieval of compliant data and violations, enhances the model's robustness to ambiguous text and missing specifications, and has high industrial application value.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure FT_1
    Figure FT_1
  • Figure FT_2
    Figure FT_2
  • Figure FT_3
    Figure FT_3
Patent Text Reader

Abstract

This invention relates to the field of compliance review technology, and in particular to a method and system for constructing a multi-knowledge base and performing automated reasoning for compliance review. The method includes reading sequences of various types of business documents from a project, separating and extracting global background information and hierarchical verification content text sets; constructing a compliance knowledge graph including a hierarchical structure of regulations and standards, and establishing a mapping relationship between the hierarchical verification content text sets and nodes in the compliance knowledge graph; performing fact extraction and semantic reconstruction on the hierarchical verification content text sets to generate an abstract semantic summary; constructing multi-perspective query requests from the abstract semantic summary and filtering out target compliance evidence; and generating a review conclusion based on the target compliance evidence. This invention can shorten the semantic distance between the abstract expression of regulations and the concrete record of review, realize joint constraint judgment under complex conditional logic, and solve the problems of large models easily generating illusions and insufficient reasoning ability under complex engineering constraints.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of compliance review technology, and in particular to a method and system for constructing and automatically reasoning multiple knowledge bases for compliance review. Background Technology

[0002] Existing compliance reviews (such as building fire protection reviews, fire protection facility inspections, and project quality acceptance) typically require item-by-item verification of massive amounts of design documents and inspection reports, based on laws and regulations, industry standards, review guidelines, and historical experience. With increasing project complexity, traditional review methods relying on manual review of standards or simple keyword searches are no longer sufficient to meet the real-time verification needs of massive amounts of data.

[0003] In practice, regulatory texts use highly abstract constraints (e.g., "When the building height is greater than 50m, a smoke-proof stairwell should be used"); while review reports tend to be more concrete factual records (e.g., "Building #1 has a height of 55 meters above ground and is equipped with an enclosed stairwell"). This asymmetry in text structure and dimension leads to a significant "semantic gap" between regulations and review materials.

[0004] Existing single-vector retrieval solutions face serious challenges in compliance review scenarios: First, business facts containing specific values ​​or reverse non-compliance status are very likely to cause feature exclusion with the true compliance benchmark in the vector space, deviating from the correct regulations; second, the review text is full of evaluative nonsense such as "compliant with the requirements", "operating normally", and "complete", and these high-frequency interference words will greatly disrupt the feature extractor's representation distribution of the core entity vector, resulting in a precipitous drop in the accuracy of the retrieval basis.

[0005] Furthermore, existing methods lack the ability to model multi-parameter joint constraints and complex conditional logic. Actual compliance determination typically involves joint constraints on multiple parameters such as building height, building area, usage type, fire protection rating, and fire-fighting facility configuration, and includes conditional logic such as "when condition A and condition B are met, C should be executed; when condition A is met but condition B is not met, D should be executed." Existing vector retrieval methods based on single text similarity can only complete shallow semantic matching, cannot effectively model the topological relationships between multi-source compliance data, and are insufficient to support automated joint determination under the aforementioned complex conditional logic. Summary of the Invention

[0006] To address the aforementioned issues, this invention provides a method and system for constructing a multi-knowledge base and performing automatic reasoning for compliance review. This method can shorten the semantic distance between the abstract expression of regulations and the concrete record of review, and achieve joint constraint determination under complex conditional logic. It also solves the problems of large models easily generating illusions and having insufficient reasoning ability under complex engineering constraints.

[0007] To achieve the above objectives, the technical solution adopted by the present invention is as follows:

[0008] A method for constructing and automatically reasoning about multiple knowledge bases for compliance review includes the following steps:

[0009] S1. Read the sequence of business documents of various types in the project, perform structured parsing on the sequence of business documents through a natural language processing model, and separate and extract the global background information and hierarchical verification content text set of the project;

[0010] S2. Construct a compliance knowledge graph that includes a hierarchical structure of regulations and standards, and establish a mapping relationship between the hierarchical verification content text set and the nodes in the compliance knowledge graph;

[0011] S3. Perform fact extraction and semantic reconstruction on the hierarchical verification content text set. By removing numerical features and state polarity features from the text, generate an abstract semantic summary that matches the regulatory nodes in the compliance knowledge graph, so as to reduce the semantic distance between business text and regulatory text.

[0012] S4. Construct a multi-perspective query request for the abstract semantic summary, perform joint recall in the vector database, and re-rank the recall results through a comprehensive scoring model that includes semantic matching degree and rule features in order to filter out the target compliance basis;

[0013] S5. Based on the aforementioned target compliance criteria, a compliance determination is made on the hierarchical verification content text set through an explicit-implicit dual-channel reasoning mechanism, and a review conclusion is generated.

[0014] Furthermore, in step S1, by reading multi-layered nested Word or PDF documents to restore the document layout order, the table data in the document is extracted into a Markdown character stream with column delimiters, and boundary identifiers are inserted at the beginning and end to preserve the row and column topology of the cells.

[0015] By calling a natural language processing model and combining it with JSON formatting constraints, the global background information of the project in the business document sequence is extracted, and the hierarchical verification content text set parsed by major categories and subsections is extracted.

[0016] The JSON structure output by the natural language processing model is repaired by regular expression matching using a fault-tolerant parsing engine.

[0017] Furthermore, in step S2, during the offline phase, the normative document is parsed into knowledge graph nodes containing multi-level nodes to construct the compliance knowledge graph. Through semantic analysis and rule matching, explicit hierarchical relationships and implicit dependency edges between nodes are generated. During online review, the business title is mapped to the target node of the compliance knowledge graph through dynamic graph query.

[0018] Furthermore, during the offline phase, the compliance knowledge graph with directed attribute graphs is constructed by inputting national standards and specifications into a graph database, and the knowledge graph nodes include first-level heading nodes, second-level heading nodes, body clause nodes, table nodes, and formula nodes.

[0019] The explicit hierarchical relationship is established through HAS_CHAPTER, HAS_SECTION, and HAS_CLAUSE association edges. The implicit dependency relationship edges are constructed by batch analysis using a large language model to construct DEPENDENCY edges. The chart numbers associated in the clause text are scanned using regular expressions to generate HAS_TABLE and HAS_FORMULA edges across levels.

[0020] During online review, the dynamic path query adopts a graph variable-length path recursive query, filters and extends downwards to leaf nodes without child nodes, so as to initiate dynamic mapping of the extracted document titles to the compliance knowledge graph.

[0021] Furthermore, in step S3, a generalized summary of macro-level scenarios and a precise summary of specific constraint parameters are generated for each regulation in the compliance knowledge graph using a large language model. The generalized summary, the precise summary, and the corresponding original text of the clause are stored in a vector database.

[0022] For the hierarchical verification content text set, the features of the structured facts are cleaned by the noise word filter set and the key entity set to obtain binary facts. The binary facts are then de-numerized and reconstructed to generate an abstract semantic summary, so that the abstract semantic summary is aligned with the generalized summary and the precise summary to the same abstract semantic space.

[0023] Furthermore, in step S3, the steps of fact extraction and semantic reconstruction of the hierarchical verification content text set include:

[0024] S3.1 The hierarchical inspection content text set is segmented into independent short sentences, and the inspection points and corresponding measured values ​​or states in the short sentences are extracted;

[0025] S3.2 The preset blacklist and whitelist are used to clean and filter the extraction results to obtain the binary facts. The blacklist contains evaluative words and the whitelist contains entity-specific words.

[0026] S3.3 The check points and corresponding measured values ​​or states of the binary facts are de-numerized, and the large language model is called to generate the de-numerized abstract semantic summary describing the check topic.

[0027] Further, in step S4, the multi-perspective query request includes original long sentences, structured short sentences with chapter titles, de-numerized semantic summaries, enhanced compound sentences, and pure checkpoint extraction sentences; a joint recall is initiated in the vector database for sub-vector sets containing summaries of different granularities, so as to hash and merge the returned fragmented texts according to their unified clause IDs, and obtain the recall results. The sub-vector sets include generalized sets, precision sets, and original text sets.

[0028] The step of reordering the recall results includes:

[0029] S4.1 Calculate the deep semantic score of candidate terms using a cross-encoder;

[0030] S4.2 Calculate the keyword rule feature score of the candidate clauses. The keyword rule feature score is determined based on the hit frequency of the term set of the query text in the candidate clauses, the query perspective width, the data source cross depth, and the hit status of the section title.

[0031] S4.3 The deep semantic score and the keyword rule feature score are combined to calculate the comprehensive total score and then sorted.

[0032] Furthermore, the method for calculating the keyword rule feature score in step S4.2 is as follows:

[0033] Formula (1)

[0034] in, Score the key rule features; This refers to the effective frequency of the term set appearing in the candidate document content and headings at all levels. The number of different query perspectives that hit the candidate document represents the generalization ability of the corresponding feature width; The number of subsets hit represents the generalized set, the precision set, and the original text set, corresponding to the confidence depth of the knowledge source; is a Boolean indicator variable for whether the current section title matches the candidate document content, where 1 is true and 0 is false; 0.45 is the upper limit of the forced truncation of the rule features to prevent the semantic judgment of the neural network from being overwhelmed by the literal matching score; 0.05, 0.02, 0.03, and 0.05 are the weights of each feature item;

[0035] In step S4.3, the method for calculating the overall total score is as follows:

[0036] Formula (2)

[0037] in, The overall score; Assign a deep semantic score; As a query width reward, 0.03 is the linear scaling factor, representing the reward gain rate. For each additional valid query item, the query width reward increases by 0.03 points. 0.12 is the maximum possible value of the query width reward. Cross-reward for data sources, ;

[0038] The scores are sorted in reverse order based on the total score, and clauses from the same standard are deduplicated and collapsed using a sliding window. Finally, the highest scores in the Top-K categories, where the scores decrease in a certain order and are within the safety margin, are extracted and retained, and then passed on to the downstream inference stage.

[0039] Furthermore, in step S5, the compliance determination steps include:

[0040] S5.1 Explicit Verification Channel: If the hierarchical verification content text set mapping has a clear clause number, the corresponding original text is directly extracted from the compliance knowledge graph as explicit evidence for judgment;

[0041] S5.2 Implicit fallback channel: If the explicit verification channel fails or the confidence level of the judgment result is lower than the preset threshold, the historical error correction case library will be retrieved, and the overall background information of the project, the extracted facts, the selected target compliance basis and historical error correction cases will be integrated and assembled, and input into the large language model for reasoning and judgment.

[0042] A multi-knowledge base construction and automated reasoning system for compliance review, comprising:

[0043] The multi-source document parsing module is used to serially read multimodal project documents and extract structured macro background parameters and hierarchical verification content;

[0044] The graph construction and mapping module is used to establish a legal entity relationship network in the graph database and provide a dynamic mounting interface for business data to graph specification nodes.

[0045] The semantic bridging processing module is used to extract invalid numerical values ​​and polarity states from business texts in real time and generate a high-dimensional unified semantic summary.

[0046] A multi-path recall and ranking engine is used to execute concurrent queries from multiple perspectives and calculate a comprehensive recall score based on a mathematical weighting model.

[0047] The dual-channel reasoning and scheduling module includes an explicit query component that connects to the graph, a retrieval enhancement generation component that connects to the vector library, and a concurrency controller, used to output the final review report.

[0048] The beneficial effects of this invention are:

[0049] By leveraging de-numerical bidirectional semantic bridging, and filtering invalid verification items through a blacklist of irrelevant statements and a whitelist of entities based on professional terminology, this approach completely resolves the problem of vector retrieval failure caused by numerical and state contradictions between compliant data and violation facts. It abandons the simple black-box ranking method relying on neural networks, constructing a re-ranking mathematical model based on multi-rule feature scoring. This model comprehensively evaluates deep cross-semantics, hard-matching term frequency, query perspective breadth, and subset cross-depth, breaking the limitations of single-model scoring and significantly improving the hit rate of clause recall. Through a dual-channel inference architecture that integrates explicit graph extraction from the explicit verification channel, vector retrieval from the implicit fallback channel, and an enhanced error correction case library, it greatly enhances the model's robustness against ambiguous text or missing specifications while ensuring the accuracy of tracing core review points, demonstrating high industrial application value. Attached Figure Description

[0050] Figure 1 This is a flowchart of a preferred embodiment of the present invention.

[0051] Figure 2 This is a schematic diagram of a preferred embodiment of the present invention.

[0052] Figure 3 This is a schematic diagram of a compliance knowledge graph structure and a multi-dimensional edge relationship graph according to a preferred embodiment of the present invention.

[0053] Figure 4 This is a flowchart illustrating the construction and processing of document parsing and implicit relationship mining according to a preferred embodiment of the present invention.

[0054] Figure 5 This is a schematic diagram illustrating the principle of narrowing semantic distance according to a preferred embodiment of the present invention.

[0055] Figure 6 This is a flowchart illustrating the process of obtaining the target compliance basis in a preferred embodiment of the present invention.

[0056] Figure 7 This is a flowchart of the review conclusion of a preferred embodiment of the present invention. Detailed Implementation

[0057] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0058] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. The terminology used herein in the description of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. The term "and / or" as used herein includes any and all combinations of one or more of the associated listed items.

[0059] Please also see Figures 1 to 7 A preferred embodiment of the present invention provides a method for constructing and automatically reasoning about a multi-knowledge base for compliance review, comprising the following steps:

[0060] S1. Read multiple types of business document sequences from the project, perform structured parsing of the business document sequences using a natural language processing model, and separate and extract the project's global background information and hierarchical verification content text sets.

[0061] In step S1, the document layout order is restored by reading multi-layered nested Word or PDF documents. For table data in the document, it is extracted into a Markdown character stream with column delimiters, and boundary identifiers are inserted at the beginning and end to preserve the row and column topology of the cells. The large model can read the cells by preserving their row and column topology.

[0062] By employing a natural language processing model combined with JSON formatting constraints, global project background information is extracted from the business document sequence. Furthermore, a hierarchical verification content text set, parsed by major categories and subsections, is extracted. This global project background information includes macro-level joint constraint parameters such as building name, structure type, above-ground and underground height, number of floors, and fire resistance rating.

[0063] The JSON structure output by the natural language processing model is repaired by regular expression matching using a fault-tolerant parsing engine.

[0064] To prevent large models from generating anomalies when processing extremely long texts, a built-in fault-tolerant parsing engine based on json_repair is used. Regular expression matching is used to remove the thought chain tags generated by large models and to automatically repair truncated JSON structures, such as completing the right curly braces, to ensure that the original data is 100% extracted and stored in the database.

[0065] S2. Construct a compliance knowledge graph that includes a hierarchical structure of regulations and standards, and establish a mapping relationship between the hierarchical verification content text set and the nodes in the compliance knowledge graph.

[0066] In step S2, during the offline phase, the normative document is parsed into knowledge graph nodes containing multi-level nodes to construct a compliance knowledge graph. Through semantic analysis and rule matching, explicit hierarchical relationships and implicit dependency edges between nodes are generated. During online review, business titles are mapped to target nodes in the compliance knowledge graph through dynamic graph queries.

[0067] During the offline phase, a compliance knowledge graph with directed attribute graphs is constructed by inputting national standards and specifications into a graph database. The knowledge graph nodes include first-level heading nodes, second-level heading nodes, body clause nodes, table nodes, and formula nodes.

[0068] For explicit hierarchical relationships, HAS_CHAPTER, HAS_SECTION, and HAS_CLAUSE are established through associated edges. For implicit dependency relationships, DEPENDENCY edges are constructed through batch analysis using a large language model. HAS_TABLE and HAS_FORMULA edges are generated across levels by scanning the associated chart numbers in the clause text using regular expressions.

[0069] During online review, dynamic path queries employ graph variable-length path recursive queries, filtering and extending downwards to leaf nodes without child nodes, in order to dynamically map the extracted document titles to the compliance knowledge graph.

[0070] In this embodiment, as Figure 3 and Figure 4 As shown, in the offline stage, national standards and specifications are entered into a graph database. In this embodiment, Neo4j is preferred to construct a directed attribute graph. The graph nodes include first-level heading nodes, second-level heading nodes, body clause nodes, and table nodes. The table nodes not only include data, but also extract table names, table notes, judgment points of interest, and formula nodes.

[0071] To address the implicit cross-dependencies commonly found in specifications, this system employs a joint extraction mechanism combining rules and a large model. On one hand, it uses a large language model to analyze the logical dependencies between clauses in batches (constructing DEPENDENCY edges); on the other hand, it uses regular expressions to precisely scan the associated chart numbers in the clause text, generating HAS_TABLE and HAS_FORMULA edges across levels in the graph.

[0072] S3. Perform fact extraction and semantic reconstruction on the hierarchical verification content text set. By removing numerical features and state polarity features from the text, generate an abstract semantic summary that matches the regulatory nodes in the compliance knowledge graph, so as to reduce the semantic distance between business text and regulatory text.

[0073] like Figure 5 As shown, in step S3, a broad summary of the macro-scenario and a precise summary of the specific constraint parameters are generated for each regulation in the compliance knowledge graph using a large language model. The broad summary, precise summary, and the corresponding original text of the clause are then stored in the vector database. In this embodiment, knowledge at the graph end is compressed at multiple scales: not limited to storing the original text, the large language model is used to generate a broad summary of the macro-scenario and a precise summary of the specific constraint parameters for each regulation, which, along with the original text of the clause, are stored in the vector database.

[0074] For the hierarchical verification content text set, the features of structured facts are cleaned by filtering the noise word set and the key entity set to obtain binary facts. The binary facts are then de-numerized and reconstructed to generate an abstract semantic summary, so that the abstract semantic summary is aligned with the generalized summary and the precision summary to the same abstract semantic space.

[0075] In step S3, the steps of fact extraction and semantic reconstruction of the hierarchical verification content text set include:

[0076] S3.1 Divide the hierarchical inspection content text set into independent short sentences, and extract the inspection points and corresponding measured values ​​or states in the short sentences;

[0077] S3.2 The preset blacklist and whitelist clean and filter the extraction results to obtain binary facts. The blacklist contains evaluative words, and the whitelist contains entity-specific words.

[0078] S3.3 performs de-numerization processing on the checkpoints and corresponding measured values ​​or states of the binary facts, and calls the large language model to generate a de-numerization abstract semantic summary describing the check topic.

[0079] In this embodiment, fact extraction and multi-level cleaning filtering are performed as follows: The review report paragraphs are segmented into independent short sentences based on punctuation. "Points" and "Measured Values / Status" are extracted from these short sentences based on a large model. Subsequently, the system incorporates a deep cleaner based on hard rules.

[0080] Level 1: Background Stripping. If the extracted inspection points belong to the macro background of the entire building, such as "building height, total area, number of floors," and do not contain specific component terms such as "evacuation" or "anteroom," they are considered redundant context and filtered out.

[0081] Level Two: Nonsense Filtering. An evaluative blacklist is defined containing words such as "compliant," "satisfied," "compliant," "normal," and "complete." If the extracted test value only contains blacklisted words, and the text does not contain any Arabic numerals or match whitelisted words such as "Class A," "fireproof," "independent," "ring-shaped," or "non-flammable," it is directly judged as a meaningless case and discarded, preventing noise pollution of the subsequent search pool from the source.

[0082] De-numerical reconstruction bridging: For high-value binary facts after cleaning, a large model is invoked to forcibly mask their specific numerical values ​​and positive / negative violation states, generating a highly abstract semantic summary. For example, for the checkpoint "evacuation door" and the measured violation value "opening inwards," the generated semantic description is "the setting requirements regarding the opening direction of the evacuation door." This mechanism forcibly eliminates the feature polarity opposition caused by the violation action, causing the factual text to rapidly converge towards the true objective regulations in the vector space, effectively overcoming the cosine deviation in traditional similarity calculations.

[0083] S4. Construct multi-perspective query requests from the abstract semantic summary, perform joint recall in the vector database, and re-rank the recall results through a comprehensive scoring model that includes semantic matching degree and rule features in order to filter out the target compliance basis.

[0084] like Figure 6 As shown, in step S4, the multi-perspective query request includes the original long sentence, the structured short sentence with chapter title, the de-numerical semantic summary, the enhanced compound sentence, and the pure checkpoint extraction sentence; a joint recall is initiated on the sub-vector set containing summaries of different granularities in the vector database, so as to hash and merge the returned fragmented text according to the unified clause ID to which it belongs, and obtain the recall result. The sub-vector set includes the generalized set, the precision set, and the original text set.

[0085] In this embodiment, for a single extracted cleaned fact, a multi-perspective query set is dynamically constructed, including: original long sentences, structured short sentences with chapter titles ([title + point + value]), de-numerized semantic summaries, enhanced compound sentences ([title + point + original sentence]), and pure checkpoint extraction sentences.

[0086] The system initiates parallel queries to multiple sub-vector sets at the underlying level, and hashes and concatenates the returned fragmented text according to its "Uniform Clause ID (full_id)". To avoid interference from certain specific business scenarios, such as reducing the search weight of air-raid shelter or garage regulations for ordinary civil buildings, a priority reduction strategy is also introduced based on standard code during the initial screening of recalls.

[0087] To accurately select the optimal terms during the re-ranking stage, this embodiment constructs a multi-dimensional feature scoring model that integrates deep semantics and engineering hard matching.

[0088] The steps for reordering recall results include:

[0089] S4.1 Calculate the deep semantic score of candidate terms using a cross-encoder. For a merged candidate term document, the cross-encoder (such as BGE-reranker) first outputs a deep similarity semantic score.

[0090] S4.2 Calculate the keyword rule feature score of the candidate terms. The keyword rule feature score is determined based on the hit frequency of the term set of the query text in the candidate terms, the query perspective width, the data source cross depth, and the hit rate of the section title.

[0091] The method for calculating the keyword rule feature score in step S4.2 is as follows:

[0092] Formula (1)

[0093] in, Score the key rule features; This refers to the effective frequency of the term set appearing in the candidate document content and headings at all levels. The number of different query perspectives that hit the candidate document represents the generalization ability of the corresponding feature width; The number of subsets hit represents the generalized set, the precision set, and the original text set, corresponding to the confidence depth of the knowledge source; is a Boolean indicator variable indicating whether the current section title matches the candidate document content, where 1 is true and 0 is false; 0.45 is the upper limit of the forced truncation of the rule features to prevent the semantic judgment of the neural network from being overwhelmed by the literal matching score; 0.05, 0.02, 0.03, and 0.05 are the weights of each feature item.

[0094] S4.3 Integrate deep semantic scores and keyword rule feature scores to calculate a comprehensive total score and then sort them.

[0095] In step S4.3, the overall score is calculated as follows:

[0096] Formula (2)

[0097] in, The overall score; Assign a deep semantic score; As a query width reward, 0.03 is the linear scaling factor, representing the reward gain rate. For each additional valid query item, the query width reward increases by 0.03 points. 0.12 is the maximum possible value of the query width reward. Cross-reward for data sources, ;

[0098] The scores are sorted in reverse order based on the total score, and clauses from the same standard are deduplicated and collapsed using a sliding window. Finally, the highest scores in the Top-K criteria, which fall within the safety margin, are selected and passed on to the downstream inference stage.

[0099] S5. Based on the target compliance criteria, the compliance of the layered inspection content text set is determined through an explicit and implicit dual-channel reasoning mechanism, and an inspection conclusion is generated.

[0100] like Figure 7 As shown, in step S5, the compliance determination steps include:

[0101] S5.1 Explicit Verification Channel: If the hierarchical verification content text set mapping has a clear clause number, the corresponding original text is directly extracted from the compliance knowledge graph as explicit evidence for judgment;

[0102] S5.2 Implicit fallback channel: If the explicit verification channel fails or the confidence level of the judgment result is lower than the preset threshold, the historical error correction case library will be retrieved, and the overall background information of the project, the extracted facts, the selected target compliance basis and historical error correction cases will be integrated and assembled, and input into the large language model for reasoning and judgment.

[0103] In this embodiment, to address the risk of large model illusions under complex engineering constraints, a highly reliable dual-channel inference architecture is designed:

[0104] Phase 1: Graph Explicit Verification Channel. This phase examines whether the current verification point was mapped with a clear clause number dictionary in an earlier mapping, such as explicitly pointing to clause 7.3.1 of GB50016. If so, the system uses the graph database to natively extract the exact original text as explicit evidence. The project background, factual points, and explicit evidence are then assembled and input into the large language model. If the model returns a clear "PASS" or "FAIL" strong confidence conclusion, a structured result is directly generated, and the remaining reasoning for this node is terminated, ensuring 100% certainty in the verification of core clauses.

[0105] Phase Two: Vector Database (VectorDB) as a fallback channel. If explicit evidence is missing, or explicit reasoning leads to ambiguous conclusions, the system initiates fallback verification. This channel has a built-in error correction case library with a dual-core (SQLite+ChromaDB) architecture. The system first constructs a query based on the current facts and retrieves highly similar historical review and correction records from the case library, along with the corresponding error correction reasons and applicable conditions.

[0106] Subsequently, the system will assemble the extracted global background of all projects, the original short sentences, the denumerized binary facts, the Top-K candidate specifications that won the calculation of formula (2), and the retrieved historical cases into a huge RAG (Retrieval Enhancement Generation) prompt context.

[0107] The large model performs chain-matching inference within the aforementioned closed-loop context, including the subject object, threshold conditions, and exception rules. When the large model still cannot find supporting specifications (or the parsing is abnormal), the system activates code-level fault tolerance logic: if the original fact clearly contains positive business evaluation words such as "compliant" or "normal," then the defensive judgment is compliant (PASS); otherwise, an alert status marked with "requires manual review (ERROR / REVIEW)" is output.

[0108] In terms of engineering implementation, considering that a single review report contains hundreds or even thousands of independent sentence verification requirements, the system's underlying layer is built with a high-concurrency thread pool scheduling mechanism based on ThreadPoolExecutor. The sentence-level analysis tasks are distributed through a multi-threaded asynchronous non-blocking mode. Finally, a dictionary merger seamlessly restores the discrete judgment results—which precisely include the verification points, measured values, judgment status, the relevant clause number, the reason for the violation, and rectification suggestions according to the specifications—to the original chapter titles of the business, outputting a structured, overall intelligent report.

[0109] This embodiment also discloses a multi-knowledge base construction and automated reasoning system for compliance review, including:

[0110] The multi-source document parsing module is used to serially read multimodal project documents and extract structured macro background parameters and hierarchical verification content;

[0111] The graph construction and mapping module is used to establish a legal entity relationship network in the graph database and provide a dynamic mounting interface for business data to graph specification nodes.

[0112] The semantic bridging processing module is used to extract invalid numerical values ​​and polarity states from business texts in real time and generate a high-dimensional unified semantic summary.

[0113] A multi-path recall and ranking engine is used to execute concurrent queries from multiple perspectives and calculate a comprehensive recall score based on a mathematical weighting model.

[0114] The dual-channel reasoning and scheduling module includes an explicit query component that connects to the graph, a retrieval enhancement generation component that connects to the vector library, and a concurrency controller, used to output the final review report.

[0115] To verify the effectiveness of the technical solution of this invention and its stability in engineering applications, a professional test dataset was independently constructed in a real building fire protection review and engineering inspection business environment. This dataset includes 12,600 regulatory diagram analysis texts, 9,100 design image segments, 5,800 short sentences from real inspection reports, and 2,400 engineering error correction cases accumulated by experts over a long period of time.

[0116] The verification process employs retrieval recommendation systems and recognized evaluation metrics in the field of NLP (Natural Language Processing): Candidate Recall (Recall@5), which measures whether genuine compliance / violation provisions successfully break through to enter the top 5 candidate pool of search results; and Mean Reciprocal Rank (MRR), which measures the ranking of the first correct legal basis search result.

[0117] The embodiments were compared with traditional engineering retrieval schemes and ablation experimental groups that progressively stripped away the core modules of the system. Detailed performance evaluation data are shown in Table 1.

[0118]

[0119] Table 1: Performance Comparison of Different Methods and Ablation Experimental Groups in Compliance Review Tasks

[0120] As shown in Table 1, this embodiment achieved absolute best performance across all four core evaluation metrics. Particularly compared to the industry-standard "native single-path vector retrieval technology," the Recall@5 metric jumped by 9.5 percentage points, and the final system's review conclusion accuracy increased by a staggering 14.7 percentage points. This demonstrates the system's powerful ability to understand non-standard contexts, reaching an industrial-grade level capable of directly assisting or even replacing manual initial review.

[0121] The necessity of de-numerization reconstruction bridging: Comparing the data performance of "Ablation Group 1" and "Ablation Group 2," after removing the "bidirectional summary generation" module (intervened by the large model) and the "de-numerization reconstruction" module for business facts, the core checkpoint matching accuracy plummeted (to 84.0% and 82.6%, respectively). This result eloquently demonstrates that the "de-numerization intermediate abstraction layer" creatively proposed in this invention completely breaks down the natural semantic barrier between "the positive and negative polarities of actual engineering violations" and "highly abstract static regulations."

[0122] The irreplaceable nature of the multi-feature fusion mathematical scoring model: As can be seen from the data of "ablation group 3", when the system closes the multi-dimensional re-ranking scoring formula based on real engineering experience (i.e., completely abolish the hard matching, cross-depth and perspective breadth rewards defined by formula (1) and formula (2)), and relies only on the cosine or probability scoring of the deep neural network itself, even if the recall rate is maintained well, the output of the large model immediately drifts due to the lack of a highly binding term alignment mechanism, which directly reduces the accuracy of the final review conclusion to 79.2%. This fully demonstrates that the practice of internalizing the complex cross-source cross-validation engineering experience into a rigorous mathematical scoring formula (2) in this embodiment is extremely effective in restraining and preventing the uncontrollable illusion problem of simply relying on the large model, and significantly ensuring the rigor of the judicial review conclusion.

Claims

1. A method for constructing and automatically reasoning multiple knowledge bases for compliance review, characterized in that, Includes the following steps: S1. Read the sequence of business documents of various types in the project, perform structured parsing on the sequence of business documents through a natural language processing model, and separate and extract the global background information and hierarchical verification content text set of the project; S2. Construct a compliance knowledge graph that includes a hierarchical structure of regulations and standards, and establish a mapping relationship between the hierarchical verification content text set and the nodes in the compliance knowledge graph; S3. Perform fact extraction and semantic reconstruction on the hierarchical verification content text set. By removing numerical features and state polarity features from the text, generate an abstract semantic summary that matches the regulatory nodes in the compliance knowledge graph, so as to reduce the semantic distance between business text and regulatory text. S4. Construct a multi-perspective query request for the abstract semantic summary, perform joint recall in the vector database, and re-rank the recall results through a comprehensive scoring model that includes semantic matching degree and rule features in order to filter out the target compliance basis; S5. Based on the aforementioned target compliance criteria, a compliance determination is made on the hierarchical verification content text set through an explicit-implicit dual-channel reasoning mechanism, and a review conclusion is generated.

2. The method for constructing and automatically reasoning multiple knowledge bases for compliance review according to claim 1, characterized in that: In step S1, the document layout order is restored by reading multi-layered nested Word or PDF documents. For the table data in the document, it is extracted into a Markdown character stream with column delimiters, and boundary identifiers are inserted at the beginning and end to preserve the row and column topology of the cells. By calling a natural language processing model and combining it with JSON formatting constraints, the global background information of the project in the business document sequence is extracted, and the hierarchical verification content text set parsed by major categories and subsections is extracted. The JSON structure output by the natural language processing model is repaired by regular expression matching using a fault-tolerant parsing engine.

3. The method for constructing and automatically reasoning multiple knowledge bases for compliance review according to claim 1, characterized in that: In step S2, during the offline phase, the normative document is parsed into knowledge graph nodes containing multi-level nodes to construct the compliance knowledge graph. Through semantic analysis and rule matching, explicit hierarchical relationships and implicit dependency edges between nodes are generated. During online review, the business title is mapped to the target node of the compliance knowledge graph through dynamic graph queries.

4. The method for constructing and automatically reasoning multiple knowledge bases for compliance review according to claim 3, characterized in that: During the offline phase, the compliance knowledge graph with directed attribute graphs is constructed by inputting national standards and specifications into a graph database. The knowledge graph nodes include first-level heading nodes, second-level heading nodes, body clause nodes, table nodes, and formula nodes. The explicit hierarchical relationship is established through HAS_CHAPTER, HAS_SECTION, and HAS_CLAUSE association edges. The implicit dependency relationship edges are constructed by batch analysis using a large language model to construct DEPENDENCY edges. The chart numbers associated in the clause text are scanned using regular expressions to generate HAS_TABLE and HAS_FORMULA edges across levels. During online review, the dynamic path query adopts a graph variable-length path recursive query, filters and extends downwards to leaf nodes without child nodes, so as to initiate dynamic mapping of the extracted document titles to the compliance knowledge graph.

5. The method for constructing and automatically reasoning multiple knowledge bases for compliance review according to claim 1, characterized in that: In step S3, a generalized summary of macro-level scenarios and a precise summary of specific constraint parameters are generated for each regulation in the compliance knowledge graph using a large language model. The generalized summary, the precise summary, and the corresponding original text of the clause are stored in a vector database. For the hierarchical verification content text set, the features of the structured facts are cleaned by the noise word filter set and the key entity set to obtain binary facts. The binary facts are then de-numerized and reconstructed to generate an abstract semantic summary, so that the abstract semantic summary is aligned with the generalized summary and the precise summary to the same abstract semantic space.

6. The method for constructing and automatically reasoning multiple knowledge bases for compliance review according to claim 5, characterized in that: In step S3, the steps of fact extraction and semantic reconstruction of the hierarchical verification content text set include: S3.1 The hierarchical inspection content text set is segmented into independent short sentences, and the inspection points and corresponding measured values ​​or states in the short sentences are extracted; S3.2 The preset blacklist and whitelist are used to clean and filter the extraction results to obtain the binary facts. The blacklist contains evaluative words and the whitelist contains entity-specific words. S3.3 The verification points and corresponding measured values ​​or states of the binary facts are de-numerized, and the large language model is called to generate the de-numerized abstract semantic summary describing the verification topic.

7. The method for constructing and automatically reasoning multiple knowledge bases for compliance review according to claim 1, characterized in that: In step S4, the multi-perspective query request includes original long sentences, structured short sentences with chapter titles, de-numerized semantic summaries, enhanced compound sentences, and pure checkpoint extraction sentences; a joint recall is initiated in the vector database for sub-vector sets containing summaries of different granularities, so as to hash and merge the returned fragmented text according to its unified clause ID, and obtain the recall result. The sub-vector set includes a generalized set, a precision set, and a original text set. The step of reordering the recall results includes: S4.1 Calculate the deep semantic score of candidate terms using a cross-encoder; S4.2 Calculate the keyword rule feature score of the candidate clauses. The keyword rule feature score is determined based on the hit frequency of the term set of the query text in the candidate clauses, the query perspective width, the data source cross depth, and the hit status of the section title. S4.3 The deep semantic score and the keyword rule feature score are combined to calculate the comprehensive total score and then sorted.

8. The method for constructing and automatically reasoning multiple knowledge bases for compliance review according to claim 7, characterized in that: The method for calculating the keyword rule feature score in step S4.2 is as follows: Official (1) in, Score the key rule features; This refers to the effective frequency of the term set appearing in the candidate document content and headings at all levels. The number of different query perspectives that hit the candidate document represents the generalization ability of the corresponding feature width; The number of subsets hit represents the generalized set, the precision set, and the original text set, corresponding to the confidence depth of the knowledge source; is a Boolean indicator variable for whether the current section title matches the candidate document content, where 1 is true and 0 is false; 0.45 is the upper limit of the forced truncation of the rule features to prevent the semantic judgment of the neural network from being overwhelmed by the literal matching score; 0.05, 0.02, 0.03, and 0.05 are the weights of each feature item; In step S4.3, the method for calculating the overall score is as follows: Official (2) in, The overall score; Assign a deep semantic score; As a query width reward, 0.03 is the linear scaling factor, representing the reward gain rate. For each additional valid query item, the query width reward increases by 0.03 points. 0.12 is the maximum possible value of the query width reward. Cross-reward for data sources, ; The scores are sorted in reverse order based on the total score, and clauses from the same standard are deduplicated and collapsed using a sliding window. Finally, the highest scores in the Top-K categories, where the scores decrease in a certain order and are within the safety margin, are extracted and retained, and then passed on to the downstream inference stage.

9. The method for constructing and automatically reasoning multiple knowledge bases for compliance review according to claim 1, characterized in that: In step S5, the compliance determination steps include: S5.1 Explicit Verification Channel: If the hierarchical verification content text set mapping has a clear clause number, the corresponding original text is directly extracted from the compliance knowledge graph as explicit evidence for judgment; S5.2 Implicit fallback channel: If the explicit verification channel fails or the confidence level of the judgment result is lower than the preset threshold, the historical error correction case library will be retrieved, and the overall background information of the project, the extracted facts, the selected target compliance basis and historical error correction cases will be integrated and assembled, and input into the large language model for reasoning and judgment.

10. A multi-knowledge base construction and automatic reasoning system for compliance review, comprising executing the multi-knowledge base construction and automatic reasoning method for compliance review as described in any one of claims 1-9, characterized in that, include: The multi-source document parsing module is used to serially read multimodal project documents and extract structured macro background parameters and hierarchical verification content; The graph construction and mapping module is used to establish a legal entity relationship network in the graph database and provide a dynamic mounting interface for business data to graph specification nodes. The semantic bridging processing module is used to extract invalid numerical values ​​and polarity states from business texts in real time and generate a high-dimensional unified semantic summary. A multi-path recall and ranking engine is used to execute concurrent queries from multiple perspectives and calculate a comprehensive recall score based on a mathematical weighting model. The dual-channel reasoning and scheduling module includes an explicit query component that connects to the graph, a retrieval enhancement generation component that connects to the vector library, and a concurrency controller, used to output the final review report.