Intelligent contract editing system based on block chain technology

By introducing blockchain technology into the contract signing process, combining smart contracts with electronic contracts, it solves the cumbersome and easy tampering problems in the traditional electronic contract signing process, and achieves efficient and secure contract management.

CN120012742AInactive Publication Date: 2025-05-16华能曹妃甸港口有限公司 +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510005269.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-02
Publication Date
2025-05-16
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The signing process of traditional electronic contracts is complicated, difficult to sign in other places, and easy tampering of contract data.

Method used

The intelligent contract editing system based on blockchain technology is adopted to associate smart contracts with electronic contracts, realize intelligent editing and management of contracts, and ensure the immutability, decentralization and traceability of contract data.

Benefits of technology

It improves the efficiency of contract signing, reduces the risks of contract fraud and signature forgery, and ensures the security and reliability of contract data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120012742A_ABST
    Figure CN120012742A_ABST
Patent Text Reader

Abstract

The invention provides an intelligent contract editing system based on a block chain, and relates to the field of computers, and the system comprises a contract generation module which is used for a legal user to edit contract content through a system interface to generate an electronic contract; the contract deployment module is used for systematically associating the electronic contract with the smart contract and deploying the smart contract by using a block chain network; the contract signing module is used for each contract party to complete contract signing through the system and realize signer identity verification, signing data recording and contract data storage functions by using a block chain; and the contract execution and tracking module is used for the intelligent contract to automatically execute contract contents, and the system provides a contract execution state tracking function. According to the method, the intelligent contract and the electronic contract are associated by taking the block chain technology as a bottom-layer architecture, so that the intelligent editing and management of the contract and the characteristics of non-tampering, decentralization, traceability and the like of contract data are realized, the contract signing efficiency is effectively improved, and the risks of contract fraud and signature counterfeiting are reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a contract intelligent editing system based on blockchain technology. Background Art

[0002] With the rapid development of information technology, electronic contracts have become an indispensable part of business activities due to their convenient transmission, resource saving and high work efficiency. However, there are many problems with the traditional electronic contract signing process, such as cumbersome signing process, difficulty in signing in different places, and easy tampering of contract data.

[0003] Therefore, the present invention provides a contract intelligent editing system based on blockchain technology, which perfectly combines with electronic contracts by utilizing the characteristics of blockchain such as immutability, decentralization, and traceability to ensure the objectivity and authenticity of contract data and improve the efficiency of contract signing. Summary of the invention

[0004] The present invention provides a contract intelligent editing system based on blockchain technology, which is used to associate smart contracts with electronic contracts by using blockchain technology as the underlying architecture, thereby realizing intelligent editing and management of contracts, as well as the characteristics of non-tamperability, decentralization and traceability of contract data, effectively improving the efficiency of contract signing and reducing the risks of contract fraud and signature forgery.

[0005] The present invention provides a contract intelligent editing system based on blockchain technology, comprising: Contract generation module: used by legal users to edit contract content through the system interface and generate electronic contracts; Contract deployment module: used for the system to associate the electronic contract with the smart contract and deploy the smart contract using the blockchain network; Contract signing module: used by all parties to the contract to complete the contract signing through the system, and use blockchain to realize the signatory identity authentication, signature data recording and contract data storage functions; Contract execution and tracking module: used for smart contracts to automatically execute contract content according to preset conditions, and the system provides real-time tracking function of contract execution status.

[0006] Preferably, the contract generation module includes: Identity Authentication Unit: Login block: used by the server to perform preliminary authentication on the identity information entered by the login user on the client. If the preliminary authentication is successful, the camera device is used to collect the facial features of the current login user in real time; Match the facial features with the reserved facial features of the current logged-in user stored in advance in the user information database, and when the match is successful, determine that the current logged-in user is a legitimate user; Registration block: used by the server to store the registered identity information and collected facial feature information submitted by the registered user on the client into the user information database and register; Contract editing unit: used for the legal user to customize and edit the contract content through the system interface based on the corresponding user editing operation authority, and the system automatically generates the target electronic contract after the editing is completed; The contract content of the target electronic contract is encrypted and signed, and then stored in a pre-established target blockchain.

[0007] Preferably, the identity information includes user name, user ID number and user verification password.

[0008] Preferably, the contract deployment module includes: Contract building unit: used to generate the initial smart contract using template engine technology; Associating the initial smart contract with the target electronic contract to complete the construction of the smart contract; Contract Testing Unit: Data processing block: used to obtain and perform regular matching and syntax analysis on the contract source code of the current smart contract, and delete redundant statements to obtain the first detection source code; Off-chain vulnerability detection block: Obtain the off-chain contract vulnerability types of smart contracts and determine the triggering principle of each off-chain contract vulnerability; Utilize the triggering principle of each off-chain contract vulnerability to generate a text description of the corresponding off-chain contract vulnerability; Establish the first prompt text based on the off-chain contract vulnerability type and text description and the preset detection process; Input the first prompt text and the first detection source code into a preset large language model, and output an off-chain vulnerability detection report; Off-chain vulnerability repair block: used to repair the off-chain contract vulnerability of the current smart contract based on the off-chain vulnerability detection report and update the current smart contract; A deployment unit: used to deploy the smart contract corresponding to the target electronic contract to a pre-built target blockchain; On-chain maintenance unit: used to prevent and control vulnerabilities in smart contracts deployed on the target blockchain and maintain the security of contracts on the deployment chain.

