A method and system for confirming the position of newly added clauses based on natural language processing

By using natural language processing technology, the location and numbering of newly added contract clauses are automatically confirmed and adjusted, solving the cumbersome problem of confirming newly added clauses in existing technologies and improving work efficiency and accuracy.

CN115408999BActive Publication Date: 2026-05-15GUANGDONG BOWEI CHUANGYUAN TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211062989.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-01
Publication Date
2026-05-15
Estimated Expiration
2042-09-01

AI Technical Summary

Technical Problem

In existing technologies, the process of confirming the location of newly added clauses in a contract is cumbersome, requiring manual adjustment of clause numbers and order, resulting in low efficiency.

Method used

Using a natural language processing-based approach, the system identifies contract types, risk points, and new clauses, and utilizes chapter theme models and clause order models to automatically confirm and adjust the position and number of new clauses.

Benefits of technology

It automatically confirms the location and number of newly added clauses, reducing manual analysis time and improving the accuracy and efficiency of adding new clauses.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115408999B_ABST
    Figure CN115408999B_ABST
Patent Text Reader

Abstract

A kind of natural language processing-based new clause position confirmation method and system, natural language processing-based new clause position confirmation method includes: obtaining first contract content, identifying contract type, display corresponding risk point and prompt new clause, according to new clause, the text content of first contract and contract type, obtain the contract chapter theme to which new clause belongs, obtain the text content of the contract chapter to which new clause belongs, and obtain updated clause order by clause order model, then according to chapter clause format, increase the clause number of new clause, increase clause number to corresponding position, while adjusting the clause number of context accordingly, output second contract content after new contract clause.This application obtains new clause by analyzing contract content, and after user confirmation, automatically analyzes the chapter and order in chapter to which new clause belongs, and automatically increases new clause to corresponding chapter and label.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of natural language processing technology, specifically relating to a method and system for confirming the location of newly added clauses based on natural language processing. Background Technology

[0002] A contract is an agreement between civil subjects to establish, modify, or terminate civil legal relations. In contemporary society, people generate many contracts in their daily lives and work, such as employee labor contracts, transportation contracts, procurement and sales contracts, engineering contracts, and trade contracts. To ensure the legality of signed contracts, they need to be reviewed.

[0003] When reviewing contracts online, adding clauses requires simply placing the cursor where you want to add the clause and clicking "Add". Users also need to manually add the new clause to the appropriate position, manually number the new clause according to the existing clauses, and adjust the clause numbers in the context, making the process quite cumbersome. Summary of the Invention

[0004] To address the technical deficiencies in the background technology, this invention proposes a method and system for confirming the location of newly added clauses based on natural language processing, which solves the aforementioned technical problems and meets practical needs. The specific technical solution is as follows:

[0005] The method for confirming the location of newly added clauses based on natural language processing according to a first aspect of the present invention includes the following steps:

[0006] Obtain the contents of the first contract;

[0007] Based on the content of the first contract, the contract type is identified, and risk points and suggestions for new clauses are displayed according to the contract type. The risk points are common risk points of the contract type, and the new clauses correspond to the risk types involved in the risk points.

[0008] Based on the newly added clause, the main text of the first contract, and the contract type, the contract chapter theme to which the newly added clause belongs is obtained;

[0009] Based on the theme of the contract chapter to which the new clause belongs, the main text of the contract chapter to which the new clause belongs is obtained using the main text of the first contract;

[0010] The text of the contract chapter to which the new clause belongs, the new clause, the theme of the contract chapter to which the new clause belongs, and the contract type are input into the clause order model to obtain the updated clause order, which is the clause order after the new clause is added.

[0011] According to the chapter clause format, add the clause number of the new clause, add the new clause with the clause number to the corresponding position of the corresponding contract chapter according to the updated clause order, and adjust the clause number of the context accordingly.

[0012] Output the second contract content after adding the newly added clauses.

[0013] The beneficial effects of the first aspect of this invention are as follows: By identifying the contract type based on the content of the first contract, and using the identified contract type to obtain and display common risk points and suggested new clauses for that contract type, the time spent on manual analysis of the new clauses can be reduced, and the new clauses are made more comprehensive and accurate. By identifying the contract chapter to which the new clause belongs, it is automatically added to the corresponding position in the relevant contract chapter, and a clause number and corresponding context-adjusted clause number are added, achieving automatic addition and numbering reordering. When reviewing contract additions, users only need to click "Add," and the system automatically analyzes the chapter to which the clause belongs and its order within the chapter, thereby automatically adding the new clause to the corresponding chapter. The new clause is automatically numbered according to the existing clauses, which is convenient, fast, and improves work efficiency.

[0014] According to some embodiments of the present invention, the step of obtaining the contract chapter topic to which the newly added clause belongs based on the newly added clause, the main text of the first contract, and the contract type includes:

[0015] Input the main text of the first contract into the chapter theme model to obtain the chapter theme and chapter text of the main text of the first contract;

[0016] Input the newly added clause into the clause topic model to obtain the clause type of the newly added clause;

[0017] Based on the contract type, the chapter theme, and the clause type of the newly added clause, the contract chapter theme to which the newly added clause belongs is obtained.

[0018] According to some embodiments of the present invention, the step of inputting the main text of the contract chapter to which the new clause belongs, the new clause, the theme of the contract chapter to which the new clause belongs, and the contract type into a clause order model to obtain an updated clause order includes:

[0019] The main text of the contract chapter to which the new clause belongs is merged with the new clause to obtain the updated chapter content;

[0020] The contract terms in the updated chapter content are classified using the terms theme model to obtain the terms type of the contract terms in the updated chapter content;

[0021] The updated clause order is obtained based on the clause type of the contract clauses in the updated chapter content, the contract chapter to which the newly added clauses belong, and the contract type.

[0022] According to some embodiments of the present invention, the subject matter model of the terms is determined by the following steps:

[0023] Obtain a contract training dataset, which includes contract type training data and corresponding contract text training data;

[0024] For each contract type in the contract type training data, the chapter topic model is used to divide the training data of each contract text corresponding to the contract type into chapters, so as to obtain the chapter topic training data and chapter text training data in each contract type.

[0025] For each contract type in the contract type training data, the clause labeling model is used to classify the clauses of each chapter text training data corresponding to the contract type to obtain the clause category training data for each contract type.

[0026] For each contract type in the contract type training data, using the chapter topic training data and the clause category training data, calculate the frequency of each clause category in the clause category training data belonging to each chapter topic in the chapter topic training data, and take the chapter topic with the highest frequency as the topic of the clause category.

[0027] According to some embodiments of the present invention, the clause label model is determined by the following steps:

[0028] Obtain a training dataset for contract terms, which includes training data for the main text of contract terms and training data for the labels of contract terms.

[0029] Using the training data of the contract terms as input and the training data of the contract terms labels as output, the ALBERT-TEXTCNN model is trained to obtain the terms label model.

[0030] According to some embodiments of the present invention, the chapter theme model includes a chapter segmentation model and a main text theme model.

[0031] According to some embodiments of the present invention, the chapter segmentation model and the main text topic model are determined by the following steps:

[0032] Obtain the contract training dataset;

[0033] Based on the contract type training data and the contract text training data, chapter topic training data and chapter text training data are obtained, and the chapter topic training data are merged.

[0034] The BEMS annotation method was used to annotate the text of the chapter training data, where the beginning of the chapter was labeled as B, the end as E, the middle part as M, and the other parts as S, to obtain the annotated training data;

[0035] Based on the labeled training data obtained using the BEMS annotation method, training data conforming to the reading comprehension model is obtained. A long short-term memory network with vector quantization, a machine reading comprehension model, and a named entity recognition model composed of an attention-decoupled, enhanced decoding, and transformer-based bidirectional encoder representation model are trained to obtain the chapter segmentation model.

[0036] Using the training data of the main text of the chapter as input and the training data of the topic of the chapter as output, train the BERT-BILSTM-ATTENTION-RCNN model to obtain the main text topic model.

[0037] According to some embodiments of the present invention, the clause order model is determined by the following steps:

[0038] Obtain the contract training dataset

[0039] For each contract type in the contract type training data, the chapter topic model is used to divide each contract text in the contract text training data into chapters, resulting in chapter topic training data and chapter text training data.

[0040] For each contract type in the contract type training data, for each chapter, the clause labeling model is used to classify the clauses in the chapter text training data to obtain the clause category of each clause.

[0041] For each contract type in the contract type training data, for each chapter, the order in which each clause category appears in that chapter is obtained according to the order in which the clauses appear in the chapter;

[0042] For each contract type in the contract type training data, for chapters with the same chapter theme in the chapter theme training data, the chapter text training data is used to obtain the chapter text with the same chapter theme, and the order values ​​of each clause category are added together. Then, the clause categories corresponding to each chapter theme in the chapter theme training data are filtered to obtain the sorting of the clause categories in each chapter theme under each contract type.

[0043] According to a second aspect of the present invention, a new clause location confirmation system based on natural language processing includes:

[0044] The data input unit allows the user to input the first contract content and select to add new clauses.

[0045] The data processing unit is configured to implement the method for confirming the location of a new clause based on natural language processing as described in the first aspect embodiment, calculate the new clause and confirm the location of the new clause;

[0046] The data output unit is used to display the newly added clause and output the second contract content after the first contract content is automatically confirmed in position and automatically renumbered after the newly added clause is added.

