WO2020224238A1 - Blockchain node depolyment method, device and equipment, and storage medium - Google Patents

Blockchain node depolyment method, device and equipment, and storage medium Download PDF

Info

Publication number
WO2020224238A1
WO2020224238A1 PCT/CN2019/120650 CN2019120650W WO2020224238A1 WO 2020224238 A1 WO2020224238 A1 WO 2020224238A1 CN 2019120650 W CN2019120650 W CN 2019120650W WO 2020224238 A1 WO2020224238 A1 WO 2020224238A1
Authority
WO
WIPO (PCT)
Prior art keywords
node
nodes
blockchain
deployment
consensus
Prior art date
Application number
PCT/CN2019/120650
Other languages
French (fr)
Chinese (zh)
Inventor
褚镇飞
张伟
Original Assignee
深圳壹账通智能科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 深圳壹账通智能科技有限公司 filed Critical 深圳壹账通智能科技有限公司
Publication of WO2020224238A1 publication Critical patent/WO2020224238A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • H04L41/0823Configuration setting characterised by the purposes of a change of settings, e.g. optimising configuration for enhancing reliability
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0893Assignment of logical groups to network elements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/2866Architectures; Arrangements
    • H04L67/30Profiles

Definitions

  • This application relates to the field of blockchain technology, and in particular to a method, device, equipment and computer-readable storage medium for deploying blockchain nodes.
  • Blockchain is generally understood as a distributed ledger, which is essentially a distributed computing and storage system.
  • the inventor realizes that because the blockchain system often has many nodes and each node may be distributed across regions, the deployment of blockchain nodes, especially the deployment of alliance chain system nodes, is often very cumbersome. Once the wrong node is found, it may be necessary Redeploy a large number of related nodes.
  • the first aspect of the present application provides a method for deploying blockchain nodes.
  • the method includes: a configuration file obtaining step: obtaining a configuration file of each blockchain node, wherein the blockchain node Including consensus nodes, data nodes and client nodes; consensus node deployment steps: deploy and start the consensus nodes according to the configuration files of each consensus node; data node deployment steps: after all the consensus nodes are successfully deployed, according to each data node
  • the configuration file for deploying and starting the data node; and the client node deployment step after all the data nodes are successfully deployed, deploy and start the client node according to the configuration file of each client node.
  • the second aspect of the application provides a device for deploying blockchain nodes, including: a configuration module for obtaining configuration files of each blockchain node, where the blockchain nodes include consensus nodes, data nodes, and Client node; deployment module, including: consensus node deployment unit, used to deploy and start the consensus node according to the configuration file of each consensus node; data node deployment unit, used to deploy all the consensus nodes according to each The configuration file of the data node deploys and starts the data node; and the client node deployment unit is configured to deploy and start the client node according to the configuration file of each client node after all the data nodes are successfully deployed.
  • deployment module including: consensus node deployment unit, used to deploy and start the consensus node according to the configuration file of each consensus node; data node deployment unit, used to deploy all the consensus nodes according to each The configuration file of the data node deploys and starts the data node; and the client node deployment unit is configured to deploy and start the client node according to the configuration file of each client node after all the data nodes
  • a third aspect of the present application provides a device for deploying blockchain nodes, including: a memory and at least one processor, the memory stores instructions, and the memory and the at least one processor are interconnected by wires; At least one processor calls the instructions in the memory, so that the deployment device of the blockchain node executes the method described in the first aspect.
  • the fourth aspect of the present application provides a computer-readable storage medium, the computer-readable storage medium stores computer instructions, and when the computer instructions run on a computer, the computer executes the above-mentioned first aspect method.
  • the deployment method, device, equipment, and computer-readable storage medium of blockchain nodes obtained the configuration file of each blockchain node, and then deploy and start the blockchain consensus node in turn according to the configuration file.
  • Blockchain data nodes and blockchain client nodes and in the process of deploying and starting the blockchain consensus nodes, data nodes, and client nodes, use the logs of the blockchain nodes to monitor the process, when When a preset type of error message appears in the log, suspend the deployment and startup of the consensus node, data node or client node, delete the configuration file and all processes of the blockchain node corresponding to the error message, and redeploy And start the corresponding blockchain node, and then continue to execute the deployment and start of the consensus node, data node or client node.
  • the blockchain nodes are deployed and started in the order of consensus node, data node, and client node, when the data node is deployed, the consensus node has been successfully deployed and started, so when the data node is deployed incorrectly, no It will affect the consensus node. Similarly, when the client node is deployed incorrectly, it will not affect the consensus node and the data node. Because the configuration file of each blockchain node exists independently, when a blockchain node is deployed incorrectly, other nodes will not be affected. In summary, using this application can reduce the difficulty of deploying blockchain nodes, and there is no need to redeploy other nodes when a wrong node is discovered. Because the same type of blockchain nodes can be deployed concurrently, this application can also improve the deployment efficiency of blockchain nodes.
  • Fig. 1 is a schematic diagram of an embodiment of an electronic device of this application
  • FIG. 2 is a program module diagram of an embodiment of the deployment program of blockchain nodes in FIG. 1;
  • FIG. 3 is a flowchart of an embodiment of a method for deploying a blockchain node of this application
  • FIG. 4 is a detailed flowchart of step S310 in FIG. 3.
  • This application provides a method, device, device, and computer-readable storage medium for deploying blockchain nodes, which reduces the difficulty of deployment of blockchain nodes, improves the deployment efficiency of blockchain nodes, and finds deployment errors in blockchains. There is no need to redeploy other blockchain nodes.
  • FIG. 1 is a schematic diagram of the electronic device 1 in the embodiment of the present application.
  • the electronic device 1 can be connected to a blockchain node (not shown in the figure) through a network.
  • the electronic device 1 can be a server, a smart phone, a tablet computer, a portable computer, a desktop computer, etc. Terminal equipment with storage and computing functions.
  • the server may be one or more of a rack server, a blade server, a tower server, or a cabinet server.
  • the electronic device 1 includes a memory 11, a processor 12 and a network interface 13.
  • the memory 11 includes at least one type of readable storage medium.
  • the at least one type of readable storage medium may be a non-volatile storage medium such as flash memory, hard disk, multimedia card, card-type memory, and the like.
  • the readable storage medium may be an internal storage unit of the electronic device 1, such as a hard disk of the electronic device 1.
  • the readable storage medium may also be an external memory of the electronic device 1, such as a plug-in hard disk or a smart memory card (Smart Media Card, SMC) equipped on the electronic device 1. Secure Digital (SD) card, flash card (Flash Card), etc.
  • SD Secure Digital
  • flash card Flash Card
  • the readable storage medium of the memory 11 is used to store the deployment program 10 of the blockchain node and the data generated during the deployment of the blockchain node, such as the configuration information of each blockchain node, The corresponding relationship between the configuration information and the blockchain node identification, etc.
  • the memory 11 can also be used to temporarily store data that has been output or will be output.
  • the processor 12 may be a central processing unit (CPU), a microprocessor or other data processing chip, and is used to run the program code or process data stored in the memory 11, for example to execute the deployment of the blockchain node Procedure 10.
  • CPU central processing unit
  • microprocessor or other data processing chip
  • the network interface 13 may include a standard wired interface and a wireless interface (such as a Wi-Fi interface). It is usually used to establish a communication connection between the electronic device 1 and other electronic devices, such as establishing a communication connection with a certificate authority (CA) and consensus nodes, data nodes, and client nodes of the blockchain.
  • CA certificate authority
  • FIG. 1 only shows the electronic device 1 with the components 11-13, but it should be understood that it is not required to implement all the illustrated components, and more or fewer components may be implemented instead.
  • the electronic device 1 may also include an input unit such as a keyboard (Keyboard), a voice input device such as a microphone (Microphone) and other devices with a voice recognition function.
  • the input unit and the input device can be used to edit, add and delete the deployment program 10 of the blockchain node.
  • the electronic device 1 may also include a display, which may also be called a display screen or a display unit.
  • a display may also be called a display screen or a display unit.
  • it may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an organic light-emitting diode (OLED) display, etc.
  • the display is used for displaying information processed in the electronic device 1 and for displaying a visualized user interface.
  • the electronic device 1 may also include a radio frequency (RF) circuit, a sensor, an audio circuit, a wired interface, a wireless interface, and so on, which will not be repeated here.
  • RF radio frequency
  • the blockchain nodes include consensus nodes, data nodes, and client nodes. It is assumed that the software environment of all blockchain nodes has been installed using existing technology, that is, the operating system and The application software has been installed, and the processor 12 may implement the following steps when executing the deployment program 10 of the blockchain node stored in the memory 11:
  • Configuration file obtaining step obtaining configuration files of each blockchain node, where the blockchain nodes include consensus nodes, data nodes, and client nodes;
  • Consensus node deployment steps deploy and start the consensus node according to the configuration file of each consensus node;
  • Data node deployment steps after all the consensus nodes are successfully deployed, deploy and start the data nodes according to the configuration files of each data node;
  • Client node deployment steps After all the data nodes are successfully deployed, deploy and start the client nodes according to the configuration files of each client node.
  • the deployment program 10 of the blockchain node may be divided into multiple modules, and the multiple modules are stored in the memory 12 and executed by the processor 13 to complete the application.
  • the module referred to in this application refers to a series of computer program instruction segments that can complete specific functions.
  • FIG. 2 it is a program module diagram of an embodiment of the deployment program 10 of blockchain nodes in FIG. 1.
  • the deployment program 10 of the blockchain node can be divided into: a configuration module 110, a deployment module 120, a monitoring module 130, and a deletion module 140.
  • the configuration module 110 is configured to assign a unique node identifier to each blockchain node, obtain configuration information corresponding to the node identifier, and write the configuration information into the configuration of each blockchain node File.
  • the blockchain nodes include consensus nodes, data nodes and client nodes.
  • the client node is used to send a request to the data node
  • the data node is used to receive the request sent by the client and endorses the request and simulates the execution of the request
  • the consensus node is used to execute the request
  • the result is processed by consensus and blocks are generated.
  • the configuration information includes node identity information, node IP address and node port information.
  • the node identity information includes a digital certificate issued by a predetermined CA for the blockchain node to prove the legal identity of the blockchain node.
  • the node identifier may use the node IP address of the corresponding blockchain node or other identifiers that can uniquely identify the blockchain node, and the format of the configuration file may be XML or JSON, which is not limited in this application.
  • the deployment module 120 is configured to sequentially deploy and start the blockchain consensus node, the blockchain data node, and the blockchain client node according to the configuration file.
  • the deployment module 120 includes a consensus node deployment unit 121, a data node deployment unit 122, and a client node deployment module 123.
  • the consensus node deployment unit 121 is configured to deploy and start the consensus node according to the configuration file of each consensus node
  • the data node deployment unit 122 is configured to, after all the consensus nodes are successfully deployed, according to the configuration file of each data node
  • the data node is deployed and started
  • the client node deployment module 123 is configured to deploy and start the client node according to the configuration file of each client node after all the data nodes are successfully deployed.
  • the deployment and startup of the consensus node, data node, and client node can be performed concurrently, respectively, so as to improve the deployment efficiency of blockchain nodes, especially the deployment efficiency of data nodes and client nodes, because Blockchain systems usually include a large number of data nodes and client nodes.
  • the concurrent deployment threshold can be set through the deployment module 120, so as to limit the maximum number of concurrent deployments and startups of the same type of blockchain nodes.
  • the setting of the concurrent deployment threshold is affected by the performance of the electronic device 1. How many processes the electronic device 1 can create for the deployment and startup of blockchain nodes can set the concurrent deployment threshold.
  • the electronic device 1 can create 1000 processes for deploying and starting a blockchain node, and each process is responsible for deploying and starting a blockchain node, the concurrent deployment threshold can be set to 1000.
  • the deployment efficiency of blockchain nodes can be greatly improved.
  • the monitoring module 130 is used to monitor the deployment and startup of the consensus node, data node and client node.
  • the log of the blockchain node is used to monitor the deployment and startup of the consensus node, data node, and client node.
  • an alarm keyword (such as "error") can be set to monitor a preset type of Error information, such as startup failure, abnormal operation, etc.
  • the deletion module 140 is used to suspend the deployment and startup of the consensus node, data node, and client node when the monitoring module 130 finds an abnormal state, and delete the configuration file of the blockchain node corresponding to the abnormal state With all processes (including containers and mirrors), the blockchain node is handed over to the configuration module 110 and the deployment module 120, the configuration file is retrieved and loaded, and the deployment and startup are performed again.
  • this application also provides a method for deploying blockchain nodes.
  • FIG. 3 it is a flowchart of an embodiment of a method for deploying a blockchain node in this application.
  • the processor 12 of the electronic device 1 implements the following steps of the blockchain node deployment method when executing the blockchain node deployment program 10 stored in the memory 11:
  • the configuration module 110 is used to obtain the configuration file of each blockchain node.
  • the blockchain nodes include consensus nodes, data nodes, and client nodes
  • the configuration file includes configuration information of each blockchain node, such as node identity information, node IP address, and node port information.
  • each blockchain node has a unique node identifier
  • the node identifier of each blockchain has a predetermined corresponding relationship with its configuration information.
  • the node identifier can use the node IP address or other uniquely identifying blocks.
  • the identifier of the chain node the configuration information can be obtained from a predetermined configuration center.
  • the configuration center may obtain a digital certificate representing the node identity information of each blockchain node from at least one predetermined CA.
  • the CA used by different blockchain nodes to obtain the node identity information may be the same or different.
  • the configuration center may specify the CA that issues the digital certificate according to the node identifier or the node type.
  • the configuration center can also obtain the node IP address of each blockchain node through the command "ifconfig
  • the node port information can be pre-appointed or through similar Method to obtain, I will not repeat it here.
  • the configuration module 110 After the configuration module 110 obtains the configuration information corresponding to each node identifier, it writes the configuration information into the configuration file of each blockchain node for the deployment module 120 to use.
  • step S310 the deployment module 120 sequentially deploys and starts the consensus node, the data node and the client node according to the configuration file. Specifically, the deployment module 120 should first complete the concurrent deployment and startup of the consensus node, then complete the concurrent deployment and startup of the data node, and finally concurrently deploy and start the client node. Assuming that all the consensus nodes are successfully deployed and started, and no abnormal state occurs, it means that all the consensus nodes are successfully deployed, and the deployment and startup of the data nodes will begin. When the data node is started, each data node will establish a connection with the consensus node. If the connection is successfully established and is operating normally, the data node is successfully deployed.
  • the connection If the connection is not established or the operation is abnormal, the data node If there is an abnormality, it is necessary to eliminate the abnormality of the data node and redeploy and start the data node. Similarly, assuming that all consensus nodes and all data nodes are successfully deployed and started, and no abnormal state occurs, it means that all consensus nodes and all data nodes are successfully deployed, and the deployment and startup of the client nodes will begin.
  • each client node will establish a connection with at least one of the data nodes. If the connection is successfully established and is operating normally, the deployment of the client node is successful. If the connection is not established or the operation is abnormal , Indicating that there is an abnormality in the client node, it is necessary to eliminate the abnormality of the client node and redeploy and start the client node.
  • the configuration information of the blockchain node may also include a time threshold for requesting to establish a connection, when the connection between the corresponding blockchain nodes cannot be successfully established within the time threshold.
  • an abnormal blockchain node is found , Just eliminate the abnormal state of the blockchain node, redeploy and start the blockchain node, without redeploying other blockchain nodes.
  • the concurrent deployment threshold is set to limit the number of concurrent deployment of the same type of blockchain nodes.
  • Each process created by the electronic device 1 can be responsible for deploying and starting a blockchain node. By concurrently deploying the same type of blockchain nodes, the deployment efficiency of blockchain nodes can be greatly improved.
  • Step S320 Use the monitoring module 130 to monitor the deployment and startup of the consensus nodes, data nodes, and client nodes.
  • an abnormal state is found, suspend the deployment and startup of subsequent blockchain nodes in step S310 (without interrupting the deployment being deployed And the activated blockchain node), using the deletion module 140 to delete the configuration file and all processes of the blockchain node corresponding to the abnormal state, redeploy and start the blockchain node, and deploy on the blockchain node After success, proceed to step S310.
  • the log of the blockchain node can be used to monitor the deployment and startup of the blockchain node.
  • the consensus is automatically suspended
  • nodes, data nodes or client nodes locate the abnormal blockchain node according to the blockchain node of the log where the alarm keyword appears, and determine the block based on the row information of the alarm keyword
  • the abnormal state of the chain node is then excluded.
  • the abnormal state can be eliminated by deleting the configuration file and all processes (including containers and mirrors) of the blockchain node, and then redeploying and starting the blockchain node. After it is determined that the blockchain node is successfully deployed, the step S310 is continued.
  • step S310 of the deployment method of a blockchain node of this application includes the following steps:
  • step S311 the consensus node deployment unit 121 deploys and starts the consensus node according to the configuration file of each consensus node. Because the number of consensus nodes is often small, the electronic device 1 can create the same process as the number of consensus nodes that need to be deployed and started to be responsible for the deployment and start of the consensus node, and each process is responsible for deploying and starting a consensus node . After it is determined that all the consensus nodes are successfully deployed, step S312 is executed.
  • step S312 the data node deployment unit 122 deploys and starts the data node according to the configuration file of each data node. Because the number of data nodes is often large, the electronic device 1 can create processes according to the number of data nodes or create processes in batches that are not greater than the concurrent deployment threshold to be responsible for the deployment and startup of the data nodes, and each process is responsible for Deploy and start a data node. After it is determined that all the data nodes are successfully deployed, step S313 is executed.
  • step S312 the client node deployment unit 123 deploys and starts the client node according to the configuration file of each client node. Because the number of client nodes is often large, the electronic device 1 can create processes in which the number of processes is not greater than the concurrent deployment threshold according to the number of client nodes to be responsible for the deployment and startup of the client nodes, and each process is responsible for Deploy and start a client node.
  • the present application also provides a computer-readable storage medium, which may be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium.
  • the computer-readable storage medium stores computer instructions, and when the computer instructions are executed on the computer, the computer executes the following steps:
  • Configuration file obtaining step obtaining configuration files of each blockchain node, where the blockchain nodes include consensus nodes, data nodes, and client nodes;
  • Consensus node deployment steps deploy and start the consensus node according to the configuration file of each consensus node;
  • Data node deployment steps after all the consensus nodes are successfully deployed, deploy and start the data nodes according to the configuration files of each data node;
  • Client node deployment steps After all the data nodes are successfully deployed, deploy and start the client nodes according to the configuration files of each client node.
  • the specific implementation is roughly the same as the deployment method of the blockchain node and the specific implementation of the electronic device 1. Please refer to the schematic diagram of the embodiment of the electronic device 1 in Figure 1 and Figure 3 and Figure 4 on the deployment of the blockchain node. The detailed introduction of the flowchart of the method embodiment will not be repeated here.

