Data elimination method, device and equipment, readable storage medium and program product

By obtaining the rate reference data and data link list of miner nodes, the state data is eliminated, which solves the problem of reduced transaction processing efficiency caused by a large amount of state data in the Ethereum network, and achieves the effect of improving transaction processing speed and cache hit rate.

CN119646009APending Publication Date: 2025-03-18CHINA TELECOM CLOUD TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411750557.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-02
Publication Date
2025-03-18

AI Technical Summary

Technical Problem

Large amounts of state data in the Ethereum network lead to reduced transaction efficiency, and a method is needed to determine which data needs to be phased out to improve the hit rate and transaction efficiency of cached data.

Method used

By obtaining the rate reference data and data link list of miner nodes, the status data with low access frequency is eliminated according to the storage locations of different state data in the data link list until the transaction processing speed reaches the preset speed threshold.

Benefits of technology

It improves the transaction processing speed of miner nodes, reduces memory usage by eliminating inactive state data, and improves the overall performance of the blockchain system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119646009A_ABST
    Figure CN119646009A_ABST
Patent Text Reader

Abstract

The invention relates to a data elimination method and device, equipment, a readable storage medium and a program product. The method comprises the following steps: acquiring corresponding rate reference data when a miner node processes a transaction at the current moment; under the condition that the rate reference data represents that the transaction processing speed is lower than a preset speed threshold value, acquiring a data chain table corresponding to the miner node; wherein the data chain table comprises at least one piece of state data of resources corresponding to transaction participants accessed by the miner node in the transaction processing process within the preset historical time period; and performing elimination processing on the at least one piece of state data according to the storage positions corresponding to the different pieces of state data in the data chain table. By adopting the method, the transaction processing efficiency can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of Ethereum technology, and in particular to a data elimination method, device, equipment, readable storage medium and program product. Background Art

[0002] With the growth of online transaction volume, in order to facilitate the processing of transactions and manage transaction records, the management of transaction records based on blockchain has become the mainstream method. However, the application field of blockchain technology is limited and the development is difficult. Based on this, the Ethereum network has emerged. In the Ethereum network, there are world states and account states.

[0003] Since the Ethereum network stores a large amount of state data, it is easy to reduce the efficiency of transaction processing. Therefore, it is urgent to provide a method that can determine which data in the Ethereum network needs to be eliminated, so as to improve the data hit rate of cached data and improve transaction processing efficiency. Summary of the invention

[0004] Based on this, it is necessary to provide a data elimination method, device, equipment, readable storage medium and program product that can improve transaction processing efficiency in response to the above technical problems.

[0005] In a first aspect, the present application provides a data elimination method, comprising:

[0006] Get the reference data of the rate at which the miner node processes transactions at the current moment;

[0007] When the rate reference data indicates that the transaction processing speed is lower than a preset speed threshold, a data linked list corresponding to the miner node is obtained; wherein the data linked list includes at least one state data of a resource corresponding to a transaction participant accessed by the miner node during the transaction processing process within a preset historical period;

[0008] At least one state data is eliminated according to the storage positions corresponding to the different state data in the data linked list.

[0009] In one embodiment, the data linked list includes a first data linked list and a second data linked list, and the access frequency corresponding to the state data in the first data linked list is lower than the access frequency corresponding to the state data in the second data linked list;

[0010] Accordingly, when the rate reference data indicates that the transaction processing speed is lower than the preset speed threshold, the data linked list corresponding to the miner node is obtained, including:

[0011] When the rate reference data indicates that the transaction processing speed corresponding to the miner node at the current moment is lower than the first preset speed threshold, obtaining a first data linked list;

[0012] When the rate reference data indicates that the transaction processing speed corresponding to the miner node at the current moment is lower than the second preset speed threshold, obtaining the first data linked list and the second data linked list;

[0013] The first preset speed threshold is greater than the second preset speed threshold.

[0014] In one of the embodiments, when the rate reference data indicates that the transaction processing speed corresponding to the miner node at the current moment is lower than the first preset speed threshold, at least one state data is eliminated according to the storage positions corresponding to different state data in the data linked list, including:

[0015] Eliminate the status data at the head of the first data linked list, and update the rate reference data at the current moment;

[0016] If the updated rate reference data indicates that the transaction processing speed corresponding to the miner node at the current moment is lower than the first preset speed threshold, the status data at the head of the first data linked list will continue to be eliminated until the updated rate reference data indicates that the transaction processing speed corresponding to the miner node at the current moment is not lower than the first preset speed threshold.

