CN111464630B - Transaction broadcasting method, apparatus and storage medium - Google Patents
Transaction broadcasting method, apparatus and storage medium Download PDFInfo
- Publication number
- CN111464630B CN111464630B CN202010243415.7A CN202010243415A CN111464630B CN 111464630 B CN111464630 B CN 111464630B CN 202010243415 A CN202010243415 A CN 202010243415A CN 111464630 B CN111464630 B CN 111464630B
- Authority
- CN
- China
- Prior art keywords
- transaction
- node
- pool
- hash
- nodes
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/1097—Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION 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/00—Finance; Insurance; Tax strategies; Processing of corporate or income taxes
- G06Q40/04—Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/104—Peer-to-peer [P2P] networks
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/50—Network services
- H04L67/55—Push-based network services
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/50—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols using hash chains, e.g. blockchains or hash trees
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Business, Economics & Management (AREA)
- Accounting & Taxation (AREA)
- Finance (AREA)
- Development Economics (AREA)
- Economics (AREA)
- Marketing (AREA)
- Strategic Management (AREA)
- Technology Law (AREA)
- Physics & Mathematics (AREA)
- General Business, Economics & Management (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The invention provides a transaction broadcasting method, equipment and a storage medium, wherein the method comprises the following steps: receiving and storing a first transaction sent by a client, broadcasting a first transaction hash of the first transaction to other blockchain nodes, sending the first transaction to a first transaction pool node for broadcasting the first transaction to other transaction pool nodes, and pushing the first transaction to a plurality of blockchain nodes according to registered push addresses; receiving second transaction hashes broadcast by other blockchain nodes, and judging whether second transactions corresponding to the second transaction hashes exist locally: if not, monitoring whether a second transaction is received; and receiving and storing the third transaction pushed by the first transaction pool node. The application reduces transaction redundancy and improves transmission efficiency.
Description
Technical Field
The present application relates to the field of block chains and other technologies, and in particular, to a transaction broadcasting method, device, and storage medium.
Background
In the existing block chain technology, a transaction broadcast of a block chain adopts a P2P network transmission mode, and the problems of transaction redundancy and low transmission efficiency exist.
Disclosure of Invention
In view of the above-mentioned drawbacks and deficiencies of the prior art, it is desirable to provide a transaction broadcasting method, apparatus and storage medium that reduces transaction redundancy and improves transmission efficiency.
In a first aspect, the present invention provides a transaction broadcasting method applicable to blockchain nodes, where the blockchain network is configured with a corresponding transaction pool network, the transaction pool network includes a plurality of transaction pool nodes that communicate with each other, and each blockchain node is respectively registered with a push address for pushing a new transaction at any transaction pool node, where the method includes:
receiving and storing a first transaction sent by a client, broadcasting a first transaction hash of the first transaction to other blockchain nodes, sending the first transaction to a first transaction pool node for broadcasting the first transaction to other transaction pool nodes, and pushing the first transaction to a plurality of blockchain nodes according to registered push addresses;
receiving second transaction hashes broadcast by other blockchain nodes, and judging whether second transactions corresponding to the second transaction hashes exist locally: if not, monitoring whether a second transaction is received;
and receiving and storing the third transaction pushed by the first transaction pool node.
In a second aspect, the present invention provides a transaction broadcasting method applicable to transaction pool nodes, where a blockchain network is configured with a corresponding transaction pool network, the transaction pool network includes a plurality of transaction pool nodes that communicate with each other, and each blockchain node is respectively registered with a push address for pushing a new transaction at any transaction pool node, where the method includes:
receiving a first transaction sent by a first block chain node, broadcasting the first transaction to other transaction pool nodes, and pushing the first transaction to a plurality of block chain nodes according to each registered pushing address; wherein the first blockchain node broadcasts a first transaction hash of the first transaction to other blockchain nodes;
receiving a third transaction broadcasted by the first transaction pool node, broadcasting the third transaction to other transaction pool nodes, and pushing the third transaction to a plurality of block chain nodes according to each registered pushing address;
and when the first blockchain node receives the second transaction hash broadcast by other blockchain nodes and a second transaction corresponding to the second transaction hash does not exist in the local transaction pool, monitoring whether the second transaction is received.
In a third 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 transaction broadcast method provided according to embodiments of the present invention.
In a fourth aspect, the present invention also provides a storage medium storing a computer program that causes a computer to execute the transaction broadcasting method provided according to the embodiments of the present invention.
According to the transaction broadcasting method, the transaction broadcasting equipment and the storage medium provided by the embodiments of the invention, the first transaction hash of the first transaction is broadcasted to other block chain nodes by receiving and storing the first transaction sent by the client, the first transaction is sent to the first transaction pool node so as to be broadcasted to other transaction pool nodes, and the first transaction is pushed to a plurality of block chain nodes according to each registered push address; receiving second transaction hashes broadcast by other blockchain nodes, and judging whether second transactions corresponding to the second transaction hashes exist locally: if not, monitoring whether a second transaction is received; and the method for receiving and storing the third transaction pushed by the first transaction pool node reduces transaction redundancy and improves transmission efficiency.
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 transaction broadcasting method according to an embodiment of the present invention.
Fig. 2 is a flowchart of step S16 in a preferred embodiment of the method shown in fig. 1.
Fig. 3 is a flowchart of step S14 in a preferred embodiment of the method shown in fig. 1.
FIG. 4 is a flow chart of a preferred embodiment of the method shown in FIG. 3.
FIG. 5 is a flow chart of a preferred embodiment of the method shown in FIG. 4.
FIG. 6 is a flow chart of a preferred embodiment of the method shown in FIG. 5.
Fig. 7 is a flowchart of another transaction broadcasting method according to an embodiment of the present invention.
Fig. 8 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 transaction broadcasting method according to an embodiment of the present invention. As shown in fig. 1, in this embodiment, the present invention provides a transaction broadcasting method suitable for blockchain nodes, where the blockchain network is configured with a corresponding transaction pool network, the transaction pool network includes a plurality of transaction pool nodes that communicate with each other, and each blockchain node is respectively registered with a push address for pushing a new transaction at any transaction pool node, where the method includes:
s12: receiving and storing a first transaction sent by a client, broadcasting a first transaction hash of the first transaction to other blockchain nodes, sending the first transaction to a first transaction pool node for broadcasting the first transaction to other transaction pool nodes, and pushing the first transaction to a plurality of blockchain nodes according to registered push addresses;
s14: receiving second transaction hashes broadcast by other blockchain nodes, and judging whether second transactions corresponding to the second transaction hashes exist locally: if not, monitoring whether a second transaction is received;
s16: and receiving and storing the third transaction pushed by the first transaction pool node.
Specifically, assume that there are 7 blockchain link points node 1-node 7 in the blockchain; a corresponding transaction pool network is configured in the block chain network, and 3 transaction pool nodes txpool 1-txpool x3 are arranged in the transaction pool network; a push address for pushing a new transaction is registered in txpool1 by node1, node2 and node3, a push address for pushing a new transaction is registered in txpool2 by node4 and node5, and a push address for pushing a new transaction is registered in txpool3 by node6 and node 7; suppose that tx1 to tx10 exist locally in node1 to node 7;
take node1 as an example to broadcast a hash (tx10) to node 2;
the node2 executes step S14, receives the hash (tx10), determines whether tx10 corresponding to the hash (tx10) exists locally, and broadcasts the hash to other blockchain nodes (tx10) because tx10 exists locally.
Taking the example that the client of the user A generates tx11 and establishes connection with the node 1;
the client of the user A generates tx11 and sends the tx11 to the node 1;
the node1 executes the step S12, receives and stores tx11 sent by the client of the user A, broadcasts the hash (tx11) to nodes 2 to 7, and sends tx11 to txpool 1; txpool1 broadcasts tx11 to txpool2 and txpool 3;
node2 executes step S16, receiving tx11 pushed by txpool 1;
node3 executes step S16, receiving tx11 pushed by txpool 1;
node4 executes step S16, receiving tx11 pushed by txpool 2;
node5 executes step S16, receiving tx11 pushed by txpool 2;
node6 executes step S16, receiving tx11 pushed by txpool 3;
node7 executes step S16, receiving tx11 pushed by txpool 3;
take the example that node2 receives the hash (tx11) broadcast by node1 before it receives tx11 pushed by txpool 1;
the node2 executes step S14, receives the hash (tx11), determines whether tx11 corresponding to the hash (tx11) exists locally, and monitors whether tx11 is received because tx11 does not exist locally.
The above embodiment assumes that there are 7 block link points node 1-node 7 in the block chain; a corresponding transaction pool network is configured in the block chain network, and 3 transaction pool nodes txpool 1-txpool x3 are arranged in the transaction pool network; a push address for pushing a new transaction is registered in txpool1 by node1, node2 and node3, a push address for pushing a new transaction is registered in txpool2 by node4 and node5, and a push address for pushing a new transaction is registered in txpool3 by node6 and node 7; suppose that tx1 to tx10 exist locally in node1 to node 7; taking an example that node1 broadcasts a hash (tx10) to node2, a client of user a generates tx11, the client of user a establishes a connection with node1, and node2 receives the hash (tx11) broadcast by node1 before receiving tx11 pushed by txpool1 as an example, an exemplary explanation is made. In more embodiments, the number of the block chain nodes in the block chain, the number of the transaction pool nodes in the transaction pool network, and the registration relationship between the block chain nodes and the transaction pool nodes may also be configured according to actual requirements, so that the same technical effect can be achieved.
In the prior art of block chains, assuming that nodes 1-7 are connected with each other, node2 receives tx11 at least 6 times, while in the present application, node2 receives tx11 only once and hash (tx11) at least 6 times, and the data amount of hash (tx11) is much smaller than tx11, so that the method of the present application reduces transaction redundancy and improves transmission efficiency.
Fig. 2 is a flowchart of step S16 in a preferred embodiment of the method shown in fig. 1. As shown in fig. 2, step S16 includes:
s161: receiving and storing a third transaction pushed by the first transaction pool node;
s162: judging whether a third transaction hash of a third transaction exists locally:
if yes, go to step S163: monitoring is stopped for receipt of a third transaction.
Specifically, assume that node2 receives the hash (tx11) broadcast by node1 before receiving tx11 pushed by txpool1, at which time node2 monitors whether tx11 is received;
node2 executes step S161, receiving and storing tx11 pushed by txpool 1;
the node2 executes step S162 to determine whether there is a hash locally (tx 11);
since the hash (tx11) is locally stored, node2 executes step S163 to stop monitoring whether tx11 is received.
In more embodiments, the step of S163 may be configured according to actual requirements, for example, configured as a first manner "storing the third transaction pushed by the first transaction pool node, stopping monitoring whether the third transaction is received, and deleting the third hash value of the third transaction", or configured as a second manner "storing the third transaction pushed by the first transaction pool node, stopping monitoring whether the third transaction is received, and deleting the third hash value of the third transaction when the third transaction is pulled to generate the block" (when configured as a second manner, the second transaction is correspondingly pulled to generate the block, and the second hash value of the second transaction also needs to be deleted), so that the same technical effect may be achieved.
Fig. 3 is a flowchart of step S14 in a preferred embodiment of the method shown in fig. 1. As shown in fig. 3, in a preferred embodiment, step S14 includes:
s141: receiving second transaction hashes broadcast by other blockchain nodes, and judging whether second transactions corresponding to the second transaction hashes exist locally:
otherwise, step S142 is executed: when a second transaction corresponding to the second transaction hash is not received within a preconfigured first time length, requesting the second transaction from the block link node which sends the second transaction hash; and the number of the first and second groups,
s143: and storing the second transaction when the block chain node sending the second transaction hash returns the second transaction.
In the existing blockchain technology, node1 cannot broadcast tx11 to connected node2 due to network congestion, and because of mutual broadcast transactions among blockchain nodes, node2 will eventually receive tx11 broadcast by other blockchain nodes, such as node 3; however, in the present application, since tx11 is not generated by the client to which node2 is connected, it is only possible to wait for tx11 to be pushed by txpool 1; if txpool1 cannot push tx11 to node2 due to network congestion, node2 may not receive tx 11; the above problem can be solved by steps S141 to S143 shown in fig. 3.
FIG. 4 is a flow chart of a preferred embodiment of the method shown in FIG. 3. As shown in fig. 4, in a preferred embodiment, the method further includes:
s144: the second transaction hash is deleted.
The above embodiments configure a mechanism to delete transaction hashes.
FIG. 5 is a flow chart of a preferred embodiment of the method shown in FIG. 4. As shown in fig. 5, in a preferred embodiment, the method further includes:
s17: when the transaction pushed by the first transaction pool node is not received within a preset second time length, sending second request information for registering and pushing a new transaction to a second transaction pool node;
s18: and sending second request information for canceling the registration and pushing of new transaction to the first transaction pool node, so that the first transaction pool node deletes the pushing address of the current node when receiving the second request information.
Specifically, the node2 executes step S17, and when the transaction pushed by the txpool1 is not received within a preconfigured second time length (e.g. 2min), sends first request information for registering to push a new transaction to the txpool 2;
after receiving the first request message, the txpool1 stores the push address of the node 2;
the node2 executes step S18, and sends second request information for canceling the registration push new transaction to txpool 1;
when txpool1 receives the second request message, the push address of node2 is deleted.
The above embodiments save unnecessary network overhead for block-linked nodes.
FIG. 6 is a flow chart of a preferred embodiment of the method shown in FIG. 5. As shown in fig. 6, in a preferred embodiment, the method further includes:
s19: and requesting a second transaction which is not received within the first time length from the second transaction pool node.
Specifically, the node2 performs step S19, (after successful registration with txpool 2) node2 queries for a transaction (e.g., hash (tx12)) that has received the transaction hash locally but has not been received for more than a first duration, requests the transaction corresponding to the hash (tx12) from txpool2, and stores tx12 and deletes the hash (tx12) when txpool2 returns tx 12.
Step S19 is a method of how to obtain a transaction hash that has been received but a corresponding transaction has not been received beyond a first duration when a block link point registers a push address for pushing a new transaction with a new transaction pool node; in further embodiments, S19 may be configured as a first way to "request tx12 from the block link point that sent the hash (tx12), and when tx12 is returned, to store tx12 and delete the hash (tx 12)", or configured as a second way to "generate request information including hash (tx12), hash (tx13) and hash (tx14) if there are multiple transactions (e.g., hash (tx13) and hash (tx14)) that have received the transaction hash but have not been received for a first duration, and send the request information to tx pool2, and if there are corresponding tx12, tx13 and tx14 in tx 2, generate first information including tx12, tx13 and tx14 and return the first information to node 2", which may achieve the same technical effect.
Preferably, the registration of the block link node with a push address for pushing a new transaction at any transaction pool node includes:
sending first request information for registering and pushing new transactions to a plurality of transaction pool nodes so that each transaction pool node receiving the first request information can store a pushing address;
counting data results of the transaction pool nodes receiving the first request information within a preset third time length; wherein the data result comprises at least one of: transaction missed sending total number, transaction re-sending total number and time stamp for receiving transaction;
selecting a first transaction pool node according to a selection rule of a pre-configured transaction pool node and each data result;
and shielding the transactions pushed by other transaction pool nodes except the first transaction pool node (in another embodiment, the current step may also be configured according to actual requirements, and second request information for canceling the registration and pushing of new transactions is sent to other transaction pool nodes except the first transaction pool node and sending the first request information, so that when the second request information is received, the push address of the current node is deleted).
The above embodiment enables the block link point to be connected with the optimal trading pool node to obtain the optimal trading push service.
Fig. 7 is a flowchart of another transaction broadcasting method according to an embodiment of the present invention. As shown in fig. 7, in this embodiment, the present invention provides a transaction broadcasting method suitable for transaction pool nodes, where a blockchain network is configured with a corresponding transaction pool network, the transaction pool network includes a plurality of transaction pool nodes that communicate with each other, and each blockchain node registers a push address for pushing a new transaction at any transaction pool node, where the method includes:
s22: receiving a first transaction sent by a first block chain node, broadcasting the first transaction to other transaction pool nodes, and pushing the first transaction to a plurality of block chain nodes according to each registered pushing address; wherein the first blockchain node broadcasts a first transaction hash of the first transaction to other blockchain nodes;
s24: receiving a third transaction broadcasted by the first transaction pool node, broadcasting the third transaction to other transaction pool nodes, and pushing the third transaction to a plurality of block chain nodes according to each registered pushing address;
and when the first blockchain node receives the second transaction hash broadcast by other blockchain nodes and a second transaction corresponding to the second transaction hash does not exist in the local transaction pool, monitoring whether the second transaction is received.
The transaction broadcasting principle of the above embodiment can refer to the method shown in fig. 1, and is not described herein again.
Preferably, storing the first transaction comprises:
judging whether a first transaction hash of a first transaction exists locally:
if yes, stopping monitoring whether the first transaction is received.
The transaction broadcasting principle of the above embodiment can refer to the method shown in fig. 2, and is not described herein again.
Preferably, monitoring whether the second transaction is received comprises:
when a second transaction corresponding to the second transaction hash is not received within a preconfigured first time length, requesting the second transaction from the block link node which sends the second transaction hash;
and storing the second transaction when the block chain node sending the second transaction hash returns the second transaction.
The transaction broadcasting principle of the above embodiment can refer to the method shown in fig. 3, and is not described herein again.
Preferably, after storing the second transaction, the method further comprises:
the second transaction hash is deleted.
The transaction broadcasting principle of the above embodiment can refer to the method shown in fig. 4, and is not described herein again.
Preferably, the method further comprises:
receiving second request information for canceling registration push new transaction sent by the first blockchain node, and deleting a push address of the first blockchain node;
the second request information is generated when the first blockchain node does not receive the transaction pushed by the current transaction pool node within the second preset time length.
The transaction broadcasting principle of the above embodiment can refer to the method shown in fig. 5, and is not described herein again.
Fig. 8 is a schematic structural diagram of an apparatus according to an embodiment of the present invention.
As shown in fig. 8, as another aspect, the present application also provides an apparatus 800 including one or more Central Processing Units (CPUs) 801 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM)802 or a program loaded from a storage section 808 into a Random Access Memory (RAM) 803. In the RAM803, various programs and data necessary for the operation of the apparatus 800 are also stored. The CPU801, ROM802, and RAM803 are connected to each other via a bus 804. An input/output (I/O) interface 805 is also connected to bus 804.
The following components are connected to the I/O interface 805: an input portion 806 including a keyboard, a mouse, and the like; an output section 807 including a signal such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage portion 808 including a hard disk and the like; and a communication section 809 including a network interface card such as a LAN card, a modem, or the like. The communication section 809 performs communication processing via a network such as the internet. A drive 810 is also connected to the I/O interface 805 as necessary. A removable medium 811 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 810 as necessary, so that a computer program read out therefrom is mounted on the storage section 808 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 the methods of the above embodiments. In such an embodiment, the computer program can be downloaded and installed from a network through the communication section 809 and/or installed from the removable medium 811.
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 herein.
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 (12)
1. A transaction broadcasting method, wherein a blockchain network is configured with a corresponding transaction pool network, the transaction pool network includes a plurality of transaction pool nodes that communicate with each other, and each blockchain node is respectively registered with a push address for pushing a new transaction at any transaction pool node, the method is applied to the blockchain node, and the method includes:
receiving and storing a first transaction sent by a client, broadcasting a first transaction hash of the first transaction to other blockchain nodes, sending the first transaction to a first transaction pool node for broadcasting the first transaction to other transaction pool nodes, and pushing the first transaction to a plurality of blockchain nodes according to each registered pushing address;
receiving second transaction hashes broadcast by other blockchain nodes, and judging whether second transactions corresponding to the second transaction hashes exist locally: if not, monitoring whether the second transaction is received;
and receiving and storing a third transaction pushed by the first transaction pool node.
2. The method of claim 1, wherein receiving and storing the third transaction pushed by the first transaction pool node comprises:
receiving and storing a third transaction pushed by the first transaction pool node;
judging whether a third transaction hash of the third transaction exists locally:
if so, the monitoring is stopped for receipt of a third transaction.
3. The method of claim 1, wherein the monitoring whether the second transaction is received comprises:
when a second transaction corresponding to the second transaction hash is not received within a preconfigured first time length, requesting the second transaction from a block chain node point which sends the second transaction hash;
storing the second transaction when the chunk chain node that sent the second transaction hash returns to the second transaction.
4. The method of claim 3, wherein after storing the second transaction, further comprising:
deleting the second transaction hash.
5. The method of claim 4, further comprising:
when the transaction pushed by the first transaction pool node is not received within a preset second time, sending first request information for registering and pushing a new transaction to a second transaction pool node;
and sending second request information for canceling the registration and pushing of new transaction to the first transaction pool node, so that the first transaction pool node deletes the pushing address of the current node when receiving the second request information.
6. The method of claim 5, further comprising:
and requesting a second transaction which is not received within the first time length from the second transaction pool node.
7. A transaction broadcasting method, wherein a blockchain network is configured with a corresponding transaction pool network, the transaction pool network includes a plurality of transaction pool nodes that communicate with each other, and each blockchain node is respectively registered with a push address for pushing a new transaction at any transaction pool node, the method is applicable to the transaction pool nodes, and the method includes:
receiving a first transaction sent by a first block chain node, broadcasting the first transaction to other transaction pool nodes, and pushing the first transaction to a plurality of block chain nodes according to each registered pushing address; wherein the first blockchain node broadcasts a first transaction hash for the first transaction to other blockchain nodes;
receiving a third transaction broadcasted by a first transaction pool node, broadcasting the third transaction to other transaction pool nodes, and pushing the third transaction to a plurality of block chain nodes according to each registered pushing address;
and when the first blockchain node receives second transaction hashes broadcast by other blockchain nodes and a second transaction corresponding to the second transaction hash does not exist in the local transaction pool, monitoring whether the second transaction is received or not.
8. The method of claim 7, wherein the monitoring whether the second transaction is received comprises:
when a second transaction corresponding to the second transaction hash is not received within a preconfigured first time length, requesting the second transaction from a block chain node point which sends the second transaction hash;
storing the second transaction when the chunk chain node that sent the second transaction hash returns to the second transaction.
9. The method of claim 8, wherein after storing the second transaction, further comprising:
deleting the second transaction hash.
10. The method of claim 9, further comprising:
receiving second request information for canceling registration push new transaction sent by the first blockchain node, and deleting a push address of the first blockchain node;
the second request message is generated by the first blockchain node when the transaction pushed by the current transaction pool node is not received within a second pre-configured time length.
11. 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-10.
12. 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-10.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010243415.7A CN111464630B (en) | 2020-03-31 | 2020-03-31 | Transaction broadcasting method, apparatus and storage medium |
PCT/CN2020/138880 WO2021196768A1 (en) | 2020-03-31 | 2020-12-24 | Transaction broadcasting method, and device and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010243415.7A CN111464630B (en) | 2020-03-31 | 2020-03-31 | Transaction broadcasting method, apparatus and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111464630A CN111464630A (en) | 2020-07-28 |
CN111464630B true CN111464630B (en) | 2021-07-06 |
Family
ID=71685173
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010243415.7A Active CN111464630B (en) | 2020-03-31 | 2020-03-31 | Transaction broadcasting method, apparatus and storage medium |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN111464630B (en) |
WO (1) | WO2021196768A1 (en) |
Families Citing this family (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111464630B (en) * | 2020-03-31 | 2021-07-06 | 杭州复杂美科技有限公司 | Transaction broadcasting method, apparatus and storage medium |
CN111866166B (en) * | 2020-07-30 | 2023-04-18 | 杭州复杂美科技有限公司 | Chat method, apparatus and storage medium |
CN112053154B (en) * | 2020-09-02 | 2023-11-28 | 杭州复杂美科技有限公司 | Transaction broadcasting method, apparatus and storage medium |
CN112052250A (en) * | 2020-09-02 | 2020-12-08 | 杭州复杂美科技有限公司 | Performance measurement method, broadcast performance adjustment method, device and storage medium |
CN112600905B (en) * | 2020-12-09 | 2023-04-14 | 杭州复杂美科技有限公司 | Transaction broadcasting and block generating method, apparatus and storage medium |
CN113438092B (en) * | 2021-06-29 | 2022-03-01 | 上海万向区块链股份公司 | Transaction broadcasting method and system |
CN113626530B (en) * | 2021-09-03 | 2024-08-06 | 陕西丕邦云计算有限公司 | Block generation method, computer device, and storage medium |
CN114358938A (en) * | 2021-12-31 | 2022-04-15 | 杭州复杂美科技有限公司 | Transaction, block broadcasting method, device and storage medium |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109067724A (en) * | 2018-07-24 | 2018-12-21 | 中国联合网络通信集团有限公司 | Block chain data trade method, apparatus, equipment and storage medium |
CN109586934A (en) * | 2018-12-27 | 2019-04-05 | 链极智能科技(上海)有限公司 | A kind of block chain bottom-layer network transaction Synchronous fluorimetry method |
CN109903042A (en) * | 2019-01-18 | 2019-06-18 | 深圳壹账通智能科技有限公司 | Blockchain-based information authorization method, device, medium and electronic device |
Family Cites Families (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20190222418A1 (en) * | 2018-01-12 | 2019-07-18 | Walmart Apollo, Llc | Systems and Methods for Key Exchange in Blockchain |
US11308488B2 (en) * | 2018-06-12 | 2022-04-19 | The Vanguard Group, Inc. | Device, method, and computer readable medium for large scale electronic processing |
CN109523385A (en) * | 2018-12-07 | 2019-03-26 | 深圳市智税链科技有限公司 | Method, accounting nodes and the medium of Transaction Information are inquired in block chain network |
CN110113388B (en) * | 2019-04-17 | 2020-01-14 | 四川大学 | Improved clustering algorithm-based block chain system consensus method and device |
CN110868386B (en) * | 2019-05-17 | 2022-05-20 | 北京安妮全版权科技发展有限公司 | Block chain consensus method |
WO2019179538A2 (en) * | 2019-07-11 | 2019-09-26 | Alibaba Group Holding Limited | Shared blockchain data storage |
CN110430066B (en) * | 2019-07-15 | 2021-07-06 | 杭州复杂美科技有限公司 | Method, apparatus and storage medium for reducing repeated broadcasting of blockchain transactions |
CN110852882B (en) * | 2019-11-11 | 2020-11-20 | 北京众享比特科技有限公司 | Packet consensus method, apparatus, device, and medium for blockchain networks |
CN111464630B (en) * | 2020-03-31 | 2021-07-06 | 杭州复杂美科技有限公司 | Transaction broadcasting method, apparatus and storage medium |
-
2020
- 2020-03-31 CN CN202010243415.7A patent/CN111464630B/en active Active
- 2020-12-24 WO PCT/CN2020/138880 patent/WO2021196768A1/en active Application Filing
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109067724A (en) * | 2018-07-24 | 2018-12-21 | 中国联合网络通信集团有限公司 | Block chain data trade method, apparatus, equipment and storage medium |
CN109586934A (en) * | 2018-12-27 | 2019-04-05 | 链极智能科技(上海)有限公司 | A kind of block chain bottom-layer network transaction Synchronous fluorimetry method |
CN109903042A (en) * | 2019-01-18 | 2019-06-18 | 深圳壹账通智能科技有限公司 | Blockchain-based information authorization method, device, medium and electronic device |
Non-Patent Citations (2)
Title |
---|
"A blockchain-based reputation system for data credibility assessment in vehicular networks";Zhe Yang; Kan Zheng; Kan Yang;《2017 IEEE 28th Annual International Symposium on Personal, Indoor, and Mobile Radio Communications (PIMRC)》;20180215;全文 * |
"基于区块链的身份认证系统的设计与实现";顾燕;《中国优秀硕士学位论文全文数据库(电子期刊)信息科技辑》;20181130;全文 * |
Also Published As
Publication number | Publication date |
---|---|
CN111464630A (en) | 2020-07-28 |
WO2021196768A1 (en) | 2021-10-07 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111464630B (en) | Transaction broadcasting method, apparatus and storage medium | |
EP1867137B1 (en) | Method and apparatus for efficiently expanding a p2p network | |
CN112118315A (en) | Data processing system, method, device, electronic equipment and storage medium | |
US20190207891A1 (en) | Selective distribution of messages in a scalable, real-time messaging system | |
CA2896865C (en) | Method and system for using a recursive event listener on a node in hierarchical data structure | |
CN110956474A (en) | Electronic invoice system based on block chain | |
CN112445626B (en) | Data processing method and device based on message middleware | |
US20170193416A1 (en) | Reducing costs related to use of networks based on pricing heterogeneity | |
US20130246507A1 (en) | Relay device, information processing system, and computer-readable recording medium | |
CN112714192A (en) | Data synchronization method and device, computer readable medium and electronic equipment | |
CN111324449A (en) | Transaction storage and broadcasting method, device and storage medium of memory pool | |
US20190370293A1 (en) | Method and apparatus for processing information | |
CN110490734B (en) | Transaction group construction and broadcasting method and system, equipment and storage medium | |
CN110287263B (en) | Parallel chain self-consensus method, device and storage medium | |
CN111343220B (en) | Repeater, distributed file transmission method, distributed file transmission system, medium and electronic equipment | |
CN113490933A (en) | Distributed data processing | |
CN110798495B (en) | Method and server for end-to-end message push in cluster architecture mode | |
CN112055077B (en) | Block link access method, device and storage medium | |
US8250140B2 (en) | Enabling connections for use with a network | |
CN112053154B (en) | Transaction broadcasting method, apparatus and storage medium | |
CN111639944B (en) | Transaction broadcasting method, apparatus and storage medium | |
CN111404701B (en) | Information broadcasting method, equipment and storage medium | |
CN115269645A (en) | Information query method and device, electronic equipment and computer readable medium | |
CN114358938A (en) | Transaction, block broadcasting method, device and storage medium | |
US20210173878A1 (en) | Systems and methods of incremented aggregated data retrieval |
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 |