Abstract

The present application relates to blockchain technology, and provides a blockchain node deployment method, device, and equipment, and a storage medium. The method comprises: obtaining a configuration file of each blockchain node, wherein the blockchain nodes comprise consensus nodes, data nodes, and client nodes; sequentially deploying and starting the consensus nodes, the data nodes, and the client nodes according to the configuration file; in the process of deploying and starting the consensus nodes, the data nodes and the client nodes, when a preset type of error information appears in the log of the blockchain nodes, pausing the deployment and starting of the consensus nodes, the data nodes or the client nodes, deleting the configuration file and all processes of the blockchain nodes corresponding to the error information, and deploying and starting the corresponding blockchain nodes again. The present application can reduce the deployment difficulty of blockchain nodes, and improve the deployment efficiency of blockchain nodes.

Description

区块链节点的部署方法、装置、设备及存储介质Deployment method, device, equipment and storage medium of blockchain node
本申请要求于2019年5月6日提交中国专利局、申请号为201910371483.9、发明名称为“区块链节点的部署方法、装置及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在申请中。This application claims the priority of a Chinese patent application filed with the Chinese Patent Office, the application number is 201910371483.9, and the invention title is "Blockchain node deployment method, device and storage medium" on May 6, 2019, the entire content of which is by reference Incorporate in the application.
技术领域Technical field
本申请涉及区块链技术领域,尤其涉及一种区块链节点的部署方法、装置、设备及计算机可读存储介质。This application relates to the field of blockchain technology, and in particular to a method, device, equipment and computer-readable storage medium for deploying blockchain nodes.
背景技术Background technique
区块链一般被理解为一个分布式的账本,它实质上也是一个分布式计算和存储系统。发明人意识到,由于区块链系统往往节点众多、各节点可能跨地域分布,区块链节点的部署,尤其是联盟链系统节点的部署常显得异常繁琐,一旦发现部署错误的节点,可能需要重新部署大量相关节点。Blockchain is generally understood as a distributed ledger, which is essentially a distributed computing and storage system. The inventor realizes that because the blockchain system often has many nodes and each node may be distributed across regions, the deployment of blockchain nodes, especially the deployment of alliance chain system nodes, is often very cumbersome. Once the wrong node is found, it may be necessary Redeploy a large number of related nodes.
发明内容Summary of the invention
鉴于以上原因,有必要提供一种区块链节点的部署方法、装置、设备及计算机可读存储介质,降低区块链节点的部署难度,提高区块链节点的部署效率,在发现部署错误的区块链节点时,无须重新部署其他区块链节点。In view of the above reasons, it is necessary to provide a blockchain node deployment method, device, equipment, and computer-readable storage medium to reduce the difficulty of blockchain node deployment, improve the deployment efficiency of blockchain nodes, and find deployment errors. When blockchain nodes are used, there is no need to redeploy other blockchain nodes.
为实现上述目的,本申请第一方面提供了一种区块链节点的部署方法,该方法包括:配置文件获取步骤:获取每个区块链节点的配置文件,其中,所述区块链节点包括共识节点、数据节点和客户端节点;共识节点部署步骤:根据各个共识节点的配置文件部署和启动所述共识节点;数据节点部署步骤:在所有所述共识节点部署成功后,根据各个数据节点的配置文件部署和启动所述数据节点;及客户端节点部署步骤:在所有所述数据节点部署成功后,根据各个客户端节点的配置文件部署和启动所述客户端节点。In order to achieve the above objective, the first aspect of the present application provides a method for deploying blockchain nodes. The method includes: a configuration file obtaining step: obtaining a configuration file of each blockchain node, wherein the blockchain node Including consensus nodes, data nodes and client nodes; consensus node deployment steps: deploy and start the consensus nodes according to the configuration files of each consensus node; data node deployment steps: after all the consensus nodes are successfully deployed, according to each data node The configuration file for deploying and starting the data node; and the client node deployment step: after all the data nodes are successfully deployed, deploy and start the client node according to the configuration file of each client node.
本申请第二方面提供了一种区块链节点的部署装置,包括:配置模块,用于获取每个区块链节点的配置文件,其中,所述区块链节点包括共识节点、数据节点和客户端节点;部署模块,包括:共识节点部署单元,用于根据各个共 识节点的配置文件部署和启动所述共识节点;数据节点部署单元,用于在所有所述共识节点部署成功后,根据各个数据节点的配置文件部署和启动所述数据节点;及客户端节点部署单元,用于在所有所述数据节点部署成功后,根据各个客户端节点的配置文件部署和启动所述客户端节点。The second aspect of the application provides a device for deploying blockchain nodes, including: a configuration module for obtaining configuration files of each blockchain node, where the blockchain nodes include consensus nodes, data nodes, and Client node; deployment module, including: consensus node deployment unit, used to deploy and start the consensus node according to the configuration file of each consensus node; data node deployment unit, used to deploy all the consensus nodes according to each The configuration file of the data node deploys and starts the data node; and the client node deployment unit is configured to deploy and start the client node according to the configuration file of each client node after all the data nodes are successfully deployed.
本申请第三方面提供了一种区块链节点的部署设备,包括:存储器和至少一个处理器,所述存储器中存储有指令,所述存储器和所述至少一个处理器通过线路互联;所述至少一个处理器调用所述存储器中的所述指令,以使得所述区块链节点的部署设备执行上述第一方面所述的方法。A third aspect of the present application provides a device for deploying blockchain nodes, including: a memory and at least one processor, the memory stores instructions, and the memory and the at least one processor are interconnected by wires; At least one processor calls the instructions in the memory, so that the deployment device of the blockchain node executes the method described in the first aspect.
本申请的第四方面提供了一种计算机可读存储介质,所述计算机可读存储介质中存储有计算机指令,当所述计算机指令在计算机上运行时,使得计算机执行上述第一方面所述的方法。The fourth aspect of the present application provides a computer-readable storage medium, the computer-readable storage medium stores computer instructions, and when the computer instructions run on a computer, the computer executes the above-mentioned first aspect method.
本申请提供的区块链节点的部署方法、装置、设备及计算机可读存储介质,通过获取每个区块链节点的配置文件,然后根据所述配置文件依次部署和启动区块链共识节点、区块链数据节点以及区块链客户端节点,并在部署和启动所述区块链共识节点、数据节点和客户端节点的过程中,利用区块链节点的日志对该过程进行监控,当所述日志中出现预设类型的错误信息时,暂停所述共识节点、数据节点或客户端节点的部署和启动,删除所述错误信息对应的区块链节点的配置文件和所有进程,重新部署和启动该对应的区块链节点,然后继续执行所述共识节点、数据节点或客户端节点的部署和启动。因为按照共识节点、数据节点、客户端节点的顺序部署和启动区块链节点,在部署所述数据节点时,所述共识节点已成功部署和启动,所以当所述数据节点部署错误时,不会影响到所述共识节点,同样的,当所述客户端节点部署错误时,不会影响到所述共识节点和所述数据节点。因为所述每个区块链节点的配置文件是独立存在的,所以当一个区块链节点部署错误时,不会影响到其他节点。综上所述,利用本申请,可以降低区块链节点的部署难度,在发现部署错误的节点时,无须重新部署其他节点。因为同种类型的区块链节点可以并发部署,所以利用本申请,还可以提高区块链节点的部署效率。The deployment method, device, equipment, and computer-readable storage medium of blockchain nodes provided in this application obtain the configuration file of each blockchain node, and then deploy and start the blockchain consensus node in turn according to the configuration file. Blockchain data nodes and blockchain client nodes, and in the process of deploying and starting the blockchain consensus nodes, data nodes, and client nodes, use the logs of the blockchain nodes to monitor the process, when When a preset type of error message appears in the log, suspend the deployment and startup of the consensus node, data node or client node, delete the configuration file and all processes of the blockchain node corresponding to the error message, and redeploy And start the corresponding blockchain node, and then continue to execute the deployment and start of the consensus node, data node or client node. Because the blockchain nodes are deployed and started in the order of consensus node, data node, and client node, when the data node is deployed, the consensus node has been successfully deployed and started, so when the data node is deployed incorrectly, no It will affect the consensus node. Similarly, when the client node is deployed incorrectly, it will not affect the consensus node and the data node. Because the configuration file of each blockchain node exists independently, when a blockchain node is deployed incorrectly, other nodes will not be affected. In summary, using this application can reduce the difficulty of deploying blockchain nodes, and there is no need to redeploy other nodes when a wrong node is discovered. Because the same type of blockchain nodes can be deployed concurrently, this application can also improve the deployment efficiency of blockchain nodes.
附图说明Description of the drawings
图1为本申请电子设备一实施例的示意图;Fig. 1 is a schematic diagram of an embodiment of an electronic device of this application;
图2为图1中区块链节点的部署程序一实施例的程序模块图;FIG. 2 is a program module diagram of an embodiment of the deployment program of blockchain nodes in FIG. 1;
图3为本申请区块链节点的部署方法一实施例的流程图;FIG. 3 is a flowchart of an embodiment of a method for deploying a blockchain node of this application;
图4为图3中步骤S310的细化流程示意图。FIG. 4 is a detailed flowchart of step S310 in FIG. 3.
具体实施方式Detailed ways
本申请提供了一种区块链节点的部署方法、装置、设备及计算机可读存储介质,降低区块链节点的部署难度,提高区块链节点的部署效率,在发现部署错误的区块链节点时,无须重新部署其他区块链节点。This application provides a method, device, device, and computer-readable storage medium for deploying blockchain nodes, which reduces the difficulty of deployment of blockchain nodes, improves the deployment efficiency of blockchain nodes, and finds deployment errors in blockchains. There is no need to redeploy other blockchain nodes.
为了使本技术领域的人员更好地理解本申请方案,下面将结合本申请实施例中的附图,对本申请实施例进行描述。In order to enable those skilled in the art to better understand the solutions of the present application, the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application.
本申请的说明书和权利要求书及上述附图中的术语“第一”、“第二”、“第三”、“第四”等(如果存在)是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的实施例能够以除了在这里图示或描述的内容以外的顺序实施。此外,术语“包括”或“具有”及其任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或单元的过程、方法、系统、产品或设备不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of this application and the above-mentioned drawings are used to distinguish similar objects, without having to use To describe a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances so that the embodiments described herein can be implemented in an order other than the content illustrated or described herein. In addition, the terms "including" or "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or device including a series of steps or units is not necessarily limited to those clearly listed Steps or units, but may include other steps or units that are not clearly listed or are inherent to these processes, methods, products, or equipment.
为便于理解,下面对本申请实施例的具体流程进行描述,请参阅图1,本申请实施例中电子设备1的示意图。在该实施例中,电子设备1可通过网络与区块链节点(图中未示出)相连接,所述电子设备1可以是服务器、智能手机、平板电脑、便携计算机、桌上型计算机等具有存储和运算功能的终端设备。在一个实施例中,当电子设备1为服务器时,该服务器可以是机架式服务器、刀片式服务器、塔式服务器或机柜式服务器等的一种或几种。For ease of understanding, the following describes the specific process of the embodiment of the present application, please refer to FIG. 1, which is a schematic diagram of the electronic device 1 in the embodiment of the present application. In this embodiment, the electronic device 1 can be connected to a blockchain node (not shown in the figure) through a network. The electronic device 1 can be a server, a smart phone, a tablet computer, a portable computer, a desktop computer, etc. Terminal equipment with storage and computing functions. In an embodiment, when the electronic device 1 is a server, the server may be one or more of a rack server, a blade server, a tower server, or a cabinet server.
所述电子设备1包括存储器11、处理器12以及网络接口13。The electronic device 1 includes a memory 11, a processor 12 and a network interface 13.
其中,存储器11包括至少一种类型的可读存储介质。所述至少一种类型的可读存储介质可为如闪存、硬盘、多媒体卡、卡型存储器等的非易失性存储介质。在一些实施例中,所述可读存储介质可以是所述电子设备1的内部存储 单元,例如该电子设备1的硬盘。在另一些实施例中,所述可读存储介质也可以是所述电子设备1的外部存储器,例如所述电子设备1上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等。Wherein, the memory 11 includes at least one type of readable storage medium. The at least one type of readable storage medium may be a non-volatile storage medium such as flash memory, hard disk, multimedia card, card-type memory, and the like. In some embodiments, the readable storage medium may be an internal storage unit of the electronic device 1, such as a hard disk of the electronic device 1. In other embodiments, the readable storage medium may also be an external memory of the electronic device 1, such as a plug-in hard disk or a smart memory card (Smart Media Card, SMC) equipped on the electronic device 1. Secure Digital (SD) card, flash card (Flash Card), etc.
在本实施例中,所述存储器11的可读存储介质用于存储区块链节点的部署程序10以及区块链节点部署过程中产生的数据,例如每个区块链节点的配置信息、所述配置信息与区块链节点标识的对应关系等。所述存储器11还可以用于暂时地存储已经输出或者将要输出的数据。In this embodiment, the readable storage medium of the memory 11 is used to store the deployment program 10 of the blockchain node and the data generated during the deployment of the blockchain node, such as the configuration information of each blockchain node, The corresponding relationship between the configuration information and the blockchain node identification, etc. The memory 11 can also be used to temporarily store data that has been output or will be output.
处理器12可以是一中央处理器(Central Processing Unit,CPU),微处理器或其他数据处理芯片,用于运行存储器11中存储的程序代码或处理数据,例如执行所述区块链节点的部署程序10。The processor 12 may be a central processing unit (CPU), a microprocessor or other data processing chip, and is used to run the program code or process data stored in the memory 11, for example to execute the deployment of the blockchain node Procedure 10.
网络接口13可以包括标准的有线接口、无线接口(如WI-FI接口)。通常用于在该电子设备1与其他电子设备之间建立通信连接,例如与证书授权中心(Certificate Authority,CA)以及区块链的共识节点、数据节点和客户端节点等建立通信连接。The network interface 13 may include a standard wired interface and a wireless interface (such as a Wi-Fi interface). It is usually used to establish a communication connection between the electronic device 1 and other electronic devices, such as establishing a communication connection with a certificate authority (CA) and consensus nodes, data nodes, and client nodes of the blockchain.
图1仅示出了具有组件11-13的电子设备1,但是应理解的是,并不要求实施所有示出的组件,可以替代的实施更多或者更少的组件。FIG. 1 only shows the electronic device 1 with the components 11-13, but it should be understood that it is not required to implement all the illustrated components, and more or fewer components may be implemented instead.
可选地,该电子设备1还可以包括输入单元比如键盘(Keyboard),语音输入设备比如麦克风(Microphone)等具有语音识别功能的设备。所述输入单元和输入设备可以用于对所述区块链节点的部署程序10进行编辑和增删。Optionally, the electronic device 1 may also include an input unit such as a keyboard (Keyboard), a voice input device such as a microphone (Microphone) and other devices with a voice recognition function. The input unit and the input device can be used to edit, add and delete the deployment program 10 of the blockchain node.
可选地,该电子设备1还可以包括显示器,也可以称为显示屏或显示单元。在一些实施例中可以是LED显示器、液晶显示器、触控式液晶显示器以及有机发光二极管(Organic Light-Emitting Diode,OLED)显示器等。显示器用于显示在电子设备1中处理的信息以及用于显示可视化的用户界面。Optionally, the electronic device 1 may also include a display, which may also be called a display screen or a display unit. In some embodiments, it may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an organic light-emitting diode (OLED) display, etc. The display is used for displaying information processed in the electronic device 1 and for displaying a visualized user interface.
该电子设备1还可以包括射频(Radio Frequency,RF)电路、传感器、音频电路、有线接口和无线接口等等,在此不再赘述。The electronic device 1 may also include a radio frequency (RF) circuit, a sensor, an audio circuit, a wired interface, a wireless interface, and so on, which will not be repeated here.
在上述实施例中,所述区块链节点包括共识节点、数据节点和客户端节点,假设已经利用现有技术将所有区块链节点的软件环境安装完毕,即各区块链节 点的操作系统和应用软件已经安装完毕,所述处理器12执行所述存储器11中存储的所述区块链节点的部署程序10时可以实现如下步骤:In the above embodiment, the blockchain nodes include consensus nodes, data nodes, and client nodes. It is assumed that the software environment of all blockchain nodes has been installed using existing technology, that is, the operating system and The application software has been installed, and the processor 12 may implement the following steps when executing the deployment program 10 of the blockchain node stored in the memory 11:
配置文件获取步骤:获取每个区块链节点的配置文件,其中,所述区块链节点包括共识节点、数据节点和客户端节点;Configuration file obtaining step: obtaining configuration files of each blockchain node, where the blockchain nodes include consensus nodes, data nodes, and client nodes;
共识节点部署步骤:根据各个共识节点的配置文件部署和启动所述共识节点;Consensus node deployment steps: deploy and start the consensus node according to the configuration file of each consensus node;
数据节点部署步骤:在所有所述共识节点部署成功后,根据各个数据节点的配置文件部署和启动所述数据节点;及Data node deployment steps: after all the consensus nodes are successfully deployed, deploy and start the data nodes according to the configuration files of each data node; and
客户端节点部署步骤:在所有所述数据节点部署成功后,根据各个客户端节点的配置文件部署和启动所述客户端节点。Client node deployment steps: After all the data nodes are successfully deployed, deploy and start the client nodes according to the configuration files of each client node.
关于上述步骤的详细介绍,请参照下述图2关于区块链节点的部署程序10实施例的程序模块图以及图3、图4关于区块链节点的部署方法实施例的流程图的说明。For a detailed description of the above steps, please refer to the following description of the program module diagram of the embodiment 10 of the deployment program of blockchain nodes in FIG. 2 and the description of the flowcharts of the embodiment of the deployment method of blockchain nodes in FIG. 3 and FIG. 4.
在其他实施例中,所述区块链节点的部署程序10可以被分割为多个模块,该多个模块被存储于存储器12中,并由处理器13执行,以完成本申请。本申请所称的模块是指能够完成特定功能的一系列计算机程序指令段。In other embodiments, the deployment program 10 of the blockchain node may be divided into multiple modules, and the multiple modules are stored in the memory 12 and executed by the processor 13 to complete the application. The module referred to in this application refers to a series of computer program instruction segments that can complete specific functions.
参照图2所示,为图1中区块链节点的部署程序10一实施例的程序模块图。在本实施例中,所述区块链节点的部署程序10可以被分割为:配置模块110、部署模块120、监控模块130和删除模块140。Referring to FIG. 2, it is a program module diagram of an embodiment of the deployment program 10 of blockchain nodes in FIG. 1. In this embodiment, the deployment program 10 of the blockchain node can be divided into: a configuration module 110, a deployment module 120, a monitoring module 130, and a deletion module 140.
所述配置模块110,用于为每个区块链节点分配一个唯一的节点标识,获取与该节点标识对应的配置信息,并将所述配置信息写入所述每个区块链节点的配置文件中。其中,所述区块链节点包括共识节点、数据节点和客户端节点。所述客户端节点用于向所述数据节点发送请求,所述数据节点用于接收所述客户端发送的请求并对该请求进行背书和模拟执行该请求,所述共识节点用于对请求执行结果进行共识处理并生成区块。所述配置信息包括节点身份信息、节点IP地址和节点端口信息。在本实施例中,所述节点身份信息包括由预先确定的CA为区块链节点发放的证明区块链节点合法身份的数字证书。所述节点标识可以使用对应区块链节点的节点IP地址或者其他能够唯一标识该区块链 节点的标识符,所述配置文件的格式可以为XML或JSON等,本申请对此不做限定。The configuration module 110 is configured to assign a unique node identifier to each blockchain node, obtain configuration information corresponding to the node identifier, and write the configuration information into the configuration of each blockchain node File. Wherein, the blockchain nodes include consensus nodes, data nodes and client nodes. The client node is used to send a request to the data node, the data node is used to receive the request sent by the client and endorses the request and simulates the execution of the request, and the consensus node is used to execute the request The result is processed by consensus and blocks are generated. The configuration information includes node identity information, node IP address and node port information. In this embodiment, the node identity information includes a digital certificate issued by a predetermined CA for the blockchain node to prove the legal identity of the blockchain node. The node identifier may use the node IP address of the corresponding blockchain node or other identifiers that can uniquely identify the blockchain node, and the format of the configuration file may be XML or JSON, which is not limited in this application.
所述部署模块120,用于根据所述配置文件依次部署和启动区块链共识节点、区块链数据节点以及区块链客户端节点。在本实施例中,所述部署模块120包括共识节点部署单元121、数据节点部署单元122以及客户端节点部署模块123。所述共识节点部署单元121用于根据各个共识节点的配置文件部署和启动所述共识节点,所述数据节点部署单元122用于在所有所述共识节点部署成功后,根据各个数据节点的配置文件部署和启动所述数据节点,所述客户端节点部署模块123用于在所有所述数据节点部署成功后,根据各个客户端节点的配置文件部署和启动所述客户端节点。The deployment module 120 is configured to sequentially deploy and start the blockchain consensus node, the blockchain data node, and the blockchain client node according to the configuration file. In this embodiment, the deployment module 120 includes a consensus node deployment unit 121, a data node deployment unit 122, and a client node deployment module 123. The consensus node deployment unit 121 is configured to deploy and start the consensus node according to the configuration file of each consensus node, and the data node deployment unit 122 is configured to, after all the consensus nodes are successfully deployed, according to the configuration file of each data node The data node is deployed and started, and the client node deployment module 123 is configured to deploy and start the client node according to the configuration file of each client node after all the data nodes are successfully deployed.
在本实施例中,所述共识节点、数据节点以及客户端节点的部署和启动可以分别并发进行,以此提高区块链节点的部署效率,尤其是数据节点和客户端节点的部署效率,因为区块链系统通常包括大量的数据节点和客户端节点。具体地,可以通过所述部署模块120设置并发部署阈值,以此限制并发部署和启动同种类型区块链节点的最大并发数。所述并发部署阈值的设置受所述电子设备1性能的影响,电子设备1能够创建多少个用于区块链节点部署和启动的进程,就能设置多大的并发部署阈值。例如,假设电子设备1可以创建1000个进程用于部署和启动区块链节点,每个进程负责部署和启动一个区块链节点,则所述并发部署阈值可以设置为1000。通过并发部署同种类型的区块链节点,可以大大提高区块链节点的部署效率。In this embodiment, the deployment and startup of the consensus node, data node, and client node can be performed concurrently, respectively, so as to improve the deployment efficiency of blockchain nodes, especially the deployment efficiency of data nodes and client nodes, because Blockchain systems usually include a large number of data nodes and client nodes. Specifically, the concurrent deployment threshold can be set through the deployment module 120, so as to limit the maximum number of concurrent deployments and startups of the same type of blockchain nodes. The setting of the concurrent deployment threshold is affected by the performance of the electronic device 1. How many processes the electronic device 1 can create for the deployment and startup of blockchain nodes can set the concurrent deployment threshold. For example, assuming that the electronic device 1 can create 1000 processes for deploying and starting a blockchain node, and each process is responsible for deploying and starting a blockchain node, the concurrent deployment threshold can be set to 1000. By concurrently deploying the same type of blockchain nodes, the deployment efficiency of blockchain nodes can be greatly improved.
所述监控模块130,用于监控所述共识节点、数据节点和客户端节点的部署和启动。在本实施例中,利用区块链节点的日志监控所述共识节点、数据节点和客户端节点的部署和启动,例如,可以通过设置报警关键字(如“error”)来监控预设类型的错误信息,例如启动失败、运行异常等。在部署和启动所述区块链节点时,如果所述区块链节点的日志中出现所述报警关键字,则说明所述部署和启动过程中出现异常状态,需要重新部署出现异常状态的区块链节点。The monitoring module 130 is used to monitor the deployment and startup of the consensus node, data node and client node. In this embodiment, the log of the blockchain node is used to monitor the deployment and startup of the consensus node, data node, and client node. For example, an alarm keyword (such as "error") can be set to monitor a preset type of Error information, such as startup failure, abnormal operation, etc. When deploying and starting the blockchain node, if the alarm keyword appears in the log of the blockchain node, it means that an abnormal state has occurred during the deployment and startup process, and the area with the abnormal state needs to be redeployed Block chain node.
所述删除模块140,用于在所述监控模块130发现异常状态时,暂停所述共识节点、数据节点和客户端节点的部署和启动,删除所述异常状态对应的区 块链节点的配置文件和所有进程(包括容器和镜像),将该区块链节点交由所述配置模块110和所述部署模块120,重新获取和加载配置文件并重新进行部署和启动。The deletion module 140 is used to suspend the deployment and startup of the consensus node, data node, and client node when the monitoring module 130 finds an abnormal state, and delete the configuration file of the blockchain node corresponding to the abnormal state With all processes (including containers and mirrors), the blockchain node is handed over to the configuration module 110 and the deployment module 120, the configuration file is retrieved and loaded, and the deployment and startup are performed again.
此外,本申请还提供一种区块链节点的部署方法。参照图3所示,为本申请区块链节点的部署方法一实施例的流程图。电子设备1的处理器12在执行存储器11中存储的区块链节点的部署程序10时实现区块链节点的部署方法的如下步骤:In addition, this application also provides a method for deploying blockchain nodes. Referring to FIG. 3, it is a flowchart of an embodiment of a method for deploying a blockchain node in this application. The processor 12 of the electronic device 1 implements the following steps of the blockchain node deployment method when executing the blockchain node deployment program 10 stored in the memory 11:
步骤S300,利用所述配置模块110获取每个区块链节点的配置文件。其中,所述区块链节点包括共识节点、数据节点和客户端节点,所述配置文件中包括各区块链节点的配置信息,例如节点身份信息、节点IP地址和节点端口信息等。In step S300, the configuration module 110 is used to obtain the configuration file of each blockchain node. Wherein, the blockchain nodes include consensus nodes, data nodes, and client nodes, and the configuration file includes configuration information of each blockchain node, such as node identity information, node IP address, and node port information.
具体地,每个区块链节点拥有一个唯一的节点标识,每个区块链的节点标识与其配置信息存在预先确定的对应关系,所述节点标识可以使用节点IP地址或其它能够唯一标识区块链节点的标识符,所述配置信息可以从预先确定的配置中心获取。例如,所述配置中心可以从至少一个预先确定的CA中获取表示各个区块链节点的节点身份信息的数字证书,不同区块链节点用来获取节点身份信息的CA可以相同,也可以不同。所述配置中心可以根据节点标识或节点类型指定发放数字证书的CA。所述配置中心还可以通过命令“ifconfig|grep broadcast|awk'{print$2}'”获取各个区块链节点的节点IP地址,所述节点端口信息可以是预先约定好的,也可以通过类似的方法获取,在此不再赘述。配置模块110获取与每个节点标识对应的配置信息后,会将所述配置信息写入每个区块链节点的配置文件中,供部署模块120使用。Specifically, each blockchain node has a unique node identifier, and the node identifier of each blockchain has a predetermined corresponding relationship with its configuration information. The node identifier can use the node IP address or other uniquely identifying blocks. The identifier of the chain node, the configuration information can be obtained from a predetermined configuration center. For example, the configuration center may obtain a digital certificate representing the node identity information of each blockchain node from at least one predetermined CA. The CA used by different blockchain nodes to obtain the node identity information may be the same or different. The configuration center may specify the CA that issues the digital certificate according to the node identifier or the node type. The configuration center can also obtain the node IP address of each blockchain node through the command "ifconfig|grep broadcast|awk'{print$2}'". The node port information can be pre-appointed or through similar Method to obtain, I will not repeat it here. After the configuration module 110 obtains the configuration information corresponding to each node identifier, it writes the configuration information into the configuration file of each blockchain node for the deployment module 120 to use.
步骤S310,所述部署模块120根据所述配置文件依次部署和启动共识节点、数据节点和客户端节点。具体地,部署模块120应当先完成所述共识节点的并发部署和启动,然后完成所述数据节点的并发部署和启动,最后再并发部署和启动所述客户端节点。假设所述共识节点全部部署成功和启动,未出现异常状态,则说明所有共识节点部署成功,将开始进行所述数据节点的部署和启动。在启动所述数据节点时,每个数据节点将与所述共识节点建立连接,若成 功建立连接且正常运行,说明该数据节点部署成功,若未能建立连接或运行出现异常,说明该数据节点存在异常,需要排除该数据节点的异常并对该数据节点重新进行部署和启动。类似地,假设所有共识节点和所有数据节点全部部署成功和启动,未出现异常状态,则说明所有共识节点和所有数据节点部署成功,将开始进行所述客户端节点的部署和启动。在启动所述客户端节点时,每个客户端节点将与至少一个所述数据节点建立连接,若成功建立连接且正常运行,说明该客户端节点部署成功,若未能建立连接或运行出现异常,说明该客户端节点存在异常,需要排除该客户端节点的异常并对该客户端节点重新进行部署和启动。In step S310, the deployment module 120 sequentially deploys and starts the consensus node, the data node and the client node according to the configuration file. Specifically, the deployment module 120 should first complete the concurrent deployment and startup of the consensus node, then complete the concurrent deployment and startup of the data node, and finally concurrently deploy and start the client node. Assuming that all the consensus nodes are successfully deployed and started, and no abnormal state occurs, it means that all the consensus nodes are successfully deployed, and the deployment and startup of the data nodes will begin. When the data node is started, each data node will establish a connection with the consensus node. If the connection is successfully established and is operating normally, the data node is successfully deployed. If the connection is not established or the operation is abnormal, the data node If there is an abnormality, it is necessary to eliminate the abnormality of the data node and redeploy and start the data node. Similarly, assuming that all consensus nodes and all data nodes are successfully deployed and started, and no abnormal state occurs, it means that all consensus nodes and all data nodes are successfully deployed, and the deployment and startup of the client nodes will begin. When starting the client node, each client node will establish a connection with at least one of the data nodes. If the connection is successfully established and is operating normally, the deployment of the client node is successful. If the connection is not established or the operation is abnormal , Indicating that there is an abnormality in the client node, it is necessary to eliminate the abnormality of the client node and redeploy and start the client node.
在其他实施例中,区块链节点的配置信息还可以包括请求建立连接的时间阈值,当在该时间阈值内对应的区块链节点间未能成功建立连接。In other embodiments, the configuration information of the blockchain node may also include a time threshold for requesting to establish a connection, when the connection between the corresponding blockchain nodes cannot be successfully established within the time threshold.
按照共识节点、数据节点和客户端节点的先后顺序对区块链节点进行部署,是为了保证在后部署的节点不会对在先部署的节点产生影响,当发现存在异常的区块链节点时,只需排除该区块链节点的异常状态,重新部署和启动该区块链节点即可,无须重新部署其他区块链节点。Deploy the blockchain nodes in the order of consensus nodes, data nodes, and client nodes to ensure that nodes deployed later will not affect the nodes deployed earlier. When an abnormal blockchain node is found , Just eliminate the abnormal state of the blockchain node, redeploy and start the blockchain node, without redeploying other blockchain nodes.
在本实施例中,通过设置并发部署阈值限制并发部署同种类型区块链节点的并发数。电子设备1创建的每个进程可以负责部署并启动一个区块链节点。通过并发部署同种类型的区块链节点,可以大大提高区块链节点的部署效率。In this embodiment, the concurrent deployment threshold is set to limit the number of concurrent deployment of the same type of blockchain nodes. Each process created by the electronic device 1 can be responsible for deploying and starting a blockchain node. By concurrently deploying the same type of blockchain nodes, the deployment efficiency of blockchain nodes can be greatly improved.
步骤S320,利用所述监控模块130监控所述共识节点、数据节点和客户端节点的部署和启动,当发现异常状态时,暂停步骤S310中后续区块链节点的部署和启动(无需中断正在部署和启动的区块链节点),利用所述删除模块140删除所述异常状态对应的区块链节点的配置文件和所有进程,重新部署和启动该区块链节点,在该区块链节点部署成功后,继续执行步骤S310。具体地,可以利用区块链节点的日志监控区块链节点的部署和启动,通过设置报警关键字(例如“error”),当所述日志中出现该报警关键字时,自动暂停所述共识节点、数据节点或客户端节点的部署和启动,根据出现该报警关键字的日志所属的区块链节点,定位存在异常的区块链节点,根据该报警关键字所在行信息,确定该区块链节点的异常状态,继而排除该异常状态,例如,可以通过删除该区块链节点的配置文件和所有进程(包括容器和镜像),然后重新部署 和启动该区块链节点来排除异常状态。在确定该区块链节点部署成功后,继续执行所述步骤S310。Step S320: Use the monitoring module 130 to monitor the deployment and startup of the consensus nodes, data nodes, and client nodes. When an abnormal state is found, suspend the deployment and startup of subsequent blockchain nodes in step S310 (without interrupting the deployment being deployed And the activated blockchain node), using the deletion module 140 to delete the configuration file and all processes of the blockchain node corresponding to the abnormal state, redeploy and start the blockchain node, and deploy on the blockchain node After success, proceed to step S310. Specifically, the log of the blockchain node can be used to monitor the deployment and startup of the blockchain node. By setting an alarm keyword (such as "error"), when the alarm keyword appears in the log, the consensus is automatically suspended The deployment and startup of nodes, data nodes or client nodes, locate the abnormal blockchain node according to the blockchain node of the log where the alarm keyword appears, and determine the block based on the row information of the alarm keyword The abnormal state of the chain node is then excluded. For example, the abnormal state can be eliminated by deleting the configuration file and all processes (including containers and mirrors) of the blockchain node, and then redeploying and starting the blockchain node. After it is determined that the blockchain node is successfully deployed, the step S310 is continued.
参照图4所示,为本申请区块链节点的部署方法的步骤S310的细化流程示意图,所述步骤S310包括以下步骤:Referring to FIG. 4, a detailed flowchart of step S310 of the deployment method of a blockchain node of this application is shown, and the step S310 includes the following steps:
步骤S311,所述共识节点部署单元121根据各个共识节点的配置文件部署和启动所述共识节点。因为共识节点的数量往往较少,所以电子设备1可以创建与所需部署和启动的共识节点的数量相同的进程来负责所述共识节点的部署和启动,每个进程负责部署和启动一个共识节点。在确定所有所述共识节点部署成功后,执行步骤S312。In step S311, the consensus node deployment unit 121 deploys and starts the consensus node according to the configuration file of each consensus node. Because the number of consensus nodes is often small, the electronic device 1 can create the same process as the number of consensus nodes that need to be deployed and started to be responsible for the deployment and start of the consensus node, and each process is responsible for deploying and starting a consensus node . After it is determined that all the consensus nodes are successfully deployed, step S312 is executed.
步骤S312,所述数据节点部署单元122根据各个数据节点的配置文件部署和启动所述数据节点。因为数据节点的数量往往较多,所以电子设备1可以根据数据节点的数量创建或分批创建进程数量不大于所述并发部署阈值的进程来负责所述数据节点的部署和启动,每个进程负责部署和启动一个数据节点。在确定所有所述数据节点部署成功后,执行步骤S313。In step S312, the data node deployment unit 122 deploys and starts the data node according to the configuration file of each data node. Because the number of data nodes is often large, the electronic device 1 can create processes according to the number of data nodes or create processes in batches that are not greater than the concurrent deployment threshold to be responsible for the deployment and startup of the data nodes, and each process is responsible for Deploy and start a data node. After it is determined that all the data nodes are successfully deployed, step S313 is executed.
步骤S312,所述客户端节点部署单元123根据各个客户端节点的配置文件部署和启动所述客户端节点。因为客户端节点的数量往往很多,所以电子设备1可以根据客户端节点的数量分批创建进程数量不大于所述并发部署阈值的进程来负责所述客户端节点的部署和启动,每个进程负责部署和启动一个客户端节点。In step S312, the client node deployment unit 123 deploys and starts the client node according to the configuration file of each client node. Because the number of client nodes is often large, the electronic device 1 can create processes in which the number of processes is not greater than the concurrent deployment threshold according to the number of client nodes to be responsible for the deployment and startup of the client nodes, and each process is responsible for Deploy and start a client node.
可根据区块链节点的日志判断所述共识节点、数据节点和客户端节点是否部署成功,具体请参照上述关于图3的相关介绍,在此不再赘述。It can be judged whether the consensus node, data node, and client node are successfully deployed according to the log of the blockchain node. For details, please refer to the relevant introduction of FIG. 3 above, which will not be repeated here.
此外,本申请还提供一种计算机可读存储介质,该计算机可读存储介质可以为非易失性计算机可读存储介质,也可以为易失性计算机可读存储介质。计算机可读存储介质存储有计算机指令,当所述计算机指令在计算机上运行时,使得计算机执行如下步骤:In addition, the present application also provides a computer-readable storage medium, which may be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium. The computer-readable storage medium stores computer instructions, and when the computer instructions are executed on the computer, the computer executes the following steps:
配置文件获取步骤:获取每个区块链节点的配置文件,其中,所述区块链节点包括共识节点、数据节点和客户端节点;Configuration file obtaining step: obtaining configuration files of each blockchain node, where the blockchain nodes include consensus nodes, data nodes, and client nodes;
共识节点部署步骤:根据各个共识节点的配置文件部署和启动所述共识节点;Consensus node deployment steps: deploy and start the consensus node according to the configuration file of each consensus node;
数据节点部署步骤:在所有所述共识节点部署成功后,根据各个数据节点的配置文件部署和启动所述数据节点;及Data node deployment steps: after all the consensus nodes are successfully deployed, deploy and start the data nodes according to the configuration files of each data node; and
客户端节点部署步骤:在所有所述数据节点部署成功后,根据各个客户端节点的配置文件部署和启动所述客户端节点。Client node deployment steps: After all the data nodes are successfully deployed, deploy and start the client nodes according to the configuration files of each client node.
其具体实施方式与上述区块链节点的部署方法和电子设备1的具体实施方式大致相同,请参照上述图1关于电子设备1实施例的示意图以及图3、图4关于区块链节点的部署方法实施例的流程图的详细介绍,在此不再赘述。The specific implementation is roughly the same as the deployment method of the blockchain node and the specific implementation of the electronic device 1. Please refer to the schematic diagram of the embodiment of the electronic device 1 in Figure 1 and Figure 3 and Figure 4 on the deployment of the blockchain node. The detailed introduction of the flowchart of the method embodiment will not be repeated here.
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、装置、物品或者方法不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、装置、物品或者方法所固有的要素。另外,各个实施例之间的技术方案可以相互结合,但是必须是以本领域普通技术人员能够实现为基础,当技术方案的结合出现相互矛盾或无法实现时应当认为这种技术方案的结合不存在,也不在本申请要求的保护范围之内。It should be noted that in this article, the terms "including", "including" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, device, article or method including a series of elements not only includes those elements, It also includes other elements that are not explicitly listed, or elements inherent to the process, device, article, or method. In addition, the technical solutions between the various embodiments can be combined with each other, but it must be based on what can be achieved by a person of ordinary skill in the art. When the combination of technical solutions is contradictory or cannot be achieved, it should be considered that such a combination of technical solutions does not exist. , Not within the scope of protection required by this application.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在如上所述的一个存储介质中,包括若干指令用以使得电子装置执行本申请各个实施例所述的方法。Through the description of the above embodiments, those skilled in the art can clearly understand that the method of the above embodiments can be implemented by means of software plus the necessary general hardware platform. Of course, it can also be implemented by hardware, but in many cases the former is better.的实施方式。 Based on this understanding, the technical solution of the present application essentially or the part that contributes to the prior art can be embodied in the form of a software product. The computer software product is stored in a storage medium as described above and includes several instructions. It is used to make the electronic device execute the method described in each embodiment of the present application.
以上仅为本申请的优选实施例,并非因此限制本申请的专利范围,凡是利用本申请说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本申请的专利保护范围内。The above are only preferred embodiments of this application, and do not limit the scope of this application. Any equivalent structure or equivalent process transformation made using the content of the description and drawings of this application, or directly or indirectly used in other related technical fields , The same reason is included in the scope of patent protection of this application.

