Automatic contract term risk identification method and system combining knowledge graph and NLP

By combining knowledge graph and NLP technologies, a legal knowledge graph is constructed to identify risks in contract terms. This solves the problems of insufficient semantic understanding and singular risk judgment in existing technologies, and realizes automated, accurate and interpretable identification of contract risks, thereby improving the efficiency and quality of contract review.

CN121503489APending Publication Date: 2026-02-10XIAO TING ENTERPRISE MANAGEMENT CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511609185.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-05
Publication Date
2026-02-10

AI Technical Summary

Technical Problem

Existing technologies for identifying risks in contract terms suffer from insufficient semantic understanding, lack of domain knowledge support, limited risk assessment dimensions, and poor interpretability, making it difficult for non-legal professionals to accurately understand and identify contract risks.

Method used

By combining knowledge graph and NLP technologies, a legal knowledge graph is constructed. Through deep semantic understanding and multi-dimensional analysis, risks in contract terms are identified, and interpretable risk reports are generated.

Benefits of technology

It enables automated, accurate, and interpretable identification of contract risks, improving the efficiency and quality of contract review. It can identify complex risks and provide clear explanations, and is suitable for the initial screening and standardized review of massive amounts of contracts.

✦ Generated by Eureka AI based on patent content.
Patent Text Reader

Abstract

The invention belongs to the technical field of informatization services, and particularly relates to a contract term risk automatic identification method and system combining a knowledge graph and an NLP. Comprising the following steps of contract text preprocessing and structured analysis, legal knowledge graph construction, deep fusion and matching of contract terms and a knowledge graph, risk identification and evaluation based on rule and graph reasoning, and generation of an interpretable risk report. According to the method, the defects of shallow semantic understanding, lack of professional knowledge support, single risk judgment dimension and the like in the prior art are overcome, automatic, precise and interpretable recognition of the contract risk is realized, the efficiency and quality of contract review are remarkably improved, and by introducing the legal knowledge graph, the risk of contract review is improved. A risk identification process is established on the basis of deep domain knowledge, simple text matching is not needed any more, deep legal meanings and industry backgrounds of clauses can be understood, and the identification precision is far higher than that of a traditional method.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application belongs to the technical field of information service, and particularly relates to a contract clause risk automatic identification method and system combining a knowledge graph and NLP. BACKGROUND

[0002] A contract is a core carrier of commercial activities, and the rigor and fairness of its clauses are directly related to the interests of the parties to the contract. In actual business, especially for non-law professionals or small and medium-sized enterprises, accurately understanding contract clauses and identifying potential risks are extremely challenging tasks. Traditional contract review relies on manual operation by legal experts, which has the problems of low efficiency, high cost, strong subjectivity, and easy omission due to fatigue or negligence.

[0003] With the development of artificial intelligence technology, some contract review tools based on rules or simple NLP models have emerged. These existing technical solutions usually have the following limitations: 1. Insufficient semantic understanding depth: methods based on keyword matching or simple templates cannot deeply understand the complex semantics and contextual logical relationships of contract clauses. For example, only the title "breach of contract liability" can be identified, but the specific content, such as breach of contract situation, liability assumption method, and exemption condition, lacks fine-grained analysis; 2. Lack of domain knowledge support: the model lacks the integration of legal domain professional knowledge, especially industry practices, regulations, and classic cases, making it difficult to determine whether a clause is "unusual" or "unfair" in a specific business scenario. For example, a payment cycle generally accepted in one industry may be considered a high-risk clause in another industry; 3. Single risk judgment dimension: existing solutions focus more on identifying explicit and standard risk points (such as the absence of a required clause), but lack effective identification means for complex risks such as "unequal rights and responsibilities" that require comparative analysis of the rights and obligations of both parties. They cannot quantitatively compare the size of the rights or the weight of the obligations of the parties to a matter; 4. Poor interpretability: the model often gives a simple risk level conclusion, but cannot clearly explain to the user "why the clause has risks" and "what the specific manifestations of the risks are", which makes it difficult for users to trust and adopt the machine's judgment results and difficult to make targeted modifications. SUMMARY

[0004] The purpose of the present application is to provide a contract clause risk automatic identification method and system combining a knowledge graph and NLP, which can deeply integrate domain knowledge, have deep semantic understanding ability, and perform multi-dimensional and interpretable risk analysis.

[0005] The technical solutions adopted by the present application are as follows: A method and system for automatically identifying contractual clause risks by combining knowledge graphs and NLP, comprising the following steps; Step S1, Contract Text Preprocessing and Structured Parsing: Natural Language Processing (NLP) technology is used to parse the input contract document, identify and extract legal entities and relationships between entities in the contract, and classify the contract clauses. Specifically, this includes: document parsing, paragraph and sentence segmentation, named entity recognition, and relationship extraction. Step S2, Legal Knowledge Graph Construction: Construct a legal knowledge graph that includes legal concepts, rights and obligations, standard clause patterns, and rights and responsibilities parity patterns. This graph is the core knowledge base for risk identification. Step S3, Deep integration and matching of contract terms and knowledge graph: The structured contract information parsed in step S1 is associated and matched with the legal knowledge graph in step S2 to form an instantiated subgraph for the current contract, which specifically includes: entity linking, clause type classification, and information fusion. Step S4, Risk Identification and Assessment Based on Rules and Graph Reasoning: Based on the instantiated subgraph, non-standard clauses are identified by comparing contract terms with conventional patterns in the knowledge graph, and clauses with unequal rights and responsibilities are identified by analyzing the balance of rights and obligations between the contracting parties through graph reasoning and quantitative calculation. Step S5: Generate an interpretable risk report: Based on the identification results of S4, generate an interpretable risk report that includes risk identification, risk description, risk basis, and modification suggestions.

[0006] Furthermore, the document parsing in step S1 specifically involves converting contract documents that support multiple formats (such as PDF, Word, TXT) into plain text. The paragraph and sentence division in step S1 specifically involves dividing the contract text into independent paragraphs and sentences based on punctuation marks and paragraph markers. The named entity recognition in step S1 specifically involves: using pre-trained deep learning models such as BERT or RoBERTa to identify and extract key legal entities in the contract, including but not limited to: Party A, Party B, contract amount, performance period, liability for breach of contract, dispute resolution method, ownership of intellectual property rights, etc. The relation extraction in step S1 specifically involves: based on dependency parsing and semantic role labeling, extracting the relationships between entities to form preliminary contract information triples (subject, predicate, object), such as (Party B, payment, contract deposit).

[0007] Furthermore, the definition method of the graph pattern layer of the legal knowledge graph in step S2 includes: (1) Define core concepts (ontology), such as contract parties, rights and obligations, clause types, legal concepts, and risk labels; (2) Define the relationship between concepts, such as inheritance, obligation, right, and component.

[0008] Furthermore, the knowledge sources and data filling methods for the legal knowledge graph in step S2 include: (1) Extract knowledge from a vast amount of laws and regulations, judicial precedents, standard contract templates, and industry model texts; (2) Define “standard clause patterns”: For specific types of contracts (such as procurement, leasing, and technology development), extract universally accepted clause patterns from standard templates and industry practices, and store them in a structured knowledge graph. For example, the graph will record “In software procurement contracts, warranty against intellectual property defects is a standard obligation of the supplier”; (3) Define the “rights and responsibilities equal model”: clearly mark the corresponding relationship between rights and obligations in the diagram. For example, “acceptance right” usually corresponds to “cooperation in acceptance”; “payment right” corresponds to “timely delivery of qualified goods”.

[0009] Furthermore, the specific methods for deep integration and matching of contract terms and knowledge graph in step S3 include: (1) Entity linking: Link the entities identified in the contract text to the corresponding concept nodes in the knowledge graph; (2) Clause type classification: Use the text classification model to determine the clause type of each contract paragraph or sentence (such as payment clause, confidentiality clause, and liability for breach of contract clause). (3) Information fusion: Fill the specific provisions in the contract (such as "Party B shall make payment within 90 days after receiving the invoice") into the corresponding pattern slots of the knowledge graph to form an instantiated "contract subgraph" for the current contract.

