Smart contract deployment method and device, equipment, storage medium and program product

By acquiring vulnerability feature information for smart contracts and using a collection of customized audit mechanisms, comprehensive evaluation information is generated to determine deployment, which solves the problem of insufficient accuracy of smart contract credibility verification and improves the security of blockchain network.

CN119829067APending Publication Date: 2025-04-15INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411901689.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-23
Publication Date
2025-04-15

AI Technical Summary

Technical Problem

The credibility verification accuracy of smart contracts in the prior art is not high, resulting in the need to improve blockchain network security.

Method used

By obtaining the vulnerability feature information of the target smart contract, determining the corresponding set of audit mechanisms, reviewing and processing the smart contract based on the set, generating comprehensive evaluation information, and determining whether to conduct consensus voting to deploy the smart contract based on the information.

Benefits of technology

Improves the credibility verification accuracy of smart contracts, enhances the security of blockchain networks, and is deployed only if the contract has passed strict audits and is evaluated as safe and reliable.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119829067A_ABST
    Figure CN119829067A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides an intelligent contract deployment method and device, equipment, a storage medium and a program product, and relates to the field of block chains. The method comprises the steps of obtaining a target smart contract; wherein the target smart contract is a to-be-deployed smart contract, and the target smart contract comprises vulnerability feature information of the target smart contract; determining an auditing mechanism set corresponding to the target smart contract according to the vulnerability feature information of the target smart contract; wherein the auditing mechanism set comprises at least one preset auditing mechanism; performing auditing processing on the target smart contract based on the auditing mechanism set, and determining comprehensive evaluation information of the target smart contract; and deploying the target smart contract according to the comprehensive evaluation information. According to the method provided by the invention, the accuracy of credibility verification of the smart contract is improved, a powerful guarantee is provided for safe deployment of the smart contract, and the safety and reliability of the smart contract in a block chain application are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of blockchain, and in particular to a method, device, equipment, storage medium and program product for deploying a smart contract. Background Art

[0002] Blockchain has been widely used due to its advantages such as decentralization and immutability. Smart contracts, as a key technology for expanding blockchain, not only give the underlying logic of blockchain programmability, but also encapsulate the complex interactive behaviors of each node in the blockchain network, thus expanding the functionality of blockchain.

[0003] However, as a code, smart contracts are likely to have vulnerabilities, which will bring security risks. Therefore, it is crucial to conduct an effective review of smart contracts before deploying them in the blockchain. In the existing technology, the credibility of smart contracts is usually verified through consensus voting.

[0004] However, verifying the credibility of smart contracts only through consensus voting will result in insufficient accuracy in the credibility verification of smart contracts, and the security of blockchain network needs to be further improved. Summary of the invention

[0005] The present application provides a smart contract deployment method, device, equipment, storage medium and program product to solve the technical problems that the accuracy of the current smart contract credibility verification is not high enough and the blockchain network security needs to be further improved.

[0006] In a first aspect, the present application provides a method for deploying a smart contract, the method comprising:

[0007] Obtain a target smart contract; wherein the target smart contract is a smart contract to be deployed, and the target smart contract includes vulnerability feature information of the target smart contract;

[0008] Determine, according to the vulnerability feature information of the target smart contract, a set of audit mechanisms corresponding to the target smart contract; wherein the set of audit mechanisms includes at least one preset audit mechanism;

[0009] Performing an audit process on the target smart contract based on the audit mechanism set to determine comprehensive evaluation information of the target smart contract;

[0010] Deploy the target smart contract based on the comprehensive evaluation information.

[0011] Optionally, determining a set of audit mechanisms corresponding to the target smart contract according to the vulnerability feature information of the target smart contract includes:

[0012] According to the vulnerability feature information of the target smart contract, a search is performed in the preset smart contract rule base to determine a set of audit mechanisms in the preset smart contract rule base whose preset vulnerability feature information matches the vulnerability feature information of the target smart contract, which is the audit mechanism set corresponding to the target smart contract.

[0013] Optionally, performing audit processing on the target smart contract based on the audit mechanism set to determine comprehensive evaluation information of the target smart contract includes:

[0014] Performing an audit process on the target smart contract based on the audit mechanism set, and determining health assessment information of the target smart contract under the audit mechanism set;

[0015] Based on the health assessment information of the target smart contract under the audit mechanism set and the preset weight parameters of the audit mechanism set, the comprehensive assessment information of the target smart contract is determined.

[0016] Optionally, performing audit processing on the target smart contract based on the audit mechanism set to determine health assessment information of the target smart contract under the audit mechanism set includes:

[0017] Based on each preset audit mechanism in the audit mechanism set, audit the target smart contract to determine the health assessment information of the target smart contract under each preset audit mechanism;

[0018] According to the health assessment information of the target smart contract under each preset audit mechanism, the health assessment information of the target smart contract under the audit mechanism set is determined.

[0019] Optionally, determining the health assessment information of the target smart contract under the set of audit mechanisms according to the health assessment information of the target smart contract under each preset audit mechanism includes:

[0020] Determine an average value of health assessment information of the target smart contract under each preset audit mechanism in the audit mechanism set, and determine the average value as the health assessment information of the target smart contract under the audit mechanism set;

[0021] Alternatively, determine the product of the health assessment information of the target smart contract under each preset audit mechanism in the audit mechanism set and the preset weight parameter of each preset audit mechanism, and determine the sum of each product as the health assessment information of the target smart contract under the audit mechanism set.

[0022] Optionally, before performing audit processing on the target smart contract based on each preset audit mechanism in the audit mechanism set, the method further includes:

[0023] If it is determined that the audit mechanism set includes a preset test verification mechanism, it is determined whether the authenticators of the test cases used in each preset test verification mechanism are the same; if they are different, the preset test verification mechanism in the audit mechanism set is deleted.

[0024] Optionally, based on the health assessment information of the target smart contract under the audit mechanism set and a preset weight parameter of the audit mechanism set, determining the comprehensive assessment information of the target smart contract includes:

[0025] Determine the product of the health assessment information of the target smart contract under the audit mechanism set and the preset weight parameter of the audit mechanism set, and determine the sum of the products as the comprehensive assessment information of the target smart contract.

[0026] Optionally, deploying the target smart contract according to the comprehensive evaluation information includes:

[0027] If it is determined that the comprehensive evaluation information is greater than or equal to the preset evaluation threshold, a consensus vote for the target smart contract is initiated, and the target smart contract is deployed according to the consensus voting result;

[0028] If it is determined that the comprehensive evaluation information is less than the preset evaluation threshold, a prompt message indicating that the target smart contract is untrustworthy is generated and presented.

[0029] Optionally, according to the consensus voting result, deploying the target smart contract includes:

[0030] If the consensus voting result indicates that the target smart contract has reached consensus in the target blockchain, deploying the target smart contract in the target blockchain;

[0031] If the consensus voting result indicates that the target smart contract has not reached a consensus in the target blockchain, a prompt message indicating that the target smart contract is untrustworthy is generated and presented.

[0032] In a second aspect, the present application provides a smart contract deployment device, the device comprising:

[0033] An acquisition unit, configured to acquire a target smart contract; wherein the target smart contract is a smart contract to be deployed, and the target smart contract includes vulnerability feature information of the target smart contract;

[0034] A determination unit, configured to determine a set of audit mechanisms corresponding to the target smart contract according to the vulnerability feature information of the target smart contract; wherein the set of audit mechanisms includes at least one preset audit mechanism;

[0035] A processing unit, configured to perform an audit process on the target smart contract based on the audit mechanism set, and determine comprehensive evaluation information of the target smart contract;

[0036] A deployment unit is used to deploy the target smart contract according to the comprehensive evaluation information.

[0037] In a third aspect, the present application provides an electronic device, the electronic device comprising: a processor, and a memory communicatively connected to the processor;

[0038] The memory stores computer-executable instructions;

[0039] The processor executes the computer-executable instructions stored in the memory to implement the aforementioned method.

[0040] In a fourth aspect, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to implement the method as described above when executed by a processor.

[0041] In a fifth aspect, the present application provides a computer program product, including a computer program, which is used to implement the method as described above when executed by a processor.

[0042] In the deployment method, device, equipment, storage medium and program product of the smart contract provided by the present application, the method includes: obtaining the target smart contract; wherein the target smart contract is the smart contract to be deployed, and the target smart contract includes the vulnerability feature information of the target smart contract; according to the vulnerability feature information of the target smart contract, determining the audit mechanism set corresponding to the target smart contract; wherein the audit mechanism set includes at least one preset audit mechanism; auditing the target smart contract based on the audit mechanism set to determine the comprehensive evaluation information of the target smart contract; deploying the target smart contract according to the comprehensive evaluation information. Auditing the target smart contract through the audit mechanism set helps to improve the accuracy of the audit, ensure that all known vulnerability features can be effectively detected, and improve the accuracy of the credibility verification of the smart contract; further, making deployment decisions based on the comprehensive evaluation information also significantly reduces the risk of deploying smart contracts. Only when the contract passes a strict audit and is evaluated as safe and reliable, will it be deployed, thereby reducing the security risks caused by contract vulnerabilities. This application provides a strong guarantee for the safe deployment of smart contracts through vulnerability identification, customized audit mechanisms, and comprehensive evaluation information, and improves the security and reliability of smart contracts in blockchain applications. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0044] Figure 1 A flowchart of a smart contract deployment method provided in an embodiment of the present application;

[0045] Figure 2 A flowchart of another smart contract deployment method provided in an embodiment of the present application;

[0046] Figure 3 A schematic diagram of the structure of a smart contract deployment device provided in an embodiment of the present application;

[0047] Figure 4 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application.

[0048] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION

[0049] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.

[0050] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of the relevant data comply with the relevant laws, regulations and standards of the relevant countries and regions, take necessary confidentiality measures, do not violate public order and good morals, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0051] In addition, this application involves conducting big data analysis of user information (including but not limited to personal biometrics, identity data, consumption data, asset data, electronic terminal operation data, etc.), and using artificial intelligence technology to make automated decisions, and making technical solutions that have a significant impact on personal rights and interests based on the results of automated decisions. The application provides users with corresponding operation entrances for them to choose to agree or reject the results of automated decisions; if the user chooses to reject, the expert decision-making process will be entered.

[0052] It should be noted that the smart contract deployment method, device, equipment, storage medium and program product provided in this application can be used in the blockchain field, and can also be used in any field other than blockchain. The application field of the smart contract deployment method, device, equipment, storage medium and program product in this application is not limited.

[0053] Smart contracts are computer protocols designed to disseminate, verify, and execute contracts in an information-based manner. Smart contracts allow for trusted transactions without a third party, and these transactions are traceable and irreversible. More specifically, a smart contract is actually a piece of protocol code that can be automatically executed on the blockchain. It defines the terms and conditions of the agreement between the parties in the form of code, and can execute user transactions in an independent, secure and reliable environment.

[0054] Blockchain has been widely used due to its advantages such as decentralization and immutability. As a key technology for expanding blockchain, smart contracts not only give the underlying logic of blockchain programmability, but also encapsulate the complex interactive behaviors of each node in the blockchain network, expanding the functions of blockchain. However, as a code, smart contracts are inevitably prone to vulnerabilities due to their complexity. Malicious attackers can use the hidden security vulnerabilities in smart contracts to create malicious contracts to disrupt the correct execution of smart contracts. Once a malicious contract is released, it will cause serious damage to the blockchain network. According to incomplete statistics, attacks against smart contracts account for the largest proportion of attacks on blockchain networks. Therefore, before deploying smart contracts in the blockchain, it is necessary to verify the credibility of smart contracts to improve the security of the blockchain network.

[0055] In the prior art, the credibility of smart contracts is verified by consensus voting. Specifically, by encapsulating the business smart contract into a contract block, if the contract block reaches a consensus in the business blockchain network to which the business management agency belongs, it is determined that the credibility verification of the smart contract has passed, and the contract block can be added to the business blockchain, that is, the smart contract can be deployed. Otherwise, the smart contract will not be deployed.

[0056] However, verifying the credibility of smart contracts only through consensus voting will lead to the problem of low accuracy of the credibility verification of smart contracts. How to improve the accuracy of the credibility verification of smart contracts is still a problem that needs to be solved urgently.

