CN113364874B - Node synchronization method and device based on block chain, storage medium and server - Google Patents

Node synchronization method and device based on block chain, storage medium and server Download PDF

Info

Publication number
CN113364874B
CN113364874B CN202110644467.XA CN202110644467A CN113364874B CN 113364874 B CN113364874 B CN 113364874B CN 202110644467 A CN202110644467 A CN 202110644467A CN 113364874 B CN113364874 B CN 113364874B
Authority
CN
China
Prior art keywords
node
block
storage
storage node
nodes
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
CN202110644467.XA
Other languages
Chinese (zh)
Other versions
CN113364874A (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.)
Netease Hangzhou Network Co Ltd
Original Assignee
Netease Hangzhou Network 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 Netease Hangzhou Network Co Ltd filed Critical Netease Hangzhou Network Co Ltd
Priority to CN202110644467.XA priority Critical patent/CN113364874B/en
Publication of CN113364874A publication Critical patent/CN113364874A/en
Application granted granted Critical
Publication of CN113364874B publication Critical patent/CN113364874B/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
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1095Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes
    • 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/06Management of faults, events, alarms or notifications
    • H04L41/0654Management of faults, events, alarms or notifications using network fault recovery
    • H04L41/0668Management of faults, events, alarms or notifications using network fault recovery by dynamic selection of recovery network elements, e.g. replacement by the most appropriate element after failure

Abstract

The embodiment of the application discloses a node synchronization method and device based on a block chain, a storage medium and a server. The method comprises the following steps: the method comprises the steps that a master node in a sending node cluster is controlled to send a block to be stored to each storage node in a storage node cluster, the block to be stored carries state data, and the sending node cluster comprises the master node and a plurality of slave nodes; when the master node is abnormal, screening target slave nodes from the plurality of slave nodes, updating the target slave nodes to the master node, and screening target storage nodes from the storage node cluster; and controlling the updated main node to acquire the state data carried by each stored block from the target storage node, so that the updated main node determines the block sending progress of the abnormal main node when the abnormal main node is abnormal according to the state data carried by each stored block. The block sending progress of the abnormal main node in the abnormal state is determined by controlling the updated main node to acquire the state data from the target storage node, and the integrity of the block data is improved.

Description