Claims (20)

  1. 一种区块链节点的部署方法,所述区块链节点的部署方法包括:A method for deploying blockchain nodes, the method for deploying blockchain nodes includes:
    配置文件获取步骤:获取每个区块链节点的配置文件,其中,所述区块链节点包括共识节点、数据节点和客户端节点;Configuration file obtaining step: obtaining configuration files of each blockchain node, where the blockchain nodes include consensus nodes, data nodes, and client nodes;
    共识节点部署步骤:根据各个共识节点的配置文件部署和启动所述共识节点;Consensus node deployment steps: deploy and start the consensus node according to the configuration file of each consensus node;
    数据节点部署步骤:在所有所述共识节点部署成功后,根据各个数据节点的配置文件部署和启动所述数据节点;及Data node deployment steps: after all the consensus nodes are successfully deployed, deploy and start the data nodes according to the configuration files of each data node; and
    客户端节点部署步骤:在所有所述数据节点部署成功后,根据各个客户端节点的配置文件部署和启动所述客户端节点。Client node deployment steps: After all the data nodes are successfully deployed, deploy and start the client nodes according to the configuration files of each client node.
  2. 如权利要求1所述的区块链节点的部署方法,所述配置文件获取步骤包括:The method for deploying blockchain nodes according to claim 1, wherein the configuration file obtaining step comprises:
    为所述每个区块链节点分配一个唯一的节点标识;Allocating a unique node identifier for each blockchain node;
    获取与该节点标识对应的配置信息,所述配置信息包括节点身份信息、节点IP地址和节点端口信息;及Obtaining configuration information corresponding to the node identifier, the configuration information including node identity information, node IP address, and node port information; and
    将所述配置信息写入所述每个区块链节点的配置文件中。The configuration information is written into the configuration file of each blockchain node.
  3. 如权利要求1或2所述的区块链节点的部署方法,该方法还包括:The method for deploying blockchain nodes according to claim 1 or 2, the method further comprising:
    利用区块链节点的日志监控所述共识节点、数据节点和客户端节点的部署和启动;Use the logs of blockchain nodes to monitor the deployment and startup of the consensus nodes, data nodes and client nodes;
    当所述日志中出现预设类型的错误信息时,暂停所述共识节点、数据节点或客户端节点的部署和启动,删除所述错误信息对应的区块链节点的配置文件和所有进程,重新部署和启动该对应的区块链节点。When a preset type of error message appears in the log, suspend the deployment and startup of the consensus node, data node or client node, delete the configuration file and all processes of the blockchain node corresponding to the error message, and restart Deploy and start the corresponding blockchain node.
  4. 如权利要求3所述的区块链节点的部署方法,所述区块链节点的部署方法还包括:The method for deploying blockchain nodes according to claim 3, the method for deploying blockchain nodes further comprises:
    同种类型的区块链节点的所述部署和启动并发进行。The deployment and startup of the same type of blockchain nodes are performed concurrently.
  5. 如权利要求4所述的区块链节点的部署方法,所述区块链节点的部署方法还包括:The method for deploying blockchain nodes according to claim 4, the method for deploying blockchain nodes further comprises:
    通过设置并发部署阈值限制并发部署和启动同种类型的区块链节点的最大并发数。Limit the maximum number of concurrent deployments and startups of the same type of blockchain nodes by setting the concurrent deployment threshold.
  6. 一种区块链节点的部署装置,所述区块链节点的部署装置包括:A deployment device for blockchain nodes, the deployment device for blockchain nodes includes:
    配置模块,用于获取每个区块链节点的配置文件,其中,所述区块链节点包括共识节点、数据节点和客户端节点;The configuration module is used to obtain the configuration file of each block chain node, where the block chain node includes a consensus node, a data node and a client node;
    部署模块,包括:Deployment modules, including:
    共识节点部署单元,用于根据各个共识节点的配置文件部署和启动所述共识节点;The consensus node deployment unit is used to deploy and start the consensus node according to the configuration file of each consensus node;
    数据节点部署单元,用于在所有所述共识节点部署成功后,根据各个数据节点的配置文件部署和启动所述数据节点;及The data node deployment unit is used to deploy and start the data node according to the configuration file of each data node after all the consensus nodes are successfully deployed; and
    客户端节点部署单元,用于在所有所述数据节点部署成功后,根据各个客户端节点的配置文件部署和启动所述客户端节点。The client node deployment unit is configured to deploy and start the client node according to the configuration file of each client node after all the data nodes are successfully deployed.
  7. 如权利要求6所述的区块链节点的部署装置,所述配置模块具体用于:The device for deploying blockchain nodes according to claim 6, wherein the configuration module is specifically configured to:
    为所述每个区块链节点分配一个唯一的节点标识;Allocating a unique node identifier for each blockchain node;
    获取与该节点标识对应的配置信息,所述配置信息包括节点身份信息、节点IP地址和节点端口信息;及Obtaining configuration information corresponding to the node identifier, the configuration information including node identity information, node IP address, and node port information; and
    将所述配置信息写入所述每个区块链节点的配置文件中。The configuration information is written into the configuration file of each blockchain node.
  8. 如权利要求6或7所述的区块链节点的部署装置,所述区块链节点的部署装置还包括:The deployment device for blockchain nodes according to claim 6 or 7, the deployment device for blockchain nodes further comprising:
    监控模块,用于利用区块链节点的日志监控所述共识节点、数据节点和客户端节点的部署和启动;The monitoring module is used to monitor the deployment and startup of the consensus node, data node and client node by using the log of the blockchain node;
    删除模块,用于当所述日志中出现预设类型的错误信息时,暂停所述共识节点、数据节点或客户端节点的部署和启动,删除所述错误信息对应的区块链节点的配置文件和所有进程,重新部署和启动该对应的区块链节点。The delete module is used to suspend the deployment and startup of the consensus node, data node or client node when a preset type of error message appears in the log, and delete the configuration file of the blockchain node corresponding to the error message With all processes, redeploy and start the corresponding blockchain node.
  9. 如权利要求8所述的区块链节点的部署装置,所述部署模块具体用于:According to the deployment device of a blockchain node according to claim 8, the deployment module is specifically configured to:
    同种类型的区块链节点的所述部署和启动并发进行。The deployment and startup of the same type of blockchain nodes are performed concurrently.
  10. 如权利要求9所述的区块链节点的部署装置,所述部署模块还具体用于:According to the deployment device of a blockchain node according to claim 9, the deployment module is further specifically configured to:
    通过设置并发部署阈值限制并发部署和启动同种类型的区块链节点的最大并发数。Limit the maximum number of concurrent deployments and startups of the same type of blockchain nodes by setting the concurrent deployment threshold.
  11. 一种区块链节点的部署设备,包括存储器、处理器及存储在所述存储器上并可在所述处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现如下步骤:A deployment device for a blockchain node includes a memory, a processor, and a computer program stored on the memory and capable of running on the processor, and the processor implements the following steps when the processor executes the computer program:
    配置文件获取步骤:获取每个区块链节点的配置文件,其中,所述区块链节点包括共识节点、数据节点和客户端节点;Configuration file obtaining step: obtaining configuration files of each blockchain node, where the blockchain nodes include consensus nodes, data nodes, and client nodes;
    共识节点部署步骤:根据各个共识节点的配置文件部署和启动所述共识节点;Consensus node deployment steps: deploy and start the consensus node according to the configuration file of each consensus node;
    数据节点部署步骤:在所有所述共识节点部署成功后,根据各个数据节点的配置文件部署和启动所述数据节点;及Data node deployment steps: after all the consensus nodes are successfully deployed, deploy and start the data nodes according to the configuration files of each data node; and
    客户端节点部署步骤:在所有所述数据节点部署成功后,根据各个客户端节点的配置文件部署和启动所述客户端节点。Client node deployment steps: After all the data nodes are successfully deployed, deploy and start the client nodes according to the configuration files of each client node.
  12. 如权利要求11所述的区块链节点的部署设备,所述处理器执行所述计算机程序实现所述配置文件获取步骤时,包括以下步骤:The deployment device of a blockchain node according to claim 11, when the processor executes the computer program to implement the configuration file obtaining step, it comprises the following steps:
    为所述每个区块链节点分配一个唯一的节点标识;Allocating a unique node identifier for each blockchain node;
    获取与该节点标识对应的配置信息,所述配置信息包括节点身份信息、节点IP地址和节点端口信息;及Obtaining configuration information corresponding to the node identifier, the configuration information including node identity information, node IP address, and node port information; and
    将所述配置信息写入所述每个区块链节点的配置文件中。The configuration information is written into the configuration file of each blockchain node.
  13. 如权利要求11或12所述的区块链节点的部署设备,所述处理器执行 所述计算机程序实现所述区块链节点的部署方法时,包括以下步骤:The deployment device of a blockchain node according to claim 11 or 12, when the processor executes the computer program to implement the deployment method of the blockchain node, the method includes the following steps:
    利用区块链节点的日志监控所述共识节点、数据节点和客户端节点的部署和启动;Use the logs of blockchain nodes to monitor the deployment and startup of the consensus nodes, data nodes and client nodes;
    当所述日志中出现预设类型的错误信息时,暂停所述共识节点、数据节点或客户端节点的部署和启动,删除所述错误信息对应的区块链节点的配置文件和所有进程,重新部署和启动该对应的区块链节点。When a preset type of error message appears in the log, suspend the deployment and startup of the consensus node, data node or client node, delete the configuration file and all processes of the blockchain node corresponding to the error message, and restart Deploy and start the corresponding blockchain node.
  14. 如权利要求13所述的区块链节点的部署设备,所述处理器执行所述计算机程序实现所述区块链节点的部署方法时,包括以下步骤:The deployment device of a blockchain node according to claim 13, when the processor executes the computer program to implement the deployment method of the blockchain node, the method includes the following steps:
    同种类型的区块链节点的所述部署和启动并发进行。The deployment and startup of the same type of blockchain nodes are performed concurrently.
  15. 如权利要求14所述的区块链节点的部署设备,所述处理器执行所述计算机程序实现所述区块链节点的部署方法时,包括以下步骤:The deployment device of a blockchain node according to claim 14, when the processor executes the computer program to implement the deployment method of the blockchain node, the method includes the following steps:
    通过设置并发部署阈值限制并发部署和启动同种类型的区块链节点的最大并发数。Limit the maximum number of concurrent deployments and startups of the same type of blockchain nodes by setting the concurrent deployment threshold.
  16. 一种计算机可读存储介质,所述计算机可读存储介质中存储计算机指令,当所述计算机指令在计算机上运行时,使得计算机执行如下步骤:A computer-readable storage medium that stores computer instructions, and when the computer instructions are executed on a computer, the computer executes the following steps:
    配置文件获取步骤:获取每个区块链节点的配置文件,其中,所述区块链节点包括共识节点、数据节点和客户端节点;Configuration file obtaining step: obtaining configuration files of each blockchain node, where the blockchain nodes include consensus nodes, data nodes, and client nodes;
    共识节点部署步骤:根据各个共识节点的配置文件部署和启动所述共识节点;Consensus node deployment steps: deploy and start the consensus node according to the configuration file of each consensus node;
    数据节点部署步骤:在所有所述共识节点部署成功后,根据各个数据节点的配置文件部署和启动所述数据节点;及Data node deployment steps: after all the consensus nodes are successfully deployed, deploy and start the data nodes according to the configuration files of each data node; and
    客户端节点部署步骤:在所有所述数据节点部署成功后,根据各个客户端节点的配置文件部署和启动所述客户端节点。Client node deployment steps: After all the data nodes are successfully deployed, deploy and start the client nodes according to the configuration files of each client node.
  17. 如权利要求16所述的计算机可读存储介质,当所述计算机指令在计算机上运行所述配置文件获取步骤时,使得计算机执行如下步骤:16. The computer-readable storage medium according to claim 16, when the computer instruction executes the configuration file obtaining step on the computer, the computer executes the following steps:
    为所述每个区块链节点分配一个唯一的节点标识;Allocating a unique node identifier for each blockchain node;
    获取与该节点标识对应的配置信息,所述配置信息包括节点身份信息、节点IP地址和节点端口信息;及Obtaining configuration information corresponding to the node identifier, the configuration information including node identity information, node IP address, and node port information; and
    将所述配置信息写入所述每个区块链节点的配置文件中。The configuration information is written into the configuration file of each blockchain node.
  18. 如权利要求16或17所述的计算机可读存储介质,当所述计算机指令在计算机上运行区块链节点的部署方法的步骤时,使得计算机执行如下步骤:The computer-readable storage medium according to claim 16 or 17, when the computer instructions run the steps of the blockchain node deployment method on the computer, the computer is caused to execute the following steps:
    利用区块链节点的日志监控所述共识节点、数据节点和客户端节点的部署和启动;Use the logs of blockchain nodes to monitor the deployment and startup of the consensus nodes, data nodes and client nodes;
    当所述日志中出现预设类型的错误信息时,暂停所述共识节点、数据节点或客户端节点的部署和启动,删除所述错误信息对应的区块链节点的配置文件和所有进程,重新部署和启动该对应的区块链节点。When a preset type of error message appears in the log, suspend the deployment and startup of the consensus node, data node or client node, delete the configuration file and all processes of the blockchain node corresponding to the error message, and restart Deploy and start the corresponding blockchain node.
  19. 如权利要求18所述的计算机可读存储介质,当所述计算机指令在计算机上运行区块链节点的部署方法的步骤时,使得计算机执行如下步骤:The computer-readable storage medium according to claim 18, when the computer instructions run the steps of the blockchain node deployment method on the computer, the computer is caused to perform the following steps:
    同种类型的区块链节点的所述部署和启动并发进行。The deployment and startup of the same type of blockchain nodes are performed concurrently.
  20. 如权利要求19所述的计算机可读存储介质,当所述计算机指令在计算机上运行区块链节点的部署方法的步骤时,使得计算机执行如下步骤:The computer-readable storage medium according to claim 19, when the computer instructions run the steps of the blockchain node deployment method on the computer, the computer is caused to perform the following steps:
    通过设置并发部署阈值限制并发部署和启动同种类型的区块链节点的最大并发数。Limit the maximum number of concurrent deployments and startups of the same type of blockchain nodes by setting the concurrent deployment threshold.
