Block chain system, intelligent contract execution method and device, and product

The blockchain system with separate execution and management modules addresses resource constraints and high costs by offloading smart contract execution, improving efficiency and reducing maintenance complexity.

CN119232739APending Publication Date: 2024-12-31CHINA MOBILE COMM LTD RES INST +1
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411343483.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-25
Publication Date
2024-12-31

AI Technical Summary

Technical Problem

Blockchain nodes face significant resource constraints and increased costs due to the need to build and execute smart contract environments individually, leading to reduced capacity and throughput, and complex maintenance requirements.

Method used

A blockchain system with separate execution and management modules, where the execution module handles smart contract execution and the management module allocates these modules to nodes, allowing nodes to offload the execution process and reduce resource usage.

Benefits of technology

This approach saves memory and computing resources, reduces costs, and simplifies maintenance by decoupling smart contract execution from the blockchain node, enhancing resource efficiency and flexibility.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119232739A_ABST
    Figure CN119232739A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of communication, and particularly provides a block chain system, an intelligent contract execution method and device and a product. The system comprises a block chain node, an execution module and a management module. According to the invention, the execution module and the management module are independently arranged to be responsible for the intelligent contract required by each node, the execution module can be used for executing the intelligent contract, and an intelligent contract execution environment is deployed in the execution module. And the management module can be used for allocating the execution module to the block chain node. Therefore, the blockchain node only needs to send the required smart contract to the execution module for execution, and does not need to deploy a smart contract execution environment therein. Moreover, the block chain node does not need to participate in the contract execution process, thereby saving the memory and computing resources of the block chain node to a certain extent, and reducing the use cost of the block chain.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of communication technology, and in particular to a blockchain system and a smart contract execution method, device and product. Background Art

[0002] When participating in blockchain business, nodes need to build a smart contract operating environment and execute smart contracts individually, which restricts the business capacity and throughput of the nodes and significantly increases the cost of providing and using blockchain services. Summary of the invention

[0003] In view of the above problems, the present disclosure is proposed. The present disclosure provides a blockchain system and a smart contract execution method, device and product.

[0004] According to one aspect of the present disclosure, a blockchain system is provided, including: a blockchain node; an execution module, which is deployed with a smart contract execution environment and is used to execute a smart contract; a management module, which is used to manage the execution module and allocate the execution module to the blockchain node.

[0005] According to another aspect of the present disclosure, a smart contract execution method is provided, which is executed in a management module, and the method includes: receiving a first message from a blockchain node, the first message being used to request feedback on an execution module that meets the first information; the first information being used to indicate smart contract execution requirements; determining a candidate module based on the first information and second information of each execution module; and sending a second message to the blockchain node, the second message carrying relevant information of the candidate module.

[0006] According to another aspect of the present disclosure, a smart contract execution method is provided, which is executed in an execution module, and the method includes: receiving a third message from a blockchain node, the third message being used to request execution of a target smart contract; executing the target smart contract; and sending a fourth message to the blockchain node, the fourth message carrying the execution result of the target smart contract.

[0007] According to another aspect of the present disclosure, a smart contract execution method is provided, which is executed on a blockchain node, and the method includes: sending a first message to a management module; the first message is used to request feedback on an execution module that meets the first information; the first information is used to indicate smart contract execution requirements; receiving a second message from the management module; the second message carries relevant information of the candidate module; sending a third message to a target module, the target module is all or part of the candidate module; the third message is used to request the target module to execute a target smart contract; receiving a fourth message from the target module, the fourth message carries the execution result of the target smart contract.

[0008] According to another aspect of the present disclosure, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the method described in any one of the above embodiments.

[0009] According to another aspect of the present disclosure, a computer-readable storage medium is provided, on which a computer program / instruction is stored. When the computer program / instruction is executed by a processor, the method described in any of the above embodiments is implemented.

[0010] According to another aspect of the present disclosure, a computer program product is provided, including a computer program / instruction, which implements the method described in any of the above embodiments when the computer program / instruction is executed by a processor.

[0011] As described in detail below, a blockchain system and a smart contract execution method, device and product according to an embodiment of the present disclosure. The present disclosure is responsible for the smart contracts required by each node by separately setting up an execution module and a management module, wherein the execution module can be used to execute the smart contract, and a smart contract execution environment is deployed inside it. The management module can be used to allocate an execution module to a blockchain node. In this way, the blockchain node only needs to send the required smart contract to the execution module for execution, without deploying the smart contract execution environment inside it. In addition, the blockchain node does not need to participate in the contract execution process itself, thereby saving the memory and computing resources of the blockchain node to a certain extent, thereby reducing the cost of using the blockchain. Further, in the prior art, when the blockchain node deploys the smart contract execution environment, it is necessary to call multiple functions to share memory, while the smart contract execution environment of the present disclosure is deployed in the execution module, and the smart contract execution environment does not need to be deployed in the blockchain node, which can reduce the degree of coupling between functions in the blockchain node to a certain extent, thereby reducing the difficulty of maintaining the blockchain node.

[0012] It is to be understood that both the foregoing general description and the following detailed description are exemplary, and are intended to provide further explanation of the technology as claimed. BRIEF DESCRIPTION OF THE DRAWINGS

[0013] The above and other purposes, features and advantages of the present disclosure will become more apparent by describing the embodiments of the present disclosure in more detail in conjunction with the accompanying drawings. The accompanying drawings are used to provide a further understanding of the embodiments of the present disclosure and constitute a part of the specification. Together with the embodiments of the present disclosure, they are used to explain the present disclosure and do not constitute a limitation of the present disclosure. In the accompanying drawings, the same reference numerals generally represent the same components or steps.

[0014] Figure 1 It is a schematic diagram of a blockchain system according to an embodiment of the present disclosure.

[0015] Figure 2 It is a schematic diagram of another blockchain system according to an embodiment of the present disclosure.

[0016] Figure 3 It is a schematic diagram illustrating an execution module according to an embodiment of the present disclosure.

[0017] Figure 4 It is an interactive schematic diagram illustrating a smart contract execution method according to an embodiment of the present disclosure.

[0018] Figure 5 It is a schematic diagram illustrating a cross-validation process of an embodiment of the present disclosure.

[0019] Figure 6 It is a schematic diagram illustrating a contract execution strategy of an embodiment of the present disclosure.

[0020] Figure 7 It is a block diagram illustrating a smart contract execution device according to an embodiment of the present disclosure.

[0021] Figure 8 It is a block diagram illustrating a smart contract execution device according to an embodiment of the present disclosure.

[0022] Fig. 9 It is a block diagram illustrating another smart contract execution device according to an embodiment of the present disclosure.

[0023] Fig.10 is a hardware block diagram illustrating an electronic device according to an embodiment of the present disclosure.

[0024] Fig.11 is a schematic diagram illustrating a computer program product according to an embodiment of the present disclosure. DETAILED DESCRIPTION

[0025] In order to make the purpose, technical solution and advantages of the present disclosure more obvious, the exemplary embodiments according to the present disclosure will be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present disclosure, rather than all the embodiments of the present disclosure, and it should be understood that the present disclosure is not limited to the exemplary embodiments described here.

[0026] Blockchain is a new type of information processing and storage technology that uses a decentralized networking structure to manage and maintain distributed ledgers. Blockchain can also establish a consensus mechanism between nodes to ensure that ledger data is fair and cannot be tampered with, and support the neutral execution of contracts (codes recognized by multiple parties), thereby solving problems such as information opacity, lack of trust, and poor collaboration between partners.

[0027] If computers and communication networks provide information representation, transmission and processing capabilities, changing the way people communicate in life and work, then blockchain technology realizes the value representation and transfer mechanism, becoming a new means to enhance trust and strengthen collaboration in social production and life, and is expected to optimize the social resource collaboration model and improve production relations.

[0028] A smart contract is a digital contract that writes the contract content into the blockchain, ensuring that the contract is open, transparent, legible, and tamper-proof. In the application process of the blockchain system, the blockchain can provide a good environment for the implementation of smart contracts. The blockchain can automatically execute the terms and conditions in the smart contract without human intervention, thereby achieving reliable, secure, and transparent transactions. The data stored by each node can be used to record accounts separately to form a distributed ledger. The chain structure of the ledger data combined with the cryptographic algorithm ensures the time sequence relationship and information self-consistency of the data, ensuring that all information cannot be tampered with and cannot be destroyed. The blockchain runs and processes in a secure environment through the code (smart contract) that is uniformly signed and approved by the relevant nodes, thereby ensuring the neutrality and credibility of the information processing process.

[0029] For ease of understanding, the following will take the most widely used Ethereum and Hyperledger as examples.

[0030] Ethereum is the most widely used blockchain system with the most successful business model. The operating mechanism of smart contracts is as follows: after smart contracts are compiled into binary files, they are deployed to the blockchain; users trigger the execution of smart contracts by calling the smart contract interface. When a node receives a new transaction, it verifies the validity of the transaction and then sends the transaction to the Ethereum Virtual Machine (EVM) for execution. EVM is a stack-based virtual machine that runs in a completely isolated environment. The code running in it cannot access the network, file system, and other processes to ensure independence and rationality during operation. EVM executes the code of smart contracts and modifies the data (status) on the current blockchain. Ethereum's EVM runs on each Ethereum full-function node and is the core component of the Ethereum network, responsible for executing smart contract code. Each node runs EVM, ensuring the security, consistency, and efficiency of the entire network. This makes Ethereum a decentralized blockchain platform that supports many smart contract applications and decentralized applications.

[0031] In Hyperledger, chaincode service is a core function of Hyperledger, which allows users to deploy, manage and execute chaincode (i.e. smart contracts) on the blockchain network. After the chaincode is submitted to the channel, a dedicated container will be started on all relevant endorsement peers that have installed the chaincode. The chaincode will run in isolation in the container, completely isolated from other codes and data running on the peer, ensuring the confidentiality and integrity of the running process. The chaincode runs on the designated endorsement node of the designated chain and designated channel of Fabric. For a chaincode call, all relevant endorsement nodes need to run the chaincode once independently in the chaincode container to form a read-write set.

[0032] Based on the above principles, it can be seen that blockchain essentially adds trust attributes to information through redundant information processing, storage, and approved business logic. Obviously, the redundancy and cross-validation process of storage, communication, and processing processes lead to a significant reduction in blockchain processing performance and a significant increase in resource overhead. Compared with traditional database systems, blockchain technology is more complex and blockchain applications involve more stakeholders. Therefore, the application development cost is high and deployment and maintenance are difficult.

[0033] It can be concluded that when running smart contracts, nodes need to build a smart contract operating environment, execute the smart contract operating environment separately, and execute smart contracts separately. In addition, the node also needs to start a virtual machine or container dedicated to contract processing, use the same input parameters on this virtual machine or container, execute the same contract code or logic, and generate the same ledger operations and read-write sets. The contract execution process on these nodes is redundant calculation. Redundancy occupies a large amount of memory and computing resources of each node, which restricts the node capacity, business capacity and throughput, and significantly increases the cost of providing and using blockchain services.

[0034] In addition, the virtual machines and containers opened inside the node share memory, disk, CPU and other resources with the processes corresponding to functions such as transaction verification, block forwarding, and ledger recording. They need to be isolated at the communication, memory, process and other levels through the operating system, software and hardware configuration, and cannot achieve high-security, physical-level "security isolation". At the same time, the software isolation mechanism increases the difficulty of research and development, implementation and maintenance.

[0035] In order to solve at least some of the above problems, the present disclosure provides a blockchain system, which includes at least: a blockchain node, an execution module, and a management module. Figure 1 , Figure 1 Schematic diagram of a blockchain system according to an embodiment of the present disclosure. Figure 1 As shown, the system includes but is not limited to at least one of the following:

[0036] Blockchain nodes;

[0037] The execution module is deployed with a smart contract execution environment for executing smart contracts;

[0038] A management module is used to manage the execution module and to allocate the execution module to the blockchain node.

[0039] The present disclosure has no specific restrictions on the functional entities included in the blockchain system, which at least includes the above-mentioned blockchain nodes, execution modules and management modules. Furthermore, the system may also include other functional entities, including but not limited to at least one of the following: a compiler and a database. The specific functional entities can be selected according to actual conditions and are not specifically limited here.

[0040] In this system, the management module can perform unified management operations on the execution modules of the entire network and multiple regions, and can also allocate execution modules to blockchain nodes. Among them, the number of execution modules is one or more. The management operations here include but are not limited to at least one of the following: software installation and registration, execution module monitoring, and execution module allocation. For example, when the management module allocates the execution module, the management module can allocate the execution module that meets the first condition to the blockchain node based on the first information of the blockchain node. For the blockchain node, it does not need to find the execution module by itself, but only needs to interact with the execution module according to the allocation result of the management module to obtain the execution result of the smart contract. For example, when the management module installs and registers the software, the management module can install and register the software for it based on the environmental information of the execution module. Among them, the first information and the environmental information will be described in detail later, and will not be repeated here.

