IP Library › Granted Patent US 12,513,154
Granted Patent B2
US 12,513,154 · App. 17/742,227 · Granted Dec 30, 2025

Blockchain-based data detection method, apparatus, and computer-readable storage medium

Inventor: Changqing Yang (Shenzhen, CN)
Assignee: TENCENT TECHNOLOGY (SHENZHEN) COMPANY LIMITED
H04L63/12G06F21/554
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 12,513,154
App. No.
17/742,227
Granted
Dec 30, 2025
Kind
B2
Abstract

This application discloses a blockchain-based data detection method performed by a computer device. The method includes obtaining respective block verification results of at least two consensus nodes for a to-be-verified block; counting valid verification results and invalid verification results among the respective block verification results of the at least two consensus nodes; determining a target verification result for the block according to the counts, comparing the target verification result with the respective block verification results of the at least two consensus nodes for the block, and updating a historical quantity of abnormal verifications corresponding to each consensus node according to a result of the comparison, to obtain a target quantity of abnormal verifications of each consensus node counted by the target consensus node; and determining an abnormal consensus node among the at least two consensus nodes according to the target quantity of abnormal verifications counted by the target consensus node.

Claims (101)

1 . A blockchain-based data detection method performed by a computer device acting as a target consensus node of a blockchain-based computer network, the method comprising:

obtaining respective block verification results of at least two consensus nodes of the blockchain-based computer network for a to-be-verified block;

counting a first quantity of valid verification results and a second quantity of invalid verification results among the respective block verification results of the at least two consensus nodes for the block;

determining a target verification result for the block according to the first quantity and the second quantity, the target verification result being a valid verification result or an invalid verification result;

comparing the target verification result with the respective block verification results of the at least two consensus nodes for the block, and updating a historical quantity of abnormal verifications corresponding to each consensus node according to a result of the comparison, to obtain a target quantity of abnormal verifications of each consensus node counted by the target consensus node;

determining an abnormal consensus node among the at least two consensus nodes according to the target quantity of abnormal verifications of each consensus node counted by the target consensus node, further including;

determining a consensus node as a to-be-checked consensus node when the target quantity of abnormal verifications of the to-be-checked consensus node counted by the target consensus node is greater than an abnormal quantity-of-times threshold;

sending a request to each consensus node of the blockchain-based computer network for reporting a corresponding target quantity of abnormal verifications of the to-be-checked consensus node counted by the consensus node;

obtaining a target quantity of abnormal verifications of the to-be-checked consensus node counted by each consensus node of the blockchain-based computer network, wherein the target quantities of abnormal verifications of the to-be-checked consensus node counted by difference consensus nodes of the blockchain-based computer network are not the same;

obtaining a node quantity of the consensus nodes of the blockchain-based computer network whose corresponding counted-target quantities of abnormal verifications of the to-be-checked consensus node are greater than the abnormal quantity-of-times threshold; and

determining the to-be-checked consensus node as the abnormal consensus node when a ratio of the node quantity to a total node quantity of the blockchain-based computer network is greater than a ratio threshold; and

broadcasting the abnormal consensus node to each consensus node of the blockchain-based computer network, wherein the remaining consensus nodes of the blockchain-based computer network remove the abnormal consensus node from the blockchain-based computer network.

2 . The method according to claim 1 , wherein the obtaining respective block verification results of at least two consensus nodes for the to-be-verified block comprises:

generating the block;

broadcasting the block to each consensus node, so that each consensus node performs block verification on the block; and

obtaining the block verification result of each consensus node for the block.

3 . The method according to claim 1 , wherein the determining the target verification result for the block according to the first quantity and the second quantity comprises:

determining the valid verification result as the target verification result when the first quantity is greater than the second quantity; and

determining the invalid verification result as the target verification result when the first quantity is less than the second quantity.

4 . The method according to claim 1 , wherein the counting the first quantity of valid verification results and the second quantity of invalid verification results among the respective block verification results of the at least two consensus nodes for the block comprise:

obtaining a block verification vote quantity corresponding to each consensus node;

determining the consensus node of which the block verification result is the valid verification result as a first consensus node according to the respective block verification results of the at least two consensus nodes for the block;

determining the consensus node of which the block verification result is the invalid verification result as a second consensus node according to the respective block verification results of the at least two consensus nodes for the block; and

determining a sum of the block verification vote quantities corresponding to the first consensus nodes as the first quantity, and determining a sum of the block verification vote quantities corresponding to the second consensus nodes the second quantity.

5 . The method according to claim 1 , wherein the target consensus node is determined by voting by the at least two consensus nodes based on a voting mechanism; and the method further comprises:

obtaining a block height of the block, and obtaining a height difference between the block height and a verification start height,

the verification start height being a maximum block height of a block held by the target consensus node when the target consensus node is determined by voting based on the voting mechanism; and

transmitting a voting request to each consensus node when the height difference is greater than a height difference threshold, so that each consensus node revotes on the target consensus node according to the voting request and the voting mechanism.

6 . The method according to claim 1 , wherein the updating the historical quantity of abnormal verifications corresponding to each consensus node according to the result of the comparison, to obtain the target quantity of abnormal verifications of each consensus node counted by the target consensus node comprises:

determining the consensus node corresponding to the block verification result different from the target verification result as a conflicting consensus node according to the respective block verification results of the at least two consensus nodes for the block;

determining, among the at least two consensus nodes, consensus nodes other than the conflicting consensus nodes as matching consensus nodes; and

increasing the historical quantities of abnormal verifications corresponding to the conflicting consensus nodes by a unit abnormal quantity to obtain target quantities of abnormal verifications corresponding to the conflicting consensus nodes, and determining the historical quantities of abnormal verifications corresponding to the matching consensus nodes as target quantities of abnormal verifications corresponding to the matching consensus node,

wherein, when the block does not have a predecessor block, the historical quantity of abnormal verifications corresponding to each consensus node is a default initial quantity; and when the block has a predecessor block, the historical quantity of abnormal verifications corresponding to each consensus node is a quantity of abnormal verifications of each consensus node that is obtained based on block verification results of the at least two consensus nodes for the predecessor block.

7 . The method according to claim 1 , wherein the method further comprises:

determining that the target quantity of abnormal verifications of the to-be-checked consensus node counted by each consensus node does not satisfy the criterion for determining the abnormal consensus node and determining the to-be-checked consensus node as a normal consensus node, when the ratio of the node quantity to the total node quantity of the at least two consensus is less than or equal to the ratio threshold.

8 . A computer device, comprising a memory and a processor, the memory storing a computer program, the computer program, when executed by the processor, causing the computer device to perform a blockchain-based data detection method including:

obtaining respective block verification results of at least two consensus nodes of the blockchain-based computer network for a to-be-verified block;

counting a first quantity of valid verification results and a second quantity of invalid verification results among the respective block verification results of the at least two consensus nodes for the block;

determining a target verification result for the block according to the first quantity and the second quantity, the target verification result being a valid verification result or an invalid verification result;

comparing the target verification result with the respective block verification results of the at least two consensus nodes for the block, and updating a historical quantity of abnormal verifications corresponding to each consensus node according to a result of the comparison, to obtain a target quantity of abnormal verifications of each consensus node counted by the target consensus node;

determining an abnormal consensus node among the at least two consensus nodes according to the target quantity of abnormal verifications of each consensus node counted by the target consensus node, further including:

determining a consensus node as a to-be-checked consensus node when the target quantity of abnormal verifications of the to-be-checked consensus node counted by the target consensus node is greater than an abnormal quantity-of-times threshold;

sending a request to each consensus node of the blockchain-based computer network for reporting a corresponding target quantity of abnormal verifications of the to-be-checked consensus node counted by the consensus node;

obtaining a target quantity of abnormal verifications of the to-be-checked consensus node counted by each consensus node of the blockchain-based computer network, wherein the target quantities of abnormal verifications of the to-be-checked consensus node counted by difference consensus nodes of the blockchain-based computer network are not the same;

obtaining a node quantity of the consensus nodes of the blockchain-based computer network whose corresponding counted-target quantities of abnormal verifications of the to-be-checked consensus node are greater than the abnormal quantity-of-times threshold; and

determining the to-be-checked consensus node as the abnormal consensus node when a ratio of the node quantity to a total node quantity of the blockchain-based computer network is greater than a ratio threshold; and

broadcasting the abnormal consensus node to each consensus node of the blockchain-based computer network, wherein the remaining consensus nodes of the blockchain-based computer network remove the abnormal consensus node from the blockchain-based computer network.

9 . The computer device according to claim 8 , wherein the obtaining respective block verification results of at least two consensus nodes for the to-be-verified block comprises:

generating the block;

broadcasting the block to each consensus node, so that each consensus node performs block verification on the block; and

obtaining the block verification result of each consensus node for the block.

10 . The computer device according to claim 8 , wherein the determining the target verification result for the block according to the first quantity and the second quantity comprises:

determining the valid verification result as the target verification result when the first quantity is greater than the second quantity; and

determining the invalid verification result as the target verification result when the first quantity is less than the second quantity.

11 . The computer device according to claim 8 , wherein the counting the first quantity of valid verification results and the second quantity of invalid verification results among the respective block verification results of the at least two consensus nodes for the block comprise:

obtaining a block verification vote quantity corresponding to each consensus node;

determining the consensus node of which the block verification result is the valid verification result as a first consensus node according to the respective block verification results of the at least two consensus nodes for the block;

determining the consensus node of which the block verification result is the invalid verification result as a second consensus node according to the respective block verification results of the at least two consensus nodes for the block; and

determining a sum of the block verification vote quantities corresponding to the first consensus nodes as the first quantity, and determining a sum of the block verification vote quantities corresponding to the second consensus nodes the second quantity.

12 . The computer device according to claim 8 , wherein the target consensus node is determined by voting by the at least two consensus nodes based on a voting mechanism; and the method further comprises:

obtaining a block height of the block, and obtaining a height difference between the block height and a verification start height,

the verification start height being a maximum block height of a block held by the target consensus node when the target consensus node is determined by voting based on the voting mechanism; and

transmitting a voting request to each consensus node when the height difference is greater than a height difference threshold, so that each consensus node revotes on the target consensus node according to the voting request and the voting mechanism.

13 . The computer device according to claim 8 , wherein the updating the historical quantity of abnormal verifications corresponding to each consensus node according to the result of the comparison, to obtain the target quantity of abnormal verifications of each consensus node counted by the target consensus node comprises:

determining the consensus node corresponding to the block verification result different from the target verification result as a conflicting consensus node according to the respective block verification results of the at least two consensus nodes for the block;

determining, among the at least two consensus nodes, consensus nodes other than the conflicting consensus nodes as matching consensus nodes; and

increasing the historical quantities of abnormal verifications corresponding to the conflicting consensus nodes by a unit abnormal quantity to obtain target quantities of abnormal verifications corresponding to the conflicting consensus nodes, and determining the historical quantities of abnormal verifications corresponding to the matching consensus nodes as target quantities of abnormal verifications corresponding to the matching consensus node,

wherein, when the block does not have a predecessor block, the historical quantity of abnormal verifications corresponding to each consensus node is a default initial quantity; and when the block has a predecessor block, the historical quantity of abnormal verifications corresponding to each consensus node is a quantity of abnormal verifications of each consensus node that is obtained based on block verification results of the at least two consensus nodes for the predecessor block.

14 . A non-transitory computer-readable storage medium, storing a computer program, the computer program comprising program instructions, the program instructions, when executed by a processor of a computer device, causing the computer device to perform a blockchain-based data detection method including:

obtaining respective block verification results of at least two consensus nodes of the blockchain-based computer network for a to-be-verified block;

counting a first quantity of valid verification results and a second quantity of invalid verification results among the respective block verification results of the at least two consensus nodes for the block;

determining a target verification result for the block according to the first quantity and the second quantity, the target verification result being a valid verification result or an invalid verification result;

comparing the target verification result with the respective block verification results of the at least two consensus nodes for the block, and updating a historical quantity of abnormal verifications corresponding to each consensus node according to a result of the comparison, to obtain a target quantity of abnormal verifications of each consensus node counted by the target consensus node;

determining an abnormal consensus node among the at least two consensus nodes according to the target quantity of abnormal verifications of each consensus node counted by the target consensus node, further including:

determining a consensus node as a to-be-checked consensus node when the target quantity of abnormal verifications of the to-be-checked consensus node counted by the target consensus node is greater than an abnormal quantity-of-times threshold;

sending a request to each consensus node of the blockchain-based computer network for reporting a corresponding target quantity of abnormal verifications of the to-be-checked consensus node counted by the consensus node;

obtaining a target quantity of abnormal verifications of the to-be-checked consensus node counted by each consensus node of the blockchain-based computer network, wherein the target quantities of abnormal verifications of the to-be-checked consensus node counted by difference consensus nodes of the blockchain-based computer network are not the same;

obtaining a node quantity of the consensus nodes of the blockchain-based computer network whose corresponding counted-target quantities of abnormal verifications of the to-be-checked consensus node are greater than the abnormal quantity-of-times threshold; and

determining the to-be-checked consensus node as the abnormal consensus node when a ratio of the node quantity to a total node quantity of the blockchain-based computer network is greater than a ratio threshold; and

broadcasting the abnormal consensus node to each consensus node of the blockchain-based computer network, wherein the remaining consensus nodes of the blockchain-based computer network remove the abnormal consensus node from the blockchain-based computer network.

15 . The non-transitory computer-readable storage medium according to claim 14 , wherein the determining the target verification result for the block according to the first quantity and the second quantity comprises:

determining the valid verification result as the target verification result when the first quantity is greater than the second quantity; and

determining the invalid verification result as the target verification result when the first quantity is less than the second quantity.

16 . The non-transitory computer-readable storage medium according to claim 14 , wherein the obtaining respective block verification results of at least two consensus nodes for the to-be-verified block comprises:

generating the block;

broadcasting the block to each consensus node, so that each consensus node performs block verification on the block; and

obtaining the block verification result of each consensus node for the block.

