IP Library › Granted Patent US 11,775,377
Granted Patent B2
US 11,775,377 · App. 17/542,971 · Granted Oct 3, 2023

Distributed system, message processing method, nodes, client, and storage medium

Inventors: Rui Guo (Guangdong, CN); Maocai Li (Guangdong, CN); Qi Zhao (Guangdong, CN); Jianjun Zhang (Guangdong, CN); Haitao Tu (Guangdong, CN); Zongyou Wang (Guangdong, CN); Jun Liang (Guangdong, CN); Dawei Zhu (Guangdong, CN); Lisheng Chen (Guangdong, CN); Binhua Liu (Guangdong, CN)
Assignee: TENCENT TECHNOLOGY (SHENZHEN) COMPANY LIMITED
G06F11/079G06F11/0709G06F11/0751G06F11/2023G06F21/00H04L9/3242H04L9/3247H04L43/0847H04L63/0442H04L63/123H04L67/1097H04L9/30H04L9/50
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 11,775,377
App. No.
17/542,971
Granted
Oct 3, 2023
Kind
B2
Abstract

The present disclosure discloses a client device having a digital signature. The client device includes processing circuitry configured to send a message to be stored in nodes after the nodes reach a consensus on the message. The message includes the digital signature of the client device. The processing circuitry obtains results from a subset of the nodes that receive the message. The results have respective digital signatures of the subset of the nodes. The nodes are in a first consensus mode for reaching the consensus on the message. After verifying the digital signatures, the processing circuitry determines whether one or more of the nodes has malfunctioned based on the results. Based on a determination that the one or more of the nodes has malfunctioned, the processing circuitry triggers the nodes to switch from the first consensus mode to a second consensus mode for reaching the consensus on the message.

Claims (104)

1. A client device having a digital signature, the client device comprising:

processing circuitry configured to:

send a message to be stored in nodes after the nodes reach a consensus on the message, the message including the digital signature of the client device;

obtain results from a subset of the nodes that receive the message, the results having respective digital signatures of the subset of the nodes, the nodes reaching the consensus on the message in one of a Paxos algorithm, a recursive algorithm for fault tolerance (RAFT) algorithm, or an improved RAFT algorithm (T-RAFT);

after verifying the digital signatures of the subset of the nodes, determine, by the processing circuitry of the client device, based on the results, whether one or more of the nodes has malfunctioned; and

based on a determination that the one or more of the nodes has malfunctioned, trigger, by the processing circuitry of the client device, the nodes to switch from the one of the Paxos algorithm, the RAFT algorithm, or the T-RAFT algorithm to a second consensus mode for reaching the consensus on the message, the second consensus mode having Byzantine fault tolerance.

2. The client device according to claim 1 , wherein:

the nodes include a leader node and follower nodes;

the message from the client device further includes first unique information;

the subset is of the follower nodes;

one of the results from one of the follower nodes includes second unique information; and

the processing circuitry is further configured to:

for the one of the follower nodes,

determine whether the one of the follower nodes is an erroneous node based on a determination that the second unique information in the result sent by the one of the follower nodes is different from the first unique information in the message from the client device; and

determine that the one of the follower nodes is a faulty node when the result is not received from the one of the follower nodes.

3. The client device according to claim 2 , wherein

the message from the client device includes a first sequence number;

one of the results from one of the follower nodes includes a second sequence number; and

the processing circuitry is further configured to:

for the one of the follower nodes, determine that the one of the follower nodes sends an inconsistent sequence number when the second sequence number is different from the first sequence number; and

determine that the leader node is a malicious node when a number of the follower nodes sending inconsistent sequence numbers exceeds a threshold.

4. The client device according to claim 3 , wherein the processing circuitry is further configured to:

trigger the nodes to switch from the one of the Paxos algorithm, the RAFT algorithm, or the T-RAFT algorithm to the second consensus mode when the processing circuitry determines at least one of (i) the leader node is the malicious node, (ii) at least N of the follower nodes are faulty nodes, or (iii) at least M of the follower nodes are erroneous nodes, N and M being positive integers.

5. A distributed system, comprising:

the client device according to claim 4 , and

the nodes, wherein

one of the nodes is configured to:

after receiving the trigger from the processing circuitry to switch to the second consensus mode,

