CN111324449A - Transaction storage and broadcasting method, device and storage medium of memory pool - Google Patents
Transaction storage and broadcasting method, device and storage medium of memory pool Download PDFInfo
- Publication number
- CN111324449A CN111324449A CN201911284214.5A CN201911284214A CN111324449A CN 111324449 A CN111324449 A CN 111324449A CN 201911284214 A CN201911284214 A CN 201911284214A CN 111324449 A CN111324449 A CN 111324449A
- Authority
- CN
- China
- Prior art keywords
- transaction
- queue
- storing
- memory pool
- broadcasting
- 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.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 36
- 238000004590 computer program Methods 0.000 claims description 9
- 230000001502 supplementing effect Effects 0.000 claims 2
- PCTMTFRHKVHKIS-BMFZQQSSSA-N (1s,3r,4e,6e,8e,10e,12e,14e,16e,18s,19r,20r,21s,25r,27r,30r,31r,33s,35r,37s,38r)-3-[(2r,3s,4s,5s,6r)-4-amino-3,5-dihydroxy-6-methyloxan-2-yl]oxy-19,25,27,30,31,33,35,37-octahydroxy-18,20,21-trimethyl-23-oxo-22,39-dioxabicyclo[33.3.1]nonatriaconta-4,6,8,10 Chemical compound C1C=C2C[C@@H](OS(O)(=O)=O)CC[C@]2(C)[C@@H]2[C@@H]1[C@@H]1CC[C@H]([C@H](C)CCCC(C)C)[C@@]1(C)CC2.O[C@H]1[C@@H](N)[C@H](O)[C@@H](C)O[C@H]1O[C@H]1/C=C/C=C/C=C/C=C/C=C/C=C/C=C/[C@H](C)[C@@H](O)[C@@H](C)[C@H](C)OC(=O)C[C@H](O)C[C@H](O)CC[C@@H](O)[C@H](O)C[C@H](O)C[C@](O)(C[C@H](O)[C@H]2C(O)=O)O[C@H]2C1 PCTMTFRHKVHKIS-BMFZQQSSSA-N 0.000 description 8
- 238000010586 diagram Methods 0.000 description 6
- 230000007246 mechanism Effects 0.000 description 6
- 238000005516 engineering process Methods 0.000 description 5
- 238000004891 communication Methods 0.000 description 4
- 230000006870 function Effects 0.000 description 4
- 230000000694 effects Effects 0.000 description 3
- 230000007812 deficiency Effects 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 230000005055 memory storage Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000008569 process Effects 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5005—Allocation of resources, e.g. of the central processing unit [CPU] to service a request
- G06F9/5011—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals
- G06F9/5016—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals the resource being the memory
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/27—Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/54—Interprogram communication
- G06F9/542—Event management; Broadcasting; Multicasting; Notifications
-
- 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/56—Provisioning of proxy services
- H04L67/568—Storing data temporarily at an intermediate stage, e.g. caching
Abstract
The invention provides a transaction storage and broadcasting method, equipment and a storage medium of a memory pool, wherein the method comprises the following steps: receiving a first transaction, and when the remaining storage capacity of a first queue in a memory pool is smaller than a first capacity required for storing the first transaction and the remaining storage capacity of a second queue in the memory pool is not smaller than the first capacity, if the first transaction is sent by a client, storing the first transaction in the second queue and broadcasting, and if the first transaction is not sent by the client, storing the first transaction in the second queue; and when the remaining storage capacity of the first queue in the memory pool is not less than the first capacity required for storing the first transaction, storing the first transaction into the first queue and broadcasting. The method and the device increase the number of cache transactions of the blockchain network when the blockchain network is congested.
Description
Technical Field
The present application relates to the field of blockchain technologies, and in particular, to a method, device, and storage medium for transaction storage and broadcast in a memory pool.
Background
In the existing block chain technology, a memory pool of a single node broadcasts a received message after receiving a transaction; assuming that there are four ABCD nodes in the block chain, in the worst case, the memory pool of the ABCD is congested, and the transactions in the memory pool are tx1, tx2, and tx3, at this time, when the current node a receives tx4 sent by a client, because the memory pool is full, tx4 is discarded; the above mechanism causes a problem of low total number of transactions in the blockchain network.
Disclosure of Invention
In view of the above-mentioned drawbacks and deficiencies of the prior art, it is desirable to provide a transaction storage and broadcast method, apparatus, and storage medium for a memory pool that can increase the number of cache transactions in a blockchain network when the blockchain network is congested.
In a first aspect, the present invention provides a transaction storage and broadcast method for a memory pool of a block chain node, where the memory pool includes two queues, and the block chain node acquires a transaction generation block from a first queue of the memory pool, and the method includes:
receiving a first transaction, and judging whether the remaining storage capacity of the first queue is smaller than a first capacity required for storing the first transaction:
if yes, judging whether the remaining storage capacity of the second queue in the memory pool is not less than the first storage capacity:
if yes, judging whether the first transaction is sent by the client side:
if yes, storing the first transaction into a second queue and broadcasting;
if not, storing the first transaction into a second queue;
and if not, storing the first transaction into the first queue and broadcasting.
In a second aspect, the present invention provides another transaction storage and broadcast method for a memory pool of a blockchain node, where the memory pool includes two queues, and the blockchain node acquires a transaction generation block from a first queue of the memory pool, and the method includes:
receiving a first transaction, and judging whether the remaining storage capacity of the first queue is smaller than a first capacity required for storing the first transaction:
if yes, judging whether the remaining storage capacity of the second queue in the memory pool is not less than the first storage capacity:
if yes, judging whether the first transaction is sent by the client side:
if yes, confirming whether a second transaction which can be replaced exists in the first queue according to a pre-configured transaction queuing rule:
if yes, the second transaction is transferred to a second queue, and the first transaction is stored in the first queue and broadcasted;
if not, storing the first transaction into a second queue and broadcasting;
if not, storing the first transaction into a second queue;
and if not, storing the first transaction into the first queue and broadcasting.
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 transactional memory storage and broadcast method of a memory pool provided according to embodiments of the present invention.
In a fourth aspect, the present invention also provides a storage medium storing a computer program, the computer program enabling a computer to execute the transaction storage and broadcasting method for a memory pool according to the embodiments of the present invention.
In the transaction storage and broadcasting method, device, and storage medium of a memory pool provided in various embodiments of the present invention, by receiving a first transaction, when a remaining storage capacity of a first queue in the memory pool is smaller than a first capacity required for storing the first transaction, and a remaining storage capacity of a second queue in the memory pool is not smaller than the first capacity, if the first transaction is sent by a client, the first transaction is stored in the second queue and broadcasted, and if the first transaction is not sent by the client, the first transaction is stored in the second queue; when the remaining storage capacity of the first queue in the memory pool is not less than the first capacity required for storing the first transaction, the first transaction is stored in the first queue and broadcasted, and the number of the block chain network cache transactions is increased.
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 storage and broadcast method for a memory pool according to an embodiment of the present invention.
Fig. 2 is a flowchart of another transaction storage and broadcast method for a memory pool according to an embodiment of the present invention.
Fig. 3 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 storage and broadcast method for a memory pool according to an embodiment of the present invention. As shown in fig. 1, in this embodiment, the present invention provides a transaction storage and broadcast method for a memory pool of a blockchain node, where the memory pool includes two queues, and the blockchain node acquires a transaction generation block from a first queue of the memory pool, and the method includes:
s122: receiving a first transaction, and judging whether the remaining storage capacity of the first queue is smaller than a first capacity required for storing the first transaction:
if yes, go to step S123: judging whether the remaining storage capacity of the second queue in the memory pool is not less than the first storage capacity:
if yes, go to step S124: determining whether the first transaction was sent by the client:
if yes, go to step S125: storing the first transaction in a second queue and broadcasting;
otherwise, step S126 is executed: storing the first transaction in a second queue;
otherwise, step S127 is executed: the first transaction is stored in a first queue and broadcast.
Specifically, it is assumed that when a first transaction is received, the remaining capacity of the first queue is 0kb, the remaining capacity of the second queue is 100kb, and the first capacity required for the first transaction is 60 kb;
in step S122, the node receives the first transaction, and determines whether the remaining storage capacity of the first queue is smaller than a first capacity required for storing the first transaction:
since 0kb is smaller than 60kb, step S123 is performed: the node judges whether the remaining storage capacity of the second queue in the memory pool is not less than the first storage capacity:
since 100kb >60kb, step S124 is performed: the node judges whether the first transaction is sent by the client:
if the first transaction is sent by the client, step S125 is executed: storing the first transaction in a second queue and broadcasting;
if the first transaction is not sent by the client, step S126 is executed: the first transaction is deposited into a second queue.
If the remaining capacity of the first queue is not less than 60kb when receiving the first transaction, the node determines that the remaining storage capacity of the first queue is not less than the first capacity required for storing the first transaction, and then executes step S127: the first transaction is stored in a first queue and broadcast.
If the remaining storage capacity of the first queue is less than the first capacity required for storing the first transaction and the remaining storage capacity of the second queue is less than the first capacity required for storing the first transaction when receiving the first transaction (i.e. the remaining capacity of the first queue is less than 60kb and the remaining capacity of the second queue is also less than 60kb), the first transaction is deleted.
The above embodiment has been described in detail by taking the example that when the first transaction is received, the remaining capacity of the first queue is 0kb, the remaining capacity of the second queue is 100kb, and the first capacity required for the first transaction is 60 kb.
In more embodiments, the memory pool may be configured to at least two queues according to actual requirements, for example, the memory pool includes 3 queues, so that the same technical effect can be achieved.
In the existing block chain technology, a memory pool of a single node broadcasts a received message after receiving a transaction; assuming that there are four ABCD nodes in the block chain, in the worst case, the memory pool of the ABCD is congested, and the transactions in the memory pool are tx1, tx2, and tx3, at this time, when the current node a receives tx4 sent by a client, because the memory pool is full, tx4 is discarded; the above mechanism causes a problem of low total number of transactions in the blockchain network. When the transaction storage and broadcast mechanism of the above embodiment is used, the first queue of the memory pool of the ABCD is full and is tx1 and tx2, and at this time, it is assumed that a receives tx4 sent by the client, and tx4 is stored in the second queue of a and broadcast; b receives tx3 sent by the client, stores tx3 into a second queue of B and broadcasts; c receives tx5 sent by the client, stores tx5 into a second queue of C and broadcasts; d, receiving tx6 sent by the client, storing tx6 into a second queue of D and broadcasting; at this point, the number of cache transactions in the blockchain network increases.
Preferably, when the transactions in the first queue are deleted, the transactions in the second queue are replenished to the first queue and broadcast.
Specifically, suppose that the node generates a first block, the first block comprises tx1 to tx10, and the total capacity of tx1 to tx10 is 130 kb; after the first block is identified, the tx 1-tx 10 in the memory pool are deleted; at this point, a number of transactions in the second queue (no greater than 130kb) are replenished to the first queue and broadcast.
Fig. 2 is a flowchart of another transaction storage and broadcast method for a memory pool according to an embodiment of the present invention. As shown in fig. 2, in this embodiment, the present invention provides a transaction storage and broadcast method for a memory pool of a blockchain node, where the memory pool includes two queues, and the blockchain node acquires a transaction generation block from a first queue of the memory pool, and the method includes:
s222: receiving a first transaction, and judging whether the remaining storage capacity of the first queue is smaller than a first capacity required for storing the first transaction:
if yes, go to step S223: judging whether the remaining storage capacity of the second queue in the memory pool is not less than the first storage capacity:
if yes, go to step S224: determining whether the first transaction was sent by the client:
if yes, go to step S225: confirming whether a second transaction which can be replaced exists in the first queue according to a pre-configured transaction queuing rule:
if yes, go to step S226: transferring the second transaction to a second queue, storing the first transaction in the first queue and broadcasting;
otherwise, step S227 is executed: storing the first transaction in a second queue and broadcasting;
otherwise, step S228 is executed: storing the first transaction in a second queue;
otherwise, step S229 is executed: the first transaction is stored in a first queue and broadcast.
Specifically, take the example that pre-configured transaction queuing rules are the examples that transactions with higher commission fees can be packed faster; assuming that when a first transaction is received, the remaining capacity of the first queue is 0kb, the remaining capacity of the second queue is 100kb, the first capacity required for the first transaction is 60kb, and the capacity required for the second transaction is 70 kb;
in step S222, the node receives the first transaction, and determines whether the remaining storage capacity of the first queue is smaller than a first capacity required for storing the first transaction:
since 0kb <60kb, step S223 is performed: the node judges whether the remaining storage capacity of the second queue in the memory pool is not less than the first storage capacity:
since 100kb >60kb, step S224 is performed: the node judges whether the first transaction is sent by the client:
if the first transaction is sent by the client, step S225 is executed: confirming whether a second transaction which can be replaced exists in the first queue according to a pre-configured transaction queuing rule:
if the commission of the first transaction cost is higher than the commission of the second transaction cost, step S226 is executed: transferring the second transaction to a second queue, storing the first transaction in the first queue and broadcasting;
if the commission of the first transaction cost is not higher than the commission of the second transaction cost, step S227 is executed: storing the first transaction in a second queue and broadcasting;
if the first transaction is not sent by the client, step S228 is executed: the first transaction is deposited into a second queue.
If the remaining capacity of the first queue is not less than 60kb when receiving the first transaction, the node determines that the remaining storage capacity of the first queue is not less than the first capacity required for storing the first transaction, and then performs step S229: the first transaction is stored in a first queue and broadcast.
If the remaining storage capacity of the first queue is less than the first capacity required for storing the first transaction and the remaining storage capacity of the second queue is less than the first capacity required for storing the first transaction when receiving the first transaction (i.e. the remaining capacity of the first queue is less than 60kb and the remaining capacity of the second queue is also less than 60kb), the first transaction is deleted.
The above embodiment takes the pre-configured transaction queuing rules as an example that transactions with higher commission fees can be packaged faster; assume that when a first transaction is received, the remaining capacity of the first queue is 0kb, the remaining capacity of the second queue is 100kb, the first capacity required for the first transaction is 60kb, and the capacity required for the second transaction is 70 kb.
In further embodiments, step S228 may be further configured to:
confirming whether a second transaction which can be replaced exists in the first queue according to the transaction queuing rule:
if yes, the second transaction is transferred to a second queue, and the first transaction is stored in the first queue and broadcasted;
otherwise, the first transaction is stored in the second queue.
Correspondingly, the transaction storage and broadcast mechanism of the memory pool when the remaining storage capacity of the first queue is smaller than the first capacity required for storing the first transaction and the remaining storage capacity of the second queue is smaller than the first capacity required for storing the first transaction may also be configured according to the actual demand, for example, configured to:
determining whether the first transaction was sent by the client:
if yes, confirming whether a second transaction which can be replaced exists in the first queue according to the transaction queuing rule:
if yes, the second transaction is transferred to a second queue, and the first transaction is stored in the first queue and broadcasted;
if not, determining whether a replaceable third transaction exists in the second queue according to the transaction queuing rule:
if yes, deleting the third transaction, storing the first transaction in a second queue and broadcasting;
if not, deleting the first transaction;
if not, determining whether a second transaction which can be replaced exists in the first queue according to the transaction queuing rule:
if yes, the second transaction is transferred to a second queue, and the first transaction is stored in the first queue and broadcasted;
if not, determining whether a replaceable third transaction exists in the second queue according to the transaction queuing rule:
if yes, deleting the third transaction, and storing the first transaction in a second queue;
otherwise, the first transaction is deleted.
In further embodiments, the preconfigured transaction queuing rules may also be configured according to actual requirements, and transactions with higher first ratio may be packed more quickly, where the first ratio is a ratio of the commission charge to the number of bytes of transactions, and the same technical effect may be achieved.
In more embodiments, the memory pool may be configured to at least two queues according to actual requirements, for example, the memory pool includes 3 queues, so that the same technical effect can be achieved.
In the existing block chain technology, a memory pool of a single node broadcasts a received message after receiving a transaction; assuming that there are four ABCD nodes in the block chain, in the worst case, the memory pool of the ABCD is congested, and the transactions in the memory pool are tx1, tx2, and tx3, at this time, when the current node a receives tx4 sent by a client, because the memory pool is full, tx4 is discarded; the above mechanism causes a problem of low total number of transactions in the blockchain network. When the transaction storage and broadcast mechanism of the above embodiment is used, the first queue of the memory pool of the ABCD is full and is tx1 and tx2, and it is assumed that a receives tx4 sent by the client, stores tx4 in the first queue of a and broadcasts or stores in the second queue of a and broadcasts; b receives tx3 sent by the client, stores tx3 in the first queue of B and broadcasts or stores in the second queue of B and broadcasts; c receives tx5 sent by the client, stores tx5 into the first queue of C and broadcasts or stores into the second queue of C and broadcasts; d receives tx6 sent by the client, stores tx6 into the first queue of D and broadcasts or stores into the second queue of D and broadcasts; at this point, the number of cache transactions in the blockchain network increases.
Preferably, when the transactions in the first queue are deleted, the transactions in the second queue are replenished to the first queue and broadcast.
Specifically, suppose that the node generates a first block, the first block comprises tx1 to tx10, and the total capacity of tx1 to tx10 is 130 kb; after the first block is identified, the tx 1-tx 10 in the memory pool are deleted; at this point, a number of transactions in the second queue (no greater than 130kb) are replenished to the first queue and broadcast.
Fig. 3 is a schematic structural diagram of an apparatus according to an embodiment of the present invention.
As shown in fig. 3, as another aspect, the present application also provides an apparatus 300 including one or more Central Processing Units (CPUs) 301 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM)302 or a program loaded from a storage section 308 into a Random Access Memory (RAM) 303. In the RAM303, various programs and data necessary for the operation of the apparatus 300 are also stored. The CPU301, ROM302, and RAM303 are connected to each other via a bus 304. An input/output (I/O) interface 305 is also connected to bus 304.
The following components are connected to the I/O interface 305: an input portion 306 including a keyboard, a mouse, and the like; an output section 307 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage section 308 including a hard disk and the like; and a communication section 309 including a network interface card such as a LAN card, a modem, or the like. The communication section 309 performs communication processing via a network such as the internet. A drive 310 is also connected to the I/O interface 305 as needed. A removable medium 311 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 310 as necessary, so that a computer program read out therefrom is mounted into the storage section 308 as necessary.
In particular, according to an embodiment of the present disclosure, the transaction storage and broadcasting method of the memory pool 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 a transactional storage and broadcasting method of a memory pool. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 309, and/or installed from the removable medium 311.
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 transactional storage and broadcast methods described in the memory pools of 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 transaction storage and broadcasting method for a memory pool is characterized in that the memory pool comprises two queues, a block chain node acquires a transaction generation block from a first queue of the memory pool, and the method is applied to the block chain node and comprises the following steps:
receiving a first transaction, and judging whether the remaining storage capacity of the first queue is smaller than a first capacity required for storing the first transaction:
if yes, judging whether the remaining storage capacity of the second queue in the memory pool is not less than the first storage capacity:
if yes, judging whether the first transaction is sent by the client side:
if yes, storing the first transaction into the second queue and broadcasting;
if not, storing the first transaction into the second queue;
and if not, storing the first transaction into the first queue and broadcasting.
2. The method of claim 1, further comprising:
and supplementing the transactions in the second queue to the first queue and broadcasting the transactions after the transactions in the first queue are deleted.
3. A transaction storage method and a transaction broadcasting method of a memory pool are characterized in that the memory pool comprises two queues, a block chain node acquires a transaction generation block from a first queue of the memory pool, and the method is suitable for the block chain node and comprises the following steps:
receiving a first transaction, and judging whether the remaining storage capacity of the first queue is smaller than a first capacity required for storing the first transaction:
if yes, judging whether the remaining storage capacity of the second queue in the memory pool is not less than the first storage capacity:
if yes, judging whether the first transaction is sent by the client side:
if yes, then confirming whether a second transaction which can be replaced exists in the first queue according to a pre-configured transaction queuing rule:
if yes, transferring the second transaction to a second queue, storing the first transaction into the first queue and broadcasting;
if not, storing the first transaction into the second queue and broadcasting;
if not, storing the first transaction into the second queue;
and if not, storing the first transaction into the first queue and broadcasting.
4. The method of claim 3 or 4, further comprising:
and supplementing the transactions in the second queue to the first queue and broadcasting the transactions after the transactions in the first queue are deleted.
5. An apparatus, characterized in that the apparatus comprises:
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.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911284214.5A CN111324449A (en) | 2019-12-13 | 2019-12-13 | Transaction storage and broadcasting method, device and storage medium of memory pool |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911284214.5A CN111324449A (en) | 2019-12-13 | 2019-12-13 | Transaction storage and broadcasting method, device and storage medium of memory pool |
Publications (1)
Publication Number | Publication Date |
---|---|
CN111324449A true CN111324449A (en) | 2020-06-23 |
Family
ID=71172725
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201911284214.5A Pending CN111324449A (en) | 2019-12-13 | 2019-12-13 | Transaction storage and broadcasting method, device and storage medium of memory pool |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111324449A (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112988413A (en) * | 2021-02-07 | 2021-06-18 | 杭州复杂美科技有限公司 | Trade batch broadcasting dynamic adjustment method, computer equipment and storage medium |
CN113132253A (en) * | 2021-03-29 | 2021-07-16 | 杭州趣链科技有限公司 | Bandwidth current limiting method and electronic equipment |
WO2022007345A1 (en) * | 2020-07-09 | 2022-01-13 | 江苏复杂美科技有限公司 | Parallel processing method for blocks, device, and storage medium |
WO2024004792A1 (en) * | 2022-06-28 | 2024-01-04 | 京セラ株式会社 | Blockchain system, node, and program |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106886890A (en) * | 2017-02-07 | 2017-06-23 | 杭州秘猿科技有限公司 | A kind of timing transaction execution method based on block chain |
US20180089703A1 (en) * | 2016-09-28 | 2018-03-29 | Paypal, Inc. | Managing de-queueing operations of transaction queues |
WO2018232490A1 (en) * | 2017-06-22 | 2018-12-27 | Zeu Crypto Networks Inc. | Multilevel queue based transaction traffic shaping for blockchains |
CN109829822A (en) * | 2019-01-28 | 2019-05-31 | 杭州复杂美科技有限公司 | Transaction replacement method, transaction queuing strategy, equipment and storage medium |
-
2019
- 2019-12-13 CN CN201911284214.5A patent/CN111324449A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20180089703A1 (en) * | 2016-09-28 | 2018-03-29 | Paypal, Inc. | Managing de-queueing operations of transaction queues |
CN106886890A (en) * | 2017-02-07 | 2017-06-23 | 杭州秘猿科技有限公司 | A kind of timing transaction execution method based on block chain |
WO2018232490A1 (en) * | 2017-06-22 | 2018-12-27 | Zeu Crypto Networks Inc. | Multilevel queue based transaction traffic shaping for blockchains |
CN109829822A (en) * | 2019-01-28 | 2019-05-31 | 杭州复杂美科技有限公司 | Transaction replacement method, transaction queuing strategy, equipment and storage medium |
Non-Patent Citations (1)
Title |
---|
尹春林,杨政: "区块链关键技术及框架体系综述" * |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2022007345A1 (en) * | 2020-07-09 | 2022-01-13 | 江苏复杂美科技有限公司 | Parallel processing method for blocks, device, and storage medium |
CN112988413A (en) * | 2021-02-07 | 2021-06-18 | 杭州复杂美科技有限公司 | Trade batch broadcasting dynamic adjustment method, computer equipment and storage medium |
CN113132253A (en) * | 2021-03-29 | 2021-07-16 | 杭州趣链科技有限公司 | Bandwidth current limiting method and electronic equipment |
WO2022206044A1 (en) * | 2021-03-29 | 2022-10-06 | 杭州趣链科技有限公司 | Bandwidth traffic limiting method and electronic device |
WO2024004792A1 (en) * | 2022-06-28 | 2024-01-04 | 京セラ株式会社 | Blockchain system, node, and program |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111324449A (en) | Transaction storage and broadcasting method, device and storage medium of memory pool | |
CN106922039B (en) | Heartbeat message sending method and device | |
CN111464630B (en) | Transaction broadcasting method, apparatus and storage medium | |
CN107832143B (en) | Method and device for processing physical machine resources | |
CN110391873B (en) | Method, apparatus and computer program product for determining a data transfer mode | |
CN110083745B (en) | Data query method, device and storage medium | |
CN110113140B (en) | Calculation unloading method in fog calculation wireless network | |
CN112379982A (en) | Task processing method and device, electronic equipment and computer readable storage medium | |
US20110161435A1 (en) | System and method for deferred transmission of attachments | |
US10135944B2 (en) | Processing a unit of work | |
CN113064740A (en) | Message processing method and device | |
CN111415259A (en) | Transaction queuing method, device and storage medium | |
CN111400043A (en) | Transaction pool management method, device and storage medium | |
CN112600905A (en) | Transaction broadcasting and block generating method, apparatus and storage medium | |
CN111800223A (en) | Method, device and system for generating sending message and processing receiving message | |
CN112053154B (en) | Transaction broadcasting method, apparatus and storage medium | |
US10402234B2 (en) | Fine-grain synchronization in data-parallel jobs | |
CN111711971B (en) | Data transmission method and device, storage medium and electronic equipment | |
CN114579054A (en) | Data processing method and device, electronic equipment and computer readable medium | |
CN114095907A (en) | Bluetooth connection control method, device and equipment | |
CN109981320B (en) | Method and device for managing configuration information | |
CN114374657A (en) | Data processing method and device | |
CN110019671B (en) | Method and system for processing real-time message | |
CN113626175A (en) | Data processing method and device | |
CN113238808A (en) | Message pushing method and device |
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 | ||
WD01 | Invention patent application deemed withdrawn after publication | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20200623 |