[0010] Furthermore, the identification of non-standard clauses in step S4 includes: (1) Compare the instantiation subgraph of the current contract with the "standard clause pattern" in the knowledge graph; (2) If a clause in the current contract is found to deviate from the usual pattern (for example, the usual payment cycle is 30 days, while the contract stipulates 90 days), then the clause shall be marked as “non-standard clause”; (3) Calculate the deviation and, in conjunction with the importance of the clause (predefined in the graph), give the risk level (e.g., low, medium, high).

[0011] Furthermore, the identification of unequal rights and responsibilities clauses in step S4 includes: (1) In the instantiated subgraph, locate the contracting parties with relative relationships (such as Party A and Party B). (2) Using graph queries and calculations, quantitatively analyze the balance of rights and obligations between the two parties on specific matters, including: ① Comparison of the number of rights and obligations: Statistics on the number of rights and obligations of Party A and Party B under specific terms; ② Liability Intensity Analysis: Utilize sentiment analysis or a keyword intensity dictionary to analyze the severity of the breach of contract. For example, compare the liquidated damages ratios and liability exemption conditions between the two parties; ③ Path reasoning: Check whether one party has a key right (such as the right to unilaterally terminate the contract), but the other party has no corresponding remedy or defense; ④ When the quantitative indicator exceeds the preset threshold, it is judged as a "mismatch between rights and responsibilities" clause and a risk level is given.

[0012] Furthermore, the specific content of the risk report in step S5 includes: (1) Risk identification: Clearly indicate the location of the risk clauses in the original contract (chapter, page number); (2) Risk description: Clearly explain the type of risk (whether it is unconventional or the unequal rights and responsibilities) and the specific manifestations of the risk (such as "the payment cycle is too long, exceeding the industry standard of 30 days" or "the upper limit of Party A's liability for breach of contract is too low, only 1% of the total contract amount, while Party B's is 20%, which is obviously unequal"). (3) Risk basis: Citing sources in the knowledge graph, such as legal provisions, industry practices or standard templates, to enhance the credibility of the conclusion; (4) Modification suggestions: Based on the regular pattern and peer pattern in the knowledge graph, provide specific modification suggestions in text.

[0013] An automatic risk identification system for contract terms that combines knowledge graphs and NLP, the system comprising the following modules: (1) Data access and preprocessing module: used to receive contract documents uploaded by users and complete preprocessing work such as format conversion, text cleaning, sentence segmentation and paragraphing; (2) Natural Language Processing (NLP) Engine Module: It integrates NLP models such as named entity recognition, relation extraction, text classification, and dependency parsing, and is responsible for deep analysis and information extraction of the preprocessed contract text; (3) Legal Knowledge Graph Management Module: Responsible for the storage, updating, and maintenance of the legal knowledge graph. This module includes graph building tools that can continuously learn from external data sources and enrich the graph content; (4) Risk Identification and Reasoning Engine Module: This is the core computing module of the system. It receives structured contract information output by the NLP engine and interacts with the knowledge graph. By executing built-in risk identification rules and graph algorithms, it completes the detection and evaluation of non-standard clauses and clauses with unequal rights and responsibilities; (5) Risk Report Generation and User Interaction Module: This module integrates and visualizes the results of the risk identification engine, generates a final risk analysis report, and provides it to users through a web interface, API, or other means. It supports interactive queries and feedback on risk points.

[0014] The system also includes a model training and optimization platform for collecting user feedback data and continuously iteratively optimizing the models in the NLP engine module and the legal knowledge graph.

[0015] The technical effects achieved by this invention are as follows: This invention overcomes the shortcomings of existing technologies, such as shallow semantic understanding, lack of professional knowledge support, and single risk assessment dimension. It achieves automated, accurate, and interpretable identification of contract risks, significantly improving the efficiency and quality of contract review. By introducing a legal knowledge graph, the risk identification process is built on a deep domain knowledge foundation, moving beyond simple text matching. It can understand the deeper legal meaning and industry background of the clauses, achieving a much higher identification accuracy than traditional methods. Furthermore, by utilizing graph computing and rule reasoning, it can discover implicit issues in the contract, such as imbalances in rights and responsibilities that can only be discovered through logical comparison, thus achieving a leap from "perception" to "cognition".

[0016] This invention automates the entire process from contract parsing to risk report generation, greatly freeing up manpower and reducing review costs and time. It is especially suitable for the initial screening and standardized review of massive amounts of contracts. Furthermore, the system design allows for continuous updates to the knowledge graph and optimization of the NLP model through feedback mechanisms and continuous learning, enabling it to adapt to updates in laws and regulations and the emergence of new contract models, thus possessing long-term viability. Detailed Implementation

[0017] To make the objectives and advantages of this invention clearer, the invention will be specifically described below with reference to embodiments. It should be understood that the following text is merely used to describe one or more specific embodiments of the invention and does not strictly limit the scope of protection specifically claimed by the invention.

[0018] Example 1: Taking the payment terms and breach of contract clauses in a software purchase contract as an example. Assuming a user uploads a "Software Purchase Contract", the system performs the following operations: 1. S1: Text Preprocessing and NLP Parsing (1) The system analyzes the contract and identifies key entities: the purchaser (Party A), the supplier (Party B), the total contract price of RMB 1 million, the software delivery within 90 days, and the payment of all payments.

[0019] (2) The relation is extracted to obtain a triplet: (Party A, pay, RMB 00 million), (Payment time, within 90 days after software delivery).

[0020] (3) The text classification model determined that the paragraph belonged to the payment terms.

[0021] 2. S2 and S3: Integration with Knowledge Graphs (1) The system links the entity “Party A” to the purchaser of the graph concept, “Party B” to the supplier, and “Payment Terms” to the corresponding node.

[0022] (2) The knowledge graph stores the common pattern of "software procurement - payment terms": (Payer: purchaser, payee: supplier, payment method: installment payment, common payment nodes: 30% after contract signing, 60% after acceptance, 10% after warranty period).

[0023] (3) The system fills the information "full payment within 90 days after delivery" of the current contract into the instantiated subgraph.

[0024] 3. S4: Risk Identification and Assessment (1) Identification of unconventional terms: The inference engine compared the instantiated subgraph (full payment) with the graph's regular pattern (installment payment) and found a significant deviation. The system determined that the payment term was an "unconventional term". Considering the importance of "payment method" in the contract (defined as "high" in the graph), the risk level of this term was assessed as "high".

[0025] (2) Identification of clauses with unequal rights and responsibilities: The system continues to analyze the liability clauses for breach of contract. It finds that the clauses stipulate: "If Party B delays delivery, the penalty for breach of contract shall be 0.1% of the total contract price per day; if Party A delays payment, the penalty for breach of contract shall be 0.01% of the total contract price per day."

[0026] ① The system locates the breach of contract liability nodes of Party A and Party B in the graph.

[0027] ②Calculation shows that the intensity of Party B's liability for breach of contract (0.1%) is 10 times that of Party A (0.01%).

[0028] ③ This ratio far exceeds the preset fairness threshold in the map (for example, a reasonable range is between 1:2 and 2:1).

[0029] ④ Therefore, the system determines that the breach of contract liability clause has the risk of "unequal rights and responsibilities", and the risk level is "high".

[0030] 4. S5: Generate risk report The system generates a report containing the following: (1) Risk Point 1 (located in the payment terms): ① Risk type: Unconventional clauses.

[0031] ② Risk Description: The agreed "full payment upon software delivery" method does not conform to the common "installment payment" practice in the software procurement industry, resulting in the client lacking effective payment leverage for subsequent maintenance and services, and thus facing a high financial risk.

[0032] ③ Basis: Referencing the "Software Procurement Contract Template (National Standard)" and industry practices.

[0033] ④ Recommendation: It is recommended to change the payment method to installment payments, for example, "30% upon signing the contract, 60% upon successful software installation, debugging and acceptance, and 10% upon expiration of the warranty period".