[0057] In order to solve the above technical problems, the present application provides a method for deploying a smart contract, which first audits the smart contract through a set of audit mechanisms provided by multiple participants, determines the comprehensive evaluation information of the smart contract, and then decides whether to conduct a consensus vote to determine the credibility of the smart contract based on the comprehensive evaluation information of the smart contract, thereby completing the deployment of the smart contract, improving the accuracy of the smart contract credibility verification, and improving the security of the blockchain network.

[0058] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.

[0059] Figure 1 A flowchart of a method for deploying a smart contract provided in an embodiment of the present application. For example, the execution subject of the embodiment of the present application may be a deployment device for a smart contract, which may be located on a server or other electronic device, and the electronic device may be a mobile terminal such as a laptop computer, etc., which is not limited in the embodiment of the present application. The embodiment of the present application is described in detail by taking the execution subject as a deployment device for a smart contract as an example.

[0060] like Figure 1 As shown, the deployment method of the smart contract provided in the embodiment of the present application may include:

[0061] S101. Obtain a target smart contract; wherein the target smart contract is a smart contract to be deployed, and the target smart contract includes vulnerability feature information of the target smart contract.

[0062] Exemplarily, in the embodiments of the present application, the target smart contract refers to a smart contract that is about to be deployed on the blockchain network. It is usually a code written in a programming language, which defines the logic and rules of the contract. The smart contract can be a newly developed or an updated version of an existing contract.

[0063] As a code, the target smart contract may inevitably have vulnerabilities. The target smart contract obtained by the deployment device of the smart contract in the embodiment of the present application also contains its own vulnerability feature information. Vulnerability feature information refers to the characteristics or patterns of security vulnerabilities that may exist in the smart contract. These vulnerability feature information can help identify and analyze potential risks in the smart contract. Common vulnerability feature information may include: known vulnerability patterns (such as reentrancy attacks, integer overflows, time dependency issues, etc.), code snippets or patterns (specific code structures or patterns may also cause vulnerabilities, such as improperly managed external calls that may cause reentrancy attacks, etc.), historical security issues (if the smart contract is an updated version of an existing contract, it may contain security issues identified in previous versions), etc.

[0064] The deployment device of the smart contract of the embodiment of the present application can extract the smart contract code from the development environment, or download the target smart contract from the repository provided by the developer, and then use static analysis tools or other security scanning tools to automatically read and identify potential vulnerability feature information. By obtaining the target smart contract and its vulnerability feature information, potential security issues can be identified in advance, and repairs and optimizations can be performed before deployment, thereby improving the security and reliability of the contract, and facilitating subsequent more accurate credibility verification of the smart contract to improve the accuracy of the credibility verification of the smart contract.

[0065] S102. Determine a set of audit mechanisms corresponding to the target smart contract based on vulnerability feature information of the target smart contract; wherein the set of audit mechanisms includes at least one preset audit mechanism.

[0066] Exemplarily, the audit mechanism set in the embodiment of the present application mainly refers to the set of preset audit mechanisms for smart contracts provided by the participating institutions of the target smart contract. Each target smart contract can correspond to multiple participating institutions, each participating institution can provide one or more preset audit mechanisms, and the multiple preset audit mechanisms provided by each participating institution can constitute one or more audit mechanism sets, that is, there can be one or more audit mechanism sets corresponding to the target smart contract in the present application.

[0067] The preset audit mechanisms provided by each participating organization include but are not limited to one or more of the following: code form inspection mechanism, test verification mechanism, manual verification mechanism, etc. The audit parameters of the same audit mechanism may be different in different participating organizations. For example, in the code inspection mechanism, the corresponding inspection angles and / or code segmentation methods may be different for different participating organizations. In the test verification mechanism, the authenticators of the test cases used by different participating organizations may be different.

[0068] It is understandable that the target smart contract has different participating institutions, and the corresponding audit mechanism set of the target smart contract will also be different. For example, if there are three participating institutions in the target smart contract: institution A, institution B, and institution C, the audit mechanism of institution A is a code form inspection mechanism, the audit mechanism of institution B is a code form inspection mechanism and a test verification mechanism, and the audit mechanism of institution C is a code form inspection mechanism, a test verification mechanism, and a manual verification mechanism. Among them, the authenticators of the test cases of the test verification mechanism of institution B are institutions E and F, and the authenticators of the test cases of the test verification mechanism of institution C are institutions G and H.

[0069] Each preset audit mechanism in the audit mechanism set may include various types of audit tools and techniques, which include corresponding audit strategies, and can cover possible security vulnerabilities of smart contracts as comprehensively as possible, thereby comprehensively evaluating and detecting the security of smart contracts.

[0070] In the present application, the smart contract deployment device of the embodiment of the present application can determine the participating organization corresponding to the target smart contract based on the vulnerability feature information of the target smart contract, thereby determining the corresponding audit mechanism set.

[0071] Optionally, in a possible embodiment, determining a set of audit mechanisms corresponding to the target smart contract according to vulnerability feature information of the target smart contract may include:

[0072] According to the vulnerability feature information of the target smart contract, search in the preset smart contract rule base to determine the audit mechanism set in the preset smart contract rule base that matches the vulnerability feature information of the target smart contract, which is the audit mechanism set corresponding to the target smart contract.

[0073] Exemplarily, the preset smart contract rule base can be a pre-built rule base that is jointly certified by each participating institution of the target smart contract and indicates the vulnerability characteristics of the smart contract. The preset smart contract rule base can include a set of audit mechanisms of each participating institution that may participate in the smart contract, and preset vulnerability characteristic information that can be audited and tested by each audit mechanism set. Furthermore, the deployment device of the smart contract of the embodiment of the present application can quickly search in the preset smart contract rule base according to the vulnerability characteristic information of the target smart contract to find an audit mechanism set that matches the vulnerability characteristic information of the target smart contract, so as to continue the audit and evaluation of the target smart contract.

[0074] By presetting the smart contract rule base, you can quickly select the appropriate audit mechanism for the target smart contract, which can not only improve data processing efficiency, but also improve the accuracy of the evaluation of the target smart contract.

[0075] S103. Audit the target smart contract based on the audit mechanism set to determine comprehensive evaluation information of the target smart contract.

