Contract summary generation method and system

By determining the contract type, assigning clause-related tags, evaluating the importance of clauses and generating contract summary with user attribute information, the problem that the existing technology cannot effectively grasp the focus of the contract is solved, efficient and accurate contract summary generation is achieved, and work efficiency is improved.

CN119760129AActive Publication Date: 2025-04-04SHANGHAI ZHENLING TECH CO LTD

Patent Information

Application Number
CN202510254877.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-05
Publication Date
2025-04-04
Estimated Expiration
2045-03-05

AI Technical Summary

Technical Problem

The existing general text summary technology cannot effectively grasp the essence of the contract transaction and key terms, resulting in the generated contract text summary not grasping the key points and cannot meet the needs of the contract summary.

Method used

A contract summary generation method and system is proposed, by obtaining and analyzing contract documents, determining the contract type, giving clause association labels, determining the importance of clauses based on the terms content and contract type, and extracting the target clauses based on user attribute information.

Benefits of technology

It realizes intelligent, efficient and accurate extraction of key information in the contract, and generates concise contract summary, improving users' work efficiency in contract drafting, consultation, approval and other links.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119760129A_ABST
    Figure CN119760129A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of intelligent data processing, in particular to a contract abstract generation method and system. According to the method, the type of the contract text is determined, the association tag is given according to the content of the contract terms, then the importance of each term is determined according to the content of each term, the contract type and the association tag of each term, and related terms are further screened in combination with and / or current system attributes to serve as the target text to generate the contract abstract. According to the scheme, the importance degree of each term in the current contract text can be identified in a targeted manner, so that the corresponding key term content can be extracted in a targeted manner to serve as a text basis for abstract generation; the links of contract type judgment, clause label identification, clause importance judgment and clause importance screening are incorporated into the technical scheme of the contract abstract, so that the purpose that the contract abstract is concise and choking is achieved, and the abstract generation accuracy is greatly improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of intelligent data processing, and in particular to a method and system for generating a contract summary. Background Art

[0002] Contracts often face a challenge during the drafting, negotiation, and approval process within an enterprise: contract texts are often lengthy and complex. This not only requires the processor to spend a lot of time reading carefully, but also makes it difficult to quickly grasp the essence of the contract. To solve this problem, contract summaries have become an effective tool. By extracting key information from the contract and producing summaries, processors can quickly browse and understand the main points of the contract. Contract summaries not only save valuable time, but also improve work efficiency, ensuring that processors can focus on those parts that are critical to decision-making. By refining and simplifying information, complex contract texts become easy to manage and understand.

[0003] However, unlike ordinary texts, contract texts are extremely rigorous, professional, systematic, intrusive and applicable. Some contract terms are simple and clear, while others are extremely complex, involving many details, conditions and legal terms. These characteristics determine that the contract text must take into account all aspects of the transaction involved, including both important and unimportant terms, and there may be correlations between the terms in the contract. Some terms are core terms, while other terms may be supplementary or restrictive conditions surrounding the core terms.

[0004] The existing general text summarization technology aims to compress the number of words in the text, but it cannot capture the essence of the transaction and key terms of the contract. General text summary generation schemes often focus on all the text content, and do not distinguish and process the essence of the contract terms. It is easy to confuse the primary and secondary. That is, some important terms are not included in the summary, and some terms that appear in the summary are non-important or even common sense. As a result, the generated contract text summary cannot capture the key points and cannot achieve the purpose of the contract summary. Therefore, the existing general text summary generation scheme is not suitable for generating summaries of contract texts. Summary of the invention

[0005] Based on this, this application proposes a contract summary generation method and system to address the above-mentioned problems, aiming to intelligently, efficiently and accurately extract key information from the contract and generate a contract summary, so as to facilitate users to quickly grasp the core information of the contract in various links such as contract drafting, negotiation and approval, and improve work efficiency.

[0006] On the one hand, the present application provides a method for generating a contract summary, the method comprising: Obtaining a contract document to be processed and determining a contract type of the contract document; Parsing the contents of each clause of the contract document and assigning associated tags to each clause; Determine the importance of each clause based on its content, the type of contract described, and the tags associated with each clause; Extract one or more target clauses according to user attribute information and / or current system attribute information and the importance of each clause, and form a target text according to preset rules; A summary text of the contract document is generated based on the target text.

[0007] Preferably, the method further comprises: Determine a corresponding clause label subset according to the contract type; Each clause is assigned an associated label based on the content of each clause and the clause label subset.