PCT/CN2019/120650 2019-05-06 2019-11-25 Blockchain node depolyment method, device and equipment, and storage medium WO2020224238A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910371483.9A CN110224854B (en) 2019-05-06 2019-05-06 Block chain node deployment method and device and storage medium
CN201910371483.9 2019-05-06

Publications (1)

Publication Number Publication Date
WO2020224238A1 true WO2020224238A1 (en) 2020-11-12

Family

ID=67820472

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/120650 WO2020224238A1 (en) 2019-05-06 2019-11-25 Blockchain node depolyment method, device and equipment, and storage medium

Country Status (2)

Country Link
CN (1) CN110224854B (en)
WO (1) WO2020224238A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114363336A (en) * 2021-12-31 2022-04-15 支付宝(杭州)信息技术有限公司 Method and device for starting/closing block link point service

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110224854B (en) * 2019-05-06 2022-04-12 深圳壹账通智能科技有限公司 Block chain node deployment method and device and storage medium
CN110601896B (en) * 2019-09-20 2021-08-24 腾讯科技(深圳)有限公司 Data processing method and equipment based on block chain nodes
CN110855791B (en) * 2019-11-18 2021-07-27 腾讯科技(深圳)有限公司 Block link point deployment method and related equipment
CN111245910B (en) * 2019-12-31 2022-04-19 杭州趣链科技有限公司 Block chain light node multi-copy deployment method
CN111786818B (en) * 2020-06-16 2023-04-18 杭州溪塔科技有限公司 Block chain consensus node state monitoring method and device
CN112398908B (en) * 2020-10-20 2023-04-07 杭州云象网络技术有限公司 Block chain network node deleting method, system, storage medium and device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180123779A1 (en) * 2016-11-01 2018-05-03 Jiangang Zhang Flexible Blockchain Smart-Contract Deployment
CN108763302A (en) * 2018-04-19 2018-11-06 深圳市网心科技有限公司 Block chain common recognition processing method, electronic device and computer readable storage medium
CN108769258A (en) * 2018-06-29 2018-11-06 上海点融信息科技有限责任公司 Method and apparatus for block chain network to be hosted in block chain application platform
CN109218079A (en) * 2018-08-16 2019-01-15 北京京东尚科信息技术有限公司 A kind of block chain network, dispositions method and storage medium
CN110224854A (en) * 2019-05-06 2019-09-10 深圳壹账通智能科技有限公司 Dispositions method, device and the storage medium of block chain node

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103188335A (en) * 2011-12-28 2013-07-03 英业达股份有限公司 Node deployment method and server system using by same
CN108964982B (en) * 2018-06-13 2021-07-09 众安信息技术服务有限公司 Method, apparatus and storage medium for enabling deployment of multiple nodes of a blockchain
CN108881476A (en) * 2018-07-16 2018-11-23 众安信息技术服务有限公司 Block chain dispositions method and system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180123779A1 (en) * 2016-11-01 2018-05-03 Jiangang Zhang Flexible Blockchain Smart-Contract Deployment
CN108763302A (en) * 2018-04-19 2018-11-06 深圳市网心科技有限公司 Block chain common recognition processing method, electronic device and computer readable storage medium
CN108769258A (en) * 2018-06-29 2018-11-06 上海点融信息科技有限责任公司 Method and apparatus for block chain network to be hosted in block chain application platform
CN109218079A (en) * 2018-08-16 2019-01-15 北京京东尚科信息技术有限公司 A kind of block chain network, dispositions method and storage medium
CN110224854A (en) * 2019-05-06 2019-09-10 深圳壹账通智能科技有限公司 Dispositions method, device and the storage medium of block chain node

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114363336A (en) * 2021-12-31 2022-04-15 支付宝(杭州)信息技术有限公司 Method and device for starting/closing block link point service

