Contract adversarial automatic review optimization method and system based on large language model

By generating suggestive modifications and calculating risk entropy values ​​using a large language model, the lack of an adversarial perspective in contract review is addressed. This enables quantitative assessment and visualization of the vulnerability of contract terms, thereby improving review efficiency and accuracy.

CN122243223APending Publication Date: 2026-06-19FUZHOU UNIV

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
FUZHOU UNIV
Filing Date
2026-05-21
Publication Date
2026-06-19

AI Technical Summary

Technical Problem

Existing technologies lack an adversarial perspective in contract review, failing to proactively detect and quantify the semantic ambiguity of clauses, making it difficult for review results to reflect the vulnerability in a real game environment.

Method used

Using a large language model-based approach, adversarial inducement tools are used to generate suggestive modifications, and risk entropy values ​​are used to calculate the vulnerability of clauses, thus constructing a heat map for enterprise contract risk vulnerability management.

🎯Benefits of technology

It enables proactive detection of risk vulnerabilities in contract terms from an adversarial perspective, quantitative assessment of risk distribution, and improves the depth and accuracy of contract review.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122243223A_ABST
    Figure CN122243223A_ABST
Patent Text Reader

Abstract

This invention discloses an optimized method and system for automatic adversarial review of contracts based on a large language model. The method involves acquiring the contract text to be reviewed and conducting enterprise risk and compliance assessments to extract enterprise contract risk control nodes. An adversarial inducement tool is deployed to generate an induced modification suggestion for each enterprise contract risk control node. The induced modification suggestion and the original clause text are input into an enterprise contract risk certainty assessment tool to calculate the first risk entropy value of the original clause text and the second risk entropy value of the induced modification suggestion, respectively. The difference between the second and first risk entropy values ​​is calculated and recorded as the enterprise risk entropy change value. All enterprise risk entropy change values ​​are sorted and mapped to corresponding positions in the contract text to generate and output an enterprise contract risk vulnerability control heatmap. This method proactively detects the risk vulnerability of contract clauses from an adversarial perspective, presents the risk distribution intuitively in a quantitative manner, and improves the depth and accuracy of contract review.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data processing technology, specifically to an automatic review and optimization method and system for contract adversarial behavior based on a large language model. Background Technology

[0002] In commercial activities, contracts are the core legal documents defining the rights and obligations of all parties. To mitigate potential legal risks, companies typically need to rigorously review contract terms. Traditional contract review heavily relies on the professional experience of legal personnel, resulting in inefficiency and difficulty in ensuring comprehensiveness. With the development of artificial intelligence technology, automated contract review solutions based on risk prediction models have emerged. These solutions improve review efficiency to some extent by training models to identify known risk items in contracts. However, existing technologies generally employ a "passive identification" risk analysis logic, meaning the model can only determine whether a clause has pre-set risk characteristics, but cannot predict how the counterparty might exploit the semantic ambiguity of the clause to interpret it in their favor. This assessment method, lacking an adversarial perspective, makes it difficult for review results to reflect the vulnerability of contract terms in a real game-theoretic environment, and it also fails to quantify the degree of semantic ambiguity of the clauses. Consequently, companies cannot intuitively identify and prioritize the highest-risk clauses. Summary of the Invention

[0003] In view of the above problems, the present invention provides an automatic review and optimization method and system for contract adversariality based on a large language model. By actively generating induced modification suggestions from the perspective of reverse game theory and quantitatively assessing the degree of decrease in the semantic certainty of the clauses, the present invention achieves proactive detection and quantitative analysis of the vulnerability of contract clauses.

[0004] To achieve the above objectives, in a first aspect, this application provides an optimized method for automatic review of contract adversarial behavior based on a large language model, comprising:

[0005] Obtain the contract text to be reviewed, conduct enterprise risk and compliance assessment on the contract text to be reviewed, and extract several enterprise contract risk control nodes;

[0006] Deploy adversarial inducement tools. These tools are based on the enterprise's reverse risk management thinking training and generate an inducement modification suggestion for each enterprise's contract risk management node. The inducement modification suggestion is a seemingly reasonable but potentially risky modification of the enterprise's contract terms.

[0007] The induced modification suggestions and the corresponding original clause text are input into the enterprise contract risk certainty assessment tool to calculate the first risk entropy value of the original clause text and the second risk entropy value of the induced modification suggestions, respectively.

[0008] The difference between the second risk entropy value and the first risk entropy value is calculated and recorded as the enterprise risk entropy change value at the enterprise contract risk management node. The enterprise risk entropy change value is used to characterize the degree of decrease in the certainty of enterprise contract risk under the adversarial inducement of this clause.

[0009] The enterprise risk entropy change values ​​of all enterprise contract risk management nodes are sorted, and the enterprise risk entropy change values ​​are mapped to the corresponding positions in the contract text to be reviewed, generating and outputting a heat map of enterprise contract risk vulnerability management.

[0010] Furthermore, adversarial inducement tools are constructed through the following steps:

[0011] Access the historical contract dispute case library, which contains the texts of disputed contracts and the corresponding key points of the dispute.

[0012] Extract from the text of the disputed core text the aggressive arguments of one party that use vague wording in the contract to their advantage.

[0013] By pairing offensive argument texts with corresponding disputed contract clause texts, induced training sample pairs are constructed.

[0014] Using the text of disputed contract clauses in the induced training sample pairs as input and the text of the corresponding offensive arguments as the expected output, the pre-trained language model is trained, enabling the pre-trained language model to learn the ability to reverse reason from contract clauses to offensive arguments.

[0015] Deploy the pre-trained language model after training as an adversarial inducement tool.

[0016] Furthermore, extract from the key texts of the dispute the offensive arguments by which one party uses ambiguous wording in the contract to their advantage, including:

[0017] Semantic role labeling is performed on the texts that are the focus of the dispute, and the claimants, the clauses that are attacked, and the logical chains that are favorable to the interpretation are identified and extracted as candidate argument triples.

[0018] Perform fuzzy semantic matching on the attack target clauses in the candidate argument triples, and mark the candidate argument triples that match any word in the preset fuzzy semantic dictionary as fuzzy related arguments;

[0019] Perform causal structure analysis on the favorable explanatory logical chains in fuzzy related arguments, and extract the arguments that contain hypothetical condition derivation or analogical reasoning, which are denoted as logical attack arguments;

[0020] The adversarial strength score is calculated based on the number of legal principles cited in the favorable explanation logic chain, the length of the reasoning steps, and the degree of exclusivity of the conclusion.

[0021] The text corresponding to logical offensive arguments whose adversarial strength score exceeds a preset threshold will be used as offensive argument text.

[0022] Furthermore, the contract text to be reviewed is obtained, and a corporate risk and compliance assessment is conducted on the contract text to be reviewed, extracting several corporate contract risk control nodes, including:

[0023] The contract text to be reviewed is analyzed in terms of its chapter structure to identify and separate the definition clauses, rights and obligations clauses, breach of contract liability clauses, disclaimer clauses and dispute resolution clauses as a set of clauses to be analyzed.

[0024] Each clause in the set of clauses to be analyzed is subjected to dependency parsing to extract the core predicate and its corresponding subject-object structure as candidate semantic units.

[0025] For each candidate semantic unit, fuzziness detection is performed. The fuzziness detection is based on a pre-set fuzzy semantic dictionary, which includes degree adverbs, range limiting words, and conditional hypothesis words.

[0026] Candidate semantic units that match any word in the fuzzy semantic dictionary are marked as initial enterprise contract risk management nodes;

[0027] Cross-clause correlation analysis is performed on the initial enterprise contract risk control nodes to identify the same legal concept or business term that appears repeatedly or is mutually referenced in different clauses, and the initial enterprise contract risk control nodes with cross-clause correlation are merged into aggregated enterprise contract risk control nodes.

[0028] The initial enterprise contract risk management node and the aggregated enterprise contract risk management node are used together as the enterprise contract risk management node.

[0029] Furthermore, the suggested modifications and the corresponding original clause text are input into the enterprise contract risk certainty assessment tool to calculate the first risk entropy value of the original clause text and the second risk entropy value of the suggested modifications, including:

[0030] The original contract text is input into the enterprise contract risk determinism assessment tool, which is built based on a pre-trained language model. The enterprise contract risk determinism assessment tool performs multi-candidate risk semantic space mapping on the original contract text, generating several candidate risk semantic interpretations and their corresponding probability distributions.

[0031] Based on probability distribution, the risk semantic entropy value of the original clause text is calculated using the information entropy calculation formula, and is used as the first risk entropy value. The first risk entropy value is used to quantitatively characterize the degree of risk ambiguity of the original clause text.

[0032] The induced modification suggestions are input into the enterprise contract risk certainty assessment tool. The enterprise contract risk certainty assessment tool performs multi-candidate risk semantic space mapping on the induced modification suggestions, generating several candidate risk semantic interpretations and their corresponding probability distributions.

[0033] Based on probability distribution, the risk semantic entropy value of the induced modification proposal is calculated using the information entropy calculation formula, and is used as the second risk entropy value. The second risk entropy value is used to quantitatively characterize the degree of risk ambiguity of the induced modification proposal.

[0034] Furthermore, the enterprise contract risk certainty assessment tool performs multi-candidate risk semantic space mapping on the original clause text, generating several candidate risk semantic interpretations and their corresponding probability distributions, including:

[0035] Semantic role labeling is performed on the original clause text, and the core predicates and their corresponding subject-object structures are extracted as risk semantic anchors.

[0036] Based on risk semantic anchors, the original clause text is rewritten using a preset risk semantic variant generation template. The risk semantic variant generation template includes a synonym replacement template, a word order transformation template, and a condition insertion template, generating several candidate risk semantic variant texts.

[0037] The original clause text and several candidate risk semantic variant texts are input into the risk semantic similarity discrimination model. The risk semantic similarity discrimination model outputs the risk semantic similarity score between each candidate risk semantic variant text and the original clause text.

[0038] Based on the risk semantic similarity score, the risk semantic similarity score is converted into a probability distribution using a normalized exponential function, that is, several candidate risk semantic interpretations and their corresponding probability distributions.

[0039] Furthermore, the difference between the second risk entropy value and the first risk entropy value is calculated and denoted as the enterprise risk entropy change value at the enterprise contract risk management node. The enterprise risk entropy change value is used to characterize the degree of decrease in the certainty of enterprise contract risk under the adversarial inducement of this clause, including:

[0040] Calculate the arithmetic difference between the second risk entropy value and the first risk entropy value to obtain the original enterprise risk entropy change value at the enterprise contract risk control node;

[0041] Obtain the contract type weight coefficient and clause type weight coefficient corresponding to the enterprise's contract risk management nodes. The contract type weight coefficient is pre-set based on the frequency of risk occurrence of different contract types in historical disputes, and the clause type weight coefficient is pre-set based on the probability of attack on definition clauses, rights and obligations clauses, breach of contract liability clauses and exemption clauses in contract disputes.

[0042] The original enterprise risk entropy change value is multiplied by the contract type weight coefficient and the clause type weight coefficient to generate the weighted enterprise risk entropy change value.

[0043] The weighted enterprise risk entropy change value is normalized to a preset numerical range and used as the final enterprise risk entropy change value at the enterprise contract risk management node.

[0044] Furthermore, obtain the contract type weight coefficient and clause type weight coefficient corresponding to the enterprise's contract risk management nodes, including:

[0045] The contract type identification process is performed on the contract text to be reviewed to determine the type of contract to which the contract text belongs. Contract types include sales contracts, lease contracts, service contracts, and intellectual property contracts.

[0046] Retrieve a set of dispute cases matching the contract type from the historical contract dispute database, count the frequency of each clause type appearing as the focus of the dispute in the dispute case set, and generate a clause type frequency distribution vector;

[0047] The frequency distribution vector of clause types is normalized to obtain the clause type weight coefficients corresponding to the enterprise's contract risk control nodes;

[0048] The set of dispute cases matching the contract type is retrieved from the historical contract dispute database, and the proportion of the number of cases involving the contract type in the dispute case set is used as the risk benchmark value for the contract type.

[0049] Obtain the contract amount and contract term of the contract text to be reviewed, and map the contract amount and contract term to a preset risk adjustment coefficient table to obtain the risk adjustment coefficient;

[0050] The risk benchmark value and the risk adjustment coefficient are multiplied to generate the contract type weight coefficient corresponding to the enterprise's contract risk control node.

[0051] Furthermore, based on the enterprise risk entropy change values ​​of all enterprise contract risk control nodes, the enterprise risk entropy change values ​​are sorted and mapped to the corresponding positions in the contract text to be reviewed, generating and outputting an enterprise contract risk vulnerability control heatmap, including:

[0052] All enterprise contract risk management nodes are sorted in descending order of their corresponding enterprise risk entropy change values ​​to generate a vulnerability ranking list.

[0053] For each enterprise contract risk management node in the vulnerability ranking list, the corresponding color label is matched from the preset color chart map table according to the numerical range of its enterprise risk entropy change value. The high entropy change value range in the color chart map table corresponds to the warm color label, and the low entropy change value range corresponds to the cool color label.

[0054] In the original layout of the contract text to be reviewed, locate the text segment corresponding to each enterprise's contract risk management node;

[0055] Color markers are overlaid at the text fragment locations to generate a heat map of enterprise contract risk vulnerability management. The heat map of enterprise contract risk vulnerability management intuitively displays the degree of adversarial vulnerability of each clause area with the intensity of color.

[0056] The heatmap of enterprise contract risk vulnerability management is linked with the vulnerability ranking list. Each enterprise contract risk management node in the vulnerability ranking list is accompanied by corresponding induced modification suggestions and response strategy suggestions.

[0057] In a second aspect, the present invention also provides an automatic contract adversarial review and optimization system based on a large language model, applicable to the method of the first aspect. The system includes an enterprise risk compliance assessment module, an adversarial inducement module, a risk entropy value calculation module, a risk entropy change analysis module, and a heatmap generation module. The enterprise risk compliance assessment module is used to obtain the contract text to be reviewed, perform enterprise risk compliance assessment on the contract text, and extract several enterprise contract risk control nodes. The adversarial inducement module is deployed with an adversarial inducement tool based on enterprise risk reverse management thinking training, used to generate an inducement modification suggestion for each enterprise contract risk control node. The inducement modification suggestion is a seemingly reasonable but potentially risky modification of the enterprise contract clause text. The risk entropy value calculation module... The module includes a tool for assessing the certainty of enterprise contract risks. This tool inputs induced modification suggestions and the corresponding original clause text to calculate the first risk entropy value of the original clause text and the second risk entropy value of the induced modification suggestions. A risk entropy change analysis module calculates the difference between the second and first risk entropy values, denoted as the enterprise risk entropy change value of the enterprise contract risk control node. This value characterizes the degree to which the certainty of enterprise contract risk decreases under adversarial inducement. A heatmap generation module sorts the enterprise risk entropy change values ​​of all enterprise contract risk control nodes, maps these values ​​to the corresponding positions in the contract text to be reviewed, generates and outputs an enterprise contract risk vulnerability control heatmap.

[0058] Unlike existing technologies, the above technical solution provides a method and system for automatically optimizing contract adversarial review based on a large language model. The method includes: acquiring the contract text to be reviewed and conducting enterprise risk compliance assessment to extract enterprise contract risk control nodes; deploying an adversarial inducement tool to generate an induced modification suggestion for each enterprise contract risk control node; inputting the induced modification suggestion and the original clause text into an enterprise contract risk certainty assessment tool to calculate the first risk entropy value of the original clause text and the second risk entropy value of the induced modification suggestion, respectively; calculating the difference between the second risk entropy value and the first risk entropy value, denoted as the enterprise risk entropy change value; sorting all enterprise risk entropy change values ​​and mapping them to the corresponding positions in the contract text to generate and output an enterprise contract risk vulnerability control heatmap. This invention can proactively detect the risk vulnerability of contract clauses from an adversarial perspective and present the risk distribution intuitively in a quantitative manner, improving the depth and accuracy of contract review.

[0059] The above description of the invention is merely an overview of the technical solution of this application. In order to enable those skilled in the art to better understand the technical solution of this application and to implement it based on the description and drawings, and to make the above-mentioned objectives and other objectives, features and advantages of this application easier to understand, the following description is provided in conjunction with the specific embodiments and drawings of this application. Attached Figure Description

[0060] The accompanying drawings are only used to illustrate the principles, implementation methods, applications, features, and effects of specific embodiments of the present invention and other related contents, and should not be considered as limitations on this application.

[0061] In the accompanying drawings of the instruction manual:

[0062] Figure 1 This is a schematic diagram illustrating steps S101 to S105 of the method described in a specific embodiment.

[0063] Figure 2 This is a schematic diagram illustrating steps S201 to S205 of the method described in a specific implementation.

[0064] Figure 3 This is a schematic diagram illustrating steps S301 to S306 of the method described in a specific implementation.

[0065] Figure 4 This is a schematic diagram illustrating steps S401 to S404 of the method described in a specific embodiment;

[0066] Figure 5 This is a schematic diagram of the structure of the automatic review and optimization system described in a specific implementation.

[0067] The reference numerals used in the above figures are explained as follows:

[0068] 1. Automatic review and optimization system; 11. Enterprise risk and compliance assessment module; 12. Adversarial inducement module; 13. Risk entropy value calculation module; 14. Risk entropy change analysis module; 15. Heat map generation module. Detailed Implementation

[0069] To illustrate the possible application scenarios, technical principles, implementable specific solutions, and achievable objectives and effects of this application in detail, the following description, in conjunction with the listed specific embodiments and accompanying drawings, provides a detailed explanation. The embodiments described herein are merely illustrative of the technical solutions of this application and are therefore intended to limit the scope of protection of this application.

[0070] In this document, the term "embodiment" means that a specific feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The term "embodiment" appearing in various places throughout the specification does not necessarily refer to the same embodiment, nor does it specifically limit its independence or connection with other embodiments. In principle, in this application, as long as there are no technical contradictions or conflicts, the technical features mentioned in each embodiment can be combined in any way to form corresponding implementable technical solutions.

[0071] Unless otherwise defined, the technical terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains; the use of related terms herein is merely for the purpose of describing particular embodiments and is not intended to limit this application.

[0072] In the description of this application, the term "and / or" is used to describe the logical relationship between objects, indicating that three relationships can exist. For example, A and / or B means: A exists, B exists, and A and B exist simultaneously. Additionally, the character " / " in this document generally indicates that the preceding and following objects have an "or" logical relationship.

