CN114827167A - Node selection and transaction sending method, equipment and storage medium - Google Patents

Node selection and transaction sending method, equipment and storage medium Download PDF

Info

Publication number
CN114827167A
CN114827167A CN202210204834.9A CN202210204834A CN114827167A CN 114827167 A CN114827167 A CN 114827167A CN 202210204834 A CN202210204834 A CN 202210204834A CN 114827167 A CN114827167 A CN 114827167A
Authority
CN
China
Prior art keywords
parallel chain
parallel
consensus
height
node
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202210204834.9A
Other languages
Chinese (zh)
Other versions
CN114827167B (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.)
Hangzhou Fuzamei Technology Co Ltd
Original Assignee
Hangzhou Fuzamei 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 Hangzhou Fuzamei Technology Co Ltd filed Critical Hangzhou Fuzamei Technology Co Ltd
Priority to CN202210204834.9A priority Critical patent/CN114827167B/en
Publication of CN114827167A publication Critical patent/CN114827167A/en
Application granted granted Critical
Publication of CN114827167B publication Critical patent/CN114827167B/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/1044Group management mechanisms 
    • H04L67/1051Group master selection mechanisms
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/104Peer-to-peer [P2P] networks
    • H04L67/1059Inter-group management mechanisms, e.g. splitting, merging or interconnection of groups

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Marketing (AREA)
  • Strategic Management (AREA)
  • Technology Law (AREA)
  • Economics (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Development Economics (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention provides a node selection and transaction sending method, equipment and a storage medium, wherein the method comprises the following steps: when the parallel chain block height of the current parallel chain is monitored to reach the first parallel chain block height of the rotatable leader node, the following operations are performed on each first parallel chain block in a first parallel chain block height interval with the first parallel chain block height as a starting height and the sum of the first parallel chain block height and the second numerical value as an ending height: generating a first consensus transaction of the first parallel chain block, sending the first consensus transaction to the main chain, and acquiring node information selected as a first leader node from the main chain; the first leader node is used for executing the following operations on a plurality of second parallel chain blocks after the height is finished: and generating an aggregation consensus transaction according to the second parallel chain block and sending the aggregation consensus transaction to the main chain. The leader node is clear, the handling fee is saved, and the conciseness and stability of parallel chain consensus are kept.

Description

Node selection and transaction sending method, equipment and storage medium
Technical Field
The present application relates to the field of parallel chain technologies, and in particular, to a node selection and transaction transmission method, device, and storage medium.
Background
In the existing main chain-parallel chain mechanism, if only one parallel chain link point is allowed to send the aggregation consensus transaction, only the commission charge of the node is consumed, and the mechanism is not fair. The applicant tries to negotiate out a leader node sending the aggregate consensus transaction according to a certain rule, but during the negotiation process of the rule, a plurality of parallel-link nodes may consider themselves as the leader node and send the aggregate consensus transaction, which still results in waste of commission fees.
Disclosure of Invention
In view of the above-mentioned drawbacks and deficiencies in the prior art, it is desirable to provide a node selecting and trading method, device and storage medium with clear leader node, reduced commission fees, and simple and stable parallel chain consensus.
In a first aspect, the present invention provides a node selection and transaction sending method for parallel link nodes, where the method includes:
when the parallel chain block height of the current parallel chain is monitored to reach the first parallel chain block height of the rotatable leader node, the following operations are performed on each first parallel chain block in a first parallel chain block height interval with the first parallel chain block height as a starting height and the sum of the first parallel chain block height and the second numerical value as an ending height:
generating a first consensus transaction of the first parallel link block, and sending the first consensus transaction to the main chain for the main chain node:
performing consensus on the first parallel chain block according to the first consensus transaction and a plurality of second consensus transactions; the second consensus transaction is the consensus transaction of the first parallel chain block generated by other parallel chain link points of the current parallel chain;
when the fact that the heights of all the first parallel chain blocks are successfully identified in a consensus mode is monitored, selecting a first parallel chain node which sends a first consensus transaction which enables the successful consensus as a first leader node;
acquiring node information selected as a first leader node from a main chain;
the first leader node is used for executing the following operations on a plurality of second parallel chain blocks after the height is finished: and generating an aggregation consensus transaction according to the second parallel chain blocks and sending the aggregation consensus transaction to the main chain so that the main chain node can perform consensus on the second parallel chain blocks according to the aggregation consensus transaction.
In a second aspect, the present invention also provides an apparatus comprising one or more processors and a memory, wherein the memory contains instructions executable by the one or more processors to cause the one or more processors to perform a node selection and transaction sending method provided according to embodiments of the present invention.
In a third aspect, the present invention also provides a storage medium storing a computer program for causing a computer to execute the node selection and transaction transmission method according to the embodiments of the present invention.
In the node selection and transaction transmission method, device, and storage medium provided in various embodiments of the present invention, when it is monitored that the height of a parallel chain block of a current parallel chain reaches the height of a first parallel chain block capable of rotating a leader node, the following operations are performed on each first parallel chain block in a height interval of the first parallel chain block, where the height of the first parallel chain block is a starting height, and the sum of the height of the first parallel chain block and a second value is an ending height: generating a first consensus transaction of the first parallel chain block, sending the first consensus transaction to the main chain, and acquiring node information selected as a first leader node from the main chain; the first leader node is used for executing the following operations on a plurality of second parallel chain blocks after the height is finished: and generating an aggregation consensus transaction according to the second parallel chain block and sending the aggregation consensus transaction to the main chain, so that the leader node is clear, the commission charge is saved, and the conciseness and stability of the parallel chain consensus are kept.
Drawings
Other features, objects and advantages of the present application will become more apparent upon reading of the following detailed description of non-limiting embodiments thereof, made with reference to the accompanying drawings in which:
fig. 1 is a flowchart of a method for node selection and transaction transmission according to an embodiment of the present invention.
Fig. 2 is a schematic structural diagram of an apparatus according to an embodiment of the present invention.
Detailed Description
The present application will be described in further detail with reference to the following drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the relevant invention and not restrictive of the invention. It should be noted that, for convenience of description, only the portions related to the present invention are shown in the drawings.
It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict. The present application will be described in detail below with reference to the embodiments with reference to the attached drawings.
Fig. 1 is a flowchart of a method for node selection and transaction transmission according to an embodiment of the present invention. As shown in fig. 1, in this embodiment, the present invention provides a node selection and transaction sending method suitable for parallel link nodes, where the method includes:
s11: when the parallel chain block height of the current parallel chain is monitored to reach the first parallel chain block height of the rotatable leader node, the following operations are performed on each first parallel chain block in a first parallel chain block height interval with the first parallel chain block height as a starting height and the sum of the first parallel chain block height and the second numerical value as an ending height:
generating a first consensus transaction of the first parallel link block, and sending the first consensus transaction to the main chain for the main chain node:
performing consensus on the first parallel link block according to the first consensus transaction and the plurality of second consensus transactions; the second consensus transaction is the consensus transaction of the first parallel chain block generated by other parallel chain link points of the current parallel chain;
when the fact that the heights of all the first parallel chain blocks are successfully identified in a consensus mode is monitored, selecting a first parallel chain node which sends a first consensus transaction which enables the successful consensus as a first leader node;
s13: acquiring node information selected as a first leader node from a main chain;
the first leader node is used for executing the following operations on a plurality of second parallel chain blocks after the height is finished: and generating an aggregation consensus transaction according to the second parallel chain blocks and sending the aggregation consensus transaction to the main chain so that the main chain node can perform consensus on the second parallel chain blocks according to the aggregation consensus transaction.
Specifically, when it is monitored that the height of the parallel chain block of the current parallel chain reaches the height of the first parallel chain block capable of rotating the leader node, performing the following operation on each first parallel chain block in the height interval of the first parallel chain block with the height of the first parallel chain block as the starting height and the sum of the height of the first parallel chain block and the second numerical value as the ending height, wherein the operation includes' judging whether the remainder of the height of the parallel chain block and the first selection interval information registered by the current parallel chain is 1: if so, performing the following operation on each first parallel chain block in a first parallel chain block height interval with the first parallel chain block height as the starting height and the sum of the first parallel chain block height and the second numerical value as the ending height; wherein, the plurality of second parallel chain blocks are parallel chain blocks from the ending height plus one to the height of the first parallel chain block plus the first selection interval minus one; and the first leader node is used for executing the following operations on a plurality of second parallel chain blocks after the height is finished: generating an aggregation consensus transaction according to the second parallel chain blocks and sending the aggregation consensus transaction to the main chain, so that the main chain node can perform consensus on the second parallel chain blocks according to the aggregation consensus transaction, wherein the first leader node is used for respectively executing the following operations on each second parallel chain block: generating a third consensus transaction for the second parallel-chain block; receiving fourth consensus trades generated by a plurality of other parallel chain nodes excluding the first leader node; the fourth consensus transaction is a consensus transaction of the second parallel chain block generated by removing other parallel chain nodes of the first leader node; according to the third consensus transaction and each fourth consensus transaction, generating a first aggregation consensus transaction of the second parallel chain block in an aggregation mode, and sending the first aggregation consensus transaction to the main chain so that the main chain node can perform consensus on the second parallel chain block according to the first aggregation consensus transaction as an example;
supposing that the parachain1 has parallel chain nodes n 1-n 10, the second value is 4, and the selection interval information of the parachain1 registered in the main chain is 1000; and assume the first parallel chain block height is 2001;
n 1-n 10 execute step S11 to determine whether the remainder of 2001 and 1000 is 1:
with 1, n1 performs the following operations on block (2001_ pc1_ n1) to block (2005_ pc1_ n1) respectively, and n2 performs the following operations on block (2001_ pc1_ n5) to block (2005_ pc1_ n5) respectively for block (2001_ pc1_ n2) to block (2005_ pc1_ n2) … … n5 respectively:
take n1 pairs of block (2001_ pc1_ n1) as an example;
n1 generates consensus transaction tx (201_ n1) from block (2001_ pc1_ n1) and sends it to the backbone;
similarly, n2 generates tx (2001_ n2), n3 generates tx (2001_ n2) … … n10 generates tx (2001_ n10) and sends it to the main chain;
suppose that the consensus transactions generated according to the parallel chain block with the parallel chain block height of 2002 are tx (2002_ n1) to tx (2002_ n10), respectively, and the consensus transactions generated according to the parallel chain block with the parallel chain block height of 2003 are tx (2003_ n1) to tx (2003_ n10) … …, respectively, and the consensus transactions generated according to the parallel chain block with the parallel chain block height of 2005 are tx (2005_ n1) to tx (2005_ n 10); assuming that the consensus information in tx (2001_ n1) to tx (2001_ n10) are the same, and the consensus information in tx (2002_ n1) to tx (2002_ n10) are the same as the consensus information in … … tx (2005_ n1) to tx (2005_ n 10);
and the packing order of tx (2001_ n1) to tx (2005_ n10) is tx (2001_ n1), tx (2001_ n2), …, tx (2005_ n9), tx (2005_ n 10);
since the common identification information in tx (2001_ n1) to tx (2001_ n10) is the same, and the common identification information in tx (2002_ n1) to tx (2002_ n10) is the same as the common identification information in … … tx (2005_ n1) to tx (2005_ n10), the 2001-2005 common identification is successful, and the main chain node determines n1 as a leader node of a parallel chain block with a parallel chain block height of 2006-3000;
n 1-n 10 executing step S13, obtaining information of the leader node of the parallel chain block which is selected as the parallel chain block with the parallel chain block height of 2006-3000 by the n1 from the main chain;
for parallel chain blocks with a height of 2006-3000:
take the parallel chain block with a height of 2999 as an example:
n1 generating consensus transaction tx (2999_ n1) from block (2999_ pc1_ n 1); similarly, n2 generates a consensus transaction tx (2999_ n2) … … n10 from block (2999_ pc1_ n2) and generates a consensus transaction tx (2999_ n10) from block (2999_ pc1_ n 10);
n1 receives tx (2999_ n2) to tx (2999_ n10) generated by n2 to n10, respectively;
n1 generating 2999 aggregated consensus transaction from tx (2999_ n1) to tx (2999_ n 10);
n1 sending the aggregated consensus transaction to the backbone;
the main chain node performs consensus on the parallel chain block with the height of 2999 according to the aggregation consensus transaction.
In further embodiments, assuming that the parallel chains are configured with the common nodes n 1-n 4 and the non-common nodes n 5-n 10, the above method can be performed only by the common nodes n 1-n 4.
In further embodiments, step S11 may be configured according to actual requirements, for example, configured as: judging whether the remainder of the parallel chain block height and the first selection interval information registered by the current parallel chain is 0: if so, performing the following operation on each first parallel chain block in a first parallel chain block height interval with the first parallel chain block height as the starting height and the sum of the first parallel chain block height and the second numerical value as the ending height; the plurality of second parallel chain blocks are parallel chain blocks from the ending height plus one to the height of the first parallel chain block plus the first selection interval information minus one; the same technical effect can be achieved.
In further embodiments, the first leader node may not generate the third consensus transaction, and may generate the first consensus information msg (2999_ n1) according to the actual requirement, and similarly, the second consensus information msg (2999_ n2) to msg (2999_ n10) generated by n2 to n10 respectively, and then n1 generates the aggregate consensus transaction with the parallel link block height of 2999 according to msg (2999_ n1) to msg (2999_ n10), so that the same technical effect may be achieved.
In further embodiments, if n1 finds that when tx (2001_ n1) is generated, the parallel chain block height has grown after 2005, then n1 no longer sends tx (2001_ n1) to the backbone to save n1 commission.
In further embodiments, even after the parallel chain block height increases to 2005, the parallel chain nodes may still send consensus transactions, as the case may be (n 1 for example), if n1 finds that the 2001-2005 consensus transactions received on the backbone are not sufficient to promote 2001 consensus of parachain1, n1 still sends tx (2001_ n1) to the backbone to further promote 2001 consensus of parachain 1; at this point, the backbone nodes can be configured according to actual needs, and after facilitating 2001 consensus of parachain1, some rewards are also sent to n 1. However, after the election is successful, assuming that n1 is determined as the leader node of 2006-3000, the main chain does not allocate any reward to other parallel chain nodes after receiving consensus transactions with corresponding heights generated according to 2006-2999 and sent by other parallel chain nodes or aggregating the consensus transactions.
It should be understood by those skilled in the art that after the consensus transaction is generated by the parallel link points, the packaging sequence recorded on the main chain has no direct relation with the sequence before and after the consensus transaction is generated by the actual parallel link points due to network reasons, for example, in this embodiment, the packaging sequence of tx (2001_ n1) to tx (2005_ n10) may be tx (2002_ n1), tx (2003_ n3), tx (2001_ n1), … …; then node n1 that contributed to the first transaction (i.e., tx (2002_ n1)) for which all 201-205 agreed successfully is determined to be the leader node, as long as all 201-205 agreed successfully.
The embodiment makes the leader node clear, saves the handling fee, and keeps the conciseness and stability of the parallel chain consensus.
Preferably, the determining a first parallel-link node that sent a first consensus transaction that resulted in a successful consensus as a first leader node comprises:
judging whether the first parallel link node is a parallel link node for generating the second aggregate consensus transaction:
if yes, determining the second parallel chain node as a first leader node when the second parallel chain node which sends the second consensus transaction which causes successful consensus is not the first parallel chain node;
wherein the second aggregate consensus transaction is the aggregate consensus transaction for the first parallel link block height minus one block height.
The same node can be configured to be incapable of cicada joining when having competition to become a leader node; for example, if the leader node of 1006-2000 is n1, the leader node of 2006-3000 is also n1, the second parallel chain node that sent the second consensus transaction that caused the successful consensus (the second parallel chain node and n1 cannot be the same node, for example, the second parallel chain node is n2) may be determined as the leader node of 2006-3000.
Assuming that the third parallel chain block height is +20 of the second parallel chain block height;
assuming that the block height of the second parallel chain block is 2010, the n1 to n10 generate tx (2010_ n1) to tx (2010_ n10), respectively;
then other nodes may re-race for the leader node if there is no aggregate consensus transaction for 2001 generated by n1 on the main chain until the parallel chain block height comes 2030.
If a first scene that a plurality of node networks are obstructed in n 2-n 10 and n1 cannot timely receive consensus transactions generated by n 2-n 10, n1 cannot generate a polymerization consensus transaction and send the polymerization consensus transaction to a main chain is assumed to exist; in this case, other consensus nodes may initiate election transactions to replace n 1;
the problem caused by the first scenario described above can be solved by the method of the following embodiment;
preferably, the first leader node is further configured to:
generating an incomplete first aggregated consensus transaction for a second parallel chain block height;
sending the incomplete first aggregation consensus transaction to a main chain, so that main chain nodes can store the incomplete first aggregation consensus transaction;
before reaching the height of the fourth main chain block, if enough fourth consensus transactions which can cause the second parallel chain block height to be successfully identified are collected, generating complete first aggregation consensus transaction according to the third consensus transaction and the fourth consensus transactions and sending the complete first aggregation consensus transaction to the main chain; the complete first aggregated consensus transaction comprises a hash value of the incomplete first aggregated consensus transaction, and the height of the fourth main chain block is smaller than that of the third main chain block.
The triggering condition for generating the incomplete first aggregation consensus transaction with the second parallel chain block height may be configured according to actual requirements, for example, configured to generate (in any case) the incomplete first aggregation consensus transaction with the second parallel chain block height; or, configured to generate the incomplete first aggregate consensus transaction of the second parallel chain block height if enough fourth consensus transactions are not collected within the first time period to facilitate successful second main chain block height consensus, thereby achieving the same technical effect.
The embodiment allows the leader node to send the incomplete aggregate consensus transaction in time, and allows the leader node to communicate with other parallel chain nodes to obtain the corresponding consensus transaction as soon as possible within a certain height interval range so as to generate the complete aggregate consensus transaction as soon as possible.
Further preferably, if enough fourth consensus transactions are collected to facilitate successful second parallel chain block high consensus, aggregating the fourth consensus transactions to generate a complete first aggregated consensus transaction according to the third consensus transaction comprises:
if enough fourth consensus transactions are collected to facilitate successful high consensus of the second parallel chain blocks, generating a complete first aggregated consensus transaction according to the third consensus transaction and the fourth consensus transactions, and sending the complete first aggregated consensus transaction to the main chain for the main chain node:
when the complete first aggregation consensus transaction is received, whether the incomplete first aggregation consensus transaction exists on the main chain is judged according to the hash value of the incomplete first aggregation consensus transaction:
if the first aggregated consensus transaction exists, the complete first aggregated consensus transaction is placed in an aggregated consensus transaction queue of the memory pool; wherein, the transactions in the aggregation consensus transaction queue are packed preferentially.
The above-described embodiments ensure that the complete first aggregate consensus transaction is packaged as soon as possible.
Fig. 2 is a schematic structural diagram of an apparatus according to an embodiment of the present invention.
As shown in fig. 2, as another aspect, the present application also provides an apparatus 200 including one or more Central Processing Units (CPUs) 201 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM)202 or a program loaded from a storage section 208 into a Random Access Memory (RAM) 203. In the RAM203, various programs and data necessary for the operation of the apparatus 200 are also stored. The CPU201, ROM202, and RAM203 are connected to each other via a bus 204. An input/output (I/O) interface 205 is also connected to bus 204.
The following components are connected to the I/O interface 205: an input portion 206 including a keyboard, a mouse, and the like; an output section 207 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage section 208 including a hard disk and the like; and a communication section 209 including a network interface card such as a LAN card, a modem, or the like. The communication section 209 performs communication processing via a network such as the internet. A drive 210 is also connected to the I/O interface 205 as needed. A removable medium 211 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 210 as necessary, so that a computer program read out therefrom is mounted into the storage section 208 as necessary.
In particular, according to an embodiment of the present disclosure, the method described in any of the above embodiments may be implemented as a computer software program. For example, embodiments of the present disclosure include a computer program product comprising a computer program tangibly embodied on a machine-readable medium, the computer program comprising program code for performing any of the methods described above. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 209 and/or installed from the removable medium 211.
As yet another aspect, the present application also provides a computer-readable storage medium, which may be the computer-readable storage medium included in the apparatus of the above-described embodiment; or it may be a separate computer readable storage medium not incorporated into the device. The computer readable storage medium stores one or more programs for use by one or more processors in performing the methods described in the present application.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units or modules described in the embodiments of the present application may be implemented by software or hardware. The described units or modules may also be provided in a processor, for example, each of the described units may be a software program provided in a computer or a mobile intelligent device, or may be a separately configured hardware device. Wherein the designation of a unit or module does not in some way constitute a limitation of the unit or module itself.
The above description is only a preferred embodiment of the application and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the invention herein disclosed is not limited to the particular combination of features described above, but also encompasses other arrangements formed by any combination of the above features or their equivalents without departing from the spirit of the present application. For example, the above features may be replaced with (but not limited to) features having similar functions disclosed in the present application.

Claims (6)

1. A node selection and transaction sending method, wherein the method is applied to parallel chain nodes, and the method comprises:
when the parallel chain block height of the current parallel chain is monitored to reach the first parallel chain block height of the rotatable leader node, performing the following operations on each first parallel chain block in a first parallel chain block height interval with the first parallel chain block height as a starting height and the sum of the first parallel chain block height and a second value as an ending height:
generating a first consensus transaction of the first parallel chain block, and sending the first consensus transaction to a main chain for a main chain node:
performing consensus on the first parallel chain block according to the first consensus transaction and a plurality of second consensus transactions; wherein the second consensus transaction is a consensus transaction of the first parallel chain block generated by other parallel chain link points of the current parallel chain;
when the fact that the heights of the first parallel chain blocks are all successfully identified is monitored, selecting a first parallel chain node which sends a first piece of common identification transaction which enables the successful identification as a first leader node;
acquiring node information selected as the first leader node from a main chain;
wherein the first leader node is configured to perform the following operations on the second parallel chain blocks after the end height: and generating an aggregation consensus transaction according to the second parallel chain blocks and sending the aggregation consensus transaction to a main chain so that a main chain node can perform consensus on the second parallel chain blocks according to the aggregation consensus transaction.
2. The method of claim 1, wherein each parallel chain is registered with selection interval information in a main chain, and when it is monitored that the parallel chain block height of the current parallel chain reaches the first parallel chain block height of the rotatable leader node, performing the following operations on each first parallel chain block in the first parallel chain block height interval with the first parallel chain block height as a starting height and with the sum of the first parallel chain block height and the second value as an ending height comprises:
judging whether the remainder of the parallel chain block height and the first selection interval information registered by the current parallel chain is 1:
if so, performing the following operations on each first parallel chain block in a first parallel chain block height interval with the first parallel chain block height as a starting height and the sum of the first parallel chain block height and the second value as an ending height;
and the second parallel chain blocks are parallel chain blocks from the ending height plus one to the first parallel chain block height plus the first selected interval information minus one.
3. The method of claim 2, wherein the first leader node is configured to perform the following operations on a number of second parallel-chain blocks after the end height: generating an aggregation consensus transaction according to the second parallel chain blocks and sending the aggregation consensus transaction to a main chain, so that a main chain node can perform consensus on the second parallel chain blocks according to the aggregation consensus transaction, wherein the consensus comprises the following steps:
the first leader node is configured to perform the following operations on each of the second parallel chain blocks, respectively:
generating a third consensus transaction for the second parallel-chain block;
receiving fourth consensus trades generated by a number of other parallel chain nodes excluding the first leader node; wherein the fourth consensus transaction is a consensus transaction of the second parallel-chain block generated excluding other parallel-chain nodes of the first leader node;
and aggregating to generate a first aggregated consensus transaction of the second parallel chain block according to a third consensus transaction and each fourth consensus transaction, and sending the first aggregated consensus transaction to a main chain so that a main chain node can perform consensus on the second parallel chain block according to the first aggregated consensus transaction.
4. The method of claim 2, wherein determining a first parallel-link node that sent a first consensus transaction that contributed to the consensus success as a first leader node comprises:
judging whether the first parallel link node is a parallel link node for generating a second aggregate consensus transaction:
if yes, when a second parallel link node which sends a second consensus transaction which causes the successful consensus is not the first parallel link node, determining the second parallel link node as a first leader node;
wherein the second aggregate consensus transaction is an aggregate consensus transaction of a block height that is the first parallel link block height minus one.
5. A computer device, the device comprising:
one or more processors;
a memory for storing one or more programs,
the one or more programs, when executed by the one or more processors, cause the one or more processors to perform the method recited in any of claims 1-4.
6. A storage medium storing a computer program, characterized in that the program, when executed by a processor, implements the method according to any one of claims 1-4.
CN202210204834.9A 2022-03-03 2022-03-03 Node selection and transaction transmission method, device and storage medium Active CN114827167B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210204834.9A CN114827167B (en) 2022-03-03 2022-03-03 Node selection and transaction transmission method, device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210204834.9A CN114827167B (en) 2022-03-03 2022-03-03 Node selection and transaction transmission method, device and storage medium

Publications (2)

Publication Number Publication Date
CN114827167A true CN114827167A (en) 2022-07-29
CN114827167B CN114827167B (en) 2023-10-17

Family

ID=82529684

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210204834.9A Active CN114827167B (en) 2022-03-03 2022-03-03 Node selection and transaction transmission method, device and storage medium

Country Status (1)

Country Link
CN (1) CN114827167B (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108182635A (en) * 2017-12-18 2018-06-19 深圳前海微众银行股份有限公司 Block chain common recognition method, system and computer readable storage medium
CN110866826A (en) * 2018-08-28 2020-03-06 傲为信息技术(江苏)有限公司 Transaction method based on parallel chain and block chain system
CN111242780A (en) * 2020-01-12 2020-06-05 杭州复杂美科技有限公司 Method, device and storage medium for sending consensus transaction
CN111798238A (en) * 2020-07-03 2020-10-20 杭州复杂美科技有限公司 Parallel chain consensus method, device and storage medium
CA3141042A1 (en) * 2019-06-13 2020-12-17 Luis Eduardo Gutierrez-Sheris System and method using a fitness-gradient blockchain consensus and providing advanced distributed ledger capabilities via specialized data records
CN112819625A (en) * 2021-02-01 2021-05-18 杭州复杂美科技有限公司 Parallel chain arbitration consensus method, computer device and storage medium
CN112839091A (en) * 2021-01-11 2021-05-25 杭州复杂美科技有限公司 Block generation method, computer device and storage medium
WO2021139534A1 (en) * 2020-01-12 2021-07-15 江苏复杂美科技有限公司 Segment-based consensus method, apparatus, and storage medium
US20210303403A1 (en) * 2020-07-03 2021-09-30 Alipay (Hangzhou) Information Technology Co., Ltd. Transaction processing method, apparatus, and electronic device for blockchain
CN113572825A (en) * 2021-07-09 2021-10-29 中国科学院计算技术研究所 Access control and resource access control method and system for relay chain cross-link architecture

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108182635A (en) * 2017-12-18 2018-06-19 深圳前海微众银行股份有限公司 Block chain common recognition method, system and computer readable storage medium
CN110866826A (en) * 2018-08-28 2020-03-06 傲为信息技术(江苏)有限公司 Transaction method based on parallel chain and block chain system
CA3141042A1 (en) * 2019-06-13 2020-12-17 Luis Eduardo Gutierrez-Sheris System and method using a fitness-gradient blockchain consensus and providing advanced distributed ledger capabilities via specialized data records
CN111242780A (en) * 2020-01-12 2020-06-05 杭州复杂美科技有限公司 Method, device and storage medium for sending consensus transaction
WO2021139534A1 (en) * 2020-01-12 2021-07-15 江苏复杂美科技有限公司 Segment-based consensus method, apparatus, and storage medium
CN111798238A (en) * 2020-07-03 2020-10-20 杭州复杂美科技有限公司 Parallel chain consensus method, device and storage medium
US20210303403A1 (en) * 2020-07-03 2021-09-30 Alipay (Hangzhou) Information Technology Co., Ltd. Transaction processing method, apparatus, and electronic device for blockchain
CN112839091A (en) * 2021-01-11 2021-05-25 杭州复杂美科技有限公司 Block generation method, computer device and storage medium
CN112819625A (en) * 2021-02-01 2021-05-18 杭州复杂美科技有限公司 Parallel chain arbitration consensus method, computer device and storage medium
CN113572825A (en) * 2021-07-09 2021-10-29 中国科学院计算技术研究所 Access control and resource access control method and system for relay chain cross-link architecture

Also Published As

Publication number Publication date
CN114827167B (en) 2023-10-17

Similar Documents

Publication Publication Date Title
CN110113408B (en) Block synchronization method, equipment and storage medium
CN110852882B (en) Packet consensus method, apparatus, device, and medium for blockchain networks
CN110287196B (en) Block storage method, parallel chain transaction acquisition method, equipment and storage medium
CN110083745B (en) Data query method, device and storage medium
CN111798316A (en) Parallel chain consensus method, device and storage medium
CN110796545A (en) Batch processing method, equipment and storage medium for blockchain transaction
CN106815080B (en) Distributed graph data processing method and device
CN112037061A (en) Processing method and device for transactions in block chain, electronic equipment and storage medium
US20210397483A1 (en) Evaluation device, evaluation method and evaluation program
CN109995787A (en) A kind of data processing method and relevant device
CN103701867A (en) Method, system and central server for processing call requests
CN110210972B (en) Method, device and storage medium for sending consensus transaction
CN113051054A (en) Method, apparatus and computer readable storage medium for scheduling artificial intelligence platform resources
CN111008249A (en) Parallel chain block synchronization method, device and storage medium
CN115618010A (en) Fusion map storage and processing method and device
CN114827167A (en) Node selection and transaction sending method, equipment and storage medium
CN114493876A (en) Transaction sending method, computer device and storage medium
CN112053154B (en) Transaction broadcasting method, apparatus and storage medium
CN112733202B (en) Parallel chain supervision consensus method, computer device and storage medium
CN112948388A (en) Parallel chain arbitration consensus method, computer device and storage medium
CN112882940A (en) Use case task scheduling method, system, device, equipment and storage medium
CN112800137A (en) Data scanning method, computer device and storage medium
CN111858772A (en) Parallel chain transaction group execution method, device and storage medium
CN113760494A (en) Task scheduling method and device
CN114140102A (en) Transaction sending method, computer device and storage medium

Legal Events

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