[0034] (2) Risk Point 2 (located in the breach of contract clause): ① Risk type: Clauses with unequal rights and responsibilities.

[0035] ② Risk Description: The penalty standards for delayed performance by both parties are severely unbalanced, with Party B's liability being far greater than Party A's, which may violate the principle of fairness.

[0036] ③ Basis: Article 585 of the Civil Code of the People's Republic of China regarding excessive liquidated damages.

[0037] ④ Recommendation: It is recommended to adjust the penalty standards for delayed performance of both parties to the same or similar level, for example, both to be set at 0.05% per day.

[0038] Example 2: System Deployment and Operation The system of this invention can be deployed on a cloud server and provided to users via a web service. Users upload contract documents through a browser, and the system automatically executes all steps S1 to S5 in the background, completing the analysis within seconds to minutes and presenting an interactive risk report to the user. The system also provides an API interface for easy integration with internal enterprise contract management systems (CLM), OA systems, etc.

[0039] The above description is merely a preferred embodiment of the present invention. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention. Structures, devices, and operating methods not specifically described or explained in this invention are implemented according to conventional methods in the art unless otherwise specified or limited.

Claims

1. A method for automatically identifying contractual clause risks by combining knowledge graphs and NLP, characterized in that: Includes the following steps; Step S1, Contract Text Preprocessing and Structured Parsing: Natural Language Processing (NLP) technology is used to parse the input contract document, identify and extract legal entities and relationships between entities in the contract, and classify the contract clauses. Specifically, this includes: document parsing, paragraph and sentence segmentation, named entity recognition, and relationship extraction. Step S2, Legal Knowledge Graph Construction: Construct a legal knowledge graph that includes legal concepts, rights and obligations, standard clause patterns, and rights and responsibilities parity patterns. This graph is the core knowledge base for risk identification. Step S3, Deep integration and matching of contract terms and knowledge graph: The structured contract information parsed in step S1 is associated and matched with the legal knowledge graph in step S2 to form an instantiated subgraph for the current contract, which specifically includes: entity linking, clause type classification, and information fusion. Step S4, Risk Identification and Assessment Based on Rules and Graph Reasoning: Based on the instantiated subgraph, non-standard clauses are identified by comparing contract terms with conventional patterns in the knowledge graph, and clauses with unequal rights and responsibilities are identified by analyzing the balance of rights and obligations between the contracting parties through graph reasoning and quantitative calculation. Step S5: Generate an interpretable risk report: Based on the identification results of S4, generate an interpretable risk report that includes risk identification, risk description, risk basis, and modification suggestions.

2. The method for automatic identification of contractual clause risks combining knowledge graphs and NLP according to claim 1, characterized in that: The document parsing in step S1 specifically involves converting contract documents in multiple formats into plain text. The paragraph and sentence division in step S1 specifically involves dividing the contract text into independent paragraphs and sentences based on punctuation marks and paragraph markers. The named entity recognition in step S1 specifically involves: using a pre-trained BERT deep learning model to identify and extract key legal entities in the contract, including but not limited to: Party A, Party B, contract amount, performance period, liability for breach of contract, dispute resolution method, ownership of intellectual property rights, etc. The relation extraction in step S1 specifically involves: extracting the relationships between entities based on dependency parsing and semantic role labeling to form preliminary contract information triples.

3. The method for automatic identification of contractual clause risks combining knowledge graphs and NLP according to claim 1, characterized in that: The definition method of the graph pattern layer of the legal knowledge graph in step S2 includes: (1) Define the core concepts (ontology); (2) Define the relationship between concepts.

4. The method for automatic identification of contractual clause risks combining knowledge graphs and NLP as described in claim 1, characterized in that: The knowledge sources and data filling methods for the legal knowledge graph in step S2 include: (1) Extract knowledge from a vast amount of laws and regulations, judicial precedents, standard contract templates, and industry model texts; (2) Define "standard clause patterns": For specific types of contracts (such as procurement, leasing, and technology development), extract universally accepted clause patterns from standard templates and industry practices, and store them in a structured knowledge graph; (3) Define the “rights and responsibilities equal model”: clearly mark the corresponding relationship of rights and obligations in the graph.