[0009] Preferably, the on-chain maintenance unit includes: On-chain vulnerability detection block: used to detect the smart contracts currently deployed on the chain using the preset deep learning-based smart contract vulnerability detection model and generate an on-chain vulnerability detection report; On-chain vulnerability repair block: Danger analysis sub-block: used to analyze the danger level of each on-chain vulnerability in the on-chain vulnerability list in the on-chain vulnerability detection report, and calculate the vulnerability danger index; The calculation formula of the vulnerability risk index is as follows: ; In the formula, It is expressed as the vulnerability risk index of the i-th on-chain vulnerability; Represented as the number of occurrences of the i-th on-chain vulnerability; It is the estimated transaction loss caused by the r-th occurrence of the i-th on-chain vulnerability; It is expressed as the evaluation weight of the estimated transaction loss of the smart contract to the vulnerability risk index; It is represented by the correct operation ratio of the jth operation function in the current smart contract that is affected by the i-th on-chain vulnerability; It is represented as the average difference between the current function response time and the estimated function response time of the jth operation function affected by the i-th on-chain vulnerability in the current smart contract; It is expressed as setting the duration deviation threshold; It is represented by the number of unexpected behaviors caused by the existence of the i-th on-chain vulnerability in the current smart contract; It is represented as the comprehensive impact assessment factor of the unexpected behavior caused by the existence of the i-th on-chain vulnerability in the current smart contract on other operating functions of the smart contract; It is expressed as the evaluation weight of the smart contract's functional impairment to the vulnerability risk index; It is expressed as the degree of complete damage to the current smart contract caused by the i-th on-chain vulnerability; It is represented as the evaluation weight of the vulnerability risk index of the integrity damage of the current smart contract due to the existence of the i-th on-chain vulnerability; Repair sub-blocks: Obtain and aggregate the historical on-chain vulnerabilities that exist within the preset time period of the existing smart contract to obtain a list of several historical on-chain vulnerabilities; Perform vulnerability overlap analysis on the on-chain vulnerability list and the historical on-chain vulnerability list; Mark the corresponding existing smart contract in the historical on-chain vulnerability list whose vulnerability overlap degree with the on-chain vulnerability list is not less than the set overlap threshold as the first smart contract; Retrieving the risk assessment report of the first smart contract, analyzing it in combination with the vulnerability risk index of the on-chain vulnerability of the current smart contract, and calculating the contract screening index of the first smart contract; The first smart contract whose contract screening index is greater than a preset threshold is marked as an available smart contract; Obtain vulnerability repair data for all available smart contracts that are consistent with the vulnerability type of the vulnerability on the chain, and collect them to obtain a first data set; Based on the vulnerability features of the on-chain vulnerabilities corresponding to the available smart contracts and the first data set, a target vulnerability repair model is constructed using a machine learning algorithm; Input the on-chain vulnerability data of the current smart contract into the target vulnerability repair model, and output vulnerability repair suggestions for the corresponding on-chain vulnerabilities; Using vulnerability repair suggestions, the system can automatically repair the on-chain vulnerabilities of the current smart contract; Data storage sub-block: used to record the on-chain vulnerabilities of the current smart contract and the repair process data in real time to the target blockchain.

[0010] Preferably, the calculation formula of the contract screening index is as follows: ; In the formula, Represented as the contract screening index of the xth first smart contract; It is expressed as the number of overlapping vulnerabilities between the current smart contract and the xth first smart contract; It is expressed as the risk assessment index of the h-th overlap vulnerability in the x-th first smart contract; It is represented as the vulnerability risk index of the hth overlapping vulnerability in the current smart contract; Represented as the number of on-chain vulnerabilities of the current smart contract; Represented as the vulnerability risk index of the i-th on-chain vulnerability in the current smart contract; 1 represents the impact weight of the risk level of contract vulnerabilities on the calculation of the contract screening index; It is expressed as the comprehensive repair effect evaluation value of the x-th first smart contract on all overlapping vulnerabilities; It is expressed as the impact weight of the contract vulnerability repair effect on the screened contract.

[0011] Preferably, the contract signing module includes: Signing unit: used to call the signing logic of the corresponding smart contract according to the electronic contract signing transaction sent by the contract signing initiator, verify the content of the target electronic contract and the identity of other contract signatories in combination with digital signature technology, and when the verification is correct, instruct other signatories to sign and confirm the target electronic contract; Data storage unit: used to encrypt the signing process data of the target electronic contract recorded in real time and store it in the blockchain.