[0017] In one of the embodiments, when the rate reference data indicates that the transaction processing speed corresponding to the miner node at the current moment is lower than the second preset speed threshold, at least one historical state is eliminated according to the storage positions corresponding to different state data in the data linked list, including:

[0018] Eliminate each state data in the first data linked list, and migrate each state data in the second data linked list to the first data linked list.

[0019] In one of the embodiments, at least one state data of a resource corresponding to different transaction participants is stored in a state node of the corresponding transaction participant.

[0020] In one of the embodiments, when the data linked list includes a first data linked list and a second data linked list, and the access frequency of the state data in the first data linked list is lower than the access frequency of the state data in the second data linked list, the method further includes:

[0021] When the access to the state data is completed during the process of processing the transaction at the current moment, each state data stored in the state node to which the state data belongs is added to the tail of the second data linked list.

[0022] In a second aspect, the present application further provides a data elimination device, comprising:

[0023] The data acquisition module is used to obtain the rate reference data corresponding to the miner node processing transactions at the current moment;

[0024] A linked list acquisition module is used to acquire a data linked list corresponding to the miner node when the rate reference data indicates that the transaction processing speed is lower than a preset speed threshold; wherein the data linked list includes at least one state data of a resource corresponding to a transaction participant accessed by the miner node during the transaction processing process within a preset historical period;

[0025] The elimination module is used to eliminate at least one state data according to the storage positions corresponding to the different state data in the data linked list.

[0026] In a third aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:

[0027] Get the reference data of the rate at which the miner node processes transactions at the current moment;

[0028] When the rate reference data indicates that the transaction processing speed is lower than a preset speed threshold, a data linked list corresponding to the miner node is obtained; wherein the data linked list includes at least one state data of a resource corresponding to a transaction participant accessed by the miner node during the transaction processing process within a preset historical period;

[0029] At least one state data is eliminated according to the storage positions corresponding to the different state data in the data linked list.

[0030] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the following steps are implemented:

[0031] Get the reference data of the rate at which the miner node processes transactions at the current moment;

[0032] When the rate reference data indicates that the transaction processing speed is lower than a preset speed threshold, a data linked list corresponding to the miner node is obtained; wherein the data linked list includes at least one state data of a resource corresponding to a transaction participant accessed by the miner node during the transaction processing process within a preset historical period;

[0033] At least one state data is eliminated according to the storage positions corresponding to the different state data in the data linked list.

[0034] In a fifth aspect, the present application further provides a computer program product, including a computer program, which implements the following steps when executed by a processor:

[0035] Get the reference data of the rate at which the miner node processes transactions at the current moment;

[0036] When the rate reference data indicates that the transaction processing speed is lower than a preset speed threshold, a data linked list corresponding to the miner node is obtained; wherein the data linked list includes at least one state data of a resource corresponding to a transaction participant accessed by the miner node during the transaction processing process within a preset historical period;

[0037] At least one state data is eliminated according to the storage positions corresponding to the different state data in the data linked list.

[0038] The above-mentioned data elimination method, device, equipment, readable storage medium and program product, by constructing a data linked list corresponding to the miner node, when the transaction processing speed of the miner node is lower than the preset speed threshold, eliminates at least one status data based on the storage position corresponding to different status data in the data linked list, thereby achieving the effect of improving the transaction processing speed of the miner node. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0040] Figure 1 A diagram of an application environment of a data elimination method in an embodiment;

[0041] Figure 2A A schematic diagram of a flow chart of a data elimination method in one embodiment;

[0042] Figure 2B A Merkle tree structure diagram in one embodiment;

[0043] Figure 3 A schematic diagram of a flow chart of a data linked list acquisition step in one embodiment;

[0044] Figure 4 A schematic diagram of a flow chart of a data elimination step in an embodiment;

[0045] Figure 5 A schematic diagram of a flow chart of a data elimination step in another embodiment;

[0046] Fig. 6A A schematic diagram of a flow chart of the steps of adding a state node to a data linked list in one embodiment;

[0047] Figure 6Bis a flow chart of a data elimination method in another embodiment;

[0048] Figure 7 is a structural block diagram of a data elimination device in one embodiment;