[0008] Furthermore, the method further comprises: Inputting the contents of each clause of the contract document into a preset large language model and combining it with a pre-built first target prompt word to assign one or more associated tags to each clause; and / or, Based on the first model pre-trained with a large language model and / or an NLP model, one or more associated tags are assigned to each term.

[0009] Preferably, determining the importance of each clause according to the contract type and the tag associated with each clause includes: Training the historical contract text based on a preset large language model and / or NLP model to obtain a trained second model; Inputting the content of the clauses of the contract, the labels associated with each clause, and the contract type into the second training model for importance grading to obtain the importance level and / or quantitative value of each clause; and / or, The initial importance level and / or quantitative value of each preset clause label in the contract type is queried, and the key feature information of the clause content is extracted to strengthen or weaken it, so as to obtain the importance level and / or quantitative value of each clause.

[0010] Preferably, the training of the historical contract text based on a preset large language model and / or NLP model to obtain a trained second model includes: Building a second initial model based on a preset large language model and / or NLP model; Encode the contract type and clause label to obtain a feature vector; Generate a clause text vector based on the clause content, and digitize the key feature information in the clause content; The clause text vector, feature vector and numerical feature information are integrated to obtain a comprehensive feature vector; Divide the preprocessed feature vector data into training set, validation set and test set; Input the training set data into the second initial model in batches, perform multiple rounds of iterative training according to the preset loss function and optimization algorithm, and update the parameters of the model; The hyperparameters are adjusted according to the validation set performance; the final trained second model is obtained.

[0011] Preferably, the method further comprises: Obtaining the user's role information, identity information and / or the current system interface information, and filtering one or more tag terms associated with the user and / or the current system interface; One or more target clauses are determined according to the importance of each clause, and they are summarized in a preset order to obtain the target text.

[0012] Preferably, the method further comprises: If the current contract is a framework contract, extract the additional information of the participants, term, contract purpose and / or contract purpose and term in each target clause to obtain the summary element information of each target clause; If the current contract is not a framework contract, extract the participating objects, business subject / transaction substance and / or delivery / settlement information in each target clause to obtain the summary element information of each target clause; The summary element information of each objective clause is summarized according to the preset text expression structure.

[0013] Furthermore, the method further comprises: Input the target text into the preset large language model and combine it with the pre-built second target prompt words to generate the corresponding summary of each clause and the corresponding summary title; The content of each summary and each contract clause is input into the large language model and the pre-built third target prompt word for semantic verification to obtain the final summary text.

[0014] A second aspect of the present application provides a contract summary generation system, the system comprising: A contract type determination unit, used to obtain a contract document to be processed and determine the contract type of the contract document; A clause label recognition unit, used to parse the contents of each clause of the contract document and assign an associated label to each clause; A clause importance determination unit, used to determine the importance of each clause according to the content of each clause, the contract type and the associated tags of each clause; The contract summary generation unit is used to extract one or more target clauses according to user attribute information and / or current system attribute information and the importance of each clause, form a target text according to preset rules; and generate a summary text of the contract document based on the target text.

[0015] A third aspect of the present application provides a computer-readable storage medium storing a computer program, wherein when the computer program is executed by a processor, the processor executes the steps of any one of the above methods.

[0016] A fourth aspect of the present application provides a computer terminal device, comprising a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of any one of the above methods.

[0017] The contract summary generation scheme provided in the present application determines the type of contract text and assigns associated tags according to the content of the contract clauses, then determines the importance of each clause according to the content of each clause, the contract type and the associated tags of each clause, and further combines the user attributes and / or the current system attributes to filter out the relevant clauses as the target text to generate the contract summary. The present application scheme can specifically identify the importance of each clause in the current contract text, so that the corresponding key clause content can be specifically extracted as the text basis for summary generation, and further incorporates the contract type judgment, clause label identification, clause importance judgment, and clause importance screening links into the contract summary technical scheme, so as to achieve the purpose of making the contract summary both concise and concise, and greatly improve the accuracy of summary generation.

[0018] At the same time, the present application scheme further combines the attribute information of the user and / or system to generate corresponding relevant contract summary information, which helps different users to quickly, efficiently and accurately obtain and understand the key contract information related thereto, thereby improving the work efficiency of various links such as contract drafting, negotiation and approval.