[0012] Preferably, the contract execution and tracking module includes: Execution unit: used to execute the electronic contract transaction initiated by the target electronic contract executor, call the execution logic of the corresponding smart contract, and judge whether the execution conditions in the execution elements bound to the current execution logic are met; When the execution condition is met, the contract content agreed upon in the target electronic contract is executed based on the execution operation authority of the current target electronic contract executor; When the execution of the contract content agreed upon in the target electronic contract fails, an error execution message is generated and transmitted to all the contract signatories of the target electronic contract; Tracking unit: used to call the tracking direction logic of the corresponding smart contract based on the electronic contract tracking transaction initiated by the target electronic contract tracking party, and track and manage the target electronic contract based on the corresponding tracking operation authority of the current tracking direction of the target electronic contract tracking party.

[0013] Compared with the prior art, the present invention has the following beneficial effects: By using blockchain technology as the underlying architecture, linking smart contracts and electronic contracts, and realizing intelligent editing and management of contracts, as well as the characteristics of contract data being tamper-proof, decentralized and traceable, the efficiency of contract signing is effectively improved and the risks of contract fraud and signature forgery are reduced.

[0014] Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or understood by practicing the present invention. The purpose and other advantages of the present invention can be realized and obtained by the structures particularly pointed out in the written description and the accompanying drawings.

[0015] The technical solution of the present invention is further described in detail below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings: Figure 1 This is a structural diagram of a contract intelligent editing system based on blockchain technology in an embodiment of the present invention. DETAILED DESCRIPTION

[0017] The preferred embodiments of the present invention are described below in conjunction with the accompanying drawings. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present invention, and are not used to limit the present invention.

[0018] The embodiment of the present invention provides a smart contract editing system based on blockchain technology. Figure 1 As shown, including: Contract generation module: used by legal users to edit contract content through the system interface and generate electronic contracts; Contract deployment module: used for the system to associate the electronic contract with the smart contract and deploy the smart contract using the blockchain network; Contract signing module: used by all parties to the contract to complete the contract signing through the system, and use blockchain to realize the signatory identity authentication, signature data recording and contract data storage functions; Contract execution and tracking module: used for smart contracts to automatically execute contract content according to preset conditions, and the system provides real-time tracking function of contract execution status.

[0019] In this embodiment, a legitimate user refers to a logged-in user who has passed identity information authentication and facial matching authentication; an electronic contract refers to an agreement between two or more parties reached in electronic form through an electronic information network to establish, change, or terminate property-related civil rights and obligations; a smart contract is a computer protocol designed to disseminate, verify, or execute a contract in an information-based manner. It is a piece of code that can be written on a blockchain. Once an event triggers a clause in the contract, the code is automatically executed.

[0020] In this embodiment, the blockchain is a decentralized distributed ledger that is tamper-proof, secure and reliable, and is stored in a block chain. It combines distributed storage, peer-to-peer transmission, consensus mechanism, cryptography and other technologies to record transactions and information through a continuously growing data block chain to ensure data security and transparency.

[0021] In this embodiment, contract signing refers to the process of all contract signatories completing the contract signing process through the system; identity authentication refers to the system using digital signature technology to authenticate the identity information of the contract signatories, where digital signature technology is used to encrypt messages, which can confirm the source and integrity of data units to prevent forgery; the signature data is composed of the signing time, the identity information of the signatory and the IP address data of the signatory; the contract content includes the name and address of the contract signatory, the subject matter of the contract, quantity, quality, price or remuneration, performance period, place and method, liability for breach of contract and dispute resolution method; the preset condition refers to whether the execution condition is met. If met, the contract content is executed, where the execution condition includes execution time, execution object, etc.; the tracking function refers to the contract execution status query function.

[0022] The beneficial effects of the above technical solution are: by using blockchain technology as the underlying architecture, linking smart contracts and electronic contracts, realizing intelligent editing and management of contracts, and the characteristics of contract data such as non-tamperability, decentralization and traceability, it effectively improves the efficiency of contract signing and reduces the risks of contract fraud and signature forgery.

[0023] The embodiment of the present invention provides a contract intelligent editing system based on blockchain technology, wherein the contract generation module includes: Identity Authentication Unit: Login block: used by the server to perform preliminary authentication on the identity information entered by the login user on the client. If the preliminary authentication is successful, the camera device is used to collect the facial features of the current login user in real time; Match the facial features with the reserved facial features of the current logged-in user stored in advance in the user information database, and when the match is successful, determine that the current logged-in user is a legitimate user; Registration block: used by the server to store the registered identity information and collected facial feature information submitted by the registered user on the client into the user information database and register; Contract editing unit: used for the legal user to customize and edit the contract content through the system interface based on the corresponding user editing operation authority, and the system automatically generates the target electronic contract after the editing is completed; The contract content of the target electronic contract is encrypted and signed, and then stored in a pre-established target blockchain.

