CN111104282B - Node processing method and device based on block chain - Google Patents

Node processing method and device based on block chain Download PDF

Info

Publication number
CN111104282B
CN111104282B CN201911172995.9A CN201911172995A CN111104282B CN 111104282 B CN111104282 B CN 111104282B CN 201911172995 A CN201911172995 A CN 201911172995A CN 111104282 B CN111104282 B CN 111104282B
Authority
CN
China
Prior art keywords
node
nodes
service
blockchain
abnormal
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
CN201911172995.9A
Other languages
Chinese (zh)
Other versions
CN111104282A (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.)
Zhongan Information Technology Service Co Ltd
Original Assignee
Zhongan Information Technology Service Co Ltd
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 Zhongan Information Technology Service Co Ltd filed Critical Zhongan Information Technology Service Co Ltd
Priority to CN201911172995.9A priority Critical patent/CN111104282B/en
Publication of CN111104282A publication Critical patent/CN111104282A/en
Application granted granted Critical
Publication of CN111104282B publication Critical patent/CN111104282B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/3006Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system is distributed, e.g. networked systems, clusters, multiprocessor systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/302Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is a software system
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • G06F16/275Synchronous replication
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

A method and apparatus for blockchain-based node processing, comprising a process of deploying a blockchain and a process of blockchain operation, the blockchain operation comprising: detecting nodes in the blockchain; when abnormal node service is detected, copying abnormal nodes according to a preset rule, connecting the copied nodes to the cluster of the block chain, and performing external service. The method and the device of the embodiment of the invention comprise the steps of copying abnormal nodes according to a preset rule when abnormal node service is detected, and connecting the copied nodes to the cluster of the blockchain for service. Because the node can be duplicated when the abnormal service of the node is detected, the running stability of the chain link point cluster is obviously improved, compared with the prior art that a reservation technician is required to handle the abnormal burst problem, the method and the device save labor and capital cost, and reduce the time for recovering the cluster to be normal when the burst problem occurs.

Description

