IP Library › Granted Patent US 11,792,006
Granted Patent B2
US 11,792,006 · App. 17/061,383 · Granted Oct 17, 2023

Method and apparatus for electing representative node device, computer device, and storage medium

Inventors: Rui Guo (Shenzhen, CN); Maocai Li (Shenzhen, CN); Zongyou Wang (Shenzhen, CN); Haitao Tu (Shenzhen, CN); Li Kong (Shenzhen, CN); Kaiban Zhou (Shenzhen, CN); Changqing Yang (Shenzhen, CN); Nan Wang (Shenzhen, CN); Yong Ding (Shenzhen, CN); Yifang Shi (Shenzhen, CN)
Assignee: TENCENT TECHNOLOGY (SHENZHEN) COMPANY LIMITED
H04L9/32H04L9/0894H04L9/50H04L2209/463
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,792,006
App. No.
17/061,383
Granted
Oct 17, 2023
Kind
B2
Abstract

A method for electing a representative node device is performed at a blockchain system, including: obtaining voting transaction data from the node devices, the voting transaction data being used for voting for one or more node devices of the blockchain system as representative node devices; generating and storing the voting transaction data into a target blockchain of the blockchain system when a plurality of node devices of the blockchain system verify the voting transaction data by consensus; and when a quantity of blocks in the target blockchain generated using the voting transaction data reaches a preset quantity, determining an election result according to quantities of votes of the node devices determined from the voting transaction data, the election result identifying a plurality of representative node devices in the blockchain system being configured to generate new blocks for the target blockchain and perform verification on the new blocks by consensus.

Claims (51)

1. A method for electing a representative node device, performed by a blockchain system including multiple node devices, each node device having a processor and memory storing computer-readable instructions to be executed by the node device, the method comprising:

obtaining voting transaction data from the multiple node devices, the voting transaction data being used for voting for one or more node devices of the blockchain system as representative node devices;

generating and storing the voting transaction data into a target blockchain of the blockchain system when a plurality of the multiple node devices of the blockchain system verify the voting transaction data by consensus;

in accordance with a quantity of blocks in the target blockchain generated using the voting transaction data being at least a preset quantity, determining an election result according to quantities of votes of the multiple node devices determined from the voting transaction data, the election result identifying a subset of node devices from the multiple node devices in the blockchain system; and

setting an operating state of the subset of node devices to be representative node devices, the representative node devices being configured to generate new blocks for the target blockchain and perform verification on the new blocks by consensus.

2. The method according to claim 1 , wherein the determining an election result according to quantities of votes of the multiple node devices determined from the voting transaction data comprises:

determining a plurality of first blocks in the target blockchain, the plurality of first blocks being configured to store the voting transaction data of the multiple node devices; and

determining a preset quantity of representative node devices in the blockchain system according to the voting transaction data stored in the plurality of first blocks.

3. The method according to claim 2 , wherein the determining a preset quantity of representative node devices in the blockchain system according to the voting transaction data stored in the plurality of first blocks comprises:

determining quantities of votes for node devices in the blockchain system according to the voting transaction data stored in the plurality of first blocks; and

determining the preset quantity of representative node devices in the blockchain system in a descending order by quantity of votes.

4. The method according to claim 3 , wherein a voting manner in the blockchain system is incremental voting, and the determining the quantities of votes for the node devices in the blockchain system according to the voting transaction data stored in the plurality of first blocks comprises:

determining the quantities of votes for the node devices in the blockchain system according to transaction data of users stored in the plurality of first blocks.

5. The method according to claim 3 , wherein a voting manner in the blockchain system is full voting, and the determining the quantities of votes for the node devices in the blockchain system according to the voting transaction data stored in the plurality of first blocks comprises:

determining transaction data of the last voting of users from the transaction data stored in the plurality of first blocks, and determining the quantities of votes for the node devices in the blockchain system based on the transaction data of the last voting of the users.

6. The method according to claim 1 , wherein a weight is assigned to a vote of each user participating in the voting.

7. The method according to claim 6 , wherein the weight of the each user is set based on a user parameter, the user parameter comprising an account balance or a credit value.

8. The method according to claim 1 , further comprising:

when the plurality of the multiple node devices in the blockchain system verify the voting transaction data by consensus, updating a vote list stored on the blockchain system according to the voting transaction data, the vote list being used for storing quantities of votes for node devices.

9. The method according to claim 8 , wherein, when a voting manner in the blockchain system is full voting, the updating a vote list stored on the blockchain system comprises:

determining transaction data of the last voting of users from the transaction data stored in first blocks, and updating the vote list stored on the blockchain system based on the transaction data of the last voting of the users.

10. The method according to claim 8 , wherein, when a voting manner in the blockchain system is incremental voting, the updating a vote list stored on the blockchain system comprises:

updating the vote list stored on the blockchain system according to all pieces of voting transaction data of users stored in first blocks.

11. A blockchain system comprising multiple node devices, each node device having a processor and memory, the memory storing computer-readable instructions that, when executed by the processor, causing the blockchain system to perform a plurality of operations including:

obtaining voting transaction data from the multiple node devices, the voting transaction data being used for voting for one or more node devices of the blockchain system as representative node devices;

generating and storing the voting transaction data into a target blockchain of the blockchain system when a plurality of the multiple node devices of the blockchain system verify the voting transaction data by consensus;

in accordance with a quantity of blocks in the target blockchain generated using the voting transaction data being at least a preset quantity, determining an election result according to quantities of votes of the multiple node devices determined from the voting transaction data, the election result identifying a subset of node devices from the multiple node devices in the blockchain system; and

setting an operating state of the subset of node devices to be representative node devices, the representative node devices being configured to generate new blocks for the target blockchain and perform verification on the new blocks by consensus.

12. The blockchain system according to claim 11 , wherein the determining an election result according to quantities of votes of the multiple node devices determined from the voting transaction data comprises:

determining a plurality of first blocks in the target blockchain, the plurality of first blocks being configured to store the voting transaction data of the multiple node devices; and

determining a preset quantity of representative node devices in the blockchain system according to the voting transaction data stored in the plurality of first blocks.

13. The blockchain system according to claim 12 , wherein the determining a preset quantity of representative node devices in the blockchain system according to the voting transaction data stored in the plurality of first blocks comprises:

determining quantities of votes for node devices in the blockchain system according to the voting transaction data stored in the plurality of first blocks; and

determining the preset quantity of representative node devices in the blockchain system in a descending order by quantity of votes.

14. The blockchain system according to claim 13 , wherein a voting manner in the blockchain system is incremental voting, and the determining the quantities of votes for the node devices in the blockchain system according to the voting transaction data stored in the plurality of first blocks comprises:

determining the quantities of votes for the node devices in the blockchain system according to transaction data of users stored in the plurality of first blocks.

15. The blockchain system according to claim 13 , wherein a voting manner in the blockchain system is full voting, and the determining the quantities of votes for the node devices in the blockchain system according to the voting transaction data stored in the plurality of first blocks comprises:

determining transaction data of the last voting of users from the transaction data stored in the plurality of first blocks, and determining the quantities of votes for the node devices in the blockchain system based on the transaction data of the last voting of the users.

16. The blockchain system according to claim 11 , wherein the plurality of operations further comprise:

when the plurality of the multiple node devices in the blockchain system verify the voting transaction data by consensus, updating a vote list stored on the blockchain system according to the voting transaction data, the vote list being used for storing quantities of votes for node devices.

17. The blockchain system according to claim 16 , wherein, when a voting manner in the blockchain system is full voting, the updating a vote list stored on the blockchain system comprises:

determining transaction data of the last voting of users from the transaction data stored in first blocks, and updating the vote list stored on the blockchain system based on the transaction data of the last voting of the users.

18. The blockchain system according to claim 16 , wherein, when a voting manner in the blockchain system is incremental voting, the updating a vote list stored on the blockchain system comprises:

updating the vote list stored on the blockchain system according to all pieces of voting transaction data of users stored in first blocks.

19. A non-transitory computer-readable storage medium, storing computer-readable instructions that, when executed by one or more processors of multiple node devices of a blockchain system, causing the blockchain system to perform a plurality of operations including:

obtaining voting transaction data from the multiple node devices, the voting transaction data being used for voting for one or more node devices of the blockchain system as representative node devices;

generating and storing the voting transaction data into a target blockchain of the blockchain system when a plurality of the multiple node devices of the blockchain system verify the voting transaction data by consensus;

in accordance with a quantity of blocks in the target blockchain generated using the voting transaction data being at least a preset quantity, determining an election result according to quantities of votes of the multiple node devices determined from the voting transaction data, the election result identifying a subset of node devices from the multiple node devices in the blockchain system; and

setting an operating state of the subset of node devices to be representative node devices, the representative node devices being configured to generate new blocks for the target blockchain and perform verification on the new blocks by consensus.

20. The non-transitory computer-readable storage medium according to claim 19 , wherein the plurality of operations further comprise:

when the plurality of the multiple node devices in the blockchain system verify the voting transaction data by consensus, updating a vote list stored on the blockchain system according to the voting transaction data, the vote list being used for storing quantities of votes for node devices.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded May 28, 2021
From: GUO, RUI; LI, MAOCAI; WANG, ZONGYOU; TU, HAITAO; KONG, LI; ZHOU, KAIBAN; YANG, CHANGQING; WANG, NAN; DING, YONG; SHI, YIFANG
To: TENCENT TECHNOLOGY (SHENZHEN) COMPANY LIMITED
Reel/Frame 056384/0648 →
Priority Claims (1)
CN 201811046267.9 · Sep 7, 2018 · national
Continuity (2)
Continuation PCTCN2019104141 · Sep 3, 2019
Related Publication 20210021419A1 · Jan 21, 2021
Cited By (1)
US 12,505,254