CN109727132B - Method and device for acquiring block chain consensus node, electronic equipment and storage medium - Google Patents

Method and device for acquiring block chain consensus node, electronic equipment and storage medium Download PDF

Info

Publication number
CN109727132B
CN109727132B CN201811622434.XA CN201811622434A CN109727132B CN 109727132 B CN109727132 B CN 109727132B CN 201811622434 A CN201811622434 A CN 201811622434A CN 109727132 B CN109727132 B CN 109727132B
Authority
CN
China
Prior art keywords
block chain
node
upper layer
blockchain
layer block
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
CN201811622434.XA
Other languages
Chinese (zh)
Other versions
CN109727132A (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.)
Hefei DappWorks Technology Co Ltd
Original Assignee
Hefei DappWorks 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 Hefei DappWorks Technology Co Ltd filed Critical Hefei DappWorks Technology Co Ltd
Priority to CN201811622434.XA priority Critical patent/CN109727132B/en
Publication of CN109727132A publication Critical patent/CN109727132A/en
Application granted granted Critical
Publication of CN109727132B publication Critical patent/CN109727132B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

The invention discloses a method and a device for acquiring a block chain consensus node, electronic equipment and a storage medium, wherein the method comprises the following steps: and sending the block data in the upper layer block chain corresponding to the upper layer block chain network to which the node belongs to the bottom layer block chain node, so that the block data is stored in the bottom layer block chain corresponding to the bottom layer block chain network through consensus verification by each bottom layer block chain node. Receiving election data sent by an upper layer blockchain node with a first account balance and/or a second account balance in an upper layer blockchain network to which the node belongs; and determining a common identification node from the upper layer block chain nodes selected by the election data based on the election data received in the round, so that the common identification node performs block packing operation in a new round. By applying the embodiment of the invention, the calculation resources of the upper layer blockchain node can be saved.

Description

Method and device for acquiring block chain consensus node, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of internet technologies, and in particular, to a method and an apparatus for acquiring a block chain consensus node, an electronic device, and a storage medium.
Background
Blockchains are a distributed accounting technique. The blockchain has the advantages of decentralization, no tampering and no need of trust guarantee of a third party, and is widely regarded.
There are various problems with current mainstream blockchain networks. The most prominent of these is the severe shortfall in transaction throughput per second (tps). Visa processes 1667 transactions per second on average in 2016, while bitcoin can only process 3 to 4 transactions per second, and etherhouses can only process 20 transactions per second. In order to make blockchains a truly viable transfer technology, it is not trivial to expand transaction throughput per second. In the conventional block chain network, in order to ensure smooth operation of the network, a common identification block chain node (common identification node) needs to be established, but in the prior art, the determination of the common identification block chain link node needs calculation resources of an upper layer block chain node to perform calculation, so that the prior art has the technical problem of consuming the calculation resources of the upper layer block chain node.
Disclosure of Invention
The invention aims to provide a method and a device for acquiring a block chain consensus node, electronic equipment and a storage medium, so as to save computational resources of upper layer block chain nodes.
The invention solves the technical problems through the following technical scheme:
the embodiment of the invention provides a method for acquiring a block chain common identification node, wherein a block chain network comprises a bottom layer block chain network and at least one upper layer block chain network, the bottom layer block chain network comprises a plurality of bottom layer block chain nodes, the upper layer block chain network comprises a plurality of upper layer block chain nodes, and the method is applied to the upper layer block chain nodes and comprises the following steps:
and sending the block data in the upper layer block chain corresponding to the upper layer block chain network to which the node belongs to the bottom layer block chain node, so that the block data is stored in the bottom layer block chain corresponding to the bottom layer block chain network through consensus verification by each bottom layer block chain node.
Receiving election data sent by an upper-layer blockchain node with a first account balance and/or a second account balance in an upper-layer blockchain network to which the node belongs, wherein the election data comprises: sending information of upper layer blockchain nodes in an upper layer blockchain network to which the node belongs, wherein the upper layer blockchain nodes are selected by the upper layer blockchain nodes of the election data;
determining a common identification node from upper layer block chain nodes selected by the election data based on the election data received in the round, so that the common identification node performs block packing operation in a new round;
the numerical value in the first account of any upper-layer blockchain node is used for representing the number of digital currencies of the upper-layer blockchain node, and the numerical value in the second account of any upper-layer blockchain node is used for representing the number of votes of the upper-layer blockchain node.
Optionally, the method further includes:
receiving transaction information sent by an upper layer blockchain node in an upper layer blockchain network to which the node belongs;
determining a preset numerical value according to the transaction information, wherein the preset numerical value is used for representing a numerical value added to a second account of an upper layer blockchain node of a transaction object provider corresponding to the transaction information;
and sending the preset numerical value to each upper layer block chain node in the upper layer block chain network to which the node belongs, so that each upper layer block chain node stores the preset numerical value into the corresponding upper layer block chain.
Optionally, the determining a preset value according to the transaction information includes:
and determining the preset value according to the total amount of the transaction matters corresponding to the transaction information.
Optionally, different upper tier blockchain networks correspond to different upper tier blockchains, the different upper tier blockchains storing transaction information corresponding to different types of transactions.
The embodiment of the invention provides a device for acquiring a block chain common identification node, wherein the block chain network comprises a bottom layer block chain network and at least one upper layer block chain network, the bottom layer block chain network comprises a plurality of bottom layer block chain nodes, the upper layer block chain network comprises a plurality of upper layer block chain nodes, and the device is applied to the upper layer block chain nodes and comprises the following steps:
and the safety processing module is used for sending the block data in the upper layer block chain corresponding to the upper layer block chain network to which the node belongs to the bottom layer block chain nodes, so that the block data is stored in the bottom layer block chain corresponding to the bottom layer block chain network through consensus verification by each bottom layer block chain node.
A consensus module, configured to receive election data sent by an upper area blockchain node having a first account balance and/or a second account balance in an upper area blockchain network to which the node belongs, where the election data includes: sending information of upper layer blockchain nodes in an upper layer blockchain network to which the node belongs, wherein the upper layer blockchain nodes are selected by the upper layer blockchain nodes of the election data; determining a common identification node from upper layer block chain nodes selected by the election data based on the election data received in the round, so that the common identification node performs block packing operation in a new round;
the numerical value in the first account of any upper-layer blockchain node is used for representing the number of digital currencies of the upper-layer blockchain node, and the numerical value in the second account of any upper-layer blockchain node is used for representing the number of votes of the upper-layer blockchain node.
Optionally, the method further includes:
the vote issuing module is used for receiving transaction information sent by an upper layer blockchain node in an upper layer blockchain network to which the node belongs; determining a preset numerical value according to the transaction information, wherein the preset numerical value is used for representing a numerical value added to a second account of an upper layer blockchain node of a transaction object provider corresponding to the transaction information; and sending the preset numerical value to each upper layer block chain node in the upper layer block chain network to which the node belongs, so that each upper layer block chain node stores the preset numerical value into the corresponding upper layer block chain.
Optionally, the determining, by the vote issuing module, a preset value according to the transaction information includes:
and the vote issuing module is used for determining the preset numerical value according to the total amount of the transaction matters corresponding to the transaction information.
Optionally, different upper tier blockchain networks correspond to different upper tier blockchains, the different upper tier blockchains storing transaction information corresponding to different types of transactions.
The embodiment of the invention provides computer equipment, which comprises a memory, a processor and a computer program which is stored on the memory and can run on the processor, wherein when the processor executes the program, the method for acquiring the block chain consensus node is realized.
The embodiment of the invention provides a computer-readable storage medium, on which executable instructions are stored, and when the instructions are executed by a processor, the processor is caused to execute any one of the above methods for acquiring a blockchain consensus node.
Compared with the prior art, the invention has the following advantages:
by applying the embodiment of the invention, the upper layer blockchain node sending the voting data is the upper layer blockchain node holding the votes and/or the digital currency, the election data comprises the information of the upper layer blockchain node in the same blockchain network selected by the upper layer blockchain node sending the election data, and the consensus node is determined from the upper layer blockchain nodes selected by the election data in one turn.
Drawings
Fig. 1 is an exemplary system architecture to which the method and apparatus for acquiring a blockchain consensus node may be applied, according to an embodiment of the present disclosure;
fig. 2 is a schematic flowchart of a method for acquiring a blockchain consensus node according to an embodiment of the present invention;
fig. 3A is an architectural schematic diagram of a blockchain network according to an embodiment of the present disclosure;
figure 3B schematically illustrates an upper zone block chain schematic corresponding to an upper zone block chain network, in accordance with an embodiment of the present disclosure;
fig. 4 is a schematic structural diagram of an apparatus for acquiring a block chain common node according to an embodiment of the present invention;
fig. 5 schematically illustrates a block diagram of a blockchain system in accordance with an embodiment of the present disclosure;
fig. 6 schematically shows a block diagram of a computer device adapted to implement the above described method according to an embodiment of the present disclosure.
Detailed Description
The following examples are given for the detailed implementation and specific operation of the present invention, but the scope of the present invention is not limited to the following examples.
The embodiment of the invention provides a method and a device for acquiring a block chain consensus node, an electronic device and a storage medium, and firstly introduces the method for acquiring the block chain consensus node provided by the embodiment of the invention.
The embodiment of the invention is preferably applicable to a novel block chain network, and the block chain network comprises a bottom layer block chain network and at least one upper layer block chain network, wherein the bottom layer block chain network comprises a plurality of bottom layer block chain nodes, and the upper layer block chain network comprises a plurality of upper layer block chain nodes. The method comprises a block data sending stage and a security reinforcing stage, wherein the block data sending stage is executed by an upper layer block chain node, the block data in an upper layer block chain corresponding to an upper layer block chain network to which the node belongs is sent to a bottom layer block chain node,
fig. 1 is an exemplary system architecture 100 to which methods and apparatus for acquiring a blockchain consensus node may be applied, according to an embodiment of the present disclosure. It should be noted that fig. 1 is only an example of a system architecture to which the embodiments of the present disclosure may be applied to help those skilled in the art understand the technical content of the present disclosure, and does not mean that the embodiments of the present disclosure may not be applied to other devices, systems, environments or scenarios.
As shown in FIG. 1, a system architecture 100 according to this embodiment may include a plurality of electronic devices (101-107). The electronic devices (101-107) may be Personal Computers (PCs), web servers, database servers, and the like. Each of the electronic devices (101-107) may have the same or different computing capabilities.
As an embodiment, a plurality of electronic devices may communicate with each other to form a blockchain network, each electronic device serves as a blockchain node in the blockchain network, and each blockchain node maintains the same blockchain database (hereinafter, collectively referred to as "blockchain"). In addition, in the system architecture 100, each tile link point may respectively communicate with computing devices (e.g., a server/server cluster, a terminal device, etc.) of different service providers and/or clients, that is, each service provider and/or client may respectively serve as a corresponding tile link point for each service provider and/or client, and each service provider and/or client may perform operations such as reading and writing data in a tile chain through the corresponding tile link point.
It should be understood that the number of electronic devices in fig. 1 is merely illustrative. There may be any number of electronic devices, as desired for implementation.
The method for acquiring a blockchain consensus node provided by the embodiment of the disclosure can be executed in the electronic device shown in fig. 1.
The method is applied to a novel block chain network constructed by the method, the block chain network comprises a bottom layer block chain network and at least one upper layer block chain network, the bottom layer block chain network comprises a plurality of bottom layer block chain nodes, and the upper layer block chain network comprises a plurality of upper layer block chain nodes. The method is executed by an upper-layer blockchain node in a blockchain network, and the acquisition process of the blockchain consensus node provided by the disclosure is described from the upper-layer blockchain node side.
The method includes acquiring block data in an upper layer block chain corresponding to an upper layer block chain network to which a node belongs in operation S201.
Then, in operation S202, the block data is sent to the bottom layer block chain nodes, so that each bottom layer block chain node stores the block data in a bottom layer block chain corresponding to the bottom layer block chain network through consensus verification.
It can be seen that, the method shown in fig. 2 creatively constructs a composite dual-layer blockchain network including a bottom-layer blockchain network and at least one upper-layer blockchain network, for any upper-layer blockchain network, an upper-layer blockchain node in the upper-layer blockchain network can send block data in a blockchain corresponding to the upper-layer blockchain network to the bottom-layer blockchain network, the block data in the upper-layer blockchain is further stored in the bottom-layer blockchain by the bottom-layer blockchain node through common identification verification, so that the validity of the block data in the upper-layer blockchain is double verified by the upper-layer blockchain network and the bottom-layer blockchain network, the security of the block data is double protected by the upper-layer blockchain and the bottom-layer blockchain, the multi-side evidence and non-falsification characteristics of the blockchain are further enhanced, and the existing one-dimensional blockchain network is expanded into a two-dimensional blockchain network by the combination of the bottom-layer blockchain network and the upper-layer blockchain network, the method can greatly improve the transaction throughput of the whole block chain network, and meets the requirement of the current rapidly-developed transaction current situation on the block chain network.
In an embodiment of the present disclosure, sending the block data in the upper layer blockchain node corresponding to the upper layer blockchain network to which the node belongs to the method shown in fig. 2 to the bottom layer blockchain node may specifically include: and when the node serves as a common node to create a new block and adds the new block into the upper layer block chain, sending data corresponding to the new block to the bottom layer block chain node. Or when the node serves as a common node to create a new block and adds the new block into the upper layer block chain, sending data corresponding to a preset number of blocks before the new block to the bottom layer block chain node.
According to this embodiment, for any upper layer blockchain network, in one case, an upper layer blockchain node serving as a common identification node may create a new block and chain the block into the end of an upper layer blockchain corresponding to the upper layer blockchain network, and at the same time, send the related data of the new block to a lower layer blockchain network, that is, the related data of the new block is synchronized to the lower layer blockchain network while the upper layer blockchain generates the latest block, so that each lower layer blockchain node in the lower layer blockchain network can store the related data of the latest block in the upper layer blockchain into the lower layer blockchain after common identification verification, and this process is the same for each newly generated block in the upper layer blockchain. Therefore, the latest block generated in each time in the upper layer block chain can be synchronously verified by each bottom layer block chain node in the bottom layer block chain network, if the latest block has a problem, the feedback of the bottom layer block chain network can be obtained in time, and then the upper layer block chain network can avoid that a new block is subsequently linked behind the problematic block.
In another case, the upper layer block chain node serving as the common identification node may create a new block and chain the block into the end of the upper layer block chain corresponding to the upper layer block chain network, and at the same time, send the related data of a preset number of blocks located before the new block in the upper layer block chain to the lower layer block chain network, that is, the related data of the irreversible block already existing in the upper layer block chain for a period of time is synchronized to the lower layer block chain network, so that each lower layer block chain node in the lower layer block chain network can store the related data of the irreversible block in the upper layer block chain into the lower layer block chain after the common identification verification, where the process is the same for each irreversible block in the upper layer block chain. In this way, the upper block chain network synchronizes the block in the upper block chain, which is in an irreversible state after a period of time, to the bottom block chain, that is, directly synchronizes the block with higher reliability to the bottom block chain.
It can be known that, no matter which way is adopted to synchronize the block data in the upper layer block chain to the lower layer block chain, the only data stored in the lower layer block chain is legal and credible block data in each upper layer block chain, and especially, under the condition that the upper layer block chain network is not complete and the number of nodes of the upper layer block chain is small, so that the legality and the safety of the blocks stored in the upper layer block chain are low, the block data of the upper layer block chain confirmed to be credible is stored in the lower layer block chain, so that the block data is used as the legal basis of the blocks in the upper layer block chain, and the stability of the upper layer block chain network is maintained.
In operation S203, for any upper-level blockchain network, election data sent by an upper-level blockchain node having a first account balance and/or a second account balance in the upper-level blockchain network to which the node belongs is received, where the election data includes: sending information of upper layer blockchain nodes in an upper layer blockchain network to which the node belongs, wherein the upper layer blockchain nodes are selected by the upper layer blockchain nodes of the election data;
in operation S204, a consensus node is determined from the upper layer blockchain nodes selected by the election data based on the election data received in the current round, so that the consensus node performs a block packing operation in a new round.
And the numerical value in the first account of any upper-layer blockchain node is used for representing the number of the digital currency of the upper-layer blockchain node, and the numerical value in the second account of any upper-layer blockchain node is used for representing the number of the votes of the upper-layer blockchain node. If the upper blockchain node with the first account balance is the upper blockchain node holding digital currency and the upper blockchain node with the second account balance is the upper blockchain node holding a vote, the source of the election data received in the above operations may be: the system comprises upper layer blockchain nodes holding digital currency, upper layer blockchain nodes holding votes and upper layer blockchain nodes holding both the digital currency and the votes. The digital currency is virtual currency circulated by an exchange in an upper block chain network, and the vote is virtual currency which is different from the digital currency and is issued to upper block chain nodes according to a certain rule.
In an embodiment of the present disclosure, the consensus mechanism adopted by the bottom-layer blockchain is a Proof of Work (POW) consensus mechanism, which guarantees the credibility and security of the data stored in the bottom-layer blockchain at the cost of a large amount of computational resources consumed by each bottom-layer blockchain node, so as to provide effective data backup for each upper-layer blockchain network.
The method shown in fig. 2 is further described with reference to fig. 3A-3B in conjunction with specific embodiments.
Fig. 3A schematically shows an architectural schematic of a blockchain network according to an embodiment of the present disclosure.
As shown in fig. 3A, the block chain network includes a bottom block chain network 301 and three upper block chain networks 302, 303, and 304, where the bottom block chain network 301 corresponds to a bottom block chain, the three upper block chain networks 302, 303, and 304 correspond to three different upper block chains, respectively, the upper block chain network 302 corresponds to an upper block chain of a house leasing platform, the upper block chain network 303 corresponds to an upper block chain of a network data traffic sharing platform, and the upper block chain network 304 corresponds to an upper block chain of a computer computing resource sharing platform. Each upper layer blockchain network comprises a plurality of upper layer blockchain nodes, and the upper layer blockchain nodes with different shapes shown in the figure represent upper layer blockchain nodes with different function authorities.
The underlay area blockchain network employs a workload proof consensus mechanism. For any upper-layer blockchain network, a novel delegation rights and interests (D (POS + POX)) consensus mechanism obtained by improvement on the basis of a Delegated Proof of trust (DPOS) consensus mechanism is adopted to achieve consensus, the novel delegation rights and interests (D + POX)) consensus mechanism is that upper-layer blockchain nodes with digital currency are allowed to carry out consensus election, and upper-layer blockchain nodes with votes are also allowed to carry out consensus election, and the votes are issued to the upper-layer blockchain nodes contributing to the upper-layer blockchain network according to certain rules. For example, for the upper layer blockchain network 302, a corresponding number of votes are issued for the upper layer blockchain node of the provider of the rented house according to the information such as the number of houses rented, the number of days, and the like, for the upper layer blockchain network 303, a corresponding number of votes are issued for the upper layer blockchain node of the provider of the network data traffic according to the information such as the total amount of the shared network data traffic, the time, and the like, and for the upper layer blockchain network 304, a corresponding number of votes are issued for the upper layer blockchain node of the provider of the computing resource according to the information such as the total amount of the shared computing resource, the time, and the like. And further, respective consensus mechanisms of the upper layer blockchain networks are achieved, and the upper layer blockchain networks operate according to the respective consensus mechanisms.
For any upper-layer blockchain network, a plurality of upper-layer blockchain nodes form the upper-layer blockchain network, the upper-layer blockchain nodes can participate in the starting, proceeding and ending of transactions between a requester and a provider through an intelligent contract, the upper-layer blockchain nodes can issue votes through the intelligent contract, the intelligent contract is usually a code which is preset in a blockchain and can be triggered to execute, and can be operated in the blockchain nodes to execute corresponding operations after a trigger condition is met.
Fig. 3B schematically illustrates an upper zone blockchain schematic corresponding to an upper zone blockchain network according to an embodiment of the present disclosure.
As shown in fig. 3B, the upper layer blockchain may be a blockchain corresponding to any upper layer blockchain network in fig. 3A, and the upper layer blockchain corresponding to the upper layer blockchain network 302 is described as an example, where 4 block data structures currently exist in the upper layer blockchain.
After the upper layer block chain network 302 determines the common identification node of the current round through a D (POS + POX) common identification mechanism, the common identification nodes are packaged to create a new block 5, after several common identification confirmations, when the block 5 is linked into the upper layer block chain shown in fig. 3B, data corresponding to the block 5 may be sent to the bottom layer block chain network, each bottom layer block chain node in the bottom layer block chain network determines the common identification node in the bottom layer block chain network through a POW common identification mechanism, and the common identification node packages the received data corresponding to the block 5 into the new block and links the new block into the bottom layer block chain through common identification verification by each bottom layer block chain node. Or, after the upper layer block chain network 302 determines the common identification node of the current round through the D (POS + POX) common identification mechanism, the common identification node packages and creates a new block 5, after several common identification confirmations, when the block 5 is linked into the upper layer block chain shown in fig. 3B, the data corresponding to the block 2 that is already in an irreversible state before the block 5 may be sent to the bottom layer block chain network, each bottom layer block chain node in the bottom layer block chain network determines the common identification node in the bottom layer block chain network through the POW common identification mechanism, and the common identification node packages the received data corresponding to the block 2 into the new block and links the new block into the bottom layer block chain through common identification verification by each bottom layer block chain node.
Similarly, each block in the upper layer block chain corresponding to the upper layer block chain network 302 is sent to the lower layer block chain network, each block in the upper layer block chains corresponding to other upper layer block chain networks is sent to the lower layer block chain network, and legal data in all the upper layer block chains are stored in the lower layer block chain.
Furthermore, for an upper layer block chain node in any upper layer block chain network, whether the block is legal or not can be authenticated by inquiring the hash value of any block in the upper layer block chain corresponding to the upper layer block chain network where the upper layer block chain node is located from the bottom layer block chain. Thus, the blocks of each upper block chain become relatively irreversible. When a malicious node tampers a block, or a hacker attacks a block-building node to tamp the block and further to cause bifurcation, the hash value of the current upper layer blockchain can be compared with the hash value of the upper layer blockchain stored in the bottom layer blockchain, so that which of the bifurcations of the plurality of upper layer blockchains is the correct upper layer blockchain can be confirmed.
As can be seen, for any upper area blockchain network, the consensus node is determined through election data sent by each upper area blockchain node, specifically, the upper area blockchain node sending the voting data is an upper area blockchain node holding votes and/or digital currency, the election data includes information of upper area blockchain nodes in the same upper area blockchain network selected by the upper area blockchain node sending the election data, and the consensus node is determined from the upper area blockchain nodes selected by each election data within one round. Compared with the scheme for determining the consensus block chain node in the prior art, the scheme does not need to consume the calculation resources of the upper layer block chain node, and because the scheme exerts influence on the election authority of the upper layer block chain node through two modes of vote and digital currency, the development of the consensus of the upper layer block chain towards the centralization trend of digital currency gathered in a small number of upper layer block chain nodes can be effectively avoided, and the decentralization characteristic of an upper layer block chain network is maintained.
In the embodiment of the disclosure, votes can be issued to upper-layer blockchain nodes in an upper-layer blockchain network through different rules according to needs so as to exert influence on the consensus election through the votes. Preferably, votes can be issued to the upper layer blockchain nodes contributing to the upper layer blockchain network, and a right is given to the contributing upper layer blockchain node consensus nodes, so as to stimulate each blockchain node in the same upper layer blockchain network to maintain the normal operation of the upper layer blockchain network together.
Specifically, as an alternative embodiment, the method shown in fig. 2 further includes: receiving transaction information sent by an upper layer blockchain node in an upper layer blockchain network to which the node belongs; determining a preset numerical value according to the transaction information, wherein the preset numerical value is used for representing a numerical value added to a second account of an upper layer blockchain node of a transaction object provider corresponding to the transaction information; and sending the preset numerical value to each upper layer block chain node in the upper layer block chain network to which the node belongs, so that each upper layer block chain node stores the preset numerical value into the corresponding upper layer block chain.
Optionally, different upper tier blockchain networks correspond to different upper tier blockchains, the different upper tier blockchains storing transaction information corresponding to different types of transactions.
The embodiment describes a scheme for issuing votes to an upper layer blockchain node in an upper layer blockchain network, where transaction information is information of events in which transactions are performed between the upper layer blockchain nodes, and under different conditions, the upper layer blockchain node serving as a transaction provider may be a full node or a light node, and the upper layer blockchain node serving as a transaction purchaser may be a full node or a light node; the full node is a blockchain node capable of performing a block data structure packing operation, performing a data recording operation, and running an intelligent contract, while the light node cannot perform the block data structure packing operation and the data recording operation and cannot run the intelligent contract, but may have a first account and a second account regardless of the full node or the light node. The transaction information sent by the upper layer blockchain node comprises at least one of the following items: information of the transaction object, information of the transaction object provider, and information of the transaction object purchaser. And issuing a vote with a preset numerical value to the upper layer blockchain node serving as a transaction provider. When the vote is issued, the identification information of the upper layer blockchain node as the transaction provider and the determined preset numerical value can be broadcasted to each upper layer blockchain node together, so that each upper layer blockchain node with data recording capability correspondingly stores the identification information and the preset numerical value of the upper layer blockchain node as a transaction provider into a respective blockchain database, the corresponding relation between the identification information of the upper block chain node as a transaction provider and a preset numerical value is uniformly recorded in the upper block chain, namely, information which represents that a preset value is added to a second account which is an upper layer blockchain node of a transaction object provider is uniformly recorded, this information is co-supervised by each upper blockchain node in the blockchain, and in accordance with the above, this information is also synchronized into the underlying blockchain to ensure the monitorability and irreversibility of the vote issuing process.
As an optional embodiment, the determining the preset value according to the transaction information includes: and determining the preset value according to the total amount of the transaction matters corresponding to the transaction information. The method comprises the steps of measuring the contribution of an upper layer blockchain node serving as a provider of the transaction to an upper layer blockchain network where the upper layer blockchain node is located according to the total amount of the transaction, and issuing votes corresponding to the contribution of the upper layer blockchain node serving as the provider of the transaction.
Based on the above description, the beneficial effects of the present disclosure are as follows:
firstly, the present disclosure adopts a structure of a bottom layer blockchain network and a layer blockchain network, different upper layer blockchain networks correspond to different application scenes, and the corresponding upper layer blockchain records data of different application scenes, and this structure expands a one-dimensional blockchain into two dimensions, thereby greatly increasing the transaction throughput of the whole blockchain network.
Secondly, each application scene uses an independent upper layer block chain, and different application scenes are isolated by the framework through different upper layer block chains, so that each application scene can customize the upper layer block chain according to unique requirements of the application scene, and the performance of the upper layer block chains of other application scenes cannot be influenced.
Thirdly, according to the method, the block data of all the upper layer block chains are stored by using the bottom layer block chain, so that the data security and the ground of the newly added upper layer block chain are improved, and the risk that the block data of the newly added upper layer block chain can be tampered by a malicious blockmaker or hacker in the initial stage is greatly reduced.
Corresponding to the embodiment shown in fig. 2 of the present invention, an embodiment of the present invention further provides an apparatus for acquiring a block chain consensus node.
Fig. 4 is a schematic structural diagram of an apparatus for acquiring a block chain common node according to an embodiment of the present invention, as shown in fig. 4, a block chain network includes a bottom-layer block chain network and at least one upper-layer block chain network, where the bottom-layer block chain network includes a plurality of bottom-layer block chain nodes, and the upper-layer block chain network includes a plurality of upper-layer block chain nodes, where the apparatus is applied to the upper-layer block chain nodes, and includes:
the security processing module 401 is configured to send the block data in the upper layer block chain corresponding to the upper layer block chain network to which the node belongs to the bottom layer block chain node, so that each bottom layer block chain node stores the block data in the bottom layer block chain corresponding to the bottom layer block chain network through consensus verification.
The consensus module 402 is configured to receive election data sent by an upper node in an upper node chain network to which the node belongs, where the upper node has a first account balance and/or a second account balance, where the election data includes: sending information of upper layer blockchain nodes in an upper layer blockchain network to which the node belongs, wherein the upper layer blockchain nodes are selected by the upper layer blockchain nodes of the election data; and determining a common identification node from the upper layer block chain nodes selected by the election data based on the election data received in the round, so that the common identification node performs block packing operation in a new round.
The numerical value in the first account of any upper-layer blockchain node is used for representing the number of digital currencies of the upper-layer blockchain node, and the numerical value in the second account of any upper-layer blockchain node is used for representing the number of votes of the upper-layer blockchain node.
In an embodiment of the present disclosure, the vote issuing module 403 is configured to receive transaction information sent by an upper-level blockchain node in an upper-level blockchain network to which the current node belongs; determining a preset numerical value according to the transaction information, wherein the preset numerical value is used for representing a numerical value added to a second account of an upper layer blockchain node of a transaction object provider corresponding to the transaction information; and sending the preset numerical value to each upper layer block chain node in the upper layer block chain network to which the node belongs, so that each upper layer block chain node stores the preset numerical value into the corresponding upper layer block chain.
As an optional embodiment, the determining, by the vote issuing module 403, the preset value according to the transaction information includes: the vote issuing module 403 is configured to determine the preset value according to the total amount of the transaction items corresponding to the transaction information.
By applying the embodiment shown in fig. 4 of the present invention, the upper layer blockchain node sending out the voting data is an upper layer blockchain node holding votes and/or digital currencies, the election data includes information of upper layer blockchain nodes in the same blockchain network selected by the upper layer blockchain node sending out the election data, and the consensus node is determined from the upper layer blockchain nodes selected by each election data within one round.
Based on the embodiment of the invention illustrated in fig. 1, fig. 5 schematically illustrates a block diagram of a blockchain system according to an embodiment of the present disclosure.
As shown in fig. 5, the blockchain system 500 includes: a bottom layer blockchain network 510 and at least one upper layer blockchain network 520.
The underlay blockchain network 510 includes a plurality of underlay blockchain nodes 511 and the overlay blockchain network 520 includes a plurality of overlay blockchain nodes 521.
The upper layer blockchain node 521 is configured to send the block data in the upper layer blockchain corresponding to the upper layer blockchain network 520 to which the upper layer blockchain node 521 belongs to the lower layer blockchain node 511.
The bottom-layer block chain nodes 511 are configured to broadcast the received block data to each bottom-layer block chain node 511, so that each bottom-layer block chain node 511 stores the block data in a bottom-layer block chain corresponding to the bottom-layer block chain network 510 through consensus verification.
It should be noted that the implementation, solved technical problems, implemented functions, and achieved technical effects of each module/unit/subunit and the like in the apparatus part embodiment are respectively the same as or similar to the implementation, solved technical problems, implemented functions, and achieved technical effects of each corresponding step in the method part embodiment, and are not described herein again.
Any number of modules, sub-modules, units, sub-units, or at least part of the functionality of any number thereof according to embodiments of the present disclosure may be implemented in one module. Any one or more of the modules, sub-modules, units, and sub-units according to the embodiments of the present disclosure may be implemented by being split into a plurality of modules. Any one or more of the modules, sub-modules, units, sub-units according to embodiments of the present disclosure may be implemented at least in part as a hardware circuit, such as a Field Programmable Gate Array (FPGA), a Programmable Logic Array (PLA), a system on a chip, a system on a substrate, a system on a package, an Application Specific Integrated Circuit (ASIC), or may be implemented in any other reasonable manner of hardware or firmware by integrating or packaging a circuit, or in any one of or a suitable combination of software, hardware, and firmware implementations. Alternatively, one or more of the modules, sub-modules, units, sub-units according to embodiments of the disclosure may be at least partially implemented as a computer program module, which when executed may perform the corresponding functions.
For example, any of the security processing module 401, the consensus module 402, and the vote issuance module 403 may be combined into one module for implementation, or any one of the modules may be split into multiple modules. Alternatively, at least part of the functionality of one or more of these modules may be combined with at least part of the functionality of the other modules and implemented in one module. According to an embodiment of the present disclosure, at least one of the security processing module 401, the consensus module 402, and the vote issuing module 403 may be implemented at least partially as a hardware circuit, such as a Field Programmable Gate Array (FPGA), a Programmable Logic Array (PLA), a system on a chip, a system on a substrate, a system on a package, an Application Specific Integrated Circuit (ASIC), or may be implemented in hardware or firmware in any other reasonable manner of integrating or packaging a circuit, or in any one of three implementations of software, hardware, and firmware, or in any suitable combination of any of them. Alternatively, at least one of the security processing module 401, the consensus module 402, and the vote issuing module 403 may be at least partly implemented as a computer program module, which when executed may perform the corresponding functions.
Fig. 6 schematically shows a block diagram of a computer device adapted to implement the above described method according to an embodiment of the present disclosure. The computer device shown in fig. 6 is only an example and should not bring any limitation to the function and scope of use of the embodiments of the present disclosure.
As shown in fig. 6, a computer apparatus 600 according to an embodiment of the present disclosure includes a processor 601 which can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM)602 or a program loaded from a storage section 608 into a Random Access Memory (RAM) 603. Processor 601 may include, for example, a general purpose microprocessor (e.g., a CPU), an instruction set processor and/or associated chipset, and/or a special purpose microprocessor (e.g., an Application Specific Integrated Circuit (ASIC)), among others. The processor 601 may also include onboard memory for caching purposes. Processor 601 may include a single processing unit or multiple processing units for performing different actions of a method flow according to embodiments of the disclosure.
In the RAM 603, various programs and data necessary for the operation of the apparatus 600 are stored. The processor 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. The processor 601 performs various operations of the method flows according to the embodiments of the present disclosure by executing programs in the ROM 602 and/or RAM 603. It is to be noted that the programs may also be stored in one or more memories other than the ROM 602 and RAM 603. The processor 601 may also perform various operations of the method flows according to embodiments of the present disclosure by executing programs stored in the one or more memories.
According to an embodiment of the present disclosure, device 600 may also include an input/output (I/O) interface 605, input/output (I/O) interface 605 also being connected to bus 604. The device 600 may also include one or more of the following components connected to the I/O interface 605: an input portion 606 including a keyboard, a mouse, and the like; an output portion 607 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage section 608 including a hard disk and the like; and a communication section 609 including a network interface card such as a LAN card, a modem, or the like. The communication section 609 performs communication processing via a network such as the internet. The driver 610 is also connected to the I/O interface 605 as needed. A removable medium 611 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 610 as necessary, so that a computer program read out therefrom is mounted in the storage section 608 as necessary.
According to embodiments of the present disclosure, method flows according to embodiments of the present disclosure may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 609, and/or installed from the removable medium 611. The computer program, when executed by the processor 601, performs the above-described functions defined in the system of the embodiments of the present disclosure. The systems, devices, apparatuses, modules, units, etc. described above may be implemented by computer program modules according to embodiments of the present disclosure.
The present disclosure also provides a computer-readable storage medium, which may be contained in the apparatus/device/system described in the above embodiments; or may exist separately and not be assembled into the device/apparatus/system. The computer-readable storage medium carries one or more programs which, when executed, implement the method according to an embodiment of the disclosure.
According to embodiments of the present disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium, which may include, for example but is not limited to: a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. For example, according to embodiments of the present disclosure, a computer-readable storage medium may include the ROM 602 and/or RAM 603 described above and/or one or more memories other than the ROM 602 and RAM 603.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents and improvements made within the spirit and principle of the present invention are intended to be included within the scope of the present invention.