Node synchronization method and device based on block chain, storage medium and server
Technical Field
The present application relates to the field of computers, and in particular, to a method and an apparatus for synchronizing nodes based on a block chain, a storage medium, and a server.
Background
In recent years, with the development and popularization of internet technology, blockchains are being used by companies and individuals, and superhedger Fabric is a licensed blockchain architecture (licensed blockchain in front structure). The HyperledgerFaric Fabric is supported by a modular architecture and has excellent confidentiality, scalability, flexibility and expandability. The HyperLegendr Fabric is designed to support direct plug-in enablement of different module components and can adapt to various complicated scenes in an economic ecosystem.
In the prior art, a hyper hedgerfa Fabric blockchain architecture includes a transaction management master node and a transaction management slave node, where the transaction management master node is configured to package transactions into blocks and send the blocks to a storage node. The transaction management slave node is used for receiving the sending progress of the sending block of the transaction management master node, so that the current sending progress of the master node is obtained, and further the state synchronization of the transaction management master node and the transaction management slave node is realized.
Disclosure of Invention
In the research and practice process of the prior art, the inventor of the present application finds that, in the prior art, if the transaction management master node does not inform the transaction management slave node of the current sending progress in time when the transaction management master node is abnormal, the newly generated transaction management master node after the abnormality cannot accurately know the sending progress of the abnormal transaction management master node when the abnormal transaction management master node is abnormal based on the sending progress informed before the master node is abnormal, and thus risks such as block data loss are easily caused.
The embodiment of the application provides a node synchronization method, a node synchronization device, a storage medium and a server based on a block chain, which can avoid risks such as block data loss and improve the integrity of the block data.
In order to solve the above technical problem, an embodiment of the present application provides the following technical solutions:
a node synchronization method based on a block chain comprises the following steps:
the method comprises the steps that a master node in a sending node cluster is controlled to send a block to be stored to each storage node in a storage node cluster, the block to be stored carries state data, the sending node cluster comprises the master node and a plurality of slave nodes, and the state data are used for recording transaction states of the blocks;
when the master node is abnormal, screening target slave nodes from a plurality of slave nodes, updating the target slave nodes into the master node, and screening target storage nodes from the storage node cluster;
and controlling the updated main node to acquire the state data carried by each stored block from the target storage node so that the updated main node determines the block sending progress of the abnormal main node when the abnormal main node is abnormal according to the state data carried by each stored block.
A blockchain-based node synchronization apparatus, comprising:
the system comprises a sending module, a storage node cluster and a processing module, wherein the sending module is used for controlling a main node in the sending node cluster to send a block to be stored to each storage node in the storage node cluster, the block to be stored carries state data, the sending node cluster comprises the main node and a plurality of slave nodes, and the state data is used for recording the transaction state of the block;
the screening module is used for screening target slave nodes from a plurality of slave nodes when the master node is abnormal, updating the target slave nodes to the master node and screening target storage nodes from the storage node cluster;
and the obtaining module is used for controlling the updated main node to obtain the state data carried by each stored block from the target storage node, so that the updated main node determines the block sending progress of the abnormal main node when the abnormal main node is abnormal according to the state data carried by each stored block.
In some embodiments, the screening module comprises:
the first sending submodule is used for sending a first query request to each storage node, wherein the first query request is used for querying a height value of the highest block of the storage node and a hash value of the highest block;
the receiving submodule is used for receiving first feedback information returned by the storage node according to the first query request;
the sorting submodule is used for sorting all the storage nodes in the storage node cluster based on the highest block height value and the hash value of each storage node according to the first feedback information;
and the first screening submodule is used for screening out a target storage node from the storage node cluster according to the sorting result.
In some embodiments, the apparatus further comprises:
the receiving module is used for receiving response information sent by each storage node, and sending a next block to be stored to each storage node in the storage node cluster when the number of the response information is larger than a first preset number;
the sorting submodule comprises:
the first sorting unit is used for sorting each storage node corresponding to the highest block height value according to the height value when the number of the first feedback information is larger than a second preset number, so as to obtain a first sorting result, wherein the second preset number is the number obtained by adding one to the first preset number;
the second sorting unit is used for sorting each storage node in the first sorting result according to the hash value to obtain a second sorting result;
the first screening submodule includes:
and the screening unit is used for screening the target storage node from the storage node cluster according to the second sorting result.
In some embodiments, the screening unit is to:
acquiring the number of candidate storage nodes of the first candidate storage nodes with the same highest block height value and hash value in the second sorting result;
and when the number of the candidate storage nodes is larger than the second preset number, determining any first candidate storage node as a target storage node.
In some embodiments, the screening module is further configured to:
when the number of the candidate storage nodes is smaller than the second preset number, determining an abnormal number according to the number of the first feedback information, wherein the abnormal number is the number of abnormal storage nodes which do not return the first feedback information according to the first query request in the storage node cluster;
calculating the sum of the abnormal number and the number of the first candidate storage nodes to obtain a calculation result;
when the calculation result is smaller than the second preset number, determining a second height value according to a first height value, wherein the first height value is a highest block height value corresponding to the candidate storage node, and the second height value is a height value obtained by subtracting one from the first height value;
sending a second query request to each storage node, wherein the second query request is used for querying the hash value of the block corresponding to the second height value;
receiving second feedback information returned by the storage nodes according to the second query request, and determining the number of second candidate storage nodes with the same hash value;
and if the number of the second candidate storage nodes with the same hash value is greater than the second preset number, determining any second candidate storage node as a target storage node.
In some embodiments, the screening module is further configured to:
when the calculation result is larger than the second preset number, judging whether first feedback information returned by the abnormal storage node according to the first query request is received within a preset time period;
if first feedback information returned by the abnormal storage node according to the first query request is not received within a first preset time period, determining the height value of the highest block of the abnormal storage node to be zero, and determining the hash value of the highest block of the abnormal storage node to be none.
In some embodiments, the screening module is further configured to:
and if the number of the second candidate storage nodes with the same hash value is less than the second preset number, generating a prompt message, wherein the prompt message is used for prompting that the target storage node cannot be determined.
In some embodiments, the apparatus further comprises:
the control module is used for controlling the main node to send the running state information to each slave node according to a preset time interval;
the screening module includes:
the appointing submodule is used for controlling each slave node to appoint a candidate slave node from a plurality of slave nodes when the slave node does not receive the operation state information at the receiving time point of the current operation state information, obtaining an appointed result and sending the appointed result;
and the second screening submodule is used for receiving the specified result sent by each slave node and screening the target slave node from the plurality of slave nodes based on the specified result.
In some embodiments, the second screening submodule comprises:
a first determination unit configured to determine a number of times each of a plurality of slave nodes is designated as a candidate slave node based on the determination result;
a second determining unit, configured to determine, as the target slave node, the slave node with the highest frequency among the plurality of slave nodes.
A computer readable storage medium, having stored thereon a plurality of instructions adapted to be loaded by a processor, for performing the steps of the above-mentioned blockchain-based node synchronization method.
A server comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the steps of the above block chain based node synchronization method when executing the program.
The method comprises the steps that a master node in a sending node cluster is controlled to send a block to be stored to each storage node in a storage node cluster, the block to be stored carries state data, the sending node cluster comprises the master node and a plurality of slave nodes, and the state data are used for recording transaction states of the block; when the master node is abnormal, screening target slave nodes from a plurality of slave nodes, updating the target slave nodes into the master node, and screening target storage nodes from the storage node cluster; and controlling the updated main node to acquire the state data carried by each stored block from the target storage node, so that the updated main node determines the block sending progress of the abnormal main node when the abnormal main node is abnormal according to the state data carried by each stored block. Therefore, the block sending progress of the abnormal main node in the abnormal state is determined by controlling the updated main node to acquire the state data from the target storage node, the problem that the updated main node cannot accurately know the sending progress of the abnormal main node in the abnormal state, risks such as block data loss are easily caused is avoided, and the integrity of the block data is improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1a is a schematic diagram of a data sharing system of a node synchronization method based on a block chain according to an embodiment of the present application.
Fig. 1b is a schematic diagram of a block structure in a block chain according to an embodiment of the present disclosure.
Fig. 1c is a block generation diagram according to an embodiment of the present disclosure.
Fig. 1d is a schematic flowchart of a node synchronization method based on a block chain according to an embodiment of the present application.
Fig. 1e is a first schematic storage diagram of each storage node in the storage node cluster according to the embodiment of the present application.
Fig. 1f is a second storage schematic diagram of each storage node in the storage node cluster according to the embodiment of the present application.
Fig. 1g is a third schematic storage diagram of each storage node in the storage node cluster according to the embodiment of the present application.
Fig. 1h is a fourth storage schematic diagram of each storage node in the storage node cluster according to the embodiment of the present application.
Fig. 2a is a schematic flowchart of a second method for synchronizing nodes based on a block chain according to an embodiment of the present disclosure.
Fig. 2b is a first communication connection diagram between a master node and a slave node in a sending node cluster and a storage node in a storage node cluster according to the embodiment of the present application.
Fig. 2c is a second communication connection diagram between a master node and a slave node in a sending node cluster and a storage node in a storage node cluster according to the embodiment of the present application.
Fig. 2d is a third communication connection diagram between a master node and a slave node in a sending node cluster and a storage node in a storage node cluster according to the embodiment of the present application.
Fig. 2e is a fourth communication connection diagram between a master node and a slave node in a sending node cluster and a storage node in a storage node cluster according to the embodiment of the present application.
Fig. 2f is a fifth communication connection diagram between a master node and a slave node in a sending node cluster and a storage node in a storage node cluster according to the embodiment of the present application.
Fig. 3 is a schematic structural diagram of a node synchronization apparatus based on a block chain according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of a server according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. It is to be understood that the embodiments described are only a few embodiments of the present application and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The embodiment of the application provides a node synchronization method and device based on a block chain and a computer readable storage medium.
Referring to fig. 1a, fig. 1a is a schematic diagram of a data sharing system of a node synchronization method based on a block chain according to an embodiment of the present disclosure, referring to the data sharing system shown in fig. 1a, a data sharing system 100 refers to a system for performing data sharing between nodes, the data sharing system may include a plurality of nodes 11, and the plurality of nodes 11 may refer to respective clients in the data sharing system. Each node 11 may receive input information during normal operation and maintain shared data within the data sharing system based on the received input information. In order to ensure information intercommunication in the data sharing system, information connection can exist between each node in the data sharing system, and information transmission can be carried out between the nodes through the information connection. For example, when an arbitrary node in the data sharing system receives input information, other nodes in the data sharing system acquire the input information according to a consensus algorithm, and store the input information as data in shared data, so that the data stored on all the nodes in the data sharing system are consistent.
Each node in the data sharing system has a node identifier corresponding thereto, and each node in the data sharing system may store a node identifier of another node in the data sharing system, so that the generated block is broadcast to the other node in the data sharing system according to the node identifier of the other node in the following. Each node may maintain a node identifier list as shown in the following table, and store the node name and the node identifier in the node identifier list correspondingly. The node identifier may be an IP (Internet Protocol) address and any other information that can be used to identify the node, and table 1 only illustrates the IP address as an example.
TABLE 1
Node name Node identification
Node 1 112.112.152.172
Node 2 113.113.183.143
Node N 119.129.789.259
Each node in the data sharing system stores one identical blockchain. The block chain is composed of a plurality of blocks, referring to fig. 1b, the block chain is composed of a plurality of blocks, the starting block comprises a block head and a block main body, the block head stores an input information characteristic value, a version number, a timestamp and a difficulty value, and the block main body stores input information; the next block of the starting block takes the starting block as a parent block, the next block also comprises a block head and a block main body, the block head stores the input information characteristic value of the current block, the block head characteristic value of the parent block, the version number, the timestamp and the difficulty value, and the like, so that the block data stored in each block in the block chain is associated with the block data stored in the parent block, and the safety of the input information in the block is ensured.
When each block in the block chain is generated, referring to fig. 1c, when the node where the block chain is located receives the input information, the input information is verified, after the verification is completed, the input information is stored in the memory pool, and the hash tree for recording the input information is updated; and then, updating the updating time stamp to the time when the input information is received, trying different random numbers, and calculating the characteristic value for multiple times, so that the calculated characteristic value can meet the following formula:
SHA256(SHA256(version+prev_hash+merkle_root+ntime+nbits+x))<TARGET
wherein, SHA256 is a characteristic value algorithm used for calculating a characteristic value; version is version information of the relevant block protocol in the block chain; prev _ hash is a block head characteristic value of a parent block of the current block; merkle _ root is a characteristic value of the input information; ntime is the update time of the update timestamp; nbits is the current difficulty, is a fixed value within a period of time, and is determined again after exceeding a fixed time period; x is a random number; TARGET is a feature threshold, which can be determined from nbits.
Therefore, when the random number meeting the formula is obtained through calculation, the information can be correspondingly stored, and the block head and the block main body are generated to obtain the current block. And then, the node where the block chain is located respectively sends the newly generated blocks to other nodes in the data sharing system where the newly generated blocks are located according to the node identifications of the other nodes in the data sharing system, the newly generated blocks are verified by the other nodes, and the newly generated blocks are added to the block chain stored in the newly generated blocks after the verification is completed.
In the present embodiment, the description will be made from the perspective of a blockchain-based node synchronization apparatus, which may be specifically integrated in a server having an arithmetic capability with a storage unit and a microprocessor installed therein.
Referring to fig. 1d, fig. 1d is a first flowchart illustrating a node synchronization method based on a block chain according to an embodiment of the present disclosure. The node synchronization method based on the block chain comprises the following steps:
in step 101, a master node in a sending node cluster is controlled to send a block to be stored to each storage node in a storage node cluster, where the block to be stored carries status data, the node cluster includes the master node and a plurality of slave nodes, and the status data is used to record a transaction status of the block.
When the transaction is carried out on the block chain, the transaction can be split and packaged by the main node, a plurality of packaged blocks to be stored are finally obtained, and the main node can respectively send each block to be stored in the plurality of blocks to be stored to each storage node in the storage node cluster and store the block by the storage nodes. Each block carries status data (State Database) which records the result of the transaction execution, and the latest status represents the latest value of all keys on the Channel (Channel), so the status is also called as "world status". Thus, each time a transaction is executed in blocks on the chain, the status data of the blocks is recorded.
Specifically, in order to avoid the abnormality of the master node due to a downtime or the like, a plurality of slave nodes are deployed in the blockchain, so that when the master node is abnormal, the master node replaces the abnormal master node to continue executing the splitting and packaging operations of the transaction.
In step 102, when the master node is abnormal, a target slave node is screened out from the plurality of slave nodes, the target slave node is updated to be the master node, and a target storage node is screened out from the storage node cluster.
When the master node is abnormal, a target slave node capable of replacing the abnormal master node is selected from the standby slave nodes, and the target slave node is updated to the master node so as to continue the sending progress of the abnormal master node.
Specifically, the target storage node is a storage node with the highest reliability in the plurality of storage nodes.
In some embodiments, before the step of screening out the target slave node from the plurality of slave nodes when the master node is abnormal, the method further includes:
controlling the main node to send running state information to each slave node according to a preset time interval;
when the master node is abnormal, the step of screening out a target slave node from a plurality of slave nodes includes:
(1) when the slave node does not receive the operation state information at the receiving time point of the current operation state information, controlling each slave node to designate a candidate slave node from a plurality of slave nodes, obtaining a designation result and sending the designation result;
(2) and receiving a specified result sent by each slave node, and screening out the target slave node from the plurality of slave nodes based on the specified result.
The master node may be configured to send operating state information to each slave node at preset time intervals (for example, 5s), where the operating state information is used to inform that the current operating state of the master node is normal. Therefore, at the time point of receiving the next current operation state information, when the slave node does not receive the operation state information, it can be determined that the master node is abnormal, and a target slave node capable of replacing the abnormal master node needs to be determined from the plurality of slave nodes.
Specifically, the method for determining the target slave node from the plurality of slave nodes may be: and controlling each slave node to designate a candidate slave node in the plurality of slave nodes and sending the designated designation result, so as to screen out the target slave node from the plurality of slave nodes according to the received designation result.
In some embodiments, the step of screening out a target slave node from a plurality of slave nodes based on the determination result includes:
(1.1) determining the number of times each of the plurality of slave nodes is designated as a candidate slave node based on the determination result;
and (1.2) determining the slave node with the highest frequency in the plurality of slave nodes as the target slave node.
Each slave node sends a designated result, so that a plurality of designated results can be received, and the slave node with the highest designated frequency is determined as the target slave node according to the designated frequency of the slave node in each designated result.
For example, if 5 designation results are received, of which 3 designation results designate the slave node 1 as a candidate slave node and 2 designation results designate the slave node 2 as a candidate slave node, the slave node 1 is regarded as a target slave node.
In some embodiments, the step of screening out target storage nodes from the storage node cluster comprises:
(1) sending a first query request to each storage node, wherein the first query request is used for querying a height value of a highest block and a hash value of the highest block of the storage node;
(2) receiving first feedback information returned by the storage node according to the first query request;
(3) sorting all storage nodes in the storage node cluster based on the highest block height value and the hash value of each storage node according to the first feedback information;
(4) and screening out target storage nodes from the storage node cluster according to the sorting result.
In order to determine the block transmission progress of the abnormal master node when the abnormal master node is abnormal, a trusted storage node (i.e., a storage node which is not down or is abnormal due to artificial malicious modification) needs to be screened from the storage node cluster, and the storage node of the type is the target storage node.
Specifically, the method for screening the target storage node may query the height value of the highest block and the hash value of the highest block in the storage nodes through the first query request, and perform screening by sorting all the storage nodes in the storage node cluster according to the first feedback information and the height value and hash value of the highest block of each storage node.
In some embodiments, after the step of sending the block to be stored to each storage node in the storage node cluster, the method further includes:
receiving response information sent by each storage node, and sending a next block to be stored to each storage node in the storage node cluster when the number of the response information is larger than a first preset number;
the step of sorting all storage nodes in the storage node cluster based on the highest block height value and the hash value of each storage node according to the first feedback information includes:
(1.1) when the quantity of the first feedback information is larger than a second preset quantity, sequencing each storage node corresponding to the highest block height value according to the height value to obtain a first sequencing result, wherein the second preset quantity is the quantity obtained by adding one to the first preset quantity;
(1.2) sequencing each storage node in the first sequencing result according to the Hash value to obtain a second sequencing result;
the step of screening out the target storage node from the storage node cluster according to the sorting result comprises the following steps:
and screening out target storage nodes from the storage node cluster according to the second sorting result.
The method comprises the steps that a sending rule of a main node when sending a block to be stored to each storage node in a storage cluster is set in advance, when each storage node finishes storing the block to be stored, response information is sent to inform that the block is stored, the first preset number is half of the number of the storage nodes, and when more than half of the storage nodes send first feedback information, the main node continues to send the next block to be stored. By analogy, the height of each storage node can only store one block, so that different blocks in the storage node correspond to different height values. Therefore, when determining the trusted storage node from the storage node cluster, the trusted storage node can be determined according to the height value of the highest block in each storage node.
Specifically, referring to fig. 1e, fig. 1f, fig. 1g, and fig. 1h, fig. 1e is a first schematic storage diagram of each storage node in a storage node cluster according to an embodiment of the present disclosure; fig. 1f is a second storage schematic diagram of each storage node in a storage node cluster according to an embodiment of the present application; fig. 1g is a third schematic storage diagram of each storage node in a storage node cluster according to the embodiment of the present application; fig. 1h is a fourth storage schematic diagram of each storage node in the storage node cluster according to the embodiment of the present application. When the storage performance of each storage node is not very different, the block storage state shown in fig. 1e can be obtained, that is, the heights of the blocks stored in each storage node are the same; when the storage performance of the storage nodes is greatly different, as shown in fig. 1f, the storage performance of the storage node 1, the storage node 2 and the storage node 3 is similar, but the storage node 5 is stored in the block 6, and the storage node 4 is stored in the block 4, which shows that the storage performance of the storage node 5 is inferior to that of the storage node 1, the storage node 2 and the storage node 3, but superior to that of the storage node 4. As shown in fig. 1g, the height value of the stored block in a few storage nodes reaches 9, and the height value of the stored block in most storage nodes does not reach 9; as shown in fig. 1h, the storage node 3 is down, the storage node 4 is down, only the storage node 1, the storage node 2 and the storage node 5 operate, and different manners for determining the target storage node exist according to different situations.
In addition, the block hash value stored by the abnormal storage node under the same block height is different from the block hash values of other storage nodes due to the fact that block data of the stored block are artificially tampered, a storage node program is mistaken, and the storage node, the disk and the memory jump all cause the block hash value stored by the abnormal storage node to be different from the block hash values of other storage nodes, so that the risk that the block data are lost and untrustworthy due to the fact that the storage node, the storage node program are artificially tampered, the storage node disk and the memory jump are caused can be avoided, and the trustable storage node can be determined by combining the block hash value.
Specifically, a first query request for querying a height value of a highest block of the storage node and a hash value of the highest block may be sent to each storage node, and first feedback information returned by the storage node may be received. Therefore, the height value of the highest block of each storage node and the hash value corresponding to the highest block are obtained according to the first feedback information. A first height value is thus determined from the plurality of height values, and the first height value corresponds to the target hash value for the block. Due to the fact that the storage nodes are down, whether the number of the received first feedback information is larger than a second preset number needs to be judged, and the second preset number is the sum of half of the number of all the storage nodes in the storage node cluster. When the number of the first feedback information is larger than the second preset number, it is indicated that more than half of the storage nodes are in the running state. At this time, each storage node corresponding to the highest block height value may be sorted according to the height value. The sorting mode can be that each storage node is sorted according to the sequence of the height values from high to low. As shown in tables 2 and 3. Table 2 shows the highest block height value and the highest block hash value of each of the storage nodes 1 to 5 sorted according to the first feedback information. After each storage node is sorted according to the sequence of the height values from high to low, a first sorting result shown in table 3 is obtained.
TABLE 2
Storage node Highest block height value Hash value corresponding to the highest block
Storage node 1 8 BBB
Storage node 2 9 AAA
Storage node 3 9 AAA
Storage node 4 7 CCC
Storage node 5 9 AAA
TABLE 3
Storage node Highest block height value Hash value corresponding to the highest block
Storage node 2 9 AAA
Storage node 3 9 AAA
Storage node 5 9 AAA
Storage node 1 8 BBB
Storage node 4 7 CCC
And after the storage nodes are sorted according to the height values, sorting each storage node corresponding to the hash value of the highest block in the first sorting result according to the hash value. The hash value may be sorted according to a dictionary order of the hash, so as to obtain a second sorting result. The first sorting result shown in table 3 is not changed after being subjected to hash value sorting, and therefore, the first sorting result shown in table 3 may also be used as the second sorting result after being subjected to hash value sorting.
Specifically, the determination of the target storage node may be performed according to the second sorting result.
In some embodiments, the step of screening out the target storage node from the storage node cluster according to the second sorting result includes:
(1.1) acquiring the number of candidate storage nodes of the first candidate storage nodes with the same highest block height value and hash value in the second sorting result;
(1.2) when the number of the candidate storage nodes is larger than the second preset number, determining any first candidate storage node as a target storage node.
If the number of the candidate storage nodes of the first candidate storage node with the same highest block height value and hash value is greater than the second preset number, it is indicated that the state in the current storage node conforms to the state in fig. 1e (any node in storage nodes 1 to 5 can be determined as a target storage node) and the state in fig. 1f (storage nodes 1, 2, and 3 can be determined as target storage nodes). Any first candidate storage node is determined as the target storage node.
For example, as shown in table 3, the storage nodes 1, 2, 3, and 4 in table 3 return the first feedback information, where the height value of the highest block in the storage node 1 is 8, the corresponding hash value is BBB, the height value of the highest block in the storage node 2 is 9, the corresponding hash value is AAA, the height value of the highest block in the storage node 3 is 9, the corresponding hash value is AAA, the height value of the highest block in the storage node 4 is 7, the height value of the highest block in the storage node 5 is 9, the corresponding hash value is AAA, and the corresponding hash value is CCC. Any one of the storage nodes 2, 3 and 5 may be determined as a target storage node.
In some embodiments, the method further comprises:
(1.1) when the number of the candidate storage nodes is smaller than the second preset number, determining an abnormal number according to the number of the first feedback information, wherein the abnormal number is the number of abnormal storage nodes which do not return the first feedback information according to the first query request in the storage node cluster;
(1.2) calculating the sum of the abnormal quantity and the quantity of the first candidate storage nodes to obtain a calculation result;
(1.3) when the calculation result is smaller than the second preset number, determining a second height value according to a first height value, wherein the first height value is a highest block height value corresponding to the candidate storage node, and the second height value is a height value obtained by subtracting one from the first height value;
(1.4) sending a second query request to each storage node, wherein the second query request is used for querying the hash value of the block corresponding to the second height value;
(1.5) receiving second feedback information returned by the storage nodes according to the second query request, and determining the number of second candidate storage nodes with the same hash value;
(1.6) if the number of the second candidate storage nodes with the same hash value is larger than the second preset number, determining any second candidate storage node as a target storage node.
If part of the storage nodes do not complete block storage or are down, the number of the first feedback information is less than a second preset number, and thus the situation that a target storage node cannot be determined from the acquired highest block height value and the highest block hash value is caused, or the determined target storage node is an abnormal storage node such as malicious modification, and therefore the number of the storage nodes which are not fed back and have abnormality needs to be determined according to the number of the first feedback information, and the abnormal number is obtained. And calculating the sum of the number of the first candidate storage nodes and the abnormal number to obtain a calculation result. And comparing the calculation result with a second preset number, and when the calculation result is smaller than the second preset number, indicating that the storage state in the storage node cluster is as shown in fig. 1g, and only a small number of storage nodes store the first height value. So that a small fraction of the storage nodes cannot be determined as trusted storage nodes (there is a risk of artificially adding blocks in the storage nodes). And determining a second height value according to the first height value, wherein the second height value is the height value obtained by subtracting one from the first height value.
Specifically, when the first height value is 9, the second height value is 8, and therefore the second query request is sent again to query the hash value corresponding to the second height value, and the number of second candidate storage nodes having the same hash value is determined according to the returned second feedback information. If the number of the second candidate storage nodes with the same hash value is larger than a second preset number, it is indicated that most storage nodes in the storage node cluster are in the running state, and only a small part of storage nodes are stored to the highest block height value. Any second candidate storage node may be determined to be the target storage node.
For example, as shown in table 4, the first feedback information fed back according to the first query request in table 4 is: the height value of the highest block in the storage node 1 is 9, the corresponding hash value is AAA, the height value of the highest block in the storage node 2 is 5, the corresponding hash value is DDD, the height value of the highest block in the storage node 3 is 9, the corresponding hash value is AAA, the height value of the highest block in the storage node 4 is 8, the corresponding hash value is EEE, the height value of the highest block in the storage node 5 is 8, and the corresponding hash value is EEE. Since the target storage node cannot be identified, a second query request is sent, and the hash value is associated with the chunk with a query height value of 9-1 to 8, thereby obtaining table 4. Since the table 5 is obtained by changing the highest block height values of the storage nodes 1 and 3 to 8 and the corresponding hash values to EEE in table 4, any one of the storage nodes 1, 3, 4, and 5 can be determined as the target storage node.
TABLE 4
Storage node Highest block height value Hash value corresponding to the highest block
Storage node 1 9 AAA
Storage node 3 9 AAA
Storage node 4 8 EEE
Storage node 5 8 EEE
Storage node 2 5 DDD
TABLE 5
Storage node Highest block height value Hash value corresponding to the highest block
Storage node 1 8 EEE
Storage node 3 8 EEE
Storage node 4 8 EEE
Storage node 5 8 EEE
Storage node 2 5 DDD
In some embodiments, the method further comprises:
(1) when the calculation result is larger than the second preset number, judging whether first feedback information returned by the abnormal storage node according to the first query request is received within a preset time period;
(2) if the first feedback information returned by the abnormal storage node according to the first query request is not received within the first preset time period, determining the height value of the highest block of the abnormal storage node to be zero, and determining the hash value of the highest block of the abnormal storage node to be none.
When the settlement result is greater than the second preset number, the number of the storage nodes which do not return the first feedback information is large, the receiving time can be prolonged, and whether the first feedback information returned by the abnormal storage node according to the first query request is received or not is judged within the preset time period; and if the first feedback information is not received in the preset time period, determining the height value of the highest block of the abnormal storage node as zero, and determining the hash value of the highest block of the abnormal storage node as none.
In some embodiments, the method further comprises:
and if the number of the second candidate storage nodes with the same hash value is less than the second preset number, generating a prompt message, wherein the prompt message is used for prompting that the target storage node cannot be determined.
If the number of the second candidate storage nodes with the same hash value is smaller than the second preset number, it is indicated that the number of the abnormal storage nodes in the current storage node cluster is too large, and a trusted storage node cannot be determined, and prompt information is generated for prompting a management mechanism managing the block chain to process.
In step 103, the updated master node is controlled to obtain the status data carried by each stored block from the target storage node, so that the updated master node determines the block transmission progress of the abnormal master node when the abnormal master node is abnormal according to the status data carried by each stored block.
And controlling the updated main node to acquire the state data carried by each stored block from the screened target storage node, so that the state data is used for recording the transaction state of the block to determine the block sending progress of the abnormal main node when the abnormal main node is abnormal.
Specifically, the transaction can be packaged into a single block, the transaction with large required processing capacity can be split and packaged into a plurality of blocks, sub-transactions in all the blocks form a whole transaction, the same block is sent to each storage node, and therefore after the blocks are sent to the storage nodes and stored, state data carried by the blocks can be updated, and after the updating, the main node can determine the block sending progress of the abnormal main node when the abnormal main node is abnormal according to the state data carried by the stored blocks.
As can be seen from the above, in the embodiment of the present application, a master node in a sending node cluster is controlled to send a block to be stored to each storage node in a storage node cluster, where the block to be stored carries status data, the sending node cluster includes the master node and a plurality of slave nodes, and the status data is used to record a transaction status of the block; when the master node is abnormal, screening target slave nodes from the plurality of slave nodes, updating the target slave nodes into the master node, and screening target storage nodes from the storage node cluster; and controlling the updated main node to acquire the state data carried by each stored block from the target storage node so that the updated main node determines the block sending progress of the abnormal main node when the abnormal main node is abnormal according to the state data carried by each stored block. Therefore, the block sending progress of the abnormal main node in the abnormal state is determined by controlling the updated main node to acquire the state data from the target storage node, the problem that the updated main node cannot accurately know the sending progress of the abnormal main node in the abnormal state, risks such as block data loss are easily caused is avoided, and the integrity of the block data is improved.
The method described in connection with the above embodiments will be described in further detail below by way of example.
In this embodiment, the node synchronization apparatus based on the blockchain is specifically integrated in a server as an example, and specific reference is made to the following description.
Referring to fig. 2a, fig. 2a is a second flowchart illustrating a node synchronization method based on a block chain according to an embodiment of the present disclosure. The method specifically comprises the following steps:
in step 201, a master node in a sending node cluster is controlled to send a block to be stored to each storage node in a storage node cluster, where the block to be stored carries status data, the sending node cluster includes the master node and a plurality of slave nodes, and the status data is used to record a transaction status of the block.
When the transaction is carried out on the block chain, the transaction can be split and packaged by the main node, a plurality of packaged blocks to be stored are finally obtained, and the main node can respectively send each block to be stored in the plurality of blocks to be stored to each storage node in the storage node cluster and store the block by the storage nodes. Each block carries status data (State Database) which records the result of the transaction execution, and the latest status represents the latest value of all keys on the Channel (Channel), so the status is also called as "world status". Thus, when a transaction is executed in blocks on the chain, each time a transaction arrives, the status data for the block is recorded.
Specifically, in order to avoid the abnormality of the master node due to a downtime or the like, a plurality of slave nodes are deployed in the blockchain, so that when the master node is abnormal, the master node replaces the abnormal master node to continue executing the splitting and packaging operations of the transaction.
In step 202, response information sent by each storage node is received, and when the number of the response information is greater than a first preset number, a next to-be-stored block is sent to each storage node in the storage node cluster.
The method comprises the steps that a sending rule of a main node when the main node sends a block to be stored to each storage node in a storage cluster is set in advance, when each storage node finishes storing the block to be stored, response information is sent to inform that the block is stored completely, the first preset number is half of the number of the storage nodes, and when more than half of the storage nodes send first feedback information, the main node continues to send the next block to be stored.
In step 203, the control master node transmits the operation state information to each slave node according to a preset time interval.
The master node may be configured to send operating state information to each slave node at preset time intervals (for example, 5s), where the operating state information is used to inform that the current operating state of the master node is normal.
In step 204, when the slave node does not receive the operation state information at the receiving time point of the current operation state information, each slave node is controlled to designate a candidate slave node from the plurality of slave nodes, obtain the designation result, and send the designation result.
When the slave node does not receive the operation state information at the time point of receiving the next current operation state information, it may be determined that the master node is abnormal, and a target slave node that can replace the abnormal master node needs to be determined from the plurality of slave nodes.
Specifically, the method for determining the target slave node from the plurality of slave nodes may be: and controlling each slave node to designate a candidate slave node in the plurality of slave nodes and sending the designated designation result, so as to screen out the target slave node from the plurality of slave nodes according to the received designation result.
In step 205, the designation result transmitted by each slave node is received, and the number of times each slave node in the plurality of slave nodes is designated as a candidate slave node is determined based on the determination result.
Each slave node sends a designated result, so that a plurality of designated results can be received, and the slave node with the highest designated frequency is determined as the target slave node according to the designated frequency of the slave node in each designated result.
In step 206, the slave node with the highest frequency among the plurality of slave nodes is determined as the target slave node.
For example, if 5 designation results are received, of which 3 designation results designate the slave node 1 as a candidate slave node and 2 designation results designate the slave node 2 as a candidate slave node, the slave node 1 is regarded as a target slave node.
In step 207, a first query request is sent to each storage node, where the first query request is used to query the height value of the highest chunk and the hash value of the highest chunk of the storage node.
The height of each storage node can only store one block, so different blocks in the storage node correspond to different height values. Therefore, when determining the trusted storage node from the storage node cluster, the trusted storage node can be determined according to the height value of the highest block in each storage node.
Specifically, referring to fig. 1e, fig. 1f, fig. 1g, and fig. 1h, fig. 1e is a first schematic storage diagram of each storage node in a storage node cluster according to an embodiment of the present disclosure; fig. 1f is a second storage schematic diagram of each storage node in a storage node cluster according to an embodiment of the present application; fig. 1g is a third schematic storage diagram of each storage node in a storage node cluster according to the embodiment of the present application; fig. 1h is a fourth storage schematic diagram of each storage node in the storage node cluster according to the embodiment of the present application. When the storage performance of each storage node is not very different, the block storage state shown in fig. 1e can be obtained, that is, the heights of the blocks stored in each storage node are the same; when the storage performance of the storage nodes is greatly different, as shown in fig. 1f, the storage performance of the storage node 1, the storage node 2 and the storage node 3 is similar, but the storage node 5 is stored in the block 6, and the storage node 4 is stored in the block 4, which shows that the storage performance of the storage node 5 is inferior to that of the storage node 1, the storage node 2 and the storage node 3, but superior to that of the storage node 4. As shown in fig. 1g, the height value of the stored block in a few storage nodes reaches 9, and the height value of the stored block in most storage nodes does not reach 9; as shown in fig. 1h, the storage node 3 is down, the storage node 4 is down, only the storage node 1, the storage node 2 and the storage node 5 operate, and different manners for determining the target storage node exist according to different situations.
In addition, the block hash value stored by the abnormal storage node under the same block height is different from the block hash values of other storage nodes due to the fact that block data of the stored block are artificially tampered, a storage node program is mistaken, and the storage node, the disk and the memory jump all cause the block hash value stored by the abnormal storage node to be different from the block hash values of other storage nodes, so that the risk that the block data are lost and untrustworthy due to the fact that the storage node, the storage node program are artificially tampered, the storage node disk and the memory jump are caused can be avoided, and the trustable storage node can be determined by combining the block hash value.
Specifically, a first query request for querying the height value of the highest block of the storage node and the hash value of the highest block may be sent to each storage node, and first feedback information returned by the storage node may be received. Therefore, the height value of the highest block of each storage node and the hash value corresponding to the highest block are obtained according to the first feedback information.
In step 208, first feedback information returned by the storage node according to the first query request is received.
And the storage node under normal work feeds back the highest block height value and the highest block hash value according to the first feedback information.
In step 209, when the number of the first feedback information is greater than a second preset number, each storage node corresponding to the highest block height value is sorted according to the height value to obtain a first sorting result, and the second preset number is the number obtained by adding one to the first preset number.
When the number of the first feedback information is larger than the second preset number, it is indicated that more than half of the storage nodes are in the running state. Each storage node corresponding to the highest block height value may be sorted by height value. The sorting mode can be that each storage node is sorted according to the sequence of the height values from high to low. As shown in tables 2 and 3. Table 6 shows the highest block height value and the highest block hash value of each of the storage nodes 1 to 5 sorted according to the first feedback information. After each storage node is sorted according to the sequence of the height values from high to low, a first sorting result shown in table 7 is obtained.
In step 210, each storage node in the first sorting result is sorted according to the hash value to obtain a second sorting result.
After the storage nodes are sorted according to the height values, each storage node corresponding to the hash value of the highest block in the first sorting result is sorted according to the hash value. The hash value may be sorted according to a dictionary order of the hash, so as to obtain a second sorting result. The first sorting result shown in table 7 is not changed after being subjected to hash value sorting, and therefore, the first sorting result in table 7 may also be used as the second sorting result after being subjected to hash value sorting.
In step 211, the number of candidate storage nodes of the first candidate storage node having the same highest block height value and hash value in the second sorting result is obtained.
If the number of the candidate storage nodes of the first candidate storage node with the same highest block height value and hash value is greater than the second preset number, it is indicated that the state in the current storage node conforms to the state in fig. 1e (any node in storage nodes 1 to 5 can be determined as a target storage node) and the state in fig. 1f (storage nodes 1, 2, and 3 can be determined as target storage nodes).
And determining any first candidate storage node as a target storage node.
In step 212, when the number of candidate storage nodes is greater than the second preset number, any first candidate storage node is determined as the target storage node.
And determining any first candidate storage node as a target storage node.
For example, as shown in table 6, the storage nodes 1, 2, 3, 4, and 5 in table 6 return the first feedback information, where the height value of the highest chunk in the storage node 1 is 8, the corresponding hash value is BBB, the height value of the highest chunk in the storage node 2 is 9, the corresponding hash value is AAA, the height value of the highest chunk in the storage node 3 is 9, the corresponding hash value is AAA, the height value of the highest chunk in the storage node 4 is 7, the height value of the highest chunk in the storage node 5 is 9, the corresponding hash value is AAA, and the corresponding hash value is CCC. Any one of the storage nodes 2, 3 and 5 may be determined as a target storage node.
TABLE 6
Storage node Highest block height value Hash value corresponding to the highest block
Storage node 2 9 AAA
Storage node 3 9 AAA
Storage node 5 9 AAA
Storage node 1 8 BBB
Storage node 4 7 CCC
TABLE 7
Figure BDA0003109117530000201
Figure BDA0003109117530000211
In step 213, when the number of candidate storage nodes is less than the second preset number, determining an abnormal number according to the number of the first feedback information, where the abnormal number is the number of abnormal storage nodes in the storage node cluster that do not return the first feedback information according to the first query request.
If part of the storage nodes do not complete block storage or are down, the number of the first feedback information is less than a second preset number, and therefore the situation that the target storage node cannot be determined from the acquired highest block height value and the highest block hash value is caused, or the determined target storage node is an abnormal storage node such as malicious modification. Therefore, the number of storage nodes which have no feedback and have abnormality needs to be determined according to the number of the first feedback information, so as to obtain the abnormality number.
In step 214, the sum of the number of exceptions and the number of first candidate storage nodes is calculated to obtain a calculation result.
And calculating the sum of the number of the first candidate storage nodes and the abnormal number to obtain a calculation result.
In step 215, when the calculation result is less than the second preset number, a second height value is determined according to the first height value, and the second height value is a height value obtained by subtracting one from the first height value.
And comparing the calculation result with a second preset number, and when the calculation result is smaller than the second preset number, indicating that the storage state in the storage node cluster is as shown in fig. 1g, and only a small number of storage nodes store the first height value. So that a small fraction of the storage nodes cannot be determined as trusted storage nodes (there is a risk of artificially adding blocks in the storage nodes). And determining a second height value according to the first height value, wherein the second height value is the height value obtained by subtracting one from the first height value.
In step 216, a second query request is sent to each storage node, where the second query request is used to query the hash value of the chunk corresponding to the second height value.
And when the first height value is 9, the second height value is 8, and therefore the second query request is sent again to query the hash value corresponding to the second height value.
In step 217, the receiving storage node determines the number of second candidate storage nodes having the same hash value according to the second feedback information returned by the second query request.
And determining the number of second candidate storage nodes with the same hash value according to the returned second feedback information.
In step 218, if the number of second candidate storage nodes having the same hash value is greater than a second preset number, any second candidate storage node is determined as the target storage node.
If the number of the second candidate storage nodes with the same hash value is greater than a second preset number, it is indicated that most storage nodes in the storage node cluster are in the running state, and only a small part of storage nodes are stored to the highest block height value. Any second candidate storage node may be determined to be the target storage node.
For example, as shown in table 8, the first feedback information fed back according to the first query request in table 8 is: the height value of the highest block in the storage node 1 is 9, the corresponding hash value is AAA, the height value of the highest block in the storage node 2 is 5, the corresponding hash value is DDD, the height value of the highest block in the storage node 3 is 9, the corresponding hash value is AAA, the height value of the highest block in the storage node 4 is 8, the corresponding hash value is EEE, the height value of the highest block in the storage node 5 is 8, and the corresponding hash value is EEE. Since the target storage node cannot be determined, a second query request is sent to query the hash value for the chunk with the height value of 9-1 to 8, thereby obtaining table 4. Since the table 9 is obtained by changing the highest block height values of the storage nodes 1 and 3 to 8 and the corresponding hash values to EEE in table 4, any one of the storage nodes 1, 3, 4, and 5 can be determined as the target storage node.
TABLE 8
Storage node Highest block height value Hash value corresponding to the highest block
Storage node 1 9 AAA
Storage node 3 9 AAA
Storage node 4 8 EEE
Storage node 5 8 EEE
Storage node 2 5 DDD
TABLE 9
Storage node Highest block height value Hash value corresponding to the highest block
Storage node 1 8 EEE
Storage node 3 8 EEE
Storage node 4 8 EEE
Storage node 5 8 EEE
Storage node 2 5 DDD
As can be seen from the above, in the embodiment of the present application, a master node in a sending node cluster is controlled to send a block to be stored to each storage node in a storage node cluster, where the block to be stored carries status data, the sending node cluster includes the master node and a plurality of slave nodes, and the status data is used to record a transaction status of the block; when the master node is abnormal, screening target slave nodes from the plurality of slave nodes, updating the target slave nodes into the master node, and screening target storage nodes from the storage node cluster; and controlling the updated main node to acquire the state data carried by each stored block from the target storage node so that the updated main node determines the block sending progress of the abnormal main node when the abnormal main node is abnormal according to the state data carried by each stored block. Therefore, the block sending progress of the abnormal main node in the abnormal state is determined by controlling the updated main node to acquire the state data from the target storage node, the problem that the updated main node cannot accurately know the sending progress of the abnormal main node in the abnormal state, risks such as block data loss are easily caused is avoided, and the integrity of the block data is improved.
In some embodiments, please refer to fig. 2b, where fig. 2b is a first communication connection diagram between a master node and a slave node in a sending node cluster and a storage node in a storage node cluster according to an embodiment of the present disclosure. In fig. 2c, the transmitting node cluster is composed of a master node, a slave node 1, and a slave node 2, and the storage node cluster is composed of a storage node 1, a storage node 2, a storage node 3, and a storage node 4. When a transaction is received, the master node is configured to sort and pack the transactions into chunks and send the chunks to each storage node in the cluster of storage nodes. Each storage node verifies whether the received transaction in the block is legal or not, and executes and stores the legal transaction. In order to avoid that the transaction cannot be normally packaged and executed when the master node is abnormal, a plurality of slave nodes need to be configured for the master node, so that when the master node is abnormal, one slave node can replace the abnormal master node to continuously execute the transaction. In order to determine the block transmission progress of the master node in the abnormal state, each slave node can be controlled to acquire the state data corresponding to the stored block from any one storage node, so that the block transmission progress of the master node in the abnormal state is determined.
Specifically, as shown in fig. 2b, after receiving the transaction, the master node sorts and packages the transaction into blocks to be stored, distributes the blocks to be stored to the storage node 1, the storage node 2, the storage node 3, and the storage node 4 for verification, and stores the blocks after the storage node passes verification. Correspondingly, the state data of the block is from to be stored to be written into the stored three transaction states. The slave node 1 and the slave node 2 acquire the state data carried by the stored block from any storage node in the storage node cluster so as to ensure the synchronization of the block transmission progress with the master node. For example, if the slave node 1 acquires from the storage node 2 that the status data carried by the stored block includes that the block 1 is stored, the block 2 is stored, and the block 3 is stored, the slave node 1 determines that the master node has distributed the block 1, the block 2, and the block 3 and is verified to be stored by the storage node after passing, and the block transmission schedule of the master node is the block 1, the block 2, and the block 3.
Specifically, in order to enable the slave node to determine whether the master node is abnormal, a communication relationship between each slave node and the master node may be established, so that the slave node can quickly know when the master node is abnormal. As shown in fig. 2c, the master node may be controlled to periodically transmit the operation state information to the slave node 1 and the slave node 2 to inform that the slave nodes are currently operating normally, and the slave nodes may determine that the master node is abnormal if the slave nodes do not receive the operation state information at the next transmission time point.
In some embodiments, please refer to fig. 2c, where fig. 2c is a second communication connection diagram between a master node and a slave node in a sending node cluster and a storage node in a storage node cluster according to an embodiment of the present disclosure. When the master node does not send the running state information to the slave nodes, voting is carried out among the slave nodes, target slave nodes capable of replacing abnormal master nodes to continue executing transactions are elected, or the slave nodes send voting results to a management end corresponding to the sending node cluster in a unified mode, and the slave nodes with the largest number of votes are determined as the target slave nodes by the management end.
In some embodiments, please refer to fig. 2d, where fig. 2d is a third communication connection diagram between a master node and a slave node in a sending node cluster and a storage node in a storage node cluster according to an embodiment of the present disclosure. When the target slave node is elected, the target slave node is set to transmit the operation state information to other slave nodes and the recovered master node. And the target slave node needs to determine a trusted storage node from the storage node cluster, so that the block sending progress of the master node is determined according to the high-credibility storage node when the master node is abnormal. Therefore, the target slave node needs to query the height value of the highest block and the hash value of the highest block in each storage node, so as to determine a trusted storage node.
For example, if the slave node 2 is determined as the target slave node and the abnormal master node is not recovered, the control target slave node periodically sends the operation state information to the slave node 1, and queries the height value of the highest block and the hash value of the highest block in the storage nodes 1, 2, 3, and 4.
In some embodiments, please refer to fig. 2e, where fig. 2e is a fourth communication connection diagram between a master node and a slave node in a sending node cluster and a storage node in a storage node cluster according to an embodiment of the present disclosure. After the storage node 1 is determined to be a trusted storage node, the target slave node acquires the state data of the stored block from the storage node 1, and determines the block sending progress of the master node when the master node is abnormal according to the state data of the stored block.
For example, if the target slave node acquires that the state data carried by the stored block in the storage node 1 is stored in the block 1, the block 2 is stored, and the block 3 is stored, the slave node 1 determines that the master node has distributed the block 1, the block 2, and the block 3 and is verified to be stored by the storage node after passing, and the block transmission progress of the master node is the block 1, the block 2, and the block 3.
In some embodiments, please refer to fig. 2f, where fig. 2f is a fifth communication connection diagram between a master node and a slave node in a sending node cluster and a storage node in a storage node cluster according to an embodiment of the present disclosure. After the block sending progress of the master node in abnormal conditions is determined, the target slave node replaces the master node to continue executing the transaction, therefore, the node receiving the transaction is changed from the master node to the target slave node, the target slave node performs the processes of sequencing the transaction and packaging the transaction into blocks, and the blocks to be stored are sent to each storage node in the storage node cluster for verification and storage.
For example, if the block transmission progress of the master node in the abnormal state is block 1, block 2, and block 3, the target slave node will continue to transmit blocks such as block 4 to each storage node in the storage node cluster for verification and storage after the master node continues to perform the transaction.
In order to better implement the node synchronization method based on the block chain provided in the embodiments of the present application, an embodiment of the present application further provides a device based on the node synchronization method based on the block chain. The terms are the same as those in the above node synchronization method based on the block chain, and specific implementation details may refer to the description in the method embodiment.
Referring to fig. 3, fig. 3 is a schematic structural diagram of a node synchronization apparatus based on a block chain according to an embodiment of the present disclosure, where the node synchronization apparatus based on a block chain may include a sending module 301, a screening module 302, an obtaining module 303, and the like.
A sending module 301, configured to control a master node in a sending node cluster to send a block to be stored to each storage node in a storage node cluster, where the block to be stored carries status data, and the sending node cluster includes the master node and a plurality of slave nodes, and the status data is used to record a transaction status of the block;
a screening module 302, configured to screen a target slave node from the multiple slave nodes when the master node is abnormal, update the target slave node as the master node, and screen a target storage node from the storage node cluster;
an obtaining module 303, configured to control the updated master node to obtain, from the target storage node, the status data carried by each stored block, so that the updated master node determines, according to the status data carried by each stored block, a block sending progress of the abnormal master node when the abnormal master node is abnormal.
In some embodiments, the screening module 302 includes:
the first sending submodule is used for sending a first query request to each storage node, wherein the first query request is used for querying a height value of the highest block of the storage node and a hash value of the highest block;
the receiving submodule is used for receiving first feedback information returned by the storage node according to the first query request;
the sorting submodule is used for sorting all the storage nodes in the storage node cluster based on the highest block height value and the hash value of each storage node according to the first feedback information;
and the first screening submodule is used for screening out a target storage node from the storage node cluster according to the sorting result.
In some embodiments, the apparatus further comprises:
the receiving module is used for receiving response information sent by each storage node, and sending a next block to be stored to each storage node in the storage node cluster when the number of the response information is larger than a first preset number;
the sorting submodule comprises:
the first sorting unit is used for sorting each storage node corresponding to the highest block height value according to the height value when the number of the first feedback information is larger than a second preset number, so as to obtain a first sorting result, wherein the second preset number is the number obtained by adding one to the first preset number;
the second sorting unit is used for sorting each storage node in the first sorting result according to the hash value to obtain a second sorting result;
the first screening submodule includes:
and the screening unit is used for screening the target storage node from the storage node cluster according to the second sorting result.
In some embodiments, the screening unit is to:
acquiring the number of candidate storage nodes of the first candidate storage nodes with the same highest block height value and hash value in the second sorting result;
and when the number of the candidate storage nodes is larger than the second preset number, determining any first candidate storage node as a target storage node.
In some embodiments, the screening module 302 is further configured to:
when the number of the candidate storage nodes is smaller than the second preset number, determining an abnormal number according to the number of the first feedback information, wherein the abnormal number is the number of abnormal storage nodes which do not return the first feedback information according to the first query request in the storage node cluster;
calculating the sum of the abnormal number and the number of the first candidate storage nodes to obtain a calculation result;
when the calculation result is smaller than the second preset number, determining a second height value according to a first height value, wherein the first height value is a highest block height value corresponding to the candidate storage node, and the second height value is a height value obtained by subtracting one from the first height value;
sending a second query request to each storage node, wherein the second query request is used for querying the hash value of the block corresponding to the second height value;
receiving second feedback information returned by the storage nodes according to the second query request, and determining the number of second candidate storage nodes with the same hash value;
and if the number of the second candidate storage nodes with the same hash value is greater than the second preset number, determining any second candidate storage node as a target storage node.
In some embodiments, the screening module 302 is further configured to:
when the calculation result is larger than the second preset number, judging whether first feedback information returned by the abnormal storage node according to the first query request is received within a preset time period;
if first feedback information returned by the abnormal storage node according to the first query request is not received within a first preset time period, determining the height value of the highest block of the abnormal storage node to be zero, and determining the hash value of the highest block of the abnormal storage node to be none.
In some embodiments, the screening module 302 is further configured to:
and if the number of the second candidate storage nodes with the same hash value is less than the second preset number, generating a prompt message, wherein the prompt message is used for prompting that the target storage node cannot be determined.
In some embodiments, the apparatus further comprises:
the control module is used for controlling the main node to send the running state information to each slave node according to a preset time interval;
the screening module 302 includes:
the appointing submodule is used for controlling each slave node to appoint a candidate slave node from a plurality of slave nodes when the slave node does not receive the operation state information at the receiving time point of the current operation state information, obtaining an appointed result and sending the appointed result;
and the second screening submodule is used for receiving the specified result sent by each slave node and screening the target slave node from the plurality of slave nodes based on the specified result.
In some embodiments, the second screening submodule comprises:
a first determination unit configured to determine a number of times each of a plurality of slave nodes is designated as a candidate slave node based on the determination result;
a second determining unit, configured to determine, as the target slave node, the slave node with the highest frequency among the plurality of slave nodes.
As can be seen from the above, in the embodiment of the present application, the sending module 301 controls the master node in the sending node cluster to send a block to be stored to each storage node in the storage node cluster, where the block to be stored carries status data, the sending node cluster includes the master node and a plurality of slave nodes, and the status data is used to record the transaction status of the block; when the master node is abnormal, the screening module 302 screens out a target slave node from the plurality of slave nodes, updates the target slave node to the master node, and screens out a target storage node from the storage node cluster; the obtaining module 303 controls the updated master node to obtain the status data carried by each stored block from the target storage node, so that the updated master node determines the block transmission progress of the abnormal master node when the abnormal master node is abnormal according to the status data carried by each stored block. Therefore, the block sending progress of the abnormal main node in the abnormal state is determined by controlling the updated main node to acquire the state data from the target storage node, the problem that the updated main node cannot accurately know the sending progress of the abnormal main node in the abnormal state, risks such as block data loss are easily caused is avoided, and the integrity of the block data is improved.
Correspondingly, the embodiment of the application also provides a server. As shown in fig. 4, fig. 4 is a schematic structural diagram of a server provided in the embodiment of the present application. The server 400 includes a processor 401 having one or more processing cores, a memory 402 having one or more computer-readable storage media, and a computer program stored on the memory 402 and executable on the processor. The processor 401 is electrically connected to the memory 402. Those skilled in the art will appreciate that the server architectures depicted in the figures are not meant to be limiting with respect to the servers, and may include more or fewer components than those illustrated, or some components may be combined, or a different arrangement of components.
The processor 401 is a control center of the server 400, connects various parts of the entire server 400 using various interfaces and lines, performs various functions of the server 400 and processes data by running or loading software programs and/or modules stored in the memory 402, and calling data stored in the memory 402, thereby performing overall monitoring of the server 400.
In this embodiment, the processor 401 in the server 400 loads instructions corresponding to processes of one or more application programs into the memory 402 according to the following steps, and the processor 401 runs the application programs stored in the memory 402, thereby implementing various functions:
the method comprises the steps that a master node in a sending node cluster is controlled to send a block to be stored to each storage node in a storage node cluster, the block to be stored carries state data, the sending node cluster comprises the master node and a plurality of slave nodes, and the state data are used for recording transaction states of the blocks; when the master node is abnormal, screening target slave nodes from the plurality of slave nodes, updating the target slave nodes into the master node, and screening target storage nodes from the storage node cluster; and controlling the updated main node to acquire the state data carried by each stored block from the target storage node so that the updated main node determines the block sending progress of the abnormal main node when the abnormal main node is abnormal according to the state data carried by each stored block.
The above operations can be implemented in the foregoing embodiments, and are not described in detail herein.
Optionally, as shown in fig. 4, the server 400 further includes: an input unit 403 and a power supply 404. The processor 401 is electrically connected to the input unit 403 and the power source 404, respectively. Those skilled in the art will appreciate that the server architecture shown in FIG. 4 is not meant to be limiting, and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
In the present embodiment, the input unit 406 may be used to receive input numbers, character information, or user characteristic information (e.g., fingerprint, iris, facial information, etc.), and generate a keyboard, mouse, joystick, optical, or trackball signal input related to user settings and function control.
The power supply 404 is used to power the various components of the server 400. Optionally, the power source 404 may be logically connected to the processor 401 through a power management system, so as to implement functions of managing charging, discharging, power consumption management, and the like through the power management system. The power supply 404 may also include any component of one or more dc or ac power sources, recharging systems, power failure detection circuitry, power converters or inverters, power status indicators, and the like.
In the foregoing embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
As can be seen from the above, in the server provided in this embodiment, a to-be-stored block is sent to each storage node in a storage node cluster by controlling a master node in the sending node cluster, where the to-be-stored block carries status data, and the sending node cluster includes the master node and a plurality of slave nodes, and the status data is used to record a transaction status of the block; when the master node is abnormal, screening target slave nodes from the plurality of slave nodes, updating the target slave nodes into the master node, and screening target storage nodes from the storage node cluster; and controlling the updated main node to acquire the state data carried by each stored block from the target storage node so that the updated main node determines the block sending progress of the abnormal main node when the abnormal main node is abnormal according to the state data carried by each stored block. Therefore, the block sending progress of the abnormal main node in the abnormal state is determined by controlling the updated main node to acquire the state data from the target storage node, the problem that the updated main node cannot accurately know the sending progress of the abnormal main node in the abnormal state, risks such as block data loss are easily caused is avoided, and the integrity of the block data is improved.
It will be understood by those skilled in the art that all or part of the steps of the methods of the above embodiments may be performed by instructions or by associated hardware controlled by the instructions, which may be stored in a computer readable storage medium and loaded and executed by a processor.
To this end, the present application provides a computer-readable storage medium, in which a plurality of computer programs are stored, and the computer programs can be loaded by a processor to execute the steps in any data processing method provided by the present application. For example, the computer program may perform the steps of:
the method comprises the steps that a master node in a sending node cluster is controlled to send a block to be stored to each storage node in a storage node cluster, the block to be stored carries state data, the sending node cluster comprises the master node and a plurality of slave nodes, and the state data are used for recording transaction states of the blocks; when the master node is abnormal, screening target slave nodes from the plurality of slave nodes, updating the target slave nodes into the master node, and screening target storage nodes from the storage node cluster; and controlling the updated main node to acquire the state data carried by each stored block from the target storage node so that the updated main node determines the block sending progress of the abnormal main node when the abnormal main node is abnormal according to the state data carried by each stored block.
The above operations can be implemented in the foregoing embodiments, and are not described in detail herein.
Wherein the storage medium may include: read Only Memory (ROM), Random Access Memory (RAM), magnetic or optical disks, and the like.
Since the computer program stored in the storage medium can execute the steps in any data processing method provided in the embodiments of the present application, beneficial effects that can be achieved by any node synchronization method based on a block chain provided in the embodiments of the present application can be achieved, which are detailed in the foregoing embodiments and will not be described herein again.
The above detailed description is given to a node synchronization method, device, storage medium and server based on a block chain according to an embodiment of the present application, and a specific example is applied in the detailed description to explain the principle and implementation manner of the present application, and the description of the above embodiment is only used to help understanding the method and core ideas of the present application; meanwhile, for those skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (12)