[0047] The beneficial effects of the second aspect of the present invention are as follows: when a user reviews a contract and adds a clause, the user inputs the contract content into the system through the data input unit. The user only needs to click "Add". The system's data processing unit can automatically analyze the chapter to which the new clause belongs and its order in the chapter, and automatically add the new clause to the corresponding chapter. The new clause is automatically numbered according to the original clauses, making the operation of adding clauses less cumbersome for the user and improving work efficiency.

[0048] According to a third aspect of the present invention, a computer-readable storage medium stores computer-executable instructions for causing a computer to perform the new clause location confirmation method based on natural language processing as described in a first aspect of the present invention. Attached Figure Description

[0049] Figure 1 This is a flowchart of a method for confirming the location of newly added clauses based on natural language processing, provided in an embodiment of the present invention;

[0050] Figure 2 This is a flowchart illustrating the determination of a clause subject model according to an embodiment of the present invention;

[0051] Figure 3 This is a flowchart illustrating the determination of a clause label model according to an embodiment of the present invention;

[0052] Figure 4 This is a flowchart illustrating the determination of a chapter segmentation model and a main text topic model according to an embodiment of the present invention;

[0053] Figure 5 This is a flowchart illustrating the determination of the clause order model provided in one embodiment of the present invention. Detailed Implementation

[0054] The embodiments of the present invention will be described below with reference to the accompanying drawings and related examples. The embodiments of the present invention are not limited to the following examples, and the present invention relates to the relevant necessary components in this technical field, which should be regarded as well-known technology in this technical field and can be known and mastered by those skilled in this technical field.

[0055] The following is for reference. Figures 1 to 5 A method for confirming the location of newly added clauses based on natural language processing according to an embodiment of the first aspect of the present invention is described.

[0056] like Figure 1 As shown, Figure 1 This is a flowchart of a method for confirming the location of a newly added clause based on natural language processing, according to an embodiment of the present invention. The method for confirming the location of a newly added clause based on natural language processing according to an embodiment of the present invention includes, but is not limited to, steps S100, S200, S300, S400, S500, S600, and S700.

[0057] Step S100: Obtain the contents of the first contract;

[0058] Step S200: Based on the content of the first contract, identify the contract type, and display risk points and prompts for new clauses according to the contract type. The risk points are common risk points of the contract type, and the new clauses correspond to the risk types involved in the risk points.

[0059] Step S300: Based on the new clause, the main text of the first contract, and the contract type, obtain the contract chapter theme to which the new clause belongs;

[0060] Step S400: Based on the theme of the contract chapter to which the new clause belongs, use the main text of the first contract to obtain the main text of the contract chapter to which the new clause belongs;

[0061] Step S500: Input the main text of the contract chapter to which the new clause belongs, the new clause, the theme of the contract chapter to which the new clause belongs, and the contract type into the clause order model to obtain the updated clause order. The updated clause order is the clause order after the new clause is added.

[0062] Step S600: According to the chapter clause format, add the clause number of the new clause, add the new clause with the clause number to the corresponding position of the corresponding contract chapter according to the updated clause order, and adjust the clause number of the context accordingly.

[0063] Step S700: Output the content of the second contract after adding the new clauses.

[0064] The process begins by retrieving the content of the first contract and identifying its type. Using this identified contract type, common risk points and suggested new clauses are identified and displayed. Based on the new clauses, the main text of the first contract, and the contract type, the theme of the contract chapter to which the new clauses belong is analyzed. The main text of the corresponding contract chapter is then retrieved based on this theme. The main text of the contract chapter to which the new clauses belong, the new clauses themselves, the contract chapter, and the contract type are input into a clause order model. This model calculates and outputs an updated clause order. Following the chapter clause format, a clause number is added to the new clause. This numbered clause is then added to the corresponding position in the relevant contract chapter, and the context clause numbers are adjusted accordingly. The clauses are then renumbered, and the content of the second contract after the new clauses are added is output, completing the insertion of the new clauses.

[0065] Based on the content of the first contract, the contract type is identified. Using this identified contract type, common risk points and suggested new clauses for that contract type are retrieved and displayed. This reduces the time spent manually analyzing new clauses and ensures more comprehensive and accurate additions. By identifying the contract chapter to which the new clause belongs, it is automatically added to the corresponding position within that chapter, along with a clause number and corresponding contextual clause numbers, achieving automatic addition and numbering reordering. When reviewing contract additions, users only need to click "Add," and the system automatically analyzes the clause's chapter and its order within the chapter, automatically adding the new clause to the appropriate chapter. The new clause is automatically numbered according to existing clauses, making the process convenient, fast, and improving work efficiency.

[0066] In some embodiments, when a user reviews a laptop purchase contract, the system identifies the contract type as a purchase contract and displays the risk point as the deposit amount in a specific area. A prompt is displayed indicating the need to add the following clause: Within ___ days of both parties reaching a purchase contract, Party B shall pay Party A a deposit of ___ yuan. In some embodiments, the specific area is the right side of the contract text box.

[0067] In some embodiments, when a user clicks the prompt to add a clause, the system determines the contract chapter topic of the proposed clause as: deposit clause, based on the prompt "Within ___ days of the signing of the sales contract, Party B shall pay Party A a deposit of ___ yuan", the main text of the current contract, and the fact that the current contract type is a sales contract.

[0068] In some embodiments, the system will prompt the main text of the contract chapter to which the new clause belongs, prompt the new clause "Within ___ days of the signing of the sales contract, Party B shall pay Party A a deposit of ___ yuan", prompt the contract chapter to which the new clause belongs to the topic of deposit clause and the contract type of sales contract. All of these prompts will be entered into the clause order model, and the updated clause order will be: deposit amount first.

[0069] In some embodiments, the context is: 1. Subject Matter of Sale; 1.1 Product Name… 2. Deposit Clause; 2.1 If Party B fails to pay the full amount within the agreed period, Party A has the right to withhold the entire deposit. According to the chapter clause format, add a clause number to the added clause “Within ___ days of the signing of the sales contract, Party B shall pay Party A a deposit of ___ yuan,” resulting in “2.1 Within ___ days of the signing of the sales contract, Party B shall pay Party A a deposit of ___ yuan.” After adjusting the clause number accordingly, the context becomes: 2. Deposit Clause; 2.1 Within ___ days of the signing of the sales contract, Party B shall pay Party A a deposit of ___ yuan; 2.2 If Party B fails to pay the full amount within the agreed period, Party A has the right to withhold the entire deposit.

[0070] In some embodiments, the types of contracts include, but are not limited to, sales contracts, contracts for the supply of electricity, water, gas, and heat, gift contracts, loan contracts, lease contracts, finance lease contracts, contracts for work, construction contracts, transportation contracts, technology contracts, safekeeping contracts, warehousing contracts, agency contracts, brokerage contracts, and unnamed contracts.

[0071] In some embodiments of the present invention, the contract chapter theme to which the new clause belongs is obtained based on the new clause, the main text of the first contract, and the contract type, including but not limited to the following steps:

[0072] Input the main text of the first contract into the chapter theme model to obtain the chapter theme and chapter text of the main text of the first contract;

[0073] Input the new clause into the clause subject model to obtain the clause type of the new clause;

[0074] Based on the contract type, chapter theme, and clause type of the newly added clause, the contract chapter theme to which the newly added clause belongs can be obtained.

[0075] The main text of the first contract is input into the chapter theme model, which then yields the chapter themes and main texts included in the first contract's content. Next, the newly added clause is input into the clause theme model, which identifies the clause type of the new clause. Using the contract type, chapter theme, and clause type of the new clause, the chapter theme to which the new clause belongs is analyzed. This process analyzes and determines the chapter theme to which a new clause belongs, providing a basis for determining the appropriate location for adding the new clause.

[0076] In some embodiments, the current contract text is input into the chapter theme model to obtain the chapter theme and chapter text included in the current text content. The chapter theme includes: Price and Payment, Deposit Clause, Rights and Obligations, and Liability for Breach of Contract. The prompt to add a clause, "Within ___ days of reaching a sales contract, Party B shall pay Party A a deposit of ___ yuan," is input into the clause theme model, resulting in a clause type of deposit amount. Based on the current contract type (sales contract), the current text content's included chapter theme, and the prompt to add a clause type (deposit amount), the contract chapter to which the proposed new clause belongs is obtained.

[0077] In some embodiments of the present invention, the main text of the contract chapter to which the new clause belongs, the new clause, the theme of the contract chapter to which the new clause belongs, and the contract type are input into the clause order model to obtain the updated clause order. The updated clause order is the clause order after the addition of the new clause, including but not limited to the following steps:

[0078] The main text of the contract chapter containing the new clause is merged with the new clause itself to obtain the updated chapter content;

[0079] The contract terms in the updated chapter content are classified using the clause theme model to obtain the clause types of the contract terms in the updated chapter content.

[0080] The updated clause order is determined by the clause type, the contract chapter to which the new clause belongs, and the contract type in the updated chapter content.

[0081] The process involves merging the main text of the contract chapter containing the newly added clause with the new clause itself to obtain the updated chapter content. Then, a clause theme model is used to categorize the contract clauses within the updated chapter content. Based on the categorization results, the clause types of the contract clauses in the updated chapter content are determined. Finally, based on the clause types of the contract clauses in the updated chapter content, the contract chapter to which the new clause belongs, and the contract type, the updated clause order is analyzed. This process achieves the analysis of the clause order and yields the updated clause order.

[0082] In some embodiments, the newly added clause is: Within ___ days of the signing of the sales contract, Party B shall pay Party A a deposit of ___ yuan. The main text of the contract chapter to which the newly added clause belongs and the added clause are merged to obtain the updated chapter content. Then, the contract clauses in the updated chapter content are categorized using a clause theme model, resulting in clause types of "deposit amount" and "deposit retention." Based on the clause types "deposit amount and deposit retention" in the updated chapter content, the contract chapter to which the added clause belongs being a deposit clause, and the contract type being a sales contract, the updated clause order is: first deposit amount, then deposit retention.

[0083] refer to Figure 2 In some embodiments of the present invention, the determination of the subject matter model includes, but is not limited to, the following steps:

[0084] Step S311: Obtain the contract training dataset, which includes contract type training data and corresponding contract text training data.

[0085] Step S312: For each contract type in the contract type training data, use the chapter topic model to divide the training data of each contract text corresponding to the contract type into chapters, and obtain the chapter topic training data and chapter text training data in each contract type.

[0086] Step S313: For each contract type in the contract type training data, use the clause label model to classify the clauses of each chapter of the main text training data corresponding to the contract type, and obtain the clause category training data for each contract type.

[0087] Step S314: For each contract type in the contract type training data, use the chapter topic training data and the clause category training data to calculate the frequency of each clause category in the clause category training data belonging to each chapter topic in the chapter topic training data, and take the chapter topic with the highest frequency as the topic of the clause category.

[0088] The process involves obtaining a contract training dataset, which includes training data for contract types and corresponding contract text. For each contract type in the training data, a chapter-topic model is used to divide the contract text training data into chapters, resulting in chapter-topic training data and chapter text training data. For each contract type in the training data, a clause labeling model is used to classify the clauses in each chapter text training data, resulting in clause category training data for each contract type. Finally, for each contract type in the training data, the frequency of each clause category belonging to each chapter topic is calculated, and the chapter topic with the highest frequency is taken as the chapter topic for that clause category. By classifying the clauses in the chapter text, clause categories are obtained. Then, by calculating the relationship between chapter topics and clause categories, the chapter topic with the highest probability is taken as the chapter topic for that clause category, thus determining the chapter topic for that clause category. Training the clause-topic model yields the chapter topic corresponding to each clause category under each contract type, as well as the clause categories included in each chapter topic under each contract type.

[0089] In some embodiments, if the deposit amount appears a total of 10 times, 8 times in the deposit terms and 2 times in the price and payment, then the deposit amount terms are considered deposit terms.

[0090] refer to Figure 3 In some embodiments of the present invention, the determination of the clause label model includes, but is not limited to, the following steps:

[0091] Step S321: Obtain the contract terms training dataset, which includes training data for the main body of the contract terms and training data for the labels of the contract terms.

[0092] Step S322: Using the training data of the main text of the contract terms as input and the training data of the contract terms labels as output, train the ALBERT-TEXTCNN model to obtain the terms label model.

[0093] A training dataset for contract terms is obtained, comprising training data for the main text of the contract terms and training data for the labels of the contract terms. The label training data is used as output, and the main text training data is used as input to train an ALBERT-TEXTCNN model, resulting in a clause labeling model. This model is used to determine the clause category of the contract based on the main text. The ALBERT layer offers fast training speed and excellent language representation, capturing specific information at designated locations within the context. The TEXTCNN layer captures local text features. Through the trained clause labeling model, the contract clause category can be determined based on the main text of the contract terms.

[0094] In some embodiments of the present invention, the chapter theme model includes a chapter segmentation model and a main text theme model.

[0095] First, a certain number of texts are divided into chapters using a chapter segmentation model, and then a chapter topic is classified into a chapter topic using a main text topic model, thus realizing the determination of the chapter topic.

[0096] refer to Figure 4 In some embodiments of the present invention, the determination of the chapter segmentation model and the main text topic model includes, but is not limited to, steps S331, S332, S333, S334 and S335.

[0097] Step S331: Obtain the contract training dataset;

[0098] Step S332: Based on the contract type training data and contract text training data, obtain the chapter topic training data and chapter text training data, and merge the chapter topic training data;

[0099] Step S333: Use the BEMS annotation method to annotate the text of the chapter body training data, where the beginning of the chapter is labeled as B, the end as E, the middle part as M, and the other parts as S, to obtain the annotated training data;

[0100] Step S334: Using the chapter text training data as input and the labeled training data obtained by the BEMS annotation method as output, train the long short-term memory network after vector quantization, the machine reading comprehension model, and the named entity recognition model composed of attention-decoupled, enhanced decoding, and transformer-based bidirectional encoder representation model to obtain the chapter segmentation model.

[0101] Step S335: Using the chapter text training data as input and the chapter topic training data as output, train the BERT-BILSTM-ATTENTION-RCNN model to obtain the text topic model.

[0102] Obtain the contract training dataset. Based on the contract type training data and contract text training data in the contract training dataset, obtain chapter topic training data and chapter text training data, and merge the chapter topic training data. For the text in the chapter text training data, use the BEMS annotation method for annotation: the beginning of the chapter is labeled B, the end is labeled E, the middle part is labeled M, and the rest is labeled S, resulting in labeled training data. Then, using the chapter text training data as input and the labeled training data obtained by the BEMS annotation method as output, train a long short-term memory network with vector quantization, a machine reading comprehension model, and a named entity recognition model composed of an attention-decoupled, augmented decoding, and transformer-based bidirectional encoder representation model to obtain the chapter segmentation model. Using the chapter text training data as input and the chapter topic training data as output, train the BERT-BILSTM-ATTENTION-RCNN model to obtain the text topic model.

[0103] Using a contract training dataset, a chapter segmentation model and a main text topic model were trained. The chapter segmentation model divides a certain amount of text into chapters based on its content. It employs a long short-term memory network with vector quantization, a machine reading comprehension model, and a named entity recognition model composed of an attention-decoupled, augmented decoding, and transformer-based bidirectional encoder representation model. This allows the chapter segmentation model to divide multiple sentences of text into different chapters, enabling the reordering of contract text after the addition of new clauses. The main text topic model categorizes a certain amount of text into a single chapter topic. By first using the chapter segmentation model to divide a certain amount of text into chapters, and then using the main text topic model to categorize it into a single chapter topic, the chapter topic is determined.

[0104] In some embodiments, the named entity recognition model, consisting of a vector-quantized long short-term memory network, a machine reading comprehension model, and a transducer-based bidirectional encoder representation model with attention decoupling and enhanced decoding, comprises an attention-decoupling, enhanced-decoding transducer-based bidirectional encoder representation model, a vector-quantized long short-term memory network, and a machine reading comprehension model. The attention-decoupling, enhanced-decoding transducer-based bidirectional encoder representation model includes: a first word embedding layer for generating word content embedding vectors and position vectors; a transducer layer for calculating attention weights between words based on word content and relative position; a second word embedding layer for generating absolute word position vectors; and an enhanced decoding layer for decoding masked words based on aggregated context embeddings of word content and position. The vector-quantized long short-term memory network includes: two layers of disoriented long short-term memory networks, a vector quantization module corresponding to each long short-term memory network, and a decoding module corresponding to each vector quantization module. The machine reading comprehension model includes: a binary classifier for predicting start position labels, a binary classifier for predicting end position labels, and a probability matrix classifier. The attention-decoupled, augmented decoding-based transformer-based bidirectional encoder representation model generates vectors containing contextual information from the input text. These vectors are then used as input to a vector-quantized Long Short-Term Memory (LSTM) network. This LSM network consists of two layers of dissimilar LSMs, each with its corresponding vector quantization module and decoding module. The predictions are concatenated and used as input to the next layer of the machine reading comprehension model. By constraining the output sequence, the model effectively avoids errors in the LSM network's output, improving accuracy. This attention-decoupled, augmented decoding-based transformer-based bidirectional encoder representation model can represent text content, relative text position, and absolute text position using vectors. Since contract performance information often requires both relative and absolute text positions for determination, incorporating these into vector representation improves model accuracy. Furthermore, the vector-quantized LSM network compresses the data volume generated by the LSM network, increasing the computation speed of subsequent models. Machine reading comprehension models encode prior knowledge, which can reduce the impact of sparsity in training data caused by a lack of labeled data.

[0105] refer to Figure 5 In some embodiments of the present invention, the determination of the clause order model includes, but is not limited to, the following steps:

[0106] Step S510: Obtain the contract training dataset;

[0107] Step S520: For each contract type in the contract type training data, use the chapter topic model to divide each contract text in the contract text training data into chapters to obtain chapter topic training data and chapter text training data.

[0108] Step S530: For each contract type in the contract type training data, for each chapter, use the clause label model to classify the clauses in the chapter text training data to obtain the clause category of each clause.

[0109] Step S540: For each contract type in the contract type training data, for each chapter, obtain the order in which each clause category appears in the chapter according to the order in which the clauses appear in the chapter.

[0110] Step S550: For each contract type in the contract type training data, for chapters with the same chapter theme in the chapter theme training data, use the chapter text training data to obtain the chapter text with the same chapter theme, add up the order values ​​of each clause category, and filter according to the clause category corresponding to each chapter theme in the chapter theme training data to obtain the sorting of clause categories in each chapter theme under each contract type.

[0111] A contract training dataset is obtained, comprising contract type training data and contract text training data. For each contract type in the contract type training data, a chapter-topic model is used to divide each contract text into chapters, resulting in a chapter topic and chapter text. For each chapter, a clause-topic model is used to classify the clauses in the chapter text, resulting in a clause category for each clause. The order of each clause category within a chapter is then determined based on the order in which the clauses appear. For chapters with the same topic, the numerical values ​​of the order of each clause category are summed, and the ranking is filtered according to the clause category corresponding to each chapter topic, resulting in the ranking of clause categories within each chapter topic for each contract type. The order of clauses exhibits a certain logical structure. The clause order model, using the contract training dataset, captures the inherent relationships between clauses and can be used to rank newly added clauses.