[0024] In this embodiment, the server refers to a server that provides service capabilities, such as user identity authentication; the client refers to a program corresponding to the server that provides services to users; identity information includes user name, user ID number and user verification password; the camera device is a camera installed in advance; the user information database consists of user number, user identity information and user facial feature data; reserved facial features refer to facial feature information collected when the user registers.

[0025] In this embodiment, a legitimate user refers to a logged-in user who has passed identity information authentication and facial matching authentication; the registered identity information includes the user's name, ID number, mobile phone number, unit information, and verification password; the user editing operation authority refers to the legitimate user's contract editing operation authority, such as the authority to delete a contract and the authority to modify a contract; the contract content includes the name and address of the contract signatory, the subject matter of the contract, quantity, quality, price or remuneration, performance period, place and method, liability for breach of contract, and the method for resolving disputes.

[0026] In this embodiment, the target electronic contract refers to an electronic contract automatically generated by the system after the legitimate user edits the contract content through the system interface; blockchain is a decentralized distributed ledger that is tamper-proof, secure and reliable, and is stored in a block chain. It combines distributed storage, point-to-point transmission, consensus mechanism, cryptography and other technologies, and records transactions and information through a continuously growing data block chain to ensure data security and transparency.

[0027] The beneficial effects of the above technical solution are: users who have successfully logged in to the system through identity authentication can use the system interface to edit the contract content to generate an electronic contract; the electronic contract is encrypted and signed, and stored in the blockchain, which can achieve the non-tamperability, decentralization and traceability of the contract data, and effectively reduce the risk of contract data forgery.

[0028] The embodiment of the present invention provides a contract intelligent editing system based on blockchain technology, wherein the contract deployment module includes: Contract building unit: used to generate the initial smart contract using template engine technology; Associating the initial smart contract with the target electronic contract to complete the construction of the smart contract; Contract Testing Unit: Data processing block: used to obtain and perform regular matching and syntax analysis on the contract source code of the current smart contract, and delete redundant statements to obtain the first detection source code; Off-chain vulnerability detection block: Obtain the off-chain contract vulnerability types of smart contracts and determine the triggering principle of each off-chain contract vulnerability; Utilize the triggering principle of each off-chain contract vulnerability to generate a text description of the corresponding off-chain contract vulnerability; Establish the first prompt text based on the off-chain contract vulnerability type and text description and the preset detection process; Input the first prompt text and the first detection source code into a preset large language model, and output an off-chain vulnerability detection report; Off-chain vulnerability repair block: used to repair the off-chain contract vulnerability of the current smart contract based on the off-chain vulnerability detection report and update the current smart contract; A deployment unit: used to deploy the smart contract corresponding to the target electronic contract to a pre-built target blockchain; On-chain maintenance unit: used to prevent and control vulnerabilities in smart contracts deployed on the target blockchain and maintain the security of contracts on the deployment chain.

[0029] In this embodiment, the initial smart contract is a contract generated by using template engine technology, wherein template engine technology refers to the technology of separating the user interface from business data (content) and generating documents in a specific format; the target electronic contract refers to an electronic contract automatically generated by the system after a legitimate user edits the contract content through the system interface, wherein an electronic contract refers to an agreement between two or more parties to establish, change, or terminate property-related civil rights and obligations in electronic form through an electronic information network.

[0030] In this embodiment, the contract source code refers to the source code of the current smart contract; regular matching and syntax analysis processing are used to locate and extract redundant statements, where redundant statements refer to comment text, version number and related links, where the comment text includes function description, parameter definition, etc.

[0031] In this embodiment, the first detection source code is the code obtained by deleting redundant statements from the contract source code of the current smart contract; the off-chain contract vulnerability refers to the vulnerability existing in the smart contract source code that has not been deployed to the blockchain; the off-chain contract vulnerability types include assertion failure vulnerabilities, timestamp dependency vulnerabilities, delegate call vulnerabilities, reentrancy vulnerabilities, and integer overflow vulnerabilities, etc.; the triggering principle refers to the vulnerability triggering rules analyzed from the perspective of the source code.

[0032] In this embodiment, the preset detection process is set in advance, including analyzing the contract name and function contained in the contract source code, locating statements in the source code that may have vulnerabilities according to the vulnerability type, and generating detection results; the first prompt text is a text established by using the off-chain contract vulnerability type and text description, the preset detection process, and the detection task description, wherein the detection task description refers to finding all contract functions that cause vulnerabilities; the preset large language model is a model selected in advance, such as ChatGPT and LLaMA; the off-chain vulnerability detection report consists of the off-chain vulnerability name and type, the number of vulnerability occurrences, the contract function that causes the vulnerability, and the statement with the vulnerability.

[0033] The beneficial effect of the above technical solution is: by performing vulnerability detection and repair on smart contracts that are not deployed to the blockchain and smart contracts that are deployed to the blockchain respectively, to ensure the multi-faceted security of smart contracts, ensure the correctness and security of the contracts, help provide secure contract management for commercial activities, and improve users' credibility in the system.