1. A node synchronization method based on a block chain is characterized by comprising the following steps:
the method comprises the steps that a master node in a sending node cluster is controlled to send a block to be stored to each storage node in a storage node cluster, the block to be stored carries state data, the sending node cluster comprises the master node and a plurality of slave nodes, and the state data are used for recording transaction states of the blocks;
when the master node is abnormal, screening target slave nodes from a plurality of slave nodes, updating the target slave nodes into the master node, and screening target storage nodes from the storage node cluster;
and controlling the updated main node to acquire the state data carried by each stored block from the target storage node, so that the updated main node determines the block sending progress of the abnormal main node when the abnormal main node is abnormal according to the state data carried by each stored block.
2. The blockchain-based node synchronization method of claim 1, wherein the step of screening out target storage nodes from the storage node cluster comprises:
sending a first query request to each storage node, wherein the first query request is used for querying a height value of a highest block and a hash value of the highest block of the storage node;
receiving first feedback information returned by the storage node according to the first query request;
sorting all storage nodes in the storage node cluster based on the highest block height value and the hash value of each storage node according to the first feedback information;
and screening out target storage nodes from the storage node cluster according to the sorting result.
3. The method for synchronizing nodes based on block chains according to claim 2, further comprising, after the step of sending the block to be stored to each storage node in the storage node cluster, the steps of:
receiving response information sent by each storage node, and sending a next block to be stored to each storage node in the storage node cluster when the number of the response information is larger than a first preset number;
the step of sorting all storage nodes in the storage node cluster based on the highest block height value and the hash value of each storage node according to the first feedback information includes:
when the quantity of the first feedback information is larger than a second preset quantity, sequencing each storage node corresponding to the highest block height value according to the height value to obtain a first sequencing result, wherein the second preset quantity is the quantity obtained by adding one to the first preset quantity;
sequencing each storage node in the first sequencing result according to the Hash value to obtain a second sequencing result;
the step of screening out the target storage node from the storage node cluster according to the sorting result comprises the following steps:
and screening out target storage nodes from the storage node cluster according to the second sorting result.
4. The method for synchronizing nodes based on block chains according to claim 3, wherein the step of screening target storage nodes from the storage node cluster according to the second sorting result comprises:
acquiring the number of candidate storage nodes of the first candidate storage nodes with the same highest block height value and hash value in the second sorting result;
and when the number of the candidate storage nodes is larger than the second preset number, determining any first candidate storage node as a target storage node.
5. The method of block chain based node synchronization of claim 4, further comprising:
when the number of the candidate storage nodes is smaller than the second preset number, determining an abnormal number according to the number of the first feedback information, wherein the abnormal number is the number of abnormal storage nodes which do not return the first feedback information according to the first query request in the storage node cluster;
calculating the sum of the abnormal quantity and the quantity of the first candidate storage nodes to obtain a calculation result;
when the calculation result is smaller than the second preset number, determining a second height value according to a first height value, wherein the first height value is a highest block height value corresponding to the candidate storage node, and the second height value is a height value obtained by subtracting one from the first height value;
sending a second query request to each storage node, wherein the second query request is used for querying the hash value of the block corresponding to the second height value;
receiving second feedback information returned by the storage nodes according to the second query request, and determining the number of second candidate storage nodes with the same hash value;
and if the number of the second candidate storage nodes with the same hash value is greater than the second preset number, determining any second candidate storage node as a target storage node.
6. The method of block chain based node synchronization of claim 5, further comprising:
when the calculation result is larger than the second preset number, judging whether first feedback information returned by the abnormal storage node according to the first query request is received within a preset time period;
if first feedback information returned by the abnormal storage node according to the first query request is not received within a first preset time period, determining the height value of the highest block of the abnormal storage node to be zero, and determining the hash value of the highest block of the abnormal storage node to be none.
7. The method of block chain based node synchronization of claim 4, further comprising:
and if the number of the second candidate storage nodes with the same hash value is less than the second preset number, generating a prompt message, wherein the prompt message is used for prompting that the target storage node cannot be determined.
8. The method for synchronizing nodes based on a blockchain according to claim 1, further comprising, before the step of screening out a target slave node from a plurality of slave nodes when the master node is abnormal:
controlling the master node to send running state information to each slave node according to a preset time interval;
when the master node is abnormal, the step of screening out a target slave node from a plurality of slave nodes comprises the following steps:
when the slave node does not receive the operation state information at the receiving time point of the current operation state information, controlling each slave node to designate a candidate slave node from a plurality of slave nodes to obtain a designated result and sending the designated result;
and receiving a specified result sent by each slave node, and screening out the target slave node from the plurality of slave nodes based on the specified result.
9. The method for synchronization of nodes based on block chains according to claim 8, wherein the step of screening out a target slave node among a plurality of slave nodes based on the determination result comprises:
determining a number of times each of a plurality of slave nodes is designated as a candidate slave node based on the determination result;
and determining the slave node with the highest frequency in the plurality of slave nodes as the target slave node.
10. A node synchronization apparatus based on a block chain, comprising:
the system comprises a sending module, a receiving module and a processing module, wherein the sending module is used for controlling a master node in a sending node cluster to send a block to be stored to each storage node in a storage node cluster, the block to be stored carries state data, the sending node cluster comprises the master node and a plurality of slave nodes, and the state data is used for recording the transaction state of the block;
the screening module is used for screening target slave nodes from a plurality of slave nodes when the master node is abnormal, updating the target slave nodes into the master node, and screening target storage nodes from the storage node cluster;
and the obtaining module is used for controlling the updated main node to obtain the state data carried by each stored block from the target storage node, so that the updated main node determines the block sending progress of the abnormal main node when the abnormal main node is abnormal according to the state data carried by each stored block.
11. A computer-readable storage medium storing instructions adapted to be loaded by a processor to perform the steps of the method for synchronization of blockchain based nodes according to any one of claims 1 to 9.
12. A server comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor when executing the program performs the steps in the blockchain based node synchronization method according to any one of claims 1 to 9.
CN202110644467.XA 2021-06-09 2021-06-09 Node synchronization method and device based on block chain, storage medium and server Active CN113364874B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110644467.XA CN113364874B (en) 2021-06-09 2021-06-09 Node synchronization method and device based on block chain, storage medium and server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110644467.XA CN113364874B (en) 2021-06-09 2021-06-09 Node synchronization method and device based on block chain, storage medium and server

