A smart contract audit method based on factor extraction
Through two-way long and short-term memory network and C-E graph analysis technology, combined with dual feedback joint training and BERTScore evaluation, the problem of relying on manual rules and error propagation in the intelligent contract audit system is solved, and the accuracy of contract factor extraction and intelligent auditing are improved. , reduce labor costs and improve the efficiency and quality of legal affairs handling.
Patent Information
- Application Number
- CN202411455223.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-18
- Publication Date
- 2024-12-20
- Estimated Expiration
- 2044-10-18
AI Technical Summary
The existing smart contract review system relies too much on manual writing rules, lacks flexibility, and fails to deeply explore the deep relationship between contract structure and elements. It is easy to cause error transmission in multi-stage processing, affecting the accuracy and compliance of contract risk assessment. .
The contract module is characterized by using a two-way long and short-term memory network to construct a C-E graph to analyze the relationship between contract elements and module types. Through a dual feedback joint training scheme, it combines relationship encoding and sentence vector representation to capture the mutual relationship between module classification and factor extraction tasks. and use BERTScore to evaluate the text similarity of missing elements and output the audit report.
It improves the accuracy and overall performance of contract factor extraction, reduces labor costs, accelerates work efficiency, improves the standardization and consistency of legal affairs handling, and brings higher efficiency and quality to the legal industry.
Smart Images

Figure CN118967068B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of intelligent text auditing, and in particular to an intelligent contract auditing method based on element extraction. Background Art
[0002] As an important carrier of business transactions, the number of contracts has shown explosive growth. Tens of thousands of contracts are signed every day, which not only brings convenience to business processes, but also gives rise to the demand for efficient processing of contract documents. Contract review is particularly critical, as it is related to the smooth progress of business activities and also affects the legal risk prevention and control of enterprises. Each contract carries a wealth of business information, from the contract name and number to the effective conditions and clauses, which are important bases for business decisions.
[0003] In the process of complex trade negotiations or agreement revisions, the accurate grasp and careful verification of contract terms are directly related to the interests and risks of enterprises. However, the traditional manual review method has many pain points: long cycle, low efficiency, and high legal expertise requirements for reviewers. If the review is not rigorous, it may lead to a decline in contract quality and even cause immeasurable losses to the enterprise. In order to solve this problem, automated contract review has gradually received attention.
[0004] In the current approach, the implementation of smart contract review systems has become a reality, which aims to automate the contract review process to improve review efficiency and accuracy; such systems have the ability to automatically identify and extract key contract information, such as contract terms, conditions and elements, and can identify potential risk factors;
[0005] Since contracts are semi-structured text data, the elements therein are closely related to the contract structure and terms. Usually, the elements are in fixed positions and formats, which facilitates information extraction. Intelligent contract review systems usually integrate advanced technologies such as text classification and named entity recognition to accurately locate and extract contract content. By adopting such a system, enterprises can speed up contract review, reduce labor costs, and reduce risks caused by human errors.
[0006] At present, research on smart contract review systems is still relatively scarce, and there are many problems and challenges. In the existing technology, contract review mainly uses machine learning methods to extract important elements of the contract for review. The journal article "Extracting Contract Elements", Proceedings of the 16th International Conference on Artificial Intelligence and Law in 2017, mentioned in its public content that the classifier method combined with manually written rules has the best effect on extracting contract entities.
[0007] However, this method relies too much on manually written rules and lacks flexibility and intelligence. The smart contract review function launched by the eSignbao platform classifies contracts through text classification methods, and then uses entity recognition methods to extract important elements in the contract. In this way, it determines which missing elements exist in the contract and gives corresponding risk warnings.
[0008] However, this method realizes entity recognition tasks based on text classification, which is prone to error propagation in multi-stage processing, affecting the accuracy of the results, and further affecting the integrity and compliance of contract risk assessment; at the same time, this method ignores the importance of contract structure and module characteristics, and lacks consideration of the relationship between contract elements and contract structure.
[0009] Therefore, how to make full use of the structural characteristics of the contract while avoiding the error propagation caused by multi-tasking to improve the accuracy of contract element extraction is a major challenge currently faced. Solving this problem will not only help improve the efficiency and accuracy of contract review, but also provide strong support for the company's contract management and risk control. Summary of the invention
[0010] The present invention aims to solve the problems in the prior art such as over-reliance on manual rules and lack of flexibility; failure to deeply explore the deep relationship between contract structure and elements, and easy error propagation in multi-stage processing, and provide an intelligent contract audit method based on element extraction.
[0011] In order to solve the above technical problems, the technical solutions of the present invention are as follows:
[0012] A smart contract audit method based on element extraction, comprising:
[0013] Step 1: split the original contract into multiple contract modules, and use a bidirectional long short-term memory network to feature encode the sentences in the contract modules to convert the sentences into vector representations;
[0014] Step 2: Analyze the frequency of co-occurrence of contract element types and contract module types to determine the correlation between the two, and construct a CE graph to obtain a relationship coding representation;
[0015] Step 3, combining the relational encoding representation and the sentence vector representation, adopting a dual feedback scheme to jointly train the classification task and the feature extraction task, capturing the interaction between the dual feedback scheme jointly training the classification task and the feature extraction task, and extracting the contract elements;
[0016] Step 4: Combine the knowledge base to search for contract elements related to the missing elements of the contract, re-rank the retrieved texts using the Chinese text similarity evaluation index, supplement the missing elements of the contract based on the information with the highest similarity, and output the audit report;
[0017] In step 4, the modules related to the missing elements of the contract are searched in combination with the knowledge base. , using the Chinese text similarity evaluation index BERTScore to evaluate the text in the knowledge base Re-ranking is performed, and the information with the highest similarity is used as the supplementary content of the missing elements to output the audit report. The calculation method of the Chinese text similarity evaluation index is:
[0018] (17),
[0019] in, Representation Module The i-th clause of Representation Module The i-th clause of ;
[0020] Where N represents the module and modules The total number of clauses, is the similarity between the i-th clause of t1 and the i-th clause of t2 calculated by the BERT model;
[0021] The dual feedback scheme jointly trains the contract module classification task and the contract element extraction task:
[0022] It is a cross-domain, multi-task training process used for module classification and contract element extraction tasks; this process combines a two-way feedback mechanism. During the training process, reverse information is transmitted through bw and forward information is transmitted through fw.
[0023] Preferably, the working process of step 1 further includes:
[0024] Based on the original contract text, segment the paragraphs, wherein the paragraphs contain sentences ;
[0025] Where n is the length of the sentence, input sentence s;
[0026] Embed each word as a vector, combined with character-level features to capture the meaning of the word;
[0027] Then, a bidirectional long short-term memory network is used to encode sentence-level features so that the model can understand the contextual information of the sentence;
[0028] The calculation method for converting the sentence into a vector representation is to use formula (1), formula (2), formula (3) and formula (4) in sequence:
[0029] (1),
[0030] (2),
[0031] (3),
[0032] (4),
[0033] in, represents word-level embedding, represents character-level embedding;
[0034] in, is a standard convolutional neural network that embeds the character-level sequence of words in the sentence s. Perform operations;
[0035] in, and represents the vector concatenation operator;
[0036] represents the output hidden vector and input word of the contract module classification and contract element extraction for task t∈{CC, CEE};
[0037] → and ← represent the unit directions of the bidirectional LSTM network.
[0038] Preferably, in the step 2, if the co-occurrence probability of the element type and the module type in the CE graph exceeds a preset threshold, two nodes are connected in the CE graph to indicate that there is a relationship between them;
[0039] The relational encoding representation of the CE graph can help the model understand the relationship between element types and clause types, thereby improving the performance of the model when processing contract texts;
[0040] The specific method of relationship encoding is:
[0041] (5),
[0042] (6),
[0043] in, and Is the feature type and module type Representation of;
[0044] in, and are the weights in training, respectively used for feature type and module types;
[0045] in, and is the self-connection matrix;
[0046] in, Is the feature type The set of adjacent module nodes;
[0047] in, is the module type, The set of neighboring feature nodes, is the activation function.
[0048] Preferably, in the step 3, after extracting sentence-level features through a bidirectional long short-term memory network and obtaining overall features of the sentence using an attention mechanism;
[0049] The prediction result distribution is represented according to the result distribution vector and the module type, and the forward information and backward information of the sentence are calculated through the forward and backward information to reduce the prediction error;
[0050] After that, standard conditional random fields are used for inference to predict the label sequence of the elements based on the contextual features of the sentence and the forward information obtained from the module classification task;
[0051] Afterwards, the dynamic programming algorithm Viterbi is used to search for the highest-scoring tag sequence and calculate the backward information of the sentence.
[0052] Preferably, the module classification task calculation method is:
[0053] (7),
[0054] (8),
[0055] 9),
[0056] in, Indicates the use of attention mechanism to represent the overall features of a given sentence. Representing words The trainable attention weights. Represents the resulting distribution vector.
[0057] Preferably, the forward information and the backward information are calculated by:
[0058] (10),
[0059] (11),
[0060] (12),
[0061] (13),
[0062] Among them, given task training examples;
[0063] In a preset scenario, the result distribution vector has been predicted ;
[0064] in, and They are module type or Representation of each feature type;
[0065] in, and Representation based on potential type vector The forward information and backward information calculated are as follows:
[0066] ITV cc is the latent type vector for contract module classification, combining the result distribution vector and module type;
[0067] Ivc ee is the latent type vector of the contract element extraction, which combines the result distribution vector and the representation of the element type;
[0068] W f Forward transformation matrix, used to calculate the forward information fw from Itvcc;
[0069] W b The inverse transformation matrix is used to calculate the reverse information bw from Itvcee;
[0070] (14),
[0071] Among them, norm(·) is the normalization function, is the product operator;
[0072] Among them, fw s Indicates that a sentence is transferred from the module classification to the contract element extraction task.
[0073] Preferably, the calculation method of the factor extraction is:
[0074] (15),
[0075] in, represents an arbitrary sequence of labels;
[0076] in, Yes Tags Model parameters, yes and Deviation;
[0077] (16),
[0078] in, Represents words in a sentence The backward information comes from the contract element extraction task;
[0079] Among them, y cc is the final predicted label;
[0080] softmax(·) is the softmax function.
[0081] Preferably, in step 4, the module related to the missing elements of the contract is searched in combination with the knowledge base. , using the Chinese text similarity evaluation index BERTScore to evaluate the text in the knowledge base Re-ranking is performed, and the information with the highest similarity is used as the supplementary content of the missing elements to output the audit report. The calculation method of the Chinese text similarity evaluation index is:
[0082] (17),
[0083] in, Representation Module The i-th clause of Representation Module The i-th clause of ;
[0084] Where N represents the module and modules The total number of clauses, is the similarity between the i-th clause of t1 and the i-th clause of t2 calculated by the BERT model.
[0085] The present invention has the following beneficial effects:
[0086] (1) This method makes full use of the contract structure by constructing a CE graph to explore the correlation between modules and elements and adopting a dual-feedback joint training scheme to simultaneously optimize the two tasks of module classification and element extraction. This strategy enables the model to capture the interaction between the two tasks and improves the overall performance. It enables the model to better understand the structure and content of the contract and improves the effect of extracting elements on different types of contracts.
[0087] (2) In practical applications, this method helps to improve the intelligence of contract review, which not only reduces labor costs and speeds up work efficiency, but also improves the standardization and consistency of legal affairs processing through automated processing. It brings higher efficiency and quality to the legal industry and is expected to play an important role in the field of intelligent justice. BRIEF DESCRIPTION OF THE DRAWINGS
[0088] The present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments.
[0089] Figure 1 It is the technical roadmap of the contract review based on factor extraction of the present invention;
[0090] Figure 2 is an embodiment of the CE diagram of the present invention;
[0091] Figure 3 This is the dual feedback joint training process of the present invention. DETAILED DESCRIPTION
[0092] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the drawings 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 in 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; it should be noted that in this application, for the convenience of description, the "left side" in the current view is the "first end", the "right side" is the "second end", the "upper side" is the "first end", and the "lower side" is the "second end". The purpose of such description is to clearly express the technical solution, and it should not be understood as an improper limitation on the technical solution of this application.
[0093] In order to facilitate the understanding of this application, the relevant technical terms and their English reference names in this application are provided here;
[0094] Specifically:
[0095] Bidirectional long short-term memory network, LSTM / Bi-LSTM;
[0096] CE diagram, Component-Element;
[0097] Chinese text similarity evaluation index, BERTScore;
[0098] Conditional Random Field, CRF.
[0099] See also Figure 1-3 As shown in the figure, the smart contract audit method based on factor extraction includes the following:
[0100] Step 1: Split the original contract into multiple contract modules, and use a bidirectional long short-term memory network (LSTM / Bi-LSTM) to feature encode the sentences in the contract modules to convert the sentences into vector representations;
[0101] Step 2: Analyze the frequency of co-occurrence of contract element types and contract module types to determine the correlation between the two, and construct a CE graph (Component-Element) to obtain the relationship coding representation;
[0102] Step 3, combining the relational encoding representation and the sentence vector representation, adopting a dual feedback scheme to jointly train the classification task and the feature extraction task, capturing the interaction between the dual feedback scheme jointly training the classification task and the feature extraction task, and extracting the contract elements;
[0103] Step 4: Combine the knowledge base to search for contract elements related to the missing elements of the contract, use the Chinese text similarity evaluation index BERTScore to re-rank the retrieved texts, supplement the missing elements of the contract based on the information with the highest similarity, and output the audit report.
[0104] In a specific implementation, the step 1 working process further includes:
[0105] Based on the original contract text, segment the paragraphs, wherein the paragraphs contain sentences ;
[0106] Where n is the length of the sentence, input sentence s;
[0107] Embed each word as a vector, combined with character-level features to capture the meaning of the word;
[0108] Then, a bidirectional long short-term memory network (LSTM / Bi-LSTM) is used to encode sentence-level features so that the model can understand the contextual information of the sentence;
[0109] The calculation method for converting the sentence into a vector representation is to use formula (1), formula (2), formula (3) and formula (4) in sequence:
[0110] (1),
[0111] (2),
[0112] (3)
[0113] (4)
[0114] in, represents word-level embedding, represents character-level embedding;
[0115] in, is a standard convolutional neural network that embeds the character-level sequence of words in the sentence s. Perform operations;
[0116] in, and represents the vector concatenation operator;
[0117] Represents the output hidden vector CC of the contract module classification and contract element extraction for the task t∈{CC, CEE}, and the input word CEE;
[0118] → and ← represent the unit directions of the bidirectional long short-term memory network (LSTM / Bi-LSTM).
[0119] In a specific implementation, in the step 2, if the co-occurrence probability of the element type and the module type in the CE graph exceeds a preset threshold, two nodes are connected in the CE graph to indicate that there is a relationship between them;
[0120] The relational encoding representation of the CE graph can help the model understand the relationship between element types and clause types, thereby improving the performance of the model when processing contract texts;
[0121] The specific method of relationship encoding is:
[0122] (5),
[0123] (6),
[0124] in, and Is the feature type and module type Representation of;
[0125] in, and are the weights in training, respectively used for feature type and module types;
[0126] in, and is the self-connection matrix;
[0127] in, Is the feature type The set of adjacent module nodes;
[0128] in, is the module type, The set of neighboring feature nodes, is the activation function.
[0129] In a specific implementation, in step 3, after extracting sentence-level features through a bidirectional long short-term memory network (LSTM / Bi-LSTM) and obtaining the overall features of the sentence using an attention mechanism;
[0130] The prediction result distribution is represented according to the result distribution vector and the module type, and the forward information and backward information of the sentence are calculated through the forward and backward information to reduce the prediction error;
[0131] After that, a standard conditional random field (CRF) is used for inference to predict the label sequence of the elements based on the contextual features of the sentence and the forward information obtained from the module classification task;
[0132] Afterwards, the dynamic programming algorithm Viterbi is used to search for the highest-scoring tag sequence and calculate the backward information of the sentence.
[0133] In a specific implementation, the module classification task calculation method is:
[0134] (7),
[0135] (8),
[0136] (9),
[0137] in, Indicates the use of attention mechanism to represent the overall features of a given sentence. Representing words The trainable attention weights. Represents the resulting distribution vector.
[0138] In a specific implementation manner, the forward information and the backward information are calculated as follows:
[0139] (10),
[0140] (11),
[0141] (12),
[0142] (13),
[0143] Among them, given task training examples;
[0144] In a preset scenario, the result distribution vector has been predicted ;
[0145] in, and They are module type or Representation of each feature type;
[0146] in, and Representation based on potential type vector The forward information and backward information calculated are as follows:
[0147] ITV cc is the latent type vector for contract module classification, combining the result distribution vector and module type;
[0148] Ivc ee is the latent type vector of the contract element extraction, which combines the result distribution vector and the representation of the element type;
[0149] W f Forward transformation matrix, used to calculate the forward information fw from Itvcc;
[0150] W b The inverse transformation matrix is used to calculate the reverse information bw from Itvcee;
[0151] (14),
[0152] Among them, norm(·) is the normalization function, is the product operation;
[0153] Among them, fw s Indicates that a sentence is transferred from the module classification to the contract element extraction task.
[0154] In a specific implementation, the calculation method of the element extraction is:
[0155] (15),
[0156] in, represents an arbitrary sequence of labels;
[0157] in, Yes Tags Model parameters, yes and Deviation;
[0158] (16),
[0159] in, Represents words in a sentence The backward information comes from the contract element extraction task;
[0160] Among them, y cc is the final predicted label; softmax(·) is the softmax function.
[0161] In a specific implementation, in step 4, the module related to the missing elements of the contract is searched in combination with the knowledge base. , using the Chinese text similarity evaluation index BERTScore to evaluate the text in the knowledge base Re-ranking is performed, and the audit report is outputted based on the information with the highest similarity as the prompt supplementary content of the missing elements. The calculation method of the Chinese text similarity evaluation index BERTScore is:
[0162] (17),
[0163] in, Representation Module The i-th clause of Representation Module The i-th clause of ;
[0164] Where N represents the module and modules The total number of clauses in t1 is the similarity between the i-th clause of t1 and the i-th clause of t2 calculated by the BERT model;
[0165] The dual feedback scheme jointly trains the contract module classification task and the contract element extraction task:
[0166] It is a cross-domain, multi-task training process used for module classification and contract element extraction tasks; this process combines a two-way feedback mechanism. During the training process, reverse information is transmitted through bw and forward information is transmitted through fw.
[0167] By combining the losses of the two tasks, we can simultaneously train the classification task and the feature extraction task.
[0168] ,
[0169] ,
[0170] ,
[0171] N is the total number of contract sentences s, yccn is the true label of the nth module, p(yccn) and p(yceen) are the module classification prediction probability and contract element extraction prediction probability respectively; Yceen is the true element label sequence of the nth element; Sn is the contract sentences. L is the loss that combines the two tasks and adds a regularization term to prevent overfitting. is the domain weight, is the task weight, Is a parameter set The regularization weight of is the squared generalization of the parameter set and is used for regularization.
[0172] In summary, this method captures the correlation between contract modules and elements by constructing a CE graph (Component-Element graph). This relationship modeling not only improves the accuracy of element extraction, but also helps the model better understand the structure and content of the contract, thereby conducting more effective audits. The dual feedback scheme jointly trains module classification and element extraction tasks, which helps capture the interaction between the two tasks and improves overall performance; by optimizing these two tasks simultaneously, the model can more accurately identify key information in the contract and reduce prediction errors.
[0173] Similarity analysis searches for key information related to missing elements of the contract, which not only improves the accuracy of the audit, but also provides valuable reference information for auditors, helping to quickly locate problems and make modification suggestions; BERTScore is used to re-rank the retrieved texts, which can more accurately evaluate the similarity between texts, thereby ensuring that the supplemented missing element information is highly relevant to the contract content;
[0174] The bidirectional long short-term memory network is used to encode the features of the sentences in the contract module, and the character-level features are combined to capture the meaning of the words. This encoding method helps the model better understand the contextual information of the sentence, thereby improving the accuracy of feature extraction.
[0175] (1) This method makes full use of the contract structure, explores the correlation between modules and elements by constructing a CE graph, and adopts a dual-feedback joint training scheme to simultaneously optimize the two tasks of module classification and element extraction. This strategy enables the model to capture the interaction between the two tasks and improves the overall performance. It enables the model to better understand the structure and content of the contract and improves the effect of extracting elements on different types of contracts.
[0176] (2) In practical applications, this method helps to improve the intelligence of contract review, which not only reduces labor costs and speeds up work efficiency, but also improves the standardization and consistency of legal affairs processing through automated processing. It brings higher efficiency and quality to the legal industry and is expected to play an important role in the field of intelligent justice.
[0177] Obviously, the above embodiments are merely examples for the purpose of clear explanation, and are not intended to limit the implementation methods. For those skilled in the art, other different forms of changes or modifications can be made based on the above description. It is not necessary and impossible to list all the implementation methods here. The obvious changes or modifications derived therefrom are still within the scope of protection of the invention.
Claims
1. A smart contract audit method based on element extraction, characterized in that: include: Step 1: Split the original contract into multiple contract modules and use a bidirectional long short-term memory network to feature encode the sentences in the contract modules to convert them into vector representations. Step 2: Analyze the frequency of co-occurrence of contract element types and contract module types to determine the correlation between them, and construct a CE graph to obtain a relationship coding representation; Step 3: Combining the relational encoding representation and the sentence vector representation, a dual-feedback scheme is used to jointly train the classification task and the feature extraction task, capturing the interaction between the dual-feedback scheme and the feature extraction task, and extracting the contract elements; Step 4: Combined with the knowledge base, search for contract elements related to the missing elements in the contract, re-rank the retrieved texts using the Chinese text similarity evaluation index, supplement the missing elements of the contract based on the information with the highest similarity, and output the audit report; In step 4, the module P1 related to the missing elements of the contract is searched in conjunction with the knowledge base, and the text P2 in the knowledge base is re-ranked using the Chinese text similarity evaluation index BERTScore. The information with the highest similarity is used as the supplementary content of the missing elements, and the audit report is output. The Chinese text similarity evaluation index is calculated as follows: Among them, t 1,i represents the i-th clause of module P1, t 2,i represents the i-th clause of module P2; Where N represents the total number of clauses in modules P1 and P2, sim(t 1,i , t 2,i ) is the similarity between the i-th clause of t1 and the i-th clause of t2 calculated by the BERT model; The dual feedback scheme jointly trains the contract module classification task and the contract element extraction task: It is a cross-domain, multi-task training process for module classification and contract element extraction tasks; this process combines a two-way feedback mechanism. During the training process, reverse information is transmitted through bw and forward information is transmitted through fw.
2. The smart contract audit method based on element extraction according to claim 1 is characterized in that: The working process of step 1 also includes: Based on the original contract text, the paragraphs are segmented, and the paragraphs contain sentences s={x1,x2,...,x n }; Where n is the length of the sentence, input sentence s; x represents the i-th word in the sentence, Embed each word as a vector, combined with character-level features to capture the meaning of the word; Then, a bidirectional long short-term memory network is used to encode sentence-level features so that the model can understand the contextual information of the sentence; The calculation method for converting the sentence into a vector representation is to use formula (1), formula (2), formula (3) and formula (4) in sequence: Among them, E w represents word-level embedding, E c represents character-level embedding; vi is the final representation vector; Among them, CNN(·) is a standard convolutional neural network, which embeds the character-level sequence E of the words in the sentence s. c (x i ) to perform the operation; in, and represents the vector concatenation operator; Represents the output hidden vector and input word of the contract module classification and contract element extraction for task t∈{CC, CEE}; → and ← represent the unit directions of the bidirectional long short-term memory network.
3. The smart contract audit method based on element extraction according to claim 2 is characterized in that: In the step 2, if the co-occurrence probability of the element type and the module type in the CE graph exceeds a preset threshold, then two nodes in the CE graph are connected to indicate that there is a relationship between them; The relational encoding representation of the CE graph can help the model understand the relationship between element types and clause types, thereby improving the performance of the model when processing contract texts; The specific method of relationship encoding is: in, and Is the element type et p and module type ct k the expression; in, and are the weights in training, used for the u-th module type and the v-th feature type respectively; Among them, W e and W c is the self-connection matrix; W c→e Relationship transformation matrix from modules to elements; W e→c It is the relational transformation matrix from elements to clauses; in, Is the element type et p The set of adjacent module nodes; in, Is the module type, ct k is the set of neighboring feature nodes, and σ is the activation function.
4. The smart contract audit method based on element extraction according to claim 3 is characterized in that: In step 3, after extracting sentence-level features through a bidirectional long short-term memory network and obtaining the overall features of the sentence using an attention mechanism; The predicted result distribution is represented by the result distribution vector and the module type, and the forward and backward information of the sentence are calculated through the forward and backward information to reduce the prediction error; Afterwards, standard conditional random fields are used for inference to predict the label sequence of the elements based on the contextual features of the sentence and the forward information obtained from the module classification task; Afterwards, the dynamic programming algorithm Viterbi is used to search for the highest-scoring tag sequence and calculate the backward information of the sentence.
5. The smart contract audit method based on element extraction according to claim 4 is characterized in that: The module classification task calculation method is: ∑ i α i =1 (8), in, Indicates the use of attention mechanism to represent the overall features of a given sentence, α i Represents word X i The trainable attention weights, Represents the result distribution vector, Hi represents the hidden state vector of the i-th word from the bidirectional LSTM (BiLSTM), and Wcc is the weight vector used to integrate the comprehensive features of the sentence The embedding of the vector and the specific contract module type compk is mapped to an element of the resulting distribution vector; bcc is the bias term.
6. The smart contract audit method based on element extraction according to claim 5 is characterized in that: The forward information and the backward information are calculated as follows: fw=σ(W f ·Itv CC ) (12), bw=σ(W b ·ITV CEE ) (13), Among them, given a training instance of task t∈{CC, CEE}; In a preset scenario, the result distribution vector has been predicted Among them, comp k and ele v are the representations of the kth module type or the pth element type, respectively; Among them, fw and bW represent the latent type vectors, which are transferred from module classification to contract element extraction task and from contract element extraction back to module classification task respectively; Itv t The forward information and backward information calculated are as follows: Itv cc is the latent type vector for contract module classification, which combines the result distribution vector and module type; Itvc ee is the potential type vector of the contract element extraction, which combines the result distribution vector and the representation of the element type; W f Forward transformation matrix, used to calculate the forward information fw from Itvcc; W b Inverse transformation matrix, used to calculate the reverse information bw from Itvcee; Among them, norm(·) is the normalization function, is the product operator; Among them, fw s Indicates that a sentence is transferred from the module classification to the contract element extraction task.
7. The smart contract audit method based on element extraction according to claim 6 is characterized in that: The calculation method of the element extraction is: in, represents an arbitrary tag sequence; in, Is the label l i Model parameters, Yes i-1 and l i Deviation; Where P is the predicted probability under the condition of known sentence s; Among them, bw i Represents word X in the sentence i The backward information comes from the contract element extraction task; Among them, y cc is the final predicted label; Here, softmax(·) is the softmax function.
Citation Information
Patent Citations
Natural language processing-based intelligent auxiliary judgment method for an enterprise bankruptcy case
CN113536780A
Knowledge graph construction method based on BTBC model
CN114077673A
Multi-task Chinese entity naming recognition method
CN114091460A
Contract review method and device based on deep learning and knowledge graph, equipment and storage medium
CN114661914A
Digital intelligent auditing method and device for transformer technology conformity evaluation
CN114926150A