[0019] Furthermore, the present application scheme also uses a pre-trained model algorithm to intelligently identify the importance of each clause. The algorithm not only considers the information of the clause content, but also incorporates information of another dimension such as the contract type and clause label. The contract type can reflect the business background and general framework of the clause from a macro level. The criteria for judging the importance of key clauses in different types of contracts often vary. The clause labels classify and summarize the clauses from a micro perspective, which helps to grasp the functional attributes of the clauses more accurately. By comprehensively utilizing input data from multiple dimensions, the model can more comprehensively and accurately identify and mine richer semantics and related information in the contract, thereby improving the accuracy of contract importance identification. Furthermore, the present application also has targeted specific feature extraction based on the contract type, and the combination of these features further enables the model to understand the connotation of the importance of the clause more comprehensively.

[0020] In addition, this application also clarifies and determines the elements and key information when generating the corresponding summary by judging the essence of the contract attributes, and realizes the automatic generation of the summary of contract terms through the preset text expression structure and target information extraction technology, which can efficiently and accurately generate standardized summary text. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0022] in: Figure 1 A flowchart of a method for generating a contract summary in one embodiment; Figure 2 This is a diagram showing some data input and output examples of a clause importance training model in one embodiment; Figure 3 A schematic diagram of intelligently generating a summary of a house rental contract in one embodiment; Figure 4 A structural block diagram of a contract summary generation system in one embodiment; Figure 5 FIG. 4 is a structural block diagram of a computer device in one embodiment. DETAILED DESCRIPTION

[0023] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0024] The terms "include", "comprising" and "having" and any variations thereof in the specification and claims of the present application and the above-mentioned drawings are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device comprising a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units that are not listed, or may optionally include other steps or units that are inherent to these processes, methods, products or devices. In the claims, specification and drawings of the present application, relational terms such as "first" and "second" are merely used to distinguish one entity / operation / object from another entity / operation / object, and do not necessarily require or imply any such actual relationship or order between these entities / operations / objects.

[0025] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The occurrence of the phrase at various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0026] It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and that, although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0027] In one embodiment, if Figure 1 The flowchart of a contract summary method of the present application is shown, and the method comprises: S10. Obtain the contract document to be processed, and determine the contract type of the contract document.

[0028] The importance of contract terms is not only related to the content of the terms, but also to the type of contract. For example, in a contract for the sale of tangible goods, the price of the goods, delivery time, warranty, etc. are important terms and should appear in the summary so that they are the focus of attention. However, confidentiality clauses and integrity clauses are non-important terms and should not appear in the summary. When the contract type is an intellectual property ownership and confidentiality agreement, the confidentiality clause is an important clause and should appear in the summary so that it is the focus of attention. Therefore, different clauses in the same contract type and the same clauses in different contract types are of different importance and have different priorities for inclusion in the summary.

[0029] Specifically, the contract document to be processed in the present application solution (i.e., the contract document for which a summary needs to be generated) can be a contract document being drafted by the system, or a contract document that has been drafted, or a contract document uploaded to the system during modification, approval, etc. The contract document can be a text file, PDF document, Word document, etc. After obtaining the contract document to be processed, the system first identifies and determines the contract type through the contract type judgment submodule to determine the contract type to which the contract document belongs.

[0030] Preferably, the present application scheme presets a full set of contract types (such as sales, procurement, leasing, services, frameworks, construction projects, entrustment, confidentiality, etc.), and can further subdivide the types under each major category. For example, sales contracts can be divided into goods sales contracts, real estate sales contracts, etc.

[0031] Furthermore, in order to accurately determine the contract type to which the current contract document belongs, in a preferred embodiment of the present application, the contract document is input into a preset large language model, combined with pre-built judgment prompt words, based on the basic text understanding ability and prompt words of the large language model, so that the large language model selects the most appropriate specific contract type from the entire set of contract types for output.

[0032] Preferably, in one embodiment, the present application scheme determines the contract type according to preset text rules or regular expressions: traverse the key nouns, verbs and other vocabulary of the contract, extract one or more high-frequency keywords of the contract, and perform matching and judgment based on the high-frequency keywords and the full set of contract types to identify the contract type of the current contract document. For example, when keywords such as "rent, rent, lessee" appear frequently, it is judged as a lease type contract; when keywords such as "warranty, return, sale, delivery of goods" appear frequently, it is judged as a goods sale contract, etc. It is also possible to combine a pre-built dictionary of contract types and corresponding keywords to determine the contract type through text scanning and matching; or determine the contract type based on the overall framework structure of the contract text.

[0033] In another preferred embodiment, the present application scheme uses a trained classification model (such as a support vector machine, a decision tree, a convolutional neural network in deep learning, an NLP model, a large model with a decoder-only architecture, etc.), and inputs the contract text data into the model for classification prediction. The training data of the model can be a large number of contract texts that have been labeled with contract types, and the model learns the semantic feature patterns corresponding to different contract types through supervised learning. According to the probability or category label output by the classification model, the specific type of the contract is determined, such as the contract type corresponding to the category with the highest output probability. For example, if the probability is the highest for "technical service contract", the current contract is determined to be of this type.