Publications (2)

Publication Number Publication Date
CN113364874A CN113364874A (en) 2021-09-07
CN113364874B true CN113364874B (en) 2022-06-10

Family

ID=77533404

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110644467.XA Active CN113364874B (en) 2021-06-09 2021-06-09 Node synchronization method and device based on block chain, storage medium and server

Country Status (1)

Country Link
CN (1) CN113364874B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113794764A (en) * 2021-09-10 2021-12-14 小红书科技有限公司 Request processing method and medium for server cluster and electronic device

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018149385A1 (en) * 2017-02-17 2018-08-23 阿里巴巴集团控股有限公司 Blockchain system and data storage method and apparatus
CN109951331A (en) * 2019-03-15 2019-06-28 北京百度网讯科技有限公司 For sending the method, apparatus and computing cluster of information
CN110430064A (en) * 2017-03-30 2019-11-08 腾讯科技(深圳)有限公司 Block catenary system, message treatment method and storage medium
CN110633323A (en) * 2019-09-16 2019-12-31 腾讯科技(深圳)有限公司 Business data storage method, device, storage medium and computer equipment
CN110868337A (en) * 2019-11-15 2020-03-06 腾讯科技(深圳)有限公司 Fault-tolerant consensus mechanism testing method and device, storage medium and computer equipment
WO2020048436A1 (en) * 2018-09-07 2020-03-12 腾讯科技(深圳)有限公司 Method, device, computer apparatus and storage medium for electing representative node apparatus
CN111694694A (en) * 2020-05-22 2020-09-22 北京三快在线科技有限公司 Database cluster processing method and device, storage medium and node
WO2020187069A1 (en) * 2019-03-15 2020-09-24 腾讯科技(深圳)有限公司 Data synchronization method and apparatus, computer device and readable storage medium
WO2020258912A1 (en) * 2019-06-26 2020-12-30 京东数字科技控股有限公司 Blockchain consensus method, device and system
CN112190924A (en) * 2020-12-04 2021-01-08 腾讯科技(深圳)有限公司 Data disaster tolerance method, device and computer readable medium

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018149385A1 (en) * 2017-02-17 2018-08-23 阿里巴巴集团控股有限公司 Blockchain system and data storage method and apparatus
CN110430064A (en) * 2017-03-30 2019-11-08 腾讯科技(深圳)有限公司 Block catenary system, message treatment method and storage medium
WO2020048436A1 (en) * 2018-09-07 2020-03-12 腾讯科技(深圳)有限公司 Method, device, computer apparatus and storage medium for electing representative node apparatus
CN109951331A (en) * 2019-03-15 2019-06-28 北京百度网讯科技有限公司 For sending the method, apparatus and computing cluster of information
WO2020187069A1 (en) * 2019-03-15 2020-09-24 腾讯科技(深圳)有限公司 Data synchronization method and apparatus, computer device and readable storage medium
WO2020258912A1 (en) * 2019-06-26 2020-12-30 京东数字科技控股有限公司 Blockchain consensus method, device and system
CN110633323A (en) * 2019-09-16 2019-12-31 腾讯科技(深圳)有限公司 Business data storage method, device, storage medium and computer equipment
CN110868337A (en) * 2019-11-15 2020-03-06 腾讯科技(深圳)有限公司 Fault-tolerant consensus mechanism testing method and device, storage medium and computer equipment
CN111694694A (en) * 2020-05-22 2020-09-22 北京三快在线科技有限公司 Database cluster processing method and device, storage medium and node
CN112190924A (en) * 2020-12-04 2021-01-08 腾讯科技(深圳)有限公司 Data disaster tolerance method, device and computer readable medium