send a hash value in a message stored by the one of the nodes and a digital signature of the one of the nodes to other nodes in the distributed system;

receive hash values in messages from the other nodes;

determine whether the hash value stored by the respective node is consistent with the hash values from the other nodes; and

send a consistency confirmation to the client device when the hash value stored by the one of the nodes is determined to be consistent with the hash values from the other nodes.

6. The distributed system according to claim 5 , wherein the processing circuitry of the client device is further configured to:

determine a leader node from the nodes for the second consensus mode after the nodes are switched to the second consensus mode.

7. A distributed system, comprising:

the client device according to claim 4 , and

the nodes, wherein

one of the nodes is configured to:

after receiving the trigger to switch to the second consensus mode,

send a hash value in a message stored by the one of the nodes and a digital signature of the one of the nodes to other nodes in the distributed system;

receive another hash value in a message from one of the other nodes;

determine whether the hash value stored by the one of the nodes is consistent with the other hash value from the one of the other nodes;

send a data confirmation to the one of the other nodes when the hash value stored by the one of the nodes is determined to be consistent with the other hash value, the data confirmation including the digital signature of the one of the nodes and indicating that the message stored by the one of the nodes is consistent with the message from the one of the other nodes; and

when the one of the nodes receives a data confirmation from each of the other nodes, send a data confirmation to the client device.

8. The distributed system according to claim 7 , wherein the processing circuitry is further configured to:

determine whether the message stored in the respective node is consistent with the messages stored in the other nodes based on the data confirmation from the respective node;

when each of the data confirmations from the nodes to the client device is received within a pre-determined time,

notify the nodes to switch back to the one of the Paxos algorithm, the RAFT algorithm, or the T-RAFT algorithm; and

terminate switching to the second consensus mode; and

when at least one of the data confirmations from the nodes to the client device is not received within the pre-determined time, notify the nodes to switch to the second consensus mode.

9. A distributed system, comprising:

the client device according to claim 4 ; and

the nodes, the leader node being configured to switch the nodes to the one of the Paxos algorithm, the RAFT algorithm, or the T-RAFT algorithm when a number of times that the nodes reach the consensus on the received message from the client device in the second consensus mode exceeds a first consensus threshold of the leader node.

10. The client device according to claim 1 , wherein an algorithm implementing the second consensus mode includes one of: a Byzantine fault tolerance (BFT) algorithm, a practical Byzantine fault tolerance (PBFT) algorithm, a Byzantine fault tolerance-recursive algorithm for fault tolerance (BFT-RAFT), or a BFT-Paxos algorithm.

11. A message processing method, comprising:

sending, by processing circuitry of a client device having a digital signature, a message to be stored in nodes after the nodes reach a consensus on the message, the message including the digital signature of the client device;

obtaining results from a subset of the nodes that receive the message, the results having respective digital signatures of the subset of the nodes, the nodes reaching the consensus on the message in one of a Paxos algorithm, a recursive algorithm for fault tolerance (RAFT) algorithm, or an improved RAFT algorithm (T-RAFT);

after verifying the digital signatures of the subset of the nodes, determining, by the processing circuitry of the client device, based on the results, whether one or more of the nodes has malfunctioned; and

based on a determination that the one or more of the nodes has malfunctioned, triggering, by the processing circuitry of the client device, the nodes to switch from the one of the Paxos algorithm, the RAFT algorithm, or the T-RAFT algorithm to a second consensus mode for reaching the consensus on the message, the second consensus mode having Byzantine fault tolerance.

12. The message processing method according to claim 11 , wherein

the nodes include a leader node and follower nodes;

the message from the client device further includes first unique information;

the subset is of the follower nodes;

one of the results from one of the follower nodes includes second unique information; and

the message processing method further includes:

for the one of the follower nodes,

determining, by the processing circuitry, whether the one of the follower nodes is an erroneous node based on a determination that the second unique information in the result sent by the one of the follower nodes is different from the first unique information in the message from the client device; and

determining, by the processing circuitry, that the one of the follower nodes is a faulty node when the result is not received from the one of the follower nodes.

13. The message processing method according to claim 12 , wherein

the message from the client device includes a first sequence number;

one of the results from one of the follower nodes includes a second sequence number; and

the message processing method further includes:

for the one of the follower nodes, determining, by the processing circuitry, that the one of the follower nodes sends an inconsistent sequence number when the second sequence number is different from the first sequence number; and

determining that the leader node is a malicious node when a number of the follower nodes sending inconsistent sequence numbers exceeds a threshold.

14. The message processing method according to claim 13 , further comprising:

triggering, by the processing circuitry, the nodes to switch from the one of the Paxos algorithm, the RAFT algorithm, or the T-RAFT algorithm to the second consensus mode when the processing circuitry determines at least one of: (i) the leader node is the malicious node, (ii) at least N of the follower nodes are faulty nodes, or (iii) at least M of the follower nodes are erroneous nodes, N and M being positive integers.

15. The message processing method according to claim 14 , further comprising:

after receiving the trigger from the processing circuitry to switch to the second consensus mode,

sending, by one of the nodes, a hash value in a message stored by the one of the nodes and a digital signature of the one of the nodes to other nodes;

receiving, by the one of the nodes, hash values in messages from the other nodes;

determining, by the one of the nodes, whether the hash value stored by the respective node is consistent with the hash values from the other nodes; and

sending, by the one of the nodes to the client device, a consistency confirmation when the hash value stored by the one of the nodes is determined to be consistent with the hash values from the other nodes.

16. The message processing method according to claim 15 , further comprising:

determining a leader node from the nodes for the second consensus mode after the nodes are switched to the second consensus mode.

17. The message processing method according to claim 14 , further comprising:

after receiving the trigger to switch to the second consensus mode from the client device,

sending, by one of the nodes, a hash value in a message stored by the one of the nodes and a digital signature of the one of the nodes to other nodes;

receiving, by the one of the nodes, another hash value in a message from one of the other nodes;

determining, by the one of the nodes, whether the hash value stored by the one of the nodes is consistent with the other hash value from the one of the other nodes;

sending, by the one of the nodes, a data confirmation to the one of the other nodes when the hash value stored by the one of the nodes is determined to be consistent with the other hash value, the data confirmation including the digital signature of the one of the nodes and indicating that the message stored by the one of the nodes being consistent with the message from the one of the other nodes; and

when the one of the nodes receives a data confirmation from each of the other nodes, sending, by the one of the nodes, a data confirmation to the client device.

18. The message processing method according to claim 17 , further comprising:

determining whether the message stored in the respective node is consistent with the messages stored in the other nodes based on the data confirmation from the respective node;

when each of the data confirmations from the nodes to the client device is received within a pre-determined time,

notifying the nodes to switch back to the one of the Paxos algorithm, the RAFT algorithm, or the T-RAFT algorithm; and

terminating switching to the second consensus mode; and

when at least one of the data confirmations from the nodes to the client device is not received within the pre-determined time, notifying the nodes to switch to the second consensus mode.

19. The message processing method according to claim 14 , further comprising:

switching the nodes to the one of the Paxos algorithm, the RAFT algorithm, or the T-RAFT algorithm when a number of times that the nodes reach the consensus on the received message from the client device in the second consensus mode exceeds a first consensus threshold of the leader node.

20. A non-transitory computer-readable storage medium storing a program executable by one or more processors of a client device having a digital signature to perform:

sending a message to be stored in nodes after the nodes reach a consensus on the message, the message including the digital signature of the client device;

obtaining results from a subset of the nodes that receive the message, the results having respective digital signatures of the subset of the nodes, the nodes reaching the consensus on the message in one of a Paxos algorithm, a recursive algorithm for fault tolerance (RAFT) algorithm, or an improved RAFT algorithm (T-RAFT);

after verifying the digital signatures of the subset of the nodes, determining, based on the results, whether one or more of the nodes has malfunctioned; and

based on a determination that the one or more of the nodes has malfunctioned, triggering the nodes to switch from the one of the Paxos algorithm, the RAFT algorithm, or the T-RAFT algorithm to a second consensus mode for reaching the consensus on the message, the second consensus mode having Byzantine fault tolerance.

Priority Claims (1)
CN 201710203499.X · Mar 30, 2017 · national
Continuity (3)
Continuation 16383162 · Apr 12, 2019
Continuation PCTCN2018080574 · Mar 26, 2018
Related Publication 20220091918A1 · Mar 24, 2022
Cited By (1)
US 12,743,336