Blockchain system deployment method, apparatus, medium, and electronic device

By adopting a modular blockchain node deployment method, script modules from the script module library are obtained and applied to automate the deployment of blockchain nodes, solving the problem of low automation in existing technologies and improving deployment efficiency and automation rate.

CN115563205BActive Publication Date: 2026-02-06TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110750894.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-07-01
Publication Date
2026-02-06
Estimated Expiration
2041-07-01

AI Technical Summary

Technical Problem

Existing blockchain node deployment solutions have low levels of automation, which affects deployment efficiency.

Method used

By acquiring blockchain node information, the corresponding script modules are obtained from the script module library and deployed according to the node information. This supports the reusability and batch configuration of script modules, enabling modular deployment.

Benefits of technology

It improves the deployment efficiency of blockchain systems, increases automation rates, and reduces deployment time and labor costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115563205B_ABST
    Figure CN115563205B_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a blockchain system deployment method, device, medium and electronic equipment. The blockchain system deployment method comprises: obtaining information of a blockchain node to be configured in a blockchain system; obtaining a script module corresponding to the blockchain node to be configured from a script module library according to the information of the blockchain node to be configured, the script module library containing a plurality of script modules of the blockchain system, each script module corresponding to a deployment process; and deploying the blockchain node to be configured according to the script module corresponding to the blockchain node to be configured. The technical solution of the embodiments of the present application can improve the deployment efficiency of the blockchain system.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of computers and communications, in particular to a deployment method and device of a blockchain system, a medium and an electronic device. BACKGROUND

[0002] In the deployment scheme of the blockchain node proposed by the related art, the server node is usually determined manually, and then the related script is written, the script command is manually triggered according to the manually planned deployment steps. Such a deployment method has low automation degree, and seriously affects the deployment efficiency of the blockchain system. SUMMARY

[0003] Embodiments of the present application provide a deployment method, device, medium and electronic device of a blockchain system, thereby at least to some extent improving the deployment efficiency of the blockchain system.

[0004] Other features and advantages of the present application will become apparent from the following detailed description, or will be learned by practice of the present application.

[0005] According to an aspect of an embodiment of the present application, a deployment method of a blockchain system is provided, comprising: obtaining information of a blockchain node to be configured in a blockchain system; obtaining a script module corresponding to the blockchain node to be configured from a script module library according to the information of the blockchain node to be configured, the script module library containing a plurality of script modules of the blockchain system, each script module corresponding to a deployment process; and deploying the blockchain node to be configured according to the script module corresponding to the blockchain node to be configured.

[0006] According to an aspect of an embodiment of the present application, a deployment device of a blockchain system is provided, comprising: an obtaining unit configured to obtain information of a blockchain node to be configured in a blockchain system; a first processing unit configured to obtain a script module corresponding to the blockchain node to be configured from a script module library according to the information of the blockchain node to be configured, the script module library containing a plurality of script modules of the blockchain system, each script module corresponding to a deployment process; and a second processing unit configured to deploy the blockchain node to be configured according to the script module corresponding to the blockchain node to be configured.

[0007] In some embodiments of the present application, based on the foregoing scheme, the deployment device of the blockchain system further comprises: a grouping unit configured to group the blockchain nodes according to the information of the blockchain nodes to obtain at least one node group; and a generating unit configured to generate a configuration script for a specified node group, the configuration script being used for batch configuring parameters of the blockchain nodes in the specified node group.

[0008] In some embodiments of the present application, based on the foregoing scheme, the configuration script contains a specified field, and the specified field contains parameters of the blockchain node that needs to be configured in batches.

[0009] In some embodiments of the present application, based on the foregoing scheme, the second processing unit is configured to generate a deployment file according to the script module corresponding to the blockchain node to be configured in the blockchain system, and the deployment file contains information of the node group to which the blockchain node to be configured belongs; and execute the deployment file to deploy the blockchain node to be configured.

[0010] In some embodiments of the present application, based on the foregoing scheme, the second processing unit is further configured to add network address information of the blockchain node to be configured in the deployment file if the node group to which the blockchain node to be configured belongs contains multiple blockchain nodes.

[0011] In some embodiments of the present application, based on the foregoing scheme, the second processing unit is configured to generate a deployment file according to information of the blockchain node to be configured in the blockchain system, and the deployment file contains a task field of each blockchain node to be configured; and add the script module corresponding to each blockchain node to the task field of each blockchain node in the deployment file.

[0012] In some embodiments of the present application, based on the foregoing scheme, the deployment device of the blockchain system further comprises a testing unit configured to test the blockchain service contained in the blockchain system after deploying the blockchain node to be configured according to the script module corresponding to the blockchain node to be configured, and obtain a test result of the blockchain system.

[0013] In some embodiments of the present application, based on the foregoing scheme, the testing unit is further configured to generate a test report according to the test result after the testing of the blockchain system is completed; and display the test report.