[0112] In some embodiments, in a sales contract, the deposit clause is numbered 1 and the deposit refund clause is numbered 2 according to the order in which the clauses appear in the chapters. In this case, the deposit amount clause precedes the deposit refund clause, and the deposit amount clause and the deposit refund clause are arranged in ordinal order.

[0113] In some embodiments, there are 100 sales contracts in total. Of these, 80 contracts have a deposit amount clause numbered 1, and 20 contracts have a clause numbered 2. Therefore, the sum of the ordinal numbers of the deposit amount clauses is 1*80 + 2*20 = 120. Similarly, there are 20 contracts with deposit refund clauses numbered 1, and 80 contracts with deposit refund clauses numbered 2. Therefore, the sum of the ordinal numbers of the deposit refund clauses is 1*20 + 2*80 = 180. Since the sum of the ordinal numbers of the deposit amount clauses is less than the sum of the ordinal numbers of the deposit refund clauses, in the sales contracts, the deposit amount clauses are numbered 1, and the deposit refund clauses are numbered 2.

[0114] The following is for reference. Figures 1 to 5 A new clause location confirmation system based on natural language processing according to an embodiment of the second aspect of the present invention is described.

[0115] The system for confirming the location of newly added clauses based on natural language processing includes a data input unit, a data processing unit, and a data output unit. The data input unit allows the user to input the first contract content and select to add a new clause. The data processing unit implements the method for confirming the location of newly added clauses based on natural language processing, as described in any embodiment of the first aspect, calculates the new clause, and confirms its location. The data output unit displays the new clause and outputs the second contract content, which automatically confirms the location and renumbers the new clause after its addition to the first contract content.

[0116] The Natural Language Processing-based New Clause Location Confirmation System package obtains the input first contract content through a data input unit, and uses a data processing unit to identify the contract type using the Natural Language Processing-based New Clause Location Confirmation method in the first aspect embodiment. Using the identified contract type, it obtains common risk points and suggested new clauses for that contract type. The data output unit displays these common risk points and suggested new clauses. When the user selects to add a clause through the data input unit, the data processing unit uses the Natural Language Processing-based New Clause Location Confirmation method in the first aspect embodiment to automatically analyze the chapter to which the new clause belongs and its order within the chapter, and automatically adds the new clause to the corresponding chapter. The new clause is automatically numbered according to the existing clauses. Finally, the data output unit automatically confirms the location and re-numbers the new clause in the second contract content after adding it to the first contract content, thus completing the addition of the new clause.

[0117] When users review and add clauses to a contract, they input the contract content into the system through the data input unit. They only need to click "Add," and the system's data processing unit can automatically analyze the chapter to which the new clause belongs and its order within the chapter. The new clause is then automatically added to the corresponding chapter, and the new clause is automatically numbered according to the existing clauses. This makes the process of adding clauses less cumbersome for users and improves work efficiency.

[0118] According to a third aspect embodiment of the present invention, a computer-readable storage medium stores computer-executable instructions that are executed by a processor or controller, for example, by a processor in the above-described apparatus embodiments, causing the processor to perform the natural language processing-based method for confirming the location of newly added clauses in any of the above embodiments, for example, performing the above... Figures 1 to 5 Chinese method.

[0119] The above description is only a preferred embodiment of the present invention. It should be noted that those skilled in the art can make several improvements and modifications without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.

Claims

1. A method for confirming the location of newly added clauses based on natural language processing, characterized in that, include: Obtain the contents of the first contract; Based on the content of the first contract, the contract type is identified, and risk points and suggestions for new clauses are displayed according to the contract type. The risk points are common risk points of the contract type, and the new clauses correspond to the risk types involved in the risk points. Based on the newly added clause, the main text of the first contract, and the contract type, the contract chapter theme to which the newly added clause belongs is obtained; Based on the theme of the contract chapter to which the newly added clause belongs, the main text of the contract chapter to which the newly added clause belongs is obtained using the main text of the first contract; The text of the contract chapter to which the new clause belongs, the new clause, the theme of the contract chapter to which the new clause belongs, and the contract type are input into the clause order model to obtain the updated clause order, which is the clause order after the new clause is added. According to the chapter clause format, add the clause number of the new clause, add the new clause with the clause number to the corresponding position of the corresponding contract chapter according to the updated clause order, and adjust the clause number of the context accordingly. Output the second contract content after adding the newly added clauses.