Node processing method and device based on block chain
Technical Field
The present invention relates to blockchains, and in particular, to a blockchain-based node processing method and apparatus.
Background
At present, each node of the block chain has certain defects in the aspect of operation stability, in particular to a alliance chain, which mainly reflects the following aspects: the alliance chain adopting the Bayesian consensus mechanism needs n more than or equal to 3f+1 nodes to ensure the effectiveness of consensus, if nodes are intensively damaged or the processing capacity of the chain is greatly increased to be reduced or even down due to abnormal or malicious attack, the chain is not recovered in time, the collapse of the chain is caused, the service is influenced and even the enterprise is lost, and therefore, special reservation technicians are required to deal with abnormal burst problems.
Disclosure of Invention
The invention provides a node processing method and device based on a block chain, which can improve stability.
According to a first aspect of the present invention, there is provided a node processing method based on a blockchain, including a process of deploying the blockchain and a process of running the blockchain, the process of running the blockchain including:
detecting nodes in the blockchain;
when the abnormal node service is detected, the nodes are duplicated according to a preset rule, and the duplicated nodes are connected to the cluster of the block chain and are serviced outwards.
In the above method, when detecting that the node service is abnormal, copying the node according to a preset rule specifically includes:
when detecting that one or more nodes in the blockchain are abnormal in service, copying proxy nodes of the abnormal nodes, checking whether databases of the abnormal nodes are available, and if so, continuing to use the original databases to continue to serve outside; otherwise, the service is externally served after the synchronous data request is initiated to the node with normal service.
In the above method, when detecting that the node service is abnormal, copying the node according to a preset rule, further including:
copying the proxy node of each node on the blockchain when the detected number of the abnormal nodes reaches a threshold value, and connecting the proxy nodes of each node to obtain a virtual chain;
checking whether a database of nodes on the blockchain is available, if so, continuing to use the original database to continue to serve outside; otherwise, the service is externally served after the synchronous data request is initiated to the node with normal service.
In the above method, the node deployment process includes:
when a single node on the blockchain is deployed, a specified number of node clusters are automatically generated from the configuration file.
In the above method, the node anomaly includes:
the node service does not respond, the phishing algorithm verification does not meet the expected requirement, the consensus algorithm is illegal, the p2p node list appears the nodes ip and cpu utilization rate beyond the designated threshold value for a certain time, the memory utilization rate exceeds the designated threshold value for a certain time, the disk occupancy rate stays high for a long time and/or the node service threads occupy too many service ports.
According to a second aspect of the present invention, there is provided a node processing apparatus based on a blockchain, including a deployment module and an operation module, the operation module including:
the detection unit is used for detecting nodes in the block chain;
and the copying unit is used for copying the nodes according to a preset rule when the abnormal service of the nodes is detected, connecting the copied nodes to the cluster of the block chain and serving the outside.
In the above apparatus, the copying unit includes:
the first processing subunit is used for copying the proxy node of the abnormal node when detecting that one or more nodes in the blockchain are abnormal in service, and connecting the proxy node into a cluster of the current chain;
checking whether the database of the abnormal node is available, if so, continuing to use the original database to continue to serve outside; otherwise, the service is externally served after the synchronous data request is initiated to the node with normal service.
In the above apparatus, the copying unit further includes:
the second processing subunit is used for copying the proxy node of each node on the block chain when the detected number of the abnormal nodes reaches a threshold value, and connecting the proxy nodes of each node to obtain a virtual chain;
checking whether a database of nodes on the blockchain is available, if so, continuing to use the original database to continue to serve outside; otherwise, the service is externally served after the synchronous data request is initiated to the node with normal service.
In the above apparatus, the deployment module includes:
the deployment unit is used for automatically generating a specified number of node clusters according to the configuration file when single nodes on the blockchain are deployed.
According to a third aspect of the present invention, there is provided a blockchain-based node processing apparatus comprising:
a memory for storing a program;
and the processor is used for executing the program stored in the memory to realize the method.
Due to the adoption of the technical scheme, the invention has the beneficial effects that:
the method and the device of the embodiment of the invention comprise the steps of copying abnormal nodes according to a preset rule when abnormal node service is detected, and connecting the copied nodes to the cluster of the blockchain for service. Because the node can be duplicated when the abnormal service of the node is detected, the running stability of the chain link point cluster is obviously improved, compared with the prior art that a reservation technician is required to handle the abnormal burst problem, the method and the device save labor and capital cost, and reduce the time for recovering the cluster to be normal when the burst problem occurs.
Drawings
FIG. 1 is a flow chart of a method according to an embodiment of the invention in one implementation;
FIG. 2 is a schematic diagram of a proxy node replicating an exception node in one embodiment of the method of the present invention;
FIG. 3 is a schematic representation of a virtual chain replicated in one embodiment of the method of the present invention;
FIG. 4 is a schematic diagram of a single node augmented to multiple nodes;
FIG. 5 is a flow chart of a method according to an embodiment of the present invention in another implementation;
FIG. 6 is a schematic diagram of a program module of an apparatus according to a second embodiment of the present invention;
fig. 7 is a schematic diagram of a program module of an apparatus according to a second embodiment of the present invention.
Detailed Description
The invention will be described in further detail below with reference to the drawings by means of specific embodiments. This invention may be embodied in many different forms and is not limited to the implementations described in this example. The following detailed description is provided to facilitate a more thorough understanding of the present disclosure, in which words of upper, lower, left, right, etc., indicating orientations are used solely for the illustrated structure in the corresponding figures.
However, one skilled in the relevant art will recognize that the detailed description of one or more of the specific details may be omitted, or that other methods, components, or materials may be used. In some instances, some embodiments are not described or described in detail.
The numbering of the components itself, e.g. "first", "second", etc., is used herein merely to distinguish between the described objects and does not have any sequential or technical meaning.
Furthermore, the features and aspects described herein may be combined in any suitable manner in one or more embodiments. It will be readily understood by those skilled in the art that the steps or order of operation of the methods associated with the embodiments provided herein may also be varied. Thus, any order in the figures and examples is for illustrative purposes only and does not imply that a certain order is required unless explicitly stated that a certain order is required.
Embodiment one:
the node processing method based on the block chain comprises a process of deploying the block chain and a process of running the block chain. The process of the block chain operation, as shown in fig. 1, includes the following steps:
step 102: nodes in the blockchain are detected.
In the running scene of the block chain, the nodes in the block chain can be detected through a servo module, the servo module can be an independent daemon thread of the chain link point service, and can also be an independent process or service outside the independent chain link point, and the function of the servo module is to monitor and treat the chain link point, terminate a specified service thread or process if necessary, and restart or duplicate the chain node.
The detection mode can be a function of the link point, and a service for detecting the activity state of the link point can be deployed independently. The starting mode can be the spontaneous behavior of the node or the passive triggering of the monitoring service.
The rule according to the detection mode comprises: service anomaly identification definition, intra-blockchain communication protocol, cross-chain communication protocol, transaction construction container, authentication algorithm, etc. Wherein, the node service exception may include: the node service does not respond, the phishing algorithm verification does not meet the expected requirement, the consensus algorithm is illegal, the p2p node list appears the nodes ip and cpu utilization rate beyond the designated threshold value for a certain time, the memory utilization rate exceeds the designated threshold value for a certain time, the disk occupancy rate stays high for a long time or the node service threads occupy too many service ports. The communication protocol in the block chain is an http protocol based on TCP/IP and a P2P communication technology based on the http protocol; the cross-chain communication protocol is a node which is used as a public node of two chains simultaneously, receives broadcast transactions of the two chains and participates in a consensus algorithm, and the node simultaneously follows the communication protocol of the two chains, so that the mode is used for collecting calculation results of one chain for auditing and verification; the transaction construction container is used for constructing a transaction by the servo program and submitting the transaction to a designated node to wait for a calculation result; the authentication algorithm includes using the servo transaction constructor to construct a transaction to be submitted to a designated node waiting for the end of the chain consensus where the designated node is located, and then taking the consensus result to verify whether the calculated result meets the expected result.
Step 104: when abnormal node service is detected, copying abnormal nodes according to a preset rule, connecting the copied nodes to a cluster of a block chain, and performing external service.
When one or more nodes are detected to be abnormally serviced, starting a self-replication function of the node, replicating a proxy node of the node, and connecting the proxy node to a cluster of a current chain;
checking whether the database of the abnormal node is available, if so, continuing to use the original database to continue to serve outside; otherwise, the node with normal service initiates the request of synchronous data to external service, and is connected to the current chain cluster to external service. The replicated proxy node may be on the current device or on a designated device.
Confirming whether a node is abnormal may include: when one servo module detects that one node is abnormal, p2p is broadcast to the servo modules of other nodes, when the servo modules exceeding the preset number verify that the node is abnormal, the node is considered to be the abnormal node, the preset number can be set according to the needs, if the preset number can be set to be 2/3 or the other servo modules consider that the node is the abnormal node, the node can be judged to be the abnormal node.
Further, step 104 may include:
step 1042: when the servo module detects that one or more nodes in the blockchain are abnormal in service, the proxy node of the abnormal node is copied, and the proxy node is connected to the cluster of the current chain. FIG. 2 shows a schematic diagram of a proxy node replicating an exception node. The proxy node is connected into the cluster of the current chain. Checking whether the database of the abnormal node is available, if so, continuing to use the original database to continue to serve outside; otherwise, the service is externally served after the synchronous data request is initiated to the node with normal service.
Further, step 104 may further include:
step 1044: when the number of the detected abnormal nodes reaches a threshold value, copying out the proxy node of each node on the blockchain, connecting the proxy nodes of each node to obtain a virtual chain, checking whether a database of the nodes on the blockchain is available, and if so, continuing to use the original database to continue to serve outside; otherwise, the service is externally served after the synchronous data request is initiated to the node with normal service. And a virtual chain is obtained by copying, the original block chain is replaced, and the concurrency processing capability of the chain is improved. FIG. 3 illustrates a schematic diagram of a proxy node replicating out each node on a blockchain to obtain a virtual chain.
Checking rules underlying a database, comprising: data validity identification, transaction construction algorithms, authentication algorithms, and the like. The method for checking the database data is that after the transaction constructed by the transaction construction container of the servo module is submitted to the appointed node, after the consensus is finished, the transaction data of the merkel tree structure is stored on a disk of the chain link point, and the servo module can check the data and compare the expected data. The data validity identification represents whether the data is valid or not, and the transaction construction algorithm is a construction algorithm used by a transaction constructor; authentication algorithms, i.e., authentication methods in which the servo module takes the transaction data and compares it with expected data, are based on algorithms used for chain signing, e.g., ECDSA elliptic curve digital signature algorithm, multiple signature methods, RSA algorithm, etc.
Further, the node processing method based on the blockchain, provided by the invention, comprises the following steps of:
step 100: when a single node on the blockchain is deployed, a specified number of node clusters are automatically generated from the configuration file. The positions of the nodes can be used for designating target machines, and the node clusters meeting the expected number requirements are automatically and intelligently amplified. Fig. 4 shows a schematic diagram of an amplification of a single node into a plurality of nodes.
Node clusters meeting the expected number requirements are automatically and intelligently amplified by means of a specified number or a specified target machine and the like, so that pain points of each node needing manual deployment are avoided
The blockchain is used as a service, and the deployment mode in the prior art is manual deployment of a plurality of machines or single machine multiport mode, and the manual deployment is required to be manually modified, which is roughly divided into several steps:
the server user name/password of each server to be deployed is selected, the server executable file of each server is prepared to start the servo service on the selected node (if the servo service is integrated into the link point program, add-server=batch_reply-config=config.yml node= 192.168.1.102, 192.168.1.Xxx, xxx.xxx.xxx), the servo will install the designated node using the server user name/password telnet server configured in config.yml, and form a cluster.
The consensus algorithm may be a proxy equity bayer fault tolerance algorithm that requires the number of nodes to meet n.gtoreq.3f+1 to meet the validity of the consensus. The intra-blockchain communication protocol comprises a TCP/IP-based http protocol or https protocol and a p2p communication technology, the invention is not limited to a consensus algorithm, and if the number n of blockchain nodes adopting other PBFT consensus algorithms is required to meet that n is more than or equal to 3f+1; if a workload certification mechanism (PoW), a rights and interests certification (PoS) or a proxy rights and interests certification (DPoS) g consensus algorithm is adopted, the number n of nodes needs to meet that n is more than or equal to 2f+1.
In the embodiment of the invention, the configuration file can be set according to a consensus algorithm and rules based on the appointed consensus algorithm, such as whether the needs of a proxy interest-bearing-family fault tolerance algorithm (DS-PBFT) are verification nodes, whether the nodes need to pass the verification signature of the initial node, a block chain communication protocol and the like.
The number of the nodes can be set according to the requirement of a consensus algorithm, if a chain of a proxy equity Bayesian and busy-court fault-tolerant algorithm (DS-PBFT) is adopted, automatic adjustment is set according to rules, if the node amplified automatically is a verification node, the verification is needed, and if the node amplified is a non-verification node, the verification is avoided.
The automatic amplification deployment of the embodiment of the invention has the difference from the repeated deployment in the prior art that the configuration of each node is automatically generated, and the node clusters meeting the expected number requirements are automatically and intelligently amplified by means of the specified number, the specified target machine and the like, so that the pain point of each node needing manual deployment is avoided.
The automatic intelligent augmentation deployment chain nodes are automatically deployed and built by utilizing rules or server information appointed by the servo module, a chain of nodes conforming to the appointed number of the rules is built, and verification nodes are dynamically adjusted according to the customized rules. In one embodiment, a certain node may be designated as a verified node, and the rest are non-verified nodes.
The node processing method based on the blockchain comprises a blockchain deployment process and a blockchain operation process. Another embodiment thereof, as shown in fig. 5, comprises the steps of:
step 502: and deploying the blockchain, and automatically generating a designated number of node clusters according to the configuration file when deploying the single nodes on the blockchain.
Step 504: nodes in the blockchain are detected. In an operation scene, detecting nodes in a blockchain, and searching nodes with abnormal service.
Step 506: when detecting that the node service is abnormal, copying out the proxy node of the abnormal node, and connecting the proxy node into the cluster of the current chain. Checking whether the database of the abnormal node is available, if so, continuing to use the original database to continue to serve outside; otherwise, the service is externally served after the synchronous data request is initiated to the node with normal service.
Step 508: whether the number of abnormal nodes reaches the threshold is judged, if yes, step 510 is executed, otherwise step 504 is executed.
Step 510: and copying out the proxy node of each node on the blockchain, and connecting the proxy nodes of each node to obtain a virtual chain. Checking whether a database of nodes on the blockchain is available, if so, continuing to use the original database to continue to serve outside; otherwise, the service is externally served after the synchronous data request is initiated to the node with normal service.
The method comprises the steps of copying abnormal nodes according to a preset rule when abnormal node service is detected, and connecting the copied nodes to the outside of a cluster of a blockchain for service. Because the node can be duplicated when the abnormal service of the node is detected, the running stability of the chain link point cluster is obviously improved, compared with the prior art that a reservation technician is required to handle the abnormal burst problem, the method and the device save labor and capital cost, and reduce the time for recovering the cluster to be normal when the burst problem occurs.
Embodiment two:
as shown in FIG. 6, one embodiment of a blockchain-based node processing device of the present invention includes an execution module 600. The operation module 600 includes a detection unit 610 and a replication unit 620.
The detecting unit 610 is configured to detect a node in a blockchain.
In the running scene of the block chain, the nodes in the block chain can be detected through a servo module, the servo module can be an independent daemon thread of the chain link point service, and can also be an independent process or service outside the independent chain link point, and the function of the servo module is to monitor and treat the chain link point, terminate a specified service thread or process if necessary, and restart or duplicate the chain node.
The detection mode can be a function of the link point, and a service for detecting the activity state of the link point can be deployed independently. The starting mode can be the spontaneous behavior of the node or the passive triggering of the monitoring service.
The rule according to the detection mode comprises: service anomaly identification definition, intra-blockchain communication protocol, cross-chain communication protocol, transaction construction container, authentication algorithm, etc. Wherein, the node service exception may include: the node service does not respond, the phishing algorithm verification does not meet the expected requirement, the consensus algorithm is illegal, the p2p node list appears the nodes ip and cpu utilization rate beyond the designated threshold value for a certain time, the memory utilization rate exceeds the designated threshold value for a certain time, the disk occupancy rate stays high for a long time or the node service threads occupy too many service ports. The communication protocol in the block chain is an http protocol based on TCP/IP and a P2P communication technology based on the http protocol; the cross-chain communication protocol is a node which is used as a public node of two chains simultaneously, receives broadcast transactions of the two chains and participates in a consensus algorithm, and the node simultaneously follows the communication protocol of the two chains, so that the mode is used for collecting calculation results of one chain for auditing and verification; the transaction construction container is used for constructing a transaction by the servo program and submitting the transaction to a designated node to wait for a calculation result; the authentication algorithm includes using the servo transaction constructor to construct a transaction to be submitted to a designated node waiting for the end of the chain consensus where the designated node is located, and then taking the consensus result to verify whether the calculated result meets the expected result.
And the copying unit 620 is configured to copy the abnormal node according to a preset rule when the abnormal node service is detected, and connect the copied node to the cluster of the blockchain, and service the outside.
When detecting that one or more nodes in the blockchain are abnormal in service, copying out proxy nodes of the abnormal nodes, and connecting the proxy nodes into a cluster of the current chain; checking whether the database of the abnormal node is available, if so, continuing to use the original database to continue to serve outside; otherwise, the node with normal service initiates the request of synchronous data and then externally serves and is connected to the current chain cluster to externally serve. The replicated proxy node may be on the current device or on a designated device.
Confirming whether a node is abnormal may include: when one servo module detects that one node is abnormal, p2p is broadcast to the servo modules of other nodes, when the servo modules exceeding the preset number verify that the node is abnormal, the node is considered to be the abnormal node, the preset number can be set according to the needs, if the preset number can be set to be 2/3 or the other servo modules consider that the node is the abnormal node, the node can be judged to be the abnormal node.
Further, the replication unit 620 may include a first processing subunit 621.
A first processing subunit 621, configured to, when detecting that one or more nodes in the blockchain are abnormal in service, duplicate a proxy node of the abnormal node, and connect the proxy node to the cluster of the current chain; checking whether the database of the abnormal node is available, if so, continuing to use the original database to continue to serve outside; otherwise, the service is externally served after the synchronous data request is initiated to the node with normal service.
Checking rules underlying a database, comprising: data validity identification, transaction construction algorithms, authentication algorithms, and the like. The method for checking the database data is that after the transaction constructed by the transaction construction container of the servo module is submitted to the appointed node, after the consensus is finished, the transaction data of the merkel tree structure is stored on a disk of the chain link point, and the servo module can check the data and compare the expected data. The data validity identification represents whether the data is valid or not, and the transaction construction algorithm is a construction algorithm used by a transaction constructor; the authentication algorithm, i.e. the authentication method of comparing the transaction data with the expected data after the server module takes the transaction data, is further based on an algorithm used by the chain signature, for example, the ECDSA elliptic curve digital signature algorithm, the multiple signature method, the RSA algorithm, etc., and the copying unit 620 further includes a second processing subunit 622.
A second processing subunit 622, configured to replicate the proxy node of each node on the blockchain when the number of detected abnormal nodes reaches the threshold, and connect the proxy nodes of each node to obtain a virtual chain; checking whether a database of nodes on the blockchain is available, if so, continuing to use the original database to continue to serve outside; otherwise, the service is externally served after the synchronous data request is initiated to the node with normal service.
Another embodiment of the blockchain-based node processing device of the present invention, as shown in fig. 7, includes a deployment module 700 and an execution module 800.
Wherein deployment module 700 may include deployment unit 710; a deployment unit 710 for automatically generating a specified number of node clusters from the configuration file when deploying individual nodes on the blockchain.
The blockchain is used as a service, and the deployment mode in the prior art is manual deployment of a plurality of machines or single machine multiport mode, and the manual deployment is required to be manually modified, which is roughly divided into several steps:
the server user name/password of each server to be deployed is selected, the server executable file of each server is prepared to start the servo service on the selected node (if the servo service is integrated into the link point program, add-server=batch_reply-config=config.yml node= 192.168.1.102, 192.168.1.Xxx, xxx.xxx.xxx), the servo will install the designated node using the server user name/password telnet server configured in config.yml, and form a cluster.
The consensus algorithm may be a proxy equity bayer fault tolerance algorithm that requires the number of nodes to meet n.gtoreq.3f+1 to meet the validity of the consensus. The intra-blockchain communication protocol comprises a TCP/IP-based http protocol or https protocol and a p2p communication technology, the invention is not limited to a consensus algorithm, and if the number n of blockchain nodes adopting other PBFT consensus algorithms is required to meet that n is more than or equal to 3f+1; if a workload certification mechanism (PoW), a rights and interests certification (PoS) or a proxy rights and interests certification (DPoS) g consensus algorithm is adopted, the number n of nodes needs to meet that n is more than or equal to 2f+1.
In the embodiment of the invention, the configuration file can be set according to a consensus algorithm and rules based on the appointed consensus algorithm, such as whether the needs of a proxy interest-bearing-family fault tolerance algorithm (DS-PBFT) are verification nodes, whether the nodes need to pass the verification signature of the initial node, a block chain communication protocol and the like.
The number of the nodes can be set according to the requirement of a consensus algorithm, if a chain of a proxy equity Bayesian and busy-court fault-tolerant algorithm (DS-PBFT) is adopted, automatic adjustment is set according to rules, if the node amplified automatically is a verification node, the verification is needed, and if the node amplified is a non-verification node, the verification is avoided.
The automatic amplification deployment of the embodiment of the invention has the difference from the repeated deployment in the prior art that the configuration of each node is automatically generated, and the node clusters meeting the expected number requirements are automatically and intelligently amplified by means of the specified number, the specified target machines and the like.
The automatic intelligent augmentation deployment chain nodes are automatically deployed and built by utilizing rules or server information appointed by the servo module, a chain of nodes conforming to the appointed number of the rules is built, and verification nodes are dynamically adjusted according to the customized rules. In one embodiment, a certain node may be designated as a verified node, and the rest are non-verified nodes.
The operation module 800 may include a detection unit 810 and a replication unit 820.
A detecting unit 810, configured to detect a node in a blockchain when the blockchain is running;
and the replication unit 820 is used for replicating the nodes according to a preset rule when the node service abnormality is detected, connecting the replicated nodes into the cluster of the blockchain, and serving the outside.
Further, the replication unit 820 may include a first processing subunit 821.
A first processing subunit 821, configured to, when detecting that one or more nodes in the blockchain are abnormal in service, duplicate a proxy node of the abnormal node, and connect the proxy node to a cluster of the current chain; checking whether the database of the abnormal node is available, if so, continuing to use the original database to continue to serve outside; otherwise, the service is externally served after the synchronous data request is initiated to the node with normal service.
Further, the replication unit 820 further comprises a second processing subunit 822.
A second processing subunit 822, configured to replicate the proxy node of each node on the blockchain when the number of detected abnormal nodes reaches the threshold, and connect the proxy nodes of each node to obtain a virtual chain; checking whether a database of nodes on the blockchain is available, if so, continuing to use the original database to continue to serve outside; otherwise, the service is externally served after the synchronous data request is initiated to the node with normal service.
The device provided by the embodiment of the invention comprises the steps of copying abnormal nodes according to a preset rule when the abnormal node service is detected, and connecting the copied nodes to the outside of the cluster of the block chain for service. Because the node can be duplicated when the abnormal service of the node is detected, the running stability of the chain link point cluster is obviously improved, compared with the prior art that a reservation technician is required to handle the abnormal burst problem, the method and the device save labor and capital cost, and reduce the time for recovering the cluster to be normal when the burst problem occurs.
Embodiment III:
an embodiment III provides a node processing device based on a block chain, comprising a memory and a processor;
a memory for storing a program;
and a processor, configured to implement the method in the first embodiment by executing the program stored in the memory.
Those skilled in the art will appreciate that all or part of the steps of the various methods in the above embodiments may be implemented by a program to instruct related hardware, and the program may be stored in a computer readable storage medium, where the storage medium may include: read-only memory, random access memory, magnetic or optical disk, etc.
The foregoing is a further detailed description of the invention in connection with specific embodiments, and it is not intended that the invention be limited to such description. It will be apparent to those skilled in the art that several simple deductions or substitutions can be made without departing from the spirit of the invention.

