CN111432014A - Method and device for selecting main node in block chain consensus algorithm - Google Patents

Method and device for selecting main node in block chain consensus algorithm Download PDF

Info

Publication number
CN111432014A
CN111432014A CN202010240054.0A CN202010240054A CN111432014A CN 111432014 A CN111432014 A CN 111432014A CN 202010240054 A CN202010240054 A CN 202010240054A CN 111432014 A CN111432014 A CN 111432014A
Authority
CN
China
Prior art keywords
node
growth rate
determining
nodes
integral growth
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.)
Granted
Application number
CN202010240054.0A
Other languages
Chinese (zh)
Other versions
CN111432014B (en
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.)
Shanghai Pigeon Information Technology Co ltd
Original Assignee
Shanghai Pigeon Information Technology 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 Shanghai Pigeon Information Technology Co ltd filed Critical Shanghai Pigeon Information Technology Co ltd
Priority to CN202010240054.0A priority Critical patent/CN111432014B/en
Publication of CN111432014A publication Critical patent/CN111432014A/en
Application granted granted Critical
Publication of CN111432014B publication Critical patent/CN111432014B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange
    • 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
    • H04L2209/00Additional information or applications relating to cryptographic mechanisms or cryptographic arrangements for secret or secure communication H04L9/00
    • H04L2209/46Secure multiparty computation, e.g. millionaire problem
    • H04L2209/463Electronic voting
    • 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
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • Marketing (AREA)
  • Economics (AREA)
  • Development Economics (AREA)
  • Strategic Management (AREA)
  • Technology Law (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention provides a method and a device for selecting a main node in a block chain consensus algorithm, wherein the method comprises the following steps: acquiring the computational power of each node, and determining at least one node meeting the computational power of a preset standard; acquiring an integral growth rate of at least one node, wherein the integral growth rate represents a contribution quantized value to a blockchain system; obtaining the number of votes obtained by at least one node; and determining a final main node according to the calculation power, the integral growth rate, the ticket number, the scoring model and the consensus mechanism of at least one node. The invention balances all election rights decided by voting through three indexes of the computing power of the acquired nodes, the node integral growth rate and the node vote count, enables each candidate node to more fairly compete for the main node, and enables the more capable node to become a block producer, so that the generation mode of the accounting node is more fair, and the effect of bribery election in the election process is reduced.

Description

Method and device for selecting main node in block chain consensus algorithm
Technical Field
The invention relates to the field of block chains, in particular to a method and a device for selecting master nodes in various block chain consensus algorithms.
Background
The block chain link point is commonly called miner. The different power of each miner determines how much billing rights it can allocate and how much rewards it can earn. Miners in the blockchain network, like conventional banks, provide billing services for the user's transactions.
Since all public chains are community autonomous and there is no central leader to make decisions, most community users must agree to maintain the public chains. How this is achieved is by using a consensus mechanism.
The blockchain is a large public ledger, and when the whole system reaches millions of tps per second in the legend, the number of nodes must be reduced, but too few nodes will affect the security of the whole network. The "21 super nodes" solution proposed by EOS designers can just balance the degree of decentralization and the block-out rate. Super nodes are nodes in a blockchain network that collect transaction information and pack the transaction information into blocks, and are also called as "block producers".
In the conventional DPoS consensus algorithm mechanism, a block chain producer node (master node) is directly generated by election. The 2n +1 nodes with the highest tickets of the whole network are responsible for block output. The algorithm is based on voting for node selection purely, and in the actual operation process, the possibilities of low voting rate, cheating election and the like exist, and the fairness of the algorithm is influenced.
Disclosure of Invention
The invention provides a method and a device for selecting a main node in a block chain consensus algorithm, aiming at solving the problems that in the prior art, the voting rate is low, the voting cheat possibility is caused, and the fairness of the algorithm is influenced.
In a first aspect, the present invention provides a method for selecting a master node in a blockchain consensus algorithm, where the method includes:
acquiring the computational power of each node, and determining at least one node meeting the computational power of a preset standard;
acquiring an integral growth rate of at least one node, wherein the integral growth rate represents a contribution quantized value to a blockchain system;
obtaining the number of votes obtained by at least one node;
and determining a final main node according to the calculation power, the integral growth rate, the ticket number, the scoring model and the consensus mechanism of at least one node.
Further, determining a final master node according to the calculation power, the integral growth rate, the vote count, the scoring model and the consensus mechanism of at least one node comprises:
according to the calculation power, the integral growth rate and the number of votes obtained by at least one node, a scoring model is used for determining odd nodes with the numerical ranks higher than the former nodes;
and determining a final main node according to the odd number of nodes and the consensus mechanism.
Further, the scoring model is represented by the following formula:
Figure BDA0002431806330000021
wherein C represents the node calculated force; i represents the integral growth rate of the node; v represents the number of votes obtained by the node;
Figure BDA0002431806330000022
respectively representing the calculation force weight value, the integral growth rate weight value and the ticket number weight value of each node,
Figure BDA0002431806330000023
γ, η, μ, ρ are fixed coefficient values determined after training of the scoring model R, where ρ<1 and ρ ≠ 0.
Further, determining the final master node according to the odd number of nodes and the consensus mechanism comprises:
carrying out election on odd nodes according to the identifiers of the nodes, a preset parameter setting window and a block chain wallet state indication to obtain nodes capable of participating in a consensus mechanism algorithm;
and combining the nodes which can participate in the consensus mechanism algorithm with the consensus mechanism to determine the final main node.
In a second aspect, the present invention provides an apparatus for master node selection in a blockchain consensus algorithm, the apparatus comprising:
the node calculation force obtaining module is used for obtaining calculation force of each node and determining at least one node meeting the calculation force of a preset standard;
a node integral growth rate obtaining module, configured to obtain an integral growth rate of at least one node, where the integral growth rate represents a contribution quantization value to the blockchain system;
the node ticket number obtaining module is used for obtaining the ticket number obtained by at least one node;
and the final main node determining module is used for determining the final main node according to the calculation power, the integral growth rate, the vote count, the scoring model and the consensus mechanism of at least one node.
Further, the final master node determination module includes:
determining odd node units with top ranking, and according to the calculation power, integral growth rate and vote number of at least one node, scoring the model, and determining odd nodes with top ranking of the numerical value obtained by the scoring model;
and the final main node determining unit is used for determining the final main node according to the odd number of nodes and the consensus mechanism.
Further, the scoring model is represented by the following formula:
Figure BDA0002431806330000031
wherein C represents the node calculated force; i represents the integral growth rate of the node; v represents the number of votes obtained by the node;
Figure BDA0002431806330000032
respectively representing the calculation force weight value, the integral growth rate weight value and the ticket number weight value of each node,
Figure BDA0002431806330000033
γ, η, μ, ρ are fixed coefficient values determined after training of the scoring model R, where ρ<1 and ρ ≠ 0.
Further, determining the final master node unit comprises:
determining a node unit participating in the consensus algorithm, wherein the node unit is used for electing odd nodes according to the identifier of the node, a preset parameter setting window and a block chain wallet state indication to obtain nodes capable of participating in the consensus algorithm;
and the consensus mechanism combining unit is used for combining the nodes which can participate in the consensus mechanism algorithm with the consensus mechanism to determine the final main node.
In a third aspect, the present invention provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor executes the computer program to implement the steps of the method for selecting a master node in the block chain consensus algorithm provided in the first aspect.
In a fourth aspect, the present invention provides a non-transitory computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, implements the steps of the method for master node selection in a blockchain consensus algorithm provided in the first aspect.
The invention balances all election rights decided by voting through three indexes of the computing power of the acquired nodes, the node integral growth rate and the node vote count, enables each candidate node to more fairly compete for the main node, and enables the more capable node to become a block producer, so that the generation mode of the accounting node is more fair, and the effect of bribery election in the election process is reduced.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic flow chart illustrating a method for selecting a master node in a block chain consensus algorithm according to an embodiment of the present invention;
fig. 2 is a schematic flow chart of a block chain node pool selection method according to an embodiment of the present invention;
fig. 3 is a block diagram of an apparatus for selecting a master node in a block chain consensus algorithm according to an embodiment of the present invention;
fig. 4 is a block diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only partial embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and claims of this application and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It should be understood that the data so used may be interchanged under appropriate circumstances such that embodiments of the application described herein may be used. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict. The present application will be described in detail below with reference to the embodiments with reference to the attached drawings.
In a traditional DPoS consensus algorithm mechanism, a block chain producer node (a main node) is directly generated by election, the algorithm elects the node purely by voting, and in the actual operation process, the probability of low voting rate, election fraud and the like exists, so that the fairness of the algorithm is influenced. In order to solve the above problem, an embodiment of the present invention provides a method for selecting a master node in a block chain consensus algorithm, where the method includes:
step S101, computing power of each node is obtained, and at least one node meeting preset standard computing power is determined;
step S102, acquiring an integral growth rate of at least one node, wherein the integral growth rate represents a contribution quantized value to a block chain system;
step S103, obtaining the number of votes obtained by at least one node;
and step S104, determining a final main node according to the calculation power, the integral growth rate, the ticket number, the scoring model and the consensus mechanism of at least one node.
Specifically, the calculation power of each node in the block chain system is evaluated, and only the nodes meeting a certain standard calculation power are qualified and qualified to become the final block producer, wherein the specified certain standard calculation power refers to a preset standard calculation power; at least one node that satisfies a predetermined standard computational power is then determined. It should be explained that, in the process of electing a node, there is necessarily more than one node that meets the preset standard computation power, so the embodiment of the present invention uses "at least one node" to define the number of nodes that currently meet the preset standard computation power.
Acquiring integral growth rate of each node in the nodes meeting the preset standard calculation force at present, wherein the integral growth rate represents a contribution quantized value to a block chain system; and obtaining the number of votes obtained by each node in the nodes meeting the calculation force of the preset standard, namely obtaining the voting result. The calculation power, the integral growth rate and the number of votes obtained are used as specific weights, and then the three weight variables are effectively distributed to form three elements required by a final scoring model.
And determining a scoring model result according to the calculation power, the integral growth rate and the number of votes obtained by at least one node, and selecting the top N candidate nodes as block producers of each round after effective sequencing.
And (4) carrying out election again on the candidate nodes of the first N bits, and then combining the elected nodes with a consensus mechanism to determine a final main node.
The embodiment of the invention balances all election rights determined by voting by three indexes of the computing power of the acquired nodes, the node integral growth rate and the node vote count, enables each candidate node to compete for the main node more fairly, and enables the more capable node to become a block producer, so that the generation mode of the accounting node is more fair, and the bribery selection effect in the election process is reduced.
Based on the content of the above embodiments, as an alternative embodiment: determining a final main node according to the calculation power, the integral growth rate, the vote count, the scoring model and the consensus mechanism of at least one node comprises the following steps:
according to the calculation power, the integral growth rate and the number of votes obtained by at least one node, a scoring model is used for determining odd nodes with the numerical ranks higher than the former nodes;
and determining a final main node according to the odd number of nodes and the consensus mechanism.
Specifically, in the embodiment of the invention, the calculation power, the integral growth rate and the number of votes obtained by each node are put into a scoring model to obtain the calculation result of the model, and then odd nodes ranked at the top are selected as a node pool according to scoring and summing to store N candidate nodes. And then electing from the N candidate nodes to obtain nodes which can participate in a consensus mechanism, and finally obtaining a main node, namely a block producer.
Based on the content of the above embodiments, as an alternative embodiment: the scoring model is represented by the following formula:
Figure BDA0002431806330000071
wherein C represents the node calculated force; i represents the integral growth rate of the node; v represents the number of votes obtained by the node;
Figure BDA0002431806330000072
respectively representing the calculation force weight value, the integral growth rate weight value and the ticket number weight value of each node,
Figure BDA0002431806330000073
γ, η, μ, ρ are fixed coefficient values determined after training of the scoring model R, where ρ<1 and ρ ≠ 0.
Specifically, the scoring model in the embodiment of the invention is obtained by selecting a VES function as the scoring model and evolving in an expression form similar to a production function, wherein gamma, η, mu and rho are fixed coefficient values determined after the scoring model R is trained, namely, the values are obtained by continuously training under the condition that the scoring model R is known, and the parameter C, I, V is a variable which is determined according to the obtained specific numerical value and is input into the scoring model R to obtain a corresponding calculation result.
Based on the content of the above embodiments, as an alternative embodiment: determining the final master node according to the odd number of nodes and the consensus mechanism comprises:
carrying out election on odd nodes according to the identifiers of the nodes, a preset parameter setting window and a block chain wallet state indication to obtain nodes capable of participating in a consensus mechanism algorithm;
and combining the nodes which can participate in the consensus mechanism algorithm with the consensus mechanism to determine the final main node.
Specifically, when further election is performed on the obtained odd number of nodes, evaluation can be performed from three aspects:
1. to become a representative, the public key must be registered on the network and then assigned a 32-bit unique identifier that will be referenced by the "header" of each transaction datum validated.
2. Each wallet has a parameter setting window in which the user can select and rank one or more representatives. Once set, each transaction made by the user will transfer the ballot from the "input representative" to the "output representative". Typically, users will not create transactions specifically targeted for voting purposes, as that will cost them a transaction fee. However, in an emergency situation, some users may find it worthwhile to change their vote in a more positive way by paying a fee.
3. Each wallet will display a status indicator to let the user know how their representative is performing. If they miss too many tiles, the system will recommend the user to change to a new representative. If any representative is found to issue an invalid block, all standard wallets will require a new representative to be selected before each wallet can conduct more transactions.
And after obtaining the nodes which can participate in the consensus mechanism algorithm, combining with the consensus mechanism to determine a final main node.
Based on the content of the above embodiments, as an alternative embodiment: as shown in fig. 2, the detailed steps are as follows:
step 1: and starting.
Step 2: evaluating the computing power C of the nodes, wherein only the nodes meeting certain standard computing power are qualified and competent to become final block producers; quantifying the contribution made by the whole block chain system through nodes to obtain an integral growth rate I; and (5) a whole network voting result V.
And step 3: input formula
Figure BDA0002431806330000081
And 4, step 4: a block chain accounting node.
According to another aspect of the present invention, an apparatus for selecting a master node in a blockchain consensus algorithm is provided in an embodiment of the present invention, referring to fig. 3, fig. 3 is a block diagram of an apparatus for selecting a master node in a blockchain consensus algorithm provided in an embodiment of the present invention. The apparatus is used to complete the selection of the master node in the block chain consensus algorithm provided in the embodiments of the present invention in the foregoing embodiments. Therefore, the description and definition in the method for selecting the master node in the blockchain consensus algorithm provided in the embodiments of the present invention in the foregoing embodiments may be used for understanding the execution modules in the embodiments of the present invention.
The device includes:
a node calculation force obtaining module 301, configured to obtain calculation forces of nodes, and determine at least one node that meets a preset standard calculation force;
an obtain node integral growth rate module 302, configured to obtain an integral growth rate of at least one node, where the integral growth rate represents a contribution quantization value to the blockchain system;
a node ticket number obtaining module 303, configured to obtain a ticket number obtained by at least one node;
and a final master node determining module 304, configured to determine a final master node according to the computation power, the integral growth rate, the vote count, the scoring model, and the consensus mechanism of at least one node.
Specifically, the specific process of each module in the apparatus of this embodiment to implement its function may refer to the related description in the corresponding method embodiment, and is not described herein again.
The embodiment of the invention balances all election rights determined by voting by three indexes of the computing power of the acquired nodes, the node integral growth rate and the node vote count, enables each candidate node to compete for the main node more fairly, and enables the more capable node to become a block producer, so that the generation mode of the accounting node is more fair, and the bribery selection effect in the election process is reduced.
Based on the content of the above embodiments, as an alternative embodiment: the final master node determination module includes:
determining odd node units with top ranking, and according to the calculation power, integral growth rate and vote number of at least one node, scoring the model, and determining odd nodes with top ranking of the numerical value obtained by the scoring model;
and the final main node determining unit is used for determining the final main node according to the odd number of nodes and the consensus mechanism.
Specifically, the specific process of each module in the apparatus of this embodiment to implement its function may refer to the related description in the corresponding method embodiment, and is not described herein again.
Based on the content of the above embodiments, as an alternative embodiment: the scoring model is represented by the following formula:
Figure BDA0002431806330000091
wherein C represents the node calculated force; i represents the integral growth rate of the node; v represents the number of votes obtained by the node;
Figure BDA0002431806330000101
respectively representing the calculation force weight value, the integral growth rate weight value and the ticket number weight value of each node,
Figure BDA0002431806330000102
γ, η, μ, ρ are fixed coefficient values determined after training of the scoring model R, where ρ<1 and ρ ≠ 0.
Specifically, the specific process of each module in the apparatus of this embodiment to implement its function may refer to the related description in the corresponding method embodiment, and is not described herein again.
Based on the content of the above embodiments, as an alternative embodiment: determining the final master node element includes:
determining a node unit participating in the consensus algorithm, wherein the node unit is used for electing odd nodes according to the identifier of the node, a preset parameter setting window and a block chain wallet state indication to obtain nodes capable of participating in the consensus algorithm;
and the consensus mechanism combining unit is used for combining the nodes which can participate in the consensus mechanism algorithm with the consensus mechanism to determine the final main node.
Specifically, the specific process of each module in the apparatus of this embodiment to implement its function may refer to the related description in the corresponding method embodiment, and is not described herein again.
Fig. 4 is a block diagram of an electronic device according to an embodiment of the present invention, and as shown in fig. 4, the electronic device includes: a processor 401, a memory 402, and a bus 403;
the processor 401 and the memory 402 respectively complete communication with each other through the bus 403; the processor 401 is configured to call the program instructions in the memory 402 to execute the method for master node selection in the blockchain consensus algorithm provided by the above embodiments, for example, including: acquiring the computational power of each node, and determining at least one node meeting the computational power of a preset standard; acquiring an integral growth rate of at least one node, wherein the integral growth rate represents a contribution quantized value to a blockchain system; obtaining the number of votes obtained by at least one node; and determining a final main node according to the calculation power, the integral growth rate, the ticket number, the scoring model and the consensus mechanism of at least one node.
Embodiments of the present invention provide a non-transitory computer readable storage medium having stored thereon a computer program for executing, by a processor, the steps of a method for master node selection in a time zone block chain consensus algorithm. Examples include: acquiring the computational power of each node, and determining at least one node meeting the computational power of a preset standard; acquiring an integral growth rate of at least one node, wherein the integral growth rate represents a contribution quantized value to a blockchain system; obtaining the number of votes obtained by at least one node; and determining a final main node according to the calculation power, the integral growth rate, the ticket number, the scoring model and the consensus mechanism of at least one node.
The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and the parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware. With this understanding in mind, the above-described technical solutions may be embodied in the form of a software product, which can be stored in a computer-readable storage medium, such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods of the various embodiments or some parts of the embodiments.
Finally, the principle and the implementation of the present invention are explained by applying the specific embodiments in the present invention, and the above description of the embodiments is only used to help understanding the method and the core idea of the present invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (10)

1. A method for master node selection in a block chain consensus algorithm, the method comprising:
acquiring the computational power of each node, and determining at least one node meeting the computational power of a preset standard;
acquiring an integral growth rate of the at least one node, wherein the integral growth rate represents a contribution quantization value to a blockchain system;
obtaining the number of votes obtained by the at least one node;
and determining a final main node according to the calculation power, the integral growth rate, the ticket number, the scoring model and the consensus mechanism of the at least one node.
2. The method of claim 1, wherein determining the final master node based on the computing power, the point growth rate, the number of votes, the scoring model, and the consensus mechanism of the at least one node comprises:
according to the calculation power, the integral growth rate and the ticket number of the at least one node, a scoring model is determined, and odd nodes with the numerical ranks higher than the former nodes are determined;
and determining a final main node according to the odd number of nodes and the consensus mechanism.
3. The method of claim 1, wherein the scoring model is represented by the following equation:
Figure FDA0002431806320000011
wherein C represents the node calculated force; i represents the integral growth rate of the node; v represents the number of votes obtained by the node;
Figure FDA0002431806320000012
respectively representing the calculation force weight value, the integral growth rate weight value and the ticket number weight value of each node,
Figure FDA0002431806320000013
γ, η, μ, ρ are fixed coefficient values determined after training of the scoring model R, where ρ<1 and ρ ≠ 0.
4. The method of claim 2, wherein determining the final master node based on the odd number of nodes and a consensus mechanism comprises:
electing the odd number of nodes according to the identifier of the node, a preset parameter setting window and a block chain wallet state indication to obtain nodes capable of participating in a consensus mechanism algorithm;
and combining the nodes capable of participating in the consensus mechanism algorithm with a consensus mechanism to determine a final main node.
5. An apparatus for master node selection in a blockchain consensus algorithm, the apparatus comprising:
the node calculation force obtaining module is used for obtaining calculation force of each node and determining at least one node meeting the calculation force of a preset standard;
a node integral growth rate obtaining module, configured to obtain an integral growth rate of the at least one node, where the integral growth rate represents a contribution quantization value to a blockchain system;
the node ticket number obtaining module is used for obtaining the ticket number obtained by the at least one node;
and the final main node determining module is used for determining the final main node according to the calculation power, the integral growth rate, the vote count, the scoring model and the consensus mechanism of the at least one node.
6. The apparatus of claim 5, wherein the final master node determination module comprises:
determining odd node units with top ranking, and according to the calculation power, the integral growth rate and the number of votes obtained by the at least one node, scoring a model, and determining odd nodes with top ranking of numerical values obtained by the scoring model;
and the final main node determining unit is used for determining a final main node according to the odd number of nodes and the consensus mechanism.
7. The apparatus of claim 5, wherein the scoring model is represented by the following equation:
Figure FDA0002431806320000021
wherein C represents the node calculated force; i represents the integral growth rate of the node; v represents the number of votes obtained by the node;
Figure FDA0002431806320000022
respectively representing the calculation force weight value, the integral growth rate weight value and the ticket number weight value of each node,
Figure FDA0002431806320000023
γ, η, μ, ρ are fixed coefficient values determined after training of the scoring model R, where ρ<1 and ρ ≠ 0.
8. The apparatus of claim 6, wherein the determining the final master node unit comprises:
determining a node unit participating in the consensus mechanism algorithm, wherein the node unit is used for electing odd nodes according to identifiers of the nodes, a preset parameter setting window and a block chain wallet state indication to obtain nodes capable of participating in the consensus mechanism algorithm;
and the joint recognition mechanism combining unit is used for combining the nodes which can participate in the joint recognition mechanism algorithm with the joint recognition mechanism to determine the final main node.
9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor when executing the program performs the steps of the method for master node selection in a block chain consensus algorithm according to any one of claims 1 to 4.
10. A non-transitory computer readable storage medium, having stored thereon a computer program, wherein the computer program, when being executed by a processor, implements the steps of the method for master node selection in a blockchain consensus algorithm according to any one of claims 1 to 4.
CN202010240054.0A 2020-03-30 2020-03-30 Method and device for selecting main node in block chain consensus algorithm Active CN111432014B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010240054.0A CN111432014B (en) 2020-03-30 2020-03-30 Method and device for selecting main node in block chain consensus algorithm

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010240054.0A CN111432014B (en) 2020-03-30 2020-03-30 Method and device for selecting main node in block chain consensus algorithm

Publications (2)

Publication Number Publication Date
CN111432014A true CN111432014A (en) 2020-07-17
CN111432014B CN111432014B (en) 2023-05-05

Family

ID=71557315

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010240054.0A Active CN111432014B (en) 2020-03-30 2020-03-30 Method and device for selecting main node in block chain consensus algorithm

Country Status (1)

Country Link
CN (1) CN111432014B (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112118138A (en) * 2020-09-18 2020-12-22 上海计算机软件技术开发中心 System and method for implementing block chain consensus mechanism
CN112600919A (en) * 2020-12-10 2021-04-02 中国科学院深圳先进技术研究院 Equipment computing power evaluation method and system based on PoW consensus mechanism
CN112632186A (en) * 2020-12-23 2021-04-09 远光软件股份有限公司 Block chain consensus method, computer equipment and block chain system
CN112822239A (en) * 2020-12-30 2021-05-18 深圳市宝能投资集团有限公司 Block chain consensus method, block chain consensus device, electronic equipment and storage medium
CN113259179A (en) * 2021-06-18 2021-08-13 杭州云智声智能科技有限公司 Byzantine fault-tolerant consensus method and system based on node scoring
CN113486118A (en) * 2021-07-21 2021-10-08 银清科技有限公司 Consensus node selection method and device
CN114189522A (en) * 2021-10-15 2022-03-15 敏博科技(武汉)有限公司 Block chain consensus method and system based on priority in Internet of vehicles
CN115065688A (en) * 2022-06-06 2022-09-16 咪咕文化科技有限公司 Data transmission method, device, equipment and computer readable storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109034813A (en) * 2018-09-07 2018-12-18 腾讯科技(深圳)有限公司 Represent node device electoral machinery, device, computer equipment and storage medium
CN109165092A (en) * 2018-07-10 2019-01-08 矩阵元技术(深圳)有限公司 A kind of common recognition method, apparatus and system based on effective calculation power contribution
CN109165945A (en) * 2018-09-07 2019-01-08 腾讯科技(深圳)有限公司 Represent node device electoral machinery, device, computer equipment and storage medium
CN109242535A (en) * 2018-08-07 2019-01-18 宜人恒业科技发展(北京)有限公司 Common recognition mechanism DPOP based on participation carries out the method and system of behavior memory quantization
CN109426567A (en) * 2017-08-22 2019-03-05 汇链丰(北京)科技有限公司 A kind of node deployment and electoral machinery of block chain
CN109714404A (en) * 2018-12-12 2019-05-03 中国联合网络通信集团有限公司 Block chain common recognition method and device based on Raft algorithm
CN109921909A (en) * 2019-02-15 2019-06-21 北京工业大学 The block chain common recognition method and device proved based on contribution

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109426567A (en) * 2017-08-22 2019-03-05 汇链丰(北京)科技有限公司 A kind of node deployment and electoral machinery of block chain
CN109165092A (en) * 2018-07-10 2019-01-08 矩阵元技术(深圳)有限公司 A kind of common recognition method, apparatus and system based on effective calculation power contribution
CN109242535A (en) * 2018-08-07 2019-01-18 宜人恒业科技发展(北京)有限公司 Common recognition mechanism DPOP based on participation carries out the method and system of behavior memory quantization
CN109034813A (en) * 2018-09-07 2018-12-18 腾讯科技(深圳)有限公司 Represent node device electoral machinery, device, computer equipment and storage medium
CN109165945A (en) * 2018-09-07 2019-01-08 腾讯科技(深圳)有限公司 Represent node device electoral machinery, device, computer equipment and storage medium
CN109714404A (en) * 2018-12-12 2019-05-03 中国联合网络通信集团有限公司 Block chain common recognition method and device based on Raft algorithm
CN109921909A (en) * 2019-02-15 2019-06-21 北京工业大学 The block chain common recognition method and device proved based on contribution

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112118138A (en) * 2020-09-18 2020-12-22 上海计算机软件技术开发中心 System and method for implementing block chain consensus mechanism
CN112118138B (en) * 2020-09-18 2023-06-23 上海计算机软件技术开发中心 System and method for realizing block chain consensus mechanism
CN112600919A (en) * 2020-12-10 2021-04-02 中国科学院深圳先进技术研究院 Equipment computing power evaluation method and system based on PoW consensus mechanism
CN112632186A (en) * 2020-12-23 2021-04-09 远光软件股份有限公司 Block chain consensus method, computer equipment and block chain system
CN112822239A (en) * 2020-12-30 2021-05-18 深圳市宝能投资集团有限公司 Block chain consensus method, block chain consensus device, electronic equipment and storage medium
CN113259179A (en) * 2021-06-18 2021-08-13 杭州云智声智能科技有限公司 Byzantine fault-tolerant consensus method and system based on node scoring
CN113486118A (en) * 2021-07-21 2021-10-08 银清科技有限公司 Consensus node selection method and device
CN113486118B (en) * 2021-07-21 2023-09-22 银清科技有限公司 Consensus node selection method and device
CN114189522A (en) * 2021-10-15 2022-03-15 敏博科技(武汉)有限公司 Block chain consensus method and system based on priority in Internet of vehicles
CN114189522B (en) * 2021-10-15 2024-04-16 敏博科技(武汉)有限公司 Priority-based blockchain consensus method and system in Internet of vehicles
CN115065688A (en) * 2022-06-06 2022-09-16 咪咕文化科技有限公司 Data transmission method, device, equipment and computer readable storage medium

Also Published As

Publication number Publication date
CN111432014B (en) 2023-05-05

Similar Documents

Publication Publication Date Title
CN111432014A (en) Method and device for selecting main node in block chain consensus algorithm
CN110049029B (en) Consensus node determination method, device, computer equipment and storage medium
Goltsman et al. Interim performance feedback in multistage tournaments: The optimality of partial disclosure
CN110772797B (en) Data processing method, device, server and storage medium
Arimoto et al. Selective learning with a forgetting factor for robotic motion control
Dato et al. Expectation-based loss aversion and rank-order tournaments
CN109166032A (en) It is counter on a kind of electronic silver line to cheat method and system
Hommes Bounded rationality and learning in complex markets
Khan et al. Determinants of trade balance of Bangladesh: A dynamic panel data analysis
Akobi et al. Government expenditure and inflation rate in Nigeria
CN114741721A (en) Consensus device and consensus method based on contribution value certification for file block chain
CN113806799B (en) Block chain platform safety intensity assessment method and device
Rossi et al. Combining users and items rankings for group decision support
CN116596391A (en) Change control performance determining method, device, electronic equipment and storage medium
CN115865642A (en) Method and device for recruiting trusted nodes to complete calculation task
Dunne et al. Foreign firm ownership and productivity spillovers in the Southern African Development Community (SADC) region
Srdjevic et al. Group evaluation of water management plans with analytic hierarchy process and social choice methods
Wang et al. Measuring Olympics achievements via stochastic multicriteria acceptability analysis
CN117786478B (en) Multi-model-based user activity prediction method, system, equipment and medium
García‐Ferrer et al. Forecasting European GNP data through common factor models and other procedures
Bakhshandeh et al. Development of reinforcement learning algorithm to study the capacity withholding in electricity energy markets
CN114971434B (en) Performance comparison analysis system based on distributed computation
Beltadze SOLUTION OF BIMATRIX GAMES IN PREFERRED MIXED STRATEGIES
Fister Jr et al. SportyDataGen: an online generator of endurance sports activity collections
Ebrahimnejad et al. A Survey on Models and Methods for Preference Voting and Aggregation

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant