Contract generation method and system based on multi-round dialogue interaction and intelligent element extraction

By using multi-round dialogue interaction and intelligent element extraction technology, structured contracts are dynamically generated, solving the problems of low efficiency, unintelligent interaction, and uncontrollable compliance in existing systems, and realizing efficient and intelligent automatic contract generation.

CN120611727BActive Publication Date: 2026-01-09INSPUR GENERSOFT CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202511121505.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-08-12
Publication Date
2026-01-09
Estimated Expiration
2045-08-12

AI Technical Summary

Technical Problem

Existing automatic contract generation systems are inefficient, lack intelligent interaction, and have uncontrollable compliance. They are also difficult to dynamically adjust and verify in real time, resulting in time-consuming form filling, easy omission of key information, and high compliance risks.

Method used

Employing multi-turn dialogue interaction technology, the system uses a pre-trained large model for intent recognition and entity extraction, combined with a legal knowledge graph for verification, to dynamically generate structured contract data and achieve three levels of integrity detection: field integrity, clause logical consistency, and legal compliance.

Benefits of technology

It improves the efficiency and accuracy of contract generation, reduces the number of interactions, enhances the user experience, ensures the integrity and compliance of contracts, and reduces compliance risks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120611727B_ABST
    Figure CN120611727B_ABST
Patent Text Reader

Abstract

The application belongs to the field of contract generation, and provides a contract generation method and system based on multi-round dialogue interaction and intelligent element extraction, carries out multi-round dialogue interaction, uses a pre-trained large model to perform intent recognition on the multi-round dialogue content of the interaction, determines the keywords therein, determines the operation to be performed and the belonging intent of contract generation according to the matching relationship of the pre-configured keywords-contract operation, and sequentially carries out field integrity checking, clause logic consistency checking and legal compliance verification; uses a pre-trained model to identify the missing contract elements in the contract, calculates the question priority of each missing contract element, generates a question according to the question priority and the contract business scenario, and supplements the missing contract elements; and assembles and generates a contract document based on the complete contract elements. The application improves the contract generation efficiency and accuracy, and enhances the user experience.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application belongs to the field of contract generation, and particularly relates to a contract generation method and system based on multi-round dialogue interaction and intelligent element extraction. BACKGROUND

[0002] The statements in this section merely provide background information related to the present application and do not necessarily constitute the prior art.

[0003] Contract automatic generation systems have been widely used in many fields, but the existing contract automatic generation systems generally provide fixed questionnaires or forms, and the user fills in the template after filling in, and some support simple conditional logic. This scheme has the following problems:

[0004] ‌Low efficiency of filling in forms‌: relying on manual filling of fixed templates, unable to dynamically adjust the questions, and needing to repeatedly check the clauses, time-consuming and easy to miss key information such as amount, signing party, and breach of contract liability;

[0005] ‌Unintelligent interaction‌: the existing system is mostly in the form of form input, and cannot understand natural language instructions, and cannot dynamically guide the user to supplement missing elements;

[0006] ‌High compliance risk‌: the existing system mostly uses rule engines to define contract generation logic, which requires regular manual rule maintenance, and the maintenance cost increases exponentially with the increase of contract types. If a neural network model is used for generation, it has a certain black box nature, and the compliance is uncontrollable, and it is easy to have clause conflicts or legal loopholes, and lacks a real-time checking mechanism. SUMMARY

[0007] In order to solve the above problems, the present application provides a contract generation method and system based on multi-round dialogue interaction and intelligent element extraction. The present application actively guides the user to provide key elements of the contract through multi-round dialogue, dynamically generates structured contract data in combination with intent recognition and entity extraction technology, and verifies based on a legal knowledge graph, thereby improving the contract generation efficiency and accuracy and enhancing the user experience.

[0008] According to some embodiments, the present application adopts the following technical scheme:

[0009] A contract generation method based on multi-round dialogue interaction and intelligent element extraction, comprising the following steps:

[0010] Performing multi-round dialogue interaction, using a pre-trained large model to perform intent recognition on the multi-round dialogue content of the interaction, determining the keywords therein, and determining the operation to be performed for contract generation and the belonging intent according to the preconfigured matching relationship between the keywords and the contract operation;

[0011] The field integrity check, the clause logic consistency check and the legal compliance verification are sequentially performed to realize three-level integrity detection.

[0012] The pre-trained model is used to identify missing contract elements in the contract, calculate a question priority of each missing contract element, generate a question based on the question priority and a contract business scenario, and supplement the missing contract elements through the question;

[0013] Based on the complete contract elements, a contract document is assembled and generated, a pre-trained analysis model is used to perform compliance analysis on the generated contract document, a modification suggestion is generated, and the generated contract document and the modification suggestion are stored.

[0014] As an optional implementation, the keywords are determined, the preconfigured matching relationship between the keywords and the operations required for contract generation is determined, the operations required for contract generation and the process of the corresponding intent are determined, the operations required for contract generation are pre-built, specifically including contract creation, contract modification and contract query, the keywords involved in each operation are preset, the matching relationship between each keyword and the corresponding operation required for contract generation is formed, and the keywords obtained through intent recognition are matched with the operations required for contract generation based on the matching relationship.

[0015] As a further implementation, in the process of matching the operations required for contract generation based on the keywords obtained through intent recognition and the matching relationship, error handling and semantic expansion are supported, if the user input information has a wrong word related to the preset keyword or a field that is a synonym of the preset keyword, it is considered that the corresponding keyword is matched.

[0016] As an optional implementation, the multi-round dialogue interaction is performed, the keywords in the user's query are counted in the process of using the pre-trained large model to identify the intent of the multi-round dialogue content, and if the frequency of the keywords in the query exceeds a set value, the preset keywords are expanded according to the user's question.

[0017] As an optional implementation, the multi-round dialogue interaction is performed, the keywords in the user's query are counted in the process of using the pre-trained large model to identify the intent of the multi-round dialogue content, and if the frequency of the keywords in the query exceeds a set value, the preset keywords are expanded according to the user's question.

[0018] When new dialogue information is obtained, the latest intent is focused on, and associated questions are generated according to a semantic similarity greater than a set value to maintain the coherence of the dialogue;

[0019] When new dialogue information is acquired, according to the content of the dialogue information, triggering the recommended preset business rule chain associated information;

[0020] If the same slot information is modified more than a set number of times in multiple rounds of dialogue, or if the user's emotion is judged to be confused after analyzing the dialogue text using a pre-trained model, it is considered a complex scenario, and step-by-step guided questioning is performed.

[0021] As a further defined embodiment, the process of judging the user's emotion to be confused after analyzing the dialogue text using a pre-trained model includes: analyzing the dialogue text using a pre-trained model, if more than a certain number of hesitation words or / and negative expressions are detected in the user's query input, the pause duration exceeds a certain value, the query input field is deleted or modified more than a certain number of times, the chapter jump frequency exceeds a certain threshold, all of which are quantitatively calculated, the more the exceeding part, the higher the emotional confusion degree, the final score is obtained by weighting and summing each calculation score, if the final score is higher than the threshold, the user's emotion is judged to be confused.

[0022] As an alternative embodiment, the process of implementing three-level integrity detection by sequentially performing field integrity verification, clause logic consistency verification, and legal compliance verification includes:

[0023] Performing field integrity verification, evaluating the contract basic fields, in response to a single field input event, loading the list of mandatory fields from the contract template library, scanning the user's filled field status, calculating the ratio of the number of filled mandatory fields to the total number of mandatory fields to obtain the integrity score;

[0024] Performing clause logic consistency verification, performing context analysis on the contract clauses to determine whether there are logical conflicts, the logical conflicts include numerical conflicts and content conflicts, if there are, a warning is given;

[0025] Performing legal compliance verification, using a pre-trained model to perform semantic matching of contract clauses and legal provisions, locating strongly related clauses, calculating the ratio of clause compliance matching degree and total number of strongly related clauses, if the ratio is less than a certain value, a risk is prompted and a correction guide is given.

[0026] As an alternative embodiment, the process of calculating the priority of each missing contract element includes: calculating the priority score, priority score = legal foundation weight × business emergency coefficient × (1 - completion progress ratio), wherein the legal foundation weight is determined according to the predefined knowledge graph definition value, the business emergency coefficient is configured according to the contract type, and the completion progress ratio = number of filled elements / total number of elements.

[0027] As an alternative implementation, according to the question priority and the contract business scenario, the process of generating the question comprises: if the missing contract element belongs to a legally mandatory element, adopting a statute citation type question to ask for the content of the missing element according to the legal mandatory question;

[0028] If the missing contract element belongs to a business element with limited enumeration values, an option guided type question is adopted to give multiple options for the user to directly select;

[0029] If the expression complexity of the involved clause is higher than a set value, an example assisted type question is adopted to extract a similar clause from a historical contract library as an example to ask the question;

[0030] If the missing contract element belongs to a fuzzy or contradictory input, a clarification confirmation type question is adopted to make the user determine the final selection between the two;

[0031] If the missing contract element belongs to a composite element, a hierarchical follow-up type question is adopted to divide into multiple levels, and the levels are successively narrowed to determine the question.

[0032] A contract generation system based on multi-round dialogue interaction and intelligent element extraction, comprising:

[0033] An intention recognition module configured to perform multi-round dialogue interaction, utilize a pre-trained large model to perform intention recognition on the multi-round dialogue content of the interaction, determine keywords therein, and determine an operation to be performed for contract generation and a belonging intention according to a preconfigured matching relationship between the keywords and the contract operation;

[0034] A completeness detection module configured to perform field completeness verification, clause logic consistency verification and legal compliance verification in sequence to realize three-level completeness detection;

[0035] An element extraction and supplement module configured to utilize a pre-trained model to recognize missing contract elements in a contract, calculate a question priority of each missing contract element, generate a question according to the question priority and a contract business scenario, and supplement the missing contract elements through the question;

[0036] A contract generation module configured to assemble and generate a contract document based on complete contract elements, utilize a pre-trained analysis model to perform compliance analysis on the generated contract document, generate a modification suggestion, and store the generated contract document and the modification suggestion.