[0076] Exemplarily, based on the audit mechanism set, the deployment device of the smart contract in the embodiment of the present application can audit the target smart contract. Through each preset audit mechanism in the audit mechanism set, it is possible to use different audit tools and methods to comprehensively evaluate the security of the target smart contract and generate comprehensive evaluation information, which may include the number, severity, and repair suggestions of vulnerabilities. In this application, the comprehensive evaluation information may be a comprehensive evaluation value determined based on the above comprehensive evaluation information, which is not limited by the embodiment of the present application.

[0077] In a possible embodiment, auditing the target smart contract based on the audit mechanism set to determine the comprehensive evaluation information of the target smart contract may include:

[0078] S1. Audit the target smart contract based on the audit mechanism set to determine the health assessment information of the target smart contract under the audit mechanism set;

[0079] S2. Determine the comprehensive evaluation information of the target smart contract based on the health evaluation information of the target smart contract under the audit mechanism set and the preset weight parameters of the audit mechanism set.

[0080] Exemplarily, when determining the comprehensive evaluation information of the target smart contract, the health evaluation information of the target smart contract can be determined first, and then the comprehensive evaluation information of the target smart contract can be further determined.

[0081] Optionally, step S1, auditing the target smart contract based on the audit mechanism set to determine the health assessment information of the target smart contract under the audit mechanism set, may include:

[0082] S11. Based on each preset audit mechanism in the audit mechanism set, the target smart contract is audited and processed to determine the health assessment information of the target smart contract under each preset audit mechanism;

[0083] S12. Determine the health assessment information of the target smart contract under the audit mechanism set according to the health assessment information of the target smart contract under each preset audit mechanism.

[0084] Exemplarily, there may be one or more audit mechanism sets corresponding to the target smart contract in the present application, and each audit mechanism set includes at least one preset audit mechanism. The deployment device of the smart contract of the embodiment of the present application can audit the target smart contract one by one based on each preset audit mechanism in each audit mechanism set to determine the health assessment information of the target smart contract under each preset audit mechanism. Among them, the health assessment information can be information such as the number and severity of vulnerabilities found after the audit process based on the preset audit mechanism, code quality indicators (such as complexity, readability), performance indicators (such as execution time, resource consumption, etc.), etc., or it can be a health assessment value determined based on this information.

[0085] For example, after reviewing and processing the target smart contract in turn, the health assessment value of the target smart contract corresponding to the code form check mechanism of institution A can be a1; the health assessment value of the target smart contract corresponding to the code form check mechanism of institution B can be b1, and the health assessment value of the target smart contract corresponding to the test verification mechanism can be b2; the health assessment value of the target smart contract corresponding to the code form check mechanism of institution C can be c1, the health assessment value of the target smart contract corresponding to the test verification mechanism can be c2, and the health assessment value of the target smart contract corresponding to the manual verification mechanism can be c3.

[0086] Among them, if the preset audit mechanism is a code form inspection mechanism, the health assessment value can represent the number of malicious behavior codes included in the target smart contract. The more the number, the lower the health value; if the preset audit mechanism is a test verification mechanism, the health assessment value can represent the similarity between the test verification result of the target smart contract and the preset result. The higher the similarity, the higher the health, etc. The embodiment of the present application does not limit the actual meaning represented by the health assessment value.

[0087] By auditing the target smart contract based on each preset audit mechanism in the audit mechanism set in turn, more accurate health assessment information of the target smart contract under the audit mechanism set can be obtained, thereby improving data accuracy.

[0088] Optionally, in a possible embodiment, before auditing the target smart contract based on each preset audit mechanism in the audit mechanism set, the method of the embodiment of the present application may further include:

[0089] S0. If it is determined that the audit mechanism set includes a preset test verification mechanism, determine whether the authentication parties of the test cases used in each preset test verification mechanism are the same. If they are different, delete the preset test verification mechanism in the audit mechanism set.

[0090] It is understandable that each audit mechanism set may include preset audit mechanisms of the same type, such as test verification mechanisms. In each preset test verification mechanism, the authenticators of the test cases adopted by different participating institutions may be the same or different. When the authenticators are different, the evaluation strategies of each preset test verification mechanism may be quite different. At this time, the reference value of the audit results of the target smart contract is not particularly high. In order to reduce the amount of data processing, the preset test verification mechanism may not be used to audit the target smart contract.

[0091] For example, before auditing the target smart contract, the smart contract deployment device of the embodiment of the present application can first determine whether the audit mechanism set includes a preset test verification mechanism. If there are multiple audit mechanism sets that include the preset test verification mechanism, then determine whether the authentication parties of the test cases adopted by different participating institutions in the preset test verification mechanism are the same. If they are the same, then based on each preset audit mechanism in the audit mechanism set, the target smart contract can be audited in turn to determine the health assessment value of the target smart contract under each preset audit mechanism. If there is an audit mechanism set that does not include the preset test verification mechanism, or the authentication parties of the test cases adopted by different participating institutions are different, then the preset test verification mechanism in each audit mechanism set can be directly deleted, and then the target smart contract can be audited based on the other remaining preset audit mechanisms in the audit mechanism set to obtain the health assessment values ​​corresponding to the remaining other preset audit mechanisms.

[0092] By judging whether the audit mechanism set includes a preset test verification mechanism, and determining whether the authentication parties of the test cases used in each preset test verification mechanism are the same, and deleting the preset test verification mechanism in the audit mechanism set when it is determined that the authentication parties are different, not only can the amount of data processing during the audit processing be reduced, but the data accuracy of the health assessment value determined based on this can also be higher.

[0093] For example, after determining the health assessment value of the target smart contract under each preset audit mechanism, the health assessment value of the target smart contract under the audit mechanism set can be further determined based on the health assessment value of the target smart contract under each preset audit mechanism. Among them, this application does not limit how to calculate the health assessment value of the smart contract corresponding to each audit mechanism set based on the health assessment value of the target smart contract corresponding to each preset audit mechanism in each audit mechanism set.

[0094] Optionally, in a possible embodiment, determining the health assessment information of the target smart contract under the audit mechanism set according to the health assessment information of the target smart contract under each preset audit mechanism may include:

[0095] Determine the average value of the health assessment information of the target smart contract under each preset audit mechanism in the audit mechanism set, and determine the average value as the health assessment information of the target smart contract under the audit mechanism set;