[0049] Figure 8 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0050] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0051] Before introducing the data elimination method provided by the embodiment of the present application, it should be noted that the present application proposes a Merkle tree combined with a cache elimination algorithm. This data structure is applicable to the memory of the miner node present in the blockchain network. In the process of the miner node executing a transaction or calling a smart contract, the miner node will first try to obtain the account status data in the memory, and if it is obtained, the transaction will be executed. If the account data does not exist in the memory of the miner node, the miner node will search for the required status data in the hard disk. This process is relatively time-consuming. After obtaining the status data, the miner node will cache the status data in the Merkle tree in the memory. If the relevant data is needed in the next operation, it can be directly obtained in the memory, saving the time spent on transaction execution.

[0052] However, the memory of miner nodes is also limited. Unless the hardware performance is extremely powerful, most miner nodes cannot cache all state data endlessly. If the threshold of miner nodes in the blockchain system is raised, the number of miner nodes in the blockchain system will be greatly reduced, which will lead to the loss of decentralization of the blockchain system. In addition, the originally active state data may also be transformed into inactive state data, so there is no need to cache such state data in memory. Therefore, the state tree of the miner node needs to set up an elimination mechanism for the data and delete it from the tree to prevent the overall amount of active state data from increasing and the space occupied by the data from exceeding the limit, which will bring unpredictable results.

[0053] In this embodiment, the state data is divided into active state data and inactive state data. Active state data is defined as state data that needs to be accessed during the operation of the system in the recent period of time. Inactive state data is defined as state data that does not need to be accessed during the operation of the system in the recent period of time. Active state data can be transformed into inactive state data over time, and inactive state data can be transformed into active state data over time.

[0054] The data elimination method provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown. Among them, the terminal 102 communicates with the blockchain 104 through the network. Specifically, this embodiment is applied to the miner node in the blockchain 104, and the miner node obtains the rate reference data corresponding to the transaction processing at the current moment; when the rate reference data represents that the transaction processing speed is lower than the preset speed threshold, the miner node obtains its corresponding data chain table; wherein the data chain table includes at least one state data of the corresponding resource of the transaction participant accessed by the miner node in the process of processing the transaction within the preset historical period; the miner node eliminates at least one of the state data according to the storage position corresponding to different state data in the data chain table. Among them, the terminal 102 can be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, Internet of Things devices and portable wearable devices, and the Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart car devices, projection devices, etc. Portable wearable devices can be smart watches, smart bracelets, head-mounted devices, etc. Head-mounted devices can be virtual reality (VR) devices, augmented reality (AR) devices, smart glasses, etc. The blockchain 104 may be an independent physical server, a server cluster or a distributed system consisting of multiple physical servers, or a cloud server that provides cloud computing services.

[0055] In an exemplary embodiment, Figure 2A As shown, a data elimination method is provided, which is applied to Figure 1 Taking the miner node in the blockchain 104 in FIG. 1 as an example, the following steps may be included:

[0056] S210, obtaining the rate reference data corresponding to the miner node processing the transaction at the current moment.

[0057] The rate reference data may be data that affects the transaction processing speed of the miner node. For example, the rate reference data may be memory usage, current pending transaction volume, etc. It is understandable that the larger the memory usage, the slower the corresponding transaction processing speed; the larger the current pending transaction volume, the slower the corresponding transaction processing speed.

[0058] Optionally, in this embodiment, if the rate reference data is memory usage, it can be directly obtained; if the rate reference data is the current amount of pending transactions, the transactions that need to be processed at the current moment can be counted to obtain the current amount of pending transactions.

[0059] S220, when the rate reference data indicates that the transaction processing speed is lower than a preset speed threshold, obtain a data linked list corresponding to the miner node.

[0060] The preset speed threshold may represent a speed reference value, and when the transaction processing speed is lower than the preset speed threshold, it is determined that the current transaction processing speed is too low. In this embodiment, the preset speed threshold may be determined based on manual experience or based on the type of miner node, and no limitation is made to this.

[0061] The data linked list includes at least one state data of the corresponding resource of the transaction participant accessed by the miner node during the transaction processing within a preset historical period. For example, the data linked list includes the state data corresponding to different accounts.

[0062] In this embodiment, the number of data linked lists corresponding to the miner node can be one or two, and there is no limitation on this.

[0063] It is worth noting that in this embodiment, the data linked list corresponding to the miner node is a linked list consisting of at least two state nodes in each state node corresponding to the miner node. In other words, the data linked list is a linked list consisting of connections between state nodes. Based on this, Figure 2B As shown, in this embodiment, it is necessary to add pointers to other state nodes in each state node.