[0073] In this application, terms such as “first” and “second” are used only to distinguish one entity or operation from another, and do not necessarily require or imply any actual quantity, hierarchy or order relationship between these entities or operations.

[0074] Without further limitations, the use of terms such as “comprising,” “including,” “having,” or other similar open-ended expressions in this application is intended to cover non-exclusive inclusion, which does not exclude the presence of additional elements in a process, method, or product that includes the stated elements, such that a process, method, or product that includes a list of elements may include not only those defined elements but also other elements not expressly listed, or elements inherent to such a process, method, or product.

[0075] The processor described in the embodiments of this application can be implemented by hardware, firmware, software, or a combination thereof. It can be a circuit, one or more of an application-specific integrated circuit (ASIC), a digital signal processor (DSP), a digital signal processing device (DSPD), a programmable logic device (PLD), a field-programmable gate array (FPGA), a central processing unit (CPU), a controller, a microcontroller, or a microprocessor. It also includes other physical, biological, or chemical structures that can implement the same or equivalent functions as the processors listed above, such as biological neurons, quantum computing units, DNA computing units, etc., so that the processor can execute some or all of the steps in the computer program or method involved in the various embodiments of this application, or any combination of the steps mentioned therein.

[0076] The computer program involved in the embodiments can be stored in a computer device readable storage medium, which includes, but is not limited to, disks, magnetic tapes, magnetic cards, floppy disks, flash memory, optical disks, optical cards, read-only memory (ROM), random access memory (RAM), erasable programmable ROM (EPROM), and electrically erasable programmable ROM (EEPROM), etc., and also includes other biological, physical, or chemical structures that can achieve the same or equivalent functions as the storage media listed above, such as DNA, RNA, proteins, and other units with information storage capabilities. In specific embodiments, the storage medium involved can be one of the above-mentioned media types, or a combination of the above-mentioned media types. In different embodiments, the computer program involved in the embodiments can be centrally stored in a single medium, or distributed and stored in multiple media. The memory containing the computer device readable storage medium can be non-volatile memory or random access memory. These computer device readable storage media can be built into the device, or can be connected to the device involved in the embodiments as an external device or part of an external device. In some embodiments, the memory having a computer device readable storage medium is deployed locally; in other embodiments, the memory may be deployed remotely from the processor, for example, as a network-attached memory accessed via RF circuitry or an external port and a communication network, wherein the communication network may be the Internet, one or more intranets, a local area network (LAN), a wide area network (WLAN), a storage area network (SAN), or a suitable combination thereof, as long as computer device access to the memory is enabled. Furthermore, the computer program involved in the embodiments may be stored in plaintext / ciphertext form, or it may be designed as training data, integrated and recombined through model training and implicitly stored in the parameter states of a deep neural network or other machine learning model.

[0077] Please see Figure 1 In a first aspect, this embodiment provides an optimized method for automatic review of contract adversarial behavior based on a large language model, including:

[0078] S101. Obtain the contract text to be reviewed, conduct enterprise risk and compliance assessment on the contract text to be reviewed, and extract several enterprise contract risk control nodes.

[0079] S102. Deploy adversarial inducement tools. These tools are based on the enterprise's reverse risk management thinking training and generate an inducement modification suggestion for each enterprise's contract risk management node. The inducement modification suggestion is a seemingly reasonable but potentially risky modification of the enterprise's contract terms.

[0080] S103. Input the induced modification suggestions and the corresponding original clause text into the enterprise contract risk certainty assessment tool, and calculate the first risk entropy value of the original clause text and the second risk entropy value of the induced modification suggestions respectively.

[0081] S104. Calculate the difference between the second risk entropy value and the first risk entropy value, and record it as the enterprise risk entropy change value of the enterprise contract risk control node. The enterprise risk entropy change value is used to characterize the degree of decrease in the certainty of enterprise contract risk under the adversarial inducement of this clause.

[0082] S105. Sort the enterprise risk entropy change values ​​of all enterprise contract risk control nodes, map the enterprise risk entropy change values ​​to the corresponding positions in the contract text to be reviewed, generate and output the enterprise contract risk vulnerability control heat map.

[0083] In step S101, the contract text to be reviewed originates from electronic documents in the enterprise contract management system or text data that has been scanned and converted. Enterprise risk compliance assessment, from the perspective of enterprise risk prevention and control, uses natural language processing technology to identify the core expressive units in the contract that carry legal rights and obligations. By analyzing the risk semantic structure and legal connotation of the clauses, the unstructured contract text is transformed into structured data composed of several enterprise contract risk control nodes. These nodes are the key clauses or expressive units in the contract that contain potential risks or legal risks, providing precise analytical targets for subsequent adversarial analysis.

[0084] In step S102, the adversarial inducement tool is a large language model based on corporate risk reverse management thinking training. Its training logic differs from the traditional method of positively identifying known risk characteristics. It proactively considers the vulnerabilities in contract terms that could be attacked or exploited from the perspective of corporate risk. The model is trained by simulating how the counterparty might use the ambiguity of the terms to interpret them in a way that benefits itself. For each corporate contract risk management node, the model analyzes the risk semantic structure of the node text. While maintaining the apparent rationality of the modified text, it introduces potential risk hazards by adjusting the wording, thereby generating induced modification suggestions. This step, by deploying an adversarial inducement tool with reverse management thinking, achieves a leap from passively identifying risks to proactively probing the vulnerabilities of contract terms.

[0085] In step S103, the enterprise contract risk certainty assessment tool is constructed based on information entropy theory. It is used to quantitatively assess the degree of risk ambiguity in contract clause text. By analyzing the multiple reasonable interpretations and probability distributions that may exist in the text within the risk semantic space, the risk certainty is transformed into a quantifiable numerical value using the information entropy calculation formula. The first risk entropy value obtained after inputting the original clause text into the model represents the risk certainty level of the original clause text itself; the second risk entropy value obtained after inputting the induced modification suggestion into the model represents the risk certainty level of the induced modification suggestion. The higher the risk entropy value, the lower the risk certainty of the text, meaning there are more possible reasonable interpretations, and the easier it is for different parties to interpret the clause in their favor. This step, by introducing the risk entropy value, achieves a quantitative assessment of the risk ambiguity of contract clauses, providing a quantitative basis for subsequent vulnerability analysis.

[0086] In step S104, the enterprise risk entropy change value quantitatively characterizes the degree of decrease in risk certainty at the enterprise's contract risk management nodes after being subjected to adversarial inducement. The larger the enterprise risk entropy change value, the more ambiguous the risk becomes after the clause is subjected to adversarial attack, that is, the higher the adversarial vulnerability of the clause, and the easier it is for the contractual counterparty to use it for favorable interpretation. This step quantifies the vulnerability of the clause in adversarial scenarios by calculating the entropy change value, providing data support for risk ranking and visualization.

[0087] In step S105, all enterprise contract risk control nodes are sorted in descending order based on their enterprise risk entropy change values ​​to determine the vulnerability level of each node. The entropy change value of each node is mapped to the corresponding text segment in the contract text to be reviewed. Color coding is used to visually display the adversarial vulnerability of each clause area, thereby generating an enterprise contract risk vulnerability control heatmap. This heatmap visually presents the overall risk distribution of the contract, enabling reviewers to quickly locate the highest-risk clause areas and prioritize the handling of highly vulnerable clauses, thus improving the efficiency and accuracy of review decisions.

[0088] This embodiment constructs a review process from risk assessment to vulnerability heatmap output, realizing the proactive detection and quantitative evaluation of the adversarial vulnerability of contract clauses. It transforms unstructured contract text into structured risk management nodes using enterprise risk compliance assessment, deploys adversarial inducement tools based on reverse management thinking to proactively generate aggressive modification suggestions, and then introduces risk entropy values ​​to quantitatively assess the ambiguity of clause risks. By quantifying the vulnerability of clauses in adversarial scenarios through entropy change values, the risk distribution is ultimately presented intuitively in the form of a heatmap. This overcomes the limitations of traditional contract review methods, which can only passively identify known risks and lack quantitative assessment. It achieves a leap from qualitative to quantitative, and from passive to proactive, significantly improving the depth and accuracy of contract review.

[0089] Please see Figure 2 In some embodiments, the adversarial inducement tool is constructed through the following steps:

[0090] S201. Obtain the historical contract dispute case library, which contains the text of the disputed contract and the corresponding text of the dispute focus.

[0091] S202. Extract from the text of the disputed core text the offensive arguments of one party that use vague wording of contract terms to make favorable interpretations;

[0092] S203. Pair offensive argument texts with corresponding disputed contract clause texts to construct induced training sample pairs;

[0093] S204. Using the disputed contract clause text in the induced training sample pair as input and the corresponding offensive argument text as expected output, train the pre-trained language model so that the pre-trained language model learns the ability to reverse reason from the contract clause to the offensive argument.

[0094] S205. Deploy the pre-trained language model after training as an adversarial inducement tool.

[0095] In step S201, the historical contract dispute case library is derived from historical litigation case data accumulated by the enterprise's legal system, publicly available judgment document databases, and industry-shared contract dispute case resources. Legal documents related to contract disputes are automatically retrieved through a data acquisition interface. In the historical contract dispute case library, the disputed contract text is the original full text of the contract that triggered the dispute, and the dispute focus text can be the core points of contention between the parties summarized by the court or arbitration institution during the case hearing. The dispute focus text and the disputed contract text are linked through case identifiers, forming structured case data stored in the case library. The construction of the historical contract dispute case library covers various contract types such as sales contracts, lease contracts, and service contracts, ensuring that the number of cases of each type reaches a certain scale to provide sufficient training materials with realistic legal confrontation scenarios for subsequent model training.