[0014] In some embodiments of the present application, based on the foregoing scheme, the testing unit is configured to display a test report presentation interface, display the test report on the test report presentation interface, and the test report presentation interface contains information of each blockchain service tested, test case information of each blockchain service, and test result of each blockchain service.

[0015] In some embodiments of the present application, based on the foregoing scheme, the second processing unit is configured to: if the deployment of the target script module corresponding to the to-be-configured blockchain node fails, perform a rollback operation on the deployment process of the target script module.

[0016] In some embodiments of the present application, based on the foregoing scheme, the execution process of the script module supports idempotency.

[0017] In some embodiments of the present application, based on the foregoing scheme, the deployment device of the blockchain system further comprises a third processing unit configured to generate a plurality of script modules of the blockchain system according to a deployment flow of a blockchain node in the blockchain system at the time of deployment, and store the plurality of script modules into the script module library.

[0018] According to an aspect of an embodiment of the present application, there is provided a computer readable medium having stored thereon a computer program which, when executed by a processor, implements the deployment method of the blockchain system as described in the above embodiments.

[0019] According to an aspect of an embodiment of the present application, there is provided an electronic device comprising: 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 deployment method of the blockchain system as described in the above embodiments.

[0020] According to an aspect of an embodiment of the present application, there is provided a computer program product or computer program comprising computer instructions stored in a computer readable storage medium. A processor of a computer device reads the computer instructions from the computer readable storage medium, and the processor executes the computer instructions to cause the computer device to perform the deployment method of the blockchain system provided in the various optional embodiments described above.

[0021] In the technical scheme provided in some embodiments of the present application, by obtaining the script module corresponding to the to-be-configured blockchain node from the script module library according to the information of the to-be-configured blockchain node, and the script module library containing a plurality of script modules of the blockchain system, each script module corresponding to a deployment flow, and then deploying the to-be-configured blockchain node according to the script module corresponding to the to-be-configured blockchain node, the deployment process of the blockchain system can be modularized, and then the corresponding script module can be obtained according to the information of the to-be-configured blockchain node at the time of deployment to directly perform deployment, which realizes the reusability of the script module and is conducive to improving the deployment efficiency of the blockchain system.

[0022] It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the application, as claimed. BRIEF DESCRIPTION OF DRAWINGS

[0023] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the application and serve to explain the principles of the application. It is readily apparent to one skilled in the art that the following figures are merely some embodiments of the present application and other figures can be obtained by one of ordinary skill in the art without any creative work under the premise that the following description of the figures is merely illustrative and explanatory. In the drawings:

[0024] Figure 1 A structural diagram of a blockchain network is shown.

[0025] Figure 2 A connection relationship diagram of blocks in a blockchain is shown.

[0026] Figure 3 A schematic diagram of an exemplary system architecture to which the technical solutions of embodiments of the present application can be applied is shown.

[0027] Figure 4 A flowchart of a deployment method of a blockchain system according to an embodiment of the present application is shown.

[0028] Figure 5 A flowchart of a deployment method of a blockchain system according to an embodiment of the present application is shown.

[0029] Figure 6 A script module list diagram of a node according to an embodiment of the present application is shown.

[0030] Figure 7 A presentation interface diagram of a test report according to an embodiment of the present application is shown.

[0031] Figure 8 A whole flowchart of a deployment scheme of a blockchain system according to an embodiment of the present application is shown.

[0032] Figure 9 A block diagram of a deployment device of a blockchain system according to an embodiment of the present application is shown.

[0033] Figure 10 A structural schematic diagram of a computer system of an electronic device suitable for implementing embodiments of the present application is shown. DETAILED DESCRIPTION

[0034] Example implementations will now be described more fully with reference to the accompanying drawings. Example implementations can be implemented in any

[0035] Moreover, the described features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a thorough understanding of embodiments of the application. One skilled in the relevant art will recognize, however, that the

[0036] The block diagrams in the drawings show only the functional blocks, and not necessarily the physical arrangement of the entities. That is, the functional blocks can be implemented in software, or in one or more hardware modules or integrated circuits, or in different network and / or processor devices and / or microcontroller devices.

[0037] The flow diagrams shown in the drawings are merely examples and not necessarily to be construed as having all content and operations / steps, nor necessarily to be executed in the order described. For example, some operations / steps can be further divided, and some operations / steps can be combined or partially combined, so that the actual execution order can be changed according to actual conditions.

[0038] It should be noted that "multiple" referred to herein means two or more. The association relationship of "and / or" described in association with the associated objects means that there can be three relationships, for example, A and / or B can represent three cases of A alone, A and B together, and B alone. The character " / " generally represents that the associated objects before and after are in an "or" relationship.