Also Published As

Publication number Publication date
CN110224854B (en) 2022-04-12
CN110224854A (en) 2019-09-10

Similar Documents

Publication Publication Date Title
WO2020224238A1 (en) Blockchain node depolyment method, device and equipment, and storage medium
CN102736978B (en) A kind of method and device detecting the installment state of application program
WO2019100605A1 (en) Platform-as-a-service paas container platform construction method, server, system, and storage medium
US9386079B2 (en) Method and system of virtual desktop infrastructure deployment studio
WO2019148722A1 (en) Electronic device, data migrating and calling method and storage medium
WO2018000607A1 (en) Method and electronic apparatus for identifying test case failure causes
US9268939B2 (en) Method and apparatus for determining virus-infected files
US10091225B2 (en) Network monitoring method and network monitoring device
WO2021169124A1 (en) Method and apparatus for installing software package to target host, and computer device
CN111563024A (en) Method and device for monitoring container process on host machine and computing equipment
US20170163787A1 (en) Method and electronic device for upgrading or downgrading system
WO2017076051A1 (en) Method and apparatus for acquiring superuser permission
CN111225064A (en) Ceph cluster deployment method, system, device and computer-readable storage medium
CN112818307A (en) User operation processing method, system, device and computer readable storage medium
CN110908837A (en) Application program exception handling method and device, electronic equipment and storage medium
CN110505246B (en) Client network communication detection method, device and storage medium
US9864651B2 (en) Receiving an update code prior to completion of a boot procedure
CN108494749B (en) Method, device and equipment for disabling IP address and computer readable storage medium
CN111832018A (en) Virus detection method, virus detection device, computer device and storage medium
CN110134546B (en) Batch restarting windows system method, electronic device and storage medium
US20200342109A1 (en) Baseboard management controller to convey data
CN110941516A (en) Operating system restoration method, device, equipment and storage medium
CN108259214B (en) Configuration command management method, device and machine-readable storage medium
CN113238778B (en) Method, system, equipment and medium for upgrading BIOS firmware
CN111654398B (en) Configuration updating method and device, computer equipment and readable storage medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19928042

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19928042

Country of ref document: EP

Kind code of ref document: A1

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205 DATED 18/03/2022)

122 Ep: pct application non-entry in european phase

Ref document number: 19928042

Country of ref document: EP

Kind code of ref document: A1