[0096] In step S202, offensive argument text refers to legal argument text extracted from the dispute's core text, in which one party uses ambiguous wording in contractual clauses for semantic expansion or narrow interpretation in an attempt to obtain a favorable judgment. The extraction process uses natural language processing technology to structurally analyze the dispute's core text, identifying argument paragraphs containing a complete logical chain of claims, grounds, and conclusions. It then determines whether these paragraphs use ambiguous wording in the clauses as a starting point for reasoning, separating paragraphs that meet these criteria from the dispute's core text. This step, by extracting offensive arguments from real disputes, provides the model with authentic, high-quality samples of attack strategies for learning reverse reasoning capabilities.

[0097] In step S203, the construction of induced training sample pairs is based on the association index between the disputed contract text and the text of the dispute focus in the historical case database. Text similarity calculation verifies that the offensive argument text indeed originates from an attack on the corresponding disputed contract clause, and manual sampling is used to ensure matching accuracy. In each sample pair, the disputed contract clause text serves as the training input, and the offensive argument text serves as the expected output; the two have a clear causal relationship in historical cases. Preferably, a matching accuracy threshold can be set, and substandard sample pairs can be removed to improve matching quality and prevent incorrect matching from causing the model to learn incorrect mapping relationships. This step, by constructing induced training sample pairs, provides the pre-trained language model with mapping learning data from contract clauses to offensive arguments.

[0098] In step S204, the pre-trained language model can be a large language model based on the Transformer architecture. This model has been pre-trained on massive amounts of general text data and possesses strong language understanding and generation capabilities. The disputed contract clause text from the induced training sample pairs is used as the model input, and the corresponding offensive argument text is used as the expected output to be generated by the model. Supervised fine-tuning is performed using a sequence-to-sequence generative training framework. During training, the model parameters are optimized by minimizing the cross-entropy loss function between the model-generated text and the expected output text. The backpropagation algorithm is used to propagate the loss gradient layer by layer and update the weights of each network layer. The training data is divided into training, validation, and test sets according to a preset ratio. The training process continues until the loss function value on the validation set no longer decreases, thus obtaining a trained model with reverse reasoning capabilities. After multiple rounds of iterative training until the loss function converges, the model has mastered the ability to reverse-engineer how the opponent might exploit the ambiguity of the contract clauses for a favorable interpretation.

[0099] In step S205, the parameters of the pre-trained language model are solidified and loaded into the inference service environment, and inference services are provided externally through a standardized API interface, i.e., deployed as an adversarial inducement tool. The adversarial inducement tool can receive key semantic nodes of enterprise contracts as input and output corresponding offensive argument texts as inducement modification suggestions, realizing the functional transformation from passively identifying risks to actively probing the vulnerability of clauses.

[0100] This embodiment constructs a historical contract dispute case library as the training data source, extracts offensive argument texts from the key dispute texts as learning targets for reverse reasoning, constructs induced training sample pairs, and performs supervised fine-tuning on the pre-trained language model to enable it to master the mapping ability from contract terms to offensive arguments. Finally, the trained pre-trained language model is deployed as a callable service module, overcoming the limitation of traditional risk prediction models that can only identify known risk characteristics. By learning reverse reasoning ability from real dispute cases, the model has the ability to actively detect the adversarial vulnerability of contract terms.

[0101] In some embodiments, extracting offensive arguments from the disputed text where one party uses ambiguous wording in the contract terms for a favorable interpretation includes:

[0102] Semantic role labeling is performed on the texts that are the focus of the dispute, and the claimants, the clauses that are attacked, and the logical chains that are favorable to the interpretation are identified and extracted as candidate argument triples.

[0103] Perform fuzzy semantic matching on the attack target clauses in the candidate argument triples, and mark the candidate argument triples that match any word in the preset fuzzy semantic dictionary as fuzzy related arguments;

[0104] Perform causal structure analysis on the favorable explanatory logical chains in fuzzy related arguments, and extract the arguments that contain hypothetical condition derivation or analogical reasoning, which are denoted as logical attack arguments;

[0105] The adversarial strength score is calculated based on the number of legal principles cited in the favorable explanation logic chain, the length of the reasoning steps, and the degree of exclusivity of the conclusion.

[0106] The text corresponding to logical offensive arguments whose adversarial strength score exceeds a preset threshold will be used as offensive argument text.

[0107] In this embodiment, a pre-trained semantic role labeling model based on deep learning is used to parse the dispute-focused text. This model is pre-trained on a general semantic role labeling corpus and then fine-tuned using a legal domain labeling corpus to improve labeling accuracy on contract dispute texts. Based on the predicates identified in the labeling results and their associated semantic components such as agent, recipient, cause, and result, three elements are extracted from the text: the claimant, the target clause, and the logical chain of favorable interpretation. The claimant corresponds to the agent role in the labeling results, i.e., the party proposing a favorable interpretation; the target clause corresponds to the specific contract clause name or number cited in the text; and the logical chain of favorable interpretation corresponds to clauses or paragraphs containing causal or conditional relationships, i.e., the argumentation process by which the party derives a conclusion favorable to themselves from the vague expression of the clause. These three elements together constitute a candidate argument triple.

[0108] Preferably, the pre-defined fuzzy semantic dictionary is constructed by experts in the field of contract law, summarizing controversial expressions from historical dispute cases. It covers categories such as degree adverbs, scope limiting words, conditional assumption words, and time-ambiguous words, and is regularly updated and maintained based on new cases. The target clauses in the candidate argument triples are compared with the pre-defined fuzzy semantic dictionary. Matching methods can include exact string matching or semantic similarity matching based on word vectors. If the target clause contains any word from the dictionary, the candidate argument triple is marked as a fuzzy related argument.

[0109] This study uses dependency parsing techniques to analyze the advantageous explanatory logical chains in fuzzy related arguments, identifying dependency connections representing causal or conditional relationships within these chains, and constructing a deductive relationship graph between premises and conclusions. From this graph, logical chains containing two specific reasoning patterns—hypothetical reasoning and analogical reasoning—are identified: hypothetical reasoning can be represented by reasoning structures containing conditional words such as "if," "then," and "assumption," while analogical reasoning can be represented by reasoning structures containing analogical words such as "similar," "refer to," and "compare." Fuzzy related arguments corresponding to advantageous explanatory logical chains containing these reasoning patterns are denoted as logical attack arguments.

[0110] The adversarial strength score is comprehensively quantified from three dimensions: the number of legal principles cited, the length of the reasoning steps, and the exclusivity of the conclusion. The number of legal principles cited is obtained by statistically analyzing the number of legal provisions or principle names appearing in the favorable interpretation logical chain; the length of the reasoning steps is obtained by calculating the number of derivation steps from the premises to the final conclusion in the logical chain; and the exclusivity of the conclusion is judged by analyzing whether the conclusion statement contains exclusivity qualifiers. The scores of the three dimensions are combined using a weighted summation method, with the weights of each dimension pre-determined based on the influence of different factors on the judgment outcome in historical dispute cases using analytic hierarchy process (AHP) or regression analysis. The preset threshold is determined based on statistical analysis of the strength distribution of logically offensive arguments in a large number of historical dispute cases, selecting quantile values ​​that cover most high-quality arguments while filtering out low-quality arguments as the threshold.

[0111] The text corresponding to logically-based offensive arguments whose adversarial strength scores exceed a preset threshold is extracted from the text of the dispute's focus; this is the offensive argument text. These texts represent high-quality attack strategies tested in real disputes and can provide authentic and effective reverse reasoning learning samples for subsequent model training.

[0112] This embodiment extracts candidate argument triples through semantic role labeling, filters arguments related to clause ambiguity using a pre-set fuzzy semantic dictionary, identifies arguments with complete reasoning logic based on causal structure analysis, and quantifies arguments using a multi-dimensional adversarial strength score. Finally, arguments exceeding a preset threshold are output as the offensive argument text. This scheme constructs an automated extraction process from original dispute texts to high-quality attack strategy samples, providing rigorously selected training data with real legal adversarial scenarios for training adversarial inducement tools.

[0113] Please see Figure 3 In some embodiments, the contract text to be reviewed is obtained, and a corporate risk and compliance assessment is performed on the contract text to be reviewed, extracting several corporate contract risk control nodes, including:

[0114] S301. Analyze the chapter structure of the contract text to be reviewed, identify and separate the definition clauses, rights and obligations clauses, breach of contract liability clauses, exemption clauses and dispute resolution clauses, as a set of clauses to be analyzed;

[0115] S302. Perform dependency parsing on each clause in the set of clauses to be analyzed, and extract the core predicate and its corresponding subject-object structure as candidate semantic units.

[0116] S303. Perform fuzziness detection on each candidate semantic unit. The fuzziness detection is based on a preset fuzzy semantic dictionary for matching. The fuzzy semantic dictionary includes degree adverbs, range limiting words and conditional hypothesis words.

[0117] S304. Mark the candidate semantic units that match any word in the fuzzy semantic dictionary as the initial enterprise contract risk management node;