17 . The non-transitory computer-readable storage medium according to claim 14 , wherein the counting the first quantity of valid verification results and the second quantity of invalid verification results among the respective block verification results of the at least two consensus nodes for the block comprise:

obtaining a block verification vote quantity corresponding to each consensus node;

determining the consensus node of which the block verification result is the valid verification result as a first consensus node according to the respective block verification results of the at least two consensus nodes for the block;

determining the consensus node of which the block verification result is the invalid verification result as a second consensus node according to the respective block verification results of the at least two consensus nodes for the block; and

determining a sum of the block verification vote quantities corresponding to the first consensus nodes as the first quantity, and determining a sum of the block verification vote quantities corresponding to the second consensus nodes the second quantity.

18 . The non-transitory computer-readable storage medium according to claim 14 , wherein the target consensus node is determined by voting by the at least two consensus nodes based on a voting mechanism; and the method further comprises:

obtaining a block height of the block, and obtaining a height difference between the block height and a verification start height,

the verification start height being a maximum block height of a block held by the target consensus node when the target consensus node is determined by voting based on the voting mechanism; and

transmitting a voting request to each consensus node when the height difference is greater than a height difference threshold, so that each consensus node revotes on the target consensus node according to the voting request and the voting mechanism.

19 . The non-transitory computer-readable storage medium according to claim 14 , wherein the updating the historical quantity of abnormal verifications corresponding to each consensus node according to the result of the comparison, to obtain the target quantity of abnormal verifications of each consensus node counted by the target consensus node comprises:

determining the consensus node corresponding to the block verification result different from the target verification result as a conflicting consensus node according to the respective block verification results of the at least two consensus nodes for the block;

determining, among the at least two consensus nodes, consensus nodes other than the conflicting consensus nodes as matching consensus nodes; and

increasing the historical quantities of abnormal verifications corresponding to the conflicting consensus nodes by a unit abnormal quantity to obtain target quantities of abnormal verifications corresponding to the conflicting consensus nodes, and determining the historical quantities of abnormal verifications corresponding to the matching consensus nodes as target quantities of abnormal verifications corresponding to the matching consensus node,

wherein, when the block does not have a predecessor block, the historical quantity of abnormal verifications corresponding to each consensus node is a default initial quantity; and when the block has a predecessor block, the historical quantity of abnormal verifications corresponding to each consensus node is a quantity of abnormal verifications of each consensus node that is obtained based on block verification results of the at least two consensus nodes for the predecessor block.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded May 20, 2022
From: YANG, CHANGQING
To: TENCENT TECHNOLOGY (SHENZHEN) COMPANY LIMITED
Reel/Frame 059973/0004 →
Priority Claims (1)
CN 202010433284.9 · May 21, 2020 · national
Continuity (2)
Continuation PCTCN2021088624 · Apr 21, 2021
Related Publication 20220272105A1 · Aug 25, 2022
References Cited (28)
US 10722649B2 · Tang · 2020 [cited by examiner]
US 11265173B2 · Liao · 2022 [cited by examiner]
US 20170236120A1 · Herlihy · 2017 [cited by examiner]
US 20180101560A1 · Christidis · 2018 [cited by examiner]
US 20190036710A1 · Qiu · 2019 [cited by examiner]
US 20190333030A1 · Ramasamy et al. · 2019 [cited by applicant]
US 20200110648A1 · Yang · 2020 [cited by examiner]
US 20200112572A1 · Ajayi · 2020 [cited by examiner]
US 20200120157A1 · Xie · 2020 [cited by examiner]
US 20210119778A1 · Cheng · 2021 [cited by examiner]
US 20210132928A1 · Xiao · 2021 [cited by examiner]
CN 107508680A · 2017 [cited by applicant]
CN 107579848A · 2018 [cited by applicant]
CN 109034851A · 2018 [cited by applicant]
CN 109086619A · 2018 [cited by applicant]
CN 109146499A · 2019 [cited by examiner]
CN 110232634A · 2019 [cited by applicant]
CN 110247774A · 2019 [cited by applicant]
CN 110445619A · 2019 [cited by applicant]
CN 110555773A · 2019 [cited by examiner]
CN 110932892A · 2020 [cited by applicant]
CN 111343208A · 2020 [cited by applicant]
CN 111444211B · 2021 [cited by examiner]
JP 2020512708A · 2020 [cited by applicant]
Tencent Technology, WO, PCT/CN2021/088624, Jul. 21, 2021, 5 pgs. [cited by applicant]
Tencent Technology, IPRP, PCT/CN2021/088624, Nov. 17, 2022, 6 pgs. [cited by applicant]
Tencent Technology, ISR, PCT/CN2021/088624, Jul. 21, 2021, 3 pgs. [cited by applicant]
Tencent Technology, Japanese Office Action, JP Patent Application No. 2022-539369, Jul. 4, 2023, 5 pgs. [cited by applicant]