Claims (4)

1. A blockchain-based node processing method, comprising a blockchain deployment process and a blockchain running process, wherein the blockchain running process comprises:
detecting nodes in the block chain through a servo module;
when abnormal node service is detected, copying abnormal nodes according to a preset rule, connecting the copied nodes to the cluster of the block chain, and performing external service;
when detecting that the node service is abnormal, copying the abnormal node according to a preset rule, wherein the method specifically comprises the following steps:
when detecting that one or more nodes in the blockchain are abnormal in service, copying proxy nodes of the abnormal nodes, and connecting the proxy nodes into a cluster of a current chain;
checking whether the database of the abnormal node is available, if so, continuing to use the original database to continue to serve outside; otherwise, a data synchronization request is initiated to the node with normal service, and the external service is performed after the data synchronization;
copying the proxy node of each node on the blockchain when the detected number of the abnormal nodes reaches a threshold value, and connecting the proxy nodes of each node to obtain a virtual chain;
checking whether a database of nodes on the blockchain is available, if so, continuing to use the original database to continue to serve outside; otherwise, a data synchronization request is initiated to the node with normal service, and the external service is performed after the data synchronization;
after submitting the transaction constructed by the transaction construction container of the servo module to a designated node in a database checking mode, storing transaction data of a merkel tree structure on a disk of a chain link point after completing the consensus, comparing the transaction data with expected data by the servo module, verifying a signature by an authentication algorithm to determine the authenticity of the transaction, if the transaction is authentic, using the database, otherwise, using the database, wherein the authentication algorithm is an authentication method for comparing the transaction data taken by the servo module with the expected data, and the authentication algorithm is an algorithm based on a block chain signature;
the process of blockchain deployment includes:
when a single node on the blockchain is deployed, a specified number of node clusters are automatically generated from the configuration file.
2. The method of claim 1, wherein the node service exception comprises:
the node service does not respond, the phishing algorithm verification does not meet the expected requirement, the consensus algorithm is illegal, the ip and cpu utilization rate of the nodes except the p2p node list occurrence cluster exceeds a specified threshold for a certain time, the memory utilization rate exceeds the specified threshold for a certain time, the disk occupancy rate stays high for a long time and/or the node service threads occupy too many service ports.
3. A blockchain-based node processing device, comprising a deployment module and an operation module, wherein the operation module comprises:
the detection unit is used for detecting the nodes in the block chain through the servo module;
the copying unit is used for copying abnormal nodes according to a preset rule when abnormal node service is detected, connecting the copied nodes to the cluster of the block chain and serving the outside;
the copy unit includes:
the first processing subunit is used for copying the proxy node of the abnormal node when detecting that one or more nodes in the blockchain are abnormal in service, and connecting the proxy node into a cluster of the current chain; checking whether the database of the abnormal node is available, if so, continuing to use the original database to continue to serve outside; otherwise, a data synchronization request is initiated to the node with normal service, and the external service is performed after the data synchronization;
the second processing subunit is used for copying the proxy node of each node on the block chain when the detected number of the abnormal nodes reaches a threshold value, and connecting the proxy nodes of each node to obtain a virtual chain; checking whether a database of nodes on the blockchain is available, if so, continuing to use the original database to continue to serve outside; otherwise, a data synchronization request is initiated to the node with normal service, and the external service is performed after the data synchronization;
after submitting the transaction constructed by the transaction construction container of the servo module to a designated node in a database checking mode, storing transaction data of a merkel tree structure on a disk of a chain link point after completing the consensus, comparing the transaction data with expected data by the servo module, verifying a signature by an authentication algorithm to determine the authenticity of the transaction, if the transaction is authentic, using the database, otherwise, using the database, wherein the authentication algorithm is an authentication method for comparing the transaction data taken by the servo module with the expected data, and the authentication algorithm is an algorithm based on a block chain signature;
the deployment module comprises:
the deployment unit is used for automatically generating a specified number of node clusters according to the configuration file when single nodes on the blockchain are deployed.
4. A blockchain-based node processing device, comprising:
a memory for storing a program;
a processor for implementing the method according to any of claims 1-2 by executing a program stored in said memory.
CN201911172995.9A 2019-11-26 2019-11-26 Node processing method and device based on block chain Active CN111104282B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911172995.9A CN111104282B (en) 2019-11-26 2019-11-26 Node processing method and device based on block chain

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911172995.9A CN111104282B (en) 2019-11-26 2019-11-26 Node processing method and device based on block chain