[0096] Alternatively, determine the product of the health assessment information of the target smart contract under each preset audit mechanism in the audit mechanism set and the preset weight parameter of each preset audit mechanism, and determine the sum of each product as the health assessment information of the target smart contract under the audit mechanism set.

[0097] Exemplarily, the average value of the health assessment information of the target smart contract under each preset audit mechanism in the audit mechanism set can be used as the health assessment value of the target smart contract. For example, the health assessment value of the target smart contract under the audit mechanism set corresponding to institution A can be a1; the health assessment value of the target smart contract under the audit mechanism set corresponding to institution B can be (b1+b2) / 2; the health assessment value of the target smart contract under the audit mechanism set corresponding to institution C can be (c1+c2+c3) / 3.

[0098] In addition, weight parameters can be set for each preset audit mechanism, and the health assessment value of the target smart contract can be calculated according to the weight parameters of different preset audit mechanisms. For example, the health assessment value of the target smart contract under the audit mechanism set corresponding to institution A can be a1×k1; the health assessment value of the target smart contract under the audit mechanism set corresponding to institution B can be b1×k1+b2×k2; the health assessment value of the target smart contract under the audit mechanism set corresponding to institution C can be c1×k1+c2×k2+c3×k3; and so on, which are not limited in the embodiments of this application.

[0099] By accurately calculating the health assessment information of the target smart contract under each set of audit mechanisms, the accuracy of subsequent calculations of comprehensive assessment information can be improved, thereby more accurately deploying the target smart contract.

[0100] Exemplarily, after determining the health assessment information of the target smart contract under each audit mechanism set, the smart contract deployment device of the embodiment of the present application can determine the comprehensive assessment information of the target smart contract based on the health assessment information of the target smart contract under each audit mechanism set and the preset weight parameters of each audit mechanism set.

[0101] Optionally, in a possible embodiment, based on the health assessment information of the target smart contract under the audit mechanism set and the preset weight parameters of the audit mechanism set, determining the comprehensive assessment information of the target smart contract may include:

[0102] Determine the product of the health assessment information of the target smart contract under the audit mechanism set and the preset weight parameters of the audit mechanism set, and determine the sum of the products as the comprehensive assessment information of the target smart contract.

[0103] Exemplarily, different weight parameters can be set in advance for the audit mechanism sets corresponding to each participating institution, and then based on the weights of each audit mechanism set, the health assessment values ​​of the smart contracts corresponding to each audit mechanism set are weightedly calculated to obtain a comprehensive assessment value of the target smart contract.

[0104] For example, if the health assessment value of the target smart contract under the audit mechanism set corresponding to institution A is a1×k1, its preset weight parameter is n1; the health assessment value of the target smart contract under the audit mechanism set corresponding to institution B is b1×k1+b2×k2, and its preset weight parameter is n2; the health assessment value of the target smart contract under the audit mechanism set corresponding to institution C is c1×k1+c2×k2+c3×k3, and its preset weight parameter is n3; among them, k1, k2, and k3 are the sub-weight parameters corresponding to the preset audit mechanisms in each audit mechanism set; then the comprehensive assessment value of the target smart contract can be a1×k1×n1+(b1×k1+b2×k2)×n2+(c1×k1+c2×k2+c3×k3)×n3.

[0105] By setting the weight parameters reasonably, we can ensure that the evaluation results can accurately reflect the security and performance requirements of the target smart contract in a specific application scenario. The comprehensive evaluation information of the target smart contract obtained by weighted calculation can also more systematically and accurately evaluate the health status and overall security of the target smart contract.

[0106] S104. Deploy the target smart contract based on the comprehensive evaluation information.

[0107] Exemplarily, the comprehensive evaluation information comprehensively evaluates the security of the target smart contract. The smart contract deployment device of the embodiment of the present application can deploy the target smart contract more accurately based on the comprehensive evaluation information, thereby improving the security of the blockchain network.

[0108] Optionally, in a possible embodiment, deploying a target smart contract according to the comprehensive evaluation information may include:

[0109] S100: If it is determined that the comprehensive evaluation information is greater than or equal to the preset evaluation threshold, a consensus vote for the target smart contract is initiated, and the target smart contract is determined and deployed according to the consensus voting result;

[0110] S200: If it is determined that the comprehensive evaluation information is less than a preset evaluation threshold, a prompt message indicating that the target smart contract is untrustworthy is generated and presented.

[0111] Exemplarily, it can be determined whether to initiate a consensus vote for the target smart contract based on the size of the comprehensive evaluation value. When the comprehensive evaluation value is greater than or equal to the preset evaluation threshold, that is, the credibility of the target smart contract is high, a consensus vote for the target smart contract is initiated, and then the target smart contract is deployed according to the consensus voting result; and when the comprehensive evaluation value is less than the preset evaluation threshold, that is, the credibility of the target smart contract is low, a consensus vote is not initiated, and it is determined that the target smart contract is untrustworthy, and a prompt message that the target smart contract is untrustworthy can be directly generated and presented, so that the staff can optimize and process it. Among them, the embodiment of the present application does not limit the size of the preset evaluation threshold.

[0112] Among them, if it is determined to initiate a consensus vote, the target smart contract can be sent to the target blockchain to obtain the consensus voting result of the target smart contract in the target blockchain; wherein, the target blockchain is a blockchain to which multiple participating institutions belong. In this application, the consensus voting result can be the number of consensus votes or the approval ratio of consensus votes, etc., which is not limited by the embodiments of this application. If the number of consensus votes is greater than or equal to the preset number threshold, it can be determined that the result of the consensus vote is a consensus; if the number of consensus votes is less than the preset number threshold, it is determined that the result of the consensus vote is that no consensus has been reached. When it is determined that no consensus has been reached, it can be determined that the target smart contract is untrustworthy. At this time, the target smart contract cannot be deployed in the target blockchain to avoid causing security risks.

[0113] The embodiment of the present application deploys the target smart contract based on the comprehensive evaluation information, which can ensure that the contract has been fully verified and optimized before going online to meet security, performance and compliance requirements.

[0114] Optionally, in a possible embodiment, deploying a target smart contract according to a consensus voting result may include:

[0115] If the consensus voting result indicates that the target smart contract has reached consensus in the target blockchain, the target smart contract is deployed in the target blockchain;