[0037] Compared with the prior art, the present application has the following beneficial effects:

[0038] The application combines multi-round dialogue driving and contract element completion, realizes real-time recognition of user intention, judgment of missing elements through intelligent interaction, generates targeted questions, and finally forms a complete and compliant contract text, can generate dialogue / questions for different problems and situations, minimize the number of interactions, improve interaction efficiency, realize flexible questioning of necessary elements, and improve the control ability of structured elements.

[0039] In the multi-round dialogue process, the application counts high-frequency query words of the user, and automatically expands the word library according to the user's question. If the user's question does not match the key word, but the deep analysis of the large model shows that the intention is related to the contract filling, the key word in the user's question can be extracted and added to the word library. In combination with the context information of the current interaction, the processing strategy is adjusted in real time to provide more accurate and coherent service experience, avoid repeated questioning, and improve interaction efficiency.

[0040] The application optimizes the multi-round dialogue process based on the information redundancy elimination principle, the dialogue coherence guarantee principle, the associated information association principle and the complex scene degradation principle, which helps to ask targeted questions and improve the accuracy of interaction.

[0041] The application sequentially performs field integrity verification, clause logic consistency verification and legal compliance verification, realizes three-level integrity detection, and improves the correctness, logical consistency, integrity and compliance of the contract clauses from multiple aspects.

[0042] According to the contract data model and the mandatory items, the application identifies the currently missing contract elements, calculates the question priority of each missing element, asks questions according to the priority, and sets multiple question modes, which can be automatically selected according to the specific situation and scene of the missing element, helping to reduce the number of questions, reduce the difficulty of answering questions for users, and improve accuracy and efficiency.

[0043] In order to make the above-mentioned purposes, characteristics and advantages of the present application more obvious and easy to understand, the following preferred embodiments are described in detail below, and the accompanying drawings are described as follows. BRIEF DESCRIPTION OF DRAWINGS

[0044] The drawings accompanying the specification of the present application form part of the present application and serve to provide a further understanding of the present application, the exemplary embodiments of the present application and the description thereof serve to explain the present application and do not constitute an improper limitation of the present application.

[0045] Figure 1 It is a whole process schematic diagram of an embodiment;

[0046] Figure 2 It is an intention recognition process schematic diagram of an embodiment;

[0047] Figure 3 It is a context awareness optimization process schematic diagram of an embodiment;

[0048] Figure 4 is a schematic diagram of a contract element integrity evaluation process of an embodiment;

[0049] Figure 5 is a schematic diagram of a question generation process of an embodiment. DETAILED DESCRIPTION

[0050] The application will be further described below in conjunction with the accompanying drawings and embodiments.

[0051] It should be noted that the following detailed description is illustrative only and is intended to provide further description of the application. Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs.

[0052] It should be noted that the terms used herein are only intended to describe specific embodiments and are not intended to limit exemplary embodiments according to the present application. As used herein, the singular form is intended to include the plural form unless the context clearly indicates otherwise, and it should be further understood that when the terms "comprise" and / or "include" are used in this specification, they indicate the presence of a feature, step, operation, device, component, and / or combinations thereof.

[0053] The embodiments in the present application and the features in the embodiments can be combined with each other without conflict.

[0054] Embodiment One

[0055] A contract generation method based on multi-round dialogue interaction and intelligent element extraction, as shown in Figure 1 includes the following steps:

[0056] Multi-round dialogue interaction is performed, a pre-trained large model is used to perform intent recognition on the multi-round dialogue content of the interaction, key words are determined, a preconfigured matching relationship between the key words and contract operations is used to determine the operations to be performed for contract generation and the corresponding intent;

[0057] Field integrity verification, clause logic consistency verification, and legal compliance verification are performed in sequence to achieve three-level integrity detection;

[0058] A pre-trained model is used to identify missing contract elements in the contract, calculate the question priority of each missing contract element, generate a question based on the question priority and the contract business scenario, and supplement the missing contract elements through the question;

[0059] Based on complete contract elements, the contract document is assembled and generated, a pre-trained analysis model is used to analyze the generated contract document for compliance, modification suggestions are generated, and the generated contract document and modification suggestions are stored.

[0060] In this embodiment, the intent recognition adopts a dual-channel intent recognition system, combining keyword triggering and deep understanding of large models to achieve high-precision judgment in the contract professional field. The operations that need to be performed for contract generation are pre-constructed, specifically including contract creation, contract modification, and contract query. The keywords involved in each operation are preset, and a matching relationship is formed between each keyword and the operation it corresponds to. Based on the keywords obtained through intent recognition, the operation that needs to be performed for contract generation is matched according to the matching relationship.

[0061] As shown in Figure 2 , according to user input, keyword matching is performed. If matching is found, the contract processing flow is entered. Otherwise, deep analysis is performed using a large model, and intent classification decision is made. If the decision result is considered to be related to the contract, the contract processing flow is entered. Otherwise, other business processes are transferred.

[0062] For example, the dynamic keyword library is:

[0063] {

[0064] 'contract creation': ['new', 'draft', 'generate', 'handle'],

[0065] 'contract modification': ['change', 'adjust', 'update', 'correct'],

[0066] 'contract query': ['view','search', 'find','retrieve']

[0067] }

[0068] In the process of matching the operation that needs to be performed for contract generation based on the keywords obtained through intent recognition and according to the matching relationship, fault tolerance processing and semantic expansion are supported. If the user input information has a misspelled word related to the preset keyword or a field that is a synonym of the preset keyword, it is considered equivalent to the corresponding keyword for matching.

[0069] That is, this embodiment supports exact matching: directly triggering the corresponding operation, such as "new contract".

[0070] It also supports fuzzy matching: supporting certain fault tolerance processing, such as "new contract" being equivalent to "new contract".

[0071] Semantic expansion: recognizing synonyms, such as synonyms of "handle" can include "process" and "report".

[0072] In this embodiment, a large model can also be used to assist in decision-making and deep analysis. The large model receives prompt words, makes intent classification decisions, and returns decision results. For example, the input of whether the user wants to handle contract business is received, and the user's intent is determined based on the user input. During intent recognition, focus on contract operation verbs, and ignore non-business description sentences.

[0073] During the multi-round dialogue interaction, the pre-trained large model is used to identify the intent of the multi-round dialogue content. The user's high-frequency query words are counted, and the word library is automatically expanded according to the user's questions. For example, if the user's question does not match the key words, but the large model deeply analyzes the intent as a contract filling related intent, the key words in the user's question are extracted and added to the word library.

[0074] As shown in Figure 3 In some embodiments, the context information of the current interaction of the user (such as historical dialogue, operation record, and environment state) can also be combined to adjust the processing strategy in real time to provide more accurate and coherent service experience. Specifically, according to the current input, the key words can be extracted, and it can be judged whether it is associated with the historical dialogue, that is, associated history. If yes, the session history is queried, and a coherent response is generated in combination with the session history; if no, a new context record is created.

[0075] In the contract filling scenario, it can have memory and association ability to avoid repeated inquiries and improve interaction efficiency.

[0076] Specifically, a context state vector structure can be created in advance to store the user's historical dialogue information, user operation record, and dialogue environment. The historical dialogue information includes parsed clause entities, intent labels, and reply summaries, such as the clause entity being a contract amount of 500,000 and the intent label being an inquiry about liability for breach of contract.

[0077] The user operation record includes modification tracks (such as 3 times of editing delivery date related content), field jump sequence, and point selection action timestamp.

[0078] The dialogue environment includes the current chapter ID (such as chapter three_payment method), slot state ([performance period]=filled), and user identity ("enterprise lawyer").

[0079] When new dialogue information is obtained, optimization can be performed based on the following principles:

[0080] Information redundancy elimination principle:

[0081] Call the information stored in the context state vector structure to perform slot matching. If the slot filling confidence is greater than a set value (such as 0.85), skip repeated inquiry dialogue;

[0082] Wherein, the confidence = context attenuation factor x NLP analysis matching degree x (operation reliability coefficient)^ modification times;

[0083] The NLP analysis matching degree is a probability value of the analysis of the contract element extraction model on the user input, and the value range is [0, 1];

[0084] The context attenuation factor: the initial value is 1.0, and if the information is not mentioned for more than 3 rounds of dialogue, it is attenuated by 0.1 each round;

[0085] Example: 5 rounds of confirmed information, attenuation factor = 1 - (0.1 x 5) = 0.5;

[0086] Operation reliability coefficient: default 0.9, reflecting the credibility of user modification behavior;

[0087] Modification times: the number of manual modifications of the user to the field;

[0088] Dialogue continuity guarantee principle:

[0089] When new dialogue information is obtained, focus on the latest intention, and generate associated questions according to the semantic similarity greater than a set value (such as 0.7) to maintain the continuity of the dialogue;

[0090] Calculation formula: semantic similarity = (BERT semantic similarity x weight γ) + (clause association rule weight x (1-γ));

[0091] Parameter description:

[0092] BERT semantic similarity is the cosine similarity calculated by the contract field special BERT model, and the value range is [0, 1];

[0093] Clause association rule weight: based on the pre-defined rule base, when the current chapter is directly related, it is 0.9, and when it is indirectly related, it is 0.3;

[0094] Example: when the user is in the "payment method" chapter, the payment related question weight = 0.9;

[0095] Weight γ: balance parameter, in this embodiment, the default is 0.7.

[0096] Specific example, user asks: "What if the delivery is overdue?" (current chapter = liability for breach of contract)

[0097] BERT similarity: similarity with the system question "Delay delivery responsibility?" = 0.88;

[0098] Rule weight: the current chapter is directly related = 0.9;

[0099] Final similarity = (0.7 x 0.88) + (0.3 x 0.9) = 0.886;

[0100] The system preferentially outputs the associated question: "Please select the method of calculating the liquidated damages: □ 5 / 10,000 per day □ fixed amount □ other".

[0101] Association information association principle:

[0102] When new dialogue information is obtained, the associated information in the preset business rule chain is triggered according to the content of the dialogue information;

[0103] For example, the user sets the contract type as "technology contract", and the [intellectual property ownership] slot is not filled. Then recommend: "Suggest adding the patent ownership clause: □ owned by Party A □ owned by Party B □ owned by both parties".

[0104] Complex scenario degradation principle:

[0105] If the same slot information is modified more than a certain number of times in multiple dialogues, or if the pre-trained model is used to analyze the dialogue text and the user's emotion is determined to be confused, it is considered a complex scenario, and step-by-step guided questioning is performed.

[0106] Using a pre-trained model to analyze dialogue text, if more than a certain number of hesitation words or / and negative expressions are detected in user query input, the pause duration exceeds a certain value, the query input field is deleted or modified more than a certain number of times, the chapter jump frequency exceeds a certain threshold, all are quantitatively calculated, the more the exceeding part, the higher the emotional confusion degree, the final score is obtained by weighted sum of each calculation score, if the final score is higher than the threshold, the user's emotion is determined to be confused.

[0107] For example, when the same slot is modified ≥ 3 times or the emotional confusion value > 0.6, switch to step-by-step guidance.

[0108] The emotional confusion value calculation process is:

[0109] Dialogue text: user's current input and the last 3 rounds of dialogue;

[0110] Operation behavior: pause duration, field deletion times and chapter jump frequency;

[0111] Use the existing pre-trained model to analyze the text and output the basic confusion probability, with a value range of [0, 1];

[0112] Detect if there are hesitation words such as "wait" and "uh", if so, add 0.3 confusion degree;

[0113] Detect if there are negative expressions such as "not right" and "problem", if so, add 0.5 confusion degree;

[0114] Of course, the above values can be adjusted and set according to specific circumstances.

[0115] Next, the behavior pattern calculation is performed:

[0116] The feature quantization rules are shown in Table 1.

[0117] Table 1 Feature quantization rule table

[0118]

[0119] The above values can be adjusted and set according to specific circumstances.

[0120] Then, the fusion calculation is performed:

[0121] Formula: Final confusion value = 0.6 x emotional confusion probability + 0.4 x behavior confusion degree;

[0122] When the final confusion value exceeds the set threshold, the complex scene degradation optimization process is triggered.

[0123] Example:

[0124] Analyze the text, and the basic confusion probability obtained by the model is 0.53, there are no hesitation words and negative expressions, the user has modified [dispute resolution method] for 4 times in a row, the behavior feature emotional analysis confusion degree is 0.5+0.4=0.2, and the final confusion value is 0.73, which exceeds the set value.

[0125] Then, switch the interaction mode, and output the simplified explanation "arbitration needs to agree on the name of the institution, and litigation needs to clearly specify the jurisdiction court"; provide structured options: "□ arbitration □ litigation".

[0126] As shown in Figure 4 , the user's input is obtained, if the input source is a document uploaded by the user, then the uploaded document is recognized or parsed using optical character recognition (OCR) technology or natural language processing (NLP) technology, then the field is obtained using the element extraction engine, and then the field is subjected to integrity assessment, and according to the assessment result, the missing item is determined, and the missing item decision output is realized.

[0127] The integrity assessment can be realized by using the integrity assessment matrix, which needs to be subjected to field integrity verification, clause logic consistency verification and legal compliance verification in turn, and the process of three-level integrity detection includes:

[0128] Perform field integrity check, evaluate contract base fields, load mandatory field list from contract template library in response to single field input event (including but not limited to [Party A name], [contract amount], etc.), scan user filled field status, calculate the ratio of filled mandatory fields and total mandatory fields, and get integrity score.

[0129] If the ratio is 1, mark the field layer as complete, otherwise, prompt missing fields.

[0130] Perform clause logic consistency check, perform context analysis on contract clauses, determine if there is a logical conflict, the logical conflict includes numerical conflict (such as prepayment ratio > 90%) and content conflict (such as installment payment and one-time delivery), if there is, then give a warning;

[0131] Perform legal compliance test, use pre-trained model to perform semantic matching of contract clauses and legal provisions, locate strongly related clauses, calculate the ratio of clause compliance matching degree and total number of legal strongly related clauses, if the ratio is less than a set value, prompt risk and give correction guidance.

[0132] In this embodiment, the ratio of clause compliance matching degree and total number of legal strongly related clauses is Σ (clause compliance matching degree) / total number of legal strongly related clauses, wherein the clause compliance matching degree is based on the semantic matching degree of legal provisions obtained based on natural language processing, and the value range is [0, 1], and in specific implementation, the legal strongly related clauses (such as liquidated damages, intellectual property) are located and compared with the legal library in real time.

[0133] If the ratio is less than a set value, prompt risk and give correction guidance, for example, in the contract, the liquidated damages clause is stipulated as "the total compensation is 50% of the contract amount", the matching related laws and regulations stipulate that the upper limit of the total compensation is 30% of the contract amount, the compliance matching degree is calculated as 0, and the total number of legal strongly related clauses is 1, then prompt risk and provide modification suggestion: "please reduce the liquidated damages to within 30%" and provide standard clause template.