Publications (2)

Publication Number Publication Date
CN111104282A CN111104282A (en) 2020-05-05
CN111104282B true CN111104282B (en) 2024-01-16

Family

ID=70421101

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911172995.9A Active CN111104282B (en) 2019-11-26 2019-11-26 Node processing method and device based on block chain

Country Status (1)

Country Link
CN (1) CN111104282B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111858628A (en) 2020-06-30 2020-10-30 北京百度网讯科技有限公司 Database-based management method, database-based management platform, electronic device and storage medium
CN113556327B (en) * 2021-06-29 2022-09-20 中国人民解放军战略支援部队信息工程大学 Block chain-based false flow rule injection attack detection and prevention system and method
CN114124486A (en) * 2021-11-09 2022-03-01 弥达斯科技(深圳)有限公司 Method for improving node security in Byzantine consensus mechanism
CN116055308B (en) * 2023-02-10 2024-01-05 青岛闪收付信息技术有限公司 Bottom layer blockchain network deployment method and device of supply chain financial platform

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107368507A (en) * 2017-03-28 2017-11-21 阿里巴巴集团控股有限公司 A kind of common recognition method and device based on block chain
CN109274692A (en) * 2018-11-14 2019-01-25 众安信息技术服务有限公司 A kind of identification block chain network is done evil the method and device of node
CN109688012A (en) * 2018-12-29 2019-04-26 杭州趣链科技有限公司 A kind of method of alliance's chain node hot standby switch
CN109918261A (en) * 2019-01-25 2019-06-21 中国联合网络通信集团有限公司 Failure monitoring method, device, equipment and computer readable storage medium
CN110221938A (en) * 2019-05-06 2019-09-10 深圳壹账通智能科技有限公司 The method and storage medium of electronic device, block chain common recognition

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10541886B2 (en) * 2017-05-24 2020-01-21 International Business Machines Corporation Decentralized change management based on peer devices using a blockchain

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107368507A (en) * 2017-03-28 2017-11-21 阿里巴巴集团控股有限公司 A kind of common recognition method and device based on block chain
CN109274692A (en) * 2018-11-14 2019-01-25 众安信息技术服务有限公司 A kind of identification block chain network is done evil the method and device of node
CN109688012A (en) * 2018-12-29 2019-04-26 杭州趣链科技有限公司 A kind of method of alliance's chain node hot standby switch
CN109918261A (en) * 2019-01-25 2019-06-21 中国联合网络通信集团有限公司 Failure monitoring method, device, equipment and computer readable storage medium
CN110221938A (en) * 2019-05-06 2019-09-10 深圳壹账通智能科技有限公司 The method and storage medium of electronic device, block chain common recognition