[0118] S305. Conduct cross-clause correlation analysis on the initial enterprise contract risk control nodes, identify the same legal concept or business term that appears repeatedly or is mutually referenced in different clauses, and merge the initial enterprise contract risk control nodes with cross-clause correlations into aggregated enterprise contract risk control nodes.

[0119] S306. The initial enterprise contract risk management node and the aggregated enterprise contract risk management node are used together as the enterprise contract risk management node.

[0120] In step S301, the text structure parsing is implemented using a sequence labeling model based on a pre-trained language model. This model is fine-tuned and trained on contract corpora labeled with clause type tags, learning to identify the clause type to which each paragraph belongs. The identification criteria for definition clauses may include markers such as "definition," "meaning," and "refers to"; the identification criteria for rights and obligations clauses may include obligatory expressions such as "have the right," "shall," and "responsible"; the identification criteria for breach of contract clauses may include liability expressions such as "breach of contract," "compensation," and "assume"; the identification criteria for exemption clauses may include exclusionary expressions such as "exemption," "not liable," and "except"; and the identification criteria for dispute resolution clauses may include procedural expressions such as "arbitration," "litigation," and "jurisdiction." Through this model, the contract text to be examined is classified paragraph by paragraph, and the identified clauses of each type are separated from the original text and labeled with their type tags, forming a set of clauses to be analyzed.

[0121] In step S302, dependency parsing can employ a dependency parsing model based on graph neural networks. This model is pre-trained on a general dependency parsing corpus and then fine-tuned using a legal domain contract corpus to improve the accuracy of analysis on contract texts. Dependency parsing is performed on each clause in the set of clauses to be analyzed, constructing a dependency relation tree centered on the core predicate. From this tree, the core predicate and its associated subject-object structure via dependency relation tags such as nsubj and dobj are extracted. The core predicate is typically an action verb in the clause that carries the main legal obligation or right. The subject corresponds to the party undertaking the obligation or enjoying the right, and the object corresponds to the object or content to which the obligation or right is directed. Each candidate semantic unit corresponds to a complete semantic expression, including the behavior stipulated in the clause, the subject performing the behavior, and the recipient of the behavior.

[0122] In step S303, the pre-defined fuzzy semantic dictionary is constructed by experts in the field of contract law, based on controversial expressions from historical dispute cases. The dictionary includes degree adverbs that modify the degree of behavioral standards or results; these terms lack objective quantitative standards in contracts, and different parties can interpret them favorably based on their own interests. Scope limiting terms limit the applicable subject, object, or geographical area; their ambiguity often leads to disagreements between contracting parties regarding the scope of application. Conditional assumption terms set the preconditions for the triggering of obligations or the exercise of rights; the completeness of their conditional expressions directly affects the enforceability of the clauses. The matching method can combine exact string matching with semantic similarity matching based on word vectors. Exact string matching is used to identify words explicitly included in the dictionary, while semantic similarity matching is used to identify variants that are semantically similar to words in the dictionary but have different expressions.

[0123] In step S304, candidate semantic units that match any word in the preset fuzzy semantic dictionary are marked as initial enterprise contract risk management nodes. The marking results can be recorded in the data structure as a label field, which includes a list of matched fuzzy words and matching position information.

[0124] In step S305, cross-clause association analysis extracts legal concept names and business terms appearing in each initial enterprise contract risk management node based on named entity recognition technology. It then uses string matching and semantic similarity calculation to determine whether concepts or terms appearing in different nodes point to the same entity. Nodes determined to point to the same entity are merged into aggregated enterprise contract risk management nodes. The merged nodes retain their position information in different clauses and corresponding fuzzy markers, forming a cross-clause association view.

[0125] In step S306, each enterprise contract risk management node includes attributes such as its location information in the contract, the type of clause it belongs to, the corresponding candidate semantic unit text, ambiguity markers, and cross-clause association information, providing a structured analysis object for subsequent adversarial analysis.

[0126] This embodiment categorizes contract texts by clause type through discourse structure parsing, extracts core predicates and their subject-object structures as candidate semantic units using dependency parsing, performs fuzziness detection based on a pre-set fuzzy semantic dictionary to mark initial enterprise contract risk management nodes, identifies the same concept in different clauses through cross-clause association analysis and merges them into aggregated enterprise contract risk management nodes, and finally outputs both types of nodes as enterprise contract risk management nodes, providing accurate analysis objects for subsequent adversarial inducement and risk entropy value calculation.

[0127] Please see Figure 4In some embodiments, the induced modification proposal and the corresponding original clause text are input into an enterprise contract risk certainty assessment tool to calculate the first risk entropy value of the original clause text and the second risk entropy value of the induced modification proposal, including:

[0128] S401. Input the original clause text into the enterprise contract risk certainty assessment tool. The enterprise contract risk certainty assessment tool is built based on a pre-trained language model. The enterprise contract risk certainty assessment tool performs multi-candidate risk semantic space mapping on the original clause text and generates several candidate risk semantic interpretations and their corresponding probability distributions.

[0129] S402. Based on probability distribution, calculate the risk semantic entropy value of the original clause text using the information entropy calculation formula, and use it as the first risk entropy value. The first risk entropy value is used to quantitatively characterize the degree of risk ambiguity of the original clause text.

[0130] S403. Input the induced modification suggestions into the enterprise contract risk certainty assessment tool. The enterprise contract risk certainty assessment tool performs multi-candidate risk semantic space mapping on the induced modification suggestions and generates several candidate risk semantic interpretations and their corresponding probability distributions.

[0131] S404. Based on the probability distribution, calculate the risk semantic entropy value of the induced modification proposal using the information entropy calculation formula, and use it as the second risk entropy value. The second risk entropy value is used to quantitatively characterize the degree of risk ambiguity of the induced modification proposal.

[0132] In step S401, the pre-trained language model uses the same basic architecture as the pre-trained language model on which the aforementioned adversarial inducement tool is based. In the subsequent domain fine-tuning stage, different training data and training objectives are used to form independent model instances with different functions. After pre-training on a general corpus, the pre-trained language model used by the enterprise contract risk certainty assessment tool undergoes domain fine-tuning using contract domain corpus to enhance its understanding of legal terminology and complex sentence structures in contract texts. Further fine-tuning is performed using contract clause corpus containing multiple risk semantic interpretation annotations, enabling the model to learn to identify multiple reasonable interpretations of the same clause text and assign probability values ​​to them.

[0133] Multi-candidate risk semantic space mapping refers to the process by which enterprise contract risk determinism assessment tools utilize their encoder layer to perform deep semantic encoding on the original clause text. By analyzing the multiple possible semantic roles of each word in the context and the multiple possible dependencies between words, several reasonable interpretations of the text are generated, each corresponding to a candidate point in the risk semantic space. The model decoder layer assigns a probability value to each candidate risk semantic interpretation, based on the degree of semantic consistency between the candidate interpretation and the input text. The sum of the probability values ​​of all candidate interpretations is normalized to 1, forming the candidate risk semantic interpretation and its corresponding probability distribution.

[0134] In step S402, the information entropy calculation formula can be based on Shannon's definition of information entropy. For each probability value in the candidate risk semantic interpretation and its corresponding probability distribution, take the logarithm to the base 2 (natural constant). The product of each probability value and its logarithm is summed, and the negative value is obtained; this negative value is the first risk entropy value. The first risk entropy value quantitatively characterizes the degree of risk ambiguity in the original clause text. A higher entropy value indicates that the original clause text has more possible reasonable interpretations and a more uniform probability distribution among these interpretations. In other words, the lower the risk certainty of the text, the easier it is for different parties to interpret the clause in their own favor based on their own interests.

[0135] In step S403, the induced modification suggestion is input into the enterprise contract risk certainty assessment tool. This model uses the same multi-candidate risk semantic space mapping mechanism as in step S401 to process the induced modification suggestion and generate several candidate risk semantic interpretations and their corresponding probability distributions corresponding to the suggestion text.

[0136] In step S404, based on the semantic interpretation of candidate risks and their corresponding probability distributions, the risk entropy value of the induced modification proposal is calculated using the same information entropy calculation formula as in step S402, and serves as the second risk entropy value. The second risk entropy value quantitatively characterizes the degree of risk ambiguity of the induced modification proposal, and its difference from the first risk entropy value reflects the degree of change in risk certainty of the clause after being subjected to adversarial inducement.

[0137] This embodiment uses a corporate contract risk certainty assessment tool to perform multi-candidate risk semantic space mapping on the original clause text and the induced modification suggestions, generating their respective candidate risk semantic interpretations and probability distributions. By using the information entropy calculation formula, the degree of risk ambiguity is transformed into a quantifiable first risk entropy value and a second risk entropy value, providing an accurate quantitative basis for the subsequent calculation of corporate risk entropy change value, and realizing the leap from qualitative judgment to quantitative assessment.

[0138] In some embodiments, the enterprise contract risk certainty assessment tool performs multi-candidate risk semantic space mapping on the original clause text, generating several candidate risk semantic interpretations and their corresponding probability distributions, including:

[0139] Semantic role labeling is performed on the original clause text, and the core predicates and their corresponding subject-object structures are extracted as risk semantic anchors.

[0140] Based on risk semantic anchors, the original clause text is rewritten using a preset risk semantic variant generation template. The risk semantic variant generation template includes a synonym replacement template, a word order transformation template, and a condition insertion template, generating several candidate risk semantic variant texts.