5. The method for automatic identification of contractual clause risks combining knowledge graphs and NLP according to claim 1, characterized in that: The specific methods for deep integration and matching of contract terms and knowledge graph in step S3 include: (1) Entity linking: Link the entities identified in the contract text to the corresponding concept nodes in the knowledge graph; (2) Clause type classification: Using a text classification model, determine the clause type of each contract paragraph or sentence; (3) Information fusion: Fill the specific provisions in the contract into the corresponding pattern slots of the knowledge graph to form an instantiated "contract subgraph" for the current contract.

6. The method for automatic identification of contractual clause risks combining knowledge graphs and NLP according to claim 1, characterized in that: The identification of non-standard clauses in step S4 includes: (1) Compare the instantiation subgraph of the current contract with the "regular clause pattern" in the knowledge graph; (2) If a clause in the current contract is found to deviate from the standard pattern, the clause shall be marked as an "unconventional clause"; (3) Calculate the deviation and, in conjunction with the importance of the clause, give the risk level.

7. The method for automatic identification of contractual clause risks combining knowledge graphs and NLP according to claim 1, characterized in that: The identification of unequal rights and responsibilities clauses in step S4 includes: (1) In the instantiated subgraph, locate the contract subjects with relative relationships; (2) Using graph queries and calculations, quantitatively analyze the balance of rights and obligations between the two parties on specific matters, including: ① Comparison of the number of rights and obligations: Statistics on the number of rights and obligations of Party A and Party B under specific terms; ② Intensity of Liability Analysis: Analyze the severity of breach of contract liability using sentiment analysis or keyword intensity dictionary; ③ Path reasoning: Examine whether one party enjoys a key right, but the other party has no corresponding remedy or defense; ④ When the quantitative indicator exceeds the preset threshold, it is judged as a "mismatch between rights and responsibilities" clause and a risk level is given.

8. The method for automatic identification of contractual clause risks combining knowledge graphs and NLP according to claim 1, characterized in that: The specific content of the risk report in step S5 includes: (1) Risk identification: Clearly indicate the location of the risk clauses in the original contract text; (2) Risk Description: Clearly explain the type of risk and its specific manifestations; (3) Risk basis: Citing sources in the knowledge graph, such as legal provisions, industry practices or standard templates, to enhance the credibility of the conclusion; (4) Modification suggestions: Based on the regular pattern and peer pattern in the knowledge graph, provide specific modification suggestions in text.

9. An automatic risk identification system for contract terms combining knowledge graphs and NLP, characterized in that: The system includes the following modules: (1) Data access and preprocessing module: used to receive contract documents uploaded by users and complete preprocessing work such as format conversion, text cleaning, sentence segmentation and paragraphing; (2) Natural Language Processing (NLP) Engine Module: It integrates NLP models such as named entity recognition, relation extraction, text classification, and dependency parsing, and is responsible for deep analysis and information extraction of the preprocessed contract text; (3) Legal knowledge graph management module: responsible for the storage, updating and maintenance of legal knowledge graph. This module includes graph building tools, which can continuously learn from external data sources and enrich the graph content; (4) Risk identification and reasoning engine module: This is the core computing module of the system. It receives the structured contract information output by the NLP engine and interacts with the knowledge graph. By executing the built-in risk identification rules and graph algorithms, it completes the detection and evaluation of non-standard clauses and clauses with unequal rights and responsibilities. (5) Risk Report Generation and User Interaction Module: This module integrates and visualizes the results of the risk identification engine, generates a final risk analysis report, and provides it to users through a web interface, API, or other means. It supports interactive queries and feedback on risk points.

10. The automatic contract clause risk identification system combining knowledge graph and NLP according to claim 9, characterized in that: The system also includes a model training and optimization platform for collecting user feedback data and continuously iteratively optimizing the models in the NLP engine module and the legal knowledge graph.