[0034] In addition, in other embodiments, the present application solution may also determine the current contract type by or in combination with title extraction, subject matter type determination, or by user selection.

[0035] S11. parse the contents of each clause of the contract document and assign associated tags to each clause.

[0036] Specifically, in one embodiment of the present application, after determining the contract type of the contract document, the contents of each clause of the contract document are parsed, and based on the specific contents of the clauses and in combination with the contract type, it is determined what label should be assigned to each clause of the contract. The assigned label can be one or more specific labels, or certain class labels (such as legal attribute class, transaction attribute class, etc.). Preferably, the assigning of associated labels to each clause also includes: S110. Determine a corresponding clause label subset according to the contract type.

[0037] Specifically, the present application scheme can preset a complete set of contract clause labels (such as subject matter description, subject matter price, delivery method, payment method, breach of contract liability, etc.), and then filter the complete set of labels according to the contract type to obtain the corresponding clause label subset, or pre-set the corresponding label subset for each contract type.

[0038] For example, a subset of clause labels for a commodity sales contract (partial labels): [Business subject, subject matter price, payment method, delivery method, acceptance method, warranty, return and exchange, liquidated damages (Party A), liquidated damages (Party B), signing method, applicable law, intellectual property rights, confidentiality...] An example of a subset of clause labels for a house rental contract (partial labels): [lease subject, rent, deposit, payment method, delivery method, renewal method, return method, decoration, liquidated damages (Party A), liquidated damages (Party B), signing method, applicable law, intellectual property rights, confidentiality...].

[0039] S111. Assigning associated labels to each clause based on the content of each clause and the clause label subset.

[0040] Preferably, in one embodiment of the present application, for each clause of the contract, the basic understanding ability of the large language model is combined with the corresponding pre-built prompt words to output the label of the clause, which may be one or a combination of multiple labels. Specifically, it includes: inputting the content of each clause of the contract document into the preset large language model and combining the pre-built first target prompt words to assign one or more associated labels to each clause. Among them, the first target prompt word involves assigning an associated label based on the clause label subset.

[0041] and / or, Based on the first model trained by the large language model and / or NLP model and the clause label subset, one or more associated labels are assigned to each clause. Specifically, based on the first initial model pre-trained by the large language model and / or NLP model, the first initial model is trained using the labeled historical clause data to obtain the trained first model, and then the current contract clause content is input into the trained first model to assign associated labels to each clause.

[0042] S12. Determine the importance of each clause based on the content of each clause, the contract type and the tags associated with each clause.

[0043] Specifically, after assigning a corresponding label to each clause, the present application scheme further grades the importance of each clause according to the specific label of the clause and the contract type, that is, it can output a specific score (and then grade the importance according to the score), or directly output the level (for example, high, medium-high, medium, low, etc.). Determining the importance of each clause according to the contract type and the associated labels of each clause includes: Preferably, in one embodiment of the present application, the initial importance level and / or quantitative value of each clause is obtained by querying the preset initial importance level and / or quantitative value of each clause label in the contract type, and extracting key feature information of the clause content to strengthen or weaken it.

[0044] Specifically, the labels of each clause and the contract type data are organized into a structured data set or a preset queryable database, and corresponding strengthening or weakening weights are set for key feature information. The data record contains three input features: contract clause content, contract type, and clause label, as well as the corresponding importance score or quantitative weight. Initially, professional legal personnel can score based on experience and relevant laws and regulations. The score or quantitative weight range can be set by themselves, or converted into importance levels such as high, medium, and low. Then, the importance level and / or quantitative value of each clause is obtained by matching the corresponding data set and combining it with the preset calculation.

[0045] and / or, Preferably, in another embodiment of the present application, a traditional NLP model or a large language model is used for training, and the model type is a classification model, so that the trained model can distinguish the importance or quantitative value of a clause. Specifically, it includes: S121. Training the historical contract text based on a preset large language model and / or NLP model to obtain a pre-trained second model; S122. Input the content of the clauses of the contract, the labels associated with each clause, and the contract type into the pre-trained second model for importance grading to obtain the importance level and / or quantitative value of each clause.

[0046] Preferably, the training of the historical contract text based on a preset large language model and / or NLP model to obtain a pre-trained second model includes: S1221. Construct a second initial model based on a preset large language model and / or NLP model.

[0047] Specifically, in one embodiment of the present application, a pre-trained large language model and / or NPL model based on the Transformer architecture is used as a basic model, such as BERT, RoBERTa, GPT, etc. The large language model has powerful text semantic understanding capabilities and is pre-trained on large-scale text data. It can capture rich language features and semantic information, which is helpful for analyzing the connotation of contract terms.

[0048] Alternatively, if there are certain limitations on computing resources and training time and the data size is not particularly large, choose some lightweight neural network architectures designed for sequence labeling and text classification tasks, such as bidirectional long short-term memory network (BiLSTM) combined with conditional random field (CRF).

[0049] After building the second initial model, the model parameters are initialized. After the model is determined, the model parameters are set according to actual needs, including but not limited to one or more of the following parameters: learning rate, batch size, number of iterations, network, number of layers, number of neurons, temperature, etc. Specifically, if a pre-trained initial model is selected, its public pre-trained weights can be downloaded and fine-tuned based on these weights to speed up the convergence speed and utilize the general language knowledge it has learned.

[0050] Furthermore, in one embodiment of the present application, historical data of different contract types and different clauses with labels are collected, and a multi-dimensional evaluation is performed in combination with the actual situation to determine the corresponding importance classification or quantitative score value, and then the text is pre-processed by cleaning and format conversion to form a corresponding training data set. For example, the training data set (partial data) is in the form of Figure 2 As shown, the model input data includes: contract clause content, contract clause label, contract type and other information, and the model output is the importance / score of each clause.

[0051] S1222. Encode the contract text type and clause label to obtain a feature vector.

[0052] Preferably, in one embodiment of the present application, labels of each contract text type and each clause in the historical samples are obtained, and the contract type and clause labels are one-hot encoded (One-Hot Encoding) or other suitable encoding methods are performed so that they can be effectively processed by the model.

[0053] S1223. Generate a clause text vector based on one or more words in the clause content, extract key feature information in the clause content, and perform numerical processing.

[0054] Specifically, the contract terms are cleaned to remove unnecessary spaces, abnormal punctuation marks, special characters and other interfering information. The text is uniformly converted into a suitable encoding format (such as UTF-8), and necessary truncation or padding operations are performed according to the input requirements of the model. For example, if the model has a limit on the length of the input text, the overly long terms are appropriately truncated, and the overly short terms can be padded by adding placeholders.

[0055] Then, word vector tools such as Word2Vec and GloVe are used to train word vectors on large-scale general text corpora or corpora related to the contract field, and the content words in the contract terms are mapped to corresponding low-dimensional vector representations. These word vectors are further combined (such as average pooling, weighted average, etc.) to generate text vector representations of the entire content of each contract clause.

[0056] Further preferably, in one embodiment of the present application, based on the contract domain knowledge, some additional key feature information is extracted, such as the numerical features of the amount involved in the clauses (whether there is a description of large amounts of money, the order of magnitude of the amount, etc.), time-related features (whether there is a clear performance period, deadline, etc.), and key subject features (important companies or matters involved, etc.), and the key feature information is digitized. For example, the numerical features of the amount and the time feature constraints can be represented by binary variables, where 1 indicates the existence of a large amount of money or a description of time constraints, and 0 indicates that they do not exist. For another example, the key subject features can be digitized using unique-hot numerical coding, such as the important matters involved or the strictness of the breach of contract clauses.

[0057] S1224. The clause text vector, feature vector and numerical feature information are integrated to obtain a comprehensive feature vector.

[0058] Specifically, in one embodiment, the digitized feature information is concatenated or fused in a suitable manner with the encoded contract type, clause label features, and text vector features to form a comprehensive feature vector for the final input model.

[0059] S1225. Divide the preprocessed feature vector data into a training set, a validation set, and a test set.

[0060] Specifically, the prepared data set is divided into training set, validation set and test set according to an appropriate ratio (common ratios are 8:1:1 or 7:2:1, etc.). During the division process, ensure that the samples of clauses of various contract types and different importance levels / score values ​​are reasonably distributed in each subset to avoid data bias.

[0061] S1226. Input the training set data into the model in batches, perform multiple rounds of iterative training according to the preset loss function and optimization algorithm, calculate the loss value and update the model parameters according to the optimization algorithm.

[0062] Specifically, in one embodiment of the present application, the training set data is input into the model in batches, and multiple rounds of iterative training are performed according to the set loss function and optimization algorithm. The optimization algorithm includes stochastic gradient descent (SGD) and its variants Adagrad, Adadelta, Adam, etc.

