CN110224854B - Block chain node deployment method and device and storage medium - Google Patents

Block chain node deployment method and device and storage medium Download PDF

Info

Publication number
CN110224854B
CN110224854B CN201910371483.9A CN201910371483A CN110224854B CN 110224854 B CN110224854 B CN 110224854B CN 201910371483 A CN201910371483 A CN 201910371483A CN 110224854 B CN110224854 B CN 110224854B
Authority
CN
China
Prior art keywords
node
nodes
deployment
data
consensus
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
CN201910371483.9A
Other languages
Chinese (zh)
Other versions
CN110224854A (en
Inventor
褚镇飞
张伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
OneConnect Financial Technology Co Ltd Shanghai
Original Assignee
OneConnect Financial Technology Co Ltd Shanghai
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 OneConnect Financial Technology Co Ltd Shanghai filed Critical OneConnect Financial Technology Co Ltd Shanghai
Priority to CN201910371483.9A priority Critical patent/CN110224854B/en
Publication of CN110224854A publication Critical patent/CN110224854A/en
Priority to PCT/CN2019/120650 priority patent/WO2020224238A1/en
Application granted granted Critical
Publication of CN110224854B publication Critical patent/CN110224854B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Retry When Errors Occur (AREA)

Abstract

The invention relates to a block chain technology, and provides a block chain node deployment method, a block chain node deployment device and a computer-readable storage medium. The method comprises the following steps: acquiring a configuration file of each block chain node, wherein the block chain nodes comprise consensus nodes, data nodes and client nodes; sequentially deploying and starting the consensus node, the data node and the client node according to the configuration file; in the process of deploying and starting the consensus node, the data node and the client node, when error information of a preset type appears in a log of a block chain node, the deployment and the starting of the consensus node, the data node or the client node are suspended, a configuration file and all processes of the block chain node corresponding to the error information are deleted, and the corresponding block chain node is redeployed and started. By using the invention, the deployment difficulty of the blockchain nodes can be reduced, and the deployment efficiency of the blockchain nodes can be improved.

Description

Block chain node deployment method and device and storage medium
Technical Field
The present invention relates to the field of block chain technologies, and in particular, to a method and an apparatus for deploying block link points, and a computer-readable storage medium.
Background
A blockchain is generally understood to be a distributed ledger, which is also essentially a distributed computing and storage system. As the blockchain system often has numerous nodes and each node may be distributed across regions, deployment of the blockchain nodes, especially deployment of the nodes of the alliance chain system, is often extremely cumbersome, and once a node with a deployment error is found, a large number of related nodes may need to be redeployed.
Disclosure of Invention
In view of the foregoing, there is a need to provide a method, an apparatus, and a computer-readable storage medium for deploying blockchain nodes, which reduce the difficulty of deploying blockchain nodes, improve the efficiency of deploying blockchain nodes, and when finding a blockchain node with a deployment error, do not need to re-deploy other blockchain nodes.
In order to achieve the above object, the present invention provides a method for deploying a blockchain node, which is applied to an electronic device, and includes:
a configuration file obtaining step: acquiring a configuration file of each block chain node, wherein the block chain nodes comprise a common identification node, a data node and a client node;
deploying consensus nodes: deploying and starting the consensus nodes according to the configuration files of the consensus nodes;
a data node deployment step: after all the consensus nodes are deployed successfully, deploying and starting the data nodes according to the configuration files of the data nodes; and
client node deployment step: and after all the data nodes are successfully deployed, deploying and starting the client nodes according to the configuration files of the client nodes.
Preferably, the configuration file acquiring step includes:
allocating a unique node identifier for each block link point;
acquiring configuration information corresponding to the node identifier, wherein the configuration information comprises node identity information, a node IP address and node port information; and
and writing the configuration information into a configuration file of each block link point.
Preferably, the method further comprises:
monitoring deployment and startup of the consensus node, the data node and the client node by using logs of the blockchain nodes;
when the error information of a preset type appears in the log, the deployment and the starting of the consensus node, the data node or the client node are suspended, the configuration file and all processes of the block chain nodes corresponding to the error information are deleted, and the corresponding block chain nodes are redeployed and started.
Preferably, said deployment and initiation of blockchain nodes of the same type are performed concurrently.
Preferably, the maximum concurrent number of the block chain nodes of the same type are concurrently deployed and started is limited by setting a concurrent deployment threshold.
The present invention also provides an electronic device, which includes a memory and a processor, where the memory includes a deployment program of a blockchain node, and when executed by the processor, the deployment program of the blockchain node implements the following steps:
a configuration file obtaining step: acquiring a configuration file of each block chain node, wherein the block chain nodes comprise a common identification node, a data node and a client node;
deploying consensus nodes: deploying and starting the consensus nodes according to the configuration files of the consensus nodes;
a data node deployment step: after all the consensus nodes are deployed successfully, deploying and starting the data nodes according to the configuration files of the data nodes; and
client node deployment step: and after all the data nodes are successfully deployed, deploying and starting the client nodes according to the configuration files of the client nodes.
Preferably, the configuration file acquiring step includes:
allocating a unique node identifier for each block link point;
acquiring configuration information corresponding to the node identifier, wherein the configuration information comprises node identity information, a node IP address and node port information; and
and writing the configuration information into a configuration file of each block link point.
Preferably, the deployment program of the blockchain node, when executed by the processor, implements the steps of:
monitoring deployment and startup of the consensus node, the data node and the client node by using logs of the blockchain nodes;
when the error information of a preset type appears in the log, the deployment and the starting of the consensus node, the data node or the client node are suspended, the configuration file and all processes of the block chain nodes corresponding to the error information are deleted, and the corresponding block chain nodes are redeployed and started.
Preferably, said deployment and initiation of blockchain nodes of the same type are performed concurrently.
The present invention also provides a computer-readable storage medium, in which a deployment program of a blockchain node is stored, and when executed by the processor, the deployment program of the blockchain node implements the following steps:
a configuration file obtaining step: acquiring a configuration file of each block chain node, wherein the block chain nodes comprise a common identification node, a data node and a client node;
deploying consensus nodes: deploying and starting the consensus nodes according to the configuration files of the consensus nodes;
a data node deployment step: after all the consensus nodes are deployed successfully, deploying and starting the data nodes according to the configuration files of the data nodes; and
client node deployment step: and after all the data nodes are successfully deployed, deploying and starting the client nodes according to the configuration files of the client nodes.
The deployment method, the deployment device and the computer-readable storage medium of the block chain nodes provided by the invention have the advantages that by acquiring the configuration file of each block chain node, then deploying and starting the blockchain consensus node, the blockchain data node and the blockchain client node in sequence according to the configuration file, and in the process of deploying and starting the blockchain consensus node, the data node and the client node, monitoring the process by using the log of the blockchain node, when the error information of a preset type appears in the log, the deployment and the starting of the consensus node, the data node or the client node are suspended, the configuration file and all processes of the block chain nodes corresponding to the error information are deleted, the corresponding block chain nodes are re-deployed and started, deployment and startup of the consensus node, data node or client node then continues. Since the blockchain nodes are deployed and started according to the sequence of the consensus node, the data node and the client node, and the consensus node is successfully deployed and started when the data node is deployed, the consensus node is not affected when the data node is deployed in an error, and the consensus node and the data node are not affected when the client node is deployed in an error. Because the configuration file of each blockchain node exists independently, when one blockchain node is wrongly deployed, other nodes cannot be influenced. In summary, the present invention can reduce the deployment difficulty of the blockchain node, and when finding out a node with a deployment error, other nodes do not need to be re-deployed. Because the same type of block chain nodes can be deployed simultaneously, the invention can also improve the deployment efficiency of the block chain nodes.
Drawings
FIG. 1 is a diagram of an electronic device according to an embodiment of the invention;
FIG. 2 is a program module diagram of one embodiment of a deployment procedure for blockchain nodes in FIG. 1;
FIG. 3 is a flowchart of an embodiment of a block chain node deployment method according to the present invention;
fig. 4 is a detailed flowchart of step S310 in fig. 3.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention will be described in further detail with reference to several drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention. All other embodiments, which can be obtained by a person skilled in the art without any inventive step based on the embodiments of the present invention, are within the scope of the present invention.
The invention provides an electronic device. Fig. 1 is a schematic diagram of an electronic device 1 according to an embodiment of the invention. In this embodiment, the electronic device 1 may be connected to a blockchain node (not shown in the figure) through a network, and the electronic device 1 may be a server, a smart phone, a tablet computer, a portable computer, a desktop computer, or other terminal equipment with storage and operation functions. In one 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 rack server.
The electronic device 1 comprises a memory 11, a processor 12 and a network interface 13.
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 a flash memory, a hard disk, a multimedia card, a card-type memory, and the like. In some embodiments, the readable storage medium may be an internal storage unit of the electronic apparatus 1, such as a hard disk of the electronic apparatus 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, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, which are provided on the electronic device 1.
In this embodiment, the readable storage medium of the memory 11 is used for storing the deployment program 10 of the blockchain node and data generated during the deployment process of the blockchain nodes, such as configuration information of each blockchain node, a corresponding relationship between the configuration information and a blockchain node identifier, and the like. The memory 11 may also be used to temporarily store data that has been output or is to be output.
The processor 12 may be a Central Processing Unit (CPU), microprocessor or other data Processing chip, and is used for executing program codes stored in the memory 11 or Processing data, such as executing the deployment program 10 of the blockchain node.
The network interface 13 may include a standard wired interface, a wireless interface (e.g., WI-FI interface). Are typically used to establish a communication connection between the electronic apparatus 1 and other electronic devices, for example, a Certificate Authority (CA) and a consensus node, a data node, a client node, etc. of a block chain.
Fig. 1 only shows the electronic device 1 with components 11-13, but it is to be understood that not all of the shown components are required to be implemented, and that more or fewer components may alternatively be implemented.
Alternatively, the electronic apparatus 1 may further include an input unit such as a Keyboard (Keyboard), and a voice input device such as a Microphone (Microphone) or the like having a voice recognition function. The input unit and the input device may be used to edit and add/delete the deployment program 10 of the blockchain node.
Optionally, the electronic device 1 may further comprise a display, which may also be referred to as a display screen or a display unit. In some embodiments, the display device can be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an Organic Light-Emitting Diode (OLED) display, and the like. The display is used for displaying information processed in the electronic apparatus 1 and for displaying a visualized user interface.
The electronic device 1 may further include a Radio Frequency (RF) circuit, a sensor, an audio circuit, a wired interface, a wireless interface, and so on, which will not be described herein.
In the above embodiment, the block chain nodes include common identification nodes, data nodes and client nodes, and assuming that the software environments of all block chain nodes have been installed by using the prior art, that is, the operating system and application software of each block chain node have been installed, the following steps can be implemented when the processor 12 executes the deployment program 10 of the block chain nodes stored in the memory 11:
a configuration file obtaining step: acquiring a configuration file of each block chain node, wherein the block chain nodes comprise a common identification node, a data node and a client node;
deploying consensus nodes: deploying and starting the consensus nodes according to the configuration files of the consensus nodes;
a data node deployment step: after all the consensus nodes are deployed successfully, deploying and starting the data nodes according to the configuration files of the data nodes; and
client node deployment step: and after all the data nodes are successfully deployed, deploying and starting the client nodes according to the configuration files of the client nodes.
For detailed description of the above steps, please refer to the following description of fig. 2 regarding a program module diagram of an embodiment of the deployment program 10 of the blockchain node and fig. 3 and 4 regarding a flowchart of an embodiment of a deployment method of the blockchain node.
In other embodiments, the deployment program 10 of the blockchain node may be partitioned into a plurality of modules that are stored in the memory 12 and executed by the processor 13 to accomplish the present invention. The modules referred to herein are referred to as a series of computer program instruction segments capable of performing specified functions.
Referring to FIG. 2, a block diagram of an embodiment of a deployment program 10 for blockchain nodes in FIG. 1 is shown. In this embodiment, the deployment program 10 of the blockchain node may 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 allocate a unique node identifier to each block link point, acquire configuration information corresponding to the node identifier, and write the configuration information into a configuration file of each block link point. Wherein the blockchain nodes include a consensus node, a data node, and a client node. The client node is used for sending a request to the data node, the data node is used for receiving the request sent by the client and endorses and simulates the request to execute, and the consensus node is used for performing consensus processing on a request execution result and generating a block. 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 a blockchain node to prove that a blockchain node is legal. The node identifier may use a node IP address of a corresponding block chain node or another identifier capable of uniquely identifying the block chain node, and the format of the configuration file may be XML or JSON, which is not limited in the present invention.
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 nodes according to the configuration files of the respective consensus nodes, the data node deployment unit 122 is configured to deploy and start the data nodes according to the configuration files of the respective data nodes after all the consensus nodes are successfully deployed, and the client node deployment module 123 is configured to deploy and start the client nodes according to the configuration files of the respective client nodes after all the data nodes are successfully deployed.
In this embodiment, the deployment and the initiation of the consensus node, the data node and the client node can be performed concurrently, so as to improve the deployment efficiency of the blockchain nodes, especially the deployment efficiency of the data node and the client node, because the blockchain system usually includes a large number of data nodes and client nodes. Specifically, a concurrent deployment threshold may be set by the deployment module 120, so as to limit the maximum concurrent number of concurrent deployments and launching of blockchain nodes of the same type. The setting of the concurrent deployment threshold is influenced by the performance of the electronic device 1, and how many processes for deploying and starting block link points can be created by the electronic device 1, so that how large the concurrent deployment threshold can be set. For example, assuming that the electronic apparatus 1 may create 1000 processes for deploying and launching blockchain nodes, each process being responsible for deploying and launching one blockchain node, the concurrent deployment threshold may be set to 1000. By deploying the same type of block chain link points concurrently, the deployment efficiency of the block chain nodes can be greatly improved.
The monitoring module 130 is configured to monitor deployment and startup of the consensus node, the data node, and the client node. In this embodiment, the deployment and the startup of the consensus node, the data node and the client node are monitored by using the log of the blockchain node, for example, a preset type of error information, such as startup failure, abnormal operation, etc., may be monitored by setting an alarm key (e.g., "error"). When the blockchain nodes are deployed and started, if the alarm keywords appear in the logs of the blockchain nodes, the abnormal state appears in the deployment and starting process, and the blockchain nodes with the abnormal state need to be redeployed.
The deleting module 140 is configured to suspend the deployment and the startup of the consensus node, the data node, and the client node when the monitoring module 130 finds an abnormal state, delete the configuration file and all processes (including a container and an image) of the block link point corresponding to the abnormal state, deliver the block link point to the configuration module 110 and the deployment module 120, re-acquire and load the configuration file, and re-deploy and start the block link point.
In addition, the invention also provides a deployment method of the block chain nodes. Fig. 3 is a flowchart illustrating a block chain node deployment method according to an embodiment of the present invention. The processor 12 of the electronic apparatus 1, when executing the deployment program 10 of blockchain nodes stored in the memory 11, implements the following steps of the deployment method of blockchain nodes:
step S300, the configuration module 110 is used to obtain a configuration file for each block node. The block chain nodes comprise common identification nodes, data nodes and client nodes, and the configuration file comprises configuration information of each block chain node, such as node identity information, node IP addresses, node port information and the like.
Specifically, each block link point possesses a unique node identifier, the node identifier of each block link has a predetermined corresponding relationship with its configuration information, the node identifier may use a node IP address or other identifier capable of uniquely identifying a block link node, and the configuration information may be obtained from a predetermined configuration center. For example, the configuration center may obtain a digital certificate representing node identity information of each blockchain node from at least one predetermined CA, and the CAs 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 issued the digital certificate based on the node identification or node type. The configuration center may further obtain the node IP address of each blockchain node through a command "ifconfig | grep broadcast | awk '{ print $2}', where the node port information may be pre-agreed or may be obtained through a similar method, and details are not described herein again. After the configuration module 110 obtains the configuration information corresponding to each node identifier, the configuration information is written into the configuration file of each block node for the deployment module 120 to use.
Step S310, the deployment module 120 deploys and starts the consensus node, the data node and the client node in sequence according to the configuration file. Specifically, the deployment module 120 should complete the concurrent deployment and launching of the consensus node, then complete the concurrent deployment and launching of the data node, and then complete the concurrent deployment and launching of the client node. And assuming that all the consensus nodes are successfully deployed and started and no abnormal state occurs, indicating that all the consensus nodes are successfully deployed, and starting the deployment and the starting of the data nodes. When the data nodes are started, each data node is connected with the common identification node, if the connection is successfully established and the data nodes normally operate, the data nodes are successfully deployed, if the connection is not established or the operation is abnormal, the data nodes are abnormal, and the data nodes are required to be removed from the abnormal state and to be re-deployed and started. Similarly, assuming that all the consensus nodes and all the data nodes are deployed and started successfully and no abnormal state occurs, it indicates that all the consensus nodes and all the data nodes are deployed successfully, and the client node will be deployed and started. When the client nodes are started, each client node establishes connection with at least one data node, if the connection is successfully established and the data nodes are normally operated, the client nodes are successfully deployed, and if the connection is not established or the operation is abnormal, the client nodes are required to be removed from the abnormality, and the client nodes are re-deployed and started.
In other embodiments, the configuration information of the blockchain nodes may further include a time threshold for requesting to establish a connection, when the connection cannot be successfully established between the corresponding blockchain nodes within the time threshold.
The block chain nodes are deployed according to the sequence of the consensus node, the data node and the client node, so that the node deployed later can not influence the node deployed earlier, when the abnormal block chain link point is found, the abnormal state of the block chain link point is only required to be eliminated, the block chain link point is re-deployed and started, and other block chain nodes are not required to be re-deployed.
In this embodiment, the concurrent deployment number of blockchain nodes of the same type is limited by setting a concurrent deployment threshold. Each process created by the electronic apparatus 1 may be responsible for deploying and launching one blockchain node. By deploying the same type of block chain link points concurrently, the deployment efficiency of the block chain nodes can be greatly improved.
Step S320, monitoring the deployment and the start of the consensus node, the data node and the client node by using the monitoring module 130, when an abnormal state is found, suspending the deployment and the start of the subsequent block chain node in the step S310 (without interrupting the block chain node being deployed and started), deleting the configuration file and all processes of the block chain node corresponding to the abnormal state by using the deleting module 140, redeploying and starting the block chain node, and after the block chain node is successfully deployed, continuing to execute the step S310. Specifically, deployment and startup of a blockchain node may be monitored by using a log of the blockchain node, deployment and startup of the consensus node, the data node, or the client node may be automatically suspended by setting an alarm key (e.g., "error"), when the alarm key occurs in the log, the blockchain node with an abnormality may be located according to the blockchain node to which the log with the alarm key occurs, an abnormal state of the blockchain node may be determined according to the row information of the alarm key, and then the abnormal state may be excluded, for example, the abnormal state may be excluded by deleting a configuration file and all processes (including containers and images) of the blockchain node, and then redeploying and starting the blockchain node. After determining that the block link point is successfully deployed, the step S310 is continued.
Referring to fig. 4, a detailed flowchart of step S310 of the deployment method of blockchain nodes of the present invention is shown, where the step S310 includes the following steps:
in step S311, the consensus node deployment unit 121 deploys and starts the consensus nodes according to the configuration files of the respective consensus nodes. Since the number of consensus nodes tends to be small, the electronic apparatus 1 may create the same number of processes as the number of consensus nodes that need to be deployed and started, each process being responsible for deploying and starting one consensus node, to be responsible for the deployment and starting of the consensus nodes. After determining that all the consensus nodes are successfully deployed, step S312 is performed.
In step S312, the data node deployment unit 122 deploys and starts the data nodes according to the configuration files of the data nodes. Since the number of data nodes tends to be large, the electronic apparatus 1 may create or batch-create processes, each of which is responsible for deploying and launching one data node, with the number of processes not greater than the concurrent deployment threshold according to the number of data nodes to be responsible for deploying and launching the data nodes. After determining that all the data nodes are successfully deployed, executing step S313.
In step S312, the client node deployment unit 123 deploys and starts the client nodes according to the configuration files of the respective client nodes. Since the number of client nodes tends to be large, the electronic apparatus 1 can create processes, each responsible for deploying and launching one client node, in batches, with a number of processes not greater than the concurrent deployment threshold, according to the number of client nodes, to be responsible for the deployment and launching of the client nodes.
Whether the deployment of the consensus node, the data node, and the client node is successful may be determined according to the log of the blockchain node, which is specifically referred to the related description of fig. 3 and will not be described herein again.
Furthermore, the present invention also provides a computer readable storage medium, which can be any one or any combination of hard disk, multimedia card, SD card, flash memory card, SMC, Read Only Memory (ROM), Erasable Programmable Read Only Memory (EPROM), portable compact disc read only memory (CD-ROM), USB memory, and the like.
The computer readable storage medium of the present invention stores a deployment program of blockchain nodes, and when executed by the processor, the deployment program of blockchain nodes implements the following steps:
a configuration file obtaining step: acquiring a configuration file of each block chain node, wherein the block chain nodes comprise a common identification node, a data node and a client node;
deploying consensus nodes: deploying and starting the consensus nodes according to the configuration files of the consensus nodes;
a data node deployment step: after all the consensus nodes are deployed successfully, deploying and starting the data nodes according to the configuration files of the data nodes; and
client node deployment step: and after all the data nodes are successfully deployed, deploying and starting the client nodes according to the configuration files of the client nodes.
The specific implementation is substantially the same as the above-mentioned method for deploying a blockchain node and the specific implementation of the electronic device 1, please refer to the schematic diagram of fig. 1 regarding the embodiment of the electronic device 1 and detailed descriptions of the flowcharts of fig. 3 and fig. 4 regarding the embodiment of the method for deploying a blockchain node, which are not repeated herein.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, apparatus, article, or method that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, apparatus, article, or method. In addition, technical solutions between various embodiments may be combined with each other, but must be realized by a person skilled in the art, and when the technical solutions are contradictory or cannot be realized, such a combination should not be considered to exist, and is not within the protection scope of the present invention.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium as described above and includes several instructions for causing an electronic device to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (8)

1. A method for deploying block link points is applied to an electronic device, and is characterized by comprising the following steps:
a configuration file obtaining step: acquiring a configuration file of each block chain node, wherein the block chain nodes comprise a common identification node, a data node and a client node;
deploying consensus nodes: deploying and starting the consensus nodes according to the configuration files of the consensus nodes;
a data node deployment step: after all the consensus nodes are deployed successfully, deploying and starting the data nodes according to the configuration files of the data nodes; and
client node deployment step: after all the data nodes are deployed successfully, deploying and starting the client nodes according to the configuration files of the client nodes;
a monitoring step: monitoring deployment and startup of the consensus node, the data node and the client node by using logs of the blockchain nodes; when the error information of a preset type appears in the log, the deployment and the starting of the consensus node, the data node or the client node are suspended, the configuration file and all processes of the block chain nodes corresponding to the error information are deleted, the configuration file is obtained and loaded again based on the steps, and the corresponding block chain nodes are deployed and started again.
2. The method for deploying blockchain nodes according to claim 1, wherein the step of obtaining the configuration file includes:
allocating a unique node identifier for each block link point;
acquiring configuration information corresponding to the node identifier, wherein the configuration information comprises node identity information, a node IP address and node port information; and
and writing the configuration information into a configuration file of each block link point.
3. The method for deployment of blockchain nodes according to claim 1, wherein the deployment and the initiation of blockchain nodes of the same type are performed concurrently.
4. The method for deploying blockchain nodes according to claim 3, wherein a maximum number of concurrencies for concurrently deploying and starting blockchain nodes of the same type is limited by setting a concurrent deployment threshold.
5. An electronic device comprising a memory and a processor, wherein the memory includes a deployment program of a blockchain node, and when the deployment program of the blockchain node is executed by the processor, the method comprises the following steps:
a configuration file obtaining step: acquiring a configuration file of each block chain node, wherein the block chain nodes comprise a common identification node, a data node and a client node;
deploying consensus nodes: deploying and starting the consensus nodes according to the configuration files of the consensus nodes;
a data node deployment step: after all the consensus nodes are deployed successfully, deploying and starting the data nodes according to the configuration files of the data nodes; and
client node deployment step: after all the data nodes are deployed successfully, deploying and starting the client nodes according to the configuration files of the client nodes;
a monitoring step: monitoring deployment and startup of the consensus node, the data node and the client node by using logs of the blockchain nodes; when the error information of a preset type appears in the log, the deployment and the starting of the consensus node, the data node or the client node are suspended, the configuration file and all processes of the block chain nodes corresponding to the error information are deleted, the configuration file is obtained and loaded again based on the steps, and the corresponding block chain nodes are deployed and started again.
6. The electronic device of claim 5, wherein the configuration file obtaining step comprises:
allocating a unique node identifier for each block link point;
acquiring configuration information corresponding to the node identifier, wherein the configuration information comprises node identity information, a node IP address and node port information; and
and writing the configuration information into a configuration file of each block link point.
7. The electronic apparatus of claim 5, in which the deployment and initiation of blockchain nodes of a same type occur concurrently.
8. A computer-readable storage medium, characterized in that the computer-readable storage medium includes a deployment program of blockchain nodes, and the deployment program of blockchain nodes realizes the steps of the method for deploying blockchain nodes according to any one of claims 1 to 4 when executed.
CN201910371483.9A 2019-05-06 2019-05-06 Block chain node deployment method and device and storage medium Active CN110224854B (en)

Priority Applications (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
PCT/CN2019/120650 WO2020224238A1 (en) 2019-05-06 2019-11-25 Blockchain node depolyment method, device and equipment, and storage medium

Applications Claiming Priority (1)

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

Publications (2)

Publication Number Publication Date
CN110224854A CN110224854A (en) 2019-09-10
CN110224854B true CN110224854B (en) 2022-04-12

Family

ID=67820472

Family Applications (1)

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

Country Status (2)

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

Families Citing this family (7)

* 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
CN114363336A (en) * 2021-12-31 2022-04-15 支付宝(杭州)信息技术有限公司 Method and device for starting/closing block link point service

Citations (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
CN108881476A (en) * 2018-07-16 2018-11-23 众安信息技术服务有限公司 Block chain dispositions method and system
CN108964982A (en) * 2018-06-13 2018-12-07 众安信息技术服务有限公司 For realizing the method, apparatus and storage medium of the deployment of the multinode of block chain

Family Cites Families (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
CN108769258B (en) * 2018-06-29 2021-05-07 上海点融信息科技有限责任公司 Method and apparatus for hosting blockchain network to blockchain application platform
CN109218079B (en) * 2018-08-16 2021-09-10 北京京东尚科信息技术有限公司 Block chain network, deployment method and storage medium
CN110224854B (en) * 2019-05-06 2022-04-12 深圳壹账通智能科技有限公司 Block chain node deployment method and device and storage medium

Patent Citations (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
CN108964982A (en) * 2018-06-13 2018-12-07 众安信息技术服务有限公司 For realizing the method, apparatus and storage medium of the deployment of the multinode of block chain
CN108881476A (en) * 2018-07-16 2018-11-23 众安信息技术服务有限公司 Block chain dispositions method and system

Also Published As

Publication number Publication date
WO2020224238A1 (en) 2020-11-12
CN110224854A (en) 2019-09-10

Similar Documents

Publication Publication Date Title
CN110224854B (en) Block chain node deployment method and device and storage medium
CN108959385B (en) Database deployment method, device, computer equipment and storage medium
CN110266763B (en) Method, system and storage medium for implementing block chain network interconnected across network segments
JP6170900B2 (en) File processing method and apparatus
CN112613041A (en) Container mirror image detection method and device, electronic equipment and storage medium
US20180341769A1 (en) Threat detection method and threat detection device
CN106843947B (en) Method and device for processing code defects
CN111832018A (en) Virus detection method, virus detection device, computer device and storage medium
CN112328325A (en) Execution method and device of model file, terminal equipment and storage medium
CN110941516A (en) Operating system restoration method, device, equipment and storage medium
CN111654398B (en) Configuration updating method and device, computer equipment and readable storage medium
US9184996B2 (en) Thin client system, management server, client environment management method and program
CN112559131A (en) Method, device and equipment for updating container mirror image and computer readable storage medium
CN112583761A (en) Management method and device of security entity, computer equipment and storage medium
CN115460271B (en) Network control method and device based on edge calculation and storage medium
US9727378B2 (en) Persistent unenrollment for devices under management
CN113934453B (en) Risk detection method, risk detection device and storage medium
CN117112047B (en) USB equipment management and control method, equipment and storage medium
CN102111446A (en) Device connection handling method, combination equipment and host equipment
CN112148379A (en) Method, device, system and storage medium for uninstalling user contract of alliance chain
CN114610330A (en) Method, device and system for installing software and readable storage medium
CN107547751B (en) Media resource saving method, media resource saving device and terminal equipment
CN115859388A (en) Method and device for monitoring mobile hardware equipment, storage medium and electronic equipment
CN114363387A (en) Application pull-alive method and device, electronic equipment and storage medium
CN112328261A (en) Snowflake ID generation method, device, equipment and computer readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant