CN111432014B - 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
CN111432014B
CN111432014B CN202010240054.0A CN202010240054A CN111432014B CN 111432014 B CN111432014 B CN 111432014B CN 202010240054 A CN202010240054 A CN 202010240054A CN 111432014 B CN111432014 B CN 111432014B
Authority
CN
China
Prior art keywords
node
growth rate
determining
nodes
master node
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.)
Active
Application number
CN202010240054.0A
Other languages
Chinese (zh)
Other versions
CN111432014A (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

Abstract

The invention provides a method and a device for selecting a master node in a block chain consensus algorithm, wherein the method comprises the following steps: acquiring the calculation force of each node, and determining at least one node meeting the preset standard calculation force; obtaining an integrated growth rate for at least one node, wherein the integrated growth rate represents a contribution quantization value to the blockchain system; obtaining the ticket number of at least one node; and determining a final master 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 the elections determined by the voting through three indexes of the calculation power of the obtained node, the node integral growth rate and the node vote count, so that each candidate node can more fairly go to the election master node, and the node with more capability becomes a block producer, thereby the generation mode of the billing node is more fair, and the role of brining selection in the election process is reduced.

Description

Method and device for selecting main node in block chain consensus algorithm
Technical Field
The present invention relates to the field of blockchain, and in particular, to a method and apparatus for selecting a master node in a blockchain consensus algorithm.
Background
The block chain link points are what we commonly call miners. The different calculation of each miner determines how much billing rights it can assign and how much rewards are harvested. Miners in blockchain networks, like traditional banks, provide billing services for users' transactions.
Since all public chains are community autonomous, there is no central leadership to decide, and in order to maintain public chains, most community users must agree. And how this is achieved is by using a consensus mechanism.
Blockchains are large public ledgers, and when the whole system reaches tps in the order of millions of seconds in the legend, node speaking must be reduced, however, too few nodes have an influence on the security of the whole network. The "21 supernode" solution proposed by EOS designer can just balance the degree of decentralization and the chunking rate. Super nodes are nodes in the blockchain network, which collect transaction information and package the transaction information into blocks, and are also called as block producers.
In the conventional DPoS consensus algorithm mechanism, the blockchain producer node (master node) is directly generated by election. The highest 2n+1 nodes of the ticket for the whole network will be responsible for the outgoing block. The algorithm selects nodes 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 affected.
Disclosure of Invention
The invention provides a method and a device for selecting a main node in a block chain consensus algorithm, which aim to solve the problems that in the prior art, the voting rate is low, the voting cheating possibility is high and the fairness of the algorithm is influenced due to the mode of voting by the nodes.
In a first aspect, the present invention provides a method for selecting a master node in a blockchain consensus algorithm, the method comprising:
acquiring the calculation force of each node, and determining at least one node meeting the preset standard calculation force;
obtaining an integrated growth rate for at least one node, wherein the integrated growth rate represents a contribution quantization value to the blockchain system;
obtaining the ticket number of at least one node;
and determining a final master 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 the final master node based on the computational power, the rate of increase in the integral, the number of votes obtained, 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 at least one node, a scoring model is determined, and the odd nodes with the top numerical ranks obtained by the scoring model are determined;
and determining a final master node according to the odd nodes and the consensus mechanism.
Further, the scoring model is represented by the following formula:
Figure BDA0002431806330000021
wherein, C represents the node calculation 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
Gamma, eta, mu, p are fixed coefficient values determined after training of the scoring model R, where p<1 and ρ+.0.
Further, determining the final master node based on the odd number of nodes and the consensus mechanism includes:
according to the identifiers of the nodes, a preset parameter setting window and a blockchain wallet state indication, selecting odd nodes to obtain nodes which can participate in a consensus mechanism algorithm;
and combining the nodes capable of participating in the consensus mechanism algorithm with the consensus mechanism to determine a final master 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 acquisition module is used for acquiring calculation force of each node and determining at least one node meeting preset standard calculation force;
an acquire node integral growth rate module for acquiring an integral growth rate of at least one node, wherein the integral growth rate represents a contribution quantization value to the blockchain system;
the node ticket obtaining number obtaining module is used for obtaining the ticket obtaining number of at least one node;
and the final master node determining module is used for determining the final master 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, the final master node determining module includes:
determining odd nodes with top ranking, which are used for determining the odd nodes with top ranking of numerical values obtained by the scoring model according to the calculation power, the integral growth rate and the ticket obtaining number of at least one node;
and determining a final master node unit, which is used for determining the final master 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 calculation 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
Gamma, eta, mu, p are fixed coefficient values determined after training of the scoring model R, where p<1 and ρ+.0.
Further, determining the final master node unit includes:
determining node units participating in a consensus mechanism algorithm, wherein the node units are used for electing odd nodes according to identifiers of the nodes, preset parameter setting windows and blockchain wallet state instructions to obtain nodes capable of participating in the consensus mechanism algorithm;
and the consensus mechanism combining unit is used for combining the nodes capable of participating in the consensus mechanism algorithm with the consensus mechanism to determine a final master node.
In a third aspect, the present invention provides an electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the steps of the method for master node selection in the blockchain consensus algorithm provided in the first aspect when executing the program.
In a fourth aspect, the present invention provides a non-transitory computer readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the method of master node selection in the blockchain consensus algorithm provided in the first aspect.
The invention balances all the elections determined by the voting through three indexes of the calculation power of the obtained node, the node integral growth rate and the node vote count, so that each candidate node can more fairly go to the election master node, and the node with more capability becomes a block producer, thereby the generation mode of the billing node is more fair, and the role of brining selection in the election process is reduced.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, it being obvious that the drawings in the following description are only some embodiments of the invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flowchart illustrating a method for master node selection in a block chain consensus algorithm according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating a block chain node pool selection method according to an embodiment of the present invention;
FIG. 3 is a block diagram of a device for master node selection 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 present application solution better understood by those skilled in the art, the following description will be made in detail and with reference to the accompanying drawings in the embodiments of the present application, it is apparent that the described embodiments are only some embodiments of the present application, not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art based on the embodiments herein without making any inventive effort, shall fall within the scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and claims of the present application and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate in order to describe the embodiments of the present application described herein. 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, in the case of no conflict, the embodiments and features in the embodiments may be combined with each other. The present application will be described in detail below with reference to the accompanying drawings in conjunction with embodiments.
In the traditional DPoS consensus algorithm mechanism, a blockchain producer node (a main node) is directly generated through election, the algorithm is purely based on voting to elect the node, and in the actual operation process, the probability of low voting rate, election cheating and the like exist, so that the fairness of the algorithm is affected. In order to solve the above problems, an embodiment of the present invention provides a method for selecting a master node in a blockchain consensus algorithm, the method including:
step S101, acquiring the calculation force of each node, and determining at least one node meeting the preset standard calculation force;
step S102, obtaining an integral growth rate of at least one node, wherein the integral growth rate represents a contribution quantization value to a blockchain system;
step S103, obtaining the ticket number of at least one node;
step S104, determining a final master 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, firstly, evaluating the calculation power of each node in a block chain system, wherein only nodes meeting certain standard calculation power are qualified and can become final block producers, and the certain standard calculation power is preset standard calculation power; at least one node that meets a preset standard calculation force is then determined. It should be explained that, in the process of selecting the nodes, more than one node meeting the preset standard calculation force is required, so that the embodiment of the invention uses at least one node to limit the number of the nodes meeting the preset standard calculation force currently.
Acquiring integral growth rates of all nodes in the nodes currently meeting preset standard calculation force, wherein the integral growth rates represent contribution quantization values to a blockchain system; and obtaining the number of votes obtained by each node in the nodes meeting the preset standard calculation power, namely, the voting result. The calculation power, the integral growth rate and the ticket number are taken 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 ticket number of at least one node, and selecting the candidate nodes with the first N bits as block producers of each round after effective sequencing.
And reelecting the candidate nodes with the first N bits, and then combining the elected nodes with a consensus mechanism to determine a final master node.
According to the embodiment of the invention, all elections determined by voting are balanced by three indexes of the calculation power of the obtained node, the node integral growth rate and the node vote count, so that each candidate node is fairer to the election master node, and the nodes with higher capability become block producers, thus the generation mode of the accounting node is fairer, and the role of brining elections in the election process is reduced.
Based on the content of the above embodiments, as an alternative embodiment: determining a final master node based on the computational effort, the rate of increase in the points, the number of votes obtained, 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 at least one node, a scoring model is determined, and the odd nodes with the top numerical ranks obtained by the scoring model are determined;
and determining a final master node according to the odd nodes and the consensus mechanism.
Specifically, in the embodiment of the invention, the calculation force, the integral growth rate and the ticket number of each node are put into a scoring model to obtain the calculation result of the model, and then the odd nodes with the top ranking are selected as node pools according to the scoring ranking by scoring and summing, and N candidate nodes are stored. And then electing from the N candidate nodes to obtain nodes capable of participating in a consensus mechanism, and finally obtaining a master 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 calculation 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
Gamma, eta, mu, p are fixed coefficient values determined after training of the scoring model R, where p<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 the production function. Wherein gamma, eta, mu and rho are fixed coefficient values determined after the scoring model R is trained, namely, the scoring model R is continuously trained under the condition of being known; the parameter C, I, V is a variable, which is determined according to the obtained specific numerical value, and the three variables are input into the scoring model R to obtain a corresponding calculation result.
Based on the content of the above embodiments, as an alternative embodiment: according to the odd number of nodes and the consensus mechanism, determining the final master node comprises:
according to the identifiers of the nodes, a preset parameter setting window and a blockchain wallet state indication, selecting odd nodes to obtain nodes which can participate in a consensus mechanism algorithm;
and combining the nodes capable of participating in the consensus mechanism algorithm with the consensus mechanism to determine a final master node.
Specifically, when the obtained odd number of nodes are further selected, the judgment can be performed from three aspects:
1. becoming a representative, the public key must be registered on the network and then assigned to a 32-bit unique identifier that is referenced by the "header" of each confirmed transaction data.
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, as that would consume their transaction fee. In emergency situations, however, some users may find it worthwhile to change their votes by paying a fee in a more aggressive manner.
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 replace a new representation. If any representative is found to issue an invalid block, then all standard wallets will require a new representative to be selected before more transactions per wallet can be made.
After the nodes capable of participating in the consensus mechanism algorithm are obtained, the nodes are combined with the consensus mechanism to determine the final master 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: starting.
Step 2: evaluating the computing power C of the nodes, wherein only the nodes meeting certain standards are qualified and capable to become the final block producer; the contribution of the whole block chain system is quantized through the nodes, and an integral growth rate I is obtained; and the whole-network voting result V.
Step 3: input formula
Figure BDA0002431806330000081
Step 4: and (5) a blockchain billing node.
According to still another aspect of the present invention, an embodiment of the present invention provides a device for selecting a master node in a blockchain consensus algorithm, and referring to fig. 3, fig. 3 is a block diagram of a device for selecting a master node in a blockchain consensus algorithm according to an embodiment of the present invention. The device is used for completing the selection of the master node in the block chain consensus algorithm provided by the embodiment of the invention in the above 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 each execution module in the embodiments of the present invention.
The device comprises:
the node calculation force acquisition module 301 is configured to acquire calculation forces of the nodes, and determine at least one node that meets a preset standard calculation force;
an acquire node integral growth rate module 302 for acquiring an integral growth rate of at least one node, wherein the integral growth rate represents a contribution quantization value to the blockchain system;
the node obtaining ticket number obtaining module 303 is configured to obtain the ticket number of at least one node;
the final master node determining module 304 is configured to determine a final master node according to the computing power, the integral growth rate, the ticket number, the scoring model and the consensus mechanism of at least one node.
Specifically, the specific process of implementing the functions of each module in the apparatus of this embodiment may refer to the relevant description in the corresponding method embodiment, which is not repeated herein.
According to the embodiment of the invention, all elections determined by voting are balanced by three indexes of the calculation power of the obtained node, the node integral growth rate and the node vote count, so that each candidate node is fairer to the election master node, and the nodes with higher capability become block producers, thus the generation mode of the accounting node is fairer, and the role of brining elections in the election process is reduced.
Based on the content of the above embodiments, as an alternative embodiment: the final master node determining module includes:
determining odd nodes with top ranking, which are used for determining the odd nodes with top ranking of numerical values obtained by the scoring model according to the calculation power, the integral growth rate and the ticket obtaining number of at least one node;
and determining a final master node unit, which is used for determining the final master node according to the odd number of nodes and the consensus mechanism.
Specifically, the specific process of implementing the functions of each module in the apparatus of this embodiment may refer to the relevant description in the corresponding method embodiment, which is not repeated herein.
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 calculation 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
Gamma, eta, mu, p are fixed coefficient values determined after training of the scoring model R, where p<1 and ρ+.0.
Specifically, the specific process of implementing the functions of each module in the apparatus of this embodiment may refer to the relevant description in the corresponding method embodiment, which is not repeated herein.
Based on the content of the above embodiments, as an alternative embodiment: determining the final master node unit includes:
determining node units participating in a consensus mechanism algorithm, wherein the node units are used for electing odd nodes according to identifiers of the nodes, preset parameter setting windows and blockchain wallet state instructions to obtain nodes capable of participating in the consensus mechanism algorithm;
and the consensus mechanism combining unit is used for combining the nodes capable of participating in the consensus mechanism algorithm with the consensus mechanism to determine a final master node.
Specifically, the specific process of implementing the functions of each module in the apparatus of this embodiment may refer to the relevant description in the corresponding method embodiment, which is not repeated herein.
Fig. 4 is a block diagram of an electronic device according to an embodiment of the present invention, as shown in fig. 4, where the device includes: a processor 401, a memory 402, and a bus 403;
wherein the processor 401 and the memory 402 respectively complete communication with each other through the bus 403; the processor 401 is configured to invoke program instructions in the memory 402 to perform the method of master node selection in the blockchain consensus algorithm provided in the embodiment described above, for example, including: acquiring the calculation force of each node, and determining at least one node meeting the preset standard calculation force; obtaining an integrated growth rate for at least one node, wherein the integrated growth rate represents a contribution quantization value to the blockchain system; obtaining the ticket number of at least one node; and determining a final master 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 execution by a processor of steps of a method of master node selection in a time zone block chain consensus algorithm. Examples include: acquiring the calculation force of each node, and determining at least one node meeting the preset standard calculation force; obtaining an integrated growth rate for at least one node, wherein the integrated growth rate represents a contribution quantization value to the blockchain system; obtaining the ticket number of at least one node; and determining a final master 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 apparatus embodiments described above are merely illustrative, wherein elements illustrated as separate elements may or may not be physically separate, and elements shown as elements may or may not be physical elements, may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
From the above description of the embodiments, it will be apparent to those skilled in the art that the embodiments may be implemented by means of software plus necessary general hardware platforms, or of course may be implemented by means of hardware. Based on such understanding, the foregoing technical solutions may be embodied essentially or in part in the form of a software product, which may be stored in a computer-readable storage medium, such as a ROM/RAM, a magnetic disk, an optical disk, etc., including several instructions to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to perform the various embodiments or methods of some parts of the embodiments.
Finally, the principles and embodiments of the present invention have been described with reference to specific examples, which are intended to be illustrative only of the methods and core ideas of the present invention; meanwhile, as those skilled in the art will have variations in the specific embodiments and application scope in accordance with the ideas of the present invention, the present description should not be construed as limiting the present invention in view of the above.

Claims (8)

1. A method for master node selection in a blockchain consensus algorithm, the method comprising:
acquiring the calculation force of each node, and determining at least one node meeting the preset standard calculation force;
obtaining an integrated growth rate for the at least one node, wherein the integrated growth rate represents a contribution quantization value to a blockchain system;
obtaining the ticket number of the at least one node;
determining a final master node according to the computing power, the integral growth rate, the ticket number, the scoring model and the consensus mechanism of the at least one node;
the determining the final master node according to the computing power, the integral growth rate, the ticket number, 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 the odd number of nodes with the top numerical value ranking obtained by the scoring model are determined;
and determining a final master node according to the odd nodes and the consensus mechanism.
2. The method of claim 1, wherein the scoring model is represented by the following formula:
Figure FDA0004050863050000011
wherein, C represents the node calculation force; i represents the integral growth rate of the node; v represents the number of votes obtained by the node;
Figure FDA0004050863050000012
respectively representing the calculation force weight value, the integral growth rate weight value and the ticket number weight value of each node, ++>
Figure FDA0004050863050000013
γ, η, μ, ρ is a fixed coefficient value determined after training of the scoring model R, where ρ < 1 and ρ+.0.
3. The method of claim 1, wherein the determining a final master node based on the odd number of nodes and a consensus mechanism comprises:
selecting the odd nodes according to the identifiers of the nodes, a preset parameter setting window and a blockchain wallet state indication to obtain nodes which can participate in a consensus mechanism algorithm;
and combining the nodes capable of participating in the consensus mechanism algorithm with the consensus mechanism to determine a final master node.
4. A device for selecting a master node in a blockchain consensus algorithm, the device comprising:
the node calculation force acquisition module is used for acquiring calculation force of each node and determining at least one node meeting preset standard calculation force;
an acquire node integral growth rate module for 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;
the node ticket obtaining number obtaining module is used for obtaining the ticket obtaining number of the at least one node;
the final master node determining module is used for determining a final master 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;
the final master node determining module includes:
determining odd nodes with top ranking, which are used for determining odd nodes with top ranking of numerical values obtained by a scoring model according to the calculation power, the integral growth rate and the ticket number of the at least one node;
and determining a final master node unit, which is used for determining a final master node according to the odd number of nodes and the consensus mechanism.
5. The apparatus of claim 4, wherein the scoring model is represented by the following formula:
Figure FDA0004050863050000021
wherein, C represents the node calculation force; i represents the integral growth rate of the node; v represents the number of votes obtained by the node;
Figure FDA0004050863050000022
respectively representing the calculation force weight value, the integral growth rate weight value and the ticket number weight value of each node, ++>
Figure FDA0004050863050000023
γ, η, μ, ρ is a fixed coefficient value determined after training of the scoring model R, where ρ < 1 and ρ+.0.
6. The apparatus of claim 4, wherein said determining a final master node unit comprises:
determining node units participating in a consensus mechanism algorithm, wherein the node units are used for electing the odd nodes according to identifiers of the nodes, a preset parameter setting window and a blockchain wallet state indication to obtain nodes capable of participating in the consensus mechanism algorithm;
and the consensus mechanism combining unit is used for combining the nodes capable of participating in the consensus mechanism algorithm with the consensus mechanism to determine a final master node.
7. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor performs the steps of the method of master node selection in the blockchain consensus algorithm according to any of claims 1 to 3 when the program is executed.
8. A non-transitory computer readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the method of master node selection in a blockchain consensus algorithm according to any of claims 1 to 3.
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 CN111432014A (en) 2020-07-17
CN111432014B true 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)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112118138B (en) * 2020-09-18 2023-06-23 上海计算机软件技术开发中心 System and method for realizing block chain consensus mechanism
CN112600919B (en) * 2020-12-10 2022-06-21 中国科学院深圳先进技术研究院 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
CN113259179B (en) * 2021-06-18 2021-10-19 杭州云智声智能科技有限公司 Byzantine fault-tolerant consensus method and system based on node scoring
CN113486118B (en) * 2021-07-21 2023-09-22 银清科技有限公司 Consensus node selection method and device
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

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
CN109165945A (en) * 2018-09-07 2019-01-08 腾讯科技(深圳)有限公司 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
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

Also Published As

Publication number Publication date
CN111432014A (en) 2020-07-17

Similar Documents

Publication Publication Date Title
CN111432014B (en) Method and device for selecting main node in block chain consensus algorithm
CN108734338A (en) Credit risk forecast method and device based on LSTM models
Khan et al. Determinants of trade balance of Bangladesh: A dynamic panel data analysis
CN111210072A (en) Prediction model training and user resource limit determining method and device
Xiao et al. Dynamic multi-attribute evaluation of digital economy development in China: A perspective from interaction effect
CN114741721A (en) Consensus device and consensus method based on contribution value certification for file block chain
CN114372589A (en) Federated learning method and related device
CN114330754A (en) Strategy model training method, device and equipment
CN111130875A (en) Block chain consensus method, device, equipment and storage medium
Peng et al. Demand modeling and forecasting
CN110782091B (en) User matching result calculation method and device, computer readable medium and equipment
CN110610479B (en) Object scoring method and device
CN117786478B (en) Multi-model-based user activity prediction method, system, equipment and medium
CN116739316B (en) Automatic dispatching method and system for emergency tasks
Meyer Does the diversification of the economy matter? An assessment of the situation in South Africa
CN111798142A (en) Credit rating system
García‐Ferrer et al. Forecasting European GNP data through common factor models and other procedures
CN111274314B (en) Method and device for determining agglomeration node and electronic equipment
Shrotriya et al. Prediction of the winner by using a weighted approach of preferential balloting systems on the basis of their satisfied criterions and artifice behavioral complexity
Azis Complex interplay of factors in the institutional model of decentralization: Theory and application
CN115865642B (en) Method and device for recruiting trusted node to complete computing task
CN116510318A (en) Automatic group office method, system, electronic equipment and storage medium for physical activities
WO2021025094A1 (en) Action learning device, action learning method, action determination device, action determination method, action learning system, program, and recording medium
Suharsono et al. Candidate Recommendations for Voting System Using Modified AHP
Beşkese et al. A model proposal to measure national intellectual capital

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