[0063] In one embodiment of the present application, a suitable loss function is selected according to the nature of the output (score value or level). If a specific score value is output, the mean square error (MSE) or other forms of loss function can be selected, which measures the average square error between the predicted score and the true score, and can effectively guide the model to learn an accurate numerical mapping.

[0064] If the importance level is output, a preset cross-entropy loss function (Cross-Entropy Loss) can be used to regard the level as a classification category, so as to prompt the model to correctly classify and grade the terms of different levels. Preferably, in one embodiment, the cross-entropy loss function used in this application satisfies: , Among them, Loss is the cross entropy loss function, The encoding vector corresponding to the true category of the jth sample is (dimension is C), The probability distribution vector of each category predicted by the model is (the dimension is also , and each element value is between 0 and 1, and the sum is 1). In other embodiments, those skilled in the art can also adjust the corresponding loss function according to actual needs.

[0065] S1227. Adjust the hyperparameters according to the performance of the validation set to obtain the final pre-trained second model.

[0066] Specifically, in each training round, the loss value is calculated and the parameters of the model are updated according to the optimization algorithm. At the same time, the performance of the model is regularly evaluated on the validation set (such as calculating the loss value, accuracy and other indicators on the validation set. The accuracy can be calculated according to the proportion of correctly classified samples based on the level output). The hyperparameters (such as learning rate, batch size, number of training rounds, etc.) are adjusted according to the performance of the validation set to prevent overfitting.

[0067] When determining the importance of each clause, the above scheme of this application not only considers the core text information of the clause content, but also incorporates additional dimensional information such as the contract type and clause label. The contract type can reflect the business background and general framework of the clause from a macro level. The criteria for judging the importance of key clauses in different types of contracts often vary; the clause label classifies and summarizes the clauses from a micro perspective, which helps to grasp the functional attributes of the clauses more accurately. By comprehensively utilizing these three aspects of input data, the model can more comprehensively understand the connotation of the importance of the clauses, and can mine richer semantics and related information than methods that rely solely on single text features.

[0068] Furthermore, we have also specially designed the extraction of specific key feature information based on contract domain knowledge, such as amount numerical features, time-related features, etc. These domain features play an intuitive and key role in judging the importance of contract terms. For example, terms involving large amounts of money are usually more important, and performance terms with clear time limits cannot be ignored for corresponding types of contract terms. In this way, the importance of the corresponding terms can be effectively strengthened or weakened through the above-mentioned specific key feature information, making the output results more accurate and more in line with expectations.

[0069] S13. Extract one or more target clauses based on user attribute information and / or current system attribute information and the importance of each clause, and form a target text according to preset rules.

[0070] Specifically, in the present application, the user's attribute information includes user role information (such as Party A, Party B, etc.), user identity (such as business, finance, legal, administration, etc.), and the current system attributes include the interface attribute information of the current system, such as the collaboration interface, approval interface, archiving interface, etc. in the system. The user's purpose is different in different interfaces, and the generated summary is also different.

[0071] Preferably, in one embodiment of the present application, extracting one or more relevant target clauses to form a target text includes: S131, obtaining the user's role information, identity information and / or the current system interface information, and filtering the tag clause set associated with the user and / or the current system interface.

[0072] Preferably, the present application scheme first obtains the user's role information and identity information, and / or obtains the functional interface of the current system, and according to the user role, user identity and / or current system interface, filters the label clauses associated with the user and / or current functional interface to obtain a clause set including one or more label clauses, wherein the clause labels associated with the user role and user identity are recorded in the policy table and can be quickly queried. For example, Party B's finance department is concerned with the clauses corresponding to the labels such as "payment method" and "liability for breach of contract for overdue payment", and Party A's business department is concerned with the clauses corresponding to the labels such as "delivery time" and "acceptance method".

[0073] Furthermore, the solution of the present application may also include: adjusting the importance of each clause through the user's attribute information and / or the current system attribute information, such as setting a corresponding adjustment coefficient to adjust the importance level and / or quantitative value obtained above.

[0074] S132. Determine one or more target clauses from the tag clause set according to the importance of each clause, summarize them in a preset order, and obtain a target text.

[0075] Specifically, in one embodiment of the present application, after obtaining a set of user-related label terms, the terms obtained in the previous step are filtered from high to low according to the importance of the terms. For example, one or more target terms whose importance is greater than a certain threshold or a certain level can be filtered, and further summarized, merged and / or sorted according to preset rules according to the term labels to obtain the target text as the input text for summary generation.

[0076] S14. Generate a summary text of the contract document based on the target text.