[0034] The embodiment of the present invention provides a contract intelligent editing system based on blockchain technology, wherein the on-chain maintenance unit includes: On-chain vulnerability detection block: used to detect the smart contracts currently deployed on the chain using the preset deep learning-based smart contract vulnerability detection model and generate an on-chain vulnerability detection report; On-chain vulnerability repair block: Danger analysis sub-block: used to analyze the danger level of each on-chain vulnerability in the on-chain vulnerability list in the on-chain vulnerability detection report, and calculate the vulnerability danger index; The calculation formula of the vulnerability risk index is as follows: ; In the formula, It is expressed as the vulnerability risk index of the i-th on-chain vulnerability; Represented as the number of occurrences of the i-th on-chain vulnerability; It is the estimated transaction loss caused by the r-th occurrence of the i-th on-chain vulnerability; It is expressed as the evaluation weight of the estimated transaction loss of the smart contract to the vulnerability risk index; It is represented by the correct operation ratio of the jth operation function in the current smart contract that is affected by the i-th on-chain vulnerability; It is represented as the average difference between the current function response time and the estimated function response time of the jth operation function affected by the i-th on-chain vulnerability in the current smart contract; It is expressed as setting the duration deviation threshold; It is represented by the number of unexpected behaviors caused by the existence of the i-th on-chain vulnerability in the current smart contract; It is represented as the comprehensive impact assessment factor of the unexpected behavior caused by the existence of the i-th on-chain vulnerability in the current smart contract on other operating functions of the smart contract; It is expressed as the evaluation weight of the smart contract's functional impairment to the vulnerability risk index; It is expressed as the degree of complete damage to the current smart contract caused by the i-th on-chain vulnerability; It is represented as the evaluation weight of the vulnerability risk index of the integrity damage of the current smart contract due to the existence of the i-th on-chain vulnerability; Repair sub-blocks: Obtain and aggregate the historical on-chain vulnerabilities that exist within the preset time period of the existing smart contract to obtain a list of several historical on-chain vulnerabilities; Perform vulnerability overlap analysis on the on-chain vulnerability list and the historical on-chain vulnerability list; Mark the corresponding existing smart contract in the historical on-chain vulnerability list whose vulnerability overlap degree with the on-chain vulnerability list is not less than the set overlap threshold as the first smart contract; Retrieving the risk assessment report of the first smart contract, analyzing it in combination with the vulnerability risk index of the on-chain vulnerability of the current smart contract, and calculating the contract screening index of the first smart contract; The first smart contract whose contract screening index is greater than a preset threshold is marked as an available smart contract; Obtain vulnerability repair data for all available smart contracts that are consistent with the vulnerability type of the vulnerability on the chain, and collect them to obtain a first data set; Based on the vulnerability features of the on-chain vulnerabilities corresponding to the available smart contracts and the first data set, a target vulnerability repair model is constructed using a machine learning algorithm; Input the on-chain vulnerability data of the current smart contract into the target vulnerability repair model, and output vulnerability repair suggestions for the corresponding on-chain vulnerabilities; Using vulnerability repair suggestions, the system can automatically repair the on-chain vulnerabilities of the current smart contract; Data storage sub-block: used to record the on-chain vulnerabilities of the current smart contract and the repair process data in real time to the target blockchain.

[0035] In this embodiment, deep learning is a machine learning method based on artificial neural networks. The key is to abstract and represent the input data layer by layer through a multi-layer neural network, so as to achieve modeling of complex data structures and nonlinear relationships; the smart contract vulnerability detection model is a model obtained based on deep learning training, which is used to detect vulnerabilities in smart contracts deployed to the blockchain; the on-chain vulnerability detection report consists of an on-chain vulnerability list, the number of on-chain vulnerability occurrences, the contract functions that cause on-chain vulnerabilities, and statements with on-chain vulnerabilities.

[0036] In this embodiment, the vulnerability risk index is used to express the threat level of on-chain vulnerabilities to the safe operation of smart contracts; existing smart contracts refer to existing smart contracts; the preset time period is set in advance; historical on-chain vulnerabilities refer to on-chain vulnerabilities that appear when existing smart contracts are deployed on the blockchain; the historical on-chain vulnerability list is a list obtained by collecting historical on-chain vulnerabilities; the vulnerability overlap degree is used to express the degree to which the on-chain vulnerabilities in the on-chain vulnerability list are the same as the vulnerability types of the historical on-chain vulnerabilities in the historical on-chain vulnerability list; setting the overlap threshold is set in advance; the first smart contract refers to the corresponding existing smart contract in the historical on-chain vulnerability list whose vulnerability overlap degree with the on-chain vulnerability list is not less than the set overlap threshold.