[0064] It is understandable that adding pointers to other state nodes in the state node can distinguish active state data from inactive state data while accessing data. In addition, the single-value state node is modified to a multi-value state node, and multiple accounts are stored in one state node. This can reduce the number of state nodes and avoid more space consumption caused by adding horizontal pointers. Furthermore, because the tree is stored in memory, traversal is performed directly through the reference of ordinary pointers, without the need for hash value pointers, and ordinary pointers consume less, which can make node acquisition more efficient.

[0065] It should be noted that there is at least one status node corresponding to a miner node, and status data is stored in each status node. In the process of transaction processing by the miner node, status data may be obtained from the corresponding status node to perform transaction processing. However, in conventional technology, a status node can only store status data corresponding to one account. In order to enrich the status data stored in the linked list corresponding to the miner node, and to reduce the number of status nodes in a linked list, thereby avoiding space consumption caused by increasing horizontal pointers, in this embodiment, at least one status data of resources corresponding to different transaction participants is stored in the status node of the corresponding transaction participant, that is, a status node stores status data corresponding to at least one account.

[0066] S230, eliminating at least one state data according to the storage positions corresponding to the different state data in the data linked list.

[0067] It can be understood that, since the data linked list is a linked list composed of at least two status nodes, and one status node stores status data corresponding to at least one account, the basic content in the data linked list is the status data.

[0068] Optionally, in this embodiment, the state data in the preset storage position in the data linked list can be eliminated. The preset storage position can be determined based on manual experience, for example, the preset storage position is used to store inactive data.

[0069] In the above data elimination method, by constructing a data linked list corresponding to the miner node, when the transaction processing speed of the miner node is lower than the preset speed threshold, at least one state data is eliminated based on the storage position corresponding to different state data in the data linked list, thereby achieving the effect of improving the transaction processing speed of the miner node.

[0070] Continue to see Figure 2B The Merkle tree shown in the figure has a Merkle tree root, which starts from the root and links to the state nodes in the tree. As long as the account address in the blockchain is used, the specific state node can be searched in the tree to obtain its corresponding state data. The data linked list refers to one (or more) bidirectional linked lists between state nodes. Figure 2B The Merkle tree saved for the miner node. As can be seen from the figure, the intuitive feature of the state tree in the miner node is that its state node has a horizontal pointer, so that a bidirectional linked list can be constructed. This patent combines the cache elimination algorithm of Adaptive Replacement Cache (ARC) and constructs two bidirectional linked lists list1 and list2 in the figure. These two linked lists are used to distinguish active state data from inactive state data, thereby completing data elimination.

[0071] Based on the technical solutions of the above embodiments, the present application also provides an optional embodiment. In this optional embodiment, the data linked list includes a first data linked list and a second data linked list, and the access frequency corresponding to the status data in the first data linked list is lower than the access frequency corresponding to the status data in the second data linked list. In this case, the process of obtaining the data linked list corresponding to the miner node when the rate reference data represents a transaction processing speed lower than a preset speed threshold is limited.

[0072] See also Figure 3 The steps of obtaining the data linked list shown include:

[0073] S310, determining the magnitude relationship between the transaction processing speed and a first preset speed threshold and a second preset speed threshold.

[0074] The first preset speed threshold is greater than the second preset speed threshold.

[0075] For ease of understanding, the first preset speed threshold and the second preset speed threshold are defined and explained. When the transaction processing speed is lower than the first preset speed threshold, it proves that the transaction processing speed is a little slow; when the transaction processing speed is lower than the second preset speed threshold, it proves that the transaction processing speed is very slow.

[0076] S320, when the rate reference data indicates that the transaction processing speed corresponding to the miner node at the current moment is lower than a first preset speed threshold, obtain a first data linked list.

[0077] S330, when the rate reference data indicates that the transaction processing speed corresponding to the miner node at the current moment is lower than the second preset speed threshold, obtain the first data linked list and the second data linked list.

[0078] Among them, the first data linked list (ie, the above list1) stores inactive data; the second data linked list (ie, the above list2) stores active data.

[0079] It is understandable that the access frequency of the status data stored in the first data linked list is lower than the access frequency of the status data stored in the second data linked list, that is, the status data stored in the first data linked list is less important than the status data stored in the second data linked list.

[0080] Based on the above reasons, when the rate reference data represents that the transaction processing speed corresponding to the miner node at the current moment is lower than the first preset speed threshold, the first data linked list is obtained; when the rate reference data represents that the transaction processing speed corresponding to the miner node at the current moment is lower than the second preset speed threshold, the first data linked list and the second data linked list are obtained.

[0081] Optionally, different data linked lists correspond to different identification information, and the corresponding data linked lists can be located and obtained according to the identification information.