[0039] In the blockchain node deployment scheme proposed by the related art, after the server nodes are manually determined, a related script is written, the script command is manually triggered according to the manually planned deployment steps, and the deployment method has low automation, which seriously affects the deployment efficiency of the blockchain system. Based on this, the embodiments of the present application provide a new deployment scheme of the blockchain system, which realizes the reusability of the script module and is conducive to improving the deployment efficiency of the blockchain system. Before introducing the technical scheme of the embodiments of the present application, the blockchain technology involved in the embodiments of the present application is introduced.

[0040] Blockchain is a new application mode of distributed data storage, peer-to-peer transmission, consensus mechanism, encryption algorithm and other computer technologies. Blockchain is essentially a decentralized database, which is a series of data blocks (blocks) associated using cryptographic methods, each of which contains information about a batch of network transactions, used to verify the validity of the information (anti-fake) and generate the next block. Blockchain can include a blockchain underlying platform, a platform product service layer, and an application service layer.

[0041] The blockchain underlying platform can include user management, basic services, smart contracts, and operation detection processing modules. Among them, the user management module is responsible for the identity information management of all blockchain participants, including maintaining the generation of public and private keys (account management), key management, and the maintenance of the correspondence between the real identity of the user and the blockchain address (permission management), etc., and under authorization, supervises and audits the transaction situation of certain real identities, provides rule configuration for risk control (risk audit); the basic service module is deployed on all blockchain node devices to verify the validity of business requests, and after consensus, the valid requests are recorded on the storage. For a new business request, the basic service first parses and authenticates the interface (interface adaptation), then encrypts the business information through a consensus algorithm (consensus management), and after encryption, the complete and consistent transmission is transmitted to the shared ledger (network communication) and recorded and stored; the smart contract module is responsible for the registration and issuance of contracts, as well as the triggering and execution of contracts. Developers can define contract logic through a certain programming language, publish it to the blockchain (contract registration), call keys or other event triggers for execution according to the logic of the contract terms, complete the contract logic, and also provide contract upgrade and cancellation functions; the operation detection module is mainly responsible for the deployment, configuration modification, contract setting, cloud adaptation during product release, and real-time state visualization output during product operation, such as alarms, network detection, node device health state detection, etc.

[0042] The platform product service layer provides basic capabilities and implementation frameworks for typical applications. Developers can add business features based on these basic capabilities to complete the blockchain implementation of business logic. The application service layer provides application services based on the blockchain solution for business participants to use.

[0043] As mentioned above, blockchain is essentially a decentralized database, and blockchain is maintained by nodes in the blockchain network. For example, in the Bitcoin network, each node in the network maintains a copy of the entire blockchain, and the entire network collaborates to maintain the integrity of the blockchain. Figure 1The blockchain network shown can include a plurality of nodes 101, which can be various clients forming the blockchain network. Each node 101 can receive input information during normal operation and maintain shared data within the blockchain network based on the received input information. To ensure information exchange within the blockchain network, each node in the blockchain network can have an information connection between nodes, and information can be transmitted between nodes through the information connection. For example, when any node in the blockchain network receives input information, other nodes in the blockchain network obtain the input information according to a consensus algorithm, store the input information as shared data, and ensure that the data stored on all nodes in the blockchain network is consistent.

[0044] Each node in the blockchain network has a corresponding node identifier, and each node in the blockchain network can store the node identifiers of other nodes to subsequently broadcast generated blocks to other nodes in the blockchain network according to the node identifiers of other nodes. Each node can maintain a node identifier list, and the node name and node identifier are stored in the node identifier list. The node identifier can be an IP (Internet Protocol) address or any other information that can be used to identify the node.

[0045] Each node in the blockchain network stores a same blockchain. The blockchain is composed of a plurality of blocks, as shown in Figure 2 As shown, the blockchain is composed of a plurality of blocks, the genesis block includes a block header and a block body, the block header stores input information characteristic values, version numbers, timestamps, and difficulty values, and the block body stores input information; the next block of the genesis block takes the genesis block as the parent block, the next block also includes a block header and a block body, the block header stores input information characteristic values of the current block, block header characteristic values of the parent block, version numbers, timestamps, and difficulty values, and so on, so that the block data stored in each block in the blockchain is associated with the block data stored in the parent block, ensuring the security of the input information in the block.

[0046] The nodes in the blockchain network can be servers or terminal devices. The server can be a standalone physical server, a server cluster or a distributed system composed of multiple physical servers, a cloud server providing basic cloud computing services such as cloud service, cloud database, cloud computing, cloud function, cloud storage, network service, cloud communication, middleware service, domain name service, security service, CDN (Content Delivery Network), and big data and artificial intelligence platform, etc. The terminal device can be a smart phone, a tablet computer, a notebook computer, a desktop computer, a smart speaker, a smart watch, etc., but is not limited thereto. The nodes can be directly or indirectly connected through wired or wireless communication, which is not limited in the present application.

[0047] Based on the foregoing introduction of the blockchain technology and the problems existing in the related art, the embodiments of the present application provide a new deployment scheme of a blockchain system. Specifically, in one application scenario of the present application, as shown in Figure 3 The electronic device 301, the script module library 302, the deployment server 303, and the test server 304 are mainly included.

