WO2020048440A1 - 代表节点设备选举方法、装置、计算机设备及存储介质 - Google Patents

代表节点设备选举方法、装置、计算机设备及存储介质 Download PDF

Info

Publication number
WO2020048440A1
WO2020048440A1 PCT/CN2019/104159 CN2019104159W WO2020048440A1 WO 2020048440 A1 WO2020048440 A1 WO 2020048440A1 CN 2019104159 W CN2019104159 W CN 2019104159W WO 2020048440 A1 WO2020048440 A1 WO 2020048440A1
Authority
WO
WIPO (PCT)
Prior art keywords
node device
transaction data
candidate
blockchain system
target
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.)
Ceased
Application number
PCT/CN2019/104159
Other languages
English (en)
French (fr)
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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to EP19858149.8A priority Critical patent/EP3848876B1/en
Priority to SG11202010921PA priority patent/SG11202010921PA/en
Priority to JP2020551312A priority patent/JP7038228B2/ja
Priority to KR1020207033831A priority patent/KR102449463B1/ko
Publication of WO2020048440A1 publication Critical patent/WO2020048440A1/zh
Priority to US17/066,482 priority patent/US12367500B2/en
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/02Banking, e.g. interest calculation or account maintenance
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • G06Q20/3829Payment protocols; Details thereof insuring higher security of transaction involving key management
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/18File system types
    • G06F16/182Distributed file systems
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • G06F16/2365Ensuring data consistency and integrity
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • G06F16/2379Updates performed during online database operations; commit processing
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/64Protecting data integrity, e.g. using checksums, certificates or signatures
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/04Payment circuits
    • G06Q20/06Private payment circuits, e.g. involving electronic currency used among participants of a common payment scheme
    • G06Q20/065Private payment circuits, e.g. involving electronic currency used among participants of a common payment scheme using e-cash
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/08Payment architectures
    • G06Q20/10Payment architectures specially adapted for electronic funds transfer [EFT] systems; specially adapted for home banking systems
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • G06Q20/3825Use of electronic signatures
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/389Keeping log of transactions for guaranteeing non-repudiation of a transaction
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/018Certifying business or products
    • G06Q30/0185Product, service or business identity fraud
    • 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/104Peer-to-peer [P2P] networks
    • H04L67/1044Group management mechanisms 
    • H04L67/1051Group master selection mechanisms
    • 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/1097Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/50Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols using hash chains, e.g. blockchains or hash trees
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q2230/00Voting or election arrangements

Definitions

  • the present application relates to the field of blockchain technology, and in particular, to a method, an apparatus, a computer device, and a storage medium for selecting a representative node device.
  • the blockchain system can be composed of multiple node devices, and each node device can use blocks to store transaction data and follow the chronological order.
  • the blocks are combined in a sequential manner into a chain data structure, thereby forming a distributed ledger within the blockchain system.
  • a node device can generate a block by the following process.
  • the node device can record the transaction data and broadcast the transaction data in the blockchain system to make the blockchain system Other node devices in the system receive the transaction data.
  • the node devices on the blockchain system receive the transaction data, they can package the transaction data and generate new blocks, and verify the new block through the consensus mechanism. After the new block passes the verification, Each node device can add the new block to the blockchain configured on the node.
  • a representative node device may be elected to generate blocks instead of all the node devices.
  • any node device in the blockchain system may become a representative node device, and each node device has different qualifications due to its performance or authority, and the blockchain system may continuously send error information.
  • the embodiments of the present application provide a method, an apparatus, a computer device, and a storage medium for selecting a representative node device.
  • a method for electing a representative node device is performed by a first node device.
  • the first node device is any node device in a blockchain system. The method includes:
  • the new candidate transaction data carries credential data, and the credential data is used to indicate that the first node device meets the qualification requirements of the candidate node device;
  • the transaction data of the new candidate is stored on a target blockchain of the blockchain system;
  • An election process for a representative node device is performed according to the new candidate transaction data candidate node device transaction data that has been stored on the target blockchain.
  • a device for selecting a representative node device including:
  • a receiving module configured to receive transaction data of a new candidate, where the transaction data of the new candidate carries credential data, and the credential data is used to indicate that the first node device meets the qualification requirements of the candidate node device;
  • a storage module configured to store the transaction data of the new candidate in a target area of the blockchain system when multiple node devices in the blockchain system pass the consensus of the new candidate transaction data On the blockchain;
  • An election module is configured to perform an election process for a representative node device according to the newly added candidate transaction data and candidate transaction data stored on the target blockchain.
  • a computer device wherein the computer device includes a processor and a memory, and the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the processor causes the processor to execute The following steps:
  • the new candidate transaction data carries credential data, and the credential data is used to indicate that the first node device meets the qualification requirements of the candidate node device;
  • the transaction data of the new candidate is stored on a target blockchain of the blockchain system;
  • An election process of a representative node device is performed according to the newly added candidate transaction data stored on the target blockchain.
  • a non-transitory computer-readable storage medium storing computer-readable instructions.
  • the computer-readable instructions execute the following steps:
  • the new candidate transaction data carries credential data, and the credential data is used to indicate that the first node device meets the qualification requirements of the candidate node device;
  • the transaction data of the new candidate is stored on a target blockchain of the blockchain system;
  • An election process of a representative node device is performed according to the newly added candidate transaction data stored on the target blockchain.
  • FIG. 1 is a schematic structural diagram of a blockchain system according to an embodiment of the present application.
  • FIG. 2 is a flowchart of a method for selecting a representative node device according to an embodiment of the present application
  • FIG. 3 is a flowchart of a node device qualification verification process according to an embodiment of the present application.
  • FIG. 4 is a schematic structural diagram of a representative node device election apparatus according to an embodiment of the present application.
  • FIG. 5 is a schematic structural diagram of a server according to an embodiment of the present application.
  • FIG. 1 is a schematic structural diagram of a blockchain system according to an embodiment of the present application.
  • the blockchain system includes multiple node devices, and the multiple node devices may be configured with a same blockchain.
  • the multiple node devices may be multiple servers of the same organization, or multiple servers belonging to different organizations, or multiple terminals of individual users, which is not limited in this embodiment of the present application.
  • the “multiple” mentioned in the embodiments of the present application means “more than one”.
  • the multiple node devices can receive transaction data.
  • each node device can be divided into representative node devices and non-representative node devices due to the different purposes of each node device.
  • the representative node device is used to generate a block and a consensus block
  • the non-representative node device is used to receive a block representing the consensus of the node device, verify the block, and store the verified block in the target blockchain
  • Non-representative node devices can be divided into ordinary node devices and candidate node devices due to their different performance.
  • a target server is also provided, and the target server can serve as a reviewer for receiving a candidate application request sent by at least one node device in the blockchain system, and based on the candidate application request for the node
  • the device performs qualification audit and generates credential data, and the target server can send the credential data to the audited node device, so that the node device can become a representative node device in the blockchain system by virtue of credential data that meets predetermined rules Candidate node device.
  • the process of recording transaction data by the blockchain system may have the following example process:
  • the node device needs to broadcast the received transaction data in Blockchain system so that other node devices receive the transaction data.
  • the representative node device in the blockchain system receives the transaction data
  • the representative node device generates a block based on the transaction data, so that each representative node device agrees on the block.
  • the representative node device passes the block consensus
  • the representative node device broadcasts the block in the blockchain system.
  • the non-representative node device verifies the block. After the verification, the block is stored in the non-representative device. Node device configuration on the target blockchain.
  • the consensus involved in the embodiments of the present application refers to multiple node devices in the blockchain system verifying data separately.
  • any node device passes the verification, it will broadcast a verification pass message in the blockchain system.
  • the verification pass message received by the node device conforms to a preset consensus policy, it is determined that the data consensus passes.
  • the consensus is performed by a representative node device in a blockchain system as an example, and the consensus can be completed through a POW (proof of work) mechanism.
  • the process is described as follows: the representative node device in the blockchain system generates a block; the representative node device calculates the hash value of the block header of the generated block to see if it is less than the current target value, and if the hash value is greater than the target value , The representative node device modifies the random number in the generated block and recalculates it; when the hash value calculated by the representative node device is less than the target value, the representative node device broadcasts the first block to other representative node devices, and It can be broadcast in the blockchain system; other representative node devices verify the first block after receiving it; when most other representative node devices agree on the validity of the first block, the consensus is passed .
  • the system provided by the embodiment of the present application can generate blocks without all the node devices in the blockchain system, and does not require that most node devices in the blockchain system reach a consensus on the generated blocks, and then verify whether transactions can be stored.
  • Data can be recorded in the blockchain system only by generating blocks, consensus blocks, and non-representative node devices to complete verification on behalf of the node device, thereby improving the working efficiency of the blockchain system.
  • FIG. 2 is a flowchart of a method for selecting a representative node device according to an embodiment of the present application. Referring to FIG. 2, a method flow provided by an embodiment of the present application includes:
  • the first node device sends a candidate application request to the target server, where the candidate application request carries qualification information of the first node device.
  • the first node device is any node device in a blockchain system.
  • the target server is one or more servers in the blockchain system, or one or more servers outside the blockchain system.
  • the target server can be configured with at least one terminal device, and the user who is the reviewer can log in by Terminal equipment to perform qualification review on the node equipment in the blockchain system. It can be understood that the target server may be any node device in the blockchain system; or, the target server is a server of a third-party institution associated with the blockchain system.
  • the first node device sends a candidate application request to the target server, so that the target server can perform a qualification review on the first node device based on the qualification information carried in the candidate application request, and check whether the first node device can become a candidate node. device.
  • the qualification information of the first node device carried in the candidate application request may be any one of the following three qualifications: the device performance of the first node device; the node device has paid a preset amount of security to the target server The credit value of the user account corresponding to the first node device.
  • the qualification information may also include other content, which is not limited in this embodiment.
  • the first node device may be a non-representative node device. If the current election process of the blockchain system is not the first election process, Then, the first node device is any ordinary node device, that is, the first node device is neither a representative node device nor a candidate node device.
  • the target server After receiving the candidate application request, the target server performs a qualification review on the first node device, and generates credential data when the first node device meets the qualification requirements of the candidate node device.
  • the first node device may be referred to as a first target node device, that is, when the first target node device meets the qualification requirements of the candidate node device, credential data is generated, and the credential data may be used to indicate the first A target node device meets the qualification requirements of the candidate node device.
  • the target server may send the qualification information carried in the candidate application request to at least one terminal device configured on the target server, so that the user can perform the qualification review on the node device through the terminal device.
  • the qualification review process includes: when the qualification information meets the qualification requirements of the candidate node device, it is passed.
  • the qualification information is that the device performance of the node device meets the preset performance conditions, that is, the qualification is passed; or the qualification information A predetermined amount of security deposit has been paid for the node device, that is, the audit is passed; or the qualification information is that the credit of the user corresponding to the node device reaches the preset credit condition, that is, the audit is passed.
  • the first node device passes the qualification audit, it means that the first node device has the potential to become a candidate node device.
  • the first target node device may be any node device in the blockchain system, the first target node device meets the qualification requirements of the candidate node device, and the first target node device may be the first node device.
  • credential data is generated on the terminal device, and the credential data may include the consent identifier, credential generation time, credential validity period, and the user ’s signature. It is understandable
  • the target server can send the qualification information carried in the candidate application request to multiple terminal devices configured on the target server after receiving the candidate application request, so that multiple users can access the node through the terminal device. Equipment is qualified.
  • the credential data may include multiple consent identities, multiple credential generation times, multiple credential validity periods, and multiple user signatures.
  • the consent identifier refers to an identifier that the user agrees that the first node device becomes a candidate node device, and the validity period can be used to verify the validity of the credential data to prevent non-candidate node devices from using the maliciously acquired credential data to become a representative node Device, signature is the user's signature on the qualification information.
  • the terminal device may not generate credential data.
  • the terminal device sends the generated credential data to the target server.
  • the target server summarizes all the credential data into a piece of credential data.
  • the terminal device may also feed back the audit result to the target server, and the target server generates credential data according to the audit result of the terminal device participating in the audit.
  • the target server may also perform the qualification audit on the first node device by itself.
  • credential data is generated on the target server, and the credential data includes: consent identifier, credential time, credential validity period, and signature of the target server.
  • the signature means that the target server Use its own private key to sign the qualification information of the first node device.
  • the target server can adopt offline audit or online audit.
  • offline audit method When the offline audit method is adopted, it will not affect the online operation of the target server, and can manually sort out and analyze qualification information based on manual processes. It can improve the effectiveness and credibility of the audit, and when the online audit method is adopted, the real-time audit can be improved and the labor cost can be reduced.
  • the target server sends the credential data to the first node device.
  • the target server sends credential data to the first node device, so that the first node device can initiate a new candidate transaction in the blockchain system based on the credential data.
  • the first node device broadcasts new candidate transaction data in the blockchain system.
  • the new candidate transaction data includes the credential data and a list of candidate node devices.
  • the candidate node device list includes a plurality of first target node devices, and the credential data includes credential data corresponding to the plurality of first target node devices.
  • the first node device initiates a new candidate transaction in the blockchain system so that the first node device can become a candidate node device.
  • the broadcast can make all the node devices in the blockchain system receive the new candidate transaction data.
  • the first node device applies to become a candidate node device, and the first node device sends the transaction data of the new candidate as an example.
  • the new candidate is sent.
  • the node device of the transaction data may be any node device in the blockchain system, and the node device that receives the transaction data of the newly added candidate may be any node device in the blockchain system, which is not described in this embodiment of the application. limited.
  • Each second node device receives the new candidate transaction data.
  • the second node device is a node device other than the first node device. It should be noted that the "first”, “second”, and “third” attributive terms used in the embodiments of the present application are not used for the node device. Functions are distinguished, but only different node devices.
  • the multiple node devices in the embodiment of the present application pass the consensus transaction data of the new candidate, which may mean that multiple representative node devices in the blockchain system pass the consensus transaction data of the new candidate.
  • the multiple representative node devices in the blockchain system may specifically be multiple representative node devices in the second node device.
  • the representative node device verifies the validity of the new candidate transaction data based on whether the credential data has a preset number of consent identities. When the credential data has a preset number of consent identities, the representative The node device determines that the new candidate transaction data is valid. When a plurality of representative node devices determine that the new candidate transaction data is valid, the representative node device meets a preset consensus passing condition, that is, the consensus passes.
  • the preset consensus pass condition can be determined to be valid for all the representative node devices or to be valid for a preset number or proportion of representative node devices in all the representative node devices, which is not limited in this embodiment of the present application.
  • the representative node device verifies the validity of the new candidate transaction data based on the validity period in the credential data, that is, when the validity period of the credential data has not expired, the representative node device considers the new candidate transaction The data is valid. When multiple representative node devices consider the transaction data of the new candidate valid, the consensus is passed. It should be noted that the credential data may include multiple valid periods, and the time periods represented by each valid period may be inconsistent. The earliest valid period of multiple valid periods shall prevail to determine whether the new candidate transaction data is valid. .
  • the preset initial representative node device can be used as the node device participating in the consensus process. After the election of multiple representative node devices, the election The obtained multiple representative node devices can be switched to the running state of the representative node device to participate in the consensus and block generation process of the entire blockchain system, while the node devices that have not been elected as representative node devices run on non-representative node devices Status, does not participate in the consensus and block generation process of the entire blockchain system.
  • the above steps S201 to S206 are processes for performing a qualification review on a node device in a blockchain according to a target server to determine a plurality of candidate node devices in the blockchain system.
  • any node device in the entire blockchain system knows the identity of the first target node device as a candidate node device, so in this blockchain system, it is possible to A candidate node device, that is, a plurality of first target node devices, performs elections to elect a representative node device.
  • Any node device in the blockchain can perform the election process of the representative node device according to the transaction data of the newly added candidate stored on the target blockchain.
  • the first node device receives voting transaction data of the user.
  • the transaction data type in the blockchain system may include voting transaction data and other transaction data, and the voting transaction data may be generated based on a user's voting goal in the blockchain system.
  • the voting transaction data may include: transaction type, List of voting node devices and private key signatures of voting users.
  • the user's voting target is a candidate node device stored in the blockchain system.
  • the process of selecting a representative node device by taking a user to vote by logging in to the first node device and selecting a representative node device may also be a method in which the user logs in to the blockchain.
  • Other node devices in the system vote which is not specifically limited in this application.
  • the first node device broadcasts the voting transaction data in a blockchain system.
  • Each second node device receives voting transaction data.
  • Each second node device receives the voting transaction data of the candidate node device.
  • the voting transaction data is stored in the block. Chain system in the target blockchain.
  • the plurality of node devices in the embodiment of the present application pass the voting transaction data consensus, it may mean that a plurality of working representative node devices in the blockchain system pass the voting transaction data consensus.
  • the first node device determines a plurality of first blocks from each block of the target blockchain, and the plurality of first blocks are used for Stores voting transaction data for each candidate node device.
  • the first node device may query from each block of the target blockchain based on the voting transaction type to obtain a block storing the voting transaction type as the first block.
  • multiple elections can be conducted during the operation of the entire blockchain system to avoid system operation problems caused by the status of a representative node device.
  • a representative node device may Abnormal operation or credit problems, etc., can ensure the stable operation of the blockchain system based on the representative node device.
  • the election is performed only when the generated block reaches the second preset number, which can ensure the switching time of the representative node device, that is, how often the representative node device is switched, thereby avoiding frequent switching of the representative node device and affecting the entire block. Normal operation of the chain system. It should be noted that the generated block is a block generated after the last election.
  • the generated block includes not only a block generated based on voting transaction data, but also a block generated based on other transaction data. Of course, it can also include a block generated based on voting transaction data and other transaction data. This is not described in the embodiment of the present application.
  • each node device in the blockchain system will execute the process of step S211, which is not described in the embodiment of the present application.
  • the first node device determines the number of votes of each candidate node device in the blockchain system according to the voting transaction data stored in the plurality of first blocks.
  • the voting transaction data includes the transaction type, the list of voted node devices, and the private key signature of the voting user. Therefore, for each of the voting transaction data stored in the first block, it can be counted which node device has obtained how many votes.
  • the voting method in the blockchain system may be an incremental voting method.
  • Incremental voting refers to specifying the node device to be voted in the voting transaction and retaining the historical voting result. For example, the user has voted for three node devices, A, B, and C. The object of this vote is the D node device. In this vote, you can directly vote for the D node device. The list of voted node devices in the voting transaction data. The public key of the D-node device should be carried in the device, that is, the user has voted on the four node devices of A, B, C, and D through multiple rounds of voting.
  • the voted node device can also be revoked. For example, the user has voted for three node devices, A, B, and C. If you want to cancel the vote for the C node device next time, then When a vote is made, the voting for the node C device can be withdrawn directly in the voting transaction data.
  • steps S211 to S212 are actually examples of how to obtain voting transaction data corresponding to each candidate node device, and the process may also adopt other methods, which are not specifically limited in this application.
  • the first node device determines an election result according to the number of votes from high to low.
  • the election result includes a third preset number of public key devices representing the node device and votes of each representative node device in the blockchain system.
  • the third preset number may be consistent with the number of representative node devices that are currently working, that is, by setting the third preset number, it can be ensured that the currently working representative node devices can be elected to switch all the representative node devices. Off.
  • the third preset number can also be changed.
  • the third preset number can be changed according to the change in the number of node devices in the blockchain system. When the number of node devices increases, the third preset number can be changed. The number can be increased.
  • the first node device can determine whether it is the representative node device of the new election according to the election result determined by itself, that is, any node device in the blockchain system can be determined by itself. Count the election results to determine whether you are the representative node device of this new election and the identity of other representative node devices of this new election.
  • the above steps S212 to S213 are one embodiment of a process in which the first node device determines a plurality of representative node devices in the blockchain system according to the votes of the plurality of candidate node devices, that is, according to the plurality of The process of determining the third preset number of representative node devices in the blockchain system by voting transaction data stored in a block.
  • election methods can also be adopted, which are not specifically limited in this application.
  • the above steps S207 to S214 are the process for the blockchain system to elect a representative node device.
  • the blockchain system can also delete the candidate node device.
  • the specific deletion process can be described as follows:
  • Any candidate node device broadcasts deletion candidate transaction data in the blockchain system, and the deletion candidate transaction data is used to instruct the candidate node device to withdraw from the election.
  • the candidate node device withdrawing from the election among the node devices with the candidate node device qualification requirements may be referred to as the second target node device. That is, the deletion candidate transaction data is used to instruct the first target node device to be deleted from the candidate node device.
  • a candidate transaction can be initiated in the blockchain system, that is, the candidate transaction data is broadcasted so that each node device receives the transaction data , It is no longer possible to vote for the candidate node device in the next election.
  • Each node device receives the deletion candidate transaction data.
  • the representative node device may package the transaction data of the deletion candidate and generate a block.
  • the block is sent to each non-representative node device, and the non-representative node device stores the transaction data of the candidate for deletion in the block chain configured by the non-representative node device, thereby achieving the joint maintenance of each node device in the blockchain system
  • the candidate node device will be disqualified and the user will not vote for it.
  • the second target node device switches to a normal node device state and operates.
  • the method further includes: receiving target transaction data, the target transaction data being used to return a deposit to an account of the second target node device.
  • the target transaction data may be initiated by the target server as a node device in the blockchain system, or may be initiated by the target server through any node device in the blockchain system, which is not limited in the embodiment of the present application. .
  • steps S215 to S218 are deletion processes of candidate node devices, and may occur at any time period in which there is a candidate node device in the blockchain system, which is not specifically limited in this embodiment.
  • the candidate node device may be deleted in other ways, which is not specifically limited in this embodiment.
  • a node server in a blockchain system is qualified to be audited by a target server, and based on the audit result, credential data is sent to the audited node device to prove that the node device can become a candidate node device.
  • the node device can initiate a new candidate transaction in the blockchain system based on the credential data, and then determine candidate node devices according to preset rules, then the blockchain system can elect a representative from these candidate node devices Node devices, so there is no need to elect a representative node device from all the node devices in the blockchain system, it is only necessary to perform elections from candidate node devices, which improves the election efficiency of the election of a representative node device by the blockchain system.
  • the second preset number of blocks are generated at intervals, and the votes of each node device in the blockchain system are counted, and the representative node device is elected.
  • This method can control the switching of the representative node device.
  • the length of time guarantees the switching time of the representative node device, which can prevent the representative node device from switching frequently, so that the blockchain system can operate normally.
  • Replacing all node devices of the blockchain system with representative node devices to perform block generation and consensus on blocks, etc. not only avoids all node devices to perform the above process, greatly improving the working efficiency of the blockchain system, but also It also guarantees the qualification of the representative node equipment, so that the blockchain system can run more efficiently.
  • deleting candidate node devices that do not meet the qualification requirements can further improve the qualification of the representative node device, thereby improving the working efficiency of the representative node device.
  • one target server is used to audit the node devices in the blockchain system, and in some embodiments, multiple target servers may be used to audit the node devices in the blockchain system, as described below:
  • FIG. 3 is a flowchart of a node device qualification verification process provided in an embodiment of the present application. Referring to FIG. 3, the method flow of this embodiment includes:
  • the first node device sends a candidate application request to the target servers A1 to An, where the candidate application request carries qualification information of the first node device.
  • the target servers A1 to An are used to perform a qualification review on the node devices in the blockchain system.
  • the target servers A1 to An need to be verified and verified to determine that the first node device can be used as a candidate node device.
  • the embodiment of the present application only illustrates the qualification verification performed by multiple target servers as an example. In this embodiment, this step S301 can be implemented in two ways:
  • the first node device sends the candidate application request to one target server among multiple target servers, and the one target server sends the candidate application request to other target servers so that other target servers can receive the candidate.
  • Application Request The first node device sends the candidate application request to one target server among multiple target servers, and the one target server sends the candidate application request to other target servers so that other target servers can receive the candidate.
  • the second implementation manner When the first node device sends the candidate application request to all target servers in the multiple target servers, so that all target servers can receive the candidate application request, of course, the first node device can also Send the candidate application request to some target servers, and forward the received candidate application request to other target servers, so that other target servers can receive the candidate application request.
  • the application examples are not specifically limited.
  • the candidate application request refers to a request from the first node device to any target server to become a candidate node device.
  • the qualification information of the first node device carried in the candidate application request may be any one of the following three qualifications: Item: the device performance of the first node device; the node device has paid a preset amount of security to the target server; the credit value of the user account corresponding to the first node device.
  • the qualification information may also include other content, which is not limited in this embodiment.
  • the target servers A1 to An After receiving the candidate application request, the target servers A1 to An respectively perform a qualification review on the first node device to generate credential data.
  • credential transaction data is generated for each of the target servers that the qualification information passes.
  • the credential data may include a consent identifier, a credential time, a validity period of the credential, and a signature of the target server, where the consent identifier refers to an identifier that the target server agrees that the first node device becomes a candidate node device, and the validity period can avoid non-candidate
  • the node device uses the expired credential data to become the representative node device, and the signature is the signature of the target server using its own private key to sign the qualification information.
  • the credential data generated by the target server may also be credential data generated based on the audit result of the terminal device associated with the target server, for example, step S202, which is not described in this embodiment of the present application.
  • the multiple target servers respectively send the credential data to the first node device, and the multiple target servers are the servers of the reviewer.
  • a plurality of target servers respectively send credential data to the first node device, so that the first node device receives the credential data, and initiates a new candidate transaction to the blockchain system based on the credential data.
  • one target server may be filtered from the multiple target servers, and other target servers that pass the audit may send the credential data generated by themselves to the target server, and the target server aggregates all the credentials into one. A copy of the credential data, and send the credential data to the first node device.
  • the first node device broadcasts the new candidate transaction data in the blockchain system.
  • the new candidate transaction data includes the credential data and a list of candidate node devices.
  • the first node device initiates a new candidate transaction to any node device of the blockchain system, so that the first node device can become a candidate node device.
  • steps S301 to S304 are the processes of verifying whether a node device has the qualification to become a candidate node device for multiple target servers, the process of the first node device becoming a candidate node device, and the election of a representative node device in the blockchain system. For the process, see steps S205 to S218, which will not be repeated here.
  • multiple target servers are used to audit the node devices of the blockchain system, which can prevent a target server from failing and cannot be audited normally, and the qualifications of the node devices that are audited by multiple target servers are more reliable.
  • FIG. 4 is a schematic structural diagram of an election apparatus representing a node device according to an embodiment of the present application. Referring to FIG. 4, it includes a first receiving module 401, a first storage module 402, and an election module 403.
  • the first receiving module 401 is connected to the first storage module 402 and is configured to receive transaction data of a new candidate.
  • the new candidate transaction data carries credential data, and the credential data is used to indicate that the first target node device complies with Qualification requirements for candidate node equipment;
  • the first storage module 402 is connected to the election module 403, and is configured to store the new candidate transaction data in the blockchain when multiple node devices in the blockchain system pass the new candidate transaction data consensus. On the system's target blockchain;
  • the election module 403 is configured to perform an election process for a representative node device according to the candidate node device transaction data of the newly added candidate transaction data stored on the target blockchain.
  • the credential data includes signature data of a plurality of auditing users.
  • the apparatus further includes:
  • the sending module is configured to send a candidate application request to the target server, where the candidate application request carries qualification information of the node device.
  • the target server is any node device in the blockchain system; or,
  • the target server is a server of a third party institution associated with the blockchain system.
  • the first target node device meets at least one of the following conditions:
  • the device performance of the target node device meets the preset performance conditions
  • the target node device has paid a preset amount of security deposit
  • the credit of the user corresponding to the target node device reaches a preset credit condition.
  • the consensus of multiple node devices in the blockchain system on the transaction data of the newly added candidate means that multiple representative node devices in the blockchain system agree on the transaction data of the new candidate. by.
  • the device further includes:
  • a second receiving module configured to receive deletion candidate transaction data, where the deletion candidate transaction data is used to instruct deletion of the second target node device from the candidate node device;
  • the second storage module is configured to store the transaction data of the deletion candidate on the target blockchain of the blockchain system when a plurality of node devices in the blockchain system pass the deletion candidate transaction data consensus.
  • the apparatus further includes:
  • the third receiving module is configured to receive target transaction data, and the target transaction data is used to return the deposit to the account of the second target node device.
  • the apparatus provided in the embodiment of the present application performs a qualification check on a node device in a blockchain system by an reviewer, and sends credential data to the node device being audited based on the audit result to prove whether the node device can become a candidate node device
  • the node device can use the credential data to initiate new candidate transactions in the blockchain system, and then determine candidate node devices based on preset rules, then the blockchain system can elect representatives from these candidate node devices Node device, thereby avoiding the election of a representative node device from all the node devices in the blockchain system, and only the candidate node device can be used for election, which improves the election efficiency of the blockchain system to elect a representative node device.
  • FIG. 5 is a schematic structural diagram of a server provided by an embodiment of the present application.
  • the server 500 may have a large difference due to different configurations or performance, and may include one or more processors (central processing units) (CPUs) 501 and one Or more than one memory 502.
  • the memory 502 stores computer-readable instructions, and the computer-readable instructions are loaded and executed by the processor 501 to implement the methods provided by the foregoing method embodiments.
  • the server may also have components such as a wired or wireless network interface, a keyboard, and an input-output interface for input and output.
  • the server may also include other components for implementing device functions, and details are not described herein.
  • a computer-readable storage medium such as a memory including instructions, and the foregoing instructions may be executed by a processor in a terminal to complete the method for selecting a representative node device in the foregoing embodiment.
  • the computer-readable storage medium may be ROM (read-only memory, read-only memory), RAM (random access memory, random access memory), CD-ROM (compact disc-ready memory), magnetic tape , Floppy disks, and optical data storage devices.
  • the program may be stored in a computer-readable storage medium.
  • the storage medium may be a read-only memory, a magnetic disk or an optical disk.

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Theoretical Computer Science (AREA)
  • Accounting & Taxation (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Finance (AREA)
  • Strategic Management (AREA)
  • General Business, Economics & Management (AREA)
  • Computer Security & Cryptography (AREA)
  • Databases & Information Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Economics (AREA)
  • Data Mining & Analysis (AREA)
  • Development Economics (AREA)
  • Marketing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Technology Law (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Health & Medical Sciences (AREA)
  • Software Systems (AREA)
  • Computer Hardware Design (AREA)
  • General Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

一种代表节点设备选举方法,包括:接收新增候选者交易数据,新增候选者交易数据携带由审核方提供的凭据数据,凭据数据用于指示第一节点设备符合候选节点设备的资质要求;当区块链系统中多个节点设备对新增候选者交易数据共识通过时,将新增候选者交易数据存储至区块链系统的目标区块链上;及根据目标区块链上已存储的新增候选者交易数据候选节点设备交易数据,进行对代表节点设备的选举过程。

Description

代表节点设备选举方法、装置、计算机设备及存储介质
本申请要求于2018年09月07日提交中国专利局,申请号为201811046270.0、发明名称为“代表节点设备选举方法、装置、计算机设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及区块链技术领域,特别涉及一种代表节点设备选举方法、装置、计算机设备及存储介质。
背景技术
近年来,随着网络技术的发展,区块链系统被广泛应用在生活中,区块链系统可以由多个节点设备构成,每个节点设备均可以利用区块存储交易数据,并按照时间顺序将区块以顺序相连的方式组合成一种链式数据结构,从而在区块链系统内形成一种分布式账本。
目前,节点设备生成区块可以是如下过程,当任一个节点设备上发生交易时,该节点设备可以对交易数据进行记录,并在区块链系统中广播该交易数据,以使得区块链系统中的其他节点设备接收到该交易数据,当区块链系统上的节点设备接收到交易数据之后,可以将交易数据打包并产生新区块,并通过共识机制验证新区块,当新区块通过验证后,各个节点设备可以将该新区块添加至节点上配置的区块链中。
在上述节点设备生成区块的过程中,为提高区块链系统的工作效率,可以选举出一种代表节点设备来代替所有节点设备生成区块。但是区块链系统中的任一节点设备均可能成为代表节点设备,而每个节点设备因其性能或者权威性不同,导致节点设备的资质不同,并且区块链系统中可能存在不断发送错误信息的恶意节点设备,一旦一些资质不足或者恶意节点设备当选代表节点设备,就会影响区块链系统的正常运作。此时,就亟需一种能够保证区 块链系统正常运作的选举代表节点设备的方法。
发明内容
本申请实施例提供了一种代表节点设备选举方法、装置、计算机设备及存储介质。
一种代表节点设备选举方法,由第一节点设备执行,所述第一节点设备为区块链系统中的任一节点设备,所述方法包括:
接收新增候选者交易数据,所述新增候选者交易数据携带凭据数据,所述凭据数据用于指示所述第一节点设备符合候选节点设备的资质要求;
当所述区块链系统中多个节点设备对所述新增候选者交易数据共识通过时,将所述新增候选者交易数据存储至所述区块链系统的目标区块链上;及
根据所述目标区块链上已存储的所述新增候选者交易数据候选节点设备交易数据,进行对代表节点设备的选举过程。
一种代表节点设备选举装置,所述装置包括:
接收模块,用于接收新增候选者交易数据,所述新增候选者交易数据携带凭据数据,所述凭据数据用于指示所述第一节点设备符合候选节点设备的资质要求;
存储模块,用于当所述区块链系统中多个节点设备对所述新增候选者交易数据共识通过时,将所述新增候选者交易数据存储至所述区块链系统的目标区块链上;及
选举模块,用于根据所述目标区块链上已存储的所述新增候选者交易数据候选者交易数据,进行对代表节点设备的选举过程。
一种计算机设备,其特征在于,所述计算机设备包括处理器和存储器,所述存储器中存储有计算机可读指令,所述计算机可读指令被所述处理器执行时,使得所述处理器执行以下步骤:
接收新增候选者交易数据,所述新增候选者交易数据携带凭据数据,所述凭据数据用于指示所述第一节点设备符合候选节点设备的资质要求;
当所述区块链系统中多个节点设备对所述新增候选者交易数据共识通过 时,将所述新增候选者交易数据存储至所述区块链系统的目标区块链上;及
根据所述目标区块链上已存储的所述新增候选者交易数据,进行代表节点设备的选举过程。
一种非易失性的计算机可读存储介质,存储有计算机可读指令,所述计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处理器执行以下步骤:
接收新增候选者交易数据,所述新增候选者交易数据携带凭据数据,所述凭据数据用于指示所述第一节点设备符合候选节点设备的资质要求;
当所述区块链系统中多个节点设备对所述新增候选者交易数据共识通过时,将所述新增候选者交易数据存储至所述区块链系统的目标区块链上;及
根据所述目标区块链上已存储的所述新增候选者交易数据,进行代表节点设备的选举过程。
本申请的一个或多个实施例的细节在下面的附图和描述中提出。本申请的其它特征、目的和优点将从说明书、附图以及权利要求书变得明显。
附图说明
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1是本申请实施例提供的一种区块链系统结构示意图;
图2是本申请实施例提供的一种代表节点设备选举方法流程图;
图3是本申请实施例提供的一种节点设备的资质审核的过程流程图;
图4是本申请实施例提供的一种代表节点设备选举装置结构示意图;
图5是本申请实施例提供的一种服务器的结构示意图。
具体实施方式
为使本申请的目的、技术方案和优点更加清楚,下面将结合附图对本申 请实施方式作进一步地详细描述。
图1是本申请实施例提供的一种区块链系统结构示意图,参见图1,该区块链系统包括多个节点设备,该多个节点设备可以配置有同一条区块链。该多个节点设备可以是同一机构的多个服务器,还可以是属于不同机构的多个服务器,还可以是个人用户的多个终端等,本申请实施例对此不做限定。其中,本申请各实施例中所提及的“多个”指“多于一个”。
该多个节点设备均可以接收交易数据,但区块链系统在对交易数据进行上链时,因各个节点设备用途不同,可以分为代表节点设备、非代表节点设备。其中,代表节点设备用于生成区块以及共识区块,非代表节点设备用于接收代表节点设备共识的区块,验证区块,并将验证通过的区块存储至目标区块链中,并且非代表节点设备因其性能不同,可以分为普通节点设备和候选节点设备。
另外,在本申请实施例中,还提供目标服务器,该目标服务器可以作为审核方,用于接收区块链系统中的至少一个节点设备发送的候选申请请求,并基于该候选申请请求对该节点设备进行资质审核,并生成凭据数据,该目标服务器可以将该凭据数据发送给被审核的节点设备,以便该节点设备凭借符合预定规则的凭据数据,可以成为该区块链系统中的代表节点设备的候选节点设备。
在一些实施例中,区块链系统记录交易数据的过程可以有如下示例过程:当区块链系统中的任一节点设备接收到交易数据时,该节点设备需将接收到的交易数据广播在区块链系统中,以便其他节点设备接收到该交易数据。当区块链系统中的代表节点设备接收到该交易数据后,代表节点设备基于交易数据生成区块,以便各个代表节点设备对该区块进行共识,当代表节点设备对该区块共识通过后,代表节点设备在区块链系统中广播该区块,非代表节点设备接收到代表节点设备广播的区块后,对该区块进行验证,通过验证后,将该区块存储至该非代表节点设备配置的目标区块链上。
本申请实施例所涉及的共识,是指区块链系统中多个节点设备对数据分别进行验证,当任一个节点设备验证通过时,会在区块链系统中广播验证通过消息,当任一个节点设备所接收到的验证通过消息符合预设共识策略时,则确定该数据共识通过。
例如,以共识是由区块链系统中的代表节点设备进行为例进行说明,该共识可以通过POW(proof of work,工作量证明)机制完成。其过程描述如下:区块链系统中的代表节点设备生成区块;代表节点设备计算该生成区块的区块头的哈希值,看其是否小于当前的目标值,如果哈希值大于目标值,代表节点设备就修改该生成区块中的随机数,并重新计算;当代表节点设备计算的哈希值小于目标值时,该代表节点设备向其他代表节点设备广播该第一区块,也可以在区块链系统中广播;其他代表节点设备接收到该第一区块后,对其进行验证;当多数其他多数代表节点设备都认同该第一区块的有效性时,即为共识通过。
本申请实施例提供的系统,可以无需区块链系统中的所有节点设备生成区块,也无需区块链系统中大多数节点设备对生成的区块达成共识后,再进行验证是否可以存储交易数据,仅通过代表节点设备生成区块、共识区块以及非代表节点设备完成验证,即可将交易数据记录在区块链系统中,从而提高了区块链系统的工作效率。
进一步地,为了体现该区块链系统选举代表节点设备的过程,在此用一个具体的实施例来描述如下:
图2是本申请实施例提供的一种代表节点设备选举方法流程图,参见图2,本申请实施例提供的方法流程包括:
S201、第一节点设备向目标服务器发送候选申请请求,该候选申请请求携带该第一节点设备的资质信息。
其中,该第一节点设备为区块链系统中的任一节点设备。该目标服务器为该区块链系统中的一个或多个服务器,也可以为区块链系统外的一个或多个服务器,该目标服务器可以配置至少一个终端设备,作为审核方的用户可以通过登录终端设备,来对区块链系统中的节点设备进行资质审核。可以理解的是,目标服务器可以为区块链系统中的任一个节点设备;或,目标服务器为与该区块链系统关联的第三方机构的服务器。
该第一节点设备向目标服务器发送候选申请请求,以便该目标服务器可以基于该候选申请请求中携带的资质信息,对该第一节点设备进行资质审核,审核该第一节点设备能否成为候选节点设备。
该候选申请请求所携带的该第一节点设备的资质信息可以是以下三个资质中的任一项:该第一节点设备的设备性能;该节点设备已向该目标服务器缴纳预设数目的保证金;该第一节点设备对应的用户账号的信用值。当然,该资质信息也可以包括其他内容,本实施例对此不进行限定。
需要说明的是,如果该区块链系统当前处于第一次选举的过程中,那么该第一节点设备可以是非代表节点设备,如果该区块链系统当前的选举过程不是第一次选举过程,则该第一节点设备是任一个普通节点设备,也即是,该第一节点设备即不是代表节点设备,也不是候选节点设备。
S202、该目标服务器接收到候选申请请求后,对该第一节点设备进行资质审核,当该第一节点设备符合候选节点设备的资质要求时生成凭据数据。
此时所述第一节点设备可以称为第一目标节点设备,也即是,当该第一目标节点设备符合候选节点设备的资质要求时,生成凭据数据,所述凭据数据可以用于指示第一目标节点设备符合候选节点设备的资质要求。
该目标服务器接收到候选申请请求后,可以将该候选申请请求中携带的资质信息,发送至该目标服务器上配置的至少一个终端设备上,以便用户可以通过终端设备对该节点设备进行资质审核。
该资质审核的过程包括:当该资质信息符合候选节点设备的资质要求时,即审核通过,例如,该资质信息为该节点设备的设备性能符合预设性能条件,即审核通过;或者该资质信息为该节点设备已缴纳预设数目的保证金,即审核通过;又或者该资质信息为该节点设备对应的用户的信用达到预设信用条件,即审核通过。当该第一节点设备通过资质审核,意味着该第一节点设备具有成为候选节点设备的潜质。可以理解的是,第一目标节点设备可以是区块链系统中的任意一个节点设备,第一目标节点设备符合候选节点设备的资质要求,第一目标节点设备可以是该第一节点设备。
当对该第一节点设备(第一目标节点设备)的资质审核通过时,终端设备上会生成凭据数据,该凭据数据可以包括同意标识、凭据生成时间、凭据有效期以及该用户的签名,可以理解的是,该目标服务器接收到候选申请请求后,可以将该候选申请请求中携带的资质信息,发送至该目标服务器上配置的多个终端设备上,以便多个用户可以通过终端设备对该节点设备进行资质审核。进而,凭据数据可以包括多个同意标识、多个凭据生成时间、多个 凭据有效期以及多个用户的签名。其中,该同意标识是指该用户同意该第一节点设备成为候选节点设备的标识,该有效期可以用作对凭据数据的有效性验证,避免非候选节点设备利用恶意获取到的凭据数据,成为代表节点设备,签名是用户对该资质信息的签名。当对该第一节点设备的资质审核没有通过时,终端设备可以不生成凭据数据。终端设备将生成的凭据数据发送至该目标服务器,该目标服务器基于所有凭据数据,汇总成一份凭据数据。当然,该终端设备还可以仅向目标服务器反馈审核结果,由目标服务器根据参与审核的终端设备的审核结果,来生成凭据数据。
需要注意的是,该目标服务器也可以自己对该第一节点设备进行资质审核。当第一节点设备通过该目标服务器的资质审核时,该目标服务器上生成凭据数据,该凭据数据包括:同意标识、凭据时间、凭据有效期以及该目标服务器的签名,该签名是指,该目标服务器利用自己的私钥,对该第一节点设备的资质信息的签名。
该目标服务器可以采用线下审核或线上审核的方式,在采用线下审核方式时,不会影响到该目标服务器线上的操作,且可以基于人工来对资质信息进行梳理和分析等过程,可以提高审核的效力和可信度,而在采用线上审核方式时,可以提高审核的实时性,降低人力成本。
S203、该目标服务器向该第一节点设备发送该凭据数据。
该目标服务器向该第一节点设备发送凭据数据,以便该第一节点设备可以基于该凭据数据,在区块链系统中发起新增候选者交易。
S204、该第一节点设备基于该凭据数据,在该区块链系统中广播新增候选者交易数据,该新增候选者交易数据包括该凭据数据以及候选节点设备列表。所述候选节点设备列表包括多个第一目标节点设备,该凭据数据包括多个第一目标节点设备对应的凭据数据。
该第一节点设备在区块链系统中发起新增候选者交易,以便该第一节点设备可以成为候选节点设备。该广播可以使得区块链系统中的所有节点设备均接收到该新增候选者交易数据。
在本申请实施例中,是以第一节点设备申请成为候选节点设备,并由第一节点设备发送新增候选者交易数据为例进行说明,而在一些实施例中,发送该新增候选者交易数据的节点设备可以是区块链系统中的任一个节点设 备,接收到新增候选者交易数据的节点设备可以是区块链系统中的任一个节点设备,本申请实施例在此不做限定。
S205、各个第二节点设备接收该新增候选者交易数据。
其中,第二节点设备为除第一节点设备以外的节点设备,需要说明的是,本申请实施例所涉及的“第一”“第二”“第三”等定语均不用于对节点设备的功能进行区分,而仅仅是区分不同节点设备。
S206、当该区块链系统中的多个节点设备对该新增候选者交易数据共识通过时,该区块链系统中的多个节点设备将该新增候选者交易数据存储至该区块链系统的目标区块链中。
本申请实施例的多个节点设备对该新增候选者交易数据共识通过,可以是指区块链系统中的多个代表节点设备对该新增候选者交易数据共识通过。其中,区块链系统中的多个代表节点设备具体可以是第二节点设备中的多个代表节点设备。而多个代表节点设备对该新增候选者交易数据进行验证时,可以采取下述至少一种验证方式:
(1)代表节点设备基于该凭据数据中是否具有预设数目的同意标识,来验证该新增候选者交易数据的有效性,当该凭据数据中具有预设数目的同意标识时,则该代表节点设备确定该新增候选者交易数据有效,当多个代表节点设备中确定该新增候选者交易数据有效的代表节点设备符合预设共识通过条件,即共识通过。该预设共识通过条件可以为所有代表节点设备均确定有效或所有代表节点设备中预设数目或预设比例的代表节点设备确定有效,本申请实施例对此不做限定。
(2)代表节点设备基于该凭据数据中的有效期,来验证该新增候选者交易数据的有效性,即当该凭据数据的有效期未超期时,则该代表节点设备认为该新增候选者交易数据有效,当多个代表节点设备认为该新增候选者交易数据有效,即共识通过。需要说明的是,凭据数据中可能包含多个有效期,而各个有效期代表的时间段可能不一致,可以采用多个有效期中的最早到期的有效期为准,来判断该新增候选者交易数据是否有效。
需要说明的是,对于第一次进行选举的区块链系统来说,预设的初期代表节点设备可以作为本次参与共识过程的节点设备,后续在选举出多个代表节点设备后,该选举得到的多个代表节点设备可以切换至代表节点设备的运 行状态,来参与整个区块链系统的共识和生成区块过程,而未被选举为代表节点设备的节点设备则运行于非代表节点设备的状态,不参与整个区块链系统的共识和生成区块过程。
上述步骤S201至S206为根据目标服务器对区块链中的节点设备进行资质审核,以确定该区块链系统中的多个候选节点设备的过程。
此时,整个区块链系统中的任一节点设备均知道第一目标节点设备作为候选节点设备的身份,那么在该区块链系统中,可以对该新增候选者交易数据中指示的多个候选节点设备,也即是多个第一目标节点设备,进行选举,以选举出代表节点设备。
区块链中的任意节点设备均可以根据所述目标区块链上已存储的新增候选者交易数据,进行代表节点设备的选举过程。
那么具体的选举过程,可以如下描述:
S207、第一节点设备接收用户的投票交易数据。
该区块链系统中的交易数据类型可以包括投票交易数据和其他交易数据,而该投票交易数据可以基于用户在区块链系统中的投票目标生成,该投票交易数据可以包括:交易类型、被投票节点设备列表以及投票用户私钥签名等。
需要说明的是,在本实施例中,用户的投票目标为该区块链系统中存储的候选节点设备。
需要注意的是,在本申请实施例中,是以用户通过登录该第一节点设备进行投票,选举出代表节点设备为例,选举代表节点设备的过程,也可以是用户通过登录该区块链系统的其他节点设备,进行投票,在此本申请不做具体限定。
S208、第一节点设备在区块链系统中广播该投票交易数据。
S209、各个第二节点设备接收到投票交易数据。
S210、各个第二节点设备接收到该对候选节点设备的投票交易数据,当该区块链系统中的多个节点设备对该投票交易数据共识通过时,将该投票交易数据存储至该区块链系统的目标区块链中。
本申请实施例的多个节点设备对投票交易数据共识通过时,可以是指区块链系统中的正在工作的多个代表节点设备对该投票交易数据共识通过。
S211、当已生成的区块数达到第二预设数目时,第一节点设备从该目标区块链的各个区块中,确定多个第一区块,该多个第一区块用于存储各个候选节点设备的投票交易数据。
在该步骤S211中,第一节点设备可以从该目标区块链的各个区块中,基于投票交易类型进行查询,得到存储有该投票交易类型的区块,作为第一区块。
在本申请实施例中,可以在整个区块链系统的运行过程中进行多次选举,以避免由于某个代表节点设备发生状况所造成的系统运行问题,例如,某个代表节点设备可能会设备运行不正常或是信用有问题等,从而可以保证基于代表节点设备的区块链系统的稳定运行。
当已生成的区块达到第二预设数目时才进行一次选举的方式,可以保证代表节点设备的切换时长,即多久切换一次代表节点设备,从而可以避免频繁切换代表节点设备,影响整个区块链系统的正常运行。需要说明的是,该已生成区块为上次选举之后生成的区块。
可以理解的是,该已生成的区块不仅包含基于投票交易数据生成的区块,还包括基于其他交易数据生成的区块,当然,还可以包含基于投票交易数据以及其他交易数据生成的区块,本申请实施例对此不做赘述。
需要说明的是,区块链系统中的各个节点设备均会执行上述步骤S211的过程,本申请实施例对此不做赘述。
S212、第一节点设备根据该多个第一区块中所存储的投票交易数据,确定该区块链系统中各个候选节点设备的票数。
投票交易数据包括交易类型、被投票节点设备列表以及投票用户私钥签名等,因此,对于每个第一区块中所存储的投票交易数据,可以统计出哪个节点设备得到了多少票数。
在本申请实施例中,区块链系统中的投票方式可以是增量投票的方式,增量投票是指在投票交易中指明被投票的节点设备,并保留历史投票结果。例如用户已经对A、B和C三个节点设备投票,本次投票对象为D节点设备,那么在本次投票时,可以直接对D节点设备投票,其投票交易数据中的被投票节点设备列表中应携带该D节点设备的设备公钥,也即是,该用户通过多轮投票,对A、B、C和D四个节点设备进行了投票。
基于上述增量投票的方式,也可以对被投票的节点设备进行撤票,例如用户已经对A、B和C三个节点设备投票,下次若想撤掉对C节点设备的投票,那么在下一次投票时,可以直接在投票交易数据中指出撤回对C节点设备的投票。
需要说明的是,在投票以及对投票进行统计时也可以采用其他方式,在此本申请不做具体限定。
上述步骤S211至S212实际上是对如何获取各个候选节点设备对应的投票交易数据的示例,该过程也可以采用其他方式,在此本申请不做具体限定。
S213、第一节点设备按照票数从高到低,确定选举结果,该选举结果包括该区块链系统中的第三预设数目的代表节点设备的公钥和各个代表节点设备的票数。
该第三预设数目可以和当前正在工作的代表节点设备的数目保持一致,也即是通过该第三预设数目的设置,可以保证当前工作的代表节点设备可以被选举出代表节点设备全部切换掉。当然,该第三预设数目也可以进行变更,例如,该第三预设数目可以根据区块链系统中节点设备的数量变化进行变更,当节点设备的数量增大时,该第三预设数目可以增大。
值得注意的是,该第一节点设备可以根据自己确定的选举结果,确定自己是否是本次新选举的代表节点设备,也即是该区块链系统中的任一节点设备,都可以根据自己统计的选举结果,来确定自己是否是本次新选举的代表节点设备,以及其他本次新选举的代表节点设备的身份。
上述步骤S212至S213为第一节点设备根据该多个候选节点设备的票数,确定该区块链系统中的多个代表节点设备的过程的一种实施方式,也即是,根据该多个第一区块中所存储的投票交易数据,确定该区块链系统中的第三预设数目的代表节点设备的过程。当然,也可以采用其他选举方式,在此本申请不做具体限定。
S214、当前工作的代表节点设备切换至候选节点设备状态运行,本次新选举的代表节点设备切换至代表节点设备状态运行。
上述步骤S207至S214,是该区块链系统选举代表节点设备的过程,该区块链系统也可以删除该候选节点设备,具体的删除过程,可以描述如下:
S215、任一候选节点设备在该区块链系统中广播删除候选者交易数据, 该删除候选者交易数据用于指示该候选节点设备退出选举。
此时,具备候选节点设备资质要求的节点设备中退出选举的候选节点设备可以称为第二目标节点设备。也即是,所述删除候选者交易数据用于指示将所述第一目标节点设备从候选节点设备中删除
当任一个候选节点设备不再想被选举为代表节点设备时,可以在区块链系统中发起删除候选者交易,也即是,广播候选者交易数据,以便各个节点设备在接收到该交易数据时,能够在下一次选举中不再为该候选节点设备进行投票。
S216、各节点设备接收到该删除候选者交易数据。
S217、当该区块链系统中的多个节点设备对该删除候选者交易数据共识通过时,该区块链系统中的多个节点设备将该删除候选者交易数据存储至该目标区块链中。
需要说明的是,当该区块链系统中正在工作的代表节点设备,对该删除候选者交易数据共识通过后,可以由代表节点设备对该删除候选者交易数据进行打包并生成区块,将区块发给各个非代表节点设备,由非代表节点设备将该删除候选者交易数据存储至该非代表节点设备配置的区块链中,从而达到该区块链系统中的各个节点设备共同维护一个候选节点设备列表的目的,那么在下次选举中,该候选节点设备就会失去后选资格,用户将不会对其进行投票。
S218、该第二目标节点设备切换至普通节点设备状态运行。
如果该第二目标节点设备为了成为代表节点设备,向目标服务器缴纳过保证金,此时该第二目标节点设备已经切换至普通节点设备,意味着该第二目标节点设备不会成为代表节点设备,那么该目标服务器需要原路径退还该候选节点设备设备缴纳的保证金。也即是,该方法还包括:接收目标交易数据,该目标交易数据用于将保证金退还至该第二目标节点设备的账户中。该目标交易数据可以是目标服务器作为区块链系统中的一个节点设备来发起,也可以是由目标服务器通过区块链系统中的任一个节点设备来发起,本申请实施例对此不做限定。
上述步骤S215至S218为候选节点设备的删除过程,可以发生于于区块链系统存在候选节点设备的任何时间段,对此本实施例不进行具体限定。另 外删除候选节点设备也可以采取其他删除方式,对此本实施例也不做具体限定。
本申请实施例提供的方法,通过目标服务器对区块链系统中的节点设备进行资质审核,并基于审核结果,向被审核的节点设备发送凭据数据,以证明该节点设备可以成为候选节点设备,该节点设备可以基于该凭据数据在该区块链系统中发起新增候选者交易,进而根据预设规则,确定候选节点设备,那么该区块链系统就可以从这些候选节点设备中选举出代表节点设备,从而不需要从该区块链系统中的所有节点设备中选举出代表节点设备,仅从候选节点设备中进行选举即可,提高了该区块链系统选举代表节点设备的选举效率。
进一步地,在选举过程中,间隔生成第二预设数目区块的时间,才进行统计区块链系统中各个节点设备的票数,进而选举出代表节点设备,该方式可以控制代表节点设备的切换时长,保证了代表节点设备的切换时长,可以使得代表节点设备不会频繁切换,使得区块链系统可以正常运作。由代表节点设备来代替区块链系统的全部节点设备进行生成区块以及对区块进行共识等工作,不仅避免了所有节点设备均执行上述过程,大大提高了区块链系统的工作效率,而且还保证了代表节点设备的资质,使得区块链系统可以更加高效地运行。另外,删除不满足资质要求的候选节点设备,可以进一步提高代表节点设备的资质,进而提高代表节点设备的工作效率。
在上述实施例中,采用一个目标服务器来审核区块链系统中的节点设备,而在一些实施例中,可以采用多个目标服务器来审核区块链系统中的节点设备,如以下描述:
图3是本申请实施例提供的一种节点设备的资质审核的过程流程图,参见图3,本实施例的方法流程包括:
S301、第一节点设备向目标服务器A1至An发送候选申请请求,该候选申请请求携带该第一节点设备的资质信息。
该目标服务器A1至An用于对区块链系统中的节点设备进行资质审核,需要目标服务器A1至An进行验证且验证通过,即可以确定该第一节点设备可以作为候选节点设备。本申请实施例仅以由多个目标服务器共同进行资质审核为例进行说明,在该实施例中,该步骤S301可以有两种实现方式:
第一种实现方式:第一节点设备将该候选申请请求发送至多个目标服务器中的一个目标服务器,该一个目标服务器将该候选申请请求发送给其他目标服务器,以便其他目标服务器可以接收到该候选申请请求。
第二种实现方式:当第一节点设备将该候选申请请求发送至该多个目标服务器中的全部目标服务器,以便全部目标服务器均能接收该候选申请请求,当然,该第一节点设备还可以向部分目标服务器发送该候选申请请求,并由该部分目标服务器将接收到的候选申请请求转发至其他目标服务器,以便其他目标服务器可以接收到该候选申请请求,对具体采用哪种发送方式,本申请实施例不做具体限定。
该候选申请请求是指,该第一节点设备向任一目标服务器申请成为候选节点设备的请求,该候选申请请求所携带的该第一节点设备的资质信息可以是以下三个资质中的任一项:该第一节点设备的设备性能;该节点设备已向该目标服务器缴纳预设数目的保证金;该第一节点设备对应的用户账号的信用值。当然,该资质信息也可以包括其他内容,本实施例对此不进行限定。
S302、该目标服务器A1至An接收到候选申请请求后,分别对该第一节点设备进行资质审核,生成凭据数据。
当目标服务器A1至An,对该第一节点设备的资质信息审核后,对该资质信息通过的目标服务器,会分别生成凭据交易数据。该凭据数据可以包括同意标识、凭据时间、凭据有效期以及该目标服务器的签名,其中,该同意标识是指,该目标服务器同意该第一节点设备成为候选节点设备的标识,该有效期可以避免非候选节点设备利用过期的凭据数据,成为代表节点设备,签名是该目标服务器采用自己的私钥,对资质信息的签名。需要注意的是,该目标服务器生成的凭据数据,也可以是基于与目标服务器关联的终端设备的审核结果生成的凭据数据,例如步骤S202,本申请实施例在此不做赘述。
S303、多个目标服务器分别向第一节点设备发送凭据数据,该多个目标服务器为审核方的服务器。
多个目标服务器分别向该第一节点设备发送凭据数据,以便该第一节点设备接收到该凭据数据,并基于该凭据数据向区块链系统发起新增候选者交易。
而在一些实施例中,可以从该多个目标服务器中筛选出一个目标服务器, 其他审核通过的目标服务器可以将自己生成的凭据数据,发送至该目标服务器,该目标服务器将所有的凭据汇总成一份凭据数据,并将该凭据数据发送至该第一节点设备。
S304、该第一节点设备基于接收到的凭据数据,在该区块链系统中广播该新增候选者交易数据,该新增候选者交易数据包括该凭据数据以及候选节点设备列表。
该第一节点设备向该区块链系统的任一节点设备发起新增候选者交易,以便该第一节点设备可以成为候选节点设备。
上述步骤S301至S304,为多个目标服务器来审核节点设备是否具有成为候选节点设备的资质的过程,该第一节点设备成为候选节点设备的过程以及选举该区块链系统中的代表节点设备的过程,见步骤S205至S218,在此不再赘述。
本实施例通过多个目标服务器来审核区块链系统的节点设备,可以防止某个目标服务器出现故障,而无法正常审核,并且通过多个目标服务器审核的节点设备的资质,更具有可靠性。
上述所有可选技术方案,可以采用任意结合形成本申请的可选实施例,在此不再一一赘述。
图4是本申请实施例提供的一种代表节点设备的选举装置结构示意图,参见图4,包括第一接收模块401、第一存储模块402和选举模块403。
其中,第一接收模401与第一存储模块402连接,用于接收新增候选者交易数据,所述新增候选者交易数据携带凭据数据,所述凭据数据用于指示第一目标节点设备符合候选节点设备的资质要求;
第一存储模块402与选举模块403连接,用于当该区块链系统中多个节点设备对该新增候选者交易数据共识通过时,将该新增候选者交易数据存储至该区块链系统的目标区块链上;
选举模块403用于根据所述目标区块链上已存储的新增候选者交易数据候选节点设备交易数据,进行对代表节点设备的选举过程。
在一个实施例中,该凭据数据包括多个审核用户的签名数据。
在一个实施例中,该装置还包括:
发送模块,用于向目标服务器发送候选申请请求,该候选申请请求携带该节点设备的资质信息。
在一个实施例中,该目标服务器为该区块链系统中的任一个节点设备;或,
该目标服务器为与该区块链系统关联的第三方机构的服务器。
在一个实施例中,该第一目标节点设备符合下述至少一项条件:
目标节点设备的设备性能符合预设性能条件;
该目标节点设备已缴纳预设数目的保证金;
该目标节点设备对应的用户的信用达到预设信用条件。
在一个实施例中,该区块链系统中多个节点设备对该新增候选者交易数据共识通过是指:该区块链系统中的多个代表节点设备对该新增候选者交易数据共识通过。
在一个实施例中,该装置,还包括:
第二接收模块,用于接收删除候选者交易数据,所述删除候选者交易数据用于指示将第二目标节点设备从候选节点设备中删除;
第二存储模块,用于当该区块链系统中多个节点设备对该删除候选者交易数据共识通过时,将该删除候选者交易数据存储至该区块链系统的目标区块链上。
在一个实施例中,该装置还包括:
第三接收模块,用于接收目标交易数据,该目标交易数据用于将保证金退还至该第二目标节点设备的账户中。
本申请实施例提供的装置,通过审核方对区块链系统中的节点设备进行资质审核,并基于审核结果,向被审核的节点设备发送凭据数据,以证明该节点设备能否成为候选节点设备,该节点设备可以凭借凭据数据在该区块链系统中发起新增候选者交易,进而根据预设规则,确定候选节点设备,那么该区块链系统就可以从这些候选节点设备中选举出代表节点设备,从而避免从区块链系统中的所有节点设备中选举出代表节点设备,仅从候选节点设备进行选举即可,提高了该区块链系统选举代表节点设备的选举效率。
图5是本申请实施例提供的一种服务器的结构示意图,该服务器500可 因配置或性能不同而产生比较大的差异,可以包括一个或一个以上处理器(central processing units,CPU)501和一个或一个以上的存储器502。其中,该存储器502中存储有计算机可读指令,计算机可读指令由该处理器501加载并执行以实现上述各个方法实施例提供的方法。当然,该服务器还可以具有有线或无线网络接口、键盘以及输入输出接口等部件,以便进行输入输出,该服务器还可以包括其他用于实现设备功能的部件,在此不做赘述。
在示例性实施例中,还提供了一种计算机可读存储介质,例如包括指令的存储器,上述指令可由终端中的处理器执行以完成上述实施例中的代表节点设备选举方法。例如,该计算机可读存储介质可以是ROM(read-only memory,只读存储器)、RAM(random access memory,随机存取存储器)、CD-ROM(compact discread-only memory,只读光盘)、磁带、软盘和光数据存储设备等。
本领域普通技术人员可以理解实现上述实施例的全部或部分步骤可以通过硬件来完成,也可以通过程序来指令相关的硬件完成,该程序可以存储于一种计算机可读存储介质中,上述提到的存储介质可以是只读存储器,磁盘或光盘等。
上述仅为本申请的较佳实施例,并不用以限制本申请,凡在本申请的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本申请的保护范围之内。

Claims (20)

  1. 一种代表节点设备选举方法,由第一节点设备执行,所述第一节点设备为区块链系统中的任一节点设备,所述方法包括:
    接收新增候选者交易数据,所述新增候选者交易数据携带凭据数据,所述凭据数据用于指示所述第一节点设备符合候选节点设备的资质要求;
    当所述区块链系统中多个节点设备对所述新增候选者交易数据共识通过时,将所述新增候选者交易数据存储至所述区块链系统的目标区块链上;及
    根据所述目标区块链上已存储的所述新增候选者交易数据,进行代表节点设备的选举过程。
  2. 根据权利要求1所述的方法,其特征在于,所述凭据数据包括多个审核用户的签名数据。
  3. 根据权利要求1所述的方法,其特征在于,所述接收新增候选者交易数据之前,所述方法还包括:
    向目标服务器发送候选申请请求,所述候选申请请求携带所述第一节点设备的资质信息。
  4. 根据权利要求3所述的方法,其特征在于,所述目标服务器为所述区块链系统中的任一个节点设备;或,
    所述目标服务器为与所述区块链系统关联的第三方机构的服务器。
  5. 根据权利要求1所述的方法,其特征在于,所述第一节点设备符合候选节点设备的资质要求包括:所述第一节点设备的设备性能符合预设性能条件、所述第一节点设备已缴纳预设数目的保证金、及所述第一节点设备对应的用户的信用达到预设信用条件中的至少一种。
  6. 根据权利要求1所述的方法,其特征在于,所述区块链系统中多个节点设备对所述新增候选者交易数据共识通过是指:所述区块链系统中的多个代表节点设备对所述新增候选者交易数据共识通过。
  7. 根据权利要求1所述的方法,其特征在于,所述当所述区块链系统中多个节点设备对所述新增候选者交易数据共识通过时,将所述新增候选者交易数据存储至所述区块链系统的目标区块链上,包括:
    基于所述凭据数据,在所述区块链系统中广播所述新增候选者交易数据;所述新增候选者交易数据包括所述凭据数据以及候选节点设备列表;
    通过各第二节点设备接收所述新增候选者交易数据;所述第二节点设备是所述区块链系统中除所述第一节点设备外的节点设备;及
    当所述第二节点设备中的多个代表节点设备对所述新增候选者交易数据共识通过时,将所述新增候选者交易数据存储至所述区块链系统的目标区块链上。
  8. 根据权利要求1所述的方法,其特征在于,所述将所述新增候选者交易数据存储至所述区块链系统的目标区块链上之后,所述方法还包括:
    接收删除候选者交易数据,所述删除候选者交易数据用于指示将第二目标节点设备从候选节点设备中删除;及
    当所述区块链系统中多个节点设备对所述删除候选者交易数据共识通过时,将所述删除候选者交易数据存储至所述区块链系统的目标区块链上。
  9. 根据权利要求8所述的方法,其特征在于,所述将所述删除候选者交易数据存储至所述区块链系统的目标区块链上之后,所述方法还包括:
    接收目标交易数据,所述目标交易数据用于将保证金退还至所述第二目标节点设备的账户中。
  10. 一种代表节点设备选举装置,其特征在于,所述装置包括:
    接收模块,用于接收新增候选者交易数据,所述新增候选者交易数据携带凭据数据,所述凭据数据用于指示所述第一节点设备符合候选节点设备的资质要求;
    存储模块,用于当所述区块链系统中多个节点设备对所述新增候选者交易数据共识通过时,将所述新增候选者交易数据存储至所述区块链系统的目标区块链上;及
    选举模块,用于根据所述目标区块链上已存储的所述新增候选者交易数据,进行代表节点设备的选举过程。
  11. 根据权利要求10所述的装置,其特征在于,所述凭据数据包括多个审核用户的签名数据。
  12. 根据权利要求10所述的装置,其特征在于,所述装置还包括:
    发送模块,用于向目标服务器发送候选申请请求,所述候选申请请求携带所述第一节点设备的资质信息。
  13. 根据权利要求12所述的装置,其特征在于,所述目标服务器为所述 区块链系统中的任一个节点设备;或,
    所述目标服务器为与所述区块链系统关联的第三方机构的服务器。
  14. 根据权利要求10所述的装置,其特征在于,所述第一节点设备符合候选节点设备的资质要求包括:所述第一节点设备的设备性能符合预设性能条件、所述第一节点设备已缴纳预设数目的保证金、及所述第一节点设备对应的用户的信用达到预设信用条件中的至少一种。
  15. 根据权利要求10所述的装置,其特征在于,所述区块链系统中多个节点设备对所述新增候选者交易数据共识通过是指:所述区块链系统中的多个代表节点设备对所述新增候选者交易数据共识通过。
  16. 根据权利要求10所述的装置,其特征在于,所述存储模块还用于基于所述凭据数据,在所述区块链系统中广播所述新增候选者交易数据;所述新增候选者交易数据包括所述凭据数据以及候选节点设备列表;通过各第二节点设备接收所述新增候选者交易数据;所述第二节点设备是所述区块链系统中除所述第一节点设备外的节点设备;及当所述第二节点设备中的多个代表节点设备对所述新增候选者交易数据共识通过时,将所述新增候选者交易数据存储至所述区块链系统的目标区块链上。
  17. 根据权利要求10所述的装置,其特征在于,所述装置还包括:
    第二接收模块,用于接收删除候选者交易数据,所述删除候选者交易数据用于指示将第二目标节点设备从候选节点设备中删除;及
    第二存储模块,用于当所述区块链系统中多个节点设备对所述删除候选者交易数据共识通过时,将所述删除候选者交易数据存储至所述区块链系统的目标区块链上。
  18. 根据权利要求17所述的装置,其特征在于,所述装置还包括:
    第三接收模块,用于接收目标交易数据,所述目标交易数据用于将保证金退还至所述第二目标节点设备的账户中。
  19. 一种计算机设备,其特征在于,所述计算机设备包括处理器和存储器,所述存储器中存储有计算机可读指令,所述计算机可读指令被所述处理器执行时,使得所述处理器执行如权利要求1至9中任一项所述的方法的步骤。
  20. 一种非易失性的计算机可读存储介质,存储有计算机可读指令,所 述计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处理器执行如权利要求1至9中任一项所述的方法的步骤。
PCT/CN2019/104159 2018-09-07 2019-09-03 代表节点设备选举方法、装置、计算机设备及存储介质 Ceased WO2020048440A1 (zh)

Priority Applications (5)

Application Number Priority Date Filing Date Title
EP19858149.8A EP3848876B1 (en) 2018-09-07 2019-09-03 Election method and apparatus for representative node device, computer device, and storage medium
SG11202010921PA SG11202010921PA (en) 2018-09-07 2019-09-03 Election method and apparatus for representative node device, computer device, and storage medium
JP2020551312A JP7038228B2 (ja) 2018-09-07 2019-09-03 代表ノード機器の選出方法、装置、コンピュータ機器及びコンピュータプログラム
KR1020207033831A KR102449463B1 (ko) 2018-09-07 2019-09-03 대표적인 노드 디바이스의 선출 방법 및 장치, 컴퓨터 디바이스, 및 저장 매체
US17/066,482 US12367500B2 (en) 2018-09-07 2020-10-08 Method and apparatus for electing representative node device, computer device, and storage medium

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201811046270.0A CN109034813B (zh) 2018-09-07 2018-09-07 代表节点设备选举方法、装置、计算机设备及存储介质
CN201811046270.0 2018-09-07

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US17/066,482 Continuation US12367500B2 (en) 2018-09-07 2020-10-08 Method and apparatus for electing representative node device, computer device, and storage medium

Publications (1)

Publication Number Publication Date
WO2020048440A1 true WO2020048440A1 (zh) 2020-03-12

Family

ID=64624127

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/104159 Ceased WO2020048440A1 (zh) 2018-09-07 2019-09-03 代表节点设备选举方法、装置、计算机设备及存储介质

Country Status (7)

Country Link
US (1) US12367500B2 (zh)
EP (1) EP3848876B1 (zh)
JP (1) JP7038228B2 (zh)
KR (1) KR102449463B1 (zh)
CN (2) CN109034813B (zh)
SG (1) SG11202010921PA (zh)
WO (1) WO2020048440A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112541763A (zh) * 2020-12-11 2021-03-23 军工保密资格审查认证中心 一种区块链管理器的区块共识审批的方法及装置

Families Citing this family (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109034813B (zh) 2018-09-07 2020-04-21 腾讯科技(深圳)有限公司 代表节点设备选举方法、装置、计算机设备及存储介质
CN109886677B (zh) * 2018-12-29 2021-06-29 创新先进技术有限公司 一种基于区块链的商品购置方法和装置
CN110009347B (zh) * 2019-03-20 2024-05-24 深圳前海微众银行股份有限公司 一种区块链交易信息审计的方法及装置
CN110213368B (zh) * 2019-05-31 2021-07-16 联想(北京)有限公司 数据处理方法、数据处理装置和计算机系统
CN110380847B (zh) * 2019-07-01 2021-11-19 创新先进技术有限公司 一种区块链共识方法和装置
CN110493187A (zh) * 2019-07-10 2019-11-22 布比(北京)网络技术有限公司 一种区块链的验证节点选举方法及系统
CN111292098A (zh) * 2020-01-15 2020-06-16 北京航空航天大学 一种面向可信服务供应链的区块链共识机制构建方法
CN111277496B (zh) * 2020-01-20 2021-11-19 布比(北京)网络技术有限公司 区块链层次化数据交换方法、装置和计算机设备
CN111432014B (zh) * 2020-03-30 2023-05-05 上海玳鸽信息技术有限公司 一种区块链共识算法中主节点选取的方法和装置
CN111582845A (zh) * 2020-04-30 2020-08-25 北京金山云网络技术有限公司 区块链的跨链交易方法、装置以及电子设备
CN111695996B (zh) * 2020-05-12 2024-02-20 成都芯域矩阵科技有限公司 一种基于预交诚意金的区块链共识方法及系统
CN111695997B (zh) * 2020-05-12 2024-02-20 成都芯域矩阵科技有限公司 一种基于节点信用评分和预交诚意金的区块链共识方法及系统
CN112232956B (zh) * 2020-10-16 2024-05-14 中国银联股份有限公司 一种基于区块链的智慧停车的数据处理方法及装置
CN112598843B (zh) * 2020-12-04 2022-11-29 光大科技有限公司 投票数据的处理方法和装置及存储介质
CN113935704A (zh) * 2021-08-27 2022-01-14 中国互联网络信息中心 一种基于区块链的域名滥用审核处置方法及装置
CN115129266B (zh) * 2022-09-01 2023-01-06 北京百度网讯科技有限公司 基于区块链的数据存储方法、装置、设备及存储介质
KR20250016926A (ko) * 2023-07-26 2025-02-04 삼성전자주식회사 생체 정보를 이용하여 다수의 전자 장치에서 사용자를 인증하기 위한 시스템 및 그 제어 방법

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150310424A1 (en) * 2014-04-26 2015-10-29 Michael Myers Cryptographic currency user directory data and enhanced peer-verification ledger synthesis through multi-modal cryptographic key-address mapping
CN106878071A (zh) * 2017-01-25 2017-06-20 上海钜真金融信息服务有限公司 一种基于Raft算法的区块链共识机制
CN107124403A (zh) * 2017-04-14 2017-09-01 朱清明 区块链中共识区块的生成方法与计算设备
CN107395353A (zh) * 2017-04-24 2017-11-24 阿里巴巴集团控股有限公司 一种区块链共识方法及装置
CN108269090A (zh) * 2018-01-19 2018-07-10 中国科学院软件研究所 基于无协商随机抽签的用于区块链系统的共识方法和装置
CN109034813A (zh) * 2018-09-07 2018-12-18 腾讯科技(深圳)有限公司 代表节点设备选举方法、装置、计算机设备及存储介质

Family Cites Families (31)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20020071246A (ko) * 2001-03-05 2002-09-12 엘지전자 주식회사 전자 선거 방법
WO2009008076A1 (ja) * 2007-07-11 2009-01-15 Fujitsu Limited 認証システム、端末認証装置および認証処理プログラム
US20150220928A1 (en) * 2014-01-31 2015-08-06 Robert Allen Platform for the purchase and sale of digital currency
US9836908B2 (en) * 2014-07-25 2017-12-05 Blockchain Technologies Corporation System and method for securely receiving and counting votes in an election
US9875510B1 (en) * 2015-02-03 2018-01-23 Lance Kasper Consensus system for tracking peer-to-peer digital records
CN107145768B (zh) 2016-03-01 2021-02-12 华为技术有限公司 版权管理方法和系统
US10204341B2 (en) * 2016-05-24 2019-02-12 Mastercard International Incorporated Method and system for an efficient consensus mechanism for permissioned blockchains using bloom filters and audit guarantees
US10657526B2 (en) * 2016-10-28 2020-05-19 International Business Machines Corporation System and method to dynamically setup a private sub-blockchain based on agility of transaction processing
WO2018111295A1 (en) 2016-12-16 2018-06-21 Hitachi, Ltd. Blockchain monitoring and management
CN107005574B (zh) * 2016-12-23 2020-08-28 深圳前海达闼云端智能科技有限公司 区块生成方法、装置和区块链网络
US11190360B2 (en) 2016-12-23 2021-11-30 Cloudminds (Shanghai) Robotics Co., Ltd. Method, apparatus, node, signature device and system for generating block of blockchain
KR101837170B1 (ko) * 2016-12-29 2018-04-19 주식회사 코인플러그 영지식 증명 알고리즘을 사용하여 블록체인 기반 비밀 전자 투표 서비스를 제공하기 위한 방법, 및 이를 이용한 투표 코인 발행 서버, 투표 토큰 분배 서버 및 투표 지원 서버
US20180189449A1 (en) * 2017-01-04 2018-07-05 International Business Machines Corporation Tracking items used for providing medical services
JP6827327B2 (ja) * 2017-01-05 2021-02-10 株式会社日立製作所 分散コンピューティングシステム
CN107146087A (zh) * 2017-04-11 2017-09-08 广东网金控股股份有限公司 一种基于区块链联盟链的快速共识记账方法及系统
CN107341660B (zh) * 2017-05-27 2021-06-29 唐盛(北京)物联技术有限公司 一种区块链底层共识机制以及基于该共识机制的区块链系统
CN107360248B (zh) * 2017-07-31 2020-08-25 众安信息技术服务有限公司 用于配置局部共识的方法和装置及计算机可读存储介质
GB201713031D0 (en) * 2017-08-14 2017-09-27 Nchain Holdings Ltd Computer-implemented system and method
CN107579848B (zh) * 2017-08-30 2020-08-25 上海保险交易所股份有限公司 实用拜占庭容错共识机制中动态更改共识节点的方法
CN108009918B (zh) * 2017-11-23 2021-10-26 深圳捷汇科技有限公司 区块链共识算法交易系统的记账方法及电子设备
US11475000B2 (en) * 2017-11-30 2022-10-18 International Business Machines Corporation Aggregation in dynamic and distributed computing systems
CN108134706B (zh) * 2018-01-02 2020-08-18 中国工商银行股份有限公司 区块链多活高可用系统、计算机设备以及方法
US11488433B2 (en) * 2018-01-11 2022-11-01 Mastercard International Incorporated Method and system for public elections on a moderated blockchain
US10681020B2 (en) * 2018-03-12 2020-06-09 The Boeing Company Blockchain fortified aircraft communications addressing and reporting system (ACARS) communication
CN108848055B (zh) * 2018-05-03 2020-06-23 中国银联股份有限公司 一种区块链共识方法、记账节点及节点
US11483129B2 (en) * 2018-05-09 2022-10-25 Hefei Dappworks Technology Co., Ltd. Method and apparatus for reaching blockchain consensus
US20210209885A1 (en) * 2018-05-23 2021-07-08 Centiglobe Ab A system and a method for achieving consensus between multiple parties on an event
GB201811672D0 (en) * 2018-07-17 2018-08-29 Nchain Holdings Ltd Computer-implemented system and method
US11030841B2 (en) * 2018-08-28 2021-06-08 Escapex Limited Decentralized talent discovery via blockchain
US11468216B2 (en) * 2018-08-28 2022-10-11 Linecraft Ai Limited Method for building a model of a physical system
CN111124643A (zh) 2019-12-20 2020-05-08 浪潮电子信息产业股份有限公司 一种分布式存储中的删除任务调度方法、系统及相关装置

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150310424A1 (en) * 2014-04-26 2015-10-29 Michael Myers Cryptographic currency user directory data and enhanced peer-verification ledger synthesis through multi-modal cryptographic key-address mapping
CN106878071A (zh) * 2017-01-25 2017-06-20 上海钜真金融信息服务有限公司 一种基于Raft算法的区块链共识机制
CN107124403A (zh) * 2017-04-14 2017-09-01 朱清明 区块链中共识区块的生成方法与计算设备
CN107395353A (zh) * 2017-04-24 2017-11-24 阿里巴巴集团控股有限公司 一种区块链共识方法及装置
CN108269090A (zh) * 2018-01-19 2018-07-10 中国科学院软件研究所 基于无协商随机抽签的用于区块链系统的共识方法和装置
CN109034813A (zh) * 2018-09-07 2018-12-18 腾讯科技(深圳)有限公司 代表节点设备选举方法、装置、计算机设备及存储介质

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP3848876A4

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112541763A (zh) * 2020-12-11 2021-03-23 军工保密资格审查认证中心 一种区块链管理器的区块共识审批的方法及装置
CN112541763B (zh) * 2020-12-11 2024-04-30 军工保密资格审查认证中心 一种区块链管理器的区块共识审批的方法及装置

Also Published As

Publication number Publication date
EP3848876B1 (en) 2025-11-26
KR20210005679A (ko) 2021-01-14
CN110443614A (zh) 2019-11-12
SG11202010921PA (en) 2020-12-30
US12367500B2 (en) 2025-07-22
CN109034813A (zh) 2018-12-18
JP2021516822A (ja) 2021-07-08
JP7038228B2 (ja) 2022-03-17
EP3848876A4 (en) 2021-10-27
CN109034813B (zh) 2020-04-21
CN110443614B (zh) 2021-04-09
EP3848876A1 (en) 2021-07-14
KR102449463B1 (ko) 2022-09-30
US20210027310A1 (en) 2021-01-28

Similar Documents

Publication Publication Date Title
WO2020048440A1 (zh) 代表节点设备选举方法、装置、计算机设备及存储介质
US11792006B2 (en) Method and apparatus for electing representative node device, computer device, and storage medium
CN115210741B (zh) 部分有序的区块链
CN119398789B (zh) 一种基于供应链金融中的多层次交易安全认证方法
CN106878000B (zh) 一种联盟链共识方法及系统
US11057188B2 (en) Database service token
CN110431577B (zh) 用于检测重放攻击的系统和方法
CN111523890B (zh) 基于区块链的数据处理方法、装置、存储介质及设备
CN110383279A (zh) 用于检测重放攻击的系统和方法
WO2021036545A1 (zh) 一种基于智能合约的数据处理方法、设备及存储介质
US12143400B2 (en) Blockchain-based message processing method and apparatus, device, and storage medium
JP2021521555A (ja) ブロックチェーンコンセンサス方法、アカウンティングノードおよびノード
CN112822267B (zh) 基于区块链的数据处理方法和装置
CN111899019A (zh) 一种黑名单多方交叉验证和共享的方法及系统
CN109167660B (zh) 选举代表节点设备方法、装置、计算机设备及存储介质
US11343313B1 (en) Fault tolerant periodic leader rotation for blockchain
CN112866282B (zh) 区块链中时间信息验证方法和装置
CN110597864A (zh) 一种基于区块链的个人信息管理方法及装置
CN115455460A (zh) 一种基于区块链的数据存储方法、装置、设备及介质
WO2025007540A1 (zh) 一种基于区块链的数据处理方法、装置、设备及介质
CN111556160B (zh) 一种数据资产准入的方法和装置
CN117171812A (zh) 基于区块链的多源可信数据生产方法、区块链节点及系统
HK40015595B (zh) 节点设备删除方法、装置、计算机设备及存储介质
HK40015595A (zh) 节点设备删除方法、装置、计算机设备及存储介质
CN121940192A (zh) 基于区块链的服务接口调用方法、装置、设备及存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19858149

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2020551312

Country of ref document: JP

Kind code of ref document: A

ENP Entry into the national phase

Ref document number: 20207033831

Country of ref document: KR

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE

ENP Entry into the national phase

Ref document number: 2019858149

Country of ref document: EP

Effective date: 20210407

WWG Wipo information: grant in national office

Ref document number: 2019858149

Country of ref document: EP