[0082] In the above embodiment, a first data linked list and a second data linked list are set, and the first data linked list and the second data linked list store status data of different importance. Based on this, when the transaction processing speed is different, different data linked lists can be obtained according to the actual situation to perform data elimination.

[0083] Based on the technical solutions of the above embodiments, the present application also provides an optional embodiment. In this optional embodiment, when the transaction processing speed corresponding to the miner node represented by the rate reference data at the current moment is lower than the first preset speed threshold, the process of eliminating at least one state data is refined according to the storage positions corresponding to different state data in the data linked list.

[0084] See also Figure 4 The data elimination steps shown include:

[0085] S410, eliminating the status data at the head of the first data linked list, and updating the rate reference data at the current moment.

[0086] S420, determining whether the transaction processing speed corresponding to the rate reference data at the current moment is lower than a first preset speed threshold; if so, returning to execute S410; if not, executing S430.

[0087] Exemplarily, in this embodiment, in the process of updating the status data in the data linked list, the latest data is added to the end of the data linked list, that is, the status data at the head of the data linked list is the least important status data in the entire data linked list.

[0088] Based on the above reasons, in this embodiment, during the data elimination process, the status data is eliminated in sequence starting from the head of the data linked list, and the data elimination work is completed when the transaction processing speed is not lower than the first preset speed threshold.

[0089] S430, completing the data elimination operation.

[0090] In the above embodiment, when it is necessary to eliminate the status data, the status data at the head of the first data linked list is eliminated first, that is, the least important status data in the unimportant data linked list is eliminated first to avoid adverse effects caused by data elimination.

[0091] Based on the technical solutions of the above embodiments, the present application also provides an optional embodiment. In this optional embodiment, when the transaction processing speed corresponding to the miner node at the current moment represented by the rate reference data is lower than the second preset speed threshold, the process of eliminating at least one historical state according to the storage position corresponding to different state data in the data linked list is described in detail.

[0092] See also Figure 5 The data elimination steps shown include:

[0093] S510, eliminating each state data in the first data linked list, and migrating each state data in the second data linked list to the first data linked list.

[0094] It is understandable that when the transaction processing speed is lower than the second preset speed threshold, the status data needs to be eliminated quickly to increase the transaction processing speed.

[0095] Based on the above reasons, in this embodiment, all status data in the first data linked list can be eliminated, and each status data in the second data linked list can be migrated to the first data linked list, leaving the second data linked list empty to improve transaction processing speed.

[0096] It can be understood that, when the access to the state data is completed in the process of processing the transaction at the current moment, each state data stored in the state node to which the state data belongs is added to the end of the second data linked list.

[0097] In the above embodiment, a corresponding data elimination method is given when the transaction processing speed is lower than the second preset speed threshold. In different actual situations, different data elimination methods are adopted to make the data elimination process more compatible with the actual scenario and avoid the adverse effects on transaction processing caused by excessive elimination of data.

[0098] Based on the technical solutions of the above embodiments, the present application also provides an optional embodiment. In this optional embodiment, the data elimination method provided by the present application is introduced in detail.

[0099] See also Fig. 6A The steps of adding the state node to the data linked list shown include:

[0100] S610A, during the transaction processing, determine the state node to which the state data belongs, and determine whether the state node has been added to the data linked list;

[0101] Specifically, determine whether t2 of the state node is true;

[0102] S620A, if not, add it to the first data linked list, and adjust the t1 flag of the state node to the tag of the first data linked list;

[0103] It should be noted that the formalization of the state node can be defined as follows:

[0104] ;

[0105] In the formula, type records the type of the state node, hash is a unique Merkle tree that performs a hash operation on the node content and records it, keys represents multiple keys stored in the state node, and values ​​represents the values ​​corresponding to these keys, which are the state data of the account. Next and pre are both pointers in the state node, which will be linked to other state nodes through pointers. Tag is a flag that can distinguish whether the state node is currently active data or inactive data, or save some additional information. In this embodiment, two tag marking bits, t1 and t2, can be used; among them, t1 is used to indicate the data linked list to which the state node belongs; t2 is used to indicate whether the state node has been added to the data linked list.

[0106] S630A, if yes, determine that the state node has been added to the data linked list;

[0107] S640A, determine whether the t1 bit of the state node is equal to the tag of the first data linked list, if so, execute S650A, if not, execute S660A;

[0108] S650A, if yes, determine that the state node is added to the first data linked list, delete it from the first data linked list, add it to the end of the second data linked list, and adjust its t1 flag to the tag of the second data linked list;

