Disclosure of Invention
The invention provides a method for processing a block chain transaction block, an electronic device and a readable storage medium, aiming at reducing the system response time and improving the execution efficiency of the block chain transaction block.
To achieve the above object, the present invention provides an electronic device, which includes a memory and a processor, wherein the memory stores thereon a blockchain transaction block processing system that is executable on the processor, and when executed by the processor, the blockchain transaction block processing system implements the following steps:
A. initiating a transaction receiving request to a consensus node of a block chain through a preset request mechanism, and receiving the well-sequenced transactions in the consensus node to the local of a data node; all transactions are collected in advance in the consensus node and are sequenced, and the sequenced transactions are cached;
B. and packaging the received local transactions into one or more transaction blocks according to a preset rule, selecting the transaction blocks one by one according to the sequencing order and executing the transactions in the selected transaction blocks according to the sequencing of the corresponding transactions in the transaction blocks.
Preferably, when the block chain transaction block processing system is executed by the processor to implement step B, the method specifically includes:
determining a transaction parallel processing quantity threshold corresponding to each data node according to the hardware attribute data of each data node;
grouping the received local transactions according to the ordering sequence of the transactions and the corresponding transaction parallel processing quantity threshold;
packaging the transactions of each group respectively to generate corresponding transaction blocks;
and selecting the corresponding transaction blocks one by one according to the ordering of the transactions corresponding to the transaction blocks and executing the transactions in the selected transaction blocks.
Preferably, the preset request mechanism is a long polling request mechanism, and an upper limit value of the number of polling acquisition transactions corresponding to each data node is greater than or equal to a corresponding transaction parallel processing number threshold.
Preferably, before the step a, the processor is further configured to execute the block chain transaction block processing system to implement the following steps:
analyzing whether a data node belongs to a plurality of block chains at the same time;
if a data node belongs to a plurality of block chains at the same time, analyzing the transaction quantity cached by a common node of each block chain to which the data node belongs;
if the transaction quantity cached by the common recognition node of the block chain to which the data node belongs is smaller than a first threshold value, reducing the upper limit value of the transaction quantity acquired by the data node aiming at the polling of the block chain to which the data node belongs by a first preset value, and reducing the threshold value of the transaction parallel processing quantity of the data node aiming at the block chain to which the data node belongs by a second preset value, wherein the first preset value is the same as or different from the second preset value;
if the number of the transactions cached by the common recognition node of the block chain to which the data node belongs is greater than or equal to a second threshold, increasing an upper limit value of the number of the transactions acquired by the data node in response to polling of the block chain to which the data node belongs by a third preset value, and increasing a threshold value of the number of the transactions processed in parallel of the block chain to which the data node belongs by a fourth preset value, wherein the third preset value is the same as or different from the fourth preset value, and the second threshold is greater than or equal to the first threshold.
In addition, to achieve the above object, the present invention further provides a method for processing a blockchain transaction block, where the method for processing a blockchain transaction block includes:
step one, a data node of a block chain initiates a transaction receiving request to a consensus node of the block chain through a preset request mechanism, and the well-ordered transactions in the consensus node are received to the local of the data node; all transactions are collected in advance in the consensus node and are sequenced, and the sequenced transactions are cached;
step two, each data node packs the received local transactions into one or more transaction blocks according to a preset rule, selects the transaction blocks one by one according to the ordering of the corresponding transactions in the transaction blocks and executes the transactions in the selected transaction blocks.
Preferably, the second step includes:
determining a transaction parallel processing quantity threshold corresponding to each data node according to the hardware attribute data of each data node;
each data node groups the received local transactions according to the ordering sequence of the transactions and the corresponding transaction parallel processing quantity threshold;
packaging the transactions of each group respectively to generate corresponding transaction blocks;
and each data node selects the corresponding transaction blocks one by one according to the ordering of the transactions corresponding to the transaction blocks and executes the transactions in the selected transaction blocks.
Preferably, the preset request mechanism is a long polling request mechanism, and an upper limit value of the number of polling acquisition transactions corresponding to each data node is greater than or equal to a corresponding transaction parallel processing number threshold.
Preferably, the preset request mechanism is a long polling request mechanism, and before the step one, the method further includes:
analyzing whether a data node belongs to a plurality of block chains at the same time;
if a data node belongs to a plurality of block chains at the same time, analyzing the transaction quantity cached by a common node of each block chain to which the data node belongs;
if the number of the transactions cached by the common recognition node of the block chain to which the data node belongs is smaller than a first threshold, reducing the upper limit value of the number of the transactions acquired by the data node in response to polling of the block chain to which the data node belongs by a first preset value, and reducing the threshold value of the number of the transactions processed in parallel by the data node in response to the block chain to which the data node belongs by a second preset value, wherein the first preset value is the same as or different from the second preset value.
Preferably, the method further comprises:
if the number of the transactions cached by the common recognition node of the block chain to which the data node belongs is greater than or equal to a second threshold, increasing an upper limit value of the number of the transactions acquired by the data node in response to polling of the block chain to which the data node belongs by a third preset value, and increasing a threshold value of the number of the transactions processed in parallel of the block chain to which the data node belongs by a fourth preset value, wherein the third preset value is the same as or different from the fourth preset value, and the second threshold is greater than or equal to the first threshold.
Further, to achieve the above object, the present invention also provides a computer readable storage medium storing a block chain transaction block processing system, which is executable by at least one processor, so as to make the at least one processor execute the steps of the block chain transaction block processing method as described above.
According to the method, the system and the readable storage medium for processing the block chain transaction block, all transactions are collected and sequenced by the common identification node of the block chain, and then a transaction receiving request is sent to the common identification node by the data node of the block chain through a preset request mechanism so as to receive the sequenced transactions locally; and packaging the received local transactions by each data node to generate one or more transaction blocks, and executing the transactions in the generated transaction blocks. The function of generating the transaction block of the consensus node is transferred to the data node, the consensus node is only responsible for collecting the transactions and sequencing the transactions, the transactions are sent to the data node according to the request of the data node, the data node can be packaged into the transaction block after receiving the transactions, and the transactions in the transaction block are executed block by block. Therefore, the data node does not need to wait for the common node to package the transaction before acquiring the transaction block, and can acquire and execute the transaction as soon as possible, so that the response time of the system is reduced, and the execution efficiency of the block chain transaction block is improved.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the description relating to "first", "second", etc. in the present invention is for descriptive purposes only and is not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In addition, technical solutions between various embodiments may be combined with each other, but must be realized by a person skilled in the art, and when the technical solutions are contradictory or cannot be realized, such a combination should not be considered to exist, and is not within the protection scope of the present invention.
The invention provides a block chain transaction block processing system. Referring now to FIG. 1, a block chain transaction block processing system 10 is shown in an exemplary operating environment.
In the present embodiment, the blockchain transaction block processing system 10 is installed and operated in the electronic device 1. The electronic device 1 may include, but is not limited to, a memory 11, a processor 12, and a display 13. Fig. 1 only shows the electronic device 1 with components 11-13, but it is to be understood that not all of the shown components are required to be implemented, and that more or fewer components may alternatively be implemented.
The memory 11 is at least one type of readable computer storage medium, and the memory 11 may be an internal storage unit of the electronic device 1 in some embodiments, such as a hard disk or a memory of the electronic device 1. The memory 11 may also be an external storage device of the electronic apparatus 1 in other embodiments, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, which are provided on the electronic apparatus 1. Further, the memory 11 may also include both an internal storage unit and an external storage device of the electronic apparatus 1. The memory 11 is used for storing application software installed in the electronic device 1 and various types of data, such as program codes of the blockchain transaction block processing system 10. The memory 11 may also be used to temporarily store data that has been output or is to be output.
The processor 12 may be a Central Processing Unit (CPU), microprocessor or other data Processing chip in some embodiments, and is used for executing program codes stored in the memory 11 or Processing data, such as executing the block chain transaction block Processing system 10.
The display 13 may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch panel, or the like in some embodiments. The display 13 is used for displaying information processed in the electronic device 1 and displaying a visual user interface, such as the number of transactions sequenced in the consensus node, the transaction block to be executed in the data node, and the like. The components 11-13 of the electronic device 1 communicate with each other via a system bus.
Blockchain transactional block processing system 10 includes at least one computer readable instruction stored in the memory 11 that is executable by the processor 12 to implement embodiments of the present application.
When executed by the processor 12, the block chain transaction block processing system 10 implements the following steps:
step S1, a transaction receiving request is sent to the consensus nodes of the block chain through a preset request mechanism, and the well-ordered transactions in the consensus nodes are received to the local of the data node; and the consensus node collects all the transactions in advance, orders the transactions and caches the ordered transactions.
The blockchain is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, a consensus mechanism and an encryption algorithm, and transactions are packaged into blocks to be executed. In this embodiment, the blockchain includes a data node and a consensus node, and first, the consensus node of the blockchain collects and sequences all transactions to be processed (for example, transactions such as transfer transactions and payment transactions), for example, sequences according to execution time, priority of importance, and the like, and caches all the sequenced transactions at the consensus node of the blockchain. And initiating a transaction receiving request to a common identification node of the block chain by a data node of the block chain through a preset request mechanism so as to receive the well-sequenced transactions in the common identification node to the local of the data node. The predetermined request mechanism may be a polling request mechanism, a long polling request mechanism, or a registration transaction push mechanism, for example, a polling request or a registration transaction push event is initiated from a data node of the blockchain to a consensus node of the blockchain. Namely, the data node of the blockchain initiates a transaction receiving request to the common node of the blockchain at regular time, or the data node of the blockchain initiates a receiving request of its registration transaction to the common node of the blockchain, so as to ensure that the data node of the blockchain can acquire the transaction information as soon as possible after the common node of the blockchain completes the transaction sequencing.
Step S2, packing the received local transactions into one or more transaction blocks according to a preset rule, and selecting the transaction blocks one by one according to the ordering order and executing the transactions in the selected transaction block according to the ordering of the corresponding transactions in the transaction blocks.
In this embodiment, after each data node of the block chain requests to acquire and store the ordered transactions in the common node of the block chain to the local of each data node, the received local transactions may be packaged into one or more transaction blocks according to a preset rule. For example, each of the data nodes may pack the received local transactions into one or more transaction blocks according to its configuration (including software and hardware configurations, such as the core number of the CPU, and the clock frequency), and the manner of generating the transaction blocks by packing may also be to generate the transaction blocks by timing packing, or generating the transaction blocks by packing according to a preset fixed transaction number, or generating the transaction blocks by combining timing packing and packing according to a fixed transaction number, which is not limited herein.
After each data node of the block chain packages the received local transactions into one or more transaction blocks, because all the transactions have been subjected to sorting operation in the common node, each data node of the block chain can select the transaction blocks one by one according to the sorting order of the corresponding transactions in the transaction blocks generated by local packaging, and execute the transactions in the selected transaction blocks.
Compared with the prior art, in the embodiment, all transactions are collected and sequenced by the common identification node of the block chain, and then the data node of the block chain initiates a transaction receiving request to the common identification node through a preset request mechanism so as to receive the sequenced transactions locally; and packaging the received local transactions by each data node to generate one or more transaction blocks, and executing the transactions in the generated transaction blocks. The function of generating the transaction block of the consensus node is transferred to the data node, the consensus node is only responsible for collecting the transactions and sequencing the transactions, the transactions are sent to the data node according to the request of the data node, the data node can be packaged into the transaction block after receiving the transactions, and the transactions in the transaction block are executed block by block. Therefore, the data node does not need to wait for the consensus node to package the transaction before acquiring the transaction block, and can acquire and execute the transaction as soon as possible under the condition of as low delay as possible, so that the response time of the system is reduced, and the execution efficiency of the block chain transaction block is improved.
In an alternative embodiment, on the basis of the embodiment of fig. 1, when the processor 12 executes the step S2, the method for processing the blockchain transaction block 10 specifically includes:
determining a transaction parallel processing quantity threshold corresponding to each data node according to hardware attribute data (for example, the core number of a CPU, or the core number and the clock frequency of the CPU, etc.) of each data node;
and grouping the received local transactions according to the ordering sequence of the transactions and the corresponding transaction parallel processing quantity threshold value. For example, the received local transactions are ordered to "X1, X2, X3, X4, X5, X6, and X7", if the threshold of the transaction parallel processing amount corresponding to a data node is 3, the data node groups the received local transactions into three groups, the first group is "X1, X2, and X3", the second group is "X4, X5, and X6", and the third group is "X7".
And packaging the transactions of each group respectively to generate a corresponding transaction block. For example, the first set of transactions "X1, X2, X3" corresponds to a transaction block Y1, the second set of transactions "X4, X5, X6" corresponds to a transaction block Y2, and the third set of transactions "X7" corresponds to a transaction block Y3.
And selecting the corresponding transaction blocks one by one according to the ordering of the transactions corresponding to the transaction blocks and executing the transactions in the selected transaction blocks. For example, if the received local transaction ordering is "X1, X2, X3, X4, X5, X6, and X7", then the transaction "X1, X2, and X3" in the transaction block Y1 is the transaction ordered first, and then the transaction block Y1 is selected first for transaction execution; the transaction blocks Y1, Y2 and Y3 are selected in the order Y1, Y2 and Y3, and the data nodes execute the transactions in the transaction blocks Y1, Y2 and Y3 in sequence.
In the embodiment, each data node can automatically control the number of transactions in the transaction block according to the hardware attribute data of the data node, so that the condition of task blockage caused by the hardware attribute limitation of the data node, such as CPU limitation, in the subsequent transaction execution process can be avoided, and the response speed is improved.
In an optional embodiment, the preset request mechanism is a long polling request mechanism, and an upper limit value of a polling acquisition transaction number corresponding to each data node is greater than or equal to a corresponding transaction parallel processing number threshold value, so that the performance of multiple cores of a CPU of the data node is fully exerted. Compared with a registration transaction pushing mechanism, the long polling request mechanism in the embodiment can better adapt to the scene, and the long polling request mechanism can set the upper limit value of the polling acquisition transaction number, so that network congestion caused by excessive acquisition transactions at one time is avoided.
In an alternative embodiment, on the basis of the above embodiment, when the blockchain transaction block processing system 10 is executed by the processor 12, the following steps are further implemented:
analyzing whether a data node belongs to a plurality of block chains at the same time;
if a data node belongs to a plurality of block chains at the same time, analyzing the transaction quantity cached by a common node of each block chain to which the data node belongs;
if the transaction quantity cached by the common identification node of the block chain to which the data node belongs is smaller than a first threshold value, reducing an upper limit value of the transaction quantity acquired by the data node aiming at the polling of the block chain by a first preset value, and reducing a transaction parallel processing quantity threshold value of the data node aiming at the block chain by a second preset value, wherein the first preset value is the same as or different from the second preset value;
if the number of the transactions cached by the common identification node of the blockchain to which the data node belongs is greater than or equal to a second threshold, increasing an upper limit value of the number of the transactions acquired by the data node in response to polling of the blockchain by a third preset value, and increasing a threshold value of the number of the transactions processed in parallel by the data node in response to the blockchain by a fourth preset value, wherein the third preset value is the same as or different from the fourth preset value, and the second threshold is greater than or equal to the first threshold.
In this embodiment, the preset request mechanism is a long polling request mechanism, that is, each data node is provided with an upper limit value of the number of polling acquisition transactions, and the upper limit value of the number of polling acquisition transactions corresponding to each data node is greater than or equal to a corresponding transaction parallel processing number threshold. When a data node belongs to multiple blockchains simultaneously, if the number of transactions cached by a common node in one blockchain to which the data node belongs is small, that is, the transactions in the blockchain are idle, the upper limit value of the number of transactions acquired by the data node in response to polling of the blockchain and the threshold value of the number of transaction parallel processing can be reduced, so that partial processing capacity of the data node in response to the blockchain is released. If the number of transactions cached by the common node in the blockchain to which the data node belongs is large, that is, the transaction processing in the blockchain is busy, the upper limit value of the number of transactions acquired by the data node in response to polling of the blockchain and the threshold value of the number of transaction parallel processing can be increased, so as to increase the processing capacity of the data node in response to the blockchain. Thus, in this embodiment, the data node can appropriately reduce the processing quota of the blockchain with fewer transactions and appropriately increase the processing quota of the blockchain with more transactions, thereby fully utilizing the multi-core performance of the data node and improving the transaction processing capability of the whole system.
Referring to fig. 2, fig. 2 is a flowchart illustrating a method for processing a blockchain transaction block according to an embodiment of the present invention, the method for processing a blockchain transaction block includes the following steps:
step S10, a data node of a block chain initiates a transaction receiving request to a consensus node of the block chain through a preset request mechanism, and receives the well-ordered transactions in the consensus node to the local of the data node; and the consensus node collects all the transactions in advance, orders the transactions and caches the ordered transactions.
The blockchain is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, a consensus mechanism and an encryption algorithm, and transactions are packaged into blocks to be executed. In this embodiment, the blockchain includes a data node and a consensus node, and first, the consensus node of the blockchain collects and sequences all transactions to be processed (for example, transactions such as transfer transactions and payment transactions), for example, sequences according to execution time, priority of importance, and the like, and caches all the sequenced transactions at the consensus node of the blockchain. And initiating a transaction receiving request to a common identification node of the block chain by a data node of the block chain through a preset request mechanism so as to receive the well-sequenced transactions in the common identification node to the local of the data node. The predetermined request mechanism may be a polling request mechanism, a long polling request mechanism, or a registration transaction push mechanism, for example, a polling request or a registration transaction push event is initiated from a data node of the blockchain to a consensus node of the blockchain. Namely, the data node of the blockchain initiates a transaction receiving request to the common node of the blockchain at regular time, or the data node of the blockchain initiates a receiving request of its registration transaction to the common node of the blockchain, so as to ensure that the data node of the blockchain can acquire the transaction information as soon as possible after the common node of the blockchain completes the transaction sequencing.
Step S20, each data node packages the received local transactions into one or more transaction blocks according to a preset rule, and selects the transaction blocks one by one according to the ordering of the corresponding transactions in the transaction blocks and executes the transactions in the selected transaction blocks according to the ordering order.
In this embodiment, after each data node of the block chain requests to acquire and store the ordered transactions in the common node of the block chain to the local of each data node, the received local transactions may be packaged into one or more transaction blocks according to a preset rule. For example, each of the data nodes may pack the received local transactions into one or more transaction blocks according to its configuration (including software and hardware configurations, such as the core number of the CPU, and the clock frequency), and the manner of generating the transaction blocks by packing may also be to generate the transaction blocks by timing packing, or generating the transaction blocks by packing according to a preset fixed transaction number, or generating the transaction blocks by combining timing packing and packing according to a fixed transaction number, which is not limited herein.
After each data node of the block chain packages the received local transactions into one or more transaction blocks, because all the transactions have been subjected to sorting operation in the common node, each data node of the block chain can select the transaction blocks one by one according to the sorting order of the corresponding transactions in the transaction blocks generated by local packaging, and execute the transactions in the selected transaction blocks.
Compared with the prior art, in the embodiment, all transactions are collected and sequenced by the common identification node of the block chain, and then the data node of the block chain initiates a transaction receiving request to the common identification node through a preset request mechanism so as to receive the sequenced transactions locally; and packaging the received local transactions by each data node to generate one or more transaction blocks, and executing the transactions in the generated transaction blocks. The function of generating the transaction block of the consensus node is transferred to the data node, the consensus node is only responsible for collecting the transactions and sequencing the transactions, the transactions are sent to the data node according to the request of the data node, the data node can be packaged into the transaction block after receiving the transactions, and the transactions in the transaction block are executed block by block. Therefore, the data node does not need to wait for the consensus node to package the transaction before acquiring the transaction block, and can acquire and execute the transaction as soon as possible under the condition of as low delay as possible, so that the response time of the system is reduced, and the execution efficiency of the block chain transaction block is improved.
In an alternative embodiment, on the basis of the above embodiment, the step S20 includes:
determining a transaction parallel processing quantity threshold corresponding to each data node according to hardware attribute data (for example, the core number of a CPU, or the core number and the clock frequency of the CPU, etc.) of each data node;
and each data node groups the received local transactions according to the ordering sequence of the transactions and the corresponding transaction parallel processing quantity threshold value. For example, the received local transactions are ordered to "X1, X2, X3, X4, X5, X6, and X7", if the threshold of the transaction parallel processing amount corresponding to a data node is 3, the data node groups the received local transactions into three groups, the first group is "X1, X2, and X3", the second group is "X4, X5, and X6", and the third group is "X7".
And packaging the transactions of each group respectively to generate a corresponding transaction block. For example, the first set of transactions "X1, X2, X3" corresponds to a transaction block Y1, the second set of transactions "X4, X5, X6" corresponds to a transaction block Y2, and the third set of transactions "X7" corresponds to a transaction block Y3.
And each data node selects the corresponding transaction blocks one by one according to the ordering of the transactions corresponding to the transaction blocks and executes the transactions in the selected transaction blocks. For example, if the received local transaction ordering is "X1, X2, X3, X4, X5, X6, and X7", then the transaction "X1, X2, and X3" in the transaction block Y1 is the transaction ordered first, and then the transaction block Y1 is selected first for transaction execution; the transaction blocks Y1, Y2 and Y3 are selected in the order Y1, Y2 and Y3, and the data nodes execute the transactions in the transaction blocks Y1, Y2 and Y3 in sequence.
In the embodiment, each data node can automatically control the number of transactions in the transaction block according to the hardware attribute data of the data node, so that the condition of task blockage caused by the hardware attribute limitation of the data node, such as CPU limitation, in the subsequent transaction execution process can be avoided, and the response speed is improved.
In an optional embodiment, the preset request mechanism is a long polling request mechanism, and an upper limit value of a polling acquisition transaction number corresponding to each data node is greater than or equal to a corresponding transaction parallel processing number threshold value, so that the performance of multiple cores of a CPU of the data node is fully exerted. Compared with a registration transaction pushing mechanism, the long polling request mechanism in the embodiment can better adapt to the scene, and the long polling request mechanism can set the upper limit value of the polling acquisition transaction number, so that network congestion caused by excessive acquisition transactions at one time is avoided.
In an optional embodiment, on the basis of the above embodiment, the method further includes the following steps:
analyzing whether a data node belongs to a plurality of block chains at the same time;
if a data node belongs to a plurality of block chains at the same time, analyzing the transaction quantity cached by a common node of each block chain to which the data node belongs;
if the transaction quantity cached by the common identification node of the block chain to which the data node belongs is smaller than a first threshold value, reducing an upper limit value of the transaction quantity acquired by the data node aiming at the polling of the block chain by a first preset value, and reducing a transaction parallel processing quantity threshold value of the data node aiming at the block chain by a second preset value, wherein the first preset value is the same as or different from the second preset value;
if the number of the transactions cached by the common identification node of the blockchain to which the data node belongs is greater than or equal to a second threshold, increasing an upper limit value of the number of the transactions acquired by the data node in response to polling of the blockchain by a third preset value, and increasing a threshold value of the number of the transactions processed in parallel by the data node in response to the blockchain by a fourth preset value, wherein the third preset value is the same as or different from the fourth preset value, and the second threshold is greater than or equal to the first threshold.
In this embodiment, the preset request mechanism is a long polling request mechanism, that is, each data node is provided with an upper limit value of the number of polling acquisition transactions, and the upper limit value of the number of polling acquisition transactions corresponding to each data node is greater than or equal to a corresponding transaction parallel processing number threshold. When a data node belongs to multiple blockchains simultaneously, if the number of transactions cached by a common node in one blockchain to which the data node belongs is small, that is, the transactions in the blockchain are idle, the upper limit value of the number of transactions acquired by the data node in response to polling of the blockchain and the threshold value of the number of transaction parallel processing can be reduced, so that partial processing capacity of the data node in response to the blockchain is released. If the number of transactions cached by the common node in the blockchain to which the data node belongs is large, that is, the transaction processing in the blockchain is busy, the upper limit value of the number of transactions acquired by the data node in response to polling of the blockchain and the threshold value of the number of transaction parallel processing can be increased, so as to increase the processing capacity of the data node in response to the blockchain. Thus, in this embodiment, the data node can appropriately reduce the processing quota of the blockchain with fewer transactions and appropriately increase the processing quota of the blockchain with more transactions, thereby fully utilizing the multi-core performance of the data node and improving the transaction processing capability of the whole system.
In addition, the present invention further provides a computer-readable storage medium, where the computer-readable storage medium stores a blockchain transaction block processing system, where the blockchain transaction block processing system is executable by at least one processor, so that the at least one processor executes the steps of the blockchain transaction block processing method in the above embodiments, and the specific implementation processes of the blockchain transaction block processing method, such as steps S10, S20, S30, are as described above, and are not described herein again.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better embodiment. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
The preferred embodiments of the present invention have been described above with reference to the accompanying drawings, and are not to be construed as limiting the scope of the invention. The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments. Additionally, while a logical order is shown in the flow diagrams, in some cases, the steps shown or described may be performed in an order different than here.
Those skilled in the art can implement the invention in various modifications, such as features from one embodiment can be used in another embodiment to yield yet a further embodiment, without departing from the scope and spirit of the invention. Any modification, equivalent replacement and improvement made within the technical idea of using the present invention should be within the scope of the right of the present invention.