CN114697344A - Method for determining block chain consensus node, block chain and block chain link point - Google Patents

Method for determining block chain consensus node, block chain and block chain link point Download PDF

Info

Publication number
CN114697344A
CN114697344A CN202210325866.4A CN202210325866A CN114697344A CN 114697344 A CN114697344 A CN 114697344A CN 202210325866 A CN202210325866 A CN 202210325866A CN 114697344 A CN114697344 A CN 114697344A
Authority
CN
China
Prior art keywords
node
nodes
access delay
determining
consensus
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202210325866.4A
Other languages
Chinese (zh)
Other versions
CN114697344B (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.)
Ant Blockchain Technology Shanghai Co Ltd
Original Assignee
Ant Blockchain Technology Shanghai 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 Ant Blockchain Technology Shanghai Co Ltd filed Critical Ant Blockchain Technology Shanghai Co Ltd
Priority to CN202210325866.4A priority Critical patent/CN114697344B/en
Publication of CN114697344A publication Critical patent/CN114697344A/en
Application granted granted Critical
Publication of CN114697344B publication Critical patent/CN114697344B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/104Peer-to-peer [P2P] networks
    • H04L67/1087Peer-to-peer [P2P] networks using cross-functional networking aspects
    • H04L67/1093Some peer nodes performing special functions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0852Delays

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Environmental & Geological Engineering (AREA)
  • Computing Systems (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

A method for determining a common node of a block chain, the block chain and a block chain link point, wherein the block chain comprises a plurality of second nodes and a first node, the method comprises the following steps: the first node and the plurality of second nodes respectively determine respective access delay information to other nodes; the plurality of second nodes respectively send respective access delay information to the first node; the first node determines a plurality of third nodes from the plurality of first nodes and the plurality of second nodes according to the access delay information of the first nodes and the second nodes, and the third nodes are used for determining the consensus nodes.

Description

Method for determining block chain consensus node, block chain and block chain link point
Technical Field
The embodiment of the present specification belongs to the technical field of blockchain, and in particular, relates to a method for determining a blockchain consensus node, a blockchain, and a blockchain node.
Background
The blockchain is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, a consensus mechanism and an encryption algorithm. In the block chain system, data blocks are combined into a chain data structure in a sequential connection mode according to a time sequence, and a distributed account book which is not falsifiable and counterfeitable is ensured in a cryptographic mode. Because the blockchain has the characteristics of decentralization, information non-falsification, autonomy and the like, the blockchain is paid more and more attention by people and is widely applied in various fields.
Disclosure of Invention
The invention aims to provide a method for determining a block chain consensus node, and a corresponding block chain link node.
A first aspect of the present specification provides a method for determining a blockchain consensus node, where the blockchain includes a plurality of second nodes and a first node, the method including:
the first node and the plurality of second nodes respectively determine respective access delay information to other nodes;
the second nodes respectively send the respective access delay information to the first node;
the first node determines a plurality of third nodes from the first node and the plurality of second nodes according to the access delay information of the first node and each second node, wherein the third nodes are used for determining a consensus node.
A second aspect of the specification provides a blockchain comprising a plurality of second nodes and a first node, wherein,
the second node is used for determining access delay information from the second node to other nodes and sending the access delay information to the first node;
the first node is used for determining access delay information from the first node to other nodes, and determining a plurality of third nodes from the first node and the plurality of second nodes according to the access delay information of the first node and each second node, wherein the third nodes are used for determining consensus nodes.
In a third aspect, a first node in a block chain is provided, including:
a determining unit configured to determine access delay information to other nodes;
a receiving unit, configured to receive respective access delay information to other nodes from a plurality of second nodes in the blockchain;
the determining unit is further configured to determine, according to the access delay information of the first node and each of the second nodes, a plurality of third nodes from the first node and the plurality of second nodes, where the third nodes are configured to determine a consensus node.
In a fourth aspect, there is provided a computer readable storage medium having stored thereon a computer program or instructions which, when executed in a computer, cause the computer to perform the method of the first aspect.
In a fifth aspect, there is provided a computing device comprising a memory having stored therein a computer program or instructions, and a processor which, when executing the computer program or instructions, implements the method of the first aspect.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments described in the present disclosure, and it is obvious for a person skilled in the art to obtain other drawings based on these drawings without inventive labor.
FIG. 1 illustrates a block chain architecture diagram in one embodiment;
fig. 2 is a schematic diagram illustrating a method for determining a blockchain consensus node according to an embodiment of the present disclosure;
FIG. 3 is a schematic diagram of a node determining access delay information to other nodes in one embodiment of the present description;
fig. 4 is a flowchart of a method for determining a blockchain consensus node according to an embodiment of the present disclosure.
Fig. 5 is a schematic diagram of determining a first number of third nodes in an embodiment of the present specification.
Fig. 6 is an architecture diagram of a first node in an embodiment of the present description.
Detailed Description
In order to make those skilled in the art better understand the technical solutions in the present specification, the technical solutions in the embodiments of the present specification will be clearly and completely described below with reference to the drawings in the embodiments of the present specification, and it is obvious that the described embodiments are only a part of the embodiments of the present specification, and not all of the embodiments. All other embodiments obtained by a person skilled in the art based on the embodiments in the present specification without any inventive step should fall within the scope of protection of the present specification.
FIG. 1 illustrates a block chain architecture diagram in one embodiment. As shown in fig. 1, the block chain 100 includes, for example, 6 nodes. The lines between the nodes schematically represent P2P (Peer-to-Peer) connections. The nodes may have a full ledger stored on them, i.e. the status of all blocks and all accounts. Wherein each node in the blockchain generates the same state in the blockchain by performing the same transaction, each node in the blockchain storing the same state database. It is to be understood that although fig. 1 illustrates 6 nodes included in the blockchain, embodiments of the present specification are not limited thereto and may include other numbers of nodes. Specifically, the nodes included in the block chain can meet the Byzantine Fault Tolerance (BFT) requirement. The byzantine fault tolerance requirement can be understood as that byzantine nodes can exist in a block chain, and the block chain does not show the byzantine behavior to the outside. Generally, some Byzantine Fault-tolerant algorithms require the number of nodes to be greater than 3f +1, where f is the number of Byzantine nodes, such as the practical Byzantine Fault-tolerant algorithm pbft (practical Byzantine Fault tolerance).
A transaction in the blockchain domain may refer to a unit of task that is performed in the blockchain and recorded in the blockchain. The transaction typically includes a send field (From), a receive field (To), and a Data field (Data). Where the transaction is a transfer transaction, the From field indicates the address of the account From which the transaction was initiated (i.e., From which a transfer task To another account was initiated), the To field indicates the address of the account From which the transaction was received (i.e., From which a transfer was received), and the Data field includes the transfer amount. In the case of a transaction calling an intelligent contract in a blockchain, a From field represents an account address for initiating the transaction, a To field represents an account address of the contract called by the transaction, and a Data field includes Data such as a function name in the calling contract and incoming parameters To the function, so as To obtain code of the function From the blockchain and execute the code of the function when the transaction is executed.
The block chain technology is different from the traditional technology in one of decentralization characteristics, namely accounting is carried out on each node, or distributed accounting is carried out, and the traditional centralized accounting is not carried out. To be a difficult-to-defeat, open, non-falsifiable data record decentralized honest and trusted system, the blockchain system needs to be secure, unambiguous, and irreversible in the shortest possible time for distributed data records. In different types of blockchain networks, in order to keep the ledger consistent among nodes recording the ledger, a consensus algorithm (i.e., a consensus mechanism) is generally adopted to guarantee the consistency. For example, a common mechanism of block granularity can be implemented between block nodes, such as after a node (e.g., a unique node) generates a block, if the generated block is recognized by other nodes, other nodes record the same block. For another example, a common mechanism of transaction granularity may be implemented between the blockchain nodes, such as after a node (e.g., a unique node) acquires a blockchain transaction, if the blockchain transaction is approved by other nodes, each node that approves the blockchain transaction may add the blockchain transaction to the latest block maintained by itself, and finally, each node may be ensured to generate the same latest block. The consensus mechanism is a mechanism for the blockchain node to achieve a global consensus on the block information (or called blockdata), which can ensure that the latest block is accurately added to the blockchain. The current mainstream consensus mechanisms include: proof of Work (POW), Proof of stock (POS), Proof of commission rights (DPOS), Practical Byzantine Fault Tolerance (PBFT) algorithm, etc. In various consensus algorithms, it is generally determined that consensus on a consensus proposal is successful after a predetermined number of nodes agree on data to be consensus (i.e., the consensus proposal).
According to the PBFT consensus algorithm, the consensus process can be divided into four stages of Request (Request), preparation (Pre-Prepare), preparation (Prepare) and Commit (Commit). Assuming that a blockchain includes four common nodes, i.e., node n 1-node n4, where node n1 is a master node, and node n 2-node n4 is a slave node, according to the PBFT algorithm, 1 malicious node can be tolerated in node n 1-node n 4. In particular, during the request phase, the user of the blockchain may send a request, for example in the form of a blockchain transaction, to node n1 via his user device. In a preliminary phase, node n1, after receiving multiple transactions from one or more user devices, may package the multiple transactions into a consensus proposal, which may be sent to other consensus nodes (i.e., node n 2-node n4) along with the signatures of the consensus proposal by node n1 for use in generating blocks, which may include information about the transaction bodies of the multiple transactions and the order of submission of the multiple transactions. In the preparation phase, each slave node may sign the consensus proposal and send it to other respective nodes. Assuming node n4 is a malicious node, node n1, node n2, and node n3 may determine that the preparation phase is complete and may enter the commit phase after receiving the signatures for consensus proposals for 2f ═ 2 other consensus nodes, respectively. In the submission stage, each consensus node signs the consensus offer in the submission stage and sends the consensus offer to other consensus nodes, and after receiving the signatures of the submission stages of 2 f-2 other consensus nodes, each consensus node can determine that the submission stage is completed and the consensus is successful. For example, node n1, after receiving signatures of the commit phases of node n2 and node n3 and verifying, determines that the commit phase is complete, such that node n1 may perform performing the plurality of transactions according to consensus offers, generate and store tiles (e.g., tile B1) including the plurality of transactions, update the world state according to results of the performing of the plurality of transactions, and return results of the performing of the plurality of transactions to the user device. Similarly, node n2 and node n3 execute the plurality of transactions after determining that the commit phase is complete, generate and store block B1, and update the world state according to the execution results of the plurality of transactions. Through the above process, the storage consistency of the node n1, the node n2 and the node n3 is realized.
However, the existing block chain consensus scheme including the above consensus scheme generally has the following technical problems: in a real network environment, especially in a large-scale network environment with a complex network structure, there are often some nodes with poor communication conditions and congestion. When the nodes participate in consensus, the consensus efficiency of the whole block chain network is reduced.
In order to solve the above technical problem, an embodiment of the present disclosure provides a method for determining a blockchain consensus node. The core idea is as follows: and determining network congestion nodes according to access delay information among the nodes of the block chain, and then selecting consensus nodes participating in a subsequent consensus process from non-congestion nodes or excluding the congestion nodes from the subsequent consensus process. Specifically, fig. 2 is a schematic diagram of a method for determining a block chain common node according to an embodiment of the present disclosure. As shown in fig. 1, the blockchain includes a plurality of nodes, where a node 1 is a first node, and nodes 2 and 3 are second nodes, and the first node (node 1) and each of the second nodes (nodes 2 to 6) determine access delay information with other nodes. The manner in which the access delay information is determined may vary from embodiment to embodiment. Fig. 3 is a schematic diagram of a node determining access delay information to other nodes in one embodiment of the present specification. As shown in fig. 3, for example, the node 2 determines the access delay time R21 to the node 1 and the access delay time R23.. to the node 3, respectively, the access delay time R26 to the node 6, then averages the access delay times from the node 2 to the respective nodes to obtain the average access delay time Avg (R21, R22.. R26) from the node 2 to the respective nodes, and transmits the average access delay time to the first node. Similarly, the other nodes may also determine their average access delay times to the other nodes according to their access delay times to the other nodes, wherein the second node may transmit the respective average access delay times to node 1 (the first node). After receiving the average access delay time of each second node and determining the average access delay time of the node 1, the node 1 may sort the nodes according to the average access delay time of each node, and select the third nodes of the number S from the nodes according to a predetermined algorithm, and use the third nodes to determine the subsequent consensus nodes participating in consensus.
The scheme for determining the block chain consensus node provided by the embodiment of the specification has the following advantages: the network congestion nodes in the network can be judged according to the access delay information of each node, so that the subsequent consensus nodes can be determined from the non-congestion nodes in the network, or the congestion nodes are excluded from the subsequent consensus process. Therefore, the consensus efficiency of the block chains can be greatly improved under the condition that the network, especially a complex network, is blocked.
The detailed process of the method is further described below.
Fig. 4 is a flowchart illustrating a method for determining a blockchain consensus node according to an embodiment of the present disclosure. The blockchain includes a plurality of second nodes (the second nodes in fig. 4 represent the operations of the plurality of second nodes) and the first node, as shown in fig. 4, the method includes the following steps S41-S43. The individual steps shown in fig. 4 will be described in detail below.
First, in step S41, the first node and the plurality of second nodes respectively determine respective access delay information to other nodes. In different embodiments, the consensus mechanism employed by the blockchain system may be different, and the types of the consensus nodes in different consensus mechanisms may also be different, and further, in different embodiments, the specific types of the first node and the second node may be different. For example, in one embodiment, the types of nodes participating in consensus include a consensus master node and a slave node, and the first node may be the master node and the second node may be the slave node. In another embodiment, all nodes that may participate in consensus do not distinguish between the master node and the slave node, and each node may predetermine the first node from all nodes through a predetermined rule, and the remaining nodes are the second nodes. In different embodiments, the predetermined rule may be a different specific rule, and the present specification is not limited thereto.
In this step, each node in the blockchain network, including the first node and the plurality of second nodes, determines access delay information from the node to other nodes, respectively. For example, in the example shown in FIG. 3, node 2 determines its access delay information to node 1, node 3 …, node 6, respectively. Similarly, node 1 determines its access latency information to node 2, node 3 …, node 6, respectively, and node 3 …, node 6, respectively, determines its access latency information to other nodes.
Access delay information, i.e., information indicating the state of access delay between nodes. According to different embodiments, each node may determine access delay information of the node to other nodes of different specific types according to different specific manners. For example, in one embodiment, the access delay information may be a specific statistical indicator determined according to the access delay time of the node to other nodes. In one embodiment, the first node and the plurality of second nodes may determine respective access delay times to the other plurality of nodes, and determine a first statistical indicator as the access delay information according to the plurality of access delay times. In various embodiments, the first statistical indicator may be a different specific indicator. In a specific embodiment, the first statistical indicator may be an average access delay from the node to a plurality of other nodes. For example, as shown in fig. 2, the node 2 transmits the average Avg (R21, R22 … R26) of the access delay times R21 and R22 … R26 to the other nodes (node 1, node 3 …, node 6) as access delay information of the node 2 to the node 1. In another specific embodiment, the first statistical indicator may further include one or more of a mean access delay, a smooth access delay Srtt, a mean delay variance, and a mean delay standard deviation, which is not limited in this specification.
In one embodiment, each node may also use its access delay time to another node as the access delay information of the node without further data processing.
In a specific embodiment, the access delay time from any node a to another node B may also be determined according to a preset number of rounds of access from node a to node B. For example, in the illustration of fig. 3, the access delay time R23 from node 2 to node 3 may be determined according to the average delay of a preset number of rounds of access from node 2 to node 3, and in one example, may be represented as R23 ═ Avg (R23.1, R23.2 … R23.n), where R23.1, R23.2 … R23.n are the access delays of respective rounds, Avg () is an average function, and n is a preset number of rounds. In another example, there may be a predetermined interval time between adjacent rounds of the multiple round of access, such as 10 minutes in one particular example. In another specific embodiment, each node may also directly use the access delay time of all rounds for other nodes as the access delay information of the node.
In step S43, the plurality of second nodes transmit their respective access delay information to the first node.
In this step, each second node sends its acquired access delay information for other nodes to the first node. And the first node determines a third node for determining the consensus node according to the access delay information in the subsequent step. In the above embodiment in which the first node is a master node, each slave node may send its access delay information to the master node. In the above embodiment where the master node and the slave node are not distinguished from each other, each of the other nodes may transmit the access delay information to the first node predetermined by the predetermined rule.
And step S45, the first node determines a plurality of third nodes from the first node and the plurality of second nodes according to the access delay information of the first node and each second node.
In this step, after receiving the access delay information sent by each second node in step S42, the first node determines a plurality of third nodes from the first node and the plurality of second nodes according to the access delay information of the first node itself to the other nodes and the access delay information of each second node to the other nodes, where the third nodes are used to determine the common node in the blockchain network.
As described above, according to different embodiments, the specific type of access delay information transmitted by the second node in step S43 may be different. Therefore, according to different embodiments, in this step, the first node may determine the third node in different specific manners according to the received different specific types of access delay information. In the above embodiment where the access delay information is an average access delay, the first node may rank the first node and the plurality of second nodes according to an average access delay of each node including the first node and the second nodes, and determine a first number of nodes in a top order as the third node. In one or more embodiments where the access delay information includes one or more of a mean access delay, a smoothed access delay Srtt, a mean delay variance, and a mean delay standard deviation, the first node may rank the nodes according to one or more of the mean access delay, the smoothed access delay Srtt, the mean delay variance, and the mean delay standard deviation of the nodes, and determine a first number of nodes that are ranked first as the third node. For example, in one example, the nodes may be sorted according to average access delay first, and for nodes with the same average access delay, the nodes may be sorted according to average delay standard deviation or average delay variance. In the above embodiment where the access delay information is access delay time from each node to other nodes, the first node may determine one or more of average access delay, smooth access delay Srtt, average delay variance, and average delay standard deviation of each node according to the access delay time, and then determine a third node according to one or more of average access delay, smooth access delay Srtt, average delay variance, and average delay standard deviation in a similar manner to the above embodiment.
In different embodiments, the first number may be a different specific number. In a specific embodiment, the first number is denoted as S ═ a-Min (α ═ a, f). Wherein S is a first number, a is a total number of the first nodes and the second nodes, α is a proportionality coefficient, f is a number of the nodes, and Min (α × a, f) represents a minimum value between α × a and f. In different embodiments, α may have different specific values, and in one embodiment, may be, for example, 5% to 15%. Fig. 5 is a schematic diagram of determining a first number of third nodes in an embodiment of the present disclosure, where as shown in fig. 5, the first node sorts the nodes according to average access delays of the nodes, and then selects a number of nodes a-Min (α × a, f) in the top order as the third nodes.
After the plurality of third nodes are obtained, the consensus node which subsequently participates in the consensus process can be determined according to the third nodes. According to different embodiments, the consensus node is determined in different specific ways. In one embodiment, the third node may be directly determined as a subsequent consensus node participating in the consensus process. In another embodiment, several nodes, which are subsequently involved in the consensus process, may be randomly determined from the third nodes. In yet another embodiment, one or more of the third nodes may replace existing consensus nodes by randomly rotating. In the above embodiment where the common identification mechanism includes master and slave nodes, one or more of the third nodes may replace the existing master node or slave node by randomly rotating.
According to an embodiment of another aspect, a blockchain is also provided. The blockchain includes a plurality of second nodes and a first node, wherein,
the first node is used for determining access delay information of the first node to other nodes and sending the access delay information to the first node;
the second node is used for determining access delay information from the second node to other nodes, and determining a plurality of third nodes from the first node and the plurality of second nodes according to the access delay information of the first node and each second node, wherein the third nodes are used for determining a consensus node.
According to an embodiment of another aspect, a blockchain node is also provided. Fig. 6 is an architecture diagram of a first node 600 in one embodiment of the present description. As shown in fig. 6, the first node 600 includes:
a determining unit 61 for determining access delay information to other nodes;
a receiving unit 62, configured to receive respective access delay information to other nodes from a plurality of second nodes in the blockchain;
the determining unit 61 is further configured to determine, according to the access delay information of the first node and each of the second nodes, a plurality of third nodes from the first node and the plurality of second nodes, where the third nodes are used to determine a consensus node.
A further aspect of the present description provides a computer-readable storage medium having stored thereon a computer program which, when executed in a computer, causes the computer to perform any of the methods described above.
Yet another aspect of the present specification provides a computing device comprising a memory having stored therein executable code, and a processor that, when executing the executable code, implements any of the methods described above.
In the 90 s of the 20 th century, improvements in a technology could clearly distinguish between improvements in hardware (e.g., improvements in circuit structures such as diodes, transistors, switches, etc.) and improvements in software (improvements in process flow). However, as technology advances, many of today's process flow improvements have been seen as direct improvements in hardware circuit architecture. Designers almost always obtain the corresponding hardware circuit structure by programming an improved method flow into the hardware circuit. Thus, it cannot be said that an improvement in the process flow cannot be realized by hardware physical modules. For example, a Programmable Logic Device (PLD), such as a Field Programmable Gate Array (FPGA), is an integrated circuit whose Logic functions are determined by programming the Device by a user. A digital system is "integrated" on a PLD by the designer's own programming without requiring the chip manufacturer to design and fabricate application-specific integrated circuit chips. Furthermore, nowadays, instead of manually making an Integrated Circuit chip, such Programming is often implemented by "logic compiler" software, which is similar to a software compiler used in program development and writing, but the original code before compiling is also written by a specific Programming Language, which is called Hardware Description Language (HDL), and HDL is not only one but many, such as abel (advanced Boolean Expression Language), ahdl (alternate Hardware Description Language), traffic, pl (core universal Programming Language), HDCal (jhdware Description Language), lang, Lola, HDL, laspam, hardward Description Language (vhr Description Language), vhal (Hardware Description Language), and vhigh-Language, which are currently used in most common. It will also be apparent to those skilled in the art that hardware circuitry that implements the logical method flows can be readily obtained by merely slightly programming the method flows into an integrated circuit using the hardware description languages described above.
The controller may be implemented in any suitable manner, for example, the controller may take the form of, for example, a microprocessor or processor and a computer-readable medium storing computer-readable program code (e.g., software or firmware) executable by the (micro) processor, logic gates, switches, an Application Specific Integrated Circuit (ASIC), a programmable logic controller, and an embedded microcontroller, examples of which include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320, the memory controller may also be implemented as part of the control logic of the memory. Those skilled in the art will also appreciate that, in addition to implementing the controller as pure computer readable program code, the same functionality can be implemented by logically programming method steps such that the controller is in the form of logic gates, switches, application specific integrated circuits, programmable logic controllers, embedded microcontrollers and the like. Such a controller may thus be considered a hardware component, and the means included therein for performing the various functions may also be considered as a structure within the hardware component. Or even means for performing the functions may be regarded as being both a software module for performing the method and a structure within a hardware component.
The systems, apparatuses, modules or units described in the above embodiments may be specifically implemented by a computer chip or an entity, or implemented by a product with certain functions. One typical implementation device is a server system. Of course, this application does not exclude that with future developments in computer technology, the computer implementing the functionality of the above described embodiments may be, for example, a personal computer, a laptop computer, a vehicle-mounted human-computer interaction device, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device or a combination of any of these devices.
Although one or more embodiments of the present description provide method operational steps as described in the embodiments or flowcharts, more or fewer operational steps may be included based on conventional or non-inventive approaches. The order of steps recited in the embodiments is merely one manner of performing the steps in a multitude of sequences, and does not represent a unique order of performance. When an actual apparatus or end product executes, it may execute sequentially or in parallel (e.g., parallel processors or multi-threaded environments, or even distributed data processing environments) according to the method shown in the embodiment or the figures. The terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, the presence of additional identical or equivalent elements in a process, method, article, or apparatus that comprises the recited elements is not excluded. For example, if the terms first, second, etc. are used to denote names, they do not denote any particular order.
For convenience of description, the above devices are described as being divided into various modules by functions, and are described separately. Of course, when implementing one or more of the present description, the functions of each module may be implemented in one or more software and/or hardware, or the modules implementing the same functions may be implemented by a combination of a plurality of sub-modules or sub-units, etc. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The present invention has been described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Disks (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage, graphene storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
One skilled in the art will appreciate that one or more embodiments of the present description may be provided as a method, system, or computer program product. Accordingly, one or more embodiments of the present description may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, one or more embodiments of the present description may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
One or more embodiments of the present description may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. One or more embodiments of the present specification can also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is substantially similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment. In the description of the specification, reference to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the specification. In this specification, the schematic representations of the terms used above are not necessarily intended to refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Moreover, various embodiments or examples and features of various embodiments or examples described in this specification can be combined and combined by one skilled in the art without being mutually inconsistent.
The above description is merely exemplary of one or more embodiments of the present disclosure and is not intended to limit the scope of one or more embodiments of the present disclosure. Various modifications and alterations to one or more embodiments described herein will be apparent to those skilled in the art. Any modification, equivalent replacement, improvement or the like made within the spirit and principle of the present specification should be included in the scope of the claims.

Claims (15)

1. A method for determining a blockchain consensus node, the blockchain comprising a plurality of second nodes and a first node, the method comprising:
the first node and the plurality of second nodes respectively determine respective access delay information to other nodes;
the second nodes respectively send the access delay information to the first node;
the first node determines a plurality of third nodes from the first node and the plurality of second nodes according to the access delay information of the first node and each second node, wherein the third nodes are used for determining a consensus node.
2. The method of claim 1, wherein,
the first node and the plurality of second nodes respectively determine respective access delay information to other nodes, and the method comprises the following steps:
the first node and the plurality of second nodes respectively determine respective access delay time to the other plurality of nodes, and determine a first statistical indicator as the access delay information according to the plurality of access delay time.
3. The method of claim 2, wherein,
determining a first statistical indicator as the access delay information according to the plurality of access delay times, including:
the first node and the plurality of second nodes respectively determine respective average access delay to other nodes according to the plurality of access delay times;
determining a number of third nodes from the first node and the plurality of second nodes, including:
and the first node sequences the first node and the plurality of second nodes according to the average access delay, and determines a first number of nodes with the top sequence as third nodes.
4. The method of claim 2, wherein the first statistical indicator comprises one or more of a mean access delay, a smoothed access delay, a mean delay variance, a mean delay standard deviation.
5. The method of claim 1, further comprising:
and determining a plurality of random nodes as consensus nodes from the third nodes.
6. The method of claim 1, further comprising:
and replacing the existing consensus nodes by one or more of the third nodes in a random rotation mode.
7. The method of claim 1, wherein the first node is a master node participating in consensus.
8. A blockchain includes a plurality of second nodes and a first node, wherein,
the second node is used for determining access delay information from the second node to other nodes and sending the access delay information to the first node;
the first node is used for determining access delay information from the first node to other nodes, and determining a plurality of third nodes from the first node and the plurality of second nodes according to the access delay information of the first node and each second node, wherein the third nodes are used for determining consensus nodes.
9. The blockchain of claim 8, wherein,
the first node and the second node are further configured to determine respective access delay times to the other nodes, and determine a first statistical indicator as the access delay information according to the access delay times.
10. The blockchain of claim 9, wherein,
the first node and the second node, further configured to,
respectively determining the average access delay from each node to other nodes according to the access delay times;
the first node is further configured to,
and sequencing the first node and the plurality of second nodes according to the average access delay, and determining a first number of nodes with the top sequence as third nodes.
11. The block chain of claim 9, wherein the first statistical indicator comprises one or more of a mean access delay, a smoothed access delay, a mean delay variance, a mean delay standard deviation.
12. The blockchain of claim 8, wherein the first node is a master node participating in consensus.
13. A first node in a blockchain, comprising:
a determining unit configured to determine access delay information to other nodes;
a receiving unit, configured to receive respective access delay information to other nodes from a plurality of second nodes in the blockchain;
the determining unit is further configured to determine, according to the access delay information of the first node and each of the second nodes, a plurality of third nodes from the first node and the plurality of second nodes, where the third nodes are configured to determine a consensus node.
14. A computer-readable storage medium having stored thereon a computer program or instructions which, when executed in a computer, cause the computer to perform the method of any one of claims 1-7.
15. A computing device comprising a memory having stored therein a computer program or instructions, and a processor which, when executed, implements the method of any of claims 1-7.
CN202210325866.4A 2022-03-30 2022-03-30 Method for determining consensus node in blockchain system, node, storage medium and computing device Active CN114697344B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210325866.4A CN114697344B (en) 2022-03-30 2022-03-30 Method for determining consensus node in blockchain system, node, storage medium and computing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210325866.4A CN114697344B (en) 2022-03-30 2022-03-30 Method for determining consensus node in blockchain system, node, storage medium and computing device

Publications (2)

Publication Number Publication Date
CN114697344A true CN114697344A (en) 2022-07-01
CN114697344B CN114697344B (en) 2023-12-19

Family

ID=82140905

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210325866.4A Active CN114697344B (en) 2022-03-30 2022-03-30 Method for determining consensus node in blockchain system, node, storage medium and computing device

Country Status (1)

Country Link
CN (1) CN114697344B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160150060A1 (en) * 2014-11-21 2016-05-26 International Business Machines Corporation Systems and methods for consensus protocol selection based on delay analysis
WO2020053565A1 (en) * 2018-09-14 2020-03-19 Arqit Limited Autonomous quality regulation for distributed ledger networks
CN112202765A (en) * 2020-09-28 2021-01-08 北京八分量信息科技有限公司 Block chain common identification block method and device based on trusted computing and related products
CN112351117A (en) * 2020-11-25 2021-02-09 北京邮电大学 Domain name management method and device, electronic equipment and storage medium
CN113141600A (en) * 2021-04-23 2021-07-20 国网河南省电力公司信息通信公司 Block chain distributed data sharing method based on Internet of vehicles
CN113610531A (en) * 2021-10-09 2021-11-05 支付宝(杭州)信息技术有限公司 Consensus method, block chain system and consensus node

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160150060A1 (en) * 2014-11-21 2016-05-26 International Business Machines Corporation Systems and methods for consensus protocol selection based on delay analysis
WO2020053565A1 (en) * 2018-09-14 2020-03-19 Arqit Limited Autonomous quality regulation for distributed ledger networks
CN112202765A (en) * 2020-09-28 2021-01-08 北京八分量信息科技有限公司 Block chain common identification block method and device based on trusted computing and related products
CN112351117A (en) * 2020-11-25 2021-02-09 北京邮电大学 Domain name management method and device, electronic equipment and storage medium
CN113141600A (en) * 2021-04-23 2021-07-20 国网河南省电力公司信息通信公司 Block chain distributed data sharing method based on Internet of vehicles
CN113610531A (en) * 2021-10-09 2021-11-05 支付宝(杭州)信息技术有限公司 Consensus method, block chain system and consensus node

Also Published As

Publication number Publication date
CN114697344B (en) 2023-12-19

Similar Documents

Publication Publication Date Title
CN113743941B (en) Method for executing transaction in block chain, block chain and main node
CN113743940B (en) Method for executing transaction in block chain, main node and slave node
WO2023231337A1 (en) Method for executing transaction in blockchain, and master node and slave node of blockchain
WO2024001024A1 (en) Method for executing transaction in blockchain system, and blockchain system and nodes
WO2023231335A1 (en) Method for executing transaction in blockchain, and master node of blockchain
CN113743942B (en) Transaction execution method, blockchain, master node and master storage device
WO2023231336A1 (en) Method for executing transaction and blockchain node
CN114827165B (en) Method and block link point for grouping multiple transactions
CN110704438B (en) Method and device for generating bloom filter in blockchain
CN113743950A (en) Method for performing transactions in a blockchain, blockchain node and blockchain
CN114936256A (en) Method for executing transaction in block chain and block chain link point
CN114529417A (en) Method for executing transaction, block chain, main node and slave node
CN113744063B (en) Method and device for executing transaction in block chain
CN113744062B (en) Method for performing transactions in a blockchain, blockchain node and blockchain
CN114710507A (en) Consensus method and block link point
WO2024001032A1 (en) Method for executing transaction in blockchain system, and blockchain system and nodes
CN115098483A (en) Pre-execution cache data cleaning method and block link point
CN113744061B (en) Method for performing transactions in a blockchain system, and slave node
CN114697344A (en) Method for determining block chain consensus node, block chain and block chain link point
CN115987528A (en) Block synchronization method and block link point in block link system
CN115174572B (en) Data multicasting method in blockchain, blockchain node and storage medium
CN115098595A (en) Node grouping method in blockchain system and blockchain node
CN115086325A (en) Block link point grouping method and block link points
CN114581232A (en) Method and device for processing digital resources in block chain
CN116186763A (en) Method and apparatus for processing block data in a blockchain system

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