Also Published As

Publication number Publication date
CN113364874A (en) 2021-09-07

Similar Documents

Publication Publication Date Title
US11281644B2 (en) Blockchain logging of data from multiple systems
CN109886693B (en) Consensus realization method, device, equipment and medium for block chain system
US20060050629A1 (en) Fail over method and a computing system having fail over function
CN114049123B (en) Block chain consensus method and device, computer equipment and storage medium
KR20120018178A (en) Swarm-based synchronization over a network of object stores
CN107451147A (en) A kind of method and apparatus of kafka clusters switching at runtime
CN111400112A (en) Writing method and device of storage system of distributed cluster and readable storage medium
CN113157810B (en) Block synchronization method, computer equipment and storage medium
US11102284B2 (en) Service processing methods and systems based on a consortium blockchain network
WO2020199713A1 (en) Data verification method, system, apparatus, and device
CN112231108A (en) Task processing method and device, computer readable storage medium and server
CN113364874B (en) Node synchronization method and device based on block chain, storage medium and server
CN111198662B (en) Data storage method, device and computer readable storage medium
CN113342893B (en) Node synchronization method and device based on block chain, storage medium and server
CN111930489A (en) Task scheduling method, device, equipment and storage medium
CN111541762A (en) Data processing method, management server, device and storage medium
CN113395165B (en) Consensus process processing method and device, storage medium and computer equipment
CN114936253A (en) Block chain consensus method and device, electronic equipment and storage medium
CN114172785A (en) Alarm information processing method, device, equipment and storage medium
CN112667621A (en) Block chain supervision method, equipment and computer readable storage medium
CN111737351A (en) Transaction management method and device for distributed management system
CN110704196A (en) Resource data transfer method, device and block chain system
CN113590643B (en) Data synchronization method, device, equipment and storage medium based on dual-track database
CN114489772A (en) Workflow execution method and device, storage medium and equipment
EP3627359B1 (en) Transaction processing method, device and equipment

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