[0141] The original clause text and several candidate risk semantic variant texts are input into the risk semantic similarity discrimination model. The risk semantic similarity discrimination model outputs the risk semantic similarity score between each candidate risk semantic variant text and the original clause text.

[0142] Based on the risk semantic similarity score, the risk semantic similarity score is converted into a probability distribution using a normalized exponential function, that is, several candidate risk semantic interpretations and their corresponding probability distributions.

[0143] In this embodiment, semantic role labeling of the original clause text can be performed using dependency parsing techniques similar to those in step S302. The core predicate and its corresponding subject-object structure are extracted from the analysis results and used together as risk semantic anchors. These risk semantic anchors retain the core semantic skeleton of the original clause text, carrying the main legal obligations or rights. They serve as an immutable benchmark reference when generating candidate risk semantic variant texts, ensuring that the variant texts maintain core semantic consistency with the original clauses.

[0144] The pre-defined risk semantic variant generation templates can be designed by contract law experts based on common semantic ambiguities in contract clauses. Among them, the synonym substitution template replaces key words in the clauses with semantically similar words that may produce different legal interpretations; the word order transformation template adjusts the order of words in the clauses to change the semantic focus or modifying relationships; and the condition insertion template inserts conditional clauses to change the preconditions for triggering obligations or exercising rights. When rewriting the original clause text, each template in the risk semantic variant generation template can be configured with multiple specific rules, and all rewritten results together constitute several candidate risk semantic variant texts.

[0145] The risk semantic similarity discrimination model is built on a pre-trained language model and fine-tuned using a corpus containing paired annotations of the original text and variant texts. The training objective is to minimize the difference between the similarity score output by the model and the manually annotated similarity score. By learning, the model evaluates the degree of semantic consistency between two texts. The output risk semantic similarity score is a continuous value between 0 and 1. The higher the score, the closer the semantics of the variant text is to the original clause text.

[0146] The normalized exponential function transforms a set of real values ​​into a probability distribution, ensuring that the sum of all output values ​​is 1 and each output value is between 0 and 1. Based on the risk semantic similarity score, the normalized exponential function is used to convert the risk semantic similarity score of each candidate risk semantic variant text into a corresponding probability value. Each probability value reflects the likelihood of that candidate risk semantic variant text being a reasonable risk semantic interpretation of the original clause text. All probability values ​​constitute several candidate risk semantic interpretations and their corresponding probability distributions.

[0147] This embodiment extracts risk semantic anchors by semantic role labeling to retain the core semantic skeleton of the original clause. It uses a preset risk semantic variant generation template to generate candidate risk semantic variant texts covering multiple types of semantic ambiguity. It evaluates the semantic consistency between each variant text and the original clause by using a risk semantic similarity discrimination model. It uses a normalized exponential function to convert the similarity score into a probability distribution, providing an accurate candidate risk semantic explanation and its probability distribution for subsequent calculation of risk entropy value.

[0148] In some embodiments, the difference between the second risk entropy value and the first risk entropy value is calculated and denoted as the enterprise risk entropy change value at the enterprise contract risk management node. The enterprise risk entropy change value is used to characterize the degree of decrease in the certainty of enterprise contract risk under adversarial inducement, including:

[0149] Calculate the arithmetic difference between the second risk entropy value and the first risk entropy value to obtain the original enterprise risk entropy change value at the enterprise contract risk control node;

[0150] Obtain the contract type weight coefficient and clause type weight coefficient corresponding to the enterprise's contract risk management nodes. The contract type weight coefficient is pre-set based on the frequency of risk occurrence of different contract types in historical disputes, and the clause type weight coefficient is pre-set based on the probability of attack on definition clauses, rights and obligations clauses, breach of contract liability clauses and exemption clauses in contract disputes.

[0151] The original enterprise risk entropy change value is multiplied by the contract type weight coefficient and the clause type weight coefficient to generate the weighted enterprise risk entropy change value.

[0152] The weighted enterprise risk entropy change value is normalized to a preset numerical range and used as the final enterprise risk entropy change value at the enterprise contract risk management node.

[0153] In this embodiment, the original enterprise risk entropy change value of the enterprise contract risk management node directly reflects the absolute change in risk certainty after the enterprise contract risk management node has undergone adversarial inducement, and is the basis data for subsequent weighted calculation.

[0154] The contract type weight coefficient corresponding to the enterprise's contract risk management node is pre-set based on the frequency of risk occurrence of different contract types in historical disputes. It can be obtained by statistically analyzing the proportion of cases involving each contract type to the total number of disputes from the same or similar data sources used to build the historical contract dispute case database, and then normalizing the results. The clause type weight coefficient is pre-set based on the probability of attack on definition clauses, rights and obligations clauses, breach of contract clauses, and disclaimer clauses in contract disputes. It can be obtained by statistically analyzing the frequency of each clause type being used as the focus of disputes from the same data source, and then normalizing the results. Both types of weight coefficients can be pre-calculated and stored in a weight coefficient table, and can be directly retrieved from the table based on the contract type and clause type to which the enterprise's contract risk management node belongs during calculation.

[0155] The original enterprise risk entropy change value is weighted and multiplied with the contract type weight coefficient and the clause type weight coefficient. The impact of contract type and clause type on risk level is taken into account, so that the calculation result is more consistent with the risk distribution in actual business scenarios.

[0156] The preset numerical range can be set according to the color mapping requirements when generating the heatmap. The normalization method can be minimum-maximum normalization, which linearly maps all weighted enterprise risk entropy change values ​​to the target range, ensuring that the entropy change values ​​between different contracts are comparable.

[0157] This embodiment calculates the arithmetic difference between the second risk entropy value and the first risk entropy value to obtain the original enterprise risk entropy change value. It then introduces a weighted correction based on pre-set contract type weight coefficients and clause type weight coefficients based on historical dispute data. The weighted result is normalized to a preset numerical range as the final enterprise risk entropy change value. This overcomes the limitation that directly using the arithmetic difference cannot reflect the risk differences of different contract types and clause types, and makes the entropy change value more accurately represent the degree of adversarial vulnerability of clauses in the real business environment.

[0158] In some embodiments, obtaining the contract type weight coefficient and clause type weight coefficient corresponding to the enterprise's contract risk management node includes:

[0159] The contract type identification process is performed on the contract text to be reviewed to determine the type of contract to which the contract text belongs. Contract types include sales contracts, lease contracts, service contracts, and intellectual property contracts.

[0160] Retrieve a set of dispute cases matching the contract type from the historical contract dispute database, count the frequency of each clause type appearing as the focus of the dispute in the dispute case set, and generate a clause type frequency distribution vector;

[0161] The frequency distribution vector of clause types is normalized to obtain the clause type weight coefficients corresponding to the enterprise's contract risk control nodes;

[0162] The set of dispute cases matching the contract type is retrieved from the historical contract dispute database, and the proportion of the number of cases involving the contract type in the dispute case set is used as the risk benchmark value for the contract type.

[0163] Obtain the contract amount and contract term of the contract text to be reviewed, and map the contract amount and contract term to a preset risk adjustment coefficient table to obtain the risk adjustment coefficient;

[0164] The risk benchmark value and the risk adjustment coefficient are multiplied to generate the contract type weight coefficient corresponding to the enterprise's contract risk control node.

[0165] In this embodiment, contract type identification can be achieved by extracting contract name keywords from the title or introduction of the contract text to be reviewed and matching them with a preset contract type keyword library. Alternatively, a text classification model based on a pre-trained language model can be used to classify the contract according to its overall content characteristics. Sales contracts, lease contracts, service contracts, and intellectual property contracts are common types of commercial contracts. Different types of contracts exhibit significant differences in risk characteristics and dispute focus distribution in disputes. Therefore, weight coefficients are assigned to different types of contracts.

[0166] When calculating the frequency of occurrence of each clause type as the focus of a dispute in a collection of dispute cases, the same clause type that appears repeatedly in the same dispute case is excluded and counted only once to avoid duplicate statistics. A clause type frequency distribution vector is generated, with each dimension corresponding to each clause type. The value of each dimension is the number of times that clause type appears as the focus of a dispute in the collection of dispute cases.

[0167] To normalize the frequency distribution vector of contract types, a summation normalization method can be used. This involves dividing each dimension value by the sum of all dimension values, mapping each value to between 0 and 1, with a sum of 1. The result is the contract type weight coefficient corresponding to the enterprise's contract risk management node. When calculating the proportion of cases involving contract types in a dispute case set to the total number of disputes, the statistical time range can be limited to dispute data from the past five or ten years to reflect the current risk level. This proportion serves as the risk benchmark value for the contract type.

[0168] The contract amount and term of the contract to be reviewed can be obtained by extracting them from the price and term clauses of the contract text through rule matching or named entity recognition. A pre-defined risk adjustment coefficient table can be set by domain experts based on industry experience, or learned from historical data through regression analysis. The table records the risk adjustment coefficients corresponding to different amount and term ranges.

[0169] This embodiment identifies the type of contract to be reviewed by contract type identification, statistically analyzes the frequency of each clause type as the focus of dispute from the historical contract dispute database and normalizes it into clause type weight coefficients, statistically analyzes the risk benchmark value of the contract type and calculates the contract type weight coefficient by combining the risk adjustment coefficient obtained by mapping the contract amount and contract term, and provides a refined method for determining the weight coefficient for the weighted calculation of entropy change value.