[0037] In this embodiment, for example, there are existing smart contracts a1, a2, and a3 corresponding to the historical on-chain vulnerability list and the on-chain vulnerability list, whose vulnerability overlaps are y1, y2, and y3 respectively, where y1 is less than the set overlap threshold, y2 is equal to the set overlap threshold, and y3 is greater than the set overlap threshold. At this time, the existing smart contracts a2 and a3 are marked as the first smart contracts.

[0038] In this embodiment, the risk assessment report consists of the name of the existing smart contract, the historical on-chain vulnerability data of the existing smart contract, and the vulnerability repair data. The historical on-chain vulnerability data consists of the specific description, type, number of occurrences and risk assessment index of the historical on-chain vulnerability, and the vulnerability repair data consists of the vulnerability repair operation data of the historical on-chain vulnerability and the repair effect evaluation value.

[0039] In this embodiment, the contract screening index is calculated by analyzing the similarity of vulnerability types and the degree of danger similarity between the on-chain vulnerabilities existing in the existing smart contract and the current smart contract; the preset threshold is set in advance; the available smart contract refers to the first smart contract whose contract screening index is greater than the preset threshold; the first data set is a data set obtained by a set of vulnerability repair data corresponding to all available smart contracts that are consistent with the vulnerability type of the on-chain vulnerability, wherein the vulnerability repair data refers to the vulnerability repair plan; the target vulnerability repair model is obtained by using a machine learning algorithm based on the vulnerability features of the on-chain vulnerability corresponding to the available smart contract and the first data set training model, and is used to obtain vulnerability repair suggestions for automatic repair of the on-chain vulnerability of the current smart contract, wherein the vulnerability repair suggestion refers to the output vulnerability automatic repair plan; the repair process data includes the vulnerability location, vulnerability type, vulnerability repair time and vulnerability repair operation, such as adding, deleting and replacing.

[0040] The beneficial effects of the above technical solution are: by detecting the existing vulnerabilities and the degree of vulnerability danger of the smart contracts deployed to the blockchain, and using machine learning algorithms to build a target vulnerability repair model to automatically repair the vulnerabilities on the chain, the security of the smart contracts on the chain can be effectively guaranteed.

[0041] The embodiment of the present invention provides a contract intelligent editing system based on blockchain technology, and the calculation formula of the contract screening index is as follows: ; In the formula, Represented as the contract screening index of the xth first smart contract; It is expressed as the number of overlapping vulnerabilities between the current smart contract and the xth first smart contract; It is expressed as the risk assessment index of the h-th overlap vulnerability in the x-th first smart contract; It is represented as the vulnerability risk index of the hth overlapping vulnerability in the current smart contract; Represented as the number of on-chain vulnerabilities of the current smart contract; Represented as the vulnerability risk index of the i-th on-chain vulnerability in the current smart contract; 1 represents the impact weight of the risk level of contract vulnerabilities on the calculation of the contract screening index; It is expressed as the comprehensive repair effect evaluation value of the x-th first smart contract on all overlapping vulnerabilities; It is expressed as the impact weight of the contract vulnerability repair effect on the screened contract.

[0042] The beneficial effect of the above technical solution is: by calculating the contract screening index of the existing smart contract, the first smart contract with similar vulnerability type and similar degree of danger to the on-chain vulnerability existing in the current smart contract is screened out, which is conducive to providing accurate training data for the subsequent construction of the target vulnerability repair model to ensure the accuracy of the model.

[0043] The embodiment of the present invention provides a contract intelligent editing system based on blockchain technology, wherein the contract signing module includes: Signing unit: used to call the signing logic of the corresponding smart contract according to the electronic contract signing transaction sent by the contract signing initiator, verify the content of the target electronic contract and the identity of other contract signatories in combination with digital signature technology, and when the verification is correct, instruct other signatories to sign and confirm the target electronic contract; Data storage unit: used to encrypt the signing process data of the target electronic contract recorded in real time and store it in the blockchain.

[0044] In this embodiment, the signing logic refers to the signing logic in the contract source code of the smart contract; digital signature technology is used to encrypt messages, which can confirm the source and integrity of data units and prevent forgery; the target electronic contract content includes the name and address of the contract signatory, the subject matter of the contract, quantity, quality, price or remuneration, performance period, place and method, liability for breach of contract and dispute resolution method; the signing process data is composed of the signing time, the identity information of the signatory and the IP address data of the signatory.

[0045] The beneficial effects of the above technical solution are: by utilizing digital signature technology to authenticate the content of the target electronic contract and the identities of other contract signatories, the signing process data of the recorded target electronic contract is encrypted and stored in the blockchain, thereby effectively ensuring the security of the contract data. Based on the decentralized nature of the blockchain, the contract data is stored in a dispersed manner on multiple nodes, thereby improving the reliability and anti-tampering capabilities of the data.

[0046] The embodiment of the present invention provides a contract intelligent editing system based on blockchain technology, wherein the contract execution and tracking module includes: Execution unit: used to execute the electronic contract transaction initiated by the target electronic contract executor, call the execution logic of the corresponding smart contract, and judge whether the execution conditions in the execution elements bound to the current execution logic are met; When the execution condition is met, the contract content agreed upon in the target electronic contract is executed based on the execution operation authority of the current target electronic contract executor; When the execution of the contract content agreed upon in the target electronic contract fails, an error execution message is generated and transmitted to all the contract signatories of the target electronic contract; Tracking unit: used to call the tracking direction logic of the corresponding smart contract based on the electronic contract tracking transaction initiated by the target electronic contract tracking party, and track and manage the target electronic contract based on the corresponding tracking operation authority of the current tracking direction of the target electronic contract tracking party.

[0047] In this embodiment, the execution logic is the execution logic in the contract source code of the smart contract; the execution elements refer to the rights and obligations predetermined by the contract executors, and different types of electronic contracts have different execution elements; the execution conditions include execution time, execution object, etc.; the execution operation authority refers to the execution operation scope of the current contract executor; the error execution information includes the execution failure time, execution elements, execution content failure description and the current contract content executor.

[0048] In this embodiment, the tracking direction logic is the tracking direction logic in the contract source code of the smart contract, where the tracking direction refers to the contract execution status query; the tracking operation authority refers to the tracking operation scope of the current contract executor.

[0049] The beneficial effect of the above technical solution is: by calling the execution logic and tracking direction logic of the contract source code of the smart contract, the automatic execution of the contract content and the real-time tracking of the contract execution status are realized respectively, which realizes the intelligent and efficient management of the contract while also improving the user experience.

[0050] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.

Claims

1. A blockchain-based contract intelligent editing system, characterized in that: include: Contract generation module: used by legal users to edit contract content through the system interface and generate electronic contracts; Contract deployment module: used for the system to associate the electronic contract with the smart contract and deploy the smart contract using the blockchain network; Contract signing module: used by all parties to the contract to complete the contract signing through the system, and use blockchain to realize the signatory identity authentication, signature data recording and contract data storage functions; Contract execution and tracking module: used for smart contracts to automatically execute contract content according to preset conditions, and the system provides real-time tracking function of contract execution status.

2. According to claim 1, a blockchain-based contract intelligent editing system is characterized in that: The contract generation module includes: Identity authentication unit: Login block: used by the server to perform preliminary authentication on the identity information entered by the login user on the client. If the preliminary authentication is successful, the camera device is used to collect the facial features of the current login user in real time; Match the facial features with the reserved facial features of the current logged-in user stored in advance in the user information database, and when the match is successful, determine that the current logged-in user is a legitimate user; Registration block: used by the server to store the registered identity information and collected facial feature information submitted by the registered user on the client into the user information database and register; Contract editing unit: used for the legal user to customize and edit the contract content through the system interface based on the corresponding user editing operation authority, and the system automatically generates the target electronic contract after the editing is completed; The contract content of the target electronic contract is encrypted and signed, and then stored in a pre-established target blockchain.

3. According to the blockchain-based intelligent contract editing system of claim 2, it is characterized in that: Identity information includes user name, user ID number and user verification password.

4. According to claim 1, a blockchain-based contract intelligent editing system is characterized in that: The contract deployment module includes: Contract building unit: used to generate the initial smart contract using template engine technology; Associating the initial smart contract with the target electronic contract to complete the construction of the smart contract; Contract Testing Unit: Data processing block: used to obtain and perform regular matching and syntax analysis on the contract source code of the current smart contract, and delete redundant statements to obtain the first detection source code; Off-chain vulnerability detection block: Obtain the off-chain contract vulnerability types of smart contracts and determine the triggering principle of each off-chain contract vulnerability; Utilize the triggering principle of each off-chain contract vulnerability to generate a text description of the corresponding off-chain contract vulnerability; Establish the first prompt text based on the off-chain contract vulnerability type and text description and the preset detection process; Input the first prompt text and the first detection source code into a preset large language model, and output an off-chain vulnerability detection report; Off-chain vulnerability repair block: used to repair the off-chain contract vulnerability of the current smart contract based on the off-chain vulnerability detection report and update the current smart contract; A deployment unit: used to deploy the smart contract corresponding to the target electronic contract to a pre-built target blockchain; On-chain maintenance unit: used to prevent and control vulnerabilities in smart contracts deployed on the target blockchain and maintain the security of contracts on the deployment chain.