[0134] As shown in Figure 5 , according to the missing element analysis result, the question generation strategy engine is used to generate questions, and then the natural language generator is used to form the output of the multi-modal question. Among them, the analysis of missing elements can be realized by means of context memory library, and the question generation strategy engine can also call legal knowledge graph to determine the missing elements and their legal basis weight, etc.

[0135] In this embodiment, the process of the question generation strategy engine calculating the asking priority of each missing contract element includes: calculating a priority score, the value of the priority score being legal basis weight x business urgency coefficient x (1 - completion progress ratio), wherein the legal basis weight is determined according to a preset knowledge graph definition value, the business urgency coefficient is configured according to the contract type, and the completion progress ratio = number of filled elements / total number of elements.

[0136] The present embodiment provides five question generation modes:

[0137] If the missing contract element belongs to a legally mandatory element, a statute citation type question is used, and the missing element content is asked according to the legal mandatory requirement, such as "please specify the lease period" according to the requirements of relevant laws and regulations.

[0138] If the missing contract element belongs to a business element with limited enumeration values, an option guided type question is used, and multiple options are given for the user to directly select, such as "please select the payment method: (1) bank transfer; (2) cash payment; (3) check";

[0139] If the involved clause expression complexity is higher than a set value, an example assisted type question is used, and similar clauses are extracted from the historical contract library as examples for questioning, such as "please fill in the default responsibility clause (example: pay a default fine of 5 / 10,000 per day for delay in delivery)";

[0140] If the missing contract element belongs to ambiguous or contradictory input, a clarification confirmation type question is used to make the user determine the final choice between the ambiguous or contradictory two, such as "you have both agreed to arbitration and chosen litigation, please confirm the dispute resolution method";

[0141] In the specific implementation process, the clause text is encoded into a 256-dimensional vector through a legal special BERT model, and a multi-modal input is constructed in combination with contract structure level analysis; based on the multi-head attention mechanism, a contradiction score between clauses is calculated, and when the score exceeds a threshold value, a conflict mark is triggered; the mutual exclusion relationship of the embedded legal knowledge graph is generated through a graph neural network to generate enhanced features, and finally the contradiction analysis with legal basis is output and the clarification question is automatically generated.

[0142] If the missing contract element belongs to a composite element, a hierarchical follow-up type question is used, which is divided into multiple levels in a way of gradually narrowing down, to determine the question, such as the first round of questioning "whether to need to agree on intellectual property clauses?" and the second round of questioning "please specify the ownership: (1) Party A; (2) Party B; (3) common ownership".

[0143] In the implementation process, the tree structure can be predefined to store the element hierarchical relationship (for example, "intellectual property clause" is a parent node, and "ownership" and "license scope" are child nodes), and each node is marked with an attribute to identify whether it is a composite element. When it is detected in user interaction that a parent node element is missing and it is a composite element (for example, "intellectual property clause" is missing and the associated child nodes of the dependency tree are not activated), the hierarchical interrogation mechanism is triggered: the first round generates a global confirmation question ("Do you need an intellectual property clause?"), and if the user confirms, the secondary interrogation is automatically expanded according to the dependency tree ("Please specify the ownership: □ Party A □ Party B □ Joint Ownership"), realizing progressive information collection from abstraction to concreteness.

[0144] When the contract mandatory elements are collected, the contract generation interface is called to generate the contract document. Through a multi-level rule engine (legal provisions, industry standards, and enterprise strategies) and a pre-trained model (such as a BERT-LSTM hybrid model), real-time semantic analysis and risk quantification of contract clauses are realized. Reinforcement learning algorithm is used to generate dynamic revision suggestions for privacy protection and record revision tracks through blockchain, while building a backtracking learning mechanism to continuously optimize review rules through historical cases.

[0145] Embodiment Two

[0146] A contract generation system based on multi-round dialogue interaction and intelligent element extraction, comprising:

[0147] An intent recognition module configured to perform multi-round dialogue interaction, utilize a pre-trained large model to recognize the intent of the multi-round dialogue content, determine the keywords therein, and determine the operation to be performed for contract generation and the corresponding intent according to a preconfigured matching relationship between keywords and contract operations;

[0148] A completeness detection module configured to sequentially perform field completeness verification, clause logic consistency verification, and legal compliance verification to realize three-level completeness detection;

[0149] An element extraction and supplement module configured to utilize a pre-trained model to identify missing contract elements in the contract, calculate the questioning priority of each missing contract element, generate questions based on the questioning priority and the contract business scenario, and supplement the missing contract elements through the questions;

[0150] A contract generation module configured to assemble and generate a contract document based on complete contract elements, utilize a pre-trained analysis model to perform compliance analysis on the generated contract document, generate modification suggestions, and store the generated contract document and the modification suggestions.

[0151] Those skilled in the art will appreciate that embodiments of the present application can be readily used as software, hardware, or a combination of software and hardware. In a software embodiment, various software modules in accordance with embodiments of the present application are stored in a memory such as a computer program product (e.g., a disk storage) and executed by a computer processor. As such, various computer program products code, when executed, enable the computer to function as a special purpose computer programmed to carry out the steps described herein. The software modules, when executed, enable the computer to provide various example embodiments of the present application as discussed herein. CD ROM