[0077] The present application scheme determines and extracts the explicit content and / or emphasized content information of each target clause as the target element information for generating a summary of each clause, and then summarizes the target element information of each clause in combination with the attributes of the contract (framework contract, non-framework contract, etc.) according to a preset summary text expression structure.

[0078] S141. Determine the attributes of the contract text. If it is a framework contract, determine the corresponding participants, deadline, contract purpose and / or additional information of the contract purpose and deadline in each target clause, and obtain the element information generated by the summary of each clause.

[0079] In one embodiment, for a framework contract, there is no substantial transaction content. Therefore, the present application solution generates the target element information when generating the summary by extracting or clarifying one or more of the following information in each target clause: participating objects, term, purpose of contract, additional information on the purpose of contract and term, etc.

[0080] S142. If it is a non-framework contract, determine the participants, business subject / transaction substance and / or delivery / settlement information in each target clause, and obtain the element information generated by the summary of each clause.

[0081] For non-framework contracts, which are formal contracts with substantial transaction content, this application solution forms the target element information when generating the summary by extracting or clarifying one or more of the following information in each clause: participants, business subject, transaction substance and / or delivery / settlement information, etc.

[0082] S143, summarizing the target information generated by the summary of each clause according to a preset text expression structure.

[0083] Specifically, a configuration file or database can be used to manage preset text expression structures or templates, such as setting one or more expression combinations or templates for framework and non-framework combinations. Then, the target information generated based on the extracted summary of each clause is summarized according to the corresponding text expression structure or template.

[0084] The above solution of this application determines the essential content and key information of the corresponding summary by judging the essence of the contract attributes, and can realize the automatic generation of the summary of contract terms by presetting the text expression structure and target information extraction technology. This method combines rules and machine learning technology to efficiently and accurately generate standardized summary text, making the generated summary concise and brief.

[0085] Furthermore, after obtaining the target text, the present application scheme inputs the target text into a preset large language model and combines it with a pre-built second target prompt word to generate a corresponding summary for each clause, and generates a corresponding summary title. The title can be generated based on the target information when generating the summary.

[0086] Furthermore, considering the illusion of the big model, each summary and each contract clause content is input into the big language model and the pre-constructed third target prompt words for semantic verification to obtain the final summary text. The third target prompt words involve the construction of semantic content such as "verify the results of each summary and the content of the contract clause to determine whether it conforms to the meaning of the original text, or whether the summary needs to be modified".

[0087] like Figure 3 As shown, it is a schematic diagram of an embodiment of the present application for intelligently generating summaries for house rental contracts based on administrative users through the above-mentioned scheme. It can be seen from the generated result diagram that the present application scheme can accurately generate concise and concise contract summaries related to users.

[0088] The above solution of this application intelligently identifies the importance of each clause in the current contract text in a targeted manner, and extracts the corresponding key clause content as the text basis for summary generation, and further incorporates the contract type judgment, clause label identification, clause importance judgment, and clause importance screening into the contract summary technical solution, so as to achieve the purpose of making the contract summary concise and concise, and greatly improve the accuracy of summary generation. At the same time, the solution of this application further combines the attribute information of the user and / or to generate contract summary information related to the user and / or the current functional interface, which helps different users to quickly, efficiently and accurately obtain and understand the key contract information associated with it, and improves the work efficiency of various links such as the drafting, negotiation, and approval of the contract.

[0089] In one embodiment, Figure 4 FIG. 1 is a block diagram of a contract summary generation system provided by the present application, wherein the system includes: A contract type determination unit, used to obtain the contract document to be processed and determine the contract type; A clause label recognition unit, used to parse the contents of each clause of the contract document and assign an associated label to each clause; A clause importance determination unit, used to determine the importance of each clause according to the content of each clause, the contract type and the associated tags of each clause; The contract summary generation unit is used to extract one or more target clauses according to user attribute information and / or current system attribute information and the importance of each clause, form a target text according to preset rules; and generate a summary text of the contract document based on the target text.

[0090] In one embodiment, the present application further provides a computer-readable storage medium storing a computer program, wherein when the computer program is executed by a processor, the processor performs the following steps: Obtaining a contract document to be processed and determining a contract type of the contract document; Parsing the contents of each clause of the contract document and assigning associated tags to each clause; Determine the importance of each clause based on its content, the type of contract described, and the tags associated with each clause; Extract one or more target terms related to the user according to the user attribute information and the importance of each term to form a target text; A summary text of the contract document is generated based on the target text.