[0109] S660A, if not, it is determined that the state node has been added to the second data linked list, and its storage position is adjusted to the end of the second data linked list.

[0110] See also Figure 6B The data elimination method shown includes:

[0111] S610B, determining whether the state nodes stored in the second data linked list exceed the corresponding capacity threshold, if so, executing S620B, if not, executing S630B;

[0112] S620B, eliminate the status node at the head of the second data linked list, and add it to the tail of the first data linked list;

[0113] Specifically, the t1 of the deleted node is modified to the tag of list1. At the same time, the length of list2 is reduced and the length of list1 is extended.

[0114] S630B, determining whether the state nodes stored in the first data linked list exceed the corresponding capacity threshold, if so, executing S640B, if not, executing S650B;

[0115] S640B, eliminate the state node at the head of the first data linked list;

[0116] Specifically, t2 of the eliminated state node is set to false;

[0117] S650B, stop the data elimination operation.

[0118] It should be noted that the present application also provides a batch deletion algorithm. Specifically, the loop statement can be executed in a loop first, and the loop condition is whether the length of list1 is greater than 0. Starting from the head of list1, delete the node, modify the t2 of the state node, indicating that the node does not exist in list1 and list2, and call the delete operation to delete these nodes in the state tree, thereby deleting all elements in the linked list list1 from the memory. Next, the state nodes in list2 except the head and tail are removed from the linked list. At this time, list2 only contains the head and tail, and these intermediate nodes are inserted between the head and tail nodes. Finally, the tag values ​​of list1 and list2 are exchanged, and the head and tail pointers of list1 and list2 are interchanged to avoid the need to modify all active state node data; the length of list1 is set to the length of list2 at this time, and the length of list2 is set to 0. After completing these operations, all inactive state data in the memory are deleted from the memory, and the active data is set to inactive data.

[0119] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0120] Based on the same inventive concept, the embodiment of the present application also provides a data elimination device for implementing the data elimination method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more data elimination device embodiments provided below can refer to the limitations on the data elimination method above, and will not be repeated here.

[0121] In an exemplary embodiment, Figure 7 As shown, a data elimination device is provided, including: a data acquisition module 710, a linked list acquisition module 720 and an elimination module 730, wherein:

[0122] The data acquisition module 710 is used to obtain the rate reference data corresponding to the miner node processing the transaction at the current moment;

[0123] The linked list acquisition module 720 is used to acquire a data linked list corresponding to the miner node when the rate reference data indicates that the transaction processing speed is lower than a preset speed threshold; wherein the data linked list includes at least one state data of the corresponding resource of the transaction participant accessed by the miner node during the transaction processing process within a preset historical period; at least one state data of the corresponding resource of different transaction participants is stored in the state node of the corresponding transaction participant;

[0124] The elimination module 730 is used to eliminate at least one state data according to the storage positions corresponding to the different state data in the data linked list.

[0125] In one embodiment, the data linked list includes a first data linked list and a second data linked list, and the access frequency corresponding to the status data in the first data linked list is lower than the access frequency corresponding to the status data in the second data linked list; accordingly, the linked list acquisition module 720 includes a first acquisition unit, which is used to acquire the first data linked list when the rate reference data represents that the transaction processing speed corresponding to the miner node at the current moment is lower than the first preset speed threshold; the second acquisition unit is used to acquire the first data linked list and the second data linked list when the rate reference data represents that the transaction processing speed corresponding to the miner node at the current moment is lower than the second preset speed threshold; wherein the first preset speed threshold is greater than the second preset speed threshold.

[0126] In one embodiment, the elimination module 730 includes a first elimination unit, which is used to eliminate the status data at the head of the first data linked list and update the rate reference data at the current moment; if the updated rate reference data indicates that the transaction processing speed corresponding to the miner node at the current moment is lower than the first preset speed threshold, the status data at the head of the first data linked list will continue to be eliminated until the updated rate reference data indicates that the transaction processing speed corresponding to the miner node at the current moment is not lower than the first preset speed threshold.

[0127] In one embodiment, the elimination module 730 includes a second elimination unit, which is used to eliminate each state data in the first data linked list and migrate each state data in the second data linked list to the first data linked list.

[0128] In one embodiment, the data elimination device includes a data adding module, which is used to add each state data stored in the state node to which the state data belongs to the tail of the second data linked list when completing access to the state data during the transaction processing at the current moment.