[0152] The present application is described in reference to the drawings using a flowchart and / or a block diagram of the method, apparatus (system) and computer program product according to embodiments of the application. It will be understood that each block of the flowchart and / or block diagram, and combinations of blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart and / or block diagram block or blocks. Figure 1 Figure 1

[0153] These computer program instructions can also be stored in a computer- readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instructions which implement the function specified in the flowchart and / or block diagram block or blocks. Figure 1 Figure 1

[0154] The computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart and / or block diagram block or blocks. Figure 1 Figure 1

[0155] The above description is only preferred embodiments of the present application, and is not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made by those skilled in the art without departing from the spirit and principle of the present application shall fall within the scope of protection of the present application.​​​​​​​​

Claims

1. A contract generation method based on multi-round dialogue interaction and intelligent element extraction, characterized in that, Comprise the following steps: Perform multi-round dialogue interaction, use a pre-trained large model to perform intent recognition on the multi-round dialogue content of the interaction, determine the keywords therein, and determine the operation to be performed and the intent to which the contract belongs according to a preconfigured matching relationship between keywords and contract operations; During intent recognition, pay attention to contract operation verbs; During the process of using a pre-trained large model to perform intent recognition on the multi-round dialogue content of the interaction, count the user's high-frequency query words, and automatically expand the word library according to the user's questions; During the process of performing multi-round dialogue interaction and using a pre-trained large model to perform intent recognition on the multi-round dialogue content of the interaction, a context state vector structure is pre-created to store the user's historical dialogue information, user operation records and dialogue environment; When new dialogue information is obtained, the information stored in the context state vector structure is called to perform slot matching, and if the slot filling confidence is greater than a set value, repeated inquiry dialogue is skipped; When new dialogue information is obtained, focus on the latest intent, generate associated questions with a semantic similarity greater than a set value to maintain the coherence of the dialogue; When new dialogue information is obtained, trigger the associated information in the pre-set business rule chain according to the content of the dialogue information; If the same slot information is modified more than a set number of times in the multi-round dialogue, or if the user's emotion is judged to be confused after analyzing the dialogue text using a pre-trained model, it is considered to be a complex scenario, and step-by-step guided questioning is performed; The process of determining that the user's emotion is confused after analyzing the dialogue text using a pre-trained model includes: analyzing the dialogue text using a pre-trained model, if more than a certain number of hesitation words or / and negative expressions are detected in the user's query input, the pause duration exceeds a set value, the query input field is deleted or modified more than a set number of times, the chapter jump frequency exceeds a set threshold, all of which are quantitatively calculated, the more of the above, the higher the emotional confusion degree, the final score is obtained by weighting and summing the scores of each calculation, and if the final score is higher than a threshold, it is determined that the user's emotion is confused; Perform field integrity verification, clause logic consistency verification and legal compliance verification in turn to realize three-level integrity detection; The process of performing field integrity verification, clause logic consistency verification and legal compliance verification in turn to realize three-level integrity detection includes: Perform field integrity verification, evaluate the contract basic fields, respond to a single field input event, load the list of mandatory fields from the contract template library, scan the user's filled field state, calculate the ratio of the number of filled mandatory fields to the total number of mandatory fields, and obtain the integrity score; Perform clause logic consistency verification, perform context analysis on the contract clauses, determine whether there is a logical conflict, and if there is, perform a pre-warning; Perform legal compliance verification, use a pre-trained model to perform semantic matching of contract clauses and legal provisions, locate strongly related clauses, calculate the ratio of the clause compliance matching degree to the total number of strongly related clauses, and if the ratio is less than a set value, prompt the risk and perform correction guidance; The pre-trained model is used to identify missing contract elements in the contract, calculate the question priority of each missing contract element, generate a question based on the question priority and the contract business scenario, and supplement the missing contract elements through the question; Based on the complete contract elements, the contract document is generated, the pre-trained analysis model is used to analyze the compliance of the generated contract document, the modification suggestions are generated, and the generated contract document and the modification suggestions are stored.

2. The contract generation method based on multi-round dialogue interaction and intelligent element extraction according to claim 1, characterized in that, The process of determining the key words and matching the operations and the corresponding intentions of the contract generation based on the pre-configured matching relationship between the key words and the contract operations includes: pre-configuring the operations required for contract generation, including contract creation, contract modification and contract query, pre-setting the key words involved in each operation, forming a matching relationship between each key word and the corresponding operation required to be performed, and matching the operations required to be performed for contract generation based on the key words identified by the intention recognition and the matching relationship.

3. The contract generation method based on multi-round dialogue interaction and intelligent element extraction according to claim 2, characterized in that, In the process of matching the operations required to be performed for contract generation based on the key words identified by the intention recognition and the matching relationship, error tolerance processing and semantic expansion are supported. If the user input information has a wrong word related to the pre-set key word or a field with a synonym of the pre-set key word, it is considered equivalent to the corresponding key word for matching.