[0091] In one embodiment, Figure 5 As shown, the present application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor performs the following steps: Obtaining a contract document to be processed and determining a contract type of the contract document; Parsing the contents of each clause of the contract document and assigning associated tags to each clause; Determine the importance of each clause based on its content, the type of contract described, and the tags associated with each clause; Extract one or more target terms related to the user according to the user attribute information and the importance of each term to form a target text; A summary text of the contract document is generated based on the target text.

[0092] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the program can be stored in a non-volatile computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0093] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0094] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A method for generating a contract summary, characterized in that: The method comprises: Obtaining a contract document to be processed and determining a contract type of the contract document; Parsing the contents of each clause of the contract document and assigning associated tags to each clause; Determine the importance of each clause based on its content and the tags associated with it; Extract one or more target clauses according to user attribute information and / or current system attribute information and the importance of each clause, and form a target text according to preset rules; A summary text of the contract document is generated based on the target text.

2. The method according to claim 1, characterized in that The method further comprises: Inputting the contents of each clause of the contract document into a preset large language model and combining it with a pre-built first target prompt word to assign one or more associated tags to each clause; and / or, Based on the first model trained with a large language model and / or an NLP model, one or more associated tags are assigned to each term.

3. The method according to claim 1, characterized in that Determining the importance of each clause according to the contract type and the associated tags of each clause includes: Training the historical contract text based on a preset large language model and / or NLP model to obtain a trained second model; Inputting the content of the clauses of the contract, the labels associated with each clause, and the contract type into the trained second model for importance grading to obtain the importance level and / or quantitative value of each clause; and / or, The initial importance level and / or quantitative value of each preset clause label in the contract type is queried, and the key feature information of the clause content is extracted to strengthen or weaken it, so as to obtain the importance level and / or quantitative value of each clause.

4. The method according to claim 3, characterized in that The training of the historical contract text based on the preset large language model and / or NLP model to obtain the second training model includes: Building a second initial model based on a preset large language model and / or NLP model; Encode the contract type and clause label to obtain a feature vector; Generate a clause text vector based on the clause content, and digitize the key feature information in the clause content; The clause text vector, feature vector and numerical feature information are integrated to obtain a comprehensive feature vector; Divide the preprocessed feature vector data into training set, validation set and test set; Input the training set data into the second initial model in batches, perform multiple rounds of iterative training according to the preset loss function and optimization algorithm, and update the parameters of the model; The hyperparameters are adjusted according to the performance of the validation set to obtain the final trained second model.

5. The method according to claim 1, characterized in that The method further comprises: Obtaining the user's role information, identity information and / or the current system interface information, and filtering one or more tag terms associated with the user and / or the current system interface; One or more target clauses are determined according to the importance of each clause, and they are summarized in a preset order to obtain the target text.

6. The method according to any one of claims 1 to 5, characterized in that: The method further comprises: If the current contract is a framework contract, extract the additional information of the participants, term, contract purpose and / or contract purpose and term in each target clause to obtain the summary element information of each target clause; If the current contract is not a framework contract, extract the participating objects, business subject / transaction substance and / or delivery / settlement information in each target clause to obtain the summary element information of each target clause; The summary element information of each objective clause is summarized according to the preset text expression structure.

7. The method according to claim 6, characterized in that The method further comprises: Input the target text into the preset large language model and combine it with the pre-built second target prompt words to generate the corresponding summary of each clause and the corresponding summary title; The content of each summary and each contract clause is input into the large language model and the pre-built third target prompt word for semantic verification to obtain the final summary text.

8. A contract summary generation system, characterized in that: The system comprises: A contract type determination unit, used to obtain a contract document to be processed and determine the contract type of the contract document; A clause label recognition unit, used to parse the contents of each clause of the contract document and assign an associated label to each clause; A clause importance determination unit, used to determine the importance of each clause according to the content of each clause, the contract type and the associated tags of each clause; The contract summary generation unit is used to extract one or more target clauses according to user attribute information and / or current system attribute information and the importance of each clause, form a target text according to preset rules; and generate a summary text of the contract document based on the target text.

9. A computer-readable storage medium storing a computer program, wherein when the computer program is executed by a processor, the processor is caused to perform the steps of the method according to any one of claims 1 to 7.

10. A computer device comprising a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Electronic signing method and device, storage medium and server

    CN110232633A

  • Contract risk identification method and device and electronic equipment

    CN112950017A

  • Legal affair authorization data processing method, system and equipment

    CN118468844A

  • Legal document key information extraction method and system

    CN118520881A

  • Electronic contract management method and system based on deep learning model

    CN118761735A

Cited By

  • Bid document abstract generation method and system based on large language model

    CN121301563A

  • Intelligent document classification, label generation and abstract extraction method and system

    CN121614615A