[0048] In one embodiment of the present application, the deployment personnel can use the electronic device 301 to generate a plurality of script modules of the blockchain system according to the deployment process of the blockchain nodes in the blockchain system at the time of deployment in advance, and then store the generated plurality of script modules in the script module library 302. In this way, the script module library 302 stores a plurality of script modules of the blockchain system, and each script module corresponds to a deployment process.

[0049] When the deployment of the to-be-configured blockchain node in the blockchain system is needed, the deployment server 303 can obtain the information of the to-be-configured blockchain node, then obtain the script module corresponding to the to-be-configured blockchain node from the script module library 302 according to the information of the to-be-configured blockchain node, and further deploy the to-be-configured blockchain node according to the script module corresponding to the to-be-configured blockchain node. After the deployment of the to-be-configured blockchain node, the test server 304 can test the blockchain service included in the blockchain system to obtain the test result of the blockchain system. It can be seen that the technical scheme of the embodiments of the present application can modularize the deployment process of the blockchain system, and then the corresponding script module can be obtained according to the information of the to-be-configured blockchain node for direct deployment at the time of deployment, which realizes the reusability of the script module and is beneficial to improving the deployment efficiency of the blockchain system.

[0050] The implementation details of the technical scheme of the embodiments of the present application are described in detail as follows:

[0051] Figure 4 A flowchart of a deployment method of a blockchain system according to an embodiment of the present application is shown, which can be executed by an electronic device, which can be a server. Referring to Figure 4 The deployment method of the blockchain system includes at least steps S410-S430, which are described in detail as follows:

[0052] In step S410, information of a blockchain node to be configured in the blockchain system is acquired.

[0053] In an embodiment of the present application, the blockchain node to be configured in the blockchain system can be all the blockchain nodes in the blockchain system, or part of the blockchain nodes.

[0054] In step S420, according to the information of the blockchain node to be configured, a script module corresponding to the blockchain node to be configured is acquired from a script module library, the script module library containing a plurality of script modules of the blockchain system, each script module corresponding to a deployment process.

[0055] In an embodiment of the present application, a plurality of script modules of the blockchain system can be generated in advance according to the deployment process of the blockchain node in the blockchain system when deployed, and then the plurality of script modules are stored in the script module library, thereby realizing the reusability of the script module.

[0056] In step S430, the blockchain node to be configured is deployed according to the script module corresponding to the blockchain node to be configured.

[0057] In an embodiment of the present application, a deployment file can be generated according to the information of the blockchain node to be configured in the blockchain system, the deployment file containing a task field of each blockchain node to be configured, and then the script module corresponding to each blockchain node is added to the task field of each blockchain node in the deployment file, thereby the deployment of the blockchain node to be configured can be realized by executing the deployment file.

[0058] In an embodiment of the present application, the blockchain nodes can be grouped according to the information of the blockchain nodes to obtain at least one node group, and then a configuration script for a specified node group can be generated, which is used to batch configure the parameters of the blockchain nodes in the specified node group. The technical solution of this embodiment makes it possible to batch configure the parameters of the blockchain nodes in the same node group through the configuration script for a certain node group, solving the problem of low efficiency caused by separate configuration of each node.

[0059] Optionally, the configuration script for the node group can contain a specified field containing parameters of the blockchain nodes that need to be configured in batches, so that the parameters of the blockchain nodes that need to be configured in batches can be contained in the specified field to achieve batch configuration of the parameters of the blockchain nodes in the same node group.

[0060] In an embodiment of the present application, if the blockchain nodes are grouped, the process of deploying the blockchain nodes to be configured according to the script module corresponding to the blockchain nodes to be configured can be: generating a deployment file according to the script module corresponding to the blockchain nodes to be configured in the blockchain system, the deployment file containing information of the node group to which the blockchain nodes to be configured belong, and then executing the deployment file to deploy the blockchain nodes to be configured. This embodiment contains the information of the node group to which the blockchain nodes belong in the deployment file, so that the blockchain nodes can be configured in batches through the configuration script corresponding to the node group.

[0061] Optionally, if the node group to which the blockchain nodes to be configured belong contains multiple blockchain nodes, the network address information of the blockchain nodes to be configured can be added in the deployment file. The technical solution of this embodiment makes it clear which blockchain nodes to be configured through the network address information in the case of containing multiple blockchain nodes in the same node group.

[0062] It should be noted that: since the same node group contains multiple blockchain nodes, the network address information of the blockchain nodes to be configured and the node group to which they belong are added in the deployment file, so that different blockchain nodes in the same node group can be deployed in different blockchain systems, in which case the blockchain nodes can also be configured in batches through the configuration script corresponding to the node group.