4. The contract generation method based on multi-round dialogue interaction and intelligent element extraction of claim 1, characterized in that, In the process of multi-round dialogue interaction, the key words in the user's query are counted, and if the frequency of the key words in the query exceeds a set value, the pre-set key words are expanded according to the user's question.

5. The contract generation method based on multi-round dialogue interaction and intelligent element extraction according to claim 1, characterized in that, The process of calculating the question priority of each missing contract element includes: calculating the priority score, and the value of the priority score is legal basis weight×business emergency coefficient×(1—completion progress ratio), wherein the legal basis weight is determined according to the pre-set knowledge graph definition value, the business emergency coefficient is configured according to the contract type, and the completion progress ratio=number of filled elements / total number of elements.

6. The contract generation method based on multi-round dialogue interaction and intelligent element extraction according to claim 1, characterized in that, The process of generating a question based on the question priority and the contract business scenario includes: if the missing contract element belongs to a legally required element, using a law citation type question to ask for the missing element content according to the legal requirements; If the missing contract element belongs to a business element with limited enumeration values, an option guided question is used to give multiple options for the user to choose directly; If the involved clause expression complexity is higher than a set value, an example assisted question is used to extract similar clauses from the historical contract library as examples for questioning; If the missing contract element belongs to a fuzzy or contradictory input, a clarification confirmation question is used to make the user determine the final choice between the two; If the missing contract element belongs to a composite element, a hierarchical follow-up question is used to narrow down the level by level to determine the question.

7. A contract generation system based on multi-turn dialogue interaction and intelligent element extraction, characterized in that, The intention recognition module is configured to perform multi-round dialogue interaction, use a pre-trained large model to identify the intention of the multi-round dialogue content, determine the key words, and determine the operations required for contract generation and the corresponding intentions based on the pre-configured matching relationship between the key words and the contract operations. ​ In intent recognition, attention is paid to contract operation verbs; in the process of intent recognition of the multi-round dialogue content of interaction by using a pre-trained large model, high-frequency query words of the user are counted, and the word library is automatically expanded according to the user's query; In multi-round dialogue interaction, in the process of intent recognition of the multi-round dialogue content of interaction by using a pre-trained large model, a context state vector structure is pre-created to store historical dialogue information, user operation records and dialogue environment of the user, when new dialogue information is obtained, information stored in the context state vector structure is called to perform slot matching, if the slot filling confidence is greater than a set value, repeated inquiry dialogue is skipped; When new dialogue information is obtained, the latest intent is focused on, and associated questions are generated according to a semantic similarity greater than a set value to maintain the coherence of the dialogue; When new dialogue information is obtained, according to the content of the dialogue information, the associated information in the pre-set business rule chain is triggered for recommendation; If the same slot information is modified more than a set number of times in multi-round dialogue, or if the user's emotion is judged to be confused by analyzing the dialogue text by using a pre-trained model, it is considered to be a complex scenario, and step-by-step guided questioning is performed; The process of judging that the user's emotion is confused by analyzing the dialogue text by using a pre-trained model includes: analyzing the dialogue text by using a pre-trained model, if more than a number of hesitation words or / and negative expressions are detected in the user's query input, the pause duration is longer than a set value, the query input field is deleted or modified more than a set number of times, the chapter jump frequency is higher than a set threshold, all are quantitatively calculated, the more the part exceeds, the higher the emotional confusion degree, the final score is obtained by weighting and summing each calculation score, if the final score is higher than a threshold, it is judged that the user's emotion is confused; The integrity detection module is configured to sequentially perform field integrity verification, clause logic consistency verification and legal compliance verification to realize three-level integrity detection; The process of sequentially performing field integrity verification, clause logic consistency verification and legal compliance verification to realize three-level integrity detection includes: Performing field integrity verification, evaluating contract basic fields, responding to a single field input event, loading a list of mandatory fields from a contract template library, scanning the user's filled field state, calculating the ratio of the number of filled mandatory fields to the total number of mandatory fields to obtain an integrity score; Performing clause logic consistency verification, performing context analysis on contract clauses to determine whether there is a logical conflict, the logical conflict includes a numerical conflict and a content conflict, and if there is, a warning is given; Performing legal compliance verification, performing semantic matching of contract clauses and legal provisions by using a pre-trained model, positioning strongly related clauses, calculating the ratio of the clause compliance matching degree to the total number of strongly related clauses, and if the ratio is less than a set value, a risk is prompted and a correction guide is given; The element extraction and supplement module is configured to identify missing contract elements in a contract by using a pre-trained model, calculate the questioning priority of each missing contract element, generate questions according to the questioning priority and the contract business scenario, and supplement the missing contract elements through the questions. The contract generation module is configured to assemble and generate a contract document based on the complete contract elements, perform compliance analysis on the generated contract document by using a pre-trained analysis model, generate a modification suggestion, and store the generated contract document and the modification suggestion.

Citation Information

Patent Citations

  • Demand document automatic generation method and device based on human-computer interaction and storage medium

    CN115630146A

  • Electronic contract auditing method and device, computer equipment and storage medium

    CN119090681A

  • Dynamic order making method and device based on multiple rounds of dialogues and electronic equipment

    CN120181054A