CN112529703B - Method and device for selecting accounting node of blockchain - Google Patents

Method and device for selecting accounting node of blockchain Download PDF

Info

Publication number
CN112529703B
CN112529703B CN202011324794.9A CN202011324794A CN112529703B CN 112529703 B CN112529703 B CN 112529703B CN 202011324794 A CN202011324794 A CN 202011324794A CN 112529703 B CN112529703 B CN 112529703B
Authority
CN
China
Prior art keywords
class
node
nodes
accounting
accounts
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
CN202011324794.9A
Other languages
Chinese (zh)
Other versions
CN112529703A (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.)
China United Network Communications Group Co Ltd
Original Assignee
China United Network Communications Group 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 China United Network Communications Group Co Ltd filed Critical China United Network Communications Group Co Ltd
Priority to CN202011324794.9A priority Critical patent/CN112529703B/en
Publication of CN112529703A publication Critical patent/CN112529703A/en
Application granted granted Critical
Publication of CN112529703B publication Critical patent/CN112529703B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/64Protecting data integrity, e.g. using checksums, certificates or signatures
    • GPHYSICS
    • G06COMPUTING; 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
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • 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)
  • Theoretical Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Finance (AREA)
  • Computer Security & Cryptography (AREA)
  • Databases & Information Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Strategic Management (AREA)
  • General Business, Economics & Management (AREA)
  • Marketing (AREA)
  • Technology Law (AREA)
  • Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Hardware Design (AREA)
  • Software Systems (AREA)
  • Economics (AREA)
  • Computing Systems (AREA)
  • Development Economics (AREA)
  • Data Mining & Analysis (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The application provides a method and a device for selecting a billing node of a blockchain, wherein the method comprises the following steps: determining M class A proxy nodes, wherein the class A proxy nodes are viewpoint leader nodes in a blockchain forum; determining N class B proxy nodes, wherein the N class B proxy nodes respectively belong to N different levels; selecting a billing node of a next block from the class A proxy node and the class B proxy node; writing the selection process and the result of the accounting node of the next block into the blockchain in the process of executing accounting operation; and sending a next block accounting notice to the accounting node of the next block. The method and the device solve the problems that the existing blockchain cannot embody the rights and interests of token owners of all levels, and the mining is more difficult and the energy consumption is greater along with the increase of added nodes.

Description

Method and device for selecting accounting node of blockchain
Technical Field
The application relates to the technical field of blockchains, in particular to a method and a device for selecting a billing node of a blockchain.
Background
A large number of tokens are injected at the beginning of the creation of the blockchain, the tokens are obtained by cash purchase and the like, the price is high, and huge token value is required to represent own rights and interests when the system achieves a consensus mechanism. Meanwhile, the difference of the number of tokens owned by different accounts is huge, and how to represent the rights and interests of the token owners of each hierarchy becomes a big problem.
In addition, for the traditional blockchain adopting a workload proof (PoW) to achieve a consensus mechanism, as time goes by, adding nodes are increased, mining is more and more difficult, energy consumption is more and more, and the influence on environment, ecology and society gradually tends to be worsened; meanwhile, with the increase of the blocks, the excavated tokens become huge, the price of the tokens is not enough, and the huge token value also requires corresponding rights. The aforementioned problems also exist.
Disclosure of Invention
The application aims to solve the technical problems of the prior art, and provides a method and a device for selecting accounting nodes of a blockchain, which are used for solving the problems that the existing blockchain cannot embody the rights of token owners of all layers, mining is difficult and energy consumption is large along with the increase of added nodes.
In a first aspect, an embodiment of the present application provides a method for selecting a billing node of a blockchain, applied to a current billing node in the blockchain, the method including:
determining M class A proxy nodes, wherein the class A proxy nodes are viewpoint leader nodes in a blockchain forum;
determining N class B proxy nodes, wherein the N class B proxy nodes respectively belong to N different levels;
selecting a billing node of a next block from the class A proxy node and the class B proxy node;
writing the selection process and the result of the accounting node of the next block into the blockchain in the process of executing accounting operation;
and sending a next block accounting notice to the accounting node of the next block.
Preferably, the determining M class a proxy nodes includes:
obtaining class A accounts corresponding to all nodes for publishing information in a blockchain forum;
sorting all A-type accounts from large to small according to the quantity of first accounting benefits, wherein the first accounting benefits are used for measuring the support degree of other nodes in a blockchain on information released by the information releasing nodes;
determining nodes corresponding to the first M class A accounts after sequencing as viewpoint leader nodes in the blockchain forum;
and determining M viewpoint leader nodes as class A proxy nodes.
Preferably, the determining N class B proxy nodes includes:
b-type accounts of all nodes in the blockchain and corresponding second accounting benefits are obtained, wherein the second accounting benefits are residual accounting benefits corresponding to all nodes;
sorting all the B-type accounts from small to large according to the second accounting rights;
dividing the sequenced B-class accounts into N layers from front to back;
randomly selecting a class B account from class B accounts corresponding to each of the N hierarchies;
and determining the node corresponding to the N B-type accounts selected randomly as a B-type proxy node.
Preferably, the first billing right is used for voting, and the second billing right is used for voting; the method further comprises the steps of:
and publishing information and a class A account of the information to a blockchain forum so that other nodes in the blockchain vote on the current billing node.
Preferably, the dividing the ordered B-class accounts into N levels from front to back specifically includes:
s1, acquiring a hierarchical average second billing right, wherein the hierarchical average second billing right is the ratio of the sum of the second billing rights of all the B-class accounts after sequencing to the hierarchical layer;
s2, obtaining unassigned B-class accounts in the sequenced B-class accounts;
s3, accumulating the second accounting benefits of the unassigned B-type accounts from front to back in sequence, and dividing the first K B-type accounts into a group if the sum of the second accounting benefits of the first K B-type accounts is less than or equal to the hierarchical average second accounting benefits and the sum of the second accounting benefits of the first K+1B-type accounts is greater than the hierarchical average second accounting benefits;
and S4, judging whether the N layers are divided, if yes, ending the flow, otherwise, returning to the step S2.
Preferably, the selecting the accounting node of the next block from the class a proxy node and the class B proxy node includes:
numbering the M class A proxy nodes and N class B proxy nodes;
respectively sending numerical feedback notices to the M class A proxy nodes and the N class B proxy nodes, wherein the numerical feedback notices are used for indicating to feed back an integer greater than zero to the current billing node in a limited time;
and receiving the values fed back by the class A proxy node and the class B proxy node respectively within the limiting time, and determining the number of the accounting node of the next block according to the fed back values.
Preferably, in the step of determining the number of the accounting node of the next block according to the fed back value, the number of the accounting node of the next block is determined according to the following formula:
where loc is the number of the accounting node of the next block, R j And feeding back values for the j-th class A proxy node or the B-class proxy node after numbering.
In a second aspect, an embodiment of the present application provides a billing node selection apparatus for a blockchain, provided at a current billing node in the blockchain, the apparatus comprising:
the class A agent determining module is used for determining M class A agent nodes, wherein the class A agent nodes are viewpoint leader nodes in the blockchain forum;
the class B agent determining module is used for determining N class B agent nodes, wherein the N class B agent nodes belong to N different levels;
the accounting node selection module is connected with the class A agent determination module and the class B agent determination module and is used for selecting an accounting node of the next block from the class A agent node and the class B agent node;
the billing module is connected with the billing node selection module and is used for writing the selection process and the result of the billing node of the next block into the blockchain in the process of executing the billing operation;
and the notification sending module is connected with the accounting node selection module and is used for sending the accounting notification of the next block to the accounting node of the next block.
Preferably, the class a agent determination module includes:
the A-class account acquisition unit is used for acquiring A-class accounts corresponding to all the nodes for issuing information in the blockchain forum;
the A-type account ordering unit is used for ordering all A-type accounts from large to small according to the quantity of first accounting benefits, wherein the first accounting benefits are used for measuring the support degree of other nodes in the blockchain on the information issued by the information issuing nodes;
the view leader node determining unit is used for determining nodes corresponding to the first M class A accounts as view leader nodes in the blockchain forum;
and the class A agent determining unit is used for determining the viewpoint leader node as a class A agent node.
Preferably, the class B agent determination module includes:
the B-type account acquisition unit is used for acquiring B-type accounts of all nodes in the blockchain and corresponding second accounting benefits;
the class B account ordering unit is used for ordering all class B accounts from small to large according to the quantity of second accounting benefits, wherein the second accounting benefits are the residual accounting benefits corresponding to all nodes;
the hierarchical division unit is used for dividing the ordered B-class accounts into N hierarchies from front to back;
the random selection unit is used for randomly selecting a B-class account from B-class accounts corresponding to each hierarchy;
and the B-type agent determining unit is used for determining the node corresponding to the N B-type accounts selected at random as a B-type agent node.
According to the method and the device for selecting the accounting node of the blockchain, a mixed DPOS (Delegated Proof of Stake) mechanism is adopted, the accounting node of each block except the created block is generated in the blockchain, the accounting node of the next block is determined through the selection of the current accounting node, and the accounting node of the next block is directly used for accounting, so that the problem that in the existing workload evidence (PoW) mechanism, all nodes participate in mining for contending accounting rights, a large amount of power and calculation force are consumed, and only the node for calculating a hash operation solution at first can obtain one-time accounting rights, and the mining energy consumption is high can be solved. In addition, the class A proxy node and the class B proxy node are generated through the current accounting node, wherein the class A proxy node is a viewpoint leader node in a blockchain forum, the class B proxy node is representative of each hierarchy, and the accounting node of the next block is selected from the two classes A, B proxy nodes, so that the rights and interests of each hierarchy can be embodied, and the problems that the rights and interests of token owners of each hierarchy cannot be embodied, mining becomes more difficult and energy consumption becomes larger along with the increase of added nodes in the existing blockchain are solved.
Drawings
Fig. 1: a flowchart of a method for selecting a billing node for a blockchain in accordance with embodiment 1 of the present application;
fig. 2: a schematic structural diagram of a blocking-chain billing node selection apparatus according to embodiment 2 of the present application is shown.
Detailed Description
It should be noted that, without conflict, the embodiments of the present application and features of the embodiments may be combined with each other. The application will be described in detail below with reference to the drawings in connection with embodiments.
In order that those skilled in the art will better understand the present application, a technical solution in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in which 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 those skilled in the art based on the embodiments of the present application 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 in the claims 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 application herein.
Example 1:
the present embodiment provides a method for selecting a billing node of a blockchain, as shown in fig. 1, including:
step S102: m class A proxy nodes are determined, wherein the class A proxy nodes are viewpoint leader nodes in the blockchain forum.
In this embodiment, the blockchain adopts a hybrid DPOS (Delegated Proof of Stake, proxy rights and interests proving) mechanism, the creation block is designated and generated by a system developer, and the accounting node of each block except the creation block is designated and generated by the last accounting node, so that the problem that in the existing workload proving (PoW) mechanism, all nodes participate in mining in order to contend for accounting rights, consume a large amount of power and computing power, and only the node which calculates the hash operation solution first can obtain one accounting right, thereby causing high mining energy consumption can be solved.
In this embodiment, the current billing node refers to a node that is about to perform or is performing a billing operation, and after billing is completed, the next billing node becomes the current billing node, and the current billing node becomes the last billing node.
Optionally, determining M class a proxy nodes may include:
obtaining class A accounts corresponding to all nodes for publishing information in a blockchain forum;
sorting all A-type accounts from large to small according to the quantity of first accounting benefits, wherein the first accounting benefits are used for measuring the support degree of other nodes in the blockchain on information issued by the nodes issuing the information;
determining nodes corresponding to the first M class A accounts after sequencing as viewpoint leader nodes in the blockchain forum;
the M perspective leader nodes are determined to be class A proxy nodes.
It should be noted that each token in the blockchain has a billing benefit that is attributed to the owner of the token. Each node in the blockchain has a class a account and a class B account, the billing rights in the class a account are referred to as a first billing rights, each blockchain node can publish information in the blockchain forum and disclose its own class a account, the published information can be any blockchain related information, such as can be used to publish its own opinion about questions of interest to token owners, so that other nodes transfer all or part of their own class B accounts to their class a accounts when supporting the node. I.e., the billing rights in the class a account are transferred by other nodes, the billing rights in the class a account are transferred to only have voting rights. The accounting equity in a class B account is referred to as a second accounting equity, which has voting rights, accounting equity remaining for the token owner itself.
In this embodiment, by ranking all the class a accounts according to the interests, the first M more accounts are selected as class a proxy nodes, and the selected class a proxy nodes are top ranking viewpoint leader nodes, so that the most focused problem in the blockchain forum can be represented. In addition, at the beginning of the blockchain startup, when enough view leaders have not been generated, nodes in the blockchain forum which issue information can be all used as class A proxy nodes.
Optionally, the method further comprises:
information is published into the blockchain forum along with its class a account to cause other nodes in the blockchain to vote on the current billing node.
In this embodiment, each node in the blockchain may issue information and issue its own class a account in the blockchain forum, or vote on the node issuing information in the blockchain forum to indicate support, and if node a issues its own opinion about the issue of interest of the token owner, node B indicates support for that opinion, a corresponding number of tokens, i.e. accounting rights, may be transferred to the class a account of node a. After a period of time, if no further support is desired, it may be withdrawn. Assuming that node B has p tokens, he transfers the accounting equity of q tokens therein to node A, q.ltoreq.p. The billing benefit in the class a account of node a increases by q while the billing benefit in the class B account of node B becomes p-q while the token of node B also becomes p-q. If node B wants to use those q tokens that have been transferred out of the billing right, he needs to first withdraw the billing right that was transferred back to node A.
Step S104: n class B proxy nodes are determined, and the N class B proxy nodes respectively belong to N different levels.
In this embodiment, the hierarchy is divided according to the size of the second billing rights.
Optionally, determining N class B proxy nodes may include:
b-type accounts of all nodes in the blockchain and corresponding second accounting benefits are obtained, wherein the second accounting benefits are residual accounting benefits corresponding to all nodes;
sorting all the B-type accounts from small to large according to the second accounting rights;
dividing the sequenced B-class accounts into N layers from front to back;
randomly selecting a class B account from class B accounts corresponding to each of the N hierarchies;
and determining the node corresponding to the N B-type accounts selected randomly as a B-type proxy node.
In this embodiment, the current billing node counts the billing rights of all token owners class B accounts (which have deducted the portion transferred to the view leader), arranged as class B from small to large balance 1 ,B 2 ,…B i There are i accounts. Wherein B is j The balance corresponding to the account is b j ,1≤j≤i,0<b 1 ≤b 2 ≤…≤b i . All account balances sum to S, i.e
Dividing the account into N tiers such that the balance sum of each tier is approximately equal toThe specific method comprises the following steps: dividing the balance of a single account into N layers according to the fact that the balance of the single account is from small to large, wherein the number of the accounts of each layer is k 1 ,k 2 ,…,k N ,/>
The following formula is satisfied for the groupnum level of the first N-1 levels:
but-> 1≤groupnum≤N-1。
Wherein sum (groupnum) =k 1 +k 2 +…+k groupnum Representing all account numbers of the previous groupnum tiers
The first tier is the group with the smallest account balance, namely:whileI.e. top k 1 The sum of the account balances is less than or equal to->And front k 1 +1 account balances total greater thanFor the rest i-k 1 And continuing grouping according to the method. Dividing the balance of a single account into n layers according to the fact that the balance of the single account is from small to large, wherein the number of the accounts of each layer is k 1 ,k 2 ,…,k N ,/>
Optionally, the dividing the sequenced B-class accounts into N levels from front to back specifically includes:
s1, acquiring a hierarchical average second billing right, wherein the hierarchical average second billing right is the ratio of the sum of the second billing rights of all the B-class accounts after sequencing to the hierarchical layer;
s2, obtaining unassigned B-class accounts in the sequenced B-class accounts;
s3, accumulating the second accounting benefits of the unassigned B-type accounts from front to back in sequence, and dividing the first K B-type accounts into a group if the sum of the second accounting benefits of the first K B-type accounts is less than or equal to the hierarchical average second accounting benefits and the sum of the second accounting benefits of the first K+1B-type accounts is greater than the hierarchical average second accounting benefits;
and S4, judging whether the N layers are divided, if yes, ending the flow, otherwise, returning to the step S2.
In this embodiment, assuming that there are 9B-type accounts, the corresponding second accounting benefits are sorted and then sequentially 1,1,1,1,2,2,3,3,5, the second accounting benefits are summed up to 19, and are divided into 3 levels, according to the above-mentioned division rule, since the sum of the first 5B-type accounts is 19/3 or less and the sum of the first 6B-type accounts is greater than 19/3, the first level is: 1,1,1,1,2. Similarly, the second hierarchy is: 2,3, and the third level is 3,5. In addition, during the allocation process, the data of the next hierarchy may be continuously redistributed based on the remaining unassigned layers or the remaining sum, for example, after the first hierarchy is allocated, the remaining unassigned layers are 2 layers, and since the sum of the remaining first 3B accounts is 19/2 or less and the sum of the remaining first 4B accounts is greater than 19/2, the second hierarchy is: 2,3, the third level is 5.
In this embodiment, a preset random integer generation method may be adopted to randomly select a B-type account from B-type accounts corresponding to each hierarchy, and the B-type accounts are disclosed for all nodes in the blockchain, where the random integer generation method is the same in output random number given the same input condition, so that verification of other accounts except for accounting nodes can be facilitated.
In this embodiment, for each hierarchy, a class B proxy node may also be generated by the following procedure: for k of the first level 1 The accounts are according to uniform probability, namely 1,2, …, k 1 Each number generates a probability ofGenerating a range from 1 to k 1 Is denoted as r 1 . Then the (r) th in the present hierarchy 1 The accounts will be selected as class B proxy nodes, noted as DB 1 . In the same manner as described above, a class B agent of each other hierarchy is created and denoted as DB 2 ,…,DB N
Step S106: the accounting node of the next block is selected from the class A and class B agent nodes.
Optionally, selecting the billing node of the next block from the class a proxy node and the class B proxy node may include:
numbering M class A proxy nodes and N class B proxy nodes;
respectively sending numerical feedback notices to M class A proxy nodes and N class B proxy nodes, wherein the numerical feedback notices are used for indicating that an integer larger than zero is fed back to the current billing node in a limited time;
and receiving the values fed back by the class A proxy node and the class B proxy node respectively in the limited time, and determining the number of the accounting node of the next block according to the fed back values.
In this embodiment, after two types of proxy nodes A, B are selected, the m+n proxy nodes are numbered and denoted as D 1 ,D 2 ,…,D M+N The current billing node sends notice to the M+N proxy nodes, and the current billing node sends notice to the M+N proxy nodes, wherein the notice requires to feed back an integer greater than 0 in a limited time, if timely feedback is not available, the current billing node generates randomly, and the fed back value is recorded as R 1 ,R 2 ,…,R M+N
Optionally, in the step of determining the number of the accounting node of the next block according to the fed back value, the number of the accounting node of the next block is determined according to the following formula:
where loc is the number of the accounting node of the next block, R j And feeding back values for the j-th class A proxy node or the B-class proxy node after numbering.
In the present embodiment, R is 1 ,R 2 ,…,R M+N The accounting node for the next block is generated, where 0.ltoreq.loc.ltoreq.M+N-1. If loc=0, the number starts from 1, loc is set to m+n, i.e., loc=m+n; loc is other values and is unchanged. In addition, M+N proxy nodes may be numbered as D 0 ,D 1 ,…,D M+N-1 Then the number is D loc Is the accounting node of the next block.
Step S108: during the accounting operation, the accounting node's selection process and results for the next block are written into the blockchain.
Step S110: the next block accounting notice is sent to the accounting node of the next block.
In this embodiment, in order to enable the selection process and the result of the accounting node to be traceable, the current accounting node may write the selection process and the result of the accounting node of the next block into the blockchain in the process of executing the accounting operation, that is, the generated current block includes the information (such as account, contract, code, etc.) to be recorded in the current block, and the selection process and the result of the accounting node of the next block, and at the same time, notify the accounting node of the next block to start the accounting operation of the next block.
According to the billing node selection method of the blockchain, a mixed DPOS (Delegated Proof of Stake, proxy rights and interests proving) mechanism is adopted, the billing node of each block except the created block is generated in the blockchain, the billing node of the next block is determined through the selection of the current billing node, and the billing node of the next block is directly billed, so that the problem that in the existing workload proving (PoW) mechanism, all nodes participate in mining in order to contend for billing rights, a large amount of power and calculation force are consumed, and only the node which calculates a hash operation solution first can obtain one-time billing rights, so that mining energy consumption is high can be solved. In addition, the class A proxy node and the class B proxy node are generated through the current accounting node, wherein the class A proxy node is a viewpoint leader node in a blockchain forum, the class B proxy node is representative of each hierarchy, and the accounting node of the next block is selected from the two classes A, B proxy nodes, so that the rights and interests of each hierarchy can be embodied, and the problems that the rights and interests of token owners of each hierarchy cannot be embodied, mining becomes more difficult and energy consumption becomes larger along with the increase of added nodes in the existing blockchain are solved.
Example 2:
as shown in fig. 2, the present embodiment provides a billing node selection apparatus of a blockchain, including:
the class a agent determining module 31 is configured to determine M class a agent nodes, where a class a agent node is a perspective leader node in the blockchain forum;
the class B proxy determination module 32 is configured to determine N class B proxy nodes, where the N class B proxy nodes belong to N different levels;
a billing node selection module 33 connected to the class a agent determination module 31 and the class B agent determination module 32 for selecting a billing node of a next block from the class a agent node and the class B agent node;
a billing module 34 connected to the billing node selection module 33 for writing the selection process and result of the billing node of the next block into the blockchain during the execution of the billing operation;
the notification sending module 35 is connected to the accounting node selection module 33 and is configured to send the accounting notification of the next block to the accounting node of the next block.
Optionally, the class a agent determination module 31 may include:
the A-class account acquisition unit is used for acquiring A-class accounts corresponding to all the nodes for issuing information in the blockchain forum;
the class A account ordering unit is used for ordering all class A accounts from large to small according to the quantity of first accounting benefits, wherein the first accounting benefits are used for measuring the support degree of other nodes in the blockchain on information issued by the nodes issuing the information;
the view leader node determining unit is used for determining nodes corresponding to the first M class A accounts as view leader nodes in the blockchain forum;
and the class A agent determining unit is used for determining the viewpoint leader node as a class A agent node.
Optionally, the class B agent determination module 32 may include:
the B-type account acquisition unit is used for acquiring B-type accounts of all nodes in the blockchain and corresponding second accounting benefits;
the class B account ordering unit is used for ordering all class B accounts from small to large according to the quantity of second accounting benefits, wherein the second accounting benefits are the residual accounting benefits corresponding to all nodes;
the hierarchical division unit is used for dividing the ordered B-class accounts into N hierarchies from front to back;
the random selection unit is used for randomly selecting a B-class account from B-class accounts corresponding to each hierarchy;
and the B-type proxy determining unit is used for determining the node corresponding to the N B-type accounts selected randomly as a B-type proxy node.
Optionally, the first billing right is for voting and the second billing right is for voting; the apparatus may further include:
and the information sending module is used for issuing information and an A-type account of the information to the blockchain forum so that other nodes in the blockchain vote on the current billing node.
Optionally, the hierarchical dividing unit specifically includes:
the first acquisition unit is used for acquiring a hierarchical average second billing right, wherein the hierarchical average second billing right is the ratio of the sum of the second billing rights of all the B-class accounts after sequencing to the hierarchical layer number;
the second acquisition unit is used for acquiring unassigned B-class accounts in the sequenced B-class accounts;
the accumulation and distribution unit is used for sequentially accumulating the second accounting benefits of the unassigned B-class accounts from front to back, and if the sum of the second accounting benefits of the first K B-class accounts is smaller than or equal to the hierarchical average second accounting benefits and the sum of the second accounting benefits of the first K+1B-class accounts is larger than the hierarchical average second accounting benefits, dividing the first K B-class accounts into a group;
and the circulation judging unit is used for judging whether the N layers are divided.
Optionally, the accounting node selection module 33 may include:
the node numbering module is used for numbering M class A proxy nodes and N class B proxy nodes;
the numerical feedback module is used for respectively sending numerical feedback notices to the M class A proxy nodes and the N class B proxy nodes, and the numerical feedback notices are used for indicating to feed back an integer greater than zero to the current billing node in a limited time;
and the numerical value receiving module is used for receiving the numerical values respectively fed back by the class A proxy node and the class B proxy node in the limited time and determining the number of the accounting node of the next block according to the fed back numerical values.
Optionally, the value receiving module is specifically configured to receive values respectively fed back by the class a proxy node and the class B proxy node in a defined time, and determine the number of the accounting node of the next block according to the following formula according to the fed back values:
where loc is the number of the accounting node of the next block, R j And feeding back values for the j-th class A proxy node or the B-class proxy node after numbering.
According to the billing node selection device of the blockchain, a mixed DPOS (Delegated Proof of Stake, proxy rights and interests proving) mechanism is adopted, the billing node of each block except the created block is generated in the blockchain, the billing node of the next block is determined through the selection of the current billing node, and the billing node of the next block directly performs billing, so that the problem that in the existing workload proving (PoW) mechanism, all nodes participate in mining for contending for billing rights, a large amount of power and calculation force are consumed, and only the node which calculates a hash operation solution first can obtain one billing right, so that mining energy consumption is high can be solved. In addition, the class A proxy node and the class B proxy node are generated through the current accounting node, wherein the class A proxy node is a viewpoint leader node in a blockchain forum, the class B proxy node is representative of each hierarchy, and the accounting node of the next block is selected from the two classes A, B proxy nodes, so that the rights and interests of each hierarchy can be embodied, and the problems that the rights and interests of token owners of each hierarchy cannot be embodied, mining becomes more difficult and energy consumption becomes larger along with the increase of added nodes in the existing blockchain are solved.
It is to be understood that the above embodiments are merely illustrative of the application of the principles of the present application, but not in limitation thereof. Various modifications and improvements may be made by those skilled in the art without departing from the spirit and substance of the application, and are also considered to be within the scope of the application.

Claims (4)

1. A method of billing node selection for a blockchain, applied to a current billing node in the blockchain, the method comprising:
determining M class A proxy nodes, wherein the class A proxy nodes are viewpoint leader nodes in a blockchain forum;
determining N class B proxy nodes, wherein the N class B proxy nodes respectively belong to N different levels;
selecting a billing node of a next block from the class A proxy node and the class B proxy node;
writing the selection process and the result of the accounting node of the next block into the blockchain in the process of executing accounting operation;
sending a next block accounting notice to an accounting node of the next block;
the determining M class a proxy nodes includes:
obtaining class A accounts corresponding to all nodes for publishing information in a blockchain forum;
sorting all A-type accounts from large to small according to the quantity of first accounting benefits, wherein the first accounting benefits are used for measuring the support degree of other nodes in a blockchain on information released by the information releasing nodes;
determining nodes corresponding to the first M class A accounts after sequencing as viewpoint leader nodes in the blockchain forum;
determining M viewpoint leader nodes as class A proxy nodes;
the determining N class B proxy nodes includes:
b-type accounts of all nodes in the blockchain and corresponding second accounting benefits are obtained, wherein the second accounting benefits are residual accounting benefits corresponding to all nodes;
sorting all the B-type accounts from small to large according to the second accounting rights;
dividing the sequenced B-class accounts into N layers from front to back;
randomly selecting a class B account from class B accounts corresponding to each of the N hierarchies;
determining the node corresponding to the N B-type accounts selected randomly as a B-type proxy node;
the billing node selecting the next block from the class a proxy node and the class B proxy node comprises:
numbering the M class A proxy nodes and N class B proxy nodes;
respectively sending numerical feedback notices to the M class A proxy nodes and the N class B proxy nodes, wherein the numerical feedback notices are used for indicating to feed back an integer greater than zero to the current billing node in a limited time;
receiving the values fed back by the class A proxy node and the class B proxy node respectively within a limited time, and determining the number of the accounting node of the next block according to the fed back values;
the sorting of the B-class accounts into N layers from front to back specifically comprises:
s1, acquiring a hierarchical average second billing right, wherein the hierarchical average second billing right is the ratio of the sum of the second billing rights of all the B-class accounts after sequencing to the hierarchical layer;
s2, obtaining unassigned B-class accounts in the sequenced B-class accounts;
s3, accumulating the second accounting benefits of the unassigned B-type accounts from front to back in sequence, and dividing the first K B-type accounts into a group if the sum of the second accounting benefits of the first K B-type accounts is less than or equal to the hierarchical average second accounting benefits and the sum of the second accounting benefits of the first K+1B-type accounts is greater than the hierarchical average second accounting benefits;
and S4, judging whether the N layers are divided, if yes, ending the flow, otherwise, returning to the step S2.
2. The blockchain billing node selection method of claim 1, wherein the first billing benefit is for voting and the second billing benefit is for voting; the method further comprises the steps of:
and publishing information and a class A account of the information to a blockchain forum so that other nodes in the blockchain vote on the current billing node.
3. The method of claim 1, wherein in the step of determining the number of the billing node of the next block based on the value fed back, the number of the billing node of the next block is determined according to the following formula:
where loc is the number of the accounting node of the next block, R j And feeding back values for the j-th class A proxy node or the B-class proxy node after numbering.
4. A billing node selection apparatus of a blockchain, disposed in a current billing node of the blockchain, the apparatus comprising:
the class A agent determining module is used for determining M class A agent nodes, wherein the class A agent nodes are viewpoint leader nodes in the blockchain forum;
the class B agent determining module is used for determining N class B agent nodes, wherein the N class B agent nodes belong to N different levels;
the accounting node selection module is connected with the class A agent determination module and the class B agent determination module and is used for selecting an accounting node of the next block from the class A agent node and the class B agent node;
the billing module is connected with the billing node selection module and is used for writing the selection process and the result of the billing node of the next block into the blockchain in the process of executing the billing operation;
the notification sending module is connected with the accounting node selection module and is used for sending the accounting notification of the next block to the accounting node of the next block;
the class A agent determination module includes:
the A-class account acquisition unit is used for acquiring A-class accounts corresponding to all the nodes for issuing information in the blockchain forum;
the A-type account ordering unit is used for ordering all A-type accounts from large to small according to the quantity of first accounting benefits, wherein the first accounting benefits are used for measuring the support degree of other nodes in the blockchain on the information issued by the information issuing nodes;
the view leader node determining unit is used for determining nodes corresponding to the first M class A accounts as view leader nodes in the blockchain forum;
a class a agent determining unit configured to determine the perspective leader node as a class a agent node;
the class B agent determination module includes:
the B-type account acquisition unit is used for acquiring B-type accounts of all nodes in the blockchain and corresponding second accounting benefits;
the class B account ordering unit is used for ordering all class B accounts from small to large according to the quantity of second accounting benefits, wherein the second accounting benefits are the residual accounting benefits corresponding to all nodes;
the hierarchical division unit is used for dividing the ordered B-class accounts into N hierarchies from front to back;
the random selection unit is used for randomly selecting one B-class account from B-class accounts corresponding to each of the N layers;
the B-type agent determining unit is used for determining the node corresponding to the N B-type accounts selected at random as a B-type agent node;
the billing node selection module includes:
the node numbering module is used for numbering M class A proxy nodes and N class B proxy nodes;
the numerical feedback module is used for respectively sending numerical feedback notices to the M class A proxy nodes and the N class B proxy nodes, and the numerical feedback notices are used for indicating to feed back an integer greater than zero to the current billing node in a limited time;
the numerical value receiving module is used for receiving the numerical values respectively fed back by the class A proxy node and the class B proxy node in the limited time and determining the number of the accounting node of the next block according to the fed back numerical values;
the hierarchical division unit specifically includes:
the first acquisition unit is used for acquiring a hierarchical average second billing right, wherein the hierarchical average second billing right is the ratio of the sum of the second billing rights of all the B-class accounts after sequencing to the hierarchical layer number;
the second acquisition unit is used for acquiring unassigned B-class accounts in the sequenced B-class accounts;
the accumulation and distribution unit is used for sequentially accumulating the second accounting benefits of the unassigned B-class accounts from front to back, and if the sum of the second accounting benefits of the first K B-class accounts is smaller than or equal to the hierarchical average second accounting benefits and the sum of the second accounting benefits of the first K+1B-class accounts is larger than the hierarchical average second accounting benefits, dividing the first K B-class accounts into a group;
and the circulation judging unit is used for judging whether the N layers are divided, and if the N layers are not divided, the second obtaining unit continues to obtain the unassigned B-class account until the N layers are divided.
CN202011324794.9A 2020-11-23 2020-11-23 Method and device for selecting accounting node of blockchain Active CN112529703B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011324794.9A CN112529703B (en) 2020-11-23 2020-11-23 Method and device for selecting accounting node of blockchain

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011324794.9A CN112529703B (en) 2020-11-23 2020-11-23 Method and device for selecting accounting node of blockchain

Publications (2)

Publication Number Publication Date
CN112529703A CN112529703A (en) 2021-03-19
CN112529703B true CN112529703B (en) 2023-09-01

Family

ID=74992962

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011324794.9A Active CN112529703B (en) 2020-11-23 2020-11-23 Method and device for selecting accounting node of blockchain

Country Status (1)

Country Link
CN (1) CN112529703B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115952237B (en) * 2023-01-28 2023-06-09 北京星途探索科技有限公司 Multi-terminal data fusion system

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108596621A (en) * 2018-04-28 2018-09-28 深圳市优学链科技有限公司 Block chain accounting nodes generation method, device, computer equipment and storage medium
CN108921523A (en) * 2018-06-20 2018-11-30 郑文宸 Creation, method of commerce and the system of equity assets value token based on block chain
CN109102287A (en) * 2018-08-13 2018-12-28 中国联合网络通信集团有限公司 Block chain bookkeeping methods, device, equipment and storage medium
CN109639837A (en) * 2019-01-31 2019-04-16 东南大学 Block chain DPoS common recognition method based on faith mechanism
CN109964446A (en) * 2018-06-08 2019-07-02 北京大学深圳研究生院 A kind of common recognition method based on ballot
CN110689331A (en) * 2019-09-25 2020-01-14 重庆邮电大学 Block chain-based digital currency transaction method and system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11165862B2 (en) * 2017-10-24 2021-11-02 0Chain, LLC Systems and methods of blockchain platform for distributed applications

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108596621A (en) * 2018-04-28 2018-09-28 深圳市优学链科技有限公司 Block chain accounting nodes generation method, device, computer equipment and storage medium
CN109964446A (en) * 2018-06-08 2019-07-02 北京大学深圳研究生院 A kind of common recognition method based on ballot
CN108921523A (en) * 2018-06-20 2018-11-30 郑文宸 Creation, method of commerce and the system of equity assets value token based on block chain
CN109102287A (en) * 2018-08-13 2018-12-28 中国联合网络通信集团有限公司 Block chain bookkeeping methods, device, equipment and storage medium
CN109639837A (en) * 2019-01-31 2019-04-16 东南大学 Block chain DPoS common recognition method based on faith mechanism
CN110689331A (en) * 2019-09-25 2020-01-14 重庆邮电大学 Block chain-based digital currency transaction method and system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于委托权益证明的区块链共识算法改进研究;龙锐;《中国优秀硕士学位论文全文数据库信息科技辑》(第09期);第I138-38页,全文 *

Also Published As

Publication number Publication date
CN112529703A (en) 2021-03-19

Similar Documents

Publication Publication Date Title
CN108876560B (en) Method and device for performing credit evaluation on work publisher based on block chain
Froleyks et al. SAT competition 2020
TWI717349B (en) Servers for a reward-generating distributed digital resource farm and methods for controlling a server for a reward-generating distributed digital resource farm
KR20210008111A (en) Blockchain system with consensus algorithm based on proof-of -transaction and method there of
CN113421089A (en) Block chain-based available resource quota exchange method and device
KR102483037B1 (en) Blockchain-based set exchange method and apparatus for available resource quota
CN109615200B (en) Virtual interactive prop issuing method, storage medium, electronic device and system
Zhang et al. On modeling blockchain-enabled economic networks as stochastic dynamical systems
CN112529703B (en) Method and device for selecting accounting node of blockchain
US20200302534A1 (en) Blockchain-based method and apparatus for pre-exchanging available resource quotas
CN111967994A (en) Intelligent contract creating method and device
Fröwis et al. The operational cost of Ethereum airdrops
CN111966971A (en) Profit distribution method, apparatus, server and storage medium for copyright product
CN102750619A (en) Digital resource publishing/issuing system and method
CN113553378A (en) Block chain data deleting method and device
TWI706341B (en) Event prediction method and device, electronic equipment
TW202026993A (en) Method and apparatus for determining discount amount
CN109492847B (en) Multi-resource platform based on block chain and multi-resource allocation method
Chen et al. Novel probabilistic cost estimation model integrating risk allocation and claim in hydropower project
CN114285848A (en) Scalable method, system, electronic device and readable medium for blockchain resources
CN107705200A (en) Current account is layered the methods of figuring interest and device, computer equipment and storage medium
De Salve et al. Measuring eos. io dapp resource allocation and costs through a benchmark application
CN111142868A (en) Method and device for developing movable winning system
CN115269208B (en) Resource processing method and system based on formula configuration
CN113421178B (en) Integrating circulation method, device, equipment and storage medium

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