CN117076563A - Pruning method and device applied to blockchain - Google Patents

Pruning method and device applied to blockchain Download PDF

Info

Publication number
CN117076563A
CN117076563A CN202311051697.0A CN202311051697A CN117076563A CN 117076563 A CN117076563 A CN 117076563A CN 202311051697 A CN202311051697 A CN 202311051697A CN 117076563 A CN117076563 A CN 117076563A
Authority
CN
China
Prior art keywords
pruning
state
node
alternative
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.)
Pending
Application number
CN202311051697.0A
Other languages
Chinese (zh)
Inventor
王楠
刘浩
任凯
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Construction Bank Corp
CCB Finetech Co Ltd
Original Assignee
China Construction Bank Corp
CCB Finetech Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Construction Bank Corp, CCB Finetech Co Ltd filed Critical China Construction Bank Corp
Priority to CN202311051697.0A priority Critical patent/CN117076563A/en
Publication of CN117076563A publication Critical patent/CN117076563A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/21Design, administration or maintenance of databases
    • G06F16/211Schema design and management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2228Indexing structures
    • G06F16/2246Trees, e.g. B+trees
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2228Indexing structures
    • G06F16/2255Hash tables
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Computing Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a pruning method and device applied to a blockchain, and relates to the technical field of blockchains. One embodiment of the method comprises the following steps: in response to monitoring an update operation on the blockchain state tree, traversing a storage space of each node in the state tree to determine an alternative pruning node set with a state meeting preset requirements; for each alternative pruning node, acquiring a storage space saving value which is not subjected to pruning operation, calculating the storage space saving value after pruning operation, and updating the state space of each alternative pruning node based on the storage space saving value with smaller value; acquiring a preset boundary condition, calling a main function to process the boundary condition and the state space of all the alternative pruning nodes, screening target pruning nodes from the alternative pruning node set, performing pruning processing, and executing updating operation on the state tree in response to monitoring that pruning is completed. The embodiment models the blockchain state pruning problem as a dynamic programming problem to solve the state pruning difficulty problem.

Description

Pruning method and device applied to blockchain
Technical Field
The present invention relates to the field of blockchain technologies, and in particular, to a pruning method and device applied to blockchains.
Background
The blockchain is used as a distributed database technology, has the characteristics of decentralization, non-tamperable data, high safety and the like, and is widely applied to the fields of finance, supply chains, internet of things and the like. However, with the development of blockchain networks and the growth of data sizes, how to efficiently manage and optimize blockchain data storage becomes a key issue. Existing blockchain data storage and state management face challenges in terms of scalability, computational efficiency, applicability, and the like.
At present, a state storage optimization mode based on a Merkle Patricia tree is mainly used, and the Merkle Patricia tree is a data structure based on combination of the Merkle tree and the Patricia tree and is widely applied to block chain systems such as an Ethernet. By using the Merkle Patricia tree, efficient storage and retrieval of blockchain states can be achieved while guaranteeing data integrity and consistency.
However, the Merkle Patricia tree requires re-computation of Merkle roots each time the state is updated, which may introduce additional computational overhead, resulting in reduced computational efficiency. In addition, the structure of the Merkle Patricia tree makes pruning of useless states relatively difficult, and is difficult to adapt to different scenes and optimization requirements.
Disclosure of Invention
In view of the above, the embodiments of the present invention provide a pruning method and apparatus applied to a blockchain, which at least can solve the problems of large computation overhead and difficult state pruning in the prior art.
To achieve the above object, according to one aspect of the embodiments of the present invention, there is provided a pruning method applied to a blockchain, including:
in response to monitoring an update operation on the blockchain state tree, traversing a storage space of each node in the state tree to determine an alternative pruning node set with a state meeting preset requirements;
for each alternative pruning node, acquiring a storage space saving value which is not subjected to pruning operation, calculating the storage space saving value after pruning operation, and updating the state space of each alternative pruning node based on the storage space saving value with smaller value; wherein the state space represents the size of the space occupied by the node;
and acquiring a preset boundary condition, calling a main function to process the boundary condition and the state space of all the alternative pruning nodes, so as to screen target pruning nodes from the alternative pruning node set and perform pruning processing, and executing updating operation on the state tree in response to monitoring that pruning is completed.
Optionally, the calling the main function to process the boundary condition and the state space of all the alternative pruning nodes, so as to screen the target pruning node from the alternative pruning node set and perform pruning processing, including:
and generating an array based on the state space of each alternative pruning node, and calling a main function to process the boundary conditions and the array so as to screen target pruning nodes from the alternative pruning node set and perform pruning processing.
Optionally, the calling the main function to process the boundary condition and the state space of all the alternative pruning nodes, so as to screen the target pruning node from the alternative pruning node set and perform pruning processing, including:
sequencing the state space of each alternative pruning node according to the sequence of the storage space saving values from large to small;
and processing the boundary conditions and the state space of all the alternative pruning nodes by using a main function so as to screen target pruning nodes from the alternative pruning node set according to the sorting and perform pruning processing.
Optionally, the boundary condition is at least one of a preset pruning operation frequency threshold value and a target total storage space saving value.
Optionally, the candidate pruning node is at least one of an invalid node and a repeated node, and the selecting a target pruning node from the candidate pruning node set and performing pruning processing includes one or more of the following:
Invoking an invalid state pruning strategy, acquiring a key value of the invalid node, processing a hash pointer by using a hash function, searching a position corresponding to the hash pointer in a storage space, and pruning data of the position;
and calling a repeated state pruning strategy, inquiring the target node which is the same as the repeated node and has been traversed and processed in the hash table, and pointing the hash pointer of the repeated node to the target node.
To achieve the above object, according to another aspect of the embodiments of the present invention, there is provided a pruning device applied to a blockchain, including:
the alternative module is used for traversing the storage space of each node in the state tree in response to monitoring the updating operation of the blockchain state tree so as to determine an alternative pruning node set with the state meeting the preset requirement;
the calculation module is used for acquiring a storage space saving value which is not subjected to pruning operation for each alternative pruning node, calculating the storage space saving value after the pruning operation, and updating the state space of each alternative pruning node based on the storage space saving value with smaller value; wherein the state space represents the size of the space occupied by the node;
And the pruning module is used for acquiring a preset boundary condition, calling a main function to process the boundary condition and the state space of all the alternative pruning nodes so as to screen target pruning nodes from the alternative pruning node set and perform pruning processing, and executing updating operation on the state tree in response to monitoring pruning completion.
Optionally, the pruning module is configured to:
and generating an array based on the state space of each alternative pruning node, and calling a main function to process the boundary conditions and the array so as to screen target pruning nodes from the alternative pruning node set and perform pruning processing.
Optionally, the pruning module is configured to:
sequencing the state space of each alternative pruning node according to the sequence of the storage space saving values from large to small;
and processing the boundary conditions and the state space of all the alternative pruning nodes by using a main function so as to screen target pruning nodes from the alternative pruning node set according to the sorting and perform pruning processing.
Optionally, the boundary condition is at least one of a preset pruning operation frequency threshold value and a target total storage space saving value.
Optionally, the alternative pruning node is at least one of an invalid node and a duplicate node, and the pruning module includes one or more of the following:
Invoking an invalid state pruning strategy, acquiring a key value of the invalid node, processing a hash pointer by using a hash function, searching a position corresponding to the hash pointer in a storage space, and pruning data of the position;
and calling a repeated state pruning strategy, inquiring the target node which is the same as the repeated node and has been traversed and processed in the hash table, and pointing the hash pointer of the repeated node to the target node.
To achieve the above object, according to still another aspect of an embodiment of the present invention, there is provided a pruning electronic device applied to a blockchain.
The electronic equipment of the embodiment of the invention comprises: one or more processors; and the storage device is used for storing one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors are enabled to realize the pruning method applied to the blockchain.
To achieve the above object, according to still another aspect of the embodiments of the present invention, there is provided a computer readable medium having stored thereon a computer program, which when executed by a processor, implements any of the pruning methods applied to a blockchain as described above.
To achieve the above object, according to still another aspect of an embodiment of the present invention, there is provided a computer program product. The computer program product of the embodiment of the invention comprises a computer program, and the program is executed by a processor to realize the pruning method applied to the blockchain.
According to the solution provided by the present invention, one embodiment of the above invention has the following advantages or beneficial effects: by defining a state space and a state transfer function and designing a corresponding pruning strategy aiming at an invalid state and a repeated state, the storage space pruning optimization operation of the blockchain state tree is realized based on a dynamic programming algorithm, so that the storage space requirement of the blockchain state data is effectively reduced, the consumption and the storage cost of system resources are reduced, and the calculation speed, the system performance and the expandability are improved.
Further effects of the above-described non-conventional alternatives are described below in connection with the embodiments.
Drawings
The drawings are included to provide a better understanding of the invention and are not to be construed as unduly limiting the invention. Wherein:
FIG. 1 is a schematic flow diagram of a pruning method applied to a blockchain according to an embodiment of the present invention;
FIG. 2 is a flow diagram of an alternative pruning method applied to a blockchain in accordance with embodiments of the present invention;
FIG. 3 is a flow diagram of another alternative pruning method applied to a blockchain in accordance with embodiments of the present invention;
FIG. 4 is a flow diagram of yet another alternative pruning method applied to a blockchain in accordance with embodiments of the present invention;
FIG. 5 is a flow diagram of yet another alternative pruning method applied to a blockchain in accordance with embodiments of the present invention;
FIG. 6 is a flow diagram of yet another alternative pruning method applied to a blockchain in accordance with embodiments of the present invention;
FIG. 7 is a schematic diagram of the main modules of a pruning device applied to a blockchain according to an embodiment of the present invention;
FIG. 8 is an exemplary system architecture diagram in which embodiments of the present invention may be applied;
fig. 9 is a schematic diagram of a computer system suitable for use in implementing a mobile device or server of an embodiment of the invention.
Detailed Description
Exemplary embodiments of the present invention will now be described with reference to the accompanying drawings, in which various details of the embodiments of the present invention are included to facilitate understanding, and are to be considered merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
It is noted that embodiments of the invention and features of the embodiments may be combined with each other without conflict. In the technical scheme of the invention, the related aspects of acquisition, analysis, use, transmission, storage and the like of the personal information of the user accord with the regulations of related laws and regulations, are used for legal and reasonable purposes, are not shared, leaked or sold outside the legal use aspects and the like, and are subjected to supervision and management of a supervision department. Necessary measures should be taken for the personal information of the user to prevent illegal access to such personal information data, ensure that personnel having access to the personal information data comply with the regulations of the relevant laws and regulations, and ensure the personal information of the user.
Once these user personal information data are no longer needed, the risk should be minimized by limiting or even prohibiting the data collection and/or deletion. User privacy is protected, when applicable, by de-identifying the data, including in some related applications, such as by removing a particular identifier (e.g., date of birth, etc.), controlling the amount or specificity of stored data (e.g., collecting location data at a city level rather than at a specific address level), controlling how the data is stored, and/or other methods.
The data structure shortcomings of Merkle Patricia tree are described in detail herein:
1. the calculation cost is large: although the Merkle Patricia tree can reduce the storage space requirement and the storage cost, the Merkle root needs to be recalculated at each state update, so that the extra calculation cost is caused, and the calculation efficiency is affected. This computational overhead can become significant when status updates and transactions in a blockchain system are frequent.
2. Pruning is difficult: the structure of the Merkle Patricia tree makes pruning of nodes in a dead state relatively difficult. In practical application, a more complex pruning strategy needs to be designed to achieve effective pruning of useless states, and meanwhile, the integrity and consistency of data need to be ensured in the pruning process.
Referring to fig. 1, a main flowchart of a pruning method applied to a blockchain according to an embodiment of the present invention is shown, including the following steps:
s101: in response to monitoring an update operation on the blockchain state tree, traversing a storage space of each node in the state tree to determine an alternative pruning node set with a state meeting preset requirements;
s102: for each alternative pruning node, acquiring a storage space saving value which is not subjected to pruning operation, calculating the storage space saving value after pruning operation, and updating the state space of each alternative pruning node based on the storage space saving value with smaller value; wherein the state space represents the size of the space occupied by the node;
S103: and acquiring a preset boundary condition, calling a main function to process the boundary condition and the state space of all the alternative pruning nodes, so as to screen target pruning nodes from the alternative pruning node set and perform pruning processing, and executing updating operation on the state tree in response to monitoring that pruning is completed.
In the above embodiment, with respect to step S101, the Merkle Tree state Tree refers to a data structure for organizing and storing state data of a user, and the state data may be an asset (such as a digital resource, a virtual electronic resource, etc.) of a certain user. With the increase of the running time of the blockchain network, the state data stored in the blockchain nodes are also expanding continuously, and a large amount of state data brings the pressure of storage space to the blockchain nodes, so that the storage pressure of the blockchain nodes needs to be relieved.
A state tree is a binary tree made up of a set of nodes including: a large number of leaf nodes at the bottom of the tree containing the underlying data, a set of intermediate nodes, each of which is a Hash of its two children, a single root node, also formed by the Hash of its two children, represents the top of the tree. The solution preferably calculates from bottom to top, i.e. traverses upwards from the leaf node, traverses the storage space of each state node in the state tree and analyzes to determine the state node meeting the preset requirement, where the meeting requirement is an invalid state or a duplicate state, and thus the resulting node is an invalid node and/or a duplicate node.
The block chain state tree is formed at the beginning, and an update optimization mechanism is required to be set by a worker, so that the update in the scheme can be automatic update or manual update, preferably automatic update, so that automatic storage optimization is realized. When the updating operation of the blockchain state tree is monitored, the updating operation is intercepted, the state nodes in the state tree are traversed preferentially, and after pruning is carried out on the state tree, the storage pressure of the blockchain nodes is relieved, and then the state tree is updated. Assuming that the number of the traversed state nodes meeting the requirements is 5, taking the 5 state nodes as alternative pruning state nodes to generate an alternative pruning state node set.
For step S102, when recording data in the blockchain, each state needs to occupy memory space, and in order to save memory space, pruning operation may be performed on some state nodes.
According to the scheme, a state space dp [ i ] [ j ] of the alternative pruning state node is defined first, dp [ i ] [ j ] is a two-dimensional array and represents the size of space occupied by the alternative pruning state node, wherein i represents the number of states reserved after pruning, j represents the number of pruning operations, and dp [ i ] [ j ] represents the minimum storage space requirement for reserving i states under the condition that the pruning operations are performed j times. The size of the state space depends on the state tree size to be pruned and the maximum number of pruning allowed.
The auxiliary function costofprening is preset, which calculates a storage space saving value caused by pruning operation according to a specific state, and the value is preset in general, for example, the storage space saving value of the alternative pruning state node is 10. The implementation of this function may vary from application scenario to application scenario.
A state transfer function is set that describes the transition from one state to another in the state space, e.g., describes pruning from one state tree node to another, such as pruning i to obtain a new state. The state transfer function can be described as:
dp[i][j]=min(dp[i][j],dp[i-1][j-1]+cost_of_pruning(states[i-1]))
here, cost_of_pruning (states [ i-1 ]) represents a memory space saving value brought by pruning state i. The state transfer function indicates that, in the case of j pruning operations being performed, the minimum storage space requirement for the i states is preserved, which can be achieved by pruning state i in the case where j-1 pruning operations have been performed.
The two values are compared above by the helper function costofprening and the state transfer function: a memory saving value (represented by dp [ i-1] [ j ]) when the pruning operation is not performed, and a memory saving (represented by cost_of_pruning (states [ i-1 ])) after the pruning operation is performed in the current state. The smaller of these memory space saving values is then selected to update the alternative pruning state nodes to dp [ i ] [ j ].
The block chain state pruning problem can be modeled as a dynamic programming problem by defining a state space and a state transfer function, so that the pruning problem can be solved by a dynamic programming algorithm, and the block chain state is pruned according to a solving result.
For step S103, assuming there are 5 alternative pruning state nodes, by the above operation, 5 state spaces are obtained, and the final result is stored in dp [ n ] [ maxPringoperations ], where n is 5. Assume that the resulting memory space savings values for pruning of the 5 alternative pruning state nodes are [10,20,30,40,50], respectively.
At the beginning of the formation of the blockchain state tree, the worker is required to set an updating and optimizing mechanism for the blockchain state tree, and boundary conditions are defined, wherein the boundary conditions refer to boundary conditions in a state space, such as limit conditions on the allowable pruning operation times and target storage space saving values. Setting a main function named as blockchan statesetting, wherein the blockchan statesetting solves the problem through dynamic programming, the proposal takes the state space and boundary conditions of the 5 alternative pruning state nodes as input to screen target pruning state nodes from the 5 alternative pruning state nodes, and the blockchan statesetting returns a calculated minimum storage space saving value, which represents the minimum storage space saving value which can be realized through the optimal pruning strategy.
In the scheme, instead of only processing one state node at a time, the number relation is not fixed, and the above example can be completed by using one pruning operation for the 5 alternative pruning state nodes, or only processing 4 state nodes for 3 times, in order to optimize the pruning result, the space-saving values of each state space are preferably arranged according to the sequence of the sizes, so that the target pruning state node is screened from the state nodes under the premise of meeting the limiting condition according to the sequence, and the optimal pruning strategy is obtained. And when pruning is carried out on the selected target pruning state node, monitoring the processing progress, and when the progress is 100%, executing the updating operation on the state tree.
According to the method provided by the embodiment, the blockchain state pruning problem is modeled as a dynamic programming problem, and an effective state pruning strategy is designed, so that the calculation time can be reduced, the calculation efficiency is improved, the blockchain data storage requirement is further effectively reduced, and the method can be suitable for various requirement scenes according to boundary conditions, so that the expandability of the whole network is improved.
Referring to fig. 2, an alternative pruning method flow diagram applied to a blockchain is shown, according to an embodiment of the present invention, including the following steps:
S201: in response to monitoring an update operation on the blockchain state tree, traversing a storage space of each node in the state tree to determine an alternative pruning node set with a state meeting preset requirements; the alternative pruning nodes are invalid nodes or repeated nodes;
s202: for each alternative pruning node, acquiring a storage space saving value which is not subjected to pruning operation, calculating the storage space saving value after pruning operation, and updating the state space of each alternative pruning node based on the storage space saving value with smaller value; wherein the state space represents the size of the space occupied by the node;
s203: acquiring a preset boundary condition, and calling a main function to process the boundary condition and the state space of all the alternative pruning nodes so as to screen target pruning nodes from the alternative pruning node set;
s204: invoking an invalid state pruning strategy, acquiring a key value of the invalid node, processing a hash pointer by using a hash function, searching a position corresponding to the hash pointer in a storage space, and pruning data of the position;
s205: invoking a repeated state pruning strategy, inquiring a target node which is the same as the repeated node and is traversed and processed in a hash table, and pointing a hash pointer of the repeated node to the target node;
S206: and in response to monitoring that pruning is completed, performing an updating operation on the state tree.
In the above embodiment, the steps S202 to S203 and S206 are described with reference to fig. 1, and are not described herein.
For step S201, the scheme is preset to be one of the invalid state and the repetition state, so that the alternative pruning node is the invalid state node and/or the repetition state node, and in actual operation, only the invalid state node, only the repetition state node, and both the invalid state node and the repetition state node may be considered, and the scheme preferably considers modes.
1. Invalid state nodes, mainly nodes where invalid exchanges are located, may further include other obsolete states and empty accounts, 1) obsolete states: partial states may become unusable or outdated over time, and these states may originate from completed or expired transactions, such as spent UTXOs (spent transaction output) or intermediate states of completed smart contract execution. 2) Empty account: some accounts may no longer have any balances in the blockchain system or have been inactive for a long time, and the status of these accounts may be considered invalid because they have no actual impact on the operation of the overall system.
2. And repeating the state nodes, wherein part of tree nodes can be multiplexed among the state trees, or the same information can be multiplexed among part of state nodes, so that the part of state nodes can be saved, and the storage space of the blockchain nodes is saved. Here mainly referred to as shared state or state node that duplicates smart contract code, 1) shared state: in a blockchain network, there may be multiple states with the same data structure and values that may originate from similar transactions or smart contract execution results, e.g., multiple accounts with the same balance and transaction history, which may be considered duplicate states. 2) Intelligent contract code repetition: the code of the smart contract may be reused in different contract instances. In this case, the smart contract code may appear multiple times in the state tree, resulting in a waste of memory space.
For steps S204 and S205, the state pruning policy may be formulated for the type of the state node, and classified into an invalid state pruning policy and a duplicate state pruning policy, which may be performed synchronously:
1. for invalid state nodes, the hash pointer attribute of the blockchain is utilized to ensure correct pruning of the invalid state nodes while maintaining the integrity of the data structure.
During program operation, data is needed. However, when the data itself is large and a large space is required, a certain trouble is obviously caused. When the data is required to be acquired, the data is read only by the corresponding position according to the address given by the pointer, so that the memory space is greatly saved.
Hash tables (also called Hash tables) are data structures that are accessed directly based on Key values (Key values), which access records by mapping the Key values to a location in the table to speed up the lookup. The elements in the hash table are determined by a hash function, the hash function refers to a function of mapping key values of the elements to storage positions of the elements, key words of data elements are used as independent variables, and values calculated through a certain hash function are the storage addresses of the elements.
The hash pointer functions to map invalid states to corresponding memory locations through a hash function, rather than a sequential lookup. A hash pointer for each invalid state node may be used to uniquely identify the state and its location. By means of hash pointers, the storage locations of certain invalid state nodes can be accessed quickly without the need to traverse the entire data structure sequentially.
When pruning invalid state nodes, nodes behind the original invalid nodes are not affected. The corresponding state is effectively marked as invalid, which does not affect the location or linking relationship of other nodes. The other nodes still maintain their original order and pointer relationships and therefore no fragmentation or error in the data structure occurs.
2. For duplicate state nodes, the hash table stores identification information of the state node, which is a hash value or other unique identifier of the state node. For duplicate state nodes, a hash table may be used to store the state nodes that have been processed in the state tree, and in the pruning process, it is checked whether the current state node already exists in the hash table, if so, the duplicate state nodes are merged, and the pointer to the current state node is redirected to the existing target state.
It should be noted that the idea of the scheme is as follows: defining the real state of the problem, regarding the leaf state node as the minimum sub-problem, and gradually calculating the solution of the larger sub-problem upwards from the minimum sub-problem; among them, the most basic and minimum sub-problems in the problem, no smaller sub-problems can be decomposed into the smallest sub-problems. The scheme starts to process from the leaf state node step by step and stores pruning results into the hash table, so that the hash table stores the processed state node, thereby avoiding repeated calculation.
According to the method provided by the embodiment, various pruning strategies such as invalid state pruning, repeated state pruning and the like are provided for the problem of blockchain state pruning, irrelevant state nodes can be effectively pruned by the strategies, and the storage space requirement is reduced.
Referring to fig. 3, another alternative pruning method flow diagram applied to a blockchain is shown, according to an embodiment of the present invention, including the following steps:
s301: in response to monitoring an update operation on the blockchain state tree, traversing a storage space of each node in the state tree to determine an alternative pruning node set with a state meeting preset requirements;
s302: for each alternative pruning node, acquiring a storage space saving value which is not subjected to pruning operation, calculating the storage space saving value after pruning operation, and updating the state space of each alternative pruning node based on the storage space saving value with smaller value; wherein the state space represents the size of the space occupied by the node;
s303: sequencing the state space of each alternative pruning node according to the sequence of the storage space saving values from large to small; generating an array based on the state space of each alternative pruning node;
S304: acquiring a preset boundary condition, and calling a main function to process the boundary condition and the array so as to screen target pruning nodes from the alternative pruning node set and perform pruning processing according to the sorting;
s305: and in response to monitoring that pruning is completed, performing an updating operation on the state tree.
In the above embodiment, for steps S301, S302 and S305, reference is made to the description shown in fig. 1, and no further description is given here.
For steps S303 and S304, when creating the state space dp [ i ] [ j ] for each alternative pruning node, two values are compared by the auxiliary function cosOfPrung and the state transfer function: the memory savings value (represented by dp [ i-1] [ j ]) when no pruning operation is performed, and the memory savings (represented by cost_of_pruning (states [ i-1 ])) after pruning operation is performed in the current state, where the smaller memory savings value is selected to update dp [ i ] [ j ], the code uses two nested loops to populate the dp array. And traversing each state by the external circulation, and traversing the times of pruning operation by the internal circulation, thereby realizing dp array filling.
Assuming that there are 5 alternative pruning state nodes, obtaining 5 state spaces through the operation, assuming that the storage space saving value obtained by pruning each state node is [10,20,30,40,50], constructing an array based on the 5 state spaces, and storing the final result in dp [ n ] [ maxpruning operations ], wherein n is 5. Thus the array State { { Cost:10}, { Cost:20}, { Cost:30}, { Cost:40}, { Cost:50 }. And using a main function blockchainstatesetting, and taking the array State and a preset boundary condition as inputs to screen a target pruning State node from the 5 alternative pruning State nodes.
In this scheme, instead of only processing one state node at a time, the number relationship is not fixed, and the above example can be completed by using one pruning operation for the 5 candidate pruning state nodes, or may only process 4 state nodes for 3 times, so as to optimize the pruning result, the space-saving value of each state space is preferably arranged according to the sequence of the sizes, so as to screen the target pruning state nodes from the sequence, thereby obtaining the optimal pruning strategy. After pruning is carried out on the selected target pruning state node, the progress of the pruning is monitored, and when the progress is 100%, the updating operation of the state tree is executed.
According to the method provided by the embodiment, the optimal pruning strategy is searched according to the sequence of the storage space saving values from large to small through the dynamic programming algorithm, so that the storage space requirement of the block chain state data is effectively reduced, the consumption of system resources is further reduced, and the system performance is improved.
Referring to fig. 4, a schematic flow diagram of yet another alternative pruning method applied to blockchains according to an embodiment of the present invention is shown, including the following steps:
s401: in response to monitoring an update operation on the blockchain state tree, traversing a storage space of each node in the state tree to determine an alternative pruning node set with a state meeting preset requirements;
S402: for each alternative pruning node, acquiring a storage space saving value which is not subjected to pruning operation, calculating the storage space saving value after pruning operation, and updating the state space of each alternative pruning node based on the storage space saving value with smaller value; wherein the state space represents the size of the space occupied by the node;
s403: acquiring a preset pruning operation frequency threshold, calling a main function to process the preset pruning operation frequency threshold and the state space of all the alternative pruning nodes so as to screen target pruning nodes from the alternative pruning node set and perform pruning processing, and executing updating operation on the state tree in response to the monitored pruning completion.
In the above embodiment, the descriptions of steps S401 and S402 may be referred to as shown in fig. 1, and are not repeated here.
For step S403, the blockchain state tree is formed at the beginning of the formation, the worker is required to set the update optimization mechanism for the blockchain state tree, and the allowed maximum pruning operation number is set, i.e. the preset pruning operation number threshold is 3, such as maxPringoperations: =3, so that the maximum pruning operation number is 3 whenever the state tree is updated before the number is reset.
The scheme also defines a blockchan statesetting function to realize a dynamic programming algorithm, takes the maxPriningoperations and the state space of all the alternative pruning nodes as input, and returns the minimum storage space requirement under the limitation of the maximum pruning operation times.
Assuming that there are 5 alternative pruning state nodes, obtaining 5 state spaces through the above operation, assuming that the storage space saving value obtained by pruning each state node is [10,20,30,40,50], in the case of maxpruining operations: =3, only 4 state nodes can be processed, so that the alternative pruning state nodes corresponding to [50,40,30,20] are sequentially selected as target pruning state nodes according to the order of the storage space saving values from large to small.
According to the method provided by the embodiment, the dynamic programming algorithm can be adjusted according to different scenes and requirements, for example, the allowable maximum pruning operation times are adjusted, and the optimal state transition path is found in the state space, so that the storage space requirement is minimized under the condition of the given maximum pruning operation times, and therefore a flexible pruning strategy is realized, and the method is suitable for various practical application scenes.
Referring to fig. 5, a schematic flow chart of yet another alternative pruning method applied to blockchain according to an embodiment of the present invention is shown, including the following steps:
S501: in response to monitoring an update operation on the blockchain state tree, traversing a storage space of each node in the state tree to determine an alternative pruning node set with a state meeting preset requirements;
s502: for each alternative pruning node, acquiring a storage space saving value which is not subjected to pruning operation, calculating the storage space saving value after pruning operation, and updating the state space of each alternative pruning node based on the storage space saving value with smaller value; wherein the state space represents the size of the space occupied by the node;
s503: and acquiring a target storage space saving total value, calling a main function to process the target storage space saving total value and the state space of all the alternative pruning nodes so as to screen target pruning nodes from the alternative pruning node set and perform pruning processing, and executing updating operation on the state tree in response to monitoring pruning completion.
In the above embodiment, for the steps S501 and S502, reference is made to the description shown in fig. 1, and no further description is given here.
For step S503, the blockchain status tree needs to be set by a worker to update the optimization mechanism, and the target total memory space saving value is set, for example, 120. The scheme also defines a blockchanstatesetting function to realize a dynamic programming algorithm, takes the total value of the state space and the target storage space saving of all the alternative pruning nodes as input, and returns the minimum storage space requirement under the limit of the total value of the target storage space saving.
Assuming that there are 5 alternative pruning state nodes, obtaining 5 state spaces through the above operation, and assuming that the storage space saving value obtained by pruning each state node is [10,20,30,40,50], in the case of target storage space saving total value=120, two schemes are obtained: [10,20,40,50] and [30,40,50], one of which may be selected or one of which has a smaller number of state nodes may be selected, and the present scheme is not limited thereto.
According to the method provided by the embodiment, the dynamic programming algorithm can be adjusted according to different scenes and requirements, for example, the total value of the target storage space is saved, so that a flexible pruning strategy is realized, and the method is suitable for various practical application scenes.
Referring to fig. 6, a schematic flow chart of yet another alternative pruning method applied to blockchain according to an embodiment of the present invention is shown, including the following steps:
s601: in response to monitoring an update operation on the blockchain state tree, traversing a storage space of each node in the state tree to determine an alternative pruning node set with a state meeting preset requirements;
s602: for each alternative pruning node, acquiring a storage space saving value which is not subjected to pruning operation, calculating the storage space saving value after pruning operation, and updating the state space of each alternative pruning node based on the storage space saving value with smaller value; wherein the state space represents the size of the space occupied by the node;
S603: acquiring a preset pruning operation frequency threshold and a target storage space saving total value, and calling a main function to process the preset pruning operation frequency threshold, the target storage space saving total value and the state space of all the alternative pruning nodes so as to screen target pruning nodes from the alternative pruning node set and perform pruning processing;
s604: and in response to monitoring that pruning is completed, performing an updating operation on the state tree.
According to the method provided by the embodiment, the dynamic programming algorithm can be adjusted according to different scenes and requirements, for example, the total value of the target storage space is saved and the maximum pruning operation times are allowed by adjusting the target storage space, so that a flexible pruning strategy is realized, and the method is suitable for various practical application scenes.
Compared with the prior art, the method provided by the embodiment of the invention has at least the following beneficial effects:
1. by defining a state space and a state transfer function and designing a corresponding pruning strategy aiming at an invalid state and a repeated state, the storage space pruning optimization operation of the blockchain state tree is realized based on a dynamic programming algorithm, so that the storage space requirement of the blockchain state data is effectively reduced, the consumption and the storage cost of system resources are reduced, and the system performance and the expandability are improved. For large blockchain systems and commercial applications, the reduction in storage costs has a significant impact on the operating costs of the overall system.
2. Existing state pruning techniques may not achieve ideal optimization in certain scenarios. The dynamic planning algorithm, pruning strategy, maximum pruning operation times and the like provided by the scheme can be better adapted to different scenes and optimization requirements, and have flexibility.
3. Modeling the blockchain state pruning problem as a dynamic programming problem, wherein the dynamic programming algorithm is characterized in that the problem is decomposed into sub-problems, repeated calculation is avoided through a table look-up mode, and an effective pruning strategy is additionally designed, so that irrelevant states are effectively pruned, the calculation time is reduced, the calculation efficiency is improved, and the calculation cost is reduced.
Referring to fig. 7, a schematic diagram of main modules of a pruning device 700 applied to a blockchain according to an embodiment of the present invention is shown, including:
an alternative module 701, configured to traverse a storage space of each node in the state tree in response to monitoring an update operation on the blockchain state tree, so as to determine an alternative pruning node set whose state meets a preset requirement;
a calculation module 702, configured to obtain, for each candidate pruning node, a storage space saving value that is not subjected to pruning operation, and calculate a storage space saving value after pruning operation, and update a state space of each candidate pruning node based on the storage space saving value with a smaller value; wherein the state space represents the size of the space occupied by the node;
The pruning module 703 is configured to obtain a preset boundary condition, call a main function to process the boundary condition and a state space of all the candidate pruning nodes, so as to screen a target pruning node from the candidate pruning node set, perform pruning processing, and execute an update operation on the state tree in response to monitoring that pruning is completed.
In the embodiment of the present invention, the pruning module 703 is configured to:
and generating an array based on the state space of each alternative pruning node, and calling a main function to process the boundary conditions and the array so as to screen target pruning nodes from the alternative pruning node set and perform pruning processing.
In the embodiment of the present invention, the pruning module 703 is configured to:
sequencing the state space of each alternative pruning node according to the sequence of the storage space saving values from large to small;
and processing the boundary conditions and the state space of all the alternative pruning nodes by using a main function so as to screen target pruning nodes from the alternative pruning node set according to the sorting and perform pruning processing.
In the implementation device of the invention, the boundary condition is at least one of a preset pruning operation frequency threshold value and a target storage space saving total value.
In the embodiment of the present invention, the alternative pruning node is at least one of an invalid node and a duplicate node, and the pruning module 703 includes one or more of the following:
invoking an invalid state pruning strategy, acquiring a key value of the invalid node, processing a hash pointer by using a hash function, searching a position corresponding to the hash pointer in a storage space, and pruning data of the position;
and calling a repeated state pruning strategy, inquiring the target node which is the same as the repeated node and has been traversed and processed in the hash table, and pointing the hash pointer of the repeated node to the target node.
In addition, the implementation of the apparatus in the embodiments of the present invention has been described in detail in the above method, so that the description is not repeated here.
Fig. 8 shows an exemplary system architecture 800, including terminal devices 801, 802, 803, a network 804, and a server 805 (by way of example only), to which embodiments of the invention may be applied.
The terminal devices 801, 802, 803 may be various electronic devices having a display screen and supporting web browsing, have various communication client applications installed, and a user may interact with the server 805 through the network 804 using the terminal devices 801, 802, 803 to receive or transmit messages, etc.
The network 804 serves as a medium for providing communication links between the terminal devices 801, 802, 803 and the server 805. The network 804 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.
The server 805 may be a server providing various services, and it should be noted that the method provided by the embodiment of the present invention is generally performed by the server 805, and accordingly, the apparatus is generally disposed in the server 805.
It should be understood that the number of terminal devices, networks and servers in fig. 8 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Referring now to FIG. 9, there is illustrated a schematic diagram of a computer system 900 suitable for use in implementing an embodiment of the present invention. The terminal device shown in fig. 9 is only an example, and should not impose any limitation on the functions and the scope of use of the embodiment of the present invention.
As shown in fig. 9, the computer system 900 includes a Central Processing Unit (CPU) 901, which can execute various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 902 or a program loaded from a storage section 908 into a Random Access Memory (RAM) 903. In the RAM 903, various programs and data necessary for the operation of the system 900 are also stored. The CPU 901, ROM 902, and RAM 903 are connected to each other through a bus 904. An input/output (I/O) interface 905 is also connected to the bus 904.
The following components are connected to the I/O interface 905: an input section 906 including a keyboard, a mouse, and the like; an output portion 907 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and a speaker; a storage portion 908 including a hard disk or the like; and a communication section 909 including a network interface card such as a LAN card, a modem, or the like. The communication section 909 performs communication processing via a network such as the internet. The drive 910 is also connected to the I/O interface 905 as needed. A removable medium 911 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is installed as needed on the drive 910 so that a computer program read out therefrom is installed into the storage section 908 as needed.
In particular, according to embodiments of the present disclosure, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method shown in the flow chart. In such an embodiment, the computer program may be downloaded and installed from the network via the communication portion 909 and/or installed from the removable medium 911. The above-described functions defined in the system of the present invention are performed when the computer program is executed by a Central Processing Unit (CPU) 901.
The computer readable medium shown in the present invention may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present invention, however, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowcharts 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 or flowchart illustration, and combinations of blocks in the block diagrams 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 modules involved in the embodiments of the present invention may be implemented in software or in hardware. The described modules may also be provided in a processor, for example, as: a processor includes an alternative module, a calculation module, and a pruning module. The names of these modules do not in some way constitute a limitation of the module itself, for example, a computing module may also be described as a "state space module".
As another aspect, the present invention also provides a computer-readable medium that may be contained in the apparatus described in the above embodiments; or may be present alone without being fitted into the device. The computer readable medium carries one or more programs which, when executed by a device, cause the device to perform any of the pruning methods described above for blockchain applications.
The computer program product of the present invention comprises a computer program which, when executed by a processor, implements the pruning method applied to blockchain in embodiments of the present invention.
The above embodiments do not limit the scope of the present invention. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives can occur depending upon design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the scope of the present invention.

Claims (13)

1. A pruning method applied to a blockchain, comprising:
in response to monitoring an update operation on the blockchain state tree, traversing a storage space of each node in the state tree to determine an alternative pruning node set with a state meeting preset requirements;
For each alternative pruning node, acquiring a storage space saving value which is not subjected to pruning operation, calculating the storage space saving value after pruning operation, and updating the state space of each alternative pruning node based on the storage space saving value with smaller value; wherein the state space represents the size of the space occupied by the node;
and acquiring a preset boundary condition, calling a main function to process the boundary condition and the state space of all the alternative pruning nodes, so as to screen target pruning nodes from the alternative pruning node set and perform pruning processing, and executing updating operation on the state tree in response to monitoring that pruning is completed.
2. The method of claim 1, wherein the invoking the master function to process the boundary conditions and the state space of all the candidate pruning nodes to screen and prune target pruning nodes from the set of candidate pruning nodes comprises:
and generating an array based on the state space of each alternative pruning node, and calling a main function to process the boundary conditions and the array so as to screen target pruning nodes from the alternative pruning node set and perform pruning processing.
3. The method according to claim 1 or 2, wherein said calling a main function to process the boundary condition and the state space of all the candidate pruning nodes to screen the target pruning node from the candidate pruning node set and to do pruning processing comprises:
Sequencing the state space of each alternative pruning node according to the sequence of the storage space saving values from large to small;
and processing the boundary conditions and the state space of all the alternative pruning nodes by using a main function so as to screen target pruning nodes from the alternative pruning node set according to the sorting and perform pruning processing.
4. The method according to claim 1 or 2, wherein the boundary condition is at least one of a preset pruning operation number threshold and a target total memory space saving value.
5. The method of claim 1, wherein the candidate pruning nodes are at least one of invalid nodes and duplicate nodes, and the selecting target pruning nodes from the candidate pruning node set and performing pruning processing includes one or more of:
invoking an invalid state pruning strategy, acquiring a key value of the invalid node, processing a hash pointer by using a hash function, searching a position corresponding to the hash pointer in a storage space, and pruning data of the position;
and calling a repeated state pruning strategy, inquiring the target node which is the same as the repeated node and has been traversed and processed in the hash table, and pointing the hash pointer of the repeated node to the target node.
6. A pruning device for a blockchain, comprising:
the alternative module is used for traversing the storage space of each node in the state tree in response to monitoring the updating operation of the blockchain state tree so as to determine an alternative pruning node set with the state meeting the preset requirement;
the calculation module is used for acquiring a storage space saving value which is not subjected to pruning operation for each alternative pruning node, calculating the storage space saving value after the pruning operation, and updating the state space of each alternative pruning node based on the storage space saving value with smaller value; wherein the state space represents the size of the space occupied by the node;
and the pruning module is used for acquiring a preset boundary condition, calling a main function to process the boundary condition and the state space of all the alternative pruning nodes so as to screen target pruning nodes from the alternative pruning node set and perform pruning processing, and executing updating operation on the state tree in response to monitoring pruning completion.
7. The apparatus of claim 6, wherein the pruning module is configured to:
and generating an array based on the state space of each alternative pruning node, and calling a main function to process the boundary conditions and the array so as to screen target pruning nodes from the alternative pruning node set and perform pruning processing.
8. The apparatus of claim 6 or 7, wherein the pruning module is configured to:
sequencing the state space of each alternative pruning node according to the sequence of the storage space saving values from large to small;
and processing the boundary conditions and the state space of all the alternative pruning nodes by using a main function so as to screen target pruning nodes from the alternative pruning node set according to the sorting and perform pruning processing.
9. The apparatus of claim 6 or 7, wherein the boundary condition is at least one of a preset pruning operation number threshold and a target total memory space saving value.
10. The apparatus of claim 6, wherein the alternative pruning node is at least one of an invalid node and a duplicate node, the pruning module comprising one or more of:
invoking an invalid state pruning strategy, acquiring a key value of the invalid node, processing a hash pointer by using a hash function, searching a position corresponding to the hash pointer in a storage space, and pruning data of the position;
and calling a repeated state pruning strategy, inquiring the target node which is the same as the repeated node and has been traversed and processed in the hash table, and pointing the hash pointer of the repeated node to the target node.
11. An electronic device, comprising:
one or more processors;
storage means for storing one or more programs,
when executed by the one or more processors, causes the one or more processors to implement the method of any of claims 1-5.
12. A computer readable medium, on which a computer program is stored, characterized in that the program, when being executed by a processor, implements the method according to any of claims 1-5.
13. A computer program product comprising a computer program which, when executed by a processor, implements the method according to any one of claims 1-5.
CN202311051697.0A 2023-08-21 2023-08-21 Pruning method and device applied to blockchain Pending CN117076563A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311051697.0A CN117076563A (en) 2023-08-21 2023-08-21 Pruning method and device applied to blockchain

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311051697.0A CN117076563A (en) 2023-08-21 2023-08-21 Pruning method and device applied to blockchain

Publications (1)

Publication Number Publication Date
CN117076563A true CN117076563A (en) 2023-11-17

Family

ID=88707553

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311051697.0A Pending CN117076563A (en) 2023-08-21 2023-08-21 Pruning method and device applied to blockchain

Country Status (1)

Country Link
CN (1) CN117076563A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118093557A (en) * 2024-04-28 2024-05-28 杭州高新区(滨江)区块链与数据安全研究院 Block chain node state data processing method, electronic device and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118093557A (en) * 2024-04-28 2024-05-28 杭州高新区(滨江)区块链与数据安全研究院 Block chain node state data processing method, electronic device and storage medium

Similar Documents

Publication Publication Date Title
US8898677B2 (en) Data arrangement calculating system, data arrangement calculating method, master unit and data arranging method
CN104423960A (en) Continuous project integration method and continuous project integration system
CN114202027B (en) Method for generating execution configuration information, method and device for model training
CN117076563A (en) Pruning method and device applied to blockchain
WO2016169237A1 (en) Data processing method and device
CN108376169A (en) A kind of data processing method and device for on-line analytical processing
CN109903050A (en) Transaction De-weight method, transaction building method, equipment and storage medium
CN109074304A (en) The data distribution system of optimization
CN110599166A (en) Method and device for acquiring transaction dependency relationship in block chain
CN111897643B (en) Thread pool configuration system, method, device and storage medium
CN116521956A (en) Graph database query method and device, electronic equipment and storage medium
CN110502317A (en) A kind of method and apparatus of transaction management
CN110399534B (en) Terminal performance report generation method, device, equipment and storage medium
CN111951112A (en) Intelligent contract execution method based on block chain, terminal equipment and storage medium
CN109993656A (en) Tree-like block chain processing method, equipment and storage medium
CN111104247A (en) Method, apparatus and computer program product for managing data replication
CN114327271A (en) Life cycle management method, device, equipment and storage medium
CN109165325A (en) Method, apparatus, equipment and computer readable storage medium for cutting diagram data
CN114238390A (en) Data warehouse optimization method, device, equipment and storage medium
CN112380411A (en) Sensitive word processing method and device, electronic equipment, system and storage medium
WO2018205986A1 (en) Method and system for parallelizing sequential graph computation
CN114780021B (en) Copy repairing method and device, electronic equipment and storage medium
CN111209295B (en) Optimization method of computation flow graph, database access method and device
CN109582330A (en) Data model upgrade method, device, equipment and readable storage medium storing program for executing
CN113177212B (en) Joint prediction 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