Risk review method and system for contract terms
By quantifying the syntactic structure and topic distribution characteristics of contract clauses, potential risks in the contract are identified, which solves the problem of subjective ambiguity in risk determination in existing technologies and achieves more efficient and accurate risk management.
Patent Information
- Application Number
- CN202511186822.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-25
- Publication Date
- 2025-09-23
- Estimated Expiration
- 2045-08-25
AI Technical Summary
Existing technologies have difficulty accurately identifying and quantifying potential risks in contract terms, especially in the case of complex semantic structures and dense professional terms, which leads to subjective or vague risk judgments and makes it difficult to support efficient and accurate risk management.
By deconstructing the sentences of the contract terms, we generate characteristic details such as syntactic tree depth, reference distance, logical nesting level, and terminology density. Combined with word co-occurrence frequency and topic clustering, we can quantify the contract comprehensibility risk and identify omission and ambiguity risks.
It achieves accurate risk identification of contract terms, reduces missed judgments and misjudgments, improves the accuracy and objectivity of contract risk assessment, and reduces the probability of disputes caused by ambiguity and omissions.
Smart Images

Figure CN120688485A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of natural language processing technology, and in particular to a method and system for risk review of contract terms. Background Art
[0002] The risk review method for contract terms uses natural language processing technology to analyze the syntactic structure, reference relationship, logical nesting complexity and topic distribution characteristics of the contract terms, and quantitatively evaluate and identify potential risks such as missing content and semantic ambiguity in the contract, so that enterprises or individuals can quickly and accurately discover hidden risks in the contract.
[0003] Existing technologies can easily obscure the interplay between core risk indicators, failing to capture the individual differences between individual clauses or specific risk clauses. This makes it difficult to clearly distinguish the importance of clauses, potentially leading to the neglect of high-risk clauses or the averaging of risks. This is especially true when contract clauses have complex semantic structures, dense terminology, or complex referential relationships. This can make overall risk assessments subjective or ambiguous, making it difficult to ensure efficient and accurate risk management decisions. Therefore, improvements are needed. Summary of the Invention
[0004] The purpose of the present invention is to solve the shortcomings of the prior art and to propose a risk review method and system for contract terms.
[0005] To achieve the above objectives, the present invention adopts the following technical solution: a method for risk review of contract terms, comprising the following steps: Obtain the contract text to be reviewed, deconstruct the sentences of each contract clause, and obtain the clause parsing feature set; Based on the clause parsing feature set, a preset weight is assigned to the syntactic tree depth, referential distance, logical nesting level, and terminology density of each recorded clause to generate a single clause parsing complexity score for each clause. The single clause parsing complexity scores of all clauses in the contract are aggregated and calculated to obtain a contract comprehensibility risk index. Based on the contract text to be reviewed and a library of similar standard contract texts, the co-occurrence frequencies of terms in the contract text to be reviewed and the library of similar standard contract texts are calculated and clustered into topics, generating an actual topic distribution and a standard topic distribution for the contract to be reviewed. The weight of each topic in the actual topic distribution of the contract to be reviewed is compared one by one with the corresponding item in the standard topic distribution to obtain a list of contract topic weight deviations; The contract subject weight deviation list is screened and the subjects whose weight deviation exceeds the preset threshold are determined as missing risks. The contract comprehensibility risk index that exceeds the threshold is determined as ambiguous risk, and the risk results are generated.
[0006] Preferably, the steps for obtaining the clause parsing feature set are: Obtain the contract text to be reviewed, break it down clause by clause, split each contract clause into independent sentences, label each syntactic component, and analyze the direct dependencies between each syntactic component. Determine the syntactic tree structure of each sentence based on the dependency links, count the longest path nodes from the root node to the leaf node of the syntactic tree, and generate a syntactic tree depth value. Based on the syntactic tree depth value, the lexical sequence in each contract clause is traversed sentence by sentence, all pronouns and referents in the sentence are identified, the pronouns are associated with the corresponding referents, and the actual lexical distance between each pair of associated pairs is recorded. The number of words between the pairs is used as the lexical distance value, and a set of lexical distance values of all pronouns and referents in the clause is formed; Based on the lexical distance value set, the conditional logic operators and time logic operators are identified for each contract clause, and the identified conditional logic operators and time logic operators are expanded one by one and recursively performed in sequence. The number of times each operator is nested layer by layer in the sentence is counted, and the frequency of occurrence of each professional term in the preset list in the contract clause sentence is counted at the same time. The syntactic tree depth value, lexical distance value set, operator nesting number, and professional term frequency are used as clause feature dimensions to generate a clause parsing feature set.
[0007] Preferably, the steps for obtaining the single clause parsing complexity score are: Based on the clause parsing feature set, extract the syntax tree depth value, reference distance value, logical nesting level value, and professional term density value of each contract clause, perform maximum and minimum value differential scaling processing on each clause, and map the original values to the closed interval 0 to 1 in turn, and record them as the standardized syntax tree depth value, standardized reference distance value, standardized logical nesting level value, and standardized professional term density value; The single clause parsing complexity value of each contract clause is calculated based on the standardized syntax tree depth value, the standardized reference distance value, the standardized logical nesting layer value and the standardized professional term density value.
[0008] Preferably, the steps for obtaining the contract comprehensibility risk index are: The contract comprehensibility risk index is calculated based on the single clause parsing complexity values corresponding to all clauses.
[0009] Preferably, the steps for obtaining the actual topic distribution of the pending contract and the standard topic distribution are: The contract text to be reviewed and the standard contract text library are divided into paragraphs, and each paragraph is segmented word by word. The pre-trained semantic model is used to convert each word unit into a word vector. The word vectors of all words in each paragraph are then weighted averaged to generate a paragraph vector. At the same time, fixed topic phrases are set according to business type, and the corresponding topic center vector is generated by averaging the word vectors of each group of keywords, resulting in a set of paragraph vectors and a set of topic center vectors. Calculating the semantic weight value of each topic in the contract to be reviewed based on the paragraph vector set and the topic center vector set; Based on the semantic weight value of each topic, the semantic weight value calculation is completed for the pending contract and the standard contract text library respectively, and the corresponding weight composition vector is output in ascending order of the topic number to construct the actual topic distribution and standard topic distribution of the pending contract respectively.
[0010] Preferably, the steps for obtaining the contract subject weight deviation list are: Based on the actual subject distribution of the pending contracts and the standard subject distribution, the weight values corresponding to the same subject in the subject distribution are compared one by one, and the absolute value of the difference between the weight value of each subject in the actual subject distribution of the pending contracts and the weight value in the standard subject distribution is calculated. The absolute value of the difference of each subject is arranged in descending order to form a list of contract subject weight deviations.
[0011] Preferably, the steps for obtaining the risk results are: Based on the contract subject weight deviation list, a preset threshold is set, and each subject in the contract subject weight deviation list is traversed. If the absolute value of the weight difference corresponding to a certain subject is greater than the preset threshold, the subject is marked as a missing risk subject, and all marked missing risk subjects and the absolute values of the weight differences are extracted to form a missing risk subject list.
[0012] Preferably, the step of obtaining the risk result also includes: setting an ambiguity risk threshold based on the contract comprehensibility risk index, judging the numerical relationship between the contract comprehensibility risk index and the ambiguity risk threshold, if the value of the contract comprehensibility risk index is greater than the ambiguity risk threshold, it is determined that there is an ambiguity risk, and combined with the missing risk topic list to form a risk result.
[0013] The present invention also provides a risk review system, comprising: The contract parsing module obtains the contract text to be reviewed, deconstructs the sentences of each contract clause, and obtains the clause parsing feature set; The complexity assessment module, based on the clause parsing feature set, assigns preset weights to the syntactic tree depth, referential distance, logical nesting level, and terminology density of each recorded clause, generates a single clause parsing complexity score for each clause, and aggregates and calculates the single clause parsing complexity scores for all clauses in the contract to obtain a contract comprehensibility risk index. The topic deviation analysis module calculates the co-occurrence frequency of words in the contract text to be reviewed and the standard contract text library of the same type, clusters them into topics, generates the actual topic distribution of the contract to be reviewed and the standard topic distribution, and compares the weight of each topic in the actual topic distribution of the contract to be reviewed with the corresponding item in the standard topic distribution one by one to obtain a list of contract topic weight deviations; The risk identification module screens the topics whose contract subject weight deviation list exceeds a preset threshold and determines them as missing risks, and determines the contract comprehensibility risk index that exceeds the threshold as ambiguity risk, and generates risk results.
[0014] Compared with the prior art, the advantages and positive effects of the present invention are: The present invention breaks down contract clauses into basic semantic units sentence by sentence, extracts feature details such as syntactic tree depth, reference distance, logical nesting level, and terminology density, and uses a combination of four indicators in the clause parsing feature set to measure the complexity score of a single clause. It further uses the clause parsing complexity score aggregation to form a specific indicator that can quantify the overall comprehensibility risk of the contract. At the same time, it performs topic clustering and semantic weight distribution on the contracts to be reviewed and the standard contract text library to clarify the actual focus of each topic, and locates topics with large semantic deviations as missing risks for targeted marking. Compared with existing technologies that only identify content missing or semantic ambiguity, this method can more comprehensively capture potential risks hidden in subtle text structure and topic differences, reduce risk omissions and misjudgments during contract review, improve the accuracy and objectivity of contract risk identification, reduce the probability of disputes due to ambiguity and omissions during contract execution, and improve the overall credibility of contract clause risk assessment. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] Figure 1 Schematic diagram of the steps of the present invention. DETAILED DESCRIPTION
[0016] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0017] See also Figure 1The present invention provides a technical solution, a method for risk review of contract terms, comprising the following steps: Obtain the contract text to be reviewed, deconstruct the sentences of each contract clause, and obtain the clause parsing feature set; Based on the clause parsing feature set, preset weights are assigned to the syntactic tree depth, referential distance, logical nesting level, and terminology density of each recorded clause to generate a single clause parsing complexity score for each clause. The single clause parsing complexity scores of all clauses in the contract are then aggregated and calculated to obtain the contract comprehensibility risk index. Based on the contract text to be reviewed and a library of similar standard contract texts, the co-occurrence frequency of words in the contract text to be reviewed and the library of similar standard contract texts is calculated and clustered into topics. The actual topic distribution of the contract to be reviewed and the standard topic distribution are generated. The weight of each topic in the actual topic distribution of the contract to be reviewed is compared one by one with the corresponding item in the standard topic distribution to obtain a list of contract topic weight deviations; The contract subject weight deviation list is screened and the subjects whose weight deviation exceeds the preset threshold are determined as missing risks. The contract comprehensibility risk index that exceeds the threshold is determined as ambiguous risk, and the risk results are generated.
[0018] The steps to obtain the clause parsing feature set are: Obtain the contract text to be reviewed, break it down clause by clause, split each contract clause into independent sentences, label each syntactic component, and analyze the direct dependencies between each syntactic component. Determine the syntactic tree structure of each sentence based on the dependency links, count the longest path nodes from the root node to the leaf node of the syntactic tree, and generate a syntactic tree depth value. Based on the syntactic tree depth value, the lexical sequence in each contract clause is traversed sentence by sentence, all pronouns and referent entities in the sentence are identified, the pronouns are associated with the corresponding referent entities, and the actual lexical distance between each pair is recorded. The number of words between the pairs is used as the lexical distance value, forming a set of lexical distance values for all pronouns and referent entities in the clause. Based on the lexical distance value set, the conditional logic operators and temporal logic operators are identified for each contract clause. The identified conditional logic operators and temporal logic operators are expanded one by one and recursively performed in sequence. The number of times each operator is nested layer by layer in the sentence is counted. At the same time, the frequency of occurrence of each professional term in the preset list in the contract clause sentence is counted. The syntactic tree depth value, lexical distance value set, operator nesting number, and professional term frequency are used as clause feature dimensions to generate a clause parsing feature set.
[0019] Specifically, after obtaining the contract text to be reviewed, the system first divides the complete contract text into independent contract clauses based on the contract chapter and clause numbers, such as "Article 1", "1.1", "(I)" and other structured identifiers. Then, within each independent contract clause, the system calls a rule-based sentence segmenter, which uses full-width periods ".", question marks "?", and exclamation marks "!" as the main separators to split the clause text into independent sentences. At the same time, in order to avoid incorrect segmentation of numbered lists (such as "1.", "(a)") or amounts with decimal points that are common in legal texts, the segmenter has built-in ignore rules, and only performs segmentation operations when the above punctuation marks are not followed by numbers or letters. After completing the sentence-by-sentence segmentation, the system uses a Chinese dependency syntax analysis model based on a graph attention network to process each independent sentence. The model has been pre-trained on a corpus consisting of more than 100,000 legal documents and can accurately identify language structures specific to contract texts. During analysis, the model first segments the sentence. The model then constructs a weighted directed acyclic graph to represent the syntactic structure by calculating the probability of dependencies between words, where each word is a node and dependencies are directed edges. For example, in the sentence "Party B should pay the full amount within five working days", the model will identify "pay" as the core verb, i.e., the root node of the syntactic tree, and establish a relationship from "pay" to the subject "Party B", the adverbial "within five working days", and the object "amount". After the syntactic tree structure is determined, the system uses the root node as the starting point and the depth-first search algorithm to traverse all paths from the root node to the leaf nodes (that is, nodes without any out-degree) and calculate the number of nodes contained in each path. Finally, the path with the largest number of nodes is selected and its length is recorded. The number of nodes in this longest path is the syntactic tree depth of the sentence. This process will be applied to every sentence in the contract to generate a syntactic tree depth value.
[0020] After the generation step based on the syntactic tree depth value is completed, the system continues to traverse the word sequence in each contract clause on a sentence-by-sentence basis, identifying and associating the pronouns in the sentence and the entities they point to. The model adopts the Transformer encoder-decoder architecture and uses the BERT model pre-trained on massive Chinese legal texts as its underlying word vector representation layer. The model structure is specifically divided into input layer, span representation layer and scoring layer. During processing, the input of the model is a complete contract clause text. The model first segments the text through the input layer and uses BERT to generate context-related word vectors for each word. Subsequently, the span representation layer identifies all possible noun phrases and pronouns in the text as candidate pronouns, and generates a fixed-dimensional vector representation for each candidate span through the self-attention mechanism. Finally, in the scoring layer, the model calculates the association score between each pair of candidate pronouns (a pronoun and a noun phrase that appears before it). The score is calculated by a feedforward neural network whose input is The model is trained through supervised learning on a corpus of legal contracts containing tens of thousands of annotated referential relationships. The training goal is to optimize the cross-entropy loss function so that the model outputs the highest association score for the correct referential relationship pairs. For example, for the sentence "Party A must provide the necessary technical documents, and their contents should be true and valid," after inference, an association pairing is output, pairing the pronoun "its" with the entity it refers to, "technical document." After completing the association pairing of all pronouns and referential entities, the system records the actual lexical distance between them for each successful association. This distance is calculated by counting the number of words between the referential entity and the pronoun. In the above example, "technical document" and "its" are separated by two words, "," and "and," so the lexical distance value of this pairing is 2. This process is applied to all referential relationships identified within the clause, forming a set of lexical distance values for all pronouns and referential entities within the clause.
[0021] Based on the set of lexical distance values, the system then initiates a quantitative analysis of the logical structure and professional terminology of each contract clause. First, to identify and quantify logical complexity, the system uses a method based on regular expressions and keyword matching to scan each sentence for predefined conditional logic operators and time logic operators. The list of conditional logic operators includes patterns such as "if...then...", "if...then...", "unless...", and "provided that...", while the list of time logic operators includes time qualifiers such as "before", "after", "within...", and "since...". After identifying these operators, the system uses a stack-based data structure to calculate their nesting levels. Specifically, when the analyzer encounters the starting part of a logical operator (such as "if"), it pushes it onto the stack. If it encounters the starting part of another logical operator (such as "unless") before the scope of the current operator ends, it also pushes it onto the stack. The depth of the stack at this time represents the nesting level of the latter. For example, in the sentence "If Party B breaches the contract, unless force majeure occurs, Party A shall have the right to claim "In the contract, the nesting level of "unless" is 1. The system will record the maximum nesting level in each sentence. At the same time, the system will count the frequency of occurrence of professional terms in the contract clauses. This process relies on a preset list that is dynamically loaded according to the contract type. The list is jointly formulated by legal experts and business experts in the field. For example, for a "Software Procurement Contract", the list will contain about 150 professional terms, such as "source code escrow", "acceptance testing", "intellectual property", "force majeure", "confidentiality obligation", etc. The generation of this list is based on text analysis of more than 300 standard contracts of the same type. It is obtained by extracting high-frequency noun phrases and screening them through expert review. The system will traverse the content of the clauses word by word, accurately match them with the terms in the list and count their total number of occurrences. Finally, the syntactic tree depth value of each sentence obtained in the previous step, the lexical distance value set of each clause, the maximum number of operator nestings identified in each sentence, and the frequency of professional terms counted for each clause are used as the original feature dimensions to describe the complexity of the clause to generate a clause parsing feature set.
[0022] The steps to obtain the single clause parsing complexity score are: Based on the clause parsing feature set, the syntactic tree depth value, reference distance value, logical nesting level value, and professional term density value of each contract clause are extracted, and the maximum and minimum value differential scaling processing is performed respectively. The original values are mapped to the closed interval 0 to 1 in sequence and recorded as the standardized syntactic tree depth value, standardized reference distance value, standardized logical nesting level value, and standardized professional term density value; The single clause parsing complexity value of each contract clause is calculated based on the standardized syntax tree depth value, the standardized reference distance value, the standardized logical nesting level value, and the standardized professional term density value. The calculation formula is: ; in, Indicates the The single clause parsing complexity value of the contract clause, For the The standardized syntax tree depth value in the clause, For the The standardized distance value in the article refers to the distance between the For the The value of the normalized logical nesting level in the bar, For the Standardized professional term density values in the article, are the preset risk weights of the above four indicators, is the logistic-referencing synergistic risk coefficient, A constant approaching zero is used to avoid zero products under square roots.
[0023] Specifically, based on the clause parsing feature set, the system first extracts four original risk indicators for each contract clause from the set, namely the syntactic tree depth value, the reference distance value, the logical nesting layer value and the professional term density value. Among them, the syntactic tree depth value is directly taken from the feature set, the reference distance value is obtained by calculating the average of the lexical distances between all identified pronouns and the corresponding entities in the clause, the logical nesting layer value is the maximum logical nesting depth identified in all sentences in the clause, and the professional term density value is calculated by dividing the total frequency of professional terms identified in the clause by the total number of words in the clause. After extracting these four original values of all clauses, in order to eliminate the differences in dimensions and value ranges between different indicators, the system performs maximum and minimum value differential scaling on each type of indicator within the entire contract. The specific processing process is, taking the syntactic tree depth value as an example, the system first traverses all clauses in the current pending contract, and finds the maximum and minimum values of all syntactic tree depth values. Minimum value. For example, in a contract containing 50 clauses, the minimum value of the syntax tree depth is 2 and the maximum value is 18. Then, the system traverses each clause again and applies a linear transformation to its specific syntax tree depth value. The transformation is achieved by subtracting the global minimum value from the value of the current clause and then dividing the difference by the difference between the global maximum and minimum values. For example, for a clause with a syntax tree depth of 10, the normalization calculation process is (10-2) divided by (18-2), and the result is 8 divided by 16, that is, 0.5. The same process is applied to the three types of indicators: reference distance value, logical nesting level value, and professional term density value. For each type of indicator, its maximum and minimum values in the entire contract are found, and the corresponding indicator value of each clause is scaled in the same way. All original values are mapped to the closed interval 0 to 1 in turn, and recorded as the normalized syntax tree depth value, normalized reference distance value, normalized logical nesting level value, and normalized professional term density value, respectively.
[0024] formula: The benefit of the formula is that it introduces an interaction risk term This interaction term is specifically used to quantify the synergistic amplification effect between the complexity of logical structure and the ambiguity of referential relationship. In legal texts, when an ambiguous word appears in a sentence with multi-layer nested logic, the risk of causing ambiguity is much greater than the sum of the two independent risks. By calculating the geometric mean of the standardized logical nesting layer and the standardized referential distance, and using the logic-reference synergistic risk coefficient Scaling can capture this nonlinear compound risk, allowing for a more realistic assessment of the potential difficulty of understanding the clause; The steps for obtaining the default risk weights are as follows: this set of preset risk weights is determined through the Analytic Hierarchy Process (AHP) combined with expert scoring. First, an expert panel consisting of 15 legal experts and senior business managers with more than 10 years of contract review experience was assembled. The experts were asked to compare the four risk dimensions of syntactic tree depth (D), referential distance (L), logical nesting (I), and term density (T) to determine their relative importance to the risk of contract ambiguity. The experts were then asked to score them on a 1-9 scale. For example, if an expert believes that logical nesting is "slightly more important" than referential distance, the score is 3, and vice versa. After aggregating all the expert scores, a separate judgment matrix was constructed for each contract type (e.g., equipment procurement, software licensing, and engineering construction). The maximum eigenvalue of the matrix and its corresponding eigenvector were calculated. After a consistency test (a consistency ratio less than 0.1 is considered valid), the normalized eigenvectors were used as the risk weights for each indicator. For example, for a "Software License Agreement," the calculated weights might be: =0.15 (syntactic structure), =0.20 (referential relationship), =0.35 (logical nesting), =0.30 (professional term); The steps to obtain the risk coefficient are: The value of is calibrated by regression analysis of historical case data. First, a database containing 500 contract texts and judgments that have caused legal disputes due to ambiguous clauses in history is collected. For each contract, the value of all clauses is calculated using the previous steps of this method. 、 、 、 Value, and record whether the clauses that caused the dispute also have high logical nesting (e.g. >0.7) and long referential distances (e.g. >0.7), a logistic regression model was constructed with the dependent variable being “whether a dispute occurred” (yes = 1, no = 0), and the independent variables including the four standardized indicators and the interaction term. By training the model on the data set, the regression coefficient of the interaction term is obtained, which is used as This method ensures that The value of can reflect the actual probability of the collaborative risk leading to negative results in the real world. After analyzing a database containing software and technical service contracts, the The value is 0.65; The steps to obtain is: This parameter is a very small positive number set to prevent zero or negative numbers from being operated when calculating square roots. ; Calculation process: According to the standardized syntax tree depth value, the standardized reference distance value, the standardized logical nesting layer value and the standardized professional term density value, as well as the parameters determined by the above method, the first The single clause parsing complexity value of the contract clause , based on the third clause in a software license agreement (i.e. ) as an example, the four standardized values obtained from the previous step are: Normalized syntax tree depth value =0.50; Normalized referential distance value =0.75; Normalized logical nesting level value =0.80; Standardized terminology density values =0.60; Substitute the determined weights and coefficients: =0.15, =0.20, =0.35, =0.30; =0.65; = ; The calculation process is as follows: ; ; ; ; ; ; The results show that the single-clause parsing complexity value of Article 3 of the contract is 1.1885. This value is a comprehensive quantitative indicator. A value exceeding 1.0 usually means that the clause has a high degree of difficulty in understanding and ambiguity risk, because it not only scores high in various basic risk indicators (the weighted sum is 0.685), but also because its complex logical structure and ambiguous reference relationship generate synergistic risks (the synergistic risk item is 0.5035).
[0025] The steps to obtain the contract comprehensibility risk index are as follows: Based on the single clause parsing complexity values corresponding to all clauses, the contract comprehensibility risk index is calculated using the following formula:
[0026] in, represents the contract comprehensibility risk index, Indicates the total number of clauses in the contract, For the The single clause parsing complexity value of the clause, Represents the average value of the parsing complexity of all terms, It is the risk dispersion sensitivity coefficient, which is used to adjust the impact of the complexity distribution of clauses on the overall risk.
[0027] Specifically, the formula: The usefulness of the formula is that the first part (Right now ) reflects the average difficulty of understanding the contract, while the second part The risk factor quantifies the risk brought by the degree of dispersion of complexity among clauses. This design is based on an important insight: a contract with extremely uneven clause complexity (for example, most clauses are simple, but a few core clauses are extremely complex) is riskier than a contract with all clauses at a medium level of complexity, because reviewers are prone to fatigue when reviewing a large number of simple clauses, thereby ignoring a few "deeply buried" complex clauses. the adjusted standard deviation term; The steps to obtain the risk dispersion sensitivity coefficient are: The value of is set according to the importance of the contract and the risk tolerance strategy. It is not calculated, but determined by the risk management rules pre-established by the company's legal and risk control departments. The rules divide contracts into different levels according to factors such as their business impact, the amount involved, and the severity of legal consequences, and assign a For example, a company's risk management policy may stipulate that for contracts with a "high risk" rating (such as merger and acquisition agreements, large financing agreements), Set to 2.0 to amplify the impact of inconsistent clause complexity; for contracts with a "medium risk" level (such as important supplier contracts and technology licensing agreements), Set to 1.2; for "low risk" level contracts (such as standard confidentiality agreements, short-term lease contracts), Set to 0.5, when reviewing a new contract, the system first requires the user to select the risk level corresponding to the contract, and then retrieves the corresponding risk level from the rule library. The value is used for calculation. For the software license agreement in this example, it is classified as "medium risk", so The value is 1.2; The steps to obtain the total number of clauses in the contract are: This is automatically calculated by identifying and counting the clause numbers (such as "Article 1", "1.1", "(I)") in the first step of the method, when obtaining and deconstructing the contract text to be reviewed. This is a direct count value. For example, after initial processing, the system determines that the software license agreement currently under review contains 35 independent clauses, so ; and The steps to obtain Single clause parsing complexity value of the clause is the direct calculation output of the previous step. The system will generate a arrive ) is calculated to obtain a value, thus forming a set of complexity values, and the average of all clause parsing complexity values is calculated based on this set, which is calculated by adding all 35 terms The values are added and then divided by the total number of terms ,Right now
[0028] Calculation process: The single clause parsing complexity value corresponding to all clauses calculated based on the previous step , calculate the contract comprehensibility risk index In this example, the total number of contract terms is known to be , risk dispersion sensitivity coefficient , by calculating all 35 terms, we get all Average of the values is 0.75, and all terms are calculated Value and average The sum of the squares of the differences is
[0029] Substitute into the formula for calculation:
[0030] ; ; ; ; ; ; The results show that the contract understandability risk index of this software license agreement is 1.1522. This final index comprehensively reflects the average complexity of the contract (0.75) and the additional risk brought about by the imbalance in complexity between clauses (0.4022). This index will be compared with a preset ambiguity risk threshold (for example, 0.9). Since 1.1522 is greater than 0.9, the contract will be judged to have a high ambiguity risk and trigger a corresponding warning, prompting the reviewer to conduct a more detailed and in-depth manual review of the contract.
[0031] The steps to obtain the actual topic distribution and standard topic distribution of the contracts to be reviewed are as follows: The contract text to be reviewed and the standard contract text library are divided into paragraphs, and each paragraph is segmented word by word. The pre-trained semantic model is used to convert each word unit into a word vector. The word vectors of all words in each paragraph are then weighted averaged to generate a paragraph vector. At the same time, fixed topic phrases are set according to business type, and the corresponding topic center vector is generated by averaging the word vectors of each group of keywords, resulting in a set of paragraph vectors and a set of topic center vectors. Based on the paragraph vector set and the topic center vector set, the semantic weight value of each topic in the contract to be reviewed is calculated using the following formula: ; in, For the contract under review The semantic weight of a topic, For the The paragraph vector of each paragraph, For the The topic center vector of each topic, For the The length of the paragraph (measured in terms of tokens), is the total number of paragraphs, is the total number of topics, is the similarity sensitivity index, which is used to increase the weight significance of high matching paragraphs; Based on the semantic weight value of each topic, the semantic weight value calculation is completed for the pending contract and the standard contract text library respectively, and the corresponding weight composition vector is output in ascending order of the topic number to construct the actual topic distribution and standard topic distribution of the pending contract respectively.
[0032] Specifically, for the contract text to be reviewed and the standard contract text library, the system first divides the paragraphs according to the blank lines or clear chapter titles (such as "Article 1" and "Article 1") in the text, and divides the continuous text stream into independent paragraph units. For each segmented paragraph, the system calls a Jieba word segmentation tool that integrates a legal professional vocabulary to perform word segmentation. The professional vocabulary contains more than 50,000 legal and business terms, ensuring the accurate recognition of professional compound words such as "intellectual property" and "force majeure" in the word segmentation stage. After the word segmentation is completed, the system adds a pre-trained Law-BERT model on a large Chinese legal document corpus. The model can convert each word after word segmentation into a 768-dimensional context-related word vector. Subsequently, in order to extract a single vector representing the semantics of the entire paragraph from the word vector set, a weighted average method based on inverse document frequency (IDF) is adopted, in which the IDF value of each word is pre-calculated based on its frequency of occurrence in the background corpus containing 500,000 contracts of various types. The IDF value of common words is calculated in advance. The IDF value is low, while the IDF value of key professional words is high. The paragraph vector is calculated by multiplying the word vector of each word in the paragraph by its corresponding IDF weight, then adding all weighted vectors element by element, and finally dividing the resulting vector by the sum of the IDF weights of all words. At the same time, the system loads a list of fixed subject phrases pre-defined by legal experts based on the type of contract business currently being reviewed. For example, for "software development contract", the list includes eight topics: "intellectual property" (keywords: source code, ownership, copyright, patent), "payment terms" (keywords: fees, payment, invoice, acceptance, milestone), and "confidentiality obligations" (keywords: confidential information, disclosure, confidentiality period). The system uses the aforementioned Law-BERT model to obtain the word vectors of all keywords under each topic and, by averaging these vectors, generates a 768-dimensional topic center vector representing the core semantics of the topic. Finally, the vectorization processing of all paragraphs and all topics is completed, resulting in a set of paragraph vectors and a set of topic center vectors.
[0033] formula: The benefits of the formula are that, first, using the paragraph vector with the subject center vector The cosine similarity of the paragraph captures the relevance between the paragraph and the topic from the semantic level, surpassing the traditional keyword frequency statistics; secondly, the paragraph length is introduced As a weight, paragraphs with more detailed content contribute more to the topic weight, which is consistent with the intuition that long paragraphs usually carry more important information; third, the similarity sensitivity index is introduced By nonlinearly amplifying high similarities, we can effectively distinguish core-related paragraphs from peripheral-related paragraphs, so that the calculated topic weights can better highlight the core issues of the contract; The steps to obtain paragraph vectors of paragraphs is the direct output of the previous step. Specifically, it is generated by After tokenizing each paragraph, each token is converted into a 768-dimensional word vector using the Law-BERT model. These word vectors are then weighted averaged based on pre-calculated IDF values to create a single 768-dimensional vector. This vector represents the core meaning of the entire paragraph in the semantic space. For example, a paragraph discussing software delivery and acceptance would have a similar vector position to words like "delivery," "acceptance criteria," and "testing" in the vector space. The steps to obtain The topic center vector of the topic Also derived from the previous step, it is generated based on the preset subject phrases of a specific contract type. The system will search for the For example, the topic "intellectual property" is associated with four keywords: "source code", "ownership", "copyright", and "patent". The Law-BERT model is then called to obtain the 768-dimensional word vectors of each of these four keywords. Finally, by calculating the average of these four vectors, a 768-dimensional topic center vector is obtained that can represent the core semantics of the abstract topic "intellectual property". ; The steps to obtain The length of the paragraph It is obtained by directly counting the total number of tokens contained in the paragraph after the paragraph is segmented. For example, if a paragraph has 125 tokens after segmentation, then The value of is 125; The steps to obtain the total number of paragraphs are: It is determined when the entire contract text is segmented into paragraphs. The value is obtained by counting the total number of independent paragraph units generated after segmentation. For example, if a contract is segmented into 68 paragraphs, then The value of is 68; The steps to obtain the total number of topics are The system is determined by the fixed subject phrase list corresponding to the selected business type. This list is pre-defined by domain experts and contains all the core topics that a contract of this type should have. For example, when reviewing a "software development contract", the system loads a list of eight topics including "intellectual property", "payment terms", "confidentiality obligations", "liability for breach of contract", "technical support", "project management", "acceptance criteria", and "dispute resolution". The value of is 8; The steps to obtain the similarity sensitivity index are: is an empirical parameter whose purpose is to adjust the influence of cosine similarity on the final weight. Its value is determined by a grid search experiment on a benchmark dataset containing 500 contracts that have been manually annotated with the weights of various topics by legal experts. In the experiment, The value range is from 1.0 to 4.0, with a step size of 0.2. The root mean square error (RMSE) between the topic distribution calculated by the system and the distribution of expert annotations is finally selected to minimize the RMSE. As the optimal parameter, the study shows that when When set to 2.5, the system can best reproduce the expert's judgment, amplifying the influence of the core paragraphs without completely ignoring the contribution of the secondary paragraphs. is 2.5; Calculation process: According to the paragraph vector set and the topic center vector set, calculate the The semantic weight of the topic , to calculate the first theme "Intellectual Property" (i.e. ) as an example, set the contract to have paragraphs, total number of topics (Topic 1: Intellectual Property, Topic 2: Payment Terms), , and obtain the following data from the previous steps: Paragraph 1 ( ):length , the cosine similarity with topic 1 is 0.9, and the cosine similarity with topic 2 is 0.2; Paragraph 2 ( ):length , the cosine similarity with topic 1 is 0.3, and the cosine similarity with topic 2 is 0.8; Paragraph 3 ( ):length , the cosine similarity with topic 1 is 0.7, and the cosine similarity with topic 2 is 0.5; First calculate the numerator, which is the total affinity of all paragraphs to topic 1: ; ; ; Next, we calculate the denominator, which is the total affinity of all paragraphs to all topics. This requires first calculating the total affinity of all paragraphs to topic 2: ; ; ; The denominator is the sum of the total affinities of the two topics: ; Final calculation : ; The results show that in the contract under review, the semantic weight of the topic "intellectual property" is approximately 0.5093, which means that approximately 50.93% of the semantic content in the contract is related to intellectual property. This value will become a component in the actual topic distribution vector of the contract under review, which will be used for subsequent comparison with the standard topic distribution.
[0034] Based on the semantic weight value of each topic, the system will perform a complete semantic weight value calculation process for the currently reviewed contract and a large library of standard contract texts. For the contract under review, the system calls the aforementioned calculation formula and calculates a corresponding semantic weight value for each topic in the preset list (from topic 1 to topic M). For example, for a software development contract containing eight topics, the system will calculate The system then arranges these eight weighted values in ascending order of topic number (for example, 1 for intellectual property, 2 for payment terms) to form an eight-dimensional vector. This vector is the actual topic distribution of the pending contract, which depicts the distribution of content across core topics in this specific contract. Simultaneously, the system performs the same operation on a library of standard contract texts, which is a collection of hundreds of high-quality model contracts for the same business type (such as software development contracts). The system calculates a topic distribution vector for each standard contract in the library. Then, by averaging these hundreds of vectors element by element, it obtains a final average topic distribution vector representing the "ideal" or "conventional" content layout of this type of contract. This averaged vector is defined as the standard topic distribution, which reflects how a well-structured and comprehensive contract should typically distribute its content across various topics in this business scenario. Ultimately, the system outputs two vectors with the same dimensions and consistent topic order: the actual topic distribution of the pending contract and the standard topic distribution.
[0035] The steps to obtain the contract subject weight deviation list are: Based on the actual topic distribution and standard topic distribution of the contracts to be reviewed, the weight values corresponding to the same topics in the topic distribution are compared one by one, and the absolute value of the difference between the weight value of each topic in the actual topic distribution of the contracts to be reviewed and the weight value in the standard topic distribution is calculated. The absolute value of the difference of each topic is arranged in descending order to form a list of contract topic weight deviations.
[0036] Specifically, based on the two vectorized data of the actual topic distribution and the standard topic distribution of the pending contract, the system starts a process of item-by-item comparison and deviation calculation. The two vectors have the same dimension and topic order. For example, for a software development contract, both vectors may contain eight topic weight values arranged in a fixed order such as "intellectual property", "payment terms", "confidentiality obligations", and "liability for breach of contract". The system first extracts the values at the same index position in the two vectors, that is, the weight of the same topic in the pending contract and the standard template, and then calculates the absolute value of the difference between the two weight values. This operation will be performed on all topics one by one. For example, if the weight of the "intellectual property" topic in the actual topic distribution of the pending contract is 0.22, and its weight in the standard topic distribution is 0.22, the system will calculate the absolute value of the difference between the two weight values. is 0.30, then the absolute value of the difference is |0.22-0.30|, that is, 0.08. If the weight of the "payment terms" topic is 0.25 in the contract to be reviewed and 0.23 in the standard contract, then the absolute value of the difference is |0.25-0.23|, that is, 0.02. After completing the difference calculation for all eight topics, the system will obtain a set of eight absolute difference values. Each difference quantifies the degree of deviation between the content length of the corresponding topic in the contract to be reviewed and the industry standard template. Finally, the system treats these topics and their corresponding absolute difference values as data pairs, and arranges them in descending order according to the numerical value of the absolute difference, with the topic with the largest difference at the front, thereby generating a structured list of contract topic weight deviations.
[0037] The steps to obtain risk results are: Based on the contract subject weight deviation list, a preset threshold is set, and each subject in the contract subject weight deviation list is traversed. If the absolute value of the weight difference corresponding to a certain subject is greater than the preset threshold, the subject is marked as a missing risk subject, and all marked missing risk subjects and the absolute values of the weight differences are extracted to form a missing risk subject list; Based on the contract comprehensibility risk index, an ambiguity risk threshold is set, and the numerical relationship between the contract comprehensibility risk index and the ambiguity risk threshold is judged. If the contract comprehensibility risk index value is greater than the ambiguity risk threshold, it is determined that there is an ambiguity risk. Combined with the list of missing risk topics, a risk result is formed.
[0038] Specifically, based on the contract subject weight deviation list, the system then determines the missing risk. The core of this process is to set and apply a dynamic preset threshold for each subject. The preset threshold is not a fixed global value, but is dynamically calculated based on the statistical characteristics of each subject in the standard contract text library. The specific method is that the system pre-analyzes the weight of each subject of hundreds of contracts of the same type in the standard contract text library, and calculates the mean and standard deviation of each subject weight. The setting of the threshold refers to the "3-sigma" principle in statistical process control, that is, fluctuations within the range of the mean plus or minus three times the standard deviation are considered normal, and those beyond this range are abnormal. Therefore, for each subject in the contract subject weight deviation list, the corresponding preset threshold is set to 2.5 times the standard deviation of the subject's weight in the standard library. Therefore, the choice of 2.5 times instead of 3 times is based on the backtesting analysis of historical data. It was found that in the contract review scenario, 2.5 times the standard deviation can more sensitively capture the missing of major content with potential legal risks while maintaining a low false alarm rate. For example, if the weight standard deviation of the "Breach of Contract Liability" topic in the standard library is 0.03, then its preset threshold is 0.03*2.5, that is, 0.075. The system will traverse each topic in the contract topic weight deviation list and compare the absolute value of its weight difference with the calculated preset threshold of the corresponding topic. If the difference is greater than the threshold, for example, the absolute value of the weight difference of the "Breach of Contract Liability" topic of a certain contract is 0.08, which is greater than 0.075, then the system will mark the topic as a missing risk topic, and extract the name of the topic and the absolute value of its weight difference, summarize all marked topics, and form a list of missing risk topics.
[0039] Based on the contract comprehensibility risk index, the system begins to make the final judgment on the ambiguity risk. This step requires setting a clear ambiguity risk threshold, which is determined based on empirical analysis of historical contract data. The system maintains a database of thousands of reviewed contracts, where each contract is associated with its final legal status, such as "smoothly performed", "minor disputes occurred", and "major lawsuits were triggered". The system calculates the contract comprehensibility risk index for each contract in this historical database, thereby obtaining the distribution of contract risk indices under different legal statuses. By drawing the receiver operating characteristic (ROC) curve, the true positive rate (correctly identifying risky contracts) and false positive rate (misjudging risk-free contracts as risky) under different thresholds are analyzed, and the contract with the largest Youden index (true positive rate - false positive rate) is selected. The risk index value corresponding to the point is used as the optimal ambiguity risk threshold. For example, after analyzing a historical database containing 2,000 software procurement contracts, it was found that when the threshold was set to 0.95, the system could identify contracts that had triggered major lawsuits with 85% accuracy, while keeping the false alarm rate within 10%. Therefore, 0.95 was set as the ambiguity risk threshold for this type of contract. When reviewing a new contract, the system compares the previously calculated contract comprehensibility risk index (for example, 1.1522) with this 0.95 threshold. Since 1.1522 is greater than 0.95, the system determines that the contract has an ambiguity risk. Finally, the system integrates all analysis results and combines the ambiguity risk judgment conclusion (yes or no) with the list of missing risk topics generated in the previous step to form a comprehensive risk result report.
[0040] The above are merely preferred embodiments of the present invention and do not limit the present invention in any other form. Any technician familiar with the profession may use the technical content disclosed above to change or modify it into an equivalent embodiment with equivalent changes and apply it to other fields. However, any simple modification, equivalent change and modification made to the above embodiment based on the technical essence of the present invention without departing from the content of the technical solution of the present invention shall still fall within the scope of protection of the technical solution of the present invention.
Claims
1. A risk review method for contract clauses, characterized in that: The following steps are involved: Obtain the contract text to be reviewed, deconstruct the sentences of each contract clause, and obtain the clause parsing feature set; Based on the clause parsing feature set, a preset weight is assigned to the syntactic tree depth, referential distance, logical nesting level, and terminology density of each recorded clause to generate a single clause parsing complexity score for each clause. The single clause parsing complexity scores of all clauses in the contract are aggregated and calculated to obtain a contract comprehensibility risk index. Based on the contract text to be reviewed and a library of similar standard contract texts, the co-occurrence frequencies of terms in the contract text to be reviewed and the library of similar standard contract texts are calculated and clustered into topics, generating an actual topic distribution and a standard topic distribution for the contract to be reviewed. The weight of each topic in the actual topic distribution of the contract to be reviewed is compared one by one with the corresponding item in the standard topic distribution to obtain a list of contract topic weight deviations; The contract subject weight deviation list is screened and the subjects whose weight deviation exceeds the preset threshold are determined as missing risks. The contract comprehensibility risk index that exceeds the threshold is determined as ambiguous risk, and the risk results are generated.
2. The risk review method for contract terms according to claim 1, characterized in that: The steps for obtaining the clause parsing feature set are: Obtain the contract text to be reviewed, break it down clause by clause, split each contract clause into independent sentences, label each syntactic component, and analyze the direct dependencies between each syntactic component. Determine the syntactic tree structure of each sentence based on the dependency links, count the longest path nodes from the root node to the leaf node of the syntactic tree, and generate a syntactic tree depth value. Based on the syntactic tree depth value, the lexical sequence in each contract clause is traversed sentence by sentence, all pronouns and referents in the sentence are identified, the pronouns are associated with the corresponding referents, and the actual lexical distance between each pair of associated pairs is recorded. The number of words between the pairs is used as the lexical distance value, and a set of lexical distance values of all pronouns and referents in the clause is formed; Based on the lexical distance value set, the conditional logic operators and time logic operators are identified for each contract clause, and the identified conditional logic operators and time logic operators are expanded one by one and recursively performed in sequence. The number of times each operator is nested layer by layer in the sentence is counted, and the frequency of occurrence of each professional term in the preset list in the contract clause sentence is counted at the same time. The syntactic tree depth value, lexical distance value set, operator nesting number, and professional term frequency are used as clause feature dimensions to generate a clause parsing feature set.
3. The risk review method for contract terms according to claim 1, characterized in that: The steps for obtaining the single clause parsing complexity score are as follows: Based on the clause parsing feature set, extract the syntax tree depth value, reference distance value, logical nesting level value, and professional term density value of each contract clause, perform maximum and minimum value differential scaling processing on each clause, and map the original values to the closed interval 0 to 1 in turn, and record them as the standardized syntax tree depth value, standardized reference distance value, standardized logical nesting level value, and standardized professional term density value; The single clause parsing complexity value of each contract clause is calculated based on the standardized syntax tree depth value, the standardized reference distance value, the standardized logical nesting layer value and the standardized professional term density value.
4. The risk review method for contract terms according to claim 1, characterized in that: The steps for obtaining the contract comprehensibility risk index are as follows: The contract comprehensibility risk index is calculated based on the single clause parsing complexity values corresponding to all clauses.
5. The risk review method for contract terms according to claim 1, characterized in that: The steps for obtaining the actual topic distribution and the standard topic distribution of the pending contract are as follows: The contract text to be reviewed and the standard contract text library are divided into paragraphs, and each paragraph is segmented word by word. The pre-trained semantic model is used to convert each word unit into a word vector. The word vectors of all words in each paragraph are then weighted averaged to generate a paragraph vector. At the same time, fixed topic phrases are set according to business type, and the corresponding topic center vector is generated by averaging the word vectors of each group of keywords, resulting in a set of paragraph vectors and a set of topic center vectors. Calculating the semantic weight value of each topic in the contract to be reviewed based on the paragraph vector set and the topic center vector set; Based on the semantic weight value of each topic, the semantic weight value calculation is completed for the pending contract and the standard contract text library respectively, and the corresponding weight composition vector is output in ascending order of the topic number to construct the actual topic distribution and standard topic distribution of the pending contract respectively.
6. The risk review method for contract terms according to claim 1, characterized in that: The steps for obtaining the contract subject weight deviation list are as follows: Based on the actual subject distribution of the pending contracts and the standard subject distribution, the weight values corresponding to the same subject in the subject distribution are compared one by one, and the absolute value of the difference between the weight value of each subject in the actual subject distribution of the pending contracts and the weight value in the standard subject distribution is calculated. The absolute value of the difference of each subject is arranged in descending order to form a list of contract subject weight deviations.
7. The risk review method for contract terms according to claim 1, characterized in that: The steps for obtaining the risk results are: Based on the contract subject weight deviation list, a preset threshold is set, and each subject in the contract subject weight deviation list is traversed. If the absolute value of the weight difference corresponding to a certain subject is greater than the preset threshold, the subject is marked as a missing risk subject, and all marked missing risk subjects and the absolute values of the weight differences are extracted to form a missing risk subject list.
8. The risk review method for contract terms according to claim 7, characterized in that: The step of obtaining the risk result also includes: setting an ambiguity risk threshold based on the contract comprehensibility risk index, judging the numerical relationship between the contract comprehensibility risk index and the ambiguity risk threshold, if the value of the contract comprehensibility risk index is greater than the ambiguity risk threshold, it is determined that there is an ambiguity risk, and combined with the missing risk topic list to form a risk result.
9. The risk review system of the risk review method for contract clauses according to any one of claims 1 to 8, characterized in that: include: The contract parsing module obtains the contract text to be reviewed, deconstructs the sentences of each contract clause, and obtains the clause parsing feature set; The complexity assessment module, based on the clause parsing feature set, assigns preset weights to the syntactic tree depth, referential distance, logical nesting level, and terminology density of each recorded clause, generates a single clause parsing complexity score for each clause, and aggregates and calculates the single clause parsing complexity scores for all clauses in the contract to obtain a contract comprehensibility risk index. The topic deviation analysis module calculates the co-occurrence frequency of words in the contract text to be reviewed and the standard contract text library of the same type, clusters them into topics, generates the actual topic distribution of the contract to be reviewed and the standard topic distribution, and compares the weight of each topic in the actual topic distribution of the contract to be reviewed with the corresponding item in the standard topic distribution one by one to obtain a list of contract topic weight deviations; The risk identification module screens the topics whose contract subject weight deviation list exceeds a preset threshold and determines them as missing risks, and determines the contract comprehensibility risk index that exceeds the threshold as ambiguity risk, and generates risk results.
Citation Information
Patent Citations
Contract term review method and device based on clustering algorithm, computer equipment and storage medium
CN110502632A
Two-stage contract necessity term loss risk early warning method based on machine learning
CN112287668A
Contract review method and device based on artificial intelligence, equipment and storage medium
CN113887195A
Contract editing method, system and device and storage medium
CN118780251A
Document consistency comparison method based on semantic analysis and keyword driving
CN119886103A
Cited By
Hydraulic machinery feasibility research report grading review method based on large language model
CN121257516A