5. According to claim 4, a blockchain-based contract intelligent editing system is characterized in that: The on-chain maintenance unit includes: On-chain vulnerability detection block: used to detect the smart contracts currently deployed on the chain using the preset deep learning-based smart contract vulnerability detection model and generate an on-chain vulnerability detection report; On-chain vulnerability repair block: Danger analysis sub-block: used to analyze the danger level of each on-chain vulnerability in the on-chain vulnerability list in the on-chain vulnerability detection report, and calculate the vulnerability danger index; The calculation formula of the vulnerability risk index is as follows: ; In the formula, It is expressed as the vulnerability risk index of the i-th on-chain vulnerability; It is represented by the number of occurrences of the i-th on-chain vulnerability; It is the estimated transaction loss caused by the r-th occurrence of the i-th on-chain vulnerability; It is expressed as the evaluation weight of the estimated transaction loss of the smart contract to the vulnerability risk index; It is represented by the correct operation ratio of the jth operation function in the current smart contract that is affected by the i-th on-chain vulnerability; It is represented as the average difference between the current function response time and the estimated function response time of the jth operation function affected by the i-th on-chain vulnerability in the current smart contract; It is expressed as setting the duration deviation threshold; It is represented by the number of unexpected behaviors caused by the existence of the i-th on-chain vulnerability in the current smart contract; It is represented as the comprehensive impact assessment factor of the unexpected behavior caused by the existence of the i-th on-chain vulnerability in the current smart contract on other operating functions of the smart contract; It is expressed as the evaluation weight of the smart contract's functional impairment to the vulnerability risk index; It is expressed as the degree of complete damage to the current smart contract caused by the i-th on-chain vulnerability; It is represented as the evaluation weight of the vulnerability risk index of the integrity damage of the current smart contract due to the existence of the i-th on-chain vulnerability; Repair sub-blocks: Obtain and aggregate the historical on-chain vulnerabilities that exist within the preset time period of the existing smart contract to obtain a list of several historical on-chain vulnerabilities; Perform vulnerability overlap analysis on the on-chain vulnerability list and the historical on-chain vulnerability list; Mark the corresponding existing smart contract in the historical on-chain vulnerability list whose vulnerability overlap degree with the on-chain vulnerability list is not less than the set overlap threshold as the first smart contract; Retrieving the risk assessment report of the first smart contract, analyzing it in combination with the vulnerability risk index of the on-chain vulnerability of the current smart contract, and calculating the contract screening index of the first smart contract; The first smart contract whose contract screening index is greater than a preset threshold is marked as an available smart contract; Obtain vulnerability repair data for all available smart contracts that are consistent with the vulnerability type of the vulnerability on the chain, and collect them to obtain a first data set; Based on the vulnerability features of the on-chain vulnerabilities corresponding to the available smart contracts and the first data set, a target vulnerability repair model is constructed using a machine learning algorithm; Input the on-chain vulnerability data of the current smart contract into the target vulnerability repair model, and output vulnerability repair suggestions for the corresponding on-chain vulnerabilities; Using vulnerability repair suggestions, the system can automatically repair the on-chain vulnerabilities of the current smart contract; Data storage sub-block: used to record the on-chain vulnerabilities of the current smart contract and the repair process data in real time to the target blockchain.

6. According to claim 5, a blockchain-based contract intelligent editing system is characterized in that: The calculation formula of the contract screening index is as follows: ; In the formula, Represented as the contract screening index of the xth first smart contract; It is expressed as the number of overlapping vulnerabilities between the current smart contract and the xth first smart contract; It is expressed as the risk assessment index of the h-th overlap vulnerability in the x-th first smart contract; It is represented as the vulnerability risk index of the hth overlapping vulnerability in the current smart contract; Represented as the number of on-chain vulnerabilities of the current smart contract; Represented as the vulnerability risk index of the i-th on-chain vulnerability in the current smart contract; 1 represents the impact weight of the risk level of contract vulnerabilities on the calculation of the contract screening index; It is expressed as the comprehensive repair effect evaluation value of the x-th first smart contract on all overlapping vulnerabilities; It is expressed as the impact weight of the contract vulnerability repair effect on the screened contract.

7. According to claim 1, a blockchain-based contract intelligent editing system is characterized in that: The contract signing module includes: Signing unit: used to call the signing logic of the corresponding smart contract according to the electronic contract signing transaction sent by the contract signing initiator, verify the content of the target electronic contract and the identity of other contract signatories in combination with digital signature technology, and when the verification is correct, instruct other signatories to sign and confirm the target electronic contract; Data storage unit: used to encrypt the signing process data of the target electronic contract recorded in real time and store it in the blockchain.

8. According to claim 1, a blockchain-based contract intelligent editing system is characterized in that: The contract execution and tracking module includes: Execution unit: used to execute the electronic contract transaction initiated by the target electronic contract executor, call the execution logic of the corresponding smart contract, and judge whether the execution conditions in the execution elements bound to the current execution logic are met; When the execution condition is met, the contract content agreed upon in the target electronic contract is executed based on the execution operation authority of the current target electronic contract executor; When the execution of the contract content agreed upon in the target electronic contract fails, an error execution message is generated and transmitted to all the contract signatories of the target electronic contract; Tracking unit: used to call the tracking direction logic of the corresponding smart contract based on the electronic contract tracking transaction initiated by the target electronic contract tracking party, and track and manage the target electronic contract based on the corresponding tracking operation authority of the current tracking direction of the target electronic contract tracking party.