US2026005872A1PendingUtilityA1

Data processing method and apparatus based on blockchain

Assignee: TENCENT TECH SHENZHEN CO LTDPriority: Jul 3, 2023Filed: Sep 5, 2025Published: Jan 1, 2026
Est. expiryJul 3, 2043(~16.9 yrs left)· nominal 20-yr term from priority
Inventors:SHAO ZHUGUANG
H04L 9/321H04L 9/50H04L 9/3247H04L 9/3255H04L 9/40H04L 67/104H04L 9/00H04L 63/123H04L 67/1044
58
PatentIndex Score
0
Cited by
0
References
0
Claims

Abstract

Disclosed in embodiments of this application are a data processing method and apparatus based on a blockchain, and a device and a medium. The method includes obtaining a node weight update instruction generated for the first consensus node in a blockchain network, the node weight update instruction being configured for instructing an update of a node weight configured for voting information of the first consensus node in a consensus service; predicting whether an updated node weight of the first consensus node meets a node update condition based on the node weight update instruction to obtain a prediction result; updating the node weight of the first consensus node according to the node weight update instruction in response to the prediction result being positive to obtain an update result; and recording the update result in a database of the blockchain network.

Claims

exact text as granted — not AI-modified
What is claimed is: 
     
         1 . A data processing method based on a blockchain, performed by a target consensus node, comprising:
 obtaining a node weight update instruction generated for the first consensus node in a blockchain network, the node weight update instruction being configured for instructing an update of a node weight configured for voting information of the first consensus node in a consensus service;   predicting whether an updated node weight of the first consensus node meets a node update condition based on the node weight update instruction to obtain a prediction result;   updating the node weight of the first consensus node according to the node weight update instruction in response to the prediction result being positive to obtain an update result; and   recording the update result in a database of the blockchain network.   
     
     
         2 . The method according to  claim 1 , wherein the first consensus node belongs to N consensus nodes in the blockchain network, N being a positive integer; and
 the predicting whether an updated node weight of the first consensus node meets a node update condition based on the node weight update instruction to obtain a prediction result comprises:   obtaining a node weight list corresponding to the blockchain network based on the node weight update instruction, the node weight list comprising a node weight respectively corresponding to each of the N consensus nodes;   determining a maximum quantity F of illegal nodes allowed by the blockchain network based on N node weights and a configuration weight carried by the node weight update instruction, the configuration weight being a predicted updated node weight of the first consensus node;   comparing the configuration weight with the maximum quantity F to obtain a comparison result; and   determining that the prediction result is positive if the comparison result indicates that the configuration weight is less than or equal to the maximum quantity F, the prediction result being positive indicating that the configuration weight meets the node update condition.   
     
     
         3 . The method according to  claim 2 , wherein the updating the node weight of the first consensus node according to the node weight update instruction in response to the prediction result being positive to obtain an update result comprises:
 updating the node weight of the first consensus node according to the configuration weight in the node weight update instruction in response to the prediction result being positive, to obtain the update result, the configuration weight of the first consensus node in the update result being configured for updating the node weight list.   
     
     
         4 . The method according to  claim 2 , wherein the determining a maximum quantity F of illegal nodes allowed by the blockchain network based on N node weights and a configuration weight carried by the node weight update instruction comprises:
 obtaining (N−1) node weights other than the node weight of the first consensus node from the N node weights;   summing the (N−1) node weights and the configuration weight carried by the node weight update instruction to obtain a total node weight H corresponding to the blockchain network, H being a positive integer; and   determining the maximum quantity F of the illegal nodes allowed by the blockchain network based on the total node weight H and a node configuration rule corresponding to the blockchain network.   
     
     
         5 . The method according to  claim 4 , wherein the node configuration rule is H=3F+1, H being the total node weight, and F being the maximum quantity of the illegal nodes allowed by the blockchain network. 
     
     
         6 . The method according to  claim 2 , wherein further comprising:
 determining that the prediction result is negative if the comparison result indicates that the configuration weight is greater than the maximum quantity F, and discarding the node weight update instruction, the prediction result being negative indicating that the configuration weight does not meet the node update condition.   
     
     
         7 . The method according to  claim 1 , wherein the predicting whether an updated node weight of the first consensus node meets a node update condition based on the node weight update instruction, to obtain a prediction result comprises:
 obtaining a configuration weight carried by the node weight update instruction, the configuration weight being a predicted updated node weight of the first consensus node; and   determining by default that the prediction result is positive according to the node weight update instruction, the prediction result being positive indicating that the configuration weight meets the node update condition; and   the updating the node weight of the first consensus node according to the node weight update instruction in response to the prediction result being positive, to obtain an update result comprises:   obtaining the node weight of the first consensus node from the blockchain network in response to the prediction result being positive; and   updating the node weight of the first consensus node to the configuration weight in the node weight update instruction to obtain the update result.   
     
     
         8 . The method according to  claim 1 , wherein the target consensus node is a master node having a proposal function in the blockchain network; the target consensus node belongs to the N consensus nodes in the blockchain network; N is a positive integer equal to (3F+1); F is the maximum quantity of the illegal nodes allowed by the blockchain network; and
 the recording the update result in a database of the blockchain network comprises:   packetizing the update result to obtain a to-be-verified block to be written into the blockchain network;   broadcasting the to-be-verified block to (N−1) backup nodes in the blockchain network such that the (N−1) backup nodes perform a consensus on an obtained to-be-verified block, to obtain a consensus result, the (N−1) backup nodes referring to consensus nodes other than the target consensus node in the N consensus nodes;   counting consensus-reached consensus results from received consensus results, and determining counted consensus-reached consensus results as a consensus result set;   determining a sum of node weights of the backup nodes corresponding to each consensus result in the consensus result set as a consensus quantity corresponding to the consensus result set; and   determining that consensus nodes in the blockchain network reach a consensus if a ratio of the consensus quantity to the total node weight corresponding to the blockchain network reaches a consensus threshold, and writing the to-be-verified block as a target block into the database of the blockchain network, the total node weight referring to a sum of node weights of the N consensus nodes, and a target block written into the database of the blockchain network indicating that the updated node weight of the first consensus node is capable of weighting the voting information of the first consensus node in the consensus service.   
     
     
         9 . The method according to  claim 8 , wherein further comprising:
 detecting a consensus node in an abnormal state in the blockchain network if the consensus nodes in the blockchain network do not reach a consensus and the prediction result is determined to be positive by default according to the node weight update instruction, and determining a detected consensus node as the second consensus node;   obtaining a node weight of the second consensus node;   restarting the second consensus node if the node weight of the second consensus node is greater than the maximum quantity F of the illegal nodes allowed by the blockchain network, and updating a consensus state of the second consensus node; and   performing a consensus on an obtained to-be-verified block again if an updated consensus state of the second consensus node is restored to a normal state.   
     
     
         10 . The method according to  claim 9 , wherein further comprising:
 generating alarm information associated with the second consensus node if the updated consensus state of the second consensus node is the abnormal state, and transmitting the alarm information to a management terminal device associated with the blockchain network.   
     
     
         11 . The method according to  claim 1 , wherein the target consensus node is the master node having the proposal function in the blockchain network; a block comprising the update result in the blockchain network is the target block; and
 the method further comprises:   obtaining a block producing rule associated with the blockchain network;   obtaining a node weight of the target consensus node if the block producing rule is a block producing rule associated with the node weight, the node weight of the target consensus node indicating a total quantity of times of block production of the target consensus node in a current round; and   continuing to determine the target consensus node as the master node having the proposal function if a quantity of times of block production of the target consensus node in the current round does not reach the total quantity of times of block production, and uploading a next block of the target block.   
     
     
         12 . The method according to  claim 1 , wherein the first consensus node belongs to the N consensus nodes in the blockchain network; N is a positive integer; one consensus node corresponds to one service organization; a service organization corresponding to the first consensus node is the first service organization; the node weight update instruction is generated by the first terminal device of the first service organization in response to a configuration operation of the first object for the node weight of the first consensus node;
 the obtaining a node weight update instruction generated for the first consensus node in a blockchain network comprises:   receiving a node weight update instruction transmitted by the first terminal device, the node weight update instruction carrying master signature information and multi-party signature information, the master signature information being obtained after the first terminal device performs signature on the node weight update instruction based on the first private key of the first object, the multi-party signature information being obtained after performing multi-party signature on the node weight update instruction based on second private keys of second objects associated with M second service organizations, the second service organizations being service organizations other than the first service organization in N service organizations, and M being a positive integer less than N and greater than a signature threshold; and   the method further comprises:   performing validity verification on the node weight update instruction based on the first public key of the first object and the master signature information to obtain a validity verification result;   performing multi-signature verification on the multi-party signature information based on second public keys respectively corresponding to the second objects associated with the M second service organizations if the validity verification result indicates that the node weight update instruction is valid, to obtain a multi-signature verification result; and   performing, when the multi-signature verification result indicates successful verification, the operation of predicting whether an updated node weight of the first consensus node meets a node update condition based on the node weight update instruction, to obtain a prediction result.   
     
     
         13 . The method according to  claim 12 , wherein the performing validity verification on the node weight update instruction based on the first public key of the first object and the master signature information to obtain a validity verification result comprises:
 performing signature verification on the master signature information based on the first public key of the first object to obtain a master signature verification result;   checking an instruction format of the node weight update instruction based on a smart contract on the blockchain network to obtain a checking result;   generating the validity verification result for indicating that the node weight update instruction is valid if the master signature verification result indicates successful verification and the checking result indicates successful checking; and   generating a validity verification result for indicating that the node weight update instruction is not valid if the master signature verification result indicates failed verification or the checking result indicates failed checking.   
     
     
         14 . The method according to  claim 1 , wherein if the target consensus node is the master node having the proposal function in the blockchain network and is not the first consensus node, the node weight update instruction obtained by the target consensus node is committed by the first consensus node when determining that the multi-signature verification result indicates successful verification; the multi-signature verification result is obtained by the first consensus node after performing multi-signature verification on the multi-party signature information carried in the node weight update instruction when determining that the validity verification result indicates that the node weight update instruction is valid; and the validity verification result is generated by the first consensus node after performing validity verification on a received node weight update instruction. 
     
     
         15 . A blockchain network, comprising:
 N consensus nodes, N being a positive integer; one consensus node corresponding to one node weight; the N consensus nodes comprising the first consensus node and a target consensus node; the target consensus node being configured to obtain a node weight update instruction generated for the first consensus node in the blockchain network, and the node weight update instruction being configured for instructing an update of a node weight configured for voting information of the first consensus node in a consensus service; the target consensus node being further configured to predict whether an updated node weight of the first consensus node meets a node update condition based on the node weight update instruction, to obtain a prediction result; and the target consensus node being further configured to update the node weight of the first consensus node according to the node weight update instruction in response to the prediction result being positive, to obtain an update result, and record the update result in a database of the blockchain network.   
     
     
         16 . The blockchain network according to  claim 15 , wherein the first consensus node is configured to broadcast the node weight update instruction to the target consensus node when determining that an instruction verification result of the node weight update instruction indicates successful verification; the instruction verification result is determined by the first consensus node based on a validity verification result and a multi-signature verification result; the validity verification result is generated by the first consensus node after performing validity verification on the node weight update instruction; and the multi-signature verification result is obtained by the first consensus node after performing multi-signature verification on multi-party signature information carried in the node weight update instruction when determining that the validity verification result indicates that the node weight update instruction is valid. 
     
     
         17 . A computer device, comprising: a processor and a memory, and a network interface;
 the processor being connected to the memory and the network interface, the network interface being configured to provide a data communication function, the memory being configured to store a computer program, and the processor being configured to invoke the computer program to cause the computer device to perform a data processing method based on a blockchain, performed by a target consensus node, comprising:   obtaining a node weight update instruction generated for the first consensus node in a blockchain network, the node weight update instruction being configured for instructing an update of a node weight configured for voting information of the first consensus node in a consensus service;   predicting whether an updated node weight of the first consensus node meets a node update condition based on the node weight update instruction to obtain a prediction result;   updating the node weight of the first consensus node according to the node weight update instruction in response to the prediction result being positive to obtain an update result; and   recording the update result in a database of the blockchain network.   
     
     
         18 . The computer device according to  claim 17 , wherein the first consensus node belongs to N consensus nodes in the blockchain network, N being a positive integer; and
 the predicting whether an updated node weight of the first consensus node meets a node update condition based on the node weight update instruction to obtain a prediction result comprises:   obtaining a node weight list corresponding to the blockchain network based on the node weight update instruction, the node weight list comprising a node weight respectively corresponding to each of the N consensus nodes;   determining a maximum quantity F of illegal nodes allowed by the blockchain network based on N node weights and a configuration weight carried by the node weight update instruction, the configuration weight being a predicted updated node weight of the first consensus node;   comparing the configuration weight with the maximum quantity F to obtain a comparison result; and   determining that the prediction result is positive if the comparison result indicates that the configuration weight is less than or equal to the maximum quantity F, the prediction result being positive indicating that the configuration weight meets the node update condition.   
     
     
         19 . The computer device according to  claim 18 , wherein the updating the node weight of the first consensus node according to the node weight update instruction in response to the prediction result being positive to obtain an update result comprises:
 updating the node weight of the first consensus node according to the configuration weight in the node weight update instruction in response to the prediction result being positive, to obtain the update result, the configuration weight of the first consensus node in the update result being configured for updating the node weight list.   
     
     
         20 . The computer device according to  claim 18 , wherein the determining a maximum quantity F of illegal nodes allowed by the blockchain network based on N node weights and a configuration weight carried by the node weight update instruction comprises:
 obtaining (N−1) node weights other than the node weight of the first consensus node from the N node weights;   summing the (N−1) node weights and the configuration weight carried by the node weight update instruction to obtain a total node weight H corresponding to the blockchain network, H being a positive integer; and   determining the maximum quantity F of the illegal nodes allowed by the blockchain network based on the total node weight H and a node configuration rule corresponding to the blockchain network.

Join the waitlist — get patent alerts

Track US2026005872A1 — get alerts on status changes and closely related new filings.

We store only your email — no account needed. See our privacy policy.