Also Published As

Publication number Publication date
CN111104282A (en) 2020-05-05

Similar Documents

Publication Publication Date Title
CN111104282B (en) Node processing method and device based on block chain
US11861343B2 (en) Systems, apparatus, and methods for updating a programmable device using a distributed ledger
US7996713B2 (en) Server-to-server integrity checking
US20180285217A1 (en) Failover response using a known good state from a distributed ledger
US20220272105A1 (en) Blockchain-based data detection method, apparatus, and computer-readable storage medium
US20160155128A1 (en) Device identification based on deep fingerprint inspection
CN111868689A (en) Run-time self-correction of blockchain ledger
US11165766B2 (en) Implementing authentication protocol for merging multiple server nodes with trusted platform modules utilizing provisioned node certificates to support concurrent node add and remove
WO2002102010A2 (en) Intrusion tolerant server system
CN112422320B (en) Master-slave switching method and device of server and server
CN112527912A (en) Data processing method and device based on block chain network and computer equipment
CN112492016B (en) Cross-process extensible consensus method and system
CN111158975A (en) Method, equipment and storage medium for monitoring BMC
US11245709B2 (en) Multi-verifier approach for attestation of nodes in a network
CN116827601A (en) Data transmission method, device, electronic equipment and storage medium
CN114936253A (en) Block chain consensus method and device, electronic equipment and storage medium
CN111431908A (en) Access processing method and device and readable storage medium
CN114189325A (en) Scalable Byzantine fault-tolerant method with high fault tolerance, device and storage medium
CN111031000B (en) Processing method, device and system of business wind control system and storage medium
CN116319803A (en) Cloud edge cooperative distributed API calling method and system
CN111988202B (en) Node switching method, device and storage medium
US20200287847A1 (en) System and control method
US11698975B2 (en) Distributed data storage system with backward attestation
CN113268278A (en) Configuration verification synchronization method and device, electronic device and storage medium
US20230305886A1 (en) Automatic update management in a computing infrastructure

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