Smart contract deployment method and device, equipment and storage medium
By splitting the smart contract into multiple subcontracts and building a channel connection pool, the complex and inefficient smart contract calls in the blockchain network are solved, efficient contract execution and simplified call process are achieved, and data storage costs are reduced.
Patent Information
- Application Number
- CN202410008967.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-04
- Publication Date
- 2025-07-04
AI Technical Summary
The call relationship of smart contracts in existing blockchain networks is complex, resulting in large system resource overhead and low execution efficiency.
Split the preset business logic into multiple subcontracts, and combine it with the system contract to form a contract file, build contract images and containers, realize multi-channel communication through channel connection pools, simplify call relationships, process business requests in parallel, and finally add storage identifiers to the local database to isolate the execution results.
Reduces the contract code volume, simplifies the call relationship, improves execution and communication efficiency, and reduces data storage costs.
Smart Images

Figure CN120263797A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of contract calls, and particularly to a method, device, equipment and storage medium for deploying smart contracts. Background Art
[0002] Smart contracts can perform various tasks, such as verifying and executing contracts, managing digital assets, and executing financial transactions. Smart contracts are usually deployed and run inside the nodes of a blockchain network. At the same time, a Docker container can also be created and started to deploy the smart contract in the container for running.
[0003] At the present stage, when creating smart contracts, multiple smart contracts are created separately according to different business logics in the business. Therefore, when deploying contracts, it is necessary to create corresponding numbers of contract containers to deploy the above-mentioned multiple contracts, resulting in a large overhead of system resources. At the same time, the contract code amounts of multiple smart contracts are large, the call relationships between contracts are relatively complex, and the execution efficiency of contracts is not high. Summary of the Invention
[0004] The purpose of the embodiments of the present invention is to provide a multi-channel transaction processing method and device based on smart contracts to solve the problems that the call relationships of smart contracts in the existing blockchain network are relatively complex and the execution efficiency is not high.
[0005] The specific technical solution of the present invention is as follows: In the first aspect of the embodiments of the present invention, a method for deploying a smart contract is provided, which is applied to a bookkeeping node in a blockchain network and includes: Writing multiple sub-contracts of the smart contract according to a preset business logic, and combining the multiple sub-contracts with a system contract to form a contract file; Constructing a contract image based on the contract file, and configuring preset connection pool information in the contract image to obtain a contract image file; Constructing a contract container according to the contract image file, starting the contract container, establishing a channel connection pool, and establishing a multi-channel communication connection with the contract container by using the channel connection pool; Sending a system contract call request to the contract container to obtain a list of sub-contracts in the contract container; Obtaining a business request, and sending a sub-contract call request to the contract container based on the business request and the list of sub-contracts; Obtaining an execution result returned by the contract container in response to the sub-contract call request, adding a storage identifier to the execution result, and isolating and storing the execution result with the storage identifier in a local database.
[0006] Further, writing multiple sub - contracts of the smart contract according to a preset business logic and combining the multiple sub - contracts with the system contract to form a contract file includes: The accounting node writes the smart contract code in the local development environment, writes multiple sub - contracts and system contracts in the smart contract code, and at the same time declares the construction methods of multiple sub - contracts according to the preset business logic to obtain the smart contract code to be compiled; the sub - contracts also include default sub - contracts, and general construction methods are declared in the default sub - contracts; Configure the smart contract ID, contract address, sub - contract ID, and method name of the construction method for the smart contract code to be compiled. After the configuration is completed, package it to obtain the corresponding contract file.
[0007] Further, building a contract image based on the contract file and configuring preset connection pool configuration information in the contract image to obtain a contract image file includes: Create a contract directory and place the contract file into the contract directory; Build a Dockerfile in the contract directory and configure operation instructions in the Dockerfile; Run the Docker build instruction to build the corresponding contract image based on the contract file and the Dockerfile; Pre - set the connection pool configuration information of the contract container and add the connection pool configuration information to the contract image to obtain the contract image file.
[0008] Further, building a contract container according to the contract image file, starting the contract container, establishing a channel connection pool, and establishing a multi - channel communication connection with the contract container using the channel connection pool includes: Start the contract engine, pull the contract image file, run the docker run instruction, build a contract container based on the contract image file, and at the same time start and run the contract container; According to the connection pool configuration information in the contract image file, use the contract container to establish a channel connection pool, and the channel connection pool contains multiple communication channels; The accounting node determines the location of the contract container through the contract address and establishes a multi - channel communication connection with the contract container through the channel connection pool.
[0009] Further, obtaining a business request and sending a sub - contract call request to the contract container based on the business request and the sub - contract list includes: The accounting node obtains the business request submitted by the user and parses the business request to obtain the request parameters of the business request; Determine the sub - contract ID and method name to be called by the business request in the sub - contract list according to the request parameters; Generate a sub - contract call request according to the request parameters, sub - contract ID and method name, and send the sub - contract call request to the contract container.
[0010] Further, obtaining the execution result returned by the contract container in response to the sub - contract call request, adding a storage identifier to the execution result, and isolating and storing the execution result with the storage identifier in the local database includes: After receiving the sub - contract call request, the contract container calls the constructor method of the corresponding sub - contract according to the sub - contract ID and method name in the sub - contract call request, performs business processing according to the request parameters, and returns the execution result; After obtaining the execution result, the accounting node determines the storage identifier corresponding to the sub - contract according to the contract address and the sub - contract ID in the sub - contract call request; Add the storage identifier to the execution result to obtain an execution result with a storage identifier, and isolate and store the execution result corresponding to the sub - contract in the local database according to the storage identifier.
[0011] Further, the method further includes: If the sub - contract call request received by the contract container does not include a sub - contract ID, call the general constructor method in the default sub - contract according to the method name in the sub - contract call request, perform business processing according to the request parameters, and return the execution result.
[0012] In a second aspect, an embodiment of the present invention further provides a deployment device for a smart contract, which is applied to an accounting node in a blockchain network, and includes: A contract file writing module, configured to write multiple sub - contracts of the smart contract according to a preset business logic, and combine the multiple sub - contracts with a system contract to form a contract file; A contract image building module, building a contract image according to the contract file, and configuring preset connection pool information in the contract image to obtain a contract image file; A contract container building module, configured to build a contract container according to the contract image file, start the contract container, establish a channel connection pool, and establish a multi - channel communication connection with the contract container by using the channel connection pool; A system contract call module, configured to send a system contract call request to the contract container and obtain a list of sub - contracts in the contract container; A sub - contract call module, configured to obtain a business request and send a sub - contract call request to the contract container based on the business request and the sub - contract list; An execution result storage module is configured to obtain the execution result returned by the contract container in response to the sub - contract call request, add a storage identifier to the execution result, and isolate and store the execution result with the storage identifier in a local database.
[0013] Thirdly, an embodiment of the present invention further provides an electronic device, including: One or more processors; A storage device for storing one or more programs, which, when executed by the one or more processors, cause the one or more processors to implement the method for deploying the smart contract described in the first aspect.
[0014] Fourthly, an embodiment of the present invention further provides a computer - readable medium, on which a computer program is stored. When the computer program is executed by a processor, the method for deploying the smart contract described in the first aspect is implemented.
[0015] The beneficial effects of the present invention are as follows: The method splits the preset business logic into multiple sub - contracts of the smart contract, and combines the multiple sub - contracts with the system contract to form a contract file. There is no need to independently construct multiple smart contracts according to the business logic, which reduces the contract code amount and simplifies the contract call relationship. At the same time, a contract image file can be further obtained from the contract file, and a contract container and a channel connection pool are constructed according to the contract image file, so that the accounting node can establish a multi - channel communication connection with the contract container through the channel connection pool, and parallelly send multiple business requests to the contract container for business processing, improving the contract execution efficiency and communication efficiency. Finally, the present application also adds a storage identifier to the execution result returned by the contract container, and isolates and stores the execution result with the storage identifier in the local database, which is convenient for querying the execution result and reduces the data storage cost. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the following - described drawings are only some embodiments of the present invention, and those of ordinary skill in the art can obtain other drawings without creative efforts based on these drawings.
[0017] Figure 1 It is a flowchart of a method for deploying a smart contract proposed in an embodiment of the present invention; Figure 2 It is a schematic diagram of the module structure of a device for deploying a smart contract proposed in an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0018] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0019] Embodiment 1: Figure 1 It is a flowchart of a method for deploying an intelligent contract proposed in an embodiment of the present invention. Refer to Figure 1 As shown, a method for deploying an intelligent contract in an embodiment of the present invention can be applied to a bookkeeping node in a blockchain network, and mainly includes the following steps: S1: Write multiple sub-contracts of the intelligent contract according to a preset business logic, and combine the multiple sub-contracts with the system contract to form a contract file; S2: Construct a contract image based on the contract file, and configure preset connection pool information in the contract image to obtain a contract image file; S3: Construct a contract container according to the contract image file, start the contract container, establish a channel connection pool, and establish a multi-channel communication connection with the contract container by using the channel connection pool; S4: Send a system contract call request to the contract container to obtain a list of sub-contracts in the contract container; S5: Obtain a business request, and send a sub-contract call request to the contract container based on the business request and the list of sub-contracts; S6: Obtain the execution result returned by the contract container in response to the sub-contract call request, add a storage identifier to the execution result, and isolate and store the execution result with the storage identifier in a local database.
[0020] Further, in one embodiment, in step S1 of the present invention, writing multiple sub-contracts of the intelligent contract according to a preset business logic and combining the multiple sub-contracts with the system contract to form a contract file includes, but is not limited to, the following sub-steps: S101. The bookkeeping node writes intelligent contract code in a local development environment, writes multiple sub-contracts and system contracts in the intelligent contract code, and simultaneously declares construction methods of multiple sub-contracts according to a preset business logic to obtain intelligent contract code to be compiled. Among them, the written sub-contracts also include default sub-contracts, and a general construction method is declared in the default sub-contracts. The preset business logic can be one or more.
[0021] S102. A method for configuring a smart contract ID (or name), a contract address, a sub - contract ID, and the method name of a constructor method for the smart contract code to be compiled. After the configuration is completed, it is packaged to obtain the corresponding contract file. Among them, the contract address (address) is the unique identifier used to represent the smart contract in the blockchain network. It consists of a long string of numbers and letters, usually starting with 0x. The contract address is calculated based on the code of the smart contract and other relevant parameters, and each smart contract has a corresponding contract address. By configuring the contract address for the smart contract, it is convenient to identify and call the smart contract.
[0022] Specifically, when creating a contract, in the contract file part of the smart contract, the corresponding sub - contract code is written according to multiple business logics, and the corresponding constructor method is set under each sub - contract. Finally, the sub - contract code is merged with the system contract to form the smart contract code to be compiled. Then, information such as the smart contract ID, contract address, sub - contract ID, and the method name of the constructor method is configured for the smart contract code to be compiled to form the contract file of the smart contract. Among them, the system contract in the smart contract is used to obtain the sub - contract information configured in the contract, including the sub - contract ID and the method name of the constructor method, and finally outputs the obtained sub - contract information as a sub - contract list. The accounting node can obtain the sub - contract information in the corresponding contract container after calling the system contract.
[0023] In addition, the smart contract in the embodiment of the present invention is an external smart contract, and a corresponding contract engine needs to be started when constructing the contract container.
[0024] Further, in one embodiment, in step S2 of the present invention, a contract image is constructed based on the contract file, and preset connection pool configuration information is configured in the contract image to obtain a contract image file, including but not limited to the following sub - steps: S201. Create a contract directory and put the contract file into the contract directory.
[0025] S202. Build a Dockerfile in the contract directory and configure operation instructions in the Dockerfile. Among them, the Dockerfile is a script file composed of a series of instructions and parameters. Each instruction builds a layer. Therefore, the content of each instruction describes how this layer should be built. A Dockerfile contains the complete instructions for building an image. The Dockerfile is a script to build and customize an image. Write the modifications, installations, builds, and operations of each layer into the script to solve problems such as volume and transparency of image construction. Building an image based on the Dockerfile uses the Dockerbuild command. This command builds an image through the Dockerfile and the Build Context.
[0026] Among them, the operation instructions configured in the Dockerfile file include the FROM instruction, RUN instruction, CMD instruction, LABEL instruction, EXPOSE instruction, ENV instruction, COPY instruction, ADD instruction, ENTRYPOINT instruction, VOLUME instruction, WORKDIR instruction, and other instructions (such as USER\ARG\SHELL).
[0027] S203. Run the Docker build instruction to build the corresponding contract image based on the contract file and the Dockerfile file, and complete the deployment of the smart contract.
[0028] S204. Preset the connection pool configuration information of the contract container, and add the connection pool configuration information to the contract image to obtain the contract image file.
[0029] Among them, the connection pool configuration information is used to set the size of the channel connection pool, that is, the number of channel connections between the accounting node and the contract container. According to the preset connection pool configuration information, a channel connection pool is established, so that the accounting node and the contract container can communicate in parallel through multiple communication channels in the channel connection pool, improving the communication efficiency between the accounting node and the contract container, and being able to efficiently process transaction scenarios with high throughput and high concurrency requirements.
[0030] Furthermore, in one embodiment, in step S3, building a contract container according to the contract image file, starting the contract container, establishing a channel connection pool, and establishing a multi-channel communication connection with the contract container by using the channel connection pool include, but are not limited to, the following sub-steps: S301. Start the contract engine, pull the contract image file, run the docker run instruction, build a contract container based on the contract image file, and start running the contract container at the same time; S302. According to the connection pool configuration information in the contract image file, use the contract container to establish a channel connection pool, and the channel connection pool contains multiple communication channels; S303. The accounting node determines the location of the contract container through the contract address, and establishes a multi-channel communication connection with the contract container through the channel connection pool.
[0031] Furthermore, in one embodiment, in step S5 of the present invention, obtaining a business request and sending a sub-contract call request to the contract container based on the business request and the sub-contract list includes: S501. The accounting node obtains the business requests submitted by the user, parses the business requests, and obtains the request parameters of the business requests. Among them, the business requests submitted by the user can be one or more. Since the accounting node and the contract container are connected through a channel connection pool, multiple business requests can be processed in parallel.
[0032] S502. Determine the sub-contract ID and method name to be called by the business request in the sub-contract list according to the request parameters. Among them, the request parameters of the business request usually carry a contract ID or a sub-contract ID, so the sub-contract to be called can be determined according to the request parameters of the business request.
[0033] S503. Generate a sub-contract call request according to the request parameters, sub-contract ID and method name, and send the sub-contract call request to the contract container.
[0034] Among them, there may be multiple sub-contract call requests. When sending requests through multiple communication channels of the channel connection pool, the contract container receives the requests in multiple communication channels through polling to achieve parallel communication.
[0035] Further, in one embodiment, in step S6 of the present invention, obtain the execution result returned by the contract container in response to the sub-contract call request, add a storage identifier to the execution result, and isolate and store the execution result with the storage identifier in the local database, including but not limited to the following sub-steps: S601. After receiving the sub-contract call request, the contract container calls the constructor method of the corresponding sub-contract according to the sub-contract ID and method name in the sub-contract call request, performs business processing according to the request parameters, and returns the execution result; S602. After the accounting node obtains the execution result, determine the storage identifier corresponding to the sub-contract according to the contract address and the sub-contract ID in the sub-contract call request; S603. Add the storage identifier to the execution result to obtain the execution result with the storage identifier, and isolate and store the execution result corresponding to the sub-contract in the local database according to the storage identifier, realizing data isolation of the execution result for subsequent data query.
[0036] Among them, when adding a storage identifier to the execution result, it can be achieved by adding fields, that is, adding fields of the contract address and sub-contract ID to the execution result.
[0037] Further, in one embodiment, the method of the embodiment of the present invention further includes: If the sub-contract call request received by the contract container does not include a sub-contract ID, call the general constructor method in the default sub-contract according to the method name in the sub-contract call request, perform business processing according to the request parameters, and return the execution result.
[0038] In the embodiment of the present invention, a preset business logic is split into multiple sub - contracts of smart contracts, and the multiple sub - contracts and system contracts are combined to form a contract file. Without independently constructing multiple smart contracts according to the business logic, the amount of contract code is reduced, and at the same time, the calling relationship of the contracts is simplified. At the same time, a contract image file can be further obtained through the contract file, and a contract container and a channel connection pool are constructed according to the contract image file, so that the accounting node can establish a multi - channel communication connection with the contract container through the channel connection pool, and send multiple business requests to the contract container in parallel for business processing, improving the execution efficiency and communication efficiency of the contract. Finally, the present application also adds a storage identifier to the execution result returned by the contract container, and isolates and stores the execution result with the storage identifier in the local database, facilitating the query of the execution result and reducing the data storage cost.
[0039] Example 2: Refer to Figure 2 As shown, the embodiment of the present invention also provides a deployment device for smart contracts, which is applied to an accounting node in a blockchain network and includes: A contract file writing module, configured to write multiple sub - contracts of smart contracts according to a preset business logic, and combine the multiple sub - contracts and system contracts to form a contract file; A contract image construction module, configured to construct a contract image based on the contract file, and configure preset connection pool information in the contract image to obtain a contract image file; A contract container construction module, configured to construct a contract container according to the contract image file, start the contract container, establish a channel connection pool, and establish a multi - channel communication connection with the contract container by using the channel connection pool; A system contract calling module, configured to send a system contract calling request to the contract container to obtain a list of sub - contracts in the contract container; A sub - contract calling module, configured to obtain a business request, and send a sub - contract calling request to the contract container based on the business request and the list of sub - contracts; An execution result storage module, configured to obtain the execution result returned by the contract container in response to the sub - contract calling request, add a storage identifier to the execution result, and isolate and store the execution result with the storage identifier in the local database.
[0040] The deployment device of the smart contract according to the embodiment of the present invention splits the preset business logic into multiple sub-contracts of the smart contract, and combines the multiple sub-contracts with the system contract to form a contract file. Without independently constructing multiple smart contracts according to the business logic, it reduces the contract code amount and simplifies the contract call relationship. At the same time, the device can further obtain a contract image file according to the contract file, and construct a contract container and a channel connection pool according to the contract image file, so that the accounting node can establish a multi-channel communication connection with the contract container through the channel connection pool, and send multiple business requests to the contract container in parallel for business processing, improving the execution efficiency and communication efficiency of the contract. Finally, the present application also adds a storage identifier to the execution result returned by the contract container, and isolates and stores the execution result with the storage identifier in the local database, which is convenient for querying the execution result and reduces the data storage cost.
[0041] Further, the embodiment of the present invention also provides an electronic device, including: One or more processors; A storage device for storing one or more programs, when the one or more programs are executed by the one or more processors, enabling the one or more processors to implement the deployment method of the smart contract in Embodiment 1.
[0042] Further, the embodiment of the present invention also provides a computer-readable medium, on which a computer program is stored, and when the computer program is executed by a processor, it implements the deployment method of the smart contract in Embodiment 1.
[0043] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions described in the embodiments of the present invention are generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that can be accessed by a computer, or a data storage device such as a server or data center that includes one or more integrated available media. The available medium can be a magnetic medium (such as a floppy disk, hard disk, magnetic tape), an optical medium (such as a DVD), or a semiconductor medium (such as a solid state disk (SSD)).
[0044] It should be noted that, in this document, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise", or any other variant thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or device that includes a series of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or device. Without further limitation, an element defined by the statement "including a..." does not exclude the existence of additional identical elements in the process, method, article, or device that includes the element.
[0045] Each embodiment in this specification is described in a related manner. The same or similar parts among the embodiments can be referred to each other, and the differences between each embodiment and other embodiments are emphasized. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the description of the method embodiment.
[0046] The above are only the preferred embodiments of the present invention and are not intended to limit the protection scope of the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present invention are all included in the protection scope of the present invention.
Claims
1. A deployment method for smart contracts, applied to accounting nodes in a blockchain network, characterized in that Including: Writing multiple sub - contracts of smart contracts according to preset business logics, and combining the multiple sub - contracts with system contracts to form a contract file; Constructing a contract image based on the contract file, and configuring preset connection pool information in the contract image to obtain a contract image file; Constructing a contract container according to the contract image file, starting the contract container, establishing a channel connection pool, and establishing a multi - channel communication connection with the contract container by using the channel connection pool; Sending a system contract call request to the contract container to obtain a list of sub - contracts in the contract container; Obtaining a business request, and sending a sub - contract call request to the contract container based on the business request and the sub - contract list; Obtaining the execution result returned by the contract container in response to the sub - contract call request, adding a storage identifier to the execution result, and isolating and storing the execution result with the storage identifier in a local database.
2. The deployment method of the smart contract according to claim 1, wherein The step of writing multiple sub - contracts of smart contracts according to preset business logics, and combining the multiple sub - contracts with system contracts to form a contract file includes: The accounting node writes smart contract code in a local development environment, writes multiple sub - contracts and system contracts in the smart contract code, and at the same time declares construction methods of multiple sub - contracts according to preset business logics to obtain smart contract code to be compiled; a default sub - contract is also included in the sub - contracts, and a general construction method is declared in the default sub - contract; Configuring a smart contract ID, a contract address, a sub - contract ID, and a method name of the construction method for the smart contract code to be compiled, and obtaining a corresponding contract file after packaging.
3. The deployment method of the smart contract according to claim 1, characterized in that The step of constructing a contract image based on the contract file, and configuring preset connection pool configuration information in the contract image to obtain a contract image file includes: Creating a contract directory and putting the contract file into the contract directory; Constructing a Dockerfile in the contract directory and configuring operation instructions in the Dockerfile; Running the Docker build instruction to construct a corresponding contract image based on the contract file and the Dockerfile; Presetting connection pool configuration information of the contract container, and adding the connection pool configuration information to the contract image to obtain a contract image file.
4. The deployment method of the smart contract according to claim 1, characterized in that, The step of constructing a contract container according to the contract image file, starting the contract container, establishing a channel connection pool, and establishing a multi - channel communication connection with the contract container by using the channel connection pool includes: Starting a contract engine, pulling the contract image file, running the docker run instruction to construct a contract container based on the contract image file, and at the same time starting and running the contract container; Establishing a channel connection pool by using the contract container according to the connection pool configuration information in the contract image file, and the channel connection pool contains multiple communication channels; The accounting node determines the location of the contract container through the contract address, and establishes a multi - channel communication connection with the contract container through multiple communication channels in the channel connection pool.
5. The deployment method of the smart contract according to claim 1, characterized in that, The step of obtaining a business request, and sending a sub - contract call request to the contract container based on the business request and the sub - contract list includes: The accounting node obtains the business request submitted by the user, and parses the business request to obtain the request parameters of the business request; Determine the sub - contract ID and method name to be called by the business request in the sub - contract list according to the request parameters; Generate a sub - contract call request according to the request parameters, sub - contract ID and method name, and send the sub - contract call request to the contract container.
6. The deployment method of the smart contract according to claim 1, wherein The obtaining of the execution result returned by the contract container in response to the sub - contract call request, adding a storage identifier to the execution result, and isolating and storing the execution result with the storage identifier in the local database includes: After receiving the sub - contract call request, the contract container calls the constructor method of the corresponding sub - contract according to the sub - contract ID and method name in the sub - contract call request, performs business processing according to the request parameters, and returns the execution result; After the accounting node obtains the execution result, determine the storage identifier corresponding to the sub - contract according to the contract address and the sub - contract ID in the sub - contract call request; Add the storage identifier to the execution result to obtain an execution result with a storage identifier, and isolate and store the execution result corresponding to the sub - contract in the local database according to the storage identifier.
7. The deployment method of the smart contract according to claim 6, wherein, It further includes: If the sub - contract call request received by the contract container does not contain a sub - contract ID, call the general constructor method in the default sub - contract according to the method name in the sub - contract call request, perform business processing according to the request parameters, and return the execution result.
8. A deployment device for a smart contract, which is applied to an accounting node in a blockchain network, and is characterized in that It includes: A contract file writing module, used to write multiple sub - contracts of the smart contract according to the preset business logic, and combine the multiple sub - contracts with the system contract to form a contract file; A contract image building module, builds a contract image according to the contract file, and configures preset connection pool information in the contract image to obtain a contract image file; A contract container building module, used to build a contract container according to the contract image file, start the contract container, establish a channel connection pool, and establish a multi - channel communication connection with the contract container by using the channel connection pool; A system contract call module, used to send a system contract call request to the contract container and obtain the list of sub - contracts in the contract container; A sub - contract call module, used to obtain a business request, and send a sub - contract call request to the contract container based on the business request and the sub - contract list; An execution result storage module, used to obtain the execution result returned by the contract container in response to the sub - contract call request, add a storage identifier to the execution result, and isolate and store the execution result with the storage identifier in the local database.
9. An electronic device, characterized in that, It includes: One or more processors; A storage device, used to store one or more programs, when the one or more programs are executed by the one or more processors, enabling the one or more processors to implement the deployment method of the smart contract as described in any one of claims 1 to 7.
10. A computer-readable medium having a computer program stored thereon, characterized in that, The computer program, when executed by the processor, implements the deployment method of the smart contract as described in any one of claims 1 to 7.