[0116] If the consensus voting result indicates that the target smart contract has not reached consensus in the target blockchain, a prompt message indicating that the target smart contract is untrustworthy is generated and presented.

[0117] For example, when consensus is reached, it indicates that the target smart contract has a high credibility, and the target smart contract can be deployed in the target blockchain; if consensus is not reached, it indicates that the credibility of the target smart contract is low. At this time, the target smart contract cannot be deployed in the target blockchain to avoid causing security risks. A prompt message indicating that the target smart contract is untrustworthy can be generated and presented. Among them, the prompt message indicating that the target smart contract is untrustworthy can include the reason for not reaching a consensus, detailed data of the voting results, and possible improvement suggestions, etc., which are not limited in the embodiments of this application.

[0118] It is understandable that when it is determined that the target smart contract is not trustworthy, it is also possible not to generate and present a prompt message that the target smart contract is not trustworthy, and directly terminate the deployment, which is not limited in the embodiments of the present application.

[0119] Through the deployment mechanism of consensus voting, it can be ensured that the deployment process of smart contracts is transparent, democratic, and in line with the interests and security standards of the community. This approach not only improves the credibility of smart contracts, but also enhances the sense of participation and responsibility in blockchain governance.

[0120] The deployment method of the smart contract provided by the embodiment of the present application includes: obtaining the target smart contract; wherein the target smart contract is the smart contract to be deployed, and the target smart contract includes the vulnerability feature information of the target smart contract; according to the vulnerability feature information of the target smart contract, determining the audit mechanism set corresponding to the target smart contract; wherein the audit mechanism set includes at least one preset audit mechanism; auditing the target smart contract based on the audit mechanism set, determining the comprehensive evaluation information of the target smart contract; deploying the target smart contract according to the comprehensive evaluation information. The present application audits the target smart contract through the audit mechanism set, which helps to improve the accuracy of the audit, ensure that all known vulnerability features can be effectively detected, and improve the accuracy of the credibility verification of the smart contract; further, the deployment decision is made based on the comprehensive evaluation information, which also significantly reduces the risk of deploying smart contracts. Only when the contract passes the strict audit and is evaluated as safe and reliable, it will be deployed, thereby reducing the security risks caused by contract vulnerabilities. The present application provides a strong guarantee for the safe deployment of smart contracts through vulnerability identification, customized audit mechanism, and comprehensive evaluation information, and improves the security and reliability of smart contracts in blockchain applications.

[0121] Figure 2 A flowchart of another smart contract deployment method provided in an embodiment of the present application. Figure 2 As shown, the deployment method of the smart contract provided in the embodiment of the present application may include:

[0122] S201. Obtain the target smart contract.

[0123] The target smart contract is a smart contract to be deployed, and the target smart contract includes vulnerability feature information of the target smart contract.

[0124] S202. According to the vulnerability feature information of the target smart contract, search in the preset smart contract rule library to determine the audit mechanism set corresponding to the target smart contract.

[0125] S203: Determine whether the audit mechanism set includes a preset test verification mechanism.

[0126] If yes, execute step S204, if no, execute step S206.

[0127] S204: Determine whether the authentication parties of the test cases used in each preset test verification mechanism are the same.

[0128] If yes, execute step S206, if no, execute step S205.

[0129] S205. Delete the preset test verification mechanism in the audit mechanism set.

[0130] S206. Based on each preset audit mechanism in the audit mechanism set, the target smart contract is audited and processed to determine the health assessment information of the target smart contract under each preset audit mechanism.

[0131] S207. Determine the health assessment information of the target smart contract under the audit mechanism set according to the health assessment information of the target smart contract under each preset audit mechanism.

[0132] S208. Determine the comprehensive evaluation information of the target smart contract based on the health evaluation information of the target smart contract under the audit mechanism set and the preset weight parameters of the audit mechanism set.

[0133] S209: Determine whether the comprehensive evaluation information is greater than or equal to a preset evaluation threshold.

[0134] If yes, execute step S210, if no, execute step S213.

[0135] S210: Initiate a consensus vote for the target smart contract and determine the consensus voting result.

[0136] S211. Based on the consensus voting result, determine whether the target smart contract has reached consensus in the target blockchain.

[0137] If yes, execute step S212, if no, execute step S213.

[0138] S212. Deploy the target smart contract in the target blockchain.

[0139] S213: Generate and present a prompt message indicating that the target smart contract is untrustworthy.

[0140] It should be noted that the specific implementation of the above steps in this embodiment can refer to the specific description of other embodiments and will not be repeated here. In the actual deployment of the smart contract, some or all of the above steps may be included.

[0141] The embodiment of the present application audits the target smart contract through an audit mechanism set, which helps to improve the accuracy of the audit, ensure that all known vulnerability features can be effectively detected, and improve the accuracy of the credibility verification of the smart contract; further, deployment decisions are made based on comprehensive evaluation information, which also significantly reduces the risk of deploying smart contracts. Only when the contract passes strict review and is evaluated as safe and reliable will it be deployed, thereby reducing the security risks caused by contract vulnerabilities. This application provides strong protection for the safe deployment of smart contracts through vulnerability identification, customized audit mechanisms, and comprehensive evaluation information, and improves the security and reliability of smart contracts in blockchain applications.

[0142] The following is an embodiment of the device of the present application, which can be used to execute the embodiment of the method of the present application. For details not disclosed in the embodiment of the device of the present application, please refer to the embodiment of the method of the present application.

[0143] Figure 3 A schematic diagram of a smart contract deployment device provided in an embodiment of the present application. Figure 3 As shown, the smart contract deployment device 30 provided in the embodiment of the present application includes an acquisition unit 301, a determination unit 302, a processing unit 303 and a deployment unit 304.

[0144] Among them, the acquisition unit 301 is used to obtain the target smart contract; wherein the target smart contract is the smart contract to be deployed, and the target smart contract includes vulnerability feature information of the target smart contract.

[0145] The determination unit 302 is used to determine the audit mechanism set corresponding to the target smart contract according to the vulnerability feature information of the target smart contract; wherein the audit mechanism set includes at least one preset audit mechanism.

[0146] The processing unit 303 is used to audit the target smart contract based on the audit mechanism set to determine the comprehensive evaluation information of the target smart contract.