2. The method for confirming the location of newly added clauses based on natural language processing according to claim 1, characterized in that, The step of obtaining the contract chapter theme to which the new clause belongs based on the new clause, the main text of the first contract, and the contract type includes: Input the main text of the first contract into the chapter theme model to obtain the chapter theme and chapter text of the main text of the first contract; Input the newly added clause into the clause topic model to obtain the clause type of the newly added clause; Based on the contract type, the chapter theme, and the clause type of the newly added clause, the contract chapter theme to which the newly added clause belongs is obtained.

3. The method for confirming the location of newly added clauses based on natural language processing according to claim 2, characterized in that, The step of inputting the main text of the contract chapter to which the new clause belongs, the new clause, the theme of the contract chapter to which the new clause belongs, and the contract type into the clause order model to obtain the updated clause order includes: The main text of the contract chapter to which the new clause belongs is merged with the new clause to obtain the updated chapter content; The contract terms in the updated chapter content are classified using the terms topic model to obtain the terms type of the contract terms in the updated chapter content; The updated clause order is obtained based on the clause type of the contract clauses in the updated chapter content, the contract chapter to which the newly added clauses belong, and the contract type.

4. The method for confirming the location of newly added clauses based on natural language processing according to claim 2, characterized in that, The subject matter model of the terms is determined by the following steps: Obtain a contract training dataset, which includes contract type training data and corresponding contract text training data; For each contract type in the contract type training data, the chapter topic model is used to divide the training data of each contract text corresponding to the contract type into chapters, so as to obtain the chapter topic training data and chapter text training data in each contract type. For each contract type in the contract type training data, the clause labeling model is used to classify the clauses of each chapter text training data corresponding to the contract type to obtain the clause category training data for each contract type. For each contract type in the contract type training data, using the chapter topic training data and the clause category training data, calculate the frequency of each clause category in the clause category training data belonging to each chapter topic in the chapter topic training data, and take the chapter topic with the highest frequency as the topic of the clause category.

5. The method for confirming the location of newly added clauses based on natural language processing according to claim 4, characterized in that, The terms and conditions labeling model is determined by the following steps: Obtain a training dataset for contract terms, which includes training data for the main text of contract terms and training data for the labels of contract terms. Using the training data of the contract terms as input and the training data of the contract terms labels as output, the ALBERT-TEXTCNN model is trained to obtain the terms label model.

6. The method for confirming the location of newly added clauses based on natural language processing according to claim 4, characterized in that, The chapter theme model includes a chapter segmentation model and a main text theme model.

7. The method for confirming the location of newly added clauses based on natural language processing according to claim 6, characterized in that, The chapter segmentation model and the main text topic model are determined by the following steps: Obtain the contract training dataset; Based on the contract type training data and the contract text training data, chapter topic training data and chapter text training data are obtained, and the chapter topic training data are merged. The BEMS annotation method was used to annotate the text of the chapter training data, where the beginning of the chapter was labeled as B, the end as E, the middle part as M, and the other parts as S, to obtain the annotated training data; Based on the labeled training data obtained using the BEMS annotation method, training data conforming to the reading comprehension model is obtained. A long short-term memory network with vector quantization, a machine reading comprehension model, and a named entity recognition model composed of an attention-decoupled, enhanced decoding, and transformer-based bidirectional encoder representation model are trained to obtain the chapter segmentation model. Using the training data of the main text of the chapter as input and the training data of the topic of the chapter as output, train the BERT-BILSTM-ATTENTION-RCNN model to obtain the main text topic model.

8. The method for confirming the location of newly added clauses based on natural language processing according to claim 4, characterized in that, The order of the terms model is determined by the following steps: Obtain the contract training dataset; For each contract type in the contract type training data, the chapter topic model is used to divide each contract text in the contract text training data into chapters, resulting in chapter topic training data and chapter text training data. For each contract type in the contract type training data, for each chapter, the clause labeling model is used to classify the clauses in the chapter text training data to obtain the clause category of each clause. For each contract type in the contract type training data, for each chapter, the order in which each clause category appears in that chapter is obtained according to the order in which the clauses appear in the chapter; For each contract type in the contract type training data, for chapters with the same chapter theme in the chapter theme training data, the chapter text training data is used to obtain the chapter text with the same chapter theme, and the order values ​​of each clause category are added together. Then, the clause categories corresponding to each chapter theme in the chapter theme training data are filtered to obtain the sorting of the clause categories in each chapter theme under each contract type.

9. A system for confirming the location of newly added clauses based on natural language processing, characterized in that, include: The data input unit allows the user to input the first contract content and select to add new clauses. The data processing unit is configured to implement the method for confirming the location of a new clause based on natural language processing as described in any one of claims 1 to 8, calculate the new clause and confirm the location of the new clause; The data output unit is used to display the newly added clause and output the second contract content after the first contract content is automatically confirmed in position and automatically renumbered after the newly added clause is added.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions for causing a computer to perform the method for confirming the location of a new clause based on natural language processing as described in any one of claims 1 to 8.