[0063] In an embodiment of the present application, after the blockchain nodes to be configured are deployed according to the script module corresponding to the blockchain nodes to be configured, the blockchain services contained in the blockchain system can be tested to obtain the test results of the blockchain system.

[0064] In an embodiment of the present application, after the testing of the blockchain system is completed, a test report is generated according to the test results and displayed. Optionally, such as a test report presentation interface can be displayed, the test report is displayed on the test report presentation interface, and the test report presentation interface contains information of each blockchain service tested, test case information of each blockchain service, and test results of each blockchain service. The technical solution of this embodiment enables the tester to view the test result information of each blockchain service through the visual test report presentation interface.

[0065] In an embodiment of the present application, if the deployment of the blockchain node fails according to the target script module corresponding to the blockchain node to be configured, a rollback operation can be performed on the deployment process of the target script module to facilitate redeployment. In addition, the execution process of the script module of the blockchain node can support idempotency, that is, the result is consistent no matter how many times it is executed, thereby ensuring smooth redeployment.

[0066] The following describes the technical solutions of the embodiments of the present application in combination with Figures 5 to 8 The technical solutions of the embodiments of the present application are described in detail as follows:

[0067] Figure 5 A flowchart of a test method of a blockchain system according to an embodiment of the present application is shown, as shown in the figure, the test method of the blockchain system includes the following steps: Figure 5

[0068] In step S510, server node information is obtained. Specifically, the server node is a blockchain node, and the machine information of the blockchain node to be tested can be submitted to an automated deployment platform. The machine information of the blockchain node includes an IP address, a port, a username, and a user password, etc. The machine information is used for the automated deployment platform to connect to the server node through an SSH (Secure Shell) protocol to execute a deployment script.

[0069] Before deployment, the deployment process of the server node can be modularized by writing a script to divide the whole into parts, so as to realize the reusability of the deployment script by freely splicing the script modules.

[0070] In step S520, the nodes are grouped.

[0071] Specifically, a host file (a kind of system file) can be written to freely group according to requirements, for example:

[0072] [test_blockchain_node1]

[0073] 192.168.0.xx1 ansible_ssh_port=xx1

[0074] 192.168.0.xx2 ansible_ssh_port=xx2

[0075] [test_blockchain_node2]

[0076] 192.168.0.xx3 ansible_ssh_port=xx3

[0077] [test_blockchain_node3]​

[0078] 192.168.0.xx4 ansible_ssh_port=xx4

[0079] 192.168.0.xx5 ansible_ssh_port=xx5

[0080] In this example, the server nodes are divided into 3 groups, the first group "test_blockchain_node1" contains two server nodes, whose IP addresses are 192.168.0.xx1, 192.168.0.xx2 respectively, and the SSH ports are xx1, xx2 respectively. The second group "test_blockchain_node2" contains one server node, whose IP address is 192.168.0.xx3, and the SSH port is xx3. The third group "test_blockchain_node3" contains two server nodes, whose IP addresses are 192.168.0.xx4, 192.168.0.xx5 respectively, and the SSH ports are xx4, xx5 respectively.

[0081] It should be noted that the number of server nodes in different groups can be set according to actual needs. After the grouping is completed, a yaml (a kind of data format) script for a certain group can be written, and then the parameter configuration operation through the yaml script will take effect on all IP in the group.

[0082] Step S530, a script module corresponding to the group is written. The script module can be a yaml script, and each node can freely divide the module according to needs, and support parameterization. As shown in Figure 6 Each node under the tasks directory has several files ending with ".yml" which are script modules, each script module corresponds to an execution step, and the modules under different nodes can be freely combined and spliced to realize the reusability of the script module and improve the configuration efficiency of the node.

[0083] Step S540, a deployment file is written and deployment is implemented. Specifically, a main deployment file can be written, in which the server nodes to be configured are specified, and then the deployment of the nodes is realized through the main deployment file. Optionally, the group information of the server nodes can be added in the main deployment file, so as to realize batch configuration through the configuration script of the group.

[0084] After the deployment is completed, the execution of the automatic test case can be triggered, and the detection indexes of each measured blockchain node are collected in the test process.

[0085] Step S550, a test report is generated.

[0086] Specifically, after the test is completed, a corresponding test report can be generated for the developer or tester to locate the problem. Optionally, the presentation interface of the test report can be as shown in Figure 7 The left side of the interface can display different report types for the developer or tester to select, and the right side of the interface can present the specific test report content, such as test environment, project name, test time, test case type, description information of the tested blockchain service, test type, test result, etc.

[0087] Step S560, problem positioning based on the test report.

[0088] Figure 8 The overall flowchart of the deployment scheme of the blockchain system according to an embodiment of the present application is shown. Specifically, it includes a blockchain product test submission stage 810, a distributed deployment and test stage 820, a release stage 830, and a reuse stage 840.