[0147] The deployment unit 304 is used to deploy the target smart contract according to the comprehensive evaluation information.

[0148] The device provided in this embodiment can be used to execute the method of the above embodiment. Its implementation principle and technical effect are similar and will not be described in detail here.

[0149] Based on the above device embodiment, in some possible examples, the determining unit 302 is further configured to:

[0150] According to the vulnerability feature information of the target smart contract, search in the preset smart contract rule base to determine the audit mechanism set in the preset smart contract rule base that matches the vulnerability feature information of the target smart contract, which is the audit mechanism set corresponding to the target smart contract.

[0151] Based on the above device embodiment, in some possible examples, the processing unit 303 is further configured to:

[0152] Audit the target smart contract based on the audit mechanism set, and determine the health assessment information of the target smart contract under the audit mechanism set;

[0153] Based on the health assessment information of the target smart contract under the audit mechanism set and the preset weight parameters of the audit mechanism set, the comprehensive assessment information of the target smart contract is determined.

[0154] Based on the above device embodiment, in some possible examples, the processing unit 303 is further configured to:

[0155] Based on each preset audit mechanism in the audit mechanism set, the target smart contract is audited and processed to determine the health assessment information of the target smart contract under each preset audit mechanism;

[0156] According to the health assessment information of the target smart contract under each preset audit mechanism, the health assessment information of the target smart contract under the audit mechanism set is determined.

[0157] Based on the above device embodiment, in some possible examples, the processing unit 303 is further configured to:

[0158] Determine the average value of the health assessment information of the target smart contract under each preset audit mechanism in the audit mechanism set, and determine the average value as the health assessment information of the target smart contract under the audit mechanism set;

[0159] Alternatively, determine the product of the health assessment information of the target smart contract under each preset audit mechanism in the audit mechanism set and the preset weight parameter of each preset audit mechanism, and determine the sum of each product as the health assessment information of the target smart contract under the audit mechanism set.

[0160] Based on the above device embodiment, in some possible examples, the processing unit 303 is further configured to:

[0161] Before auditing the target smart contract based on each preset audit mechanism in the audit mechanism set, if it is determined that the audit mechanism set includes a preset test verification mechanism, it is determined whether the authenticators of the test cases used in each preset test verification mechanism are the same; if they are different, the preset test verification mechanism in the audit mechanism set is deleted.

[0162] Based on the above device embodiment, in some possible examples, the processing unit 303 is further configured to:

[0163] Determine the product of the health assessment information of the target smart contract under the audit mechanism set and the preset weight parameters of the audit mechanism set, and determine the sum of the products as the comprehensive assessment information of the target smart contract.

[0164] Based on the above device embodiment, in some possible examples, the deployment unit 304 is further used to:

[0165] If it is determined that the comprehensive evaluation information is greater than or equal to the preset evaluation threshold, a consensus vote for the target smart contract is initiated, and the target smart contract is determined and deployed based on the consensus voting result;

[0166] If it is determined that the comprehensive evaluation information is less than the preset evaluation threshold, a prompt message indicating that the target smart contract is untrustworthy is generated and presented.

[0167] Based on the above device embodiment, in some possible examples, the deployment unit 304 is further used to:

[0168] If the consensus voting result indicates that the target smart contract has reached consensus in the target blockchain, the target smart contract is deployed in the target blockchain;

[0169] If the consensus voting result indicates that the target smart contract has not reached consensus in the target blockchain, a prompt message indicating that the target smart contract is untrustworthy is generated and presented.

[0170] It should be noted that it should be understood that the division of the various modules of the above device is only a division of logical functions. In actual implementation, they can be fully or partially integrated into one physical entity, or they can be physically separated. And these modules can all be implemented in the form of software called by processing elements; they can also be all implemented in the form of hardware; some modules can also be implemented in the form of software called by processing elements, and some modules can be implemented in the form of hardware. In addition, it can also be stored in the memory of the above device in the form of program code, and the functions of the above data processing modules can be called and executed by a processing element of the above device. The implementation of other modules is similar. In addition, all or part of these modules can be integrated together, or they can be implemented independently. The processing element here can be an integrated circuit with signal processing capabilities. In the implementation process, each step of the above method or each module above can be completed by an integrated logic circuit of hardware in the processor element or instructions in the form of software.

[0171] Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Figure 4 As shown, the electronic device 40 includes: a processor 401, and a memory 402 communicatively connected to the processor.

[0172] The memory 402 stores computer-executable instructions; the processor 401 executes the computer-executable instructions stored in the memory 402 to implement any of the aforementioned methods.

[0173] In the specific implementation of the above electronic device, it should be understood that the processor can be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), etc. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. The method disclosed in the embodiment of the present application can be directly embodied as a hardware processor for execution, or a combination of hardware and software modules in the processor for execution.

[0174] An embodiment of the present application also provides a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, they are used to implement any of the methods described above.

[0175] Those skilled in the art can understand that all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to computer instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the aforementioned storage medium includes: ROM, RAM, disk or optical disk and other media that can store program codes.

[0176] An embodiment of the present application also provides a computer program product, including a computer program, which is used to implement any of the aforementioned methods when executed by a processor.

[0177] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily required by the present application.

[0178] It should be further noted that, although the various steps in the flowchart are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless there is a clear description in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a portion of the steps in the flowchart may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these sub-steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a portion of the sub-steps or stages of other steps.

[0179] It should be understood that the above-mentioned device embodiments are only illustrative, and the device of the present application can also be implemented in other ways. For example, the division of units / modules in the above-mentioned embodiments is only a logical function division, and there may be other division methods in actual implementation. For example, multiple units, modules or components can be combined, or can be integrated into another system, or some features can be ignored or not executed.

[0180] In addition, unless otherwise specified, each functional unit / module in each embodiment of the present application may be integrated into one unit / module, each unit / module may exist physically separately, or two or more units / modules may be integrated together. The above-mentioned integrated unit / module may be implemented in the form of hardware or in the form of a software program module.

[0181] If the integrated unit / module is implemented in the form of hardware, the hardware may be a digital circuit, an analog circuit, etc. The physical implementation of the hardware structure includes but is not limited to transistors, memristors, etc. Unless otherwise specified, the processor may be any appropriate hardware processor, such as a CPU, a GPU, an FPGA, a DSP, an ASIC, etc. Unless otherwise specified, the storage unit may be any appropriate magnetic storage medium or magneto-optical storage medium, such as a resistive random access memory (RRAM), a dynamic random access memory (DRAM), a static random access memory (SRAM), an enhanced dynamic random access memory (EDRAM), a high-bandwidth memory (HBM), a hybrid memory cube (HMC), etc.

[0182] If the integrated unit / module is implemented in the form of a software program module and sold or used as an independent product, it can be stored in a computer-readable memory. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a memory, including a number of instructions to enable a computer device (which can be a personal computer, server or network device, etc.) to execute all or part of the steps of the various embodiments of the present application. The aforementioned memory includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or optical disk and other media that can store program codes.

[0183] In the above embodiments, the description of each embodiment has its own emphasis. For the part not described in detail in a certain embodiment, please refer to the relevant description of other embodiments. The technical features of the above embodiments can be combined arbitrarily. In order to make the description concise, all possible combinations of the technical features in the above embodiments are not described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0184] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention disclosed herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary techniques in the art that are not disclosed in the present application. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present application are indicated by the following claims.

[0185] It should be understood that the present application is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.

Claims

1. A method for deploying a smart contract, characterized in that: The method comprises: Obtain a target smart contract; wherein the target smart contract is a smart contract to be deployed, and the target smart contract includes vulnerability feature information of the target smart contract; Determine, according to the vulnerability feature information of the target smart contract, a set of audit mechanisms corresponding to the target smart contract; wherein the set of audit mechanisms includes at least one preset audit mechanism; Performing an audit process on the target smart contract based on the audit mechanism set to determine comprehensive evaluation information of the target smart contract; Deploy the target smart contract based on the comprehensive evaluation information.

2. The method according to claim 1, characterized in that According to the vulnerability feature information of the target smart contract, a set of audit mechanisms corresponding to the target smart contract is determined, including: According to the vulnerability feature information of the target smart contract, a search is performed in the preset smart contract rule base to determine a set of audit mechanisms in the preset smart contract rule base whose preset vulnerability feature information matches the vulnerability feature information of the target smart contract, which is the audit mechanism set corresponding to the target smart contract.

3. The method according to claim 1, characterized in that The target smart contract is audited based on the audit mechanism set to determine comprehensive evaluation information of the target smart contract, including: Performing an audit process on the target smart contract based on the audit mechanism set, and determining health assessment information of the target smart contract under the audit mechanism set; Based on the health assessment information of the target smart contract under the audit mechanism set and the preset weight parameters of the audit mechanism set, the comprehensive assessment information of the target smart contract is determined.

4. The method according to claim 3, characterized in that Performing an audit process on the target smart contract based on the audit mechanism set, and determining health assessment information of the target smart contract under the audit mechanism set, including: Based on each preset audit mechanism in the audit mechanism set, audit the target smart contract to determine the health assessment information of the target smart contract under each preset audit mechanism; According to the health assessment information of the target smart contract under each preset audit mechanism, the health assessment information of the target smart contract under the audit mechanism set is determined.

5. The method according to claim 4, characterized in that According to the health assessment information of the target smart contract under each preset audit mechanism, determining the health assessment information of the target smart contract under the audit mechanism set includes: Determine an average value of health assessment information of the target smart contract under each preset audit mechanism in the audit mechanism set, and determine the average value as the health assessment information of the target smart contract under the audit mechanism set; Alternatively, determine the product of the health assessment information of the target smart contract under each preset audit mechanism in the audit mechanism set and the preset weight parameter of each preset audit mechanism, and determine the sum of each product as the health assessment information of the target smart contract under the audit mechanism set.

6. The method according to claim 4 or 5, characterized in that: Before performing audit processing on the target smart contract based on each preset audit mechanism in the audit mechanism set, the method further includes: If it is determined that the audit mechanism set includes a preset test verification mechanism, it is determined whether the authenticators of the test cases used in each preset test verification mechanism are the same; if they are different, the preset test verification mechanism in the audit mechanism set is deleted.

7. The method according to claim 3, characterized in that Based on the health assessment information of the target smart contract under the audit mechanism set and the preset weight parameters of the audit mechanism set, the comprehensive assessment information of the target smart contract is determined, including: Determine the product of the health assessment information of the target smart contract under the audit mechanism set and the preset weight parameter of the audit mechanism set, and determine the sum of the products as the comprehensive assessment information of the target smart contract.

8. The method according to claim 1, characterized in that Deploying the target smart contract according to the comprehensive evaluation information includes: If it is determined that the comprehensive evaluation information is greater than or equal to the preset evaluation threshold, a consensus vote for the target smart contract is initiated, and the target smart contract is deployed according to the consensus voting result; If it is determined that the comprehensive evaluation information is less than the preset evaluation threshold, a prompt message indicating that the target smart contract is untrustworthy is generated and presented.

9. The method according to claim 8, characterized in that According to the consensus voting results, the target smart contract is deployed, including: If the consensus voting result indicates that the target smart contract has reached consensus in the target blockchain, deploying the target smart contract in the target blockchain; If the consensus voting result indicates that the target smart contract has not reached a consensus in the target blockchain, a prompt message indicating that the target smart contract is untrustworthy is generated and presented.

10. A smart contract deployment device, characterized in that: The device comprises: An acquisition unit, configured to acquire a target smart contract; wherein the target smart contract is a smart contract to be deployed, and the target smart contract includes vulnerability feature information of the target smart contract; A determination unit, configured to determine a set of audit mechanisms corresponding to the target smart contract according to the vulnerability feature information of the target smart contract; wherein the set of audit mechanisms includes at least one preset audit mechanism; A processing unit, configured to perform an audit process on the target smart contract based on the audit mechanism set, and determine comprehensive evaluation information of the target smart contract; A deployment unit is used to deploy the target smart contract according to the comprehensive evaluation information.

11. An electronic device, characterized in that: The electronic device comprises: a processor, and a memory communicatively connected to the processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory to implement the method according to any one of claims 1 to 9.

12. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 9 when executed by a processor.

13. A computer program product, characterized in that The invention comprises a computer program, which implements the method according to any one of claims 1 to 9 when being executed by a processor.