[0041] The blockchain nodes involved in the present disclosure do not limit the regions and organizations to which the blockchain nodes belong. For the management module, it can assign execution modules to blockchain nodes in different regions, different organizations, or different blockchains to execute smart contracts. Among them, when the management module assigns execution modules to blockchain nodes, it will not limit the region to which the execution modules belong. Specifically, the regions where the blockchain nodes and the assigned execution modules are located can be the same or different.

[0042] The execution module in the system can be used to execute smart contracts. In other words, the blockchain nodes in the system do not need to execute smart contracts themselves, and the specific execution process of smart contracts is the responsibility of the execution module.

[0043] In order to execute smart contracts, the execution modules are deployed with smart contract execution environments, which include but are not limited to at least one of the following types: Fabric, Ethereum, and ARM Trust Zone. In actual applications, the management module can deploy one or more smart contract execution environments for each execution module according to actual conditions. The smart contract execution environments deployed by different execution modules may be the same or different, or partially different. In other words, the types of smart contracts that can be executed by different execution modules may not be exactly the same.

[0044] For example, Figure 2 Schematic diagram of another blockchain system according to an embodiment of the present disclosure. Figure 2 As shown, the management and configuration module (i.e., management module) can manage multiple smart contract execution modules (i.e., execution modules) such as E1, E2, E3, E5, and Ex. The management and configuration module can assign smart contract execution modules to nodes on chain c. Chain c includes blockchain nodes P1, P2, P3, P4, P6, P7, and Py. Among them, P1 and P2 belong to organization 1, P3 and P4 belong to organization m, P6 and P7 belong to node 2, and Py belongs to node n. Nodes in organization 1 and organization m belong to region 1, and nodes in organization 2 and organization n belong to region z.

[0045] In summary, the present disclosure is responsible for the smart contracts required by each node by separately setting up an execution module and a management module, wherein the execution module can be used to execute smart contracts, and a smart contract execution environment is deployed inside it. The management module can be used to allocate execution modules to blockchain nodes. In this way, the blockchain node only needs to send the required smart contracts to the execution module for execution, without deploying the smart contract execution environment inside it. In addition, the blockchain node does not need to participate in the contract execution process itself, thereby saving the memory and computing resources of the blockchain node to a certain extent, thereby reducing the cost of using the blockchain. Furthermore, in the prior art, when the blockchain node deploys the smart contract execution environment, it is necessary to call multiple functions to share memory, while the smart contract execution environment of the present disclosure is deployed in the execution module, and the smart contract execution environment does not need to be deployed in the blockchain node, which can reduce the degree of coupling between functions in the blockchain node to a certain extent, thereby reducing the difficulty of maintaining the blockchain node.

[0046] Among them, the execution module can be a reuse of an existing functional entity in the blockchain system, or it can be a newly added functional entity.

[0047] In an illustrative embodiment, when the execution module is a reuse of an existing functional entity by the blockchain system, there is no need to add an additional management logic entity, and only the existing functional entity needs to be used to manage the wireless cloud platform.

[0048] In another exemplary embodiment, when the execution module is a newly added functional entity of the blockchain system, it means that there is no need to make special adjustments to the existing blockchain system, and only a new execution module needs to be added to implement the present solution.

[0049] The execution module involved in the present disclosure is composed of at least one general server, and the general server can provide support for the implementation of the functions of the execution module. The present disclosure does not specifically limit the provider of the general server.

[0050] Among them, the management module is based on the equipment provided by a specific organization or a third party outside the chain, and is installed on the execution module, configures the device identification and digital certificate, establishes a network connection, loads the functional unit, etc. At the same time, the management module also needs to take back the management and operation rights of the execution module from the equipment provider. In other words, when a device is used as an execution module, the device needs to hand over the management rights to the management module, so as to ensure that the software and functions in the execution module can be provided in a neutral and fair service manner.

[0051] When the management module deploys the smart contract execution environment of the execution module, it is mainly based on the software and hardware environment (for example: the execution module system version number, software and hardware model, whether SELinux is started, whether software and hardware firewalls are used and appropriate security policies are configured, whether TEE and TEE hardware and middleware development tool version models are supported, etc.). Based on the security assessment rules and software and hardware environment, the management module determines the security level of the smart contract execution environment and forms a formatted security level description file; at the same time, according to the changes in device configuration, the security level description file is updated and recorded in real time.

[0052] The execution module may also include multiple functional units. In an illustrative embodiment, the execution module may include but is not limited to at least one of the following: a management agent unit, a business processing unit, and a smart contract execution environment.

[0053] In the present disclosure, the management agent unit is used to communicate and interact with the management module. The management agent unit is mainly used to communicate and interact with the management module, and the interaction content is not limited to at least one of the following: state information and environment information of the execution module. Exemplarily, the management agent unit provides the state information of the execution module to the management module, and the management module can match the execution module for the blockchain node based on the state information and the first information of the blockchain node. The state information and environment information will be described in detail later.

[0054] Furthermore, the functions included in the management agent unit can all be implemented by functional subunits. The management agent unit includes but is not limited to at least one of the following: a configuration acquisition subunit and a status reporting subunit.

[0055] The configuration acquisition subunit can interact with the management module through a certain mechanism and report information to it. In other words, the configuration acquisition subunit is used to implement the function of the management agent unit reporting environmental information.

[0056] The status reporting subunit is used to obtain the actual status of the execution subunit and report it to the management module. That is to say, the status information of the interaction between the management agent unit and the management module is obtained by the status reporting subunit.

[0057] The interaction mechanism between the sub-units of the management agent unit and the management module includes but is not limited to at least one of the following: a heartbeat mechanism, a load detection, and a passive reporting mechanism.

[0058] It should be understood that the sub-units mentioned above are only two embodiments for convenience of understanding, and the present disclosure does not specifically limit the types of sub-units included in the management agent unit. For example, the management agent unit may include two sub-units, namely, a configuration acquisition sub-unit and a status reporting sub-unit. In actual applications, the number of sub-units included in the management agent unit may be more or less.

[0059] The business processing unit is used to communicate with the blockchain node and perform smart contract management. Among them, the communication content of the business processing unit includes but is not limited to at least one of the following: demand information of the blockchain node, smart contract execution results, and verification information feedback. The smart contract management content includes but is not limited to at least one of the following: storing digital fingerprints, verifying smart contracts, storing smart contract codes, and caching smart contract execution results. In simple terms, the business processing unit can receive a third message (described in detail later), obtain relevant information of the smart contract to be executed according to the third message, and verify the correctness of the relevant information of the smart contract. Only after the verified third request, the smart contract execution environment will execute the corresponding smart contract. Among them, the relevant information of the smart contract includes but is not limited to at least one of the following: contract version, digital fingerprint, version number, release time, validity period, contract code.

[0060] Furthermore, the functions included in the business processing unit can be implemented by functional subunits. Among them, the business processing unit includes but is not limited to at least one of the following: an execution result cache subunit, a contract management subunit, a block acquisition subunit, and a chain communication subunit.

[0061] Among them, the chain communication subunit can be responsible for interacting with the blockchain node, that is, the chain communication subunit is responsible for the node communication function of the business processing unit. In actual applications, the chain communication subunit can only be responsible for sending and receiving information, and sending the information to other subunits for processing.

[0062] Among them, the block acquisition subunit can be used to obtain the data of the blockchain node. The present disclosure takes into account that when a smart contract is executed, it is usually necessary to access specific data on the blockchain (such as transaction records, account balances, the status of a specific contract, etc.). The block acquisition subunit can determine which chains (which may be multiple chains in a blockchain network, such as cross-chain interactions) and which channels of data are needed based on the third message, thereby obtaining the data of the blockchain node. In short, it can be considered that the block acquisition subunit is used for data preparation before the execution of the smart contract.

[0063] Among them, the contract management subunit is responsible for caching the relevant information of the valid contract on the blockchain to verify the correctness of the relevant information of the smart contract. That is to say, after obtaining the third request, the business processing unit can verify the relevant information of the smart contract carried in the third request. When the verification is passed, the smart contract execution environment will execute the smart contract required by the blockchain node.

[0064] The execution result cache subunit is used to store the execution results of a specific version of a specific contract under a specific chain and channel under specific input parameters. That is to say, after receiving the third request, when the relevant information of the smart contract carried by the third request (such as a specific chain, a specific contract version under a channel, and input parameters) is the same, the result stored in the execution result cache subunit can be directly called. The execution result cache subunit first checks whether the result of the execution request has been cached. If the execution module has cached the execution result and the execution result is within the cache validity period, the result in the cache is directly returned without re-executing the contract code. This mechanism can significantly improve processing efficiency and reduce the scheduling and usage overhead of computing resources. Among them, the cache validity period can be determined according to at least one of the following methods: time aging mechanism (for example, if the block interval of the specified chain and the specified channel is T, the cache expiration time can be set to n*T, where n is an integer greater than 1), timed deletion mechanism, and triggered deletion mechanism.

[0065] It should be understood that the above is only an embodiment for easy understanding. The present disclosure does not specifically limit the number of functions of the sub-units. Exemplarily, the business processing unit may include the above four sub-units. That is, the business processing unit may use the chain communication sub-unit to receive the third request, and the chain communication sub-unit sends the third request to the block acquisition sub-unit for data preparation, and the contract management sub-unit verifies the third request and searches the execution result cache sub-unit for historical execution results. After the above verification and preparation, the smart contract is executed.

[0066] The smart contract execution environment is deployed with an execution engine and a signature subunit, which are used to execute the smart contract and feedback the result to the business processing unit. In simple terms, the smart contract execution environment can execute the smart contract and generate an execution result according to the received third request.

[0067] Furthermore, all functions included in the smart contract execution environment can be implemented by functional subunits. Exemplarily, the smart contract execution environment can include but is not limited to at least one of the following: a contract execution engine and an execution result signature subunit.

[0068] Among them, the contract execution engine is used to execute the contract business logic according to the third request and generate execution results (such as ledger write operations, read-write sets).

[0069] The execution result signature subunit can be used to sign the execution result of the smart contract, thereby improving the security of the system. Exemplarily, the execution result signature subunit can sign the result generated by the contract execution engine. In this way, when an execution request with the same input parameters needs to be executed, the business processing unit can also find the corresponding signature, without the need to regenerate the signature, thereby improving processing efficiency and reducing the scheduling and usage overhead of computing resources.

[0070] As mentioned above, the management agent unit, the business processing unit, and the various module sub-units of the smart contract execution environment can also be used in combination.

[0071] For ease of understanding, this disclosure will be explained in conjunction with specific embodiments. Figure 3 , Figure 3 Schematic diagram of an execution module of an embodiment of the present disclosure. Figure 3 As shown, the smart contract execution module (i.e., the execution module) includes a management agent unit, a business processing unit, and a smart contract execution environment. Among them, the management agent module can be independent of the business processing unit and is only used to interact with the management and configuration module (i.e., the management module) to report status information and environmental information. The business processing module includes: an execution result cache subunit, a contract management subunit, a block acquisition subunit, and a chain communication subunit. The chain communication subunit is used to interact with the blockchain node, obtain the third request, and send the third request to the block acquisition subunit and the execution result cache subunit respectively, respectively prepare the data before executing the smart contract, and check whether there are historical execution results. The third request is verified by the contract management subunit. When the contract management subunit fails the verification, for example, when it is found that the contract version or digital fingerprint is incorrect, the contract management subunit can actively obtain the corresponding version of the contract code from the corresponding blockchain through the chain communication function subunit. When the above verification passes and no historical execution result is found in the execution result cache sub-unit, the contract execution engine in the smart contract execution environment executes the contract, and the execution result signature sub-unit signs the result and sends it to the chain communication sub-unit, which sends it to the blockchain node.

[0072] It can be seen that the present disclosure separates the smart contract execution module from the blockchain node and sets it up separately. Through the signature and cache mechanism, it achieves the effect of one-time calculation and multiple uses for different nodes, eliminating the redundant calculation of the nodes in the traditional blockchain system to execute smart contracts separately, and significantly improving the resource efficiency of the smart contract execution module. The present disclosure also realizes the isolation of traditional business processes and smart contract business processes at the host level; the smart contract execution module is deployed separately, which is conducive to low-cost and rapid improvement of security through security reinforcement, TEE support and other methods; at the same time, from the configuration management and operation mode of the smart contract execution module, it is realized that the smart contract operation module can be provided by the on-chain organization and the third party, which improves the neutrality of the smart contract execution process and avoids the intervention of the internal administrator of the organization in the smart contract execution process.

[0073] It should be understood that the present disclosure does not specifically limit the type and quantity of modules in the system, nor does it limit the type and quantity of sub-units included in each module. The above are only embodiments for easy understanding, and in actual applications, you can decide based on the actual situation.

[0074] The present disclosure takes into account that blockchain nodes may have certain requirements for the security of the execution environment of smart contracts. The above-mentioned business processing unit and smart contract execution environment run in a trusted secure execution environment. The trusted secure execution environment includes but is not limited to at least one of the following: secure enclave, trusted execution environment (TEE), and trusted platform module (TPM).

[0075] In addition, this disclosure also provides a smart contract execution method, please refer to Figure 4 , Figure 4 is an interactive schematic diagram illustrating a smart contract execution method according to an embodiment of the present disclosure. Figure 4 As shown, the method may include:

[0076] S401, the blockchain node sends a first message to the management module; the first message is used to request feedback from the execution module that meets the first information; the first information is used to indicate the smart contract execution requirements.

[0077] This step means that the blockchain node does not need to maintain long-term communication with the execution module. Instead, when the blockchain node needs to execute a smart contract, the blockchain node will establish a temporary connection with the corresponding execution module according to the instructions of the management module.

[0078] The first information is the requirements of the blockchain node for the execution module of the smart contract. The first information includes but is not limited to at least one of the following: environmental requirements and state requirements.

[0079] Among them, the environmental requirements may include but are not limited to at least one of the following: execution environment, number of verifications, TEE environment usage, and operating system version number.

[0080] The execution environment, TEE environment usage, and operating system version number are determined by the blockchain node based on its own business security requirements and / or the required smart contracts.

[0081] The number of verifications can be understood as the number of execution modules required by a blockchain node. In other words, a smart contract of a blockchain node can be executed by multiple execution modules. The blockchain node can compare the execution results sent by different execution modules to cross-verify the execution results. The specific verification process will be described in detail later and will not be repeated here.

[0082] The state requirement is the performance requirement of the blockchain node for the execution module. The state requirement includes but is not limited to at least one of the following: running state, processing capacity, cache capacity, and load condition.

[0083] The first information may be a range value (for example, the number of verifications is 1 to 6) or an exact value (for example, the number of verifications is 5).

[0084] S402, the management module receives a first message from a blockchain node.

[0085] According to the above-mentioned first information, the management module can filter among the execution modules it manages.

[0086] S403: The management module determines a candidate module based on the first information and the second information of each execution module.

[0087] In this step, the management module screens and matches the first information with the second information of each execution module, and takes the execution modules that meet the first information as candidate modules.

[0088] The number of candidate modules may be one or more. That is, the candidate modules may be execution modules with the best performance under the requirements of the first information, or may be all execution modules that meet the requirements of the first information.

[0089] Among them, the second information can be used to describe the relevant information of the execution module, including but not limited to at least one of the following: candidate module identification, smart contract execution environment of the candidate module, operating system version number, running status, processing power, cache capacity, load conditions, operating system version number, number of verifications, and TEE environment usage.

[0090] The second information can be read by the management module or sent by the execution module. For example, the second information can be obtained by using the above-mentioned management agent unit. The specific acquisition method will be described in detail later.

[0091] S404: The management module sends a second message to the blockchain node, where the second message carries relevant information of the candidate module.

[0092] In this step, the second message may carry relevant information of at least one candidate module. The second message may carry at least one of the following information, including but not limited to: IP information of the candidate module, identification information of the candidate module. In other words, the blockchain node can search for the corresponding execution module according to the information carried in the second message and establish a connection with it.

[0093] The second message may also include, but is not limited to, at least one of the following: the running status, processing capacity, cache capacity, and load of the candidate module. The blockchain node may establish a connection with the candidate module based on the information carried in the second message.

[0094] S405, the blockchain node receives a second message from the management module; the second message carries relevant information of the candidate module.

[0095] In this step, the blockchain node can obtain relevant information of multiple candidate modules by receiving and reading the second message.

[0096] The blockchain node can screen the candidate modules here according to its actual situation to obtain the execution module that best meets its requirements, that is, the target module. The target module can be all or part of the candidate modules.

[0097] In an illustrative embodiment, when the target module is a partial candidate module, the blockchain node needs to screen the candidate modules.

[0098] In another embodiment, when the target modules are all candidate modules, the blockchain node does not perform any processing and directly establishes a connection with the candidate modules based on the relevant information of the candidate modules.

[0099] S406, the blockchain node sends a third message to the target module.

[0100] In this step, the blockchain node can establish a connection with the target module screened according to its needs, and send a third message to each target module. The third message is used to request the target module to execute the target smart contract. The third message may also include but is not limited to at least one of the following information: the contract version, digital fingerprint, version number, release time, and validity period of the target smart contract.

[0101] Optionally, the third message may also carry a reverse access encryption password with confidentiality protection to achieve encryption, packaging and transmission of block data and contract codes on the blockchain node.

[0102] S407, the execution module receives a third message from the blockchain node.

[0103] The third message may also carry third information, where the third information is used to indicate the target smart contract, and the third information includes at least one of the following: smart contract version number, smart contract release time, and smart contract validity period.

[0104] After receiving the third message from the blockchain node, the execution module can read the third message to obtain the smart contract required by the blockchain node.

[0105] The execution module may calibrate the third information before processing the data to be executed using the contract execution engine in the smart contract execution environment.

[0106] The execution module can use the contract management subunit to calibrate the third information. Figure 2 The subunits included therein process the third request, and for details, please refer to the above text.

[0107] S408, the execution module executes the target smart contract.

[0108] The execution module can obtain the data to be executed of the target smart contract based on the third message, and process the data to be executed using the contract execution engine in the smart contract execution environment.

[0109] The data to be executed here refers to the data of the target smart contract to be executed, including but not limited to at least one of the following: smart contract code and execution object.

[0110] Optionally, the execution module can use the above-mentioned smart contract execution environment to execute the target smart contract. Furthermore, the execution result can also be signed by the execution result signature subunit to ensure the security of the execution result during transmission. In addition, the execution module can also use the execution result cache subunit to cache the execution result.

[0111] S409, the execution module sends a fourth message to the blockchain node, and the fourth message carries the execution result of the target smart contract.

[0112] Optionally, the execution module can use the aforementioned chain communication subunit to send a fourth message to the blockchain node.

[0113] Furthermore, before the fourth message is generated, the fourth message can be signed and sent using the private key of the execution module.

[0114] S410, the blockchain node receives a fourth message from the target module, and the fourth message carries the execution result of the target smart contract.

[0115] The blockchain node can receive the fourth message of one or more target modules and process the block data in the blockchain based on the execution result.

[0116] In an illustrative embodiment, when there are multiple target modules of the blockchain node, the blockchain node needs to compare the multiple execution results. When the results are different, the first message is resent to the management module. In this way, the correctness of the execution result can be guaranteed to a certain extent.

[0117] For easier understanding, please refer to Figure 5 , Figure 5 FIG. 1 is a schematic diagram illustrating a cross-validation process of an embodiment of the present disclosure. Figure 5 As shown, it is assumed that under the guidance of the management and configuration module M, the smart contract execution modules provided by each organization have been configured and can work normally;

[0118] (1) When blockchain node P1 (hereinafter referred to as Pi) needs to call contract SC139010 during business processing, P1 first initiates a list of currently available smart contract execution modules E to the management and configuration module M (i.e., management module), hereinafter referred to as M;

[0119] (2) P1 filters the existing smart contract execution module E (hereinafter collectively referred to as Ex) list according to its own contract execution security policy for contract SC139010, and obtains the selected smart contract execution module list {E1, E2}, where E1 and E2 are the target execution modules;

[0120] (3.1) P1 analyzes the contract parameters, determines the block ID list that needs to be accessed for this contract execution, generates E1 reverse access, generates encryption password K according to policy requirements, and encrypts the blockchain ID list, reverse access token, content encryption key K, etc. using E1's public key, and then passes them to E1 as parameter information of the smart contract call request;

[0121] (3.2) E1 obtains the smart contract execution request message, decrypts the relevant parameters using its own private key, and then uses the reverse access token to initiate access to P1 to obtain the smart contract bytecode and the specified block data. The above content is encrypted using K and the pre-negotiated symmetric encryption algorithm, and interacts with a secure transmission protocol (such as TLS);

[0122] The steps performed by E2 in (3.1)'-(3.2)' are the same as (3.1) and (3.2), respectively, and will not be repeated here.

[0123] (4) After E1 and E2 obtain the necessary data for contract execution, they load the smart contract into the contract execution engine for execution. The execution result is signed by the execution environment using the private key, and then encrypted using K to feedback to P1, and saved in their respective execution result caches.

[0124] (5) After collecting the results of E1 and E2, use K to decrypt the message to obtain the execution result, and compare the execution results of the two execution modules;

[0125] (6) If the results are the same, accept the execution result and use it to process transactions in the blockchain; if the execution results are different, return to step (1) to reselect the candidate smart contract execution module and re-execute;

[0126] (7)End.

[0127] In this way, the cross-verification between different execution results mentioned above can be achieved. It can be seen that the present disclosure supports parallel execution of smart contracts and multiple verification of results, which increases business flexibility and overall security.

[0128] In addition, you can also refer to Figure 6 , Figure 6 Schematic diagram of a contract execution strategy according to an embodiment of the present disclosure. Figure 6 , you can get the specific implementation method of the double check.

[0129] It should be understood that the double verification is only an embodiment for ease of understanding, and the present disclosure does not specifically limit the number of verifications of the blockchain node.

[0130] When acquiring the second information, the management module may directly read the second information, or may receive the second information from the execution module.

[0131] In an illustrative embodiment, when the management module receives the second information from the execution module, it includes: monitoring the status information of each of the execution modules; receiving the environmental information from each of the execution modules, and performing permission management on each of the execution modules based on the environmental information. The status information includes at least one of the following: running status, processing capacity, cache capacity, and load conditions; the environmental information includes at least one of the following: execution environment, number of verifications, TEE environment usage, and operating system version number.

[0132] Optionally, the execution module may receive status information and environment information reported to the management module by the configuration acquisition subunit and the status reporting subunit.

[0133] In summary, the present disclosure provides three smart contract execution methods.

[0134] Specifically, the present disclosure provides a smart contract execution method, which can be applied to a management module. The method includes: receiving a first message from a blockchain node, the first message is used to request feedback on an execution module that meets the first information; the first information is used to indicate the smart contract execution requirements; based on the first information and the second information of each execution module, determining a candidate module; sending a second message to the blockchain node, the second message carrying relevant information of the candidate module.

[0135] In an illustrative embodiment, the method also includes: the first information includes at least one of the following: environmental requirements, status requirements; wherein the environmental requirements include at least one of the following: execution environment, number of verifications, TEE environment usage, operating system version number; the status requirements include at least one of the following: running status, processing power, cache capacity, load conditions.

[0136] In an illustrative embodiment, the method also includes: the second information includes at least one of the following: candidate module identification, smart contract execution environment of the candidate module, operating system version number, running status, processing power, cache capacity, load conditions, operating system version number, number of verifications, and TEE environment usage.

[0137] In an illustrative embodiment, the method also includes: monitoring the status information of each of the execution modules; the status information includes at least one of the following: operating status, processing power, cache capacity, and load conditions; receiving environmental information from each of the execution modules, and performing permission management on each of the execution modules based on the environmental information; the environmental information includes at least one of the following: execution environment, number of verifications, TEE environment usage, and operating system version number.

[0138] In addition, the present disclosure also provides a smart contract execution method, which can be applied to an execution module. The method includes: receiving a third message from a blockchain node, the third message being used to request execution of a target smart contract; executing the target smart contract; and sending a fourth message to the blockchain node, the fourth message carrying the execution result of the target smart contract.

[0139] In an illustrative embodiment, the executing the target smart contract includes: obtaining the data to be executed of the target smart contract based on the third message; and processing the data to be executed using a contract execution engine in a smart contract execution environment.

[0140] In an illustrative embodiment, the third message carries third information, and the third information is used to indicate the target smart contract. The third information includes at least one of the following: a smart contract version number, a smart contract release time, and a smart contract validity period.

[0141] In an illustrative embodiment, before using the contract execution engine in the smart contract execution environment to process the data to be executed, the method further includes: calibrating the third information.

[0142] In an illustrative embodiment, sending the fourth message to the blockchain node includes: using the private key of the execution module to sign and send the fourth message.

[0143] In addition, the present disclosure also provides a smart contract execution method, which can be applied to blockchain nodes. The method includes: sending a first message to a management module; the first message is used to request feedback of an execution module that meets the first information; the first information is used to indicate the smart contract execution requirements; receiving a second message from the management module; the second message carries the relevant information of the candidate module; sending a third message to a target module, the target module is all or part of the candidate module; the third message is used to request the target module to execute a target smart contract; receiving a fourth message from the target module, the fourth message carries the execution result of the target smart contract.

[0144] In an illustrative embodiment, the method further includes: when there are multiple target modules, comparing the multiple execution results; when the results are different, resending the first message to the management module.

[0145] In an illustrative embodiment, the method further includes: processing block data in the blockchain based on the execution result.

[0146] The present disclosure also provides a smart contract execution device. Figure 7 is a block diagram illustrating a smart contract execution device according to an embodiment of the present disclosure. Figure 7 As shown, the smart contract execution device 700 includes: an information receiving module 701, used to receive a first message from a blockchain node, wherein the first message is used to request feedback from an execution module that meets the first information; the first information is used to indicate smart contract execution requirements.

[0147] The candidate determination module 702 is used to determine a candidate module based on the first information and the second information of each execution module.

[0148] The information sending module 703 is used to send a second message to the blockchain node, where the second message carries relevant information of the candidate module.