Claims (10)

1. A method for acquiring a block chain common identification node, wherein the block chain network comprises a bottom layer block chain network and at least one upper layer block chain network, the bottom layer block chain network comprises a plurality of bottom layer block chain nodes, the upper layer block chain network comprises a plurality of upper layer block chain nodes, and the method is applied to the upper layer block chain nodes and comprises the following steps:
sending the block data in the upper layer block chain corresponding to the upper layer block chain network to which the node belongs to the bottom layer block chain node, so that the block data is stored in the bottom layer block chain corresponding to the bottom layer block chain network through consensus verification by each bottom layer block chain node;
receiving election data sent by an upper-layer blockchain node with a first account balance and/or a second account balance in an upper-layer blockchain network to which the node belongs, wherein the election data comprises: sending information of upper layer blockchain nodes in an upper layer blockchain network to which the node belongs, wherein the upper layer blockchain nodes are selected by the upper layer blockchain nodes of the election data;
determining a common identification node from upper layer block chain nodes selected by the election data based on the election data received in the round, so that the common identification node performs block packing operation in a new round;
the numerical value in the first account of any upper-layer blockchain node is used for representing the number of digital currencies of the upper-layer blockchain node, and the numerical value in the second account of any upper-layer blockchain node is used for representing the number of votes of the upper-layer blockchain node.
2. The method of claim 1, further comprising:
receiving transaction information sent by an upper layer blockchain node in an upper layer blockchain network to which the node belongs;
determining a preset numerical value according to the transaction information, wherein the preset numerical value is used for representing a numerical value added to a second account of an upper layer blockchain node of a transaction object provider corresponding to the transaction information;
and sending the preset numerical value to each upper layer block chain node in the upper layer block chain network to which the node belongs, so that each upper layer block chain node stores the preset numerical value into the corresponding upper layer block chain.
3. The method of claim 2, wherein the determining a preset value based on the transaction information comprises:
and determining the preset value according to the total amount of the transaction matters corresponding to the transaction information.
4. The method of claim 1, wherein different networks of upper zone block chains correspond to different upper zone block chains, the different upper zone block chains storing transaction information corresponding to different types of transactions.
5. An apparatus for acquiring a block chain common node, where the block chain network includes a bottom-layer block chain network and at least one upper-layer block chain network, the bottom-layer block chain network includes a plurality of bottom-layer block chain nodes, and the upper-layer block chain network includes a plurality of upper-layer block chain nodes, and the apparatus is applied to the upper-layer block chain nodes, and includes:
the safety processing module is used for sending the block data in the upper layer block chain corresponding to the upper layer block chain network to which the node belongs to the bottom layer block chain nodes, so that the block data are stored in the bottom layer block chain corresponding to the bottom layer block chain network through consensus verification by each bottom layer block chain node;
a consensus module, configured to receive election data sent by an upper area blockchain node having a first account balance and/or a second account balance in an upper area blockchain network to which the node belongs, where the election data includes: sending information of upper layer blockchain nodes in an upper layer blockchain network to which the node belongs, wherein the upper layer blockchain nodes are selected by the upper layer blockchain nodes of the election data; determining a common identification node from upper layer block chain nodes selected by the election data based on the election data received in the round, so that the common identification node performs block packing operation in a new round;
the numerical value in the first account of any upper-layer blockchain node is used for representing the number of digital currencies of the upper-layer blockchain node, and the numerical value in the second account of any upper-layer blockchain node is used for representing the number of votes of the upper-layer blockchain node.
6. The apparatus of claim 5, further comprising:
the vote issuing module is used for receiving transaction information sent by an upper layer blockchain node in an upper layer blockchain network to which the node belongs; determining a preset numerical value according to the transaction information, wherein the preset numerical value is used for representing a numerical value added to a second account of an upper layer blockchain node of a transaction object provider corresponding to the transaction information; and sending the preset numerical value to each upper layer block chain node in the upper layer block chain network to which the node belongs, so that each upper layer block chain node stores the preset numerical value into the corresponding upper layer block chain.
7. The apparatus of claim 6, wherein the vote issuing module determining a preset value based on the transaction information comprises:
and the vote issuing module is used for determining the preset numerical value according to the total amount of the transaction matters corresponding to the transaction information.
8. The apparatus of claim 5, wherein different networks of upper zone block chains correspond to different upper zone block chains, the different upper zone block chains storing transaction information corresponding to different types of transactions.
9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the method of acquiring a blockchain consensus node according to any one of claims 1 to 4 when executing the program.
10. A computer-readable storage medium having stored thereon executable instructions that, when executed by a processor, cause the processor to perform the method of acquiring a blockchain consensus node according to any one of claims 1-4.
CN201811622434.XA 2018-12-28 2018-12-28 Method and device for acquiring block chain consensus node, electronic equipment and storage medium Active CN109727132B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811622434.XA CN109727132B (en) 2018-12-28 2018-12-28 Method and device for acquiring block chain consensus node, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811622434.XA CN109727132B (en) 2018-12-28 2018-12-28 Method and device for acquiring block chain consensus node, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN109727132A CN109727132A (en) 2019-05-07
CN109727132B true CN109727132B (en) 2021-03-23

Family

ID=66297603

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811622434.XA Active CN109727132B (en) 2018-12-28 2018-12-28 Method and device for acquiring block chain consensus node, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN109727132B (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110688426B (en) * 2019-08-21 2021-12-10 北京邮电大学 Second-level heartbeat synchronization method for block chain big database
CN110443713B (en) * 2019-09-06 2022-02-15 江门职业技术学院 Method and system for improving block chain transaction efficiency
CN110933173B (en) * 2019-12-03 2022-08-09 上海墨珩网络科技有限公司 Block chain technology-based networking method and device
CN111127160B (en) * 2019-12-24 2024-04-09 京东科技信息技术有限公司 Data processing method, device and blockchain system for carbon asset transaction
CN111311414B (en) * 2020-02-27 2023-12-08 杭州云象网络技术有限公司 Block chain multiparty consensus method based on consistent hash algorithm
CN111464631B (en) * 2020-03-31 2023-03-28 成都质数斯达克科技有限公司 Service consensus method and device in alliance block chain
CN113472561A (en) * 2020-03-31 2021-10-01 华为技术有限公司 Block chain data processing method and equipment thereof
CN112733202B (en) * 2021-01-11 2022-09-13 杭州复杂美科技有限公司 Parallel chain supervision consensus method, computer device and storage medium

Family Cites Families (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107124403A (en) * 2017-04-14 2017-09-01 朱清明 The generation method and computing device of common recognition block in block chain
CN107122993A (en) * 2017-04-24 2017-09-01 杭州趣链科技有限公司 A kind of General integral system based on block chain
CN107273759B (en) * 2017-05-08 2020-07-14 上海点融信息科技有限责任公司 Method, apparatus, and computer-readable storage medium for protecting blockchain data
CN107239940A (en) * 2017-05-11 2017-10-10 北京博晨技术有限公司 Network trading method and device based on block catenary system
CN107147735B (en) * 2017-05-12 2020-08-11 北京博晨技术有限公司 Distributed account book system based on hierarchical structure
CN107358420B (en) * 2017-06-09 2020-08-11 北京博晨技术有限公司 Block chain system for realizing hot spot account and method for realizing hot spot account
CN107945017B (en) * 2017-11-16 2021-11-12 成都赤乌软件技术有限公司 Hybrid chain accounting method based on multi-stage verification
CN108182635A (en) * 2017-12-18 2018-06-19 深圳前海微众银行股份有限公司 Block chain common recognition method, system and computer readable storage medium
CN108665363B (en) * 2018-05-09 2021-08-03 合肥达朴汇联科技有限公司 Block chain consensus achieving device
CN108629588B (en) * 2018-05-09 2021-06-08 合肥达朴汇联科技有限公司 Computer readable medium for block chain consensus achievement
CN108648082B (en) * 2018-05-09 2021-06-01 合肥达朴汇联科技有限公司 Computer system for block chain consensus achievement
CN108596623B (en) * 2018-05-09 2021-02-02 合肥达朴汇联科技有限公司 Block chain consensus achieving method

Also Published As

Publication number Publication date
CN109727132A (en) 2019-05-07

Similar Documents

Publication Publication Date Title
CN109727132B (en) Method and device for acquiring block chain consensus node, electronic equipment and storage medium
US10289631B2 (en) Method and system for tuning blockchain scalability for fast and low-cost payment and transaction processing
US10459946B2 (en) Method and system for tuning blockchain scalability, decentralization, and security for fast and low-cost payment and transaction processing
US11977537B2 (en) Method and device of processing data for blockchain, and blockchain system
US12028459B2 (en) Multi-access edge computing node with distributed ledger
JP7076682B2 (en) Data processing methods, devices, electronic devices and computer programs based on blockchain networks
US10242192B2 (en) Method, system, and program product for remotely attesting to a state of a computer system
CN109327528B (en) Node management method and device based on block chain
US20190172026A1 (en) Cross blockchain secure transactions
CN109493061B (en) Verification method and device for data of block chain, electronic equipment and storage medium
Sabry et al. The road to the blockchain technology: Concept and types
EP3382537B1 (en) Verifying that usage of virtual network function (vnf) by a plurality of compute nodes comply with allowed usage rights
US20240232223A1 (en) Data synchronization method and system based on blockchain, and related device
CN112527912B (en) Data processing method and device based on block chain network and computer equipment
US10855778B2 (en) Distributed ledger for edge server management
Leal et al. Performance evaluation of private ethereum networks
CN110471982B (en) Data processing method and device based on block chain
CN111309745A (en) Virtual resource processing method and device, electronic equipment and storage medium
CN109711840B (en) Transaction data processing method and device and storage medium
US20220116377A1 (en) System and method for autonomously operating public ledger-based credential
CN115842866A (en) Data processing method and device, computer readable medium and electronic equipment
CN116975158B (en) Request processing method, apparatus, computer device and storage medium
CN116032494B (en) Data interaction method, blockchain predictor, device and medium
CN115208640A (en) Named data network public key management method based on block chain intelligent contract
WO2024145513A1 (en) Composable digital assets

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