[0129] Each module in the above data elimination device can be implemented in whole or in part by software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute the operations corresponding to each module.

[0130] In an exemplary embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as shown in FIG. Figure 8 As shown. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, near field communication (NFC) or other technologies. When the computer program is executed by the processor, a data elimination method is implemented. The display unit of the computer device is used to form a visually visible picture, which can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device shell, or an external keyboard, touchpad or mouse.

[0131] Those skilled in the art will understand that Figure 8 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0132] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:

[0133] Get the reference data of the rate at which the miner node processes transactions at the current moment;

[0134] When the rate reference data indicates that the transaction processing speed is lower than a preset speed threshold, a data linked list corresponding to the miner node is obtained; wherein the data linked list includes at least one state data of a resource corresponding to a transaction participant accessed by the miner node during the transaction processing process within a preset historical period;

[0135] At least one state data is eliminated according to the storage positions corresponding to the different state data in the data linked list.

[0136] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0137] When the rate reference data indicates that the transaction processing speed corresponding to the miner node at the current moment is lower than the first preset speed threshold, obtaining a first data linked list;

[0138] When the rate reference data indicates that the transaction processing speed corresponding to the miner node at the current moment is lower than the second preset speed threshold, obtaining the first data linked list and the second data linked list;

[0139] The first preset speed threshold is greater than the second preset speed threshold.

[0140] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0141] Eliminate the status data at the head of the first data linked list, and update the rate reference data at the current moment;

[0142] If the updated rate reference data indicates that the transaction processing speed corresponding to the miner node at the current moment is lower than the first preset speed threshold, the status data at the head of the first data linked list will continue to be eliminated until the updated rate reference data indicates that the transaction processing speed corresponding to the miner node at the current moment is not lower than the first preset speed threshold.

[0143] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0144] Eliminate each state data in the first data linked list, and migrate each state data in the second data linked list to the first data linked list.

[0145] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0146] At least one state data of resources corresponding to different transaction participants is stored in the state node of the corresponding transaction participant.

[0147] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0148] When the access to the state data is completed during the process of processing the transaction at the current moment, each state data stored in the state node to which the state data belongs is added to the tail of the second data linked list.

[0149] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:

[0150] Get the reference data of the rate at which the miner node processes transactions at the current moment;

[0151] When the rate reference data indicates that the transaction processing speed is lower than a preset speed threshold, a data linked list corresponding to the miner node is obtained; wherein the data linked list includes at least one state data of a resource corresponding to a transaction participant accessed by the miner node during the transaction processing process within a preset historical period;

[0152] At least one state data is eliminated according to the storage positions corresponding to the different state data in the data linked list.

[0153] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0154] When the rate reference data indicates that the transaction processing speed corresponding to the miner node at the current moment is lower than the first preset speed threshold, obtaining a first data linked list;

[0155] When the rate reference data indicates that the transaction processing speed corresponding to the miner node at the current moment is lower than the second preset speed threshold, obtaining the first data linked list and the second data linked list;

[0156] The first preset speed threshold is greater than the second preset speed threshold.

[0157] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0158] Eliminate the status data at the head of the first data linked list, and update the rate reference data at the current moment;

[0159] If the updated rate reference data indicates that the transaction processing speed corresponding to the miner node at the current moment is lower than the first preset speed threshold, the status data at the head of the first data linked list will continue to be eliminated until the updated rate reference data indicates that the transaction processing speed corresponding to the miner node at the current moment is not lower than the first preset speed threshold.

[0160] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0161] Eliminate each state data in the first data linked list, and migrate each state data in the second data linked list to the first data linked list.

[0162] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0163] At least one state data of resources corresponding to different transaction participants is stored in the state node of the corresponding transaction participant.

[0164] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0165] When the access to the state data is completed during the process of processing the transaction at the current moment, each state data stored in the state node to which the state data belongs is added to the tail of the second data linked list.

[0166] In one embodiment, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the following steps:

[0167] Get the reference data of the rate at which the miner node processes transactions at the current moment;

[0168] When the rate reference data indicates that the transaction processing speed is lower than a preset speed threshold, a data linked list corresponding to the miner node is obtained; wherein the data linked list includes at least one state data of a resource corresponding to a transaction participant accessed by the miner node during the transaction processing process within a preset historical period;

[0169] At least one state data is eliminated according to the storage positions corresponding to the different state data in the data linked list.

[0170] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0171] When the rate reference data indicates that the transaction processing speed corresponding to the miner node at the current moment is lower than the first preset speed threshold, obtaining a first data linked list;

[0172] When the rate reference data indicates that the transaction processing speed corresponding to the miner node at the current moment is lower than the second preset speed threshold, obtaining the first data linked list and the second data linked list;

[0173] The first preset speed threshold is greater than the second preset speed threshold.

[0174] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0175] Eliminate the status data at the head of the first data linked list, and update the rate reference data at the current moment;

[0176] If the updated rate reference data indicates that the transaction processing speed corresponding to the miner node at the current moment is lower than the first preset speed threshold, the status data at the head of the first data linked list will continue to be eliminated until the updated rate reference data indicates that the transaction processing speed corresponding to the miner node at the current moment is not lower than the first preset speed threshold.

[0177] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0178] Eliminate each state data in the first data linked list, and migrate each state data in the second data linked list to the first data linked list.

[0179] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0180] At least one state data of resources corresponding to different transaction participants is stored in the state node of the corresponding transaction participant.

[0181] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0182] When the access to the state data is completed during the process of processing the transaction at the current moment, each state data stored in the state node to which the state data belongs is added to the tail of the second data linked list.

[0183] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.

[0184] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0185] The above embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A data elimination method, characterized in that: Applied to a miner node in a blockchain, the method comprises: Obtaining the rate reference data corresponding to the miner node processing transactions at the current moment; In the case where the rate reference data indicates that the transaction processing speed is lower than a preset speed threshold, obtaining a data linked list corresponding to the miner node; wherein the data linked list includes at least one state data of a resource corresponding to a transaction participant accessed by the miner node during the transaction processing process within a preset historical period; According to the storage positions corresponding to the different status data in the data linked list, at least one of the status data is eliminated.

2. The method according to claim 1, characterized in that The data linked list includes a first data linked list and a second data linked list, and the access frequency corresponding to the status data in the first data linked list is lower than the access frequency corresponding to the status data in the second data linked list; Accordingly, when the transaction processing speed represented by the rate reference data is lower than a preset speed threshold, obtaining the data linked list corresponding to the miner node includes: When the rate reference data indicates that the transaction processing speed corresponding to the miner node at the current moment is lower than a first preset speed threshold, obtaining the first data linked list; When the rate reference data indicates that the transaction processing speed corresponding to the miner node at the current moment is lower than a second preset speed threshold, obtaining the first data linked list and the second data linked list; Wherein, the first preset speed threshold is greater than the second preset speed threshold.

3. The method according to claim 2, characterized in that In a case where the rate reference data indicates that the transaction processing speed corresponding to the miner node at the current moment is lower than a first preset speed threshold, eliminating at least one of the state data according to the storage positions corresponding to different state data in the data linked list includes: Eliminate the status data at the head of the first data linked list, and update the rate reference data at the current moment; If the updated rate reference data indicates that the transaction processing speed corresponding to the miner node at the current moment is lower than the first preset speed threshold, the status data at the head of the first data linked list will continue to be eliminated until the updated rate reference data indicates that the transaction processing speed corresponding to the miner node at the current moment is not lower than the first preset speed threshold.

4. The method according to claim 2, characterized in that: When the rate reference data indicates that the transaction processing speed corresponding to the miner node at the current moment is lower than a second preset speed threshold, the eliminating processing of the at least one historical state according to the storage positions corresponding to different state data in the data linked list includes: Eliminate each state data in the first data linked list, and migrate each state data in the second data linked list to the first data linked list.

5. The method according to any one of claims 1 to 4, characterized in that At least one state data of resources corresponding to different transaction participants is stored in the state node of the corresponding transaction participant.

6. The method according to claim 5, characterized in that In a case where the data linked list includes a first data linked list and a second data linked list, and the access frequency of the state data in the first data linked list is lower than the access frequency of the state data in the second data linked list, the method further includes: When the access to the state data is completed during the process of processing the transaction at the current moment, each state data stored in the state node to which the state data belongs is added to the tail of the second data linked list.

7. A data elimination device, characterized in that: A miner node configured in a blockchain, the device comprising: A data acquisition module, used to obtain the rate reference data corresponding to the miner node processing transactions at the current moment; A linked list acquisition module, used to acquire a data linked list corresponding to the miner node when the rate reference data indicates that the transaction processing speed is lower than a preset speed threshold; wherein the data linked list includes at least one state data of a resource corresponding to a transaction participant accessed by the miner node during the transaction processing process within a preset historical period; The elimination module is used to eliminate at least one of the state data according to the storage positions corresponding to the different state data in the data linked list.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.