[0149] In an exemplary embodiment, the smart contract execution device 700 is also configured so that the first information includes at least one of the following: environmental requirements and status requirements; wherein the environmental requirements include at least one of the following: execution environment, number of verifications, TEE environment usage, and operating system version number; and the status requirements include at least one of the following: operating status, processing power, cache capacity, and load conditions.

[0150] In an exemplary embodiment, the smart contract execution device 700 is also configured so that the second information includes at least one of the following: candidate module identification, smart contract execution environment of the candidate module, operating system version number, running status, processing power, cache capacity, load conditions, operating system version number, number of verifications, and TEE environment usage.

[0151] In an exemplary embodiment, the smart contract execution device 700 is also configured to: monitor the status information of each of the execution modules; the status information includes at least one of the following: operating status, processing power, cache capacity, and load conditions; receive environmental information from each of the execution modules, and perform permission management on each of the execution modules based on the environmental information; the environmental information includes at least one of the following: execution environment, number of verifications, TEE environment usage, and operating system version number.

[0152] The present disclosure also provides a smart contract execution device. Figure 8 is a block diagram illustrating a smart contract execution device according to an embodiment of the present disclosure. Figure 8 As shown, the smart contract execution device 800 includes: an information receiving module 801, used to receive a third message from a blockchain node, and the third message is used to request the execution of a target smart contract.

[0153] The contract execution module 802 is used to execute the target smart contract.

[0154] The information sending module 803 is used to send a fourth message to the blockchain node, where the fourth message carries the execution result of the target smart contract.

[0155] In an exemplary embodiment, the smart contract execution device 800 is also configured to obtain the data to be executed of the target smart contract based on the third message; and process the data to be executed using the contract execution engine in the smart contract execution environment.

[0156] In an exemplary embodiment, the smart contract execution device 800 is also configured so that the third message carries third information, and the third information is used to indicate the target smart contract, and the third information includes at least one of the following: smart contract version number, smart contract release time, and smart contract validity period.

[0157] In an exemplary embodiment, the smart contract execution device 800 is also configured to, before the contract execution engine in the smart contract execution environment processes the data to be executed, the method also includes: calibrating the third information.

[0158] In an exemplary embodiment, the smart contract execution device 800 is also configured to use the private key of the execution module to sign and send the fourth message.

[0159] The present disclosure also provides a smart contract execution device. Fig. 9 is a block diagram illustrating another smart contract execution device according to an embodiment of the present disclosure. Fig. 9 As shown, the smart contract execution device 900 includes: a message sending module 901, used to send a first message to the management module.

[0160] The message receiving module 902 is used to receive a second message from the management module; the second message carries relevant information of the candidate module.

[0161] The message sending module 903 is used to send a third message to the target module, where the target module is all or part of the candidate module; the third message is used to request the execution of the target smart contract.

[0162] The result acquisition module 904 is used to receive a fourth message from the target module, where the fourth message carries the execution result of the target smart contract.

[0163] In an exemplary embodiment, the smart contract execution device 900 is also configured to compare the multiple execution results when there are multiple target modules; when the results are different, resend the first message to the management module.

[0164] In an exemplary embodiment, the smart contract execution device 900 is also configured to process block data in the blockchain based on the execution result.

[0165] Fig.10 The electronic device 1000 according to the embodiment of the present disclosure includes at least a memory, a processor and a computer program stored in the memory, and the processor executes the computer program to implement the signal transmission method described in any of the above embodiments.

[0166] Fig.10 The electronic device 1000 shown specifically includes: a central processing unit (CPU) 1001, a graphics processing unit (GPU) 1002 and a memory 1003. These units are interconnected via a bus 1004. The central processing unit (CPU) 1001 and / or the graphics processing unit (GPU) 1002 can be used as the above-mentioned processor, and the memory 1003 can be used as the above-mentioned memory for storing computer-readable instructions. In addition, the electronic device 1000 may also include a communication unit 1005, a storage unit 1006, an output unit 1007, an input unit 1008 and an external device 1009, which are also connected to the bus 1004.

[0167] Fig.11 A schematic diagram of a computer-readable storage medium provided in an embodiment of the present disclosure. Fig.11 As shown, a computer-readable storage medium 1100 according to an embodiment of the present disclosure has computer-readable instructions 1101 stored thereon. When the computer-readable instructions 1101 are executed by a processor, the signal transmission method described in any of the foregoing embodiments of the present disclosure is implemented. The computer-readable storage medium includes, but is not limited to, for example, volatile memory and / or non-volatile memory. Volatile memory may include, for example, random access memory (RAM) and / or cache memory (cache), etc. Non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, optical disk, magnetic disk, etc.

[0168] The present disclosure further provides a computer program product, including a computer program / instruction, which, when executed by a processor, implements the smart contract execution method described in any of the foregoing embodiments of the present disclosure.

[0169] The basic principles of the present disclosure are described above in conjunction with specific embodiments. However, it should be noted that the advantages, strengths, effects, etc. mentioned in the present disclosure are only examples and not limitations, and it cannot be considered that these advantages, strengths, effects, etc. are required by each embodiment of the present disclosure. In addition, the specific details disclosed above are only for the purpose of illustration and ease of understanding, and are not limitations. The above details do not limit the present disclosure to the necessity of adopting the above specific details to be implemented.

[0170] The block diagrams of the devices, apparatuses, equipment, and systems involved in this disclosure are only illustrative examples and are not intended to require or imply that they must be connected, arranged, and configured in the manner shown in the block diagrams. As will be appreciated by those skilled in the art, these devices, apparatuses, equipment, and systems can be connected, arranged, and configured in any manner. Words such as "including," "comprising," "having," and the like are open words, referring to "including but not limited to," and can be used interchangeably therewith. The words "or" and "and" used herein refer to the words "and / or," and can be used interchangeably therewith, unless the context clearly indicates otherwise. The word "such as" used herein refers to the phrase "such as but not limited to," and can be used interchangeably therewith.

[0171] Additionally, as used herein, "or" used in a list of items beginning with "at least one" indicates a separate list, so that, for example, a list of "at least one of A, B, or C" means A or B or C, or AB or AC or BC, or ABC (i.e., A and B and C). Furthermore, the word "exemplary" does not mean that the example described is preferred or better than other examples.

[0172] It should also be noted that in the system and method of the present disclosure, each component or each step can be decomposed and / or recombined. Such decomposition and / or recombination should be regarded as equivalent solutions of the present disclosure.

[0173] Various changes, substitutions, and modifications of the techniques described herein may be made without departing from the teachings defined by the appended claims. Furthermore, the scope of the claims of the present disclosure is not limited to the specific aspects of the processes, machines, manufactures, compositions of events, means, methods, and actions described above. Currently existing or later to be developed processes, machines, manufactures, compositions of events, means, methods, or actions that perform substantially the same functions or achieve substantially the same results as the corresponding aspects described herein may be utilized. Thus, the appended claims include such processes, machines, manufactures, compositions of events, means, methods, or actions within their scope.

[0174] The above description of the disclosed aspects is provided to enable any person skilled in the art to make or use the present disclosure. Various modifications to these aspects will be readily apparent to those skilled in the art, and the general principles defined herein may be applied to other aspects without departing from the scope of the present disclosure. Therefore, the present disclosure is not intended to be limited to the aspects shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.

[0175] The above description has been given for the purpose of illustration and description. In addition, this description is not intended to limit the embodiments of the present disclosure to the forms disclosed herein. Although multiple example aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, changes, additions and sub-combinations thereof.

Claims

1. A blockchain system, characterized in that: The system comprises: Blockchain nodes; The execution module is deployed with a smart contract execution environment for executing smart contracts; A management module is used to manage the execution module and to allocate the execution module to the blockchain node.

2. The system according to claim 1, characterized in that The execution module includes: A management agent unit, used for communicating and interacting with the management module; A business processing unit, used to communicate with the blockchain node and perform smart contract management; The smart contract execution environment is deployed with an execution engine and a signature sub-unit, which are used to execute the smart contract and feedback the results to the business processing unit.

3. The system according to claim 2, characterized in that The business processing unit and the smart contract execution environment run in a trusted secure execution environment.

4. The system according to claim 1, characterized in that The number of the execution modules is one or more; The smart contract execution environment of each execution module is the same, different, or partially different; The smart contract execution environment includes at least one of the following: Fabric, Ethereum.

5. A smart contract execution method, characterized in that: Executed in a management module, the method includes: Receiving a first message from a blockchain node, wherein the first message is used to request feedback from an execution module that satisfies the first information; the first information is used to indicate a smart contract execution requirement; Determine a candidate module based on the first information and the second information of each execution module; Send a second message to the blockchain node, where the second message carries relevant information of the candidate module.

6. The method according to claim 5, characterized in that The first information includes at least one of the following: environmental requirements and status requirements; The environment requirements include at least one of the following: execution environment, verification times, TEE environment usage, and operating system version number; The status requirement includes at least one of the following: operating status, processing capability, cache capability, and load condition.

7. The method according to claim 6, characterized in that The second information includes at least one of the following: candidate module identification, smart contract execution environment of the candidate module, operating system version number, running status, processing capacity, cache capacity, load conditions, operating system version number, number of verifications, and TEE environment usage.

8. The method according to claim 7, characterized in that The method further comprises at least one of the following: Monitoring the status information of each of the execution modules; the status information includes at least one of the following: operating status, processing capacity, cache capacity, and load condition; Receive environmental information from each of the execution modules, and perform permission management on each of the execution modules based on the environmental information; the environmental information includes at least one of the following: execution environment, number of verifications, TEE environment usage, and operating system version number.

9. A smart contract execution method, characterized in that: Executed in the execution module, the method includes: Receiving a third message from the blockchain node, wherein the third message is used to request execution of a target smart contract; Execute the target smart contract; Send a fourth message to the blockchain node, where the fourth message carries the execution result of the target smart contract.

10. The method according to claim 9, characterized in that The executing the target smart contract comprises: Based on the third message, obtaining the to-be-executed data of the target smart contract; The contract execution engine in the smart contract execution environment is used to process the data to be executed.

11. The method according to claim 10, characterized in that The third message carries third information, and the third information is used to indicate the target smart contract. The third information includes at least one of the following: a smart contract version number, a smart contract release time, and a smart contract validity period.

12. The method according to claim 11, characterized in that Before processing the data to be executed by the contract execution engine in the smart contract execution environment, the method further includes: The third information is calibrated.

13. The method according to claim 9, characterized in that The sending a fourth message to the blockchain node includes: The fourth message is signed and sent using the private key of the execution module.

14. A smart contract execution method, characterized in that: Executed on a blockchain node, the method includes: Send a first message to the management module; the first message is used to request feedback from the execution module that meets the first information; the first information is used to indicate the smart contract execution requirements; receiving a second message from the management module; the second message carries relevant information of the candidate module; Sending a third message to a target module, where the target module is all or part of the candidate modules; the third message is used to request the target module to execute a target smart contract; A fourth message is received from the target module, where the fourth message carries the execution result of the target smart contract.

15. The method according to claim 14, characterized in that The method further comprises: When there are multiple target modules, comparing the multiple execution results; When the results are different, the first message is resent to the management module.

16. The method according to claim 15, characterized in that The method further comprises: Based on the execution result, block data in the blockchain is processed.

17. A smart contract execution device, characterized in that: The device comprises: An information receiving module, configured to receive a first message from a blockchain node, wherein the first message is used to request feedback from an execution module that satisfies the first information; the first information is used to indicate a smart contract execution requirement; a candidate determination module, configured to determine a candidate module based on the first information and the second information of each execution module; An information sending module is used to send a second message to the blockchain node, where the second message carries relevant information of the candidate module.

18. A smart contract execution device, characterized in that: The device comprises: An information receiving module, used to receive a third message from a blockchain node, wherein the third message is used to request execution of a target smart contract; A contract execution module, used to execute the target smart contract; An information sending module is used to send a fourth message to the blockchain node, where the fourth message carries the execution result of the target smart contract.

19. A smart contract execution device, characterized in that: The device comprises: A message sending module, used for sending a first message to the management module; A message receiving module, configured to receive a second message from the management module; the second message carries relevant information of the candidate module; A message sending module, used to send a third message to a target module, where the target module is all or part of the candidate modules; the third message is used to request execution of a target smart contract; The result acquisition module is used to receive a fourth message from the target module, where the fourth message carries the execution result of the target smart contract.

20. An electronic device comprising a memory, a processor and a computer program stored in the memory, characterized in that: The processor executes the computer program to implement the method according to any one of claims 5 to 16.

21. A computer-readable storage medium having a computer program / instruction stored thereon, characterized in that: When the computer program / instructions are executed by a processor, the method according to any one of claims 5 to 16 is implemented.

22. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the method according to any one of claims 5 to 16 is implemented.

Citation Information

Patent Citations

  • Task processing method and system, server and storage medium

    CN110673938A

  • Intelligent contract execution engine and method

    CN115982181A

  • Message processing method, cloud server and communication system

    CN116094699A

  • Block chain service method and device, computer equipment, storage medium and product

    CN116975070A

  • Task processing method and device of block chain, computer equipment and storage medium

    CN118277048A