[0089] In the blockchain product test submission stage 810, after the development of the blockchain product is completed, each simulation involved in the blockchain product is submitted to the test platform for distribution and audit. After the audit is passed, the test process is entered. The test platform can be used to manage the software version development, test submission, defect submission, regression testing, and release throughout the life cycle.

[0090] In the distributed deployment and test stage 820, a script module for modular deployment needs to be written for on-demand free combination (as shown in Figure 6 The main deployment file is written and executed. After the deployment is completed, the automated case execution is triggered, and the detection indicators are collected for abnormal alarm and problem positioning during the test process.

[0091] For the nodes in the same group, the corresponding configuration script can be written to achieve one modification of the parameters and everywhere effective. For example, a parameterized field can be set, the parameters that need to be modified in batches are put into the parameterized field, and then the jinja2 template library based on python is used to realize the function of one modification of the parameter variable and everywhere effective.

[0092] In the release stage 830, after the test is completed, the blockchain product can be released for review, and a test report can be generated. After the review and test are correct, it can be released online.

[0093] If it needs to be deployed again, the previous script module can be reused in the reuse stage 840 for on-demand deployment. At the same time, the script module can also perform rollback operation when interruption occurs during the deployment process (such as execution failure), and can support idempotency.

[0094] The technical solution of the embodiment of the application can modularize the deployment process of the distributed node before deployment, divide the whole into parts, freely splice script modules to implement deployment, and can parameterize the configuration parameters of the distributed node, implement the purpose of modifying in one place and taking effect everywhere, and can perform rollback operation when execution fails, repeated execution, and support idempotency. Overall, the technical solution of the embodiment of the application can greatly improve the deployment efficiency of the blockchain node, improve the deployment automation rate, increase the script reuse rate, and reduce the time cost and human loss of deployment.

[0095] The following describes the device embodiment of the application, which can be used to execute the deployment method of the blockchain system in the above-mentioned embodiments of the application. For details not disclosed in the device embodiment of the application, refer to the above-mentioned embodiment of the test method of the blockchain system.

[0096] Figure 9 A block diagram of a blockchain system deployment device according to an embodiment of the application is shown, which can be arranged in an electronic device, which can be a server.

[0097] Referring to Figure 9 As shown in the figure, the blockchain system deployment device 900 according to an embodiment of the application includes an acquisition unit 902, a first processing unit 904, and a second processing unit 906.

[0098] The acquisition unit 902 is configured to acquire information of a blockchain node to be configured in a blockchain system; the first processing unit 904 is configured to acquire a script module corresponding to the blockchain node to be configured from a script module library according to the information of the blockchain node to be configured, the script module library containing a plurality of script modules of the blockchain system, each script module corresponding to a deployment flow; and the second processing unit 906 is configured to deploy the blockchain node to be configured according to the script module corresponding to the blockchain node to be configured.

[0099] In some embodiments of the application, based on the foregoing scheme, the blockchain system deployment device 900 further includes a grouping unit configured to group the blockchain nodes according to the information of the blockchain nodes to obtain at least one node group; and a generation unit configured to generate a configuration script for a specified node group, the configuration script being used for batch configuration of parameters of the blockchain nodes in the specified node group.

[0100] In some embodiments of the application, based on the foregoing scheme, the configuration script contains a specified field, and the specified field contains parameters of the blockchain nodes that need to be batch configured.

[0101] In some embodiments of the present application, based on the foregoing scheme, the second processing unit 906 is configured to generate a deployment file according to the script module corresponding to the to-be-configured blockchain node in the blockchain system, and the deployment file contains information of the node group to which the to-be-configured blockchain node belongs; and execute the deployment file to deploy the to-be-configured blockchain node.

[0102] In some embodiments of the present application, based on the foregoing scheme, the second processing unit 906 is further configured to, if the node group to which the to-be-configured blockchain node belongs contains a plurality of blockchain nodes, add network address information of the to-be-configured blockchain node in the deployment file.

[0103] In some embodiments of the present application, based on the foregoing scheme, the second processing unit 906 is configured to generate a deployment file according to information of the to-be-configured blockchain node in the blockchain system, and the deployment file contains a task field of each to-be-configured blockchain node; and add the script module corresponding to each to-be-configured blockchain node to the task field of each to-be-configured blockchain node in the deployment file.

[0104] In some embodiments of the present application, based on the foregoing scheme, the deployment device 900 of the blockchain system further includes a test unit configured to test the blockchain service contained in the blockchain system after the to-be-configured blockchain node is deployed according to the script module corresponding to the to-be-configured blockchain node, to obtain a test result of the blockchain system.

[0105] In some embodiments of the present application, based on the foregoing scheme, the test unit is further configured to generate a test report according to the test result after the test of the blockchain system is completed; and display the test report.

[0106] In some embodiments of the present application, based on the foregoing scheme, the test unit is configured to display a test report presentation interface, display the test report on the test report presentation interface, and the test report presentation interface contains information of each blockchain service tested, test case information of each blockchain service, and a test result of each blockchain service.

[0107] In some embodiments of the present application, based on the foregoing scheme, the second processing unit 906 is configured to, if the deployment of the to-be-configured blockchain node according to the target script module corresponding to the to-be-configured blockchain node fails, perform a rollback operation on the deployment process of the target script module.

[0108] In some embodiments of the present application, based on the foregoing scheme, the execution process of the script module supports idempotency.

[0109] In some embodiments of the present application, based on the foregoing scheme, the deployment apparatus 900 of the blockchain system further includes a third processing unit configured to generate a plurality of script modules of the blockchain system according to a deployment procedure of a blockchain node in the blockchain system at the time of deployment, and store the plurality of script modules into the script module library.

[0110] Figure 10 A structural schematic diagram of a computer system of an electronic device suitable for implementing embodiments of the present application is shown.

[0111] It should be noted that, Figure 10 The computer system 1000 of the electronic device shown is only an example and should not impose any limitation on the functions and use range of embodiments of the present application.

[0112] As Figure 10 shown, the computer system 1000 includes a central processing unit (CPU) 1001 which can perform various appropriate actions and processes, such as executing the methods described in the above embodiments, according to programs stored in a read-only memory (ROM) 1002 or loaded from a storage section 1008 into a random access memory (RAM) 1003. Various programs and data required for system operation are also stored in the RAM 1003. The CPU 1001, the ROM 1002, and the RAM 1003 are connected to each other through a bus 1004. An input / output (I / O) interface 1005 is also connected to the bus 1004.

[0113] The following components are connected to the I / O interface 1005: an input section 1006 including a keyboard, a mouse, etc.; an output section 1007 including a display such as a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 1008 including a hard disk, etc.; and a communication section 1009 including a network interface card such as a LAN (Local Area Network) card, a modem, etc. The communication section 1009 performs communication processing via a network such as the Internet. A drive 1010 is also connected to the I / O interface 1005 as necessary. A removable recording medium 1011 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc. is attached to the drive 1010 as necessary, so that a computer program read therefrom is installed into the storage section 1008 as necessary.

[0114] In particular, the processes described above with reference to the flow charts can be implemented as computer software programs in accordance with the embodiments of the present application. For example, the embodiments of the present application include a computer program product comprising a computer program carried on a computer readable medium, the computer program containing instructions for carrying out the methods illustrated by the flow charts. In such embodiments, the computer program can be downloaded and installed from a network by the communication section 1009, and / or installed from the detachable medium 1011. When the computer program is executed by the central processing unit (CPU) 1001, various functions defined in the system of the present application are executed.

[0115] It should be noted that the computer readable medium shown in the embodiments of the present application can be a computer readable signal medium or a computer readable storage medium or any combination of the two. The computer readable storage medium may, for example, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or apparatus, or any combination of the above. More specific examples of the computer readable storage medium can include, but are not limited to, an electrical connection having one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a portable compact disk read-only memory (Compact Disc Read-Only Memory, CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, the computer readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, device or apparatus. In the present application, the computer readable signal medium can include a data signal carried in a baseband or as a part of a carrier wave, which carries computer readable computer programs. Such a propagated data signal can take many forms, including but not limited to an electromagnetic signal, an optical signal or any suitable combination of the above. The computer readable signal medium can also be any computer readable medium other than the computer readable storage medium, which can send, propagate or transmit programs for use by or in conjunction with an instruction execution system, device or apparatus. The computer programs contained on the computer readable medium can be transmitted by any suitable medium, including but not limited to wireless, wired, or the like, or any suitable combination of the above.

[0116] The flowcharts and block diagrams in the drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowcharts or block diagrams can represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical functions. It should also be noted that in some alternative implementations, the functions noted in the blocks can occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently or the blocks can sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and / or flowchart illustrations, and combinations thereof, can be implemented by a dedicated hardware-based system that performs the specified functions or operations, or combinations of hardware and software.

[0117] The units described in the embodiments of the present application can be implemented by software, or by hardware, or by a combination of software and hardware. The units described may

[0118] As another aspect, the present application also provides a computer readable medium, which can be included in the electronic device described in the above embodiments, or can exist separately without being assembled into the electronic device. The computer readable medium carries one or more programs, which, when executed by the electronic device, cause the electronic device to implement the method described in the above embodiments.

[0119] It should be noted that although several modules or units of the device for action execution are mentioned in the above detailed description, the division is not mandatory. In fact, according to the embodiments of the present application, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided into a plurality of modules or units.

[0120] From the above description of the embodiments, those skilled in the art will readily appreciate that the example embodiments described herein can be implemented by software and / or by hardware coupled with software. Accordingly, the technical solutions according to the embodiments of the present application can be embodied in the form of a software product. The software product can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, or the like) or on a network, and includes a number of instructions for causing a computing device (which can be a personal computer, a server, a touch terminal, or a network device, etc.) to perform the methods according to the embodiments of the present application.

[0121] Other embodiments of the application will be apparent to those skilled in the art from consideration of the specification and practice of the features disclosed herein. It is intended that the application embrace any and all variations of the present application that fall within the scope of the general inventive concept as defined by the appended claims and their equivalents. It is intended that the application encompass all such variations as fall within the scope of the appended claims and their equivalents.

[0122] It is to be understood that the application is not limited to the precise construction here described and illustrated in the accompanying drawings, and that various modifications and changes can be made by those skilled in the art without departing from the scope of the application. The scope of the application should only be limited by the appended claims.

Claims

1. A method for deploying a blockchain system, characterized in that, The method comprises the following steps: obtaining information of a blockchain node to be configured in a blockchain system; the information of the blockchain node comprises machine information of the blockchain node, and the machine information comprises at least one of an IP address, a port, a username, and a user password; obtaining a script module corresponding to the blockchain node to be configured from a script module library according to the information of the blockchain node to be configured, wherein the script module library comprises a plurality of script modules of the blockchain system, and each script module corresponds to a deployment process; generating a deployment file according to the information of the blockchain node to be configured in the blockchain system, wherein the deployment file comprises a task field of each blockchain node to be configured; adding the script module corresponding to each blockchain node to the task field of each blockchain node in the deployment file; executing the deployment file to deploy the blockchain node to be configured.

2. The method of claim 1, wherein, The method further comprises the following steps: grouping the blockchain nodes according to the information of the blockchain nodes to obtain at least one node group; generating a configuration script for a specified node group, wherein the configuration script is used for batch configuring parameters of the blockchain nodes in the specified node group.

3. The method of claim 2, wherein, The configuration script comprises a specified field, and the specified field comprises parameters of the blockchain nodes to be batch configured.

4. The method of claim 2, wherein, The deployment file comprises information of the node group to which the blockchain node to be configured belongs.

5. The method of claim 4, wherein, The method further comprises the following steps: if the node group to which the blockchain node to be configured belongs comprises a plurality of blockchain nodes, adding network address information of the blockchain node to be configured in the deployment file.

6. The method of claim 1, wherein, After the blockchain node to be configured is deployed according to the script module corresponding to the blockchain node to be configured, the method further comprises the following steps: testing a blockchain service included in the blockchain system to obtain a test result of the blockchain system.

7. The method of claim 6, wherein, The method further comprises the following steps: generating a test report according to the test result after the test of the blockchain system is completed; displaying the test report.

8. The method of claim 7, wherein, The method of displaying the test report comprises the following steps: displaying a test report presentation interface, and displaying the test report on the test report presentation interface, wherein the test report presentation interface comprises information of each blockchain service to be tested, test case information of each blockchain service, and a test result of each blockchain service.

9. The method of claim 1, wherein, The method of executing the deployment file to deploy the blockchain node to be configured comprises the following steps: if the deployment of the blockchain node fails after the deployment file is executed, performing a rollback operation on a deployment process of a script module in the deployment file.

10. The method of claim 1, wherein, An execution process of the script module supports idempotency.

11. The method of claim 1 to 10, wherein, The method further comprises the following steps: According to a deployment procedure of a blockchain node in a blockchain system, a plurality of script modules of the blockchain system are generated, and the plurality of script modules are stored in a script module library.

12. A deployment apparatus of a blockchain system, characterized by, The method comprises: an acquisition unit configured to acquire information of a to-be-configured blockchain node in a blockchain system; the information of the blockchain node comprises machine information of the blockchain node, and the machine information comprises at least one of an IP address, a port, a username, and a user password; a first processing unit configured to acquire, according to the information of the to-be-configured blockchain node, a script module corresponding to the to-be-configured blockchain node from a script module library, the script module library containing a plurality of script modules of the blockchain system, the script modules being generated based on deployment procedures of blockchain nodes in the blockchain system, and each script module corresponding to one deployment procedure; a second processing unit configured to generate a deployment file according to the information of the to-be-configured blockchain node in the blockchain system, the deployment file containing a task field of each to-be-configured blockchain node; add the script module corresponding to each blockchain node to the task field of each blockchain node in the deployment file; and execute the deployment file to deploy the to-be-configured blockchain node.

13. A computer readable medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to implement the deployment method of the blockchain system according to any one of claims 1 to 11.

14. An electronic device, comprising: The method comprises: 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 deployment method of the blockchain system according to any one of claims 1 to 11.

15. A computer program product, comprising computer instructions stored in a computer readable storage medium; a processor of a computer device reads the computer instructions from the computer readable storage medium, and the processor executes the computer instructions to cause the computer device to perform the deployment method of the blockchain system according to any one of claims 1 to 11.

Citation Information

Patent Citations

  • Block chain node deployment method and related equipment

    CN110855791A

  • Installation-free serial execution method and system applied to cluster server

    CN111258592A