[0170] In some embodiments, the enterprise risk entropy change values ​​of all enterprise contract risk management nodes are sorted, and the enterprise risk entropy change values ​​are mapped to the corresponding positions in the contract text to be reviewed, generating and outputting an enterprise contract risk vulnerability management heatmap, including:

[0171] All enterprise contract risk management nodes are sorted in descending order of their corresponding enterprise risk entropy change values ​​to generate a vulnerability ranking list.

[0172] For each enterprise contract risk management node in the vulnerability ranking list, the corresponding color label is matched from the preset color chart map table according to the numerical range of its enterprise risk entropy change value. The high entropy change value range in the color chart map table corresponds to the warm color label, and the low entropy change value range corresponds to the cool color label.

[0173] In the original layout of the contract text to be reviewed, locate the text segment corresponding to each enterprise's contract risk management node;

[0174] Color markers are overlaid at the text fragment locations to generate a heat map of enterprise contract risk vulnerability management. The heat map of enterprise contract risk vulnerability management intuitively displays the degree of adversarial vulnerability of each clause area with the intensity of color.

[0175] The heatmap of enterprise contract risk vulnerability management is linked with the vulnerability ranking list. Each enterprise contract risk management node in the vulnerability ranking list is accompanied by corresponding induced modification suggestions and response strategy suggestions.

[0176] In this embodiment, the vulnerability ranking list is generated by sorting the enterprise risk entropy change values ​​corresponding to all enterprise contract risk management nodes in descending order using a quicksort or mergesort algorithm. Each node in the list is accompanied by its entropy change value and its position in the contract. A preset color chart can be designed by domain experts according to visualization needs, establishing a mapping relationship between the numerical ranges of enterprise risk entropy change values ​​and color identifiers. For example, high entropy change value ranges correspond to warm colors such as red and orange, low entropy change value ranges correspond to cool colors such as blue and green, and intermediate ranges correspond to transitional colors such as yellow. For each enterprise contract risk management node in the vulnerability ranking list, the corresponding color identifier is matched from the color chart based on the numerical range of its enterprise risk entropy change value.

[0177] In the original version of the contract text to be reviewed, the position of the text fragment corresponding to each enterprise contract risk control node is determined based on the node position information recorded during the enterprise risk compliance assessment in step S101, including the start character index and the end character index. Color markers are overlaid at the text fragment positions, which can be achieved by adding color marks to the text background or to the underlined areas. The generated enterprise contract risk vulnerability control heatmap is output in PDF, HTML, or image format, with color depth intuitively displaying the adversarial vulnerability level of each clause area.

[0178] When the enterprise contract risk vulnerability management heatmap is associated with the vulnerability ranking list, each enterprise contract risk management node in the vulnerability ranking list is accompanied by corresponding induced modification suggestions and response strategy suggestions. The induced modification suggestions are derived from the output of the adversarial inducement tool in step S102, and the response strategy suggestions can be automatically generated by the strategy mapping model based on the induced modification suggestions. The strategy mapping model is trained based on the defense strategy text of the winning party in historical disputes, takes the induced modification suggestions as input, and outputs the corresponding response strategy suggestion text.

[0179] This embodiment generates a vulnerability ranking list by sorting in descending order, matches color identifiers from a chromatogram map based on entropy change values, locates text fragments based on location information recorded during risk assessment, overlays color identifiers to generate a heatmap, and outputs it in conjunction with the vulnerability ranking list that includes suggestive modification recommendations and response strategies. This presents the quantitative assessment results in an intuitive and visual form, helping reviewers quickly locate high-risk clause areas and obtain corresponding modification recommendations and response strategies.

[0180] In a second aspect, this embodiment also provides a contract adversarial automatic review and optimization system 1 based on a large language model, applicable to the method described in the first aspect. The system includes an enterprise risk compliance assessment module 11, an adversarial inducement module 12, a risk entropy value calculation module 13, a risk entropy change analysis module 14, and a heat map generation module 15. The enterprise risk compliance assessment module 11 is used to obtain the contract text to be reviewed, perform enterprise risk compliance assessment on the contract text to be reviewed, and extract several enterprise contract risk control nodes. The adversarial inducement module 12 is equipped with an adversarial inducement tool based on enterprise risk reverse control thinking training, used to generate an inducement modification suggestion for each enterprise contract risk control node. The inducement modification suggestion is a seemingly reasonable but potentially risky modification of the enterprise contract clause text. The risk entropy value calculation module 13... An enterprise contract risk certainty assessment tool is deployed to input the induced modification suggestions and the corresponding original clause text into the tool, and calculate the first risk entropy value of the original clause text and the second risk entropy value of the induced modification suggestions, respectively. The risk entropy change analysis module 14 is used to calculate the difference between the second risk entropy value and the first risk entropy value, which is recorded as the enterprise risk entropy change value of the enterprise contract risk control node. The enterprise risk entropy change value is used to characterize the degree of decrease in the certainty of enterprise contract risk under adversarial inducement. The heat map generation module 15 is used to sort the enterprise risk entropy change values ​​of all the enterprise contract risk control nodes, map the enterprise risk entropy change values ​​to the corresponding positions of the contract text to be reviewed, generate an enterprise contract risk vulnerability control heat map and output it.

[0181] In this embodiment, the enterprise risk compliance assessment module 11, the adversarial inducement module 12, the risk entropy calculation module 13, the risk entropy change analysis module 14, and the heatmap generation module 15 are sequentially connected. Each module is used to execute the corresponding risk assessment, adversarial inducement, risk entropy calculation, risk entropy change analysis, and heatmap generation steps in the aforementioned methods. This system integrates the aforementioned methods into a unified framework through modular deployment, achieving fully automated processing from contract text input to risk heatmap output, providing enterprises with a systematic adversarial vulnerability assessment tool for contract review.

[0182] By adopting the above technical solutions, this invention differs from existing technologies and possesses the following beneficial effects: It transforms unstructured contract texts into structured risk management nodes through enterprise risk compliance assessment, providing precise targets for adversarial analysis; it deploys adversarial inducement tools based on reverse management thinking to proactively generate induced modification suggestions from the perspective of the contract counterparty, achieving a leap from passively identifying risks to actively probing the vulnerability of clauses; furthermore, it introduces risk entropy values ​​based on information entropy to quantitatively assess both the original and induced clauses, transforming the ambiguity of risk into quantifiable values; it quantifies the vulnerability of clauses in adversarial scenarios by calculating entropy changes, and introduces weighted corrections based on contract type and clause type weighting coefficients to make the assessment results more closely aligned with actual business scenarios; finally, it maps entropy changes to the corresponding positions in the original contract text in the form of a heatmap, intuitively presenting the risk distribution and outputting induced modification suggestions and response strategies. This invention constructs a complete closed-loop review process from proactive attack to quantitative assessment to visual output, improving the depth, accuracy, and decision-making efficiency of contract review.

[0183] Finally, it should be noted that although the above embodiments have been described in the text and drawings of this application, this should not limit the scope of patent protection of this application. Any technical solutions that are based on the essential concept of this application and utilize the content described in the text and drawings of this application, resulting in equivalent structural or procedural substitutions or modifications, as well as the direct or indirect application of the technical solutions of the above embodiments to other related technical fields, are all included within the scope of patent protection of this application.

Claims

1. An optimized method for automatic contract adversarial review based on a large language model, characterized in that, include: Obtain the contract text to be reviewed, conduct enterprise risk and compliance assessment on the contract text to be reviewed, and extract several enterprise contract risk control nodes; Deploy an adversarial inducement tool, which is based on enterprise risk reverse management thinking training and generates an inducement modification suggestion for each enterprise contract risk management node. The inducement modification suggestion is a seemingly reasonable but potentially risky modification text of the enterprise contract terms. The induced modification suggestions and the corresponding original clause text are input into the enterprise contract risk certainty assessment tool to calculate the first risk entropy value of the original clause text and the second risk entropy value of the induced modification suggestions, respectively. The difference between the second risk entropy value and the first risk entropy value is calculated and recorded as the enterprise risk entropy change value of the enterprise contract risk control node. The enterprise risk entropy change value is used to characterize the degree of decrease in the certainty of enterprise contract risk under the adversarial inducement of the clause. The enterprise risk entropy change values ​​of all the enterprise contract risk management nodes are sorted, and the enterprise risk entropy change values ​​are mapped to the corresponding positions of the contract text to be reviewed, generating and outputting an enterprise contract risk vulnerability management heat map.

2. The automatic contract adversarial review optimization method based on a large language model according to claim 1, characterized in that, The adversarial inducement tool is constructed through the following steps: Access a historical contract dispute case database, which includes disputed contract texts and corresponding texts of the key points of the dispute; Extract from the text of the disputed core text the offensive arguments of one party that use vague wording of contract terms to make favorable interpretations; The offensive argument texts are paired with the corresponding disputed contract clause texts to construct induced training sample pairs; Using the disputed contract clause text in the induced training sample pair as input and the corresponding offensive argument text as expected output, the pre-trained language model is trained, enabling the pre-trained language model to learn the ability to reverse reason from contract clauses to offensive arguments. The pre-trained language model is deployed as the adversarial inducement tool.

3. The automatic contract adversarial review optimization method based on a large language model according to claim 2, characterized in that, Extract from the text of the disputed core issue text any offensive arguments by which one party uses ambiguous wording in the contract to their advantage, including: Semantic role labeling is performed on the texts concerning the focus of the dispute to identify and extract the claimant, the target clause, and the logical chain of favorable interpretation, which are then used as candidate argument triples. Fuzzy semantic matching is performed on the attack target clauses in the candidate argument triples, and candidate argument triples that match any word in the preset fuzzy semantic dictionary are marked as fuzzy related arguments. A causal structure analysis is performed on the favorable explanatory logical chains in the aforementioned fuzzy related arguments, and arguments containing hypothetical condition derivation or analogical reasoning are extracted and denoted as logical attack arguments. The adversarial strength score is calculated based on the number of legal principles cited in the favorable explanatory logical chain, the length of the reasoning steps, and the degree of exclusivity of the conclusion. The text corresponding to logical offensive arguments whose adversarial strength score exceeds a preset threshold is used as the offensive argument text.

4. The automatic contract adversarial review optimization method based on a large language model according to claim 1, characterized in that, Obtain the contract text to be reviewed, conduct enterprise risk and compliance assessment on the contract text, and extract several enterprise contract risk control nodes, including: The contract text to be reviewed is analyzed to identify and separate the definition clauses, rights and obligations clauses, breach of contract liability clauses, disclaimer clauses and dispute resolution clauses, which are then used as the set of clauses to be analyzed. Dependency parsing is performed on each clause in the set of clauses to be analyzed to extract the core predicate and its corresponding subject-object structure as candidate semantic units. For each candidate semantic unit, fuzziness detection is performed. The fuzziness detection is based on a preset fuzzy semantic dictionary, which includes degree adverbs, range limiting words, and conditional hypothesis words. Candidate semantic units that match any word in the fuzzy semantic dictionary are marked as initial enterprise contract risk management nodes; Cross-clause correlation analysis is performed on the initial enterprise contract risk control nodes to identify the same legal concept or business term that appears repeatedly or is mutually referenced in different clauses. Initial enterprise contract risk control nodes with cross-clause correlation are merged into aggregated enterprise contract risk control nodes. The initial enterprise contract risk management node and the aggregated enterprise contract risk management node are used together as the enterprise contract risk management node.

5. The automatic contract adversarial review optimization method based on a large language model according to claim 1, characterized in that, The suggested induced modifications and the corresponding original clause text are input into the enterprise contract risk certainty assessment tool to calculate the first risk entropy value of the original clause text and the second risk entropy value of the suggested induced modifications, including: The original clause text is input into the enterprise contract risk deterministic assessment tool, which is built based on a pre-trained language model. The enterprise contract risk deterministic assessment tool performs multi-candidate risk semantic space mapping on the original clause text to generate several candidate risk semantic interpretations and their corresponding probability distributions. Based on the probability distribution, the risk semantic entropy value of the original clause text is calculated using the information entropy calculation formula, and is used as the first risk entropy value. The first risk entropy value is used to quantitatively characterize the degree of risk ambiguity of the original clause text. The induced modification suggestion is input into the enterprise contract risk deterministic assessment tool, which performs multi-candidate risk semantic space mapping on the induced modification suggestion to generate several candidate risk semantic interpretations and their corresponding probability distributions. Based on the probability distribution, the risk semantic entropy value of the induced modification proposal is calculated using the information entropy calculation formula, and is used as the second risk entropy value. The second risk entropy value is used to quantitatively characterize the degree of risk ambiguity of the induced modification proposal.

6. The automatic contract adversarial review optimization method based on a large language model according to claim 5, characterized in that, The enterprise contract risk determinism assessment tool performs multi-candidate risk semantic space mapping on the original clause text, generating several candidate risk semantic interpretations and their corresponding probability distributions, including: Semantic role labeling is performed on the original clause text, and the core predicates and the subject-object structures corresponding to the core predicates are extracted as risk semantic anchors; Based on the risk semantic anchor, the original clause text is rewritten using a preset risk semantic variant generation template, which includes a synonym replacement template, a word order transformation template, and a condition insertion template, to generate several candidate risk semantic variant texts. The original clause text and the several candidate risk semantic variant texts are input into the risk semantic similarity discrimination model, and the risk semantic similarity discrimination model outputs the risk semantic similarity score between each candidate risk semantic variant text and the original clause text; Based on the risk semantic similarity score, the risk semantic similarity score is converted into a probability distribution using a normalized exponential function, namely, several candidate risk semantic interpretations and their corresponding probability distributions.

7. The automatic contract adversarial review optimization method based on a large language model according to claim 1, characterized in that, The difference between the second risk entropy value and the first risk entropy value is calculated and denoted as the enterprise risk entropy change value of the enterprise contract risk management node. This enterprise risk entropy change value is used to characterize the degree of decrease in the certainty of enterprise contract risk under adversarial inducement, including: Calculate the arithmetic difference between the second risk entropy value and the first risk entropy value to obtain the original enterprise risk entropy change value of the enterprise contract risk control node; Obtain the contract type weight coefficient and clause type weight coefficient corresponding to the enterprise's contract risk control node. The contract type weight coefficient is pre-set based on the frequency of risk occurrence of different contract types in historical disputes. The clause type weight coefficient is pre-set based on the probability of attack on definition clauses, rights and obligations clauses, breach of contract liability clauses and exemption clauses in contract disputes. The original enterprise risk entropy change value is multiplied by the contract type weight coefficient and the clause type weight coefficient to generate the weighted enterprise risk entropy change value. The weighted enterprise risk entropy change value is normalized to a preset numerical range and used as the final enterprise risk entropy change value of the enterprise contract risk management node.

8. The automatic contract adversarial review optimization method based on a large language model according to claim 7, characterized in that, Obtain the contract type weight coefficient and clause type weight coefficient corresponding to the enterprise's contract risk management node, including: The contract text to be reviewed is identified to determine the type of contract to which it belongs. The contract types include sales contracts, lease contracts, service contracts, and intellectual property contracts. Retrieve a set of dispute cases matching the contract type from the historical contract dispute database, count the frequency of each clause type appearing as the focus of the dispute in the set of dispute cases, and generate a clause type frequency distribution vector; The frequency distribution vector of the clause type is normalized to obtain the clause type weight coefficient corresponding to the enterprise contract risk control node; The set of dispute cases matching the contract type is retrieved from the historical contract dispute database, and the proportion of the number of cases involving the contract type in the dispute case set to the total number of dispute cases is calculated as the risk benchmark value of the contract type. Obtain the contract amount and contract term of the contract text to be reviewed, and map the contract amount and contract term to a preset risk adjustment coefficient table to obtain the risk adjustment coefficient; The risk benchmark value and the risk adjustment coefficient are multiplied to generate the contract type weight coefficient corresponding to the enterprise contract risk control node.

9. The automatic contract adversarial review optimization method based on a large language model according to claim 1, characterized in that, Based on the enterprise risk entropy change values ​​of all the enterprise contract risk management nodes, sort the enterprise risk entropy change values, map the enterprise risk entropy change values ​​to the corresponding positions of the contract text to be reviewed, generate and output an enterprise contract risk vulnerability management heatmap, including: All the enterprise contract risk management nodes are sorted in descending order of their corresponding enterprise risk entropy change values ​​to generate a vulnerability sorting list. For each enterprise contract risk management node in the vulnerability ranking list, a corresponding color identifier is matched from a preset color mapping table based on the numerical range of its enterprise risk entropy change value. The high entropy change value range in the color mapping table corresponds to warm color identifiers, and the low entropy change value range corresponds to cool color identifiers. In the original layout of the contract text to be reviewed, locate the text segment corresponding to each enterprise contract risk control node; The color markers are overlaid at the locations of the text fragments to generate a heat map of enterprise contract risk vulnerability management. The heat map of enterprise contract risk vulnerability management intuitively displays the degree of adversarial vulnerability of each clause area with the intensity of color. The heatmap of enterprise contract risk vulnerability management is associated with the vulnerability ranking list and output. Each enterprise contract risk management node in the vulnerability ranking list is accompanied by corresponding induced modification suggestions and response strategy suggestions.

10. A contract adversarial automatic review and optimization system based on a large language model, characterized in that, The system applicable to the method of any one of claims 1 to 9 comprises: The enterprise risk and compliance assessment module is used to obtain the contract text to be reviewed, conduct enterprise risk and compliance assessment on the contract text to be reviewed, and extract several enterprise contract risk control nodes. The adversarial inducement module is equipped with an adversarial inducement tool based on the enterprise risk reverse management thinking training. It is used to generate an inducement modification suggestion for each enterprise contract risk management node. The inducement modification suggestion is a seemingly reasonable but potentially risky modification text of the enterprise contract terms. The risk entropy calculation module is equipped with an enterprise contract risk certainty assessment tool. It is used to input the induced modification suggestion and the corresponding original clause text into the enterprise contract risk certainty assessment tool to calculate the first risk entropy value of the original clause text and the second risk entropy value of the induced modification suggestion, respectively. The risk entropy change analysis module is used to calculate the difference between the second risk entropy value and the first risk entropy value, which is denoted as the enterprise risk entropy change value of the enterprise contract risk control node. The enterprise risk entropy change value is used to characterize the degree of decrease in the certainty of enterprise contract risk under the adversarial inducement of the clause. The heatmap generation module is used to sort the enterprise risk entropy change values ​​of all the enterprise contract risk control nodes, map the enterprise risk entropy change values ​​to the corresponding positions of the contract text to be reviewed, generate an enterprise contract risk vulnerability control heatmap and output it.