Blockchain node data storage method and system
By assessing the market influence and transaction relevance of old transactions, the necessity rate of confirming ownership of old transactions is determined, and blocks with low ownership value are reasonably evaluated and archived. This solves the problem of poor storage rationality in existing technologies and achieves more efficient data storage and more accurate ownership confirmation.
Patent Information
- Application Number
- CN202510611364.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-13
- Publication Date
- 2026-02-24
- Estimated Expiration
- 2045-05-13
AI Technical Summary
In existing technologies, relying solely on access frequency to optimize blockchain node storage results in poor data storage rationality, an inability to effectively release storage space, and an impact on the accuracy and traceability of data asset ownership confirmation.
By assessing the target market influence and transaction relevance of old transactions, the necessity rate for confirming ownership of old transactions is determined, the ownership value of each old transaction is reasonably evaluated, and old blocks that meet the conditions are archived based on the transaction archiving rate.
It improves the rationality of data storage in blockchain nodes, effectively preserves old blocks with high ownership value, reduces storage space occupation, and optimizes storage efficiency.
Smart Images

Figure CN120523794B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of blockchain technology, and specifically to a blockchain node data storage method and system. Background Technology
[0002] When using blockchain technology to establish ownership of enterprise data assets, each node in the blockchain stores a portion of the data assets to ensure their security and immutability. However, as the amount of data in the blockchain network continues to grow, storage costs and network bandwidth pressures also increase significantly. Therefore, optimizing the storage of blockchain nodes becomes particularly necessary.
[0003] Currently, when optimizing storage for blockchain nodes, the access frequency of each historical block is analyzed, and data in historical blocks that are no longer frequently accessed is archived.
[0004] However, in the context of enterprise data asset ownership confirmation, past transactions of data assets lead to continuous changes in ownership. Some older blocks only represent an intermediate state of data asset ownership; although they are accessed frequently, they may not have long-term ownership confirmation value. Thus, relying solely on access frequency for storage optimization results in poor rationality of data storage on blockchain nodes. Summary of the Invention
[0005] This invention provides a blockchain node data storage method and system, which can improve the rationality of blockchain node data storage.
[0006] A first aspect of this invention provides a blockchain node data storage method, comprising:
[0007] If a new block is formed on the target blockchain, retrieve each old transaction from the unarchived old block;
[0008] For each old transaction, the following steps are performed: Based on the target market influence of the target data asset and the transaction correlation between the target data asset and the reference data asset, the necessary rate for confirming the rights of the old transaction is determined. The target data asset is the data asset included in the old transaction, and the reference data asset is each data asset in the old block corresponding to the old transaction except for the target data asset.
[0009] Based on the necessary rate for confirming rights for each old transaction, the corresponding transaction filing rate for each old transaction is determined.
[0010] Based on the transaction archiving rate corresponding to each old transaction, archiving operations are performed on old blocks that meet the target archiving conditions to complete the data storage of the target blockchain.
[0011] In some possible implementations, the necessity rate for confirming ownership of old transactions is determined based on the target market influence of the target data asset and the transaction correlation between the target data asset and the reference data asset. Specifically, this may include:
[0012] The target market influence of the target data asset is determined based on the frequency of its appearance in the target blockchain and the corresponding first old transaction time.
[0013] Based on the first block corresponding to the target data asset and the second block corresponding to the reference data asset, the transaction correlation between the target data asset and the reference data asset is determined. The first block is the block where the target data asset transaction occurs, and the second block is the block where the reference data asset transaction occurs.
[0014] The necessary rate for confirming ownership of old transactions is determined based on the target market influence and the degree of transaction relevance.
[0015] In some possible implementations, the target market influence of the target data asset is determined based on the frequency of its appearance in the target blockchain and the corresponding first old transaction time. Specifically, this may include:
[0016] Based on the first old transaction time of the target data asset in the target blockchain, determine the first interval duration between adjacent first old transaction times;
[0017] By utilizing the duration of each first interval and the frequency of occurrence of the target data asset in the target blockchain, the target market influence of the target data asset is determined.
[0018] In some possible implementations, the transaction correlation between the target data asset and the reference data asset is determined based on the first block corresponding to the target data asset and the second block corresponding to the reference data asset. Specifically, this may include:
[0019] Based on the first block and the second block, determine the overlapping blocks between the first block and the second block;
[0020] The transaction correlation between the target data asset and the reference data asset is determined by using the first quantity of the first block, the second quantity of the second block, and the overlap of the overlapping blocks.
[0021] In some possible implementations, the necessity rate for confirming ownership of old transactions is determined based on the target market influence and transaction relevance. Specifically, this may include:
[0022] Based on the transaction correlation between the target data asset and each reference data asset, and the reference market influence of each reference data asset, the degree of interference of each reference data asset with the confirmation of rights of the target data asset is determined.
[0023] By utilizing the degree of interference of each reference data asset in the confirmation of rights to the target data asset, and the target market influence of the target data asset, the necessity rate for confirming rights to the old transaction is determined.
[0024] In some possible implementations, the transaction archiving rate for each old transaction is determined based on the necessary rate for confirming ownership of each old transaction. Specifically, this may include:
[0025] Based on the degree of transaction correlation between the new data assets corresponding to each new transaction in the new block and the target data assets, determine the degree of archiving impact of each new transaction on the old transactions;
[0026] For each new transaction, the following steps are taken: Based on the new transaction's ownership confirmation necessity rate, the new transaction's impact on the archiving of old transactions, and the old transaction's ownership confirmation necessity rate, determine the local archiving rate of old transactions under the influence of new transactions;
[0027] By utilizing the local filing rates of old transactions under the influence of each new transaction, the transaction filing rate corresponding to the old transaction can be determined.
[0028] In some possible implementations, the archiving impact of each new transaction on old transactions is determined based on the transaction correlation between the new data asset corresponding to each new transaction in the new block and the target data asset. Specifically, this may include:
[0029] The second interval duration between the second old transaction time and the new transaction time is determined based on the second old transaction time of the old transaction and the new transaction time of the new transaction.
[0030] By utilizing the transaction correlation between the new data assets corresponding to the new transaction and the target data assets, as well as the second interval duration, the archiving impact of the new transaction on the old transaction is determined.
[0031] In some possible implementations, the local archiving rate of old transactions under the influence of new transactions is determined based on the new transaction's ownership necessity rate, the new transaction's impact on the archiving of old transactions, and the old transaction's ownership necessity rate. Specifically, this can include:
[0032] The difference in the necessity rate between the new transaction's necessity rate and the old transaction's necessity rate is normalized using a normalization function to obtain the normalized result.
[0033] By utilizing the impact of new transactions on the archiving of old transactions and the normalization results, the local archiving rate of old transactions under the influence of new transactions is determined.
[0034] In some possible implementations, based on the transaction archiving rate corresponding to each old transaction, archiving operations are performed on old blocks that meet the target archiving conditions. Specifically, this may include:
[0035] Based on the transaction archiving rate corresponding to each old transaction, the block archiving rate of each old block is determined;
[0036] If the old block archiving rate is greater than the preset archiving rate threshold, the old block will be archived.
[0037] A second aspect of this invention provides a blockchain node data storage system, comprising:
[0038] The transaction acquisition module is used to acquire each old transaction in the unarchived old block when a new block is formed on the target blockchain.
[0039] The transaction analysis module is used to perform the following for each old transaction: determine the necessity rate of confirming rights for the old transaction based on the target market influence of the target data asset and the transaction correlation between the target data asset and the reference data asset. The target data asset is the data asset contained in the old transaction, and the reference data asset is each data asset in the old block corresponding to the old transaction except for the target data asset.
[0040] The archiving rate determination module is used to determine the transaction archiving rate corresponding to each old transaction based on the confirmation necessity rate of each old transaction.
[0041] The block archiving module is used to perform archiving operations on old blocks that meet the target archiving conditions based on the transaction archiving rate corresponding to each old transaction, so as to complete the data storage of the target blockchain.
[0042] The beneficial effects of this invention are:
[0043] In the blockchain node data storage method provided by this invention, for each old transaction in an unarchived old block, the necessity rate for confirming ownership of the old transaction is determined based on the target market influence of the target data asset contained in the old transaction and the transaction correlation between the target data asset and the reference data asset. Thus, based on the necessity rate of confirming ownership of the old transactions, the ownership value of each old transaction is reasonably assessed. Finally, based on the transaction archiving rate corresponding to each old transaction, archiving operations are performed on old blocks that meet the target archiving conditions. Therefore, by accurately assessing the ownership value of each old transaction, this invention can more effectively archive old blocks with low ownership value, retaining only old blocks with high ownership value, thereby improving the rationality of blockchain node data storage. Attached Figure Description
[0044] To more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0045] Figure 1A flowchart illustrating a first blockchain node data storage method according to an embodiment of the present invention;
[0046] Figure 2 This is a flowchart illustrating a second blockchain node data storage method according to an embodiment of the present invention.
[0047] Figure 3 This is a flowchart illustrating a third blockchain node data storage method according to an embodiment of the present invention.
[0048] Figure 4 This is a schematic diagram of the structure of a blockchain node data storage system provided in one embodiment of the present invention. Detailed Implementation
[0049] To further illustrate the technical means and effects adopted by the present invention to achieve its intended purpose, the following, in conjunction with the accompanying drawings and preferred embodiments, details the specific implementation, structure, features, and effects of a blockchain node data storage method and system proposed according to the present invention. In the following description, different "one embodiment" or "another embodiment" do not necessarily refer to the same embodiment. Furthermore, specific features, structures, or characteristics in one or more embodiments can be combined in any suitable form.
[0050] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains.
[0051] It should be noted that the acquisition, storage, use, and processing of data in the technical solution of this invention all comply with the relevant provisions of laws and regulations.
[0052] It should be noted that in the embodiments of the present invention, certain software, components, models and other existing solutions in the industry may be mentioned. These should be regarded as exemplary and are only intended to illustrate the feasibility of implementing the technical solution of the present invention. However, they do not mean that the applicant has used or necessarily used the solution.
[0053] In the process of establishing enterprise data asset ownership based on blockchain technology, the distributed nature of blockchain plays a crucial role. This characteristic means that each node in the blockchain network stores a portion of the data assets. This storage method not only greatly enhances the security of data assets but also ensures the immutability of data, providing solid technical support for the establishment of data asset ownership. However, as the blockchain network operates for longer periods and transaction volumes increase, the amount of data in the network is also continuously growing. This puts unprecedented pressure on the storage capacity of blockchain nodes and the bandwidth of the entire network. The rising storage costs and strained network bandwidth have become key factors restricting the further application of blockchain technology in the field of enterprise data asset ownership establishment.
[0054] To address this challenge, optimizing the storage of blockchain nodes is crucial. Currently, a common storage optimization strategy is to analyze the access frequency of each historical block and archive data from historical blocks that have not been accessed for a long time or have extremely low access frequency, thereby freeing up valuable storage space. This method alleviates storage pressure and improves storage efficiency to some extent. However, in the specific scenario of enterprise data asset ownership confirmation, this method has revealed some limitations.
[0055] Specifically, the transaction history of data assets is often complex and dynamic. The continuous accumulation of old transactions leads to the transfer of ownership of data assets at multiple points in time, forming a series of ownership change records. Among these records, some old blocks, while representing intermediate states in the transfer of data asset ownership and potentially accessed relatively frequently, may not possess long-term value for confirming ownership. They exist more as historical traces than as key evidence of the current ownership status. Therefore, relying solely on access frequency to guide the storage optimization of blockchain nodes could result in the retention of old blocks that are frequently accessed but have low ownership value, while some old blocks that are accessed less frequently but have significant ownership value might be prematurely archived or deleted due to storage space limitations. This would significantly diminish the rationality of data storage on blockchain nodes, not only failing to effectively free up storage space but also potentially affecting the accuracy and traceability of data asset ownership confirmation.
[0056] The purpose of this invention is to provide a blockchain node data storage method and system. In the blockchain node data storage method provided by this invention, for each old transaction in an unarchived old block, the necessity rate for confirming ownership of the old transaction is determined based on the target market influence of the target data asset contained in the old transaction and the transaction correlation between the target data asset and the reference data asset. Thus, based on the necessity rate for confirming ownership of the old transactions, the ownership value of each old transaction is reasonably evaluated. Finally, based on the transaction archiving rate corresponding to each old transaction, archiving operations are performed on old blocks that meet the target archiving conditions. Therefore, by accurately evaluating the ownership value of each old transaction, this invention can more effectively archive old blocks with low ownership value, retaining only old blocks with high ownership value, thereby improving the rationality of blockchain node data storage.
[0057] The following describes a specific embodiment of a blockchain node data storage method and system provided by the present invention.
[0058] Figure 1 A flowchart illustrating a blockchain node data storage method is provided. This blockchain node data storage method can be applied to the server side and may include the following steps S101 to S104.
[0059] S101 retrieves each old transaction from the unarchived old blocks when a new block is formed on the target blockchain.
[0060] In this embodiment, the new block is used to represent the most recently formed block in the target blockchain, and the old block is used to represent all blocks in the target blockchain other than the new block. The transactions included in the old block are the old transactions.
[0061] As an example, in the target blockchain, over time, enterprise data assets will generate new transaction records, which will be packaged into new blocks in the target blockchain.
[0062] Then, as new blocks are formed on the target blockchain, the server tracks the state of the target blockchain, identifying which blocks are archived and which are not. Specifically, this is typically achieved by maintaining a state database or index that records the archiving status of each block. Finally, every old transaction from all unarchived old blocks is retrieved.
[0063] S102, for each old transaction, execute the following: determine the necessary rate for confirming ownership of the old transaction based on the target market influence of the target data asset and the transaction correlation between the target data asset and the reference data asset. The target data asset is the data asset included in the old transaction, and the reference data asset is each data asset in the old block corresponding to the old transaction except for the target data asset.
[0064] In this embodiment, target market influence is used to assess the value of target data assets in the market. Target data assets are data assets contained in old transactions.
[0065] The reference data asset is the other data assets in the old block corresponding to the old exchange that is the target data asset, besides the target data asset.
[0066] Transaction correlation is used to characterize the degree of correlation between the target data asset and the reference data asset during the transaction process.
[0067] As an example, the server pre-sets a mechanism to assess the market influence of each data asset. Specifically, this involves collecting and analyzing external data sources, such as the number of mentions on social media and the frequency of transactions, to score each data asset and obtain its market influence.
[0068] Then, for each old transaction, the transaction correlation between its corresponding target data asset and reference data asset is calculated. Specifically, this can be achieved by analyzing factors such as transaction patterns, transacting parties, and timestamps. The calculation of transaction correlation can be based on statistical methods or machine learning algorithms.
[0069] Finally, for each old transaction, a predefined model or rule set is used to determine the necessity rate for confirming ownership of the old transaction, taking into account the target market influence of the target data asset and the transaction's relevance. The necessity rate can be a value between 0 and 1, representing the importance of the old transaction in confirming ownership of the data asset.
[0070] S103, determine the transaction filing rate corresponding to each old transaction based on the confirmation necessity rate of each old transaction.
[0071] In this embodiment, the transaction archiving rate is used to characterize the degree to which the corresponding old transactions need to be archived.
[0072] As an example, the server can set a threshold or a series of thresholds based on the necessity rate of transaction confirmation to determine whether a transaction should be archived. For instance, older transactions below a certain threshold may be assigned a lower transaction archiving rate, while older transactions above the threshold may be assigned a higher transaction archiving rate.
[0073] Among them, the transaction filing rate can be directly proportional to the necessary rate of confirmation of rights, or it can be obtained through a certain functional relationship to reflect the difference in filing priority among different old transactions.
[0074] S104: Based on the transaction archiving rate corresponding to each old transaction, perform archiving operations on old blocks that meet the target archiving conditions to complete the data storage of the target blockchain.
[0075] In this embodiment, the target archiving conditions can be set based on conditions such as the sum of the archiving rates of all old transactions in the old block and whether the average archiving rate of all old transactions in the old block reaches a certain threshold.
[0076] As an example, the server calculates the average archiving rate based on the archiving rate of each old transaction in the old block. Then, it determines whether the average archiving rate is greater than a preset threshold. If the average archiving rate is greater than the preset threshold, the server needs to execute the actual archiving process.
[0077] Specifically, this involves transferring the transaction data of each old transaction in the old block from the database of the target blockchain to the archive storage system, while updating the state database to reflect the archive status of these blocks.
[0078] As an optional embodiment, such as Figure 2 As shown, S102 may specifically include the following S201 to S203:
[0079] S201. Determine the target market influence of the target data asset based on the frequency of its appearance in the target blockchain and the corresponding first old transaction time.
[0080] S202, Based on the first block corresponding to the target data asset and the second block corresponding to the reference data asset, determine the transaction correlation between the target data asset and the reference data asset. The first block is the block where the target data asset transaction occurs, and the second block is the block where the reference data asset transaction occurs.
[0081] S203, determine the necessary rate for confirming ownership of old transactions based on the target market influence and transaction relevance.
[0082] In this embodiment, the first old transaction time is used to characterize the transaction time corresponding to each old transaction containing the target data asset.
[0083] The first block represents the block corresponding to the old exchange where the target data asset appeared, and the second block represents the block corresponding to the old exchange where the reference data asset appeared. For example, if the old transactions in blocks 1, 3, and 5 all contain the target data asset, then blocks 1, 3, and 5 belong to the first block; if the old transactions in blocks 2, 4, and 6 all contain the reference data asset, then blocks 2, 4, and 6 belong to the second block.
[0084] As an example, the server retrieves all old transaction records containing the target data asset from the target blockchain and counts the frequency of the target data asset's appearance in the target blockchain. Simultaneously, it records the first old transaction time corresponding to each old transaction containing the target data asset. Combining the frequency of appearance and the first old transaction time, algorithms (such as time series analysis, exponential smoothing, etc.) are used to assess the market activity of the target data asset, thereby determining its target market influence.
[0085] Then, based on the first block corresponding to the target data asset and the second block corresponding to the reference data asset, the overlapping blocks between the first and second blocks are counted. Finally, based on the number of overlapping blocks, the transaction correlation between the target data asset and the reference data asset is assessed.
[0086] Finally, a weighting scheme is set up to calculate the necessary rate of ownership confirmation for the old transactions corresponding to the target data assets based on the scores of target market influence and transaction relevance.
[0087] This embodiment allows for an accurate assessment of the necessity rate for confirming ownership of old transactions based on the target market influence of the target data asset and the transaction correlation between the target data asset and reference data assets. This facilitates the subsequent evaluation of the ownership value of old blocks based on the necessity rate of confirming ownership of old transactions, thereby improving the rationality of data storage on blockchain nodes.
[0088] As an optional embodiment, S201 may specifically include:
[0089] Based on the first old transaction time of the target data asset in the target blockchain, determine the first interval duration between adjacent first old transaction times;
[0090] By utilizing the duration of each first interval and the frequency of occurrence of the target data asset in the target blockchain, the target market influence of the target data asset is determined.
[0091] In this embodiment, the first interval duration is used to characterize the interval duration between adjacent first old transaction times.
[0092] For data assets on the blockchain, liquidity is an important indicator of their market influence. Data assets that are traded frequently tend to have higher liquidity, which means that the data asset can be bought and sold quickly, and the market price reacts more rapidly to changes in supply and demand. Therefore, the more frequently a data asset appears, the higher its market influence.
[0093] Building on this, if frequently traded data assets exhibit uneven distribution of trading time, it further indicates a high level of market attention towards that asset. Specifically, the uneven variation in trading time may be closely related to specific market factors, such as market fluctuations, major news events, policy changes, or technological breakthroughs. These factors may cause market participants to concentrate their trading at different times, resulting in dramatic fluctuations in trading volume within a short period (i.e., a high degree of unevenness in the trading time of data assets), demonstrating significant market influence.
[0094] Therefore, the target market influence of the target data asset can be specifically determined using the following formula 1:
[0095]
[0096] In Formula 1, X i m is used to characterize the market influence of the i-th data asset. i T is used to represent the total number of times the i-th data asset appears in the target blockchain. i,t+1 T is used to characterize the first old transaction time corresponding to the (t+1)th occurrence of the i-th data asset in the target blockchain. i,t The first old transaction time is used to characterize the first old transaction time corresponding to the tth occurrence of the i-th data asset in the target blockchain, and μ is used to characterize the average duration of the first interval between each adjacent first old transaction time.
[0097] Among them, (T) i,t+1 ―T i,t This is used to characterize the duration of the first interval between adjacent first old transaction times. This value is used to characterize the unevenness of transaction time variations for all data assets (i-th data assets) appearing on the target blockchain. A larger value indicates stronger unevenness, meaning a greater market influence for the i-th data asset. The total number of times the i-th data asset appears in the target blockchain is m. i The larger the value, the more frequently the i-th data asset appears, and the greater its market influence.
[0098] This embodiment allows for an accurate assessment of the target market influence of a data asset by analyzing its frequency of occurrence within the target blockchain and the corresponding first old transaction time. This facilitates the subsequent determination of the necessity rate for confirming ownership of old transactions based on the target market influence, thereby improving the rationality of data storage on blockchain nodes.
[0099] As an optional embodiment, S202 may specifically include:
[0100] Based on the first block and the second block, determine the overlapping blocks between the first block and the second block;
[0101] The transaction correlation between the target data asset and the reference data asset is determined by using the first quantity of the first block, the second quantity of the second block, and the overlap of the overlapping blocks.
[0102] In this embodiment, overlapping blocks are used to represent the same blocks between the first block and the second block, that is, blocks that simultaneously include the target data asset and the reference data asset.
[0103] In a blockchain, blocks are packaged and generated and verified by validators. Each block contains multiple transactions, which can involve various data assets. If two data assets frequently appear in the same block, it means they have a high probability of being traded together on the blockchain. Typically, transactions involving these two data assets will be selected by validators and packaged into the same block within a certain time frame, indicating a concentration of transaction activity for these two data assets. In other words, there may be a certain correlation between their transaction activities.
[0104] Therefore, the transaction correlation between the target data asset and the reference data asset can be specifically determined using the following formula 2:
[0105]
[0106] In Formula 2, Z (i,j) s is used to characterize the transaction correlation between the i-th data asset and the j-th data asset. i s is used to represent the first number of the first block in which the i-th data asset appears. j s is used to characterize the second number of second blocks that have appeared in the j-th data asset. (i,j) This is used to characterize the number of overlapping blocks where the i-th data asset and the j-th data asset appear simultaneously.
[0107] in, The larger the value, the higher the frequency of the co-occurrence of the i-th data asset and the j-th data asset, and the greater the transaction correlation between the i-th data asset and the j-th data asset.
[0108] This embodiment allows for an accurate assessment of the transaction correlation between the target data asset and the reference data asset based on the first block corresponding to the target data asset and the second block corresponding to the reference data asset. This helps determine the necessity rate of confirming ownership of old transactions based on the transaction correlation, thereby improving the rationality of data storage in blockchain nodes.
[0109] As an optional embodiment, S203 may specifically include:
[0110] Based on the transaction correlation between the target data asset and each reference data asset, and the reference market influence of each reference data asset, the degree of interference of each reference data asset with the confirmation of rights of the target data asset is determined.
[0111] By utilizing the degree of interference of each reference data asset in the confirmation of rights to the target data asset, and the target market influence of the target data asset, the necessity rate for confirming rights to the old transaction is determined.
[0112] In this embodiment, the degree of interference in the confirmation of rights is used to characterize the extent to which the reference data asset interferes with the confirmation of rights value of the target data asset.
[0113] In blockchain, if a data asset has a high market influence, it usually means that its trading activities are frequent, it involves many stakeholders, and its value is high. In order to ensure the legality of the data asset and prevent abuse or erroneous transactions, the necessity of confirming its ownership is relatively high.
[0114] However, a single block typically contains multiple transaction records, which may involve different data assets. Although the ownership of each data asset is independent, the ownership of other data assets within the same block can also affect the ownership of that data asset. If the transaction records of other data assets in the block are highly correlated with the target digital asset, then the necessity for ownership of the other data assets can be supplemented by the mutual influence of certain market rules and mechanisms.
[0115] Therefore, the necessary rate for confirming ownership of the old transactions corresponding to the target data asset can be determined using the following formula 3:
[0116]
[0117] In formula 3, Used to characterize the necessary rate of ownership confirmation for the u-th old transaction in the A-th unarchived old block. n is used to characterize the target market influence of the target data asset in the u-th old transaction within the A-th unarchived old block. A Used to represent the number of old transactions in the Ath old block that has not been archived. This is used to characterize the transaction correlation between the target data asset in the u-th old transaction of the A-th unarchived old block and the reference data asset in the v-th old transaction of the A-th unarchived old block. The reference market influence of the reference data asset in the vth old transaction within the Ath old block that is not archived.
[0118] in, Used to characterize the reference data asset in the v-th old transaction of the A-th old block that is not archived, and to represent the degree of interference in the confirmation of ownership of the target data asset in the u-th transaction of the A-th old block that is not archived; This value represents the average degree of interference with the confirmation of ownership of the target data asset in the u-th transaction of the unarchived old block, as indicated by the reference data assets in each old transaction of the unarchived old block. A larger value indicates a greater degree of interference with the confirmation of ownership of the target data asset, and consequently, a smaller necessity rate for confirming ownership of the old transaction corresponding to the target data asset.
[0119] This embodiment utilizes the target market influence of the target data asset and the transaction correlation between the target data asset and the reference data asset to accurately assess the necessity rate of confirming ownership of old transactions. This helps in subsequently assessing the ownership value of old blocks based on the necessity rate of confirming ownership of old transactions. Therefore, storing blockchain node data based on the ownership value of old blocks improves the rationality of blockchain node data storage.
[0120] As an optional embodiment, such as Figure 3 As shown, S103 may specifically include the following S301 to S303:
[0121] S301, Based on the transaction correlation between the new data asset corresponding to each new transaction in the new block and the target data asset, determine the archiving impact of each new transaction on the old transactions;
[0122] S302, for each new transaction, perform the following separately: determine the local archiving rate of the old transaction under the influence of the new transaction based on the new transaction's ownership necessity rate, the new transaction's impact on the archiving of the old transaction, and the old transaction's ownership necessity rate;
[0123] S303, using the local filing rate of old transactions under the influence of each new transaction, determine the transaction filing rate corresponding to the old transaction.
[0124] In this embodiment, the archiving impact is used to characterize the potential impact of a new transaction on the archiving of an old transaction, and the local archiving rate is used to characterize the archiving rate of an old transaction considering the impact of a single new transaction.
[0125] As an example, the server determines the transaction correlation degree between the new data asset corresponding to each new transaction in the new block and the target data asset according to the transaction correlation degree calculation method disclosed in the above embodiments of the present invention. After determining the transaction correlation degree, the server determines the archiving impact of each new transaction on the old transactions according to a preset algorithm or model.
[0126] Then, the server determines the ownership necessity rate of each new transaction according to the ownership necessity rate calculation method disclosed in the above embodiments of the present invention. Based on the ownership necessity rate of the new transaction, the archiving impact of the new transaction on the old transaction, and the ownership necessity rate of the old transaction, the server calculates the local archiving rate of the old transaction under the influence of the new transaction according to a preset algorithm or model.
[0127] Finally, the local filing rates of old transactions under the influence of all relevant new transactions are summarized to obtain the transaction filing rate corresponding to the old transactions. Specifically, multiple local filing rates can be weighted averaged, summed, or processed in other ways.
[0128] For example, the transaction archiving rate corresponding to the old transaction can be determined using the following formula 4:
[0129]
[0130] In formula 4, n is used to characterize the archiving rate of the g-th old transaction in the A-th unarchived old block. O Used to represent the number of new transactions in new block O. X O―h Used to characterize the market influence of the data asset in the h-th new transaction in new block O. This is used to characterize the local archiving rate of the g-th old transaction in the A-th old block that was not archived, under the influence of the h-th new transaction in the new block O.
[0131] Each new transaction in a new block affects the archiving rate of each old transaction in the unarchived old blocks, but the degree of impact varies among the new transactions in the new block. New transactions with high market influence are usually related to important data assets, participants, or industry events, and these new transactions have a greater impact. Therefore, new transactions with high market influence usually require a higher weight in calculating the archiving rate of the old transactions.
[0132] This embodiment, after obtaining the necessary rate for confirming ownership of old transactions, further considers the impact of new transactions in the new block on the transaction archiving rate of old transactions. This allows for a more accurate calculation of the transaction archiving rate of old transactions, improving the overall accuracy of the calculation.
[0133] As an optional embodiment, S301 may specifically include:
[0134] The second interval duration between the second old transaction time and the new transaction time is determined based on the second old transaction time of the old transaction and the new transaction time of the new transaction.
[0135] By utilizing the transaction correlation between the new data assets corresponding to the new transaction and the target data assets, as well as the second interval duration, the archiving impact of the new transaction on the old transaction is determined.
[0136] In this embodiment, the second old transaction time is used to characterize the transaction time corresponding to the old transaction for which the transaction archiving rate needs to be calculated.
[0137] In the process of establishing enterprise data asset ownership based on blockchain, whenever a new block is added to the chain, the data asset transaction records in the block can lead to changes in the ownership of some data assets. At this point, it is necessary to assess the archiving impact of each transaction in the new block on the transaction records in the unarchived old blocks. Generally speaking, the higher the correlation between the data assets involved in new transactions in the newly added block and the data assets involved in old transactions in the unarchived old blocks, the greater the likelihood of changes in the ownership of the corresponding data assets in the old transactions in the unarchived old blocks; in other words, the higher the archiving impact.
[0138] Furthermore, given the high degree of correlation, since each transaction is typically based on some previous transaction or data, the correlation between transactions may become increasingly close over time, with subsequent transactions often depending on the previous one. Therefore, if the new transaction's new time is close to the second oldest transaction time of an older transaction, the relationship between the transactions may be even closer, resulting in a stronger archiving impact.
[0139] Therefore, the impact of a new transaction on the archiving of old transactions can be determined using the following formula 5:
[0140]
[0141] In formula 5, This is used to characterize the impact of the h-th new transaction in new block O on the archiving of the g-th old transaction in the A-th old block that has not yet been archived. T is used to characterize the transaction correlation between the new data asset of the h-th new transaction in the new block O and the target data asset of the g-th old transaction in the A-th unarchived old block. O―h Used to characterize the new transaction time of the h-th new transaction in the new block O. The time of the second oldest transaction is used to represent the g-th oldest transaction in the A-th old block that has not been archived. ε is used to represent a preset non-zero constant value to avoid the denominator being zero.
[0142] in, This value is used to characterize the second interval between the second old transaction time and the new transaction time. The smaller the value, the closer the new transaction time is to the second old transaction time of the old transaction. The relationship between the transactions may be closer, resulting in a stronger archiving impact.
[0143] This embodiment utilizes the transaction correlation between the new data asset corresponding to the new transaction and the target data asset, as well as the second interval between the second old transaction time and the new transaction time, to accurately assess the archiving impact of the new transaction on the old transaction. This helps to accurately calculate the transaction archiving rate of the old transaction based on the archiving impact of the new transaction, thereby improving the accuracy of the transaction archiving rate calculation.
[0144] As an optional embodiment, S302 may specifically include:
[0145] The difference in the necessity rate between the new transaction's necessity rate and the old transaction's necessity rate is normalized using a normalization function to obtain the normalized result.
[0146] By utilizing the impact of new transactions on the archiving of old transactions and the normalization results, the local archiving rate of old transactions under the influence of new transactions is determined.
[0147] In this embodiment, the local archiving rate of old transactions under the influence of new transactions can be determined using the following formula 6:
[0148]
[0149] In formula 6, This is used to characterize the local archiving rate of the g-th old transaction in the A-th old block that has not been archived, under the influence of the h-th new transaction in the new block O. q is used to characterize the impact of the h-th new transaction in new block O on the archiving of the g-th old transaction in the A-th unarchived old block. O―h Used to characterize the necessary rate of ownership confirmation for the h-th new transaction in new block O. f is used to characterize the necessary rate of ownership of the g-th old transaction in the A-th old block that has not been archived, and f is used to characterize the maximum and minimum value normalization function.
[0150] in, The larger the value, the greater the difference between the ownership necessity rate of the h-th new transaction in the new block O and the ownership necessity rate of the g-th old transaction in the unarchived A-th old block. In this case, the greater the local archiving rate of the g-th old transaction in the unarchived A-th old block under the influence of the h-th new transaction in the new block O.
[0151] This embodiment allows for the accurate calculation of the partial archiving rate of old transactions under the influence of new transactions, based on the necessity rate of new transaction confirmation, the impact of new transactions on the archiving of old transactions, and the necessity rate of old transactions confirmation. This helps to determine the transaction archiving rate of old transactions based on their partial archiving rate under the influence of new transactions, thereby improving the rationality of data storage in blockchain nodes.
[0152] As an optional embodiment, S104 may specifically include:
[0153] Based on the transaction archiving rate corresponding to each old transaction, the block archiving rate of each old block is determined;
[0154] If the old block archiving rate is greater than the preset archiving rate threshold, the old block will be archived.
[0155] In this embodiment, the block archiving rate of old blocks can be specifically determined by the following formula 7:
[0156]
[0157] In Formula 7, G A The block archiving rate is used to characterize the Ath unarchived old block. n is used to characterize the archiving rate of the g-th old transaction in the A-th unarchived old block. A The number of old transactions in the Ath unarchived old block is used to represent the number of old transactions, and f is used to represent the maximum and minimum value normalization function.
[0158] After obtaining the block archiving rate of the old blocks, for unarchived old blocks with an archiving rate greater than 0.8, the server will store this data on cheaper storage devices or decentralized storage to optimize storage. The blockchain will not directly retain this large amount of data; instead, it will store their summaries (such as hash values). This approach effectively reduces the storage burden on the blockchain and avoids directly occupying expensive blockchain space by storing data with high block archiving rates in cheaper or more efficient storage facilities, ultimately completing the archiving process.
[0159] This embodiment accurately assesses the ownership value of each old transaction based on its corresponding transaction archiving rate. This allows for more effective archiving of old blocks with lower ownership value, retaining only those with higher ownership value, thus improving the rationality of data storage on blockchain nodes.
[0160] Based on a blockchain node data storage method, this invention also provides specific embodiments of a blockchain node data storage system.
[0161] Figure 4 A schematic diagram of a blockchain node data storage system is provided. The blockchain node data storage system 400 includes a transaction acquisition module 410, a transaction analysis module 420, an archiving rate determination module 430, and a block archiving module 440.
[0162] The transaction acquisition module 410 is used to acquire each old transaction in the unarchived old block when a new block is formed in the target blockchain.
[0163] The transaction analysis module 420 is used to perform the following for each old transaction: determine the necessary rate of confirmation of rights for the old transaction based on the target market influence of the target data asset and the transaction correlation between the target data asset and the reference data asset. The target data asset is the data asset included in the old transaction, and the reference data asset is each data asset in the old block corresponding to the old transaction except for the target data asset.
[0164] The archiving rate determination module 430 is used to determine the transaction archiving rate corresponding to each old transaction based on the confirmation necessity rate of each old transaction.
[0165] The block archiving module 440 is used to perform archiving operations on old blocks that meet the target archiving conditions based on the transaction archiving rate corresponding to each old transaction, so as to complete the data storage of the target blockchain.
[0166] In the blockchain node data storage system provided by this invention, for each old transaction in an unarchived old block, the necessity rate for confirming ownership of the old transaction is determined based on the target market influence of the target data asset contained in the old transaction and the transaction correlation between the target data asset and the reference data asset. Thus, based on the necessity rate of confirming ownership of the old transactions, the ownership value of each old transaction is reasonably assessed. Finally, based on the transaction archiving rate corresponding to each old transaction, archiving operations are performed on old blocks that meet the target archiving conditions. Therefore, by accurately assessing the ownership value of each old transaction, this invention can more effectively archive old blocks with low ownership value, retaining only old blocks with high ownership value, thereby improving the rationality of blockchain node data storage.
[0167] It should be clarified that the present invention is not limited to the specific configurations and processes described above and shown in the figures. For the sake of brevity, detailed descriptions of known methods are omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present invention is not limited to the specific steps described and shown. Those skilled in the art can make various changes, modifications, and additions, or change the order of steps, after understanding the spirit of the present invention.
[0168] It should also be noted that the exemplary embodiments mentioned in this invention describe methods or systems based on a series of steps or apparatus. However, this invention is not limited to the order of the steps described above; that is, the steps can be performed in the order mentioned in the embodiments, or in a different order, or several steps can be performed simultaneously.
[0169] The above description is merely a specific embodiment of the present invention. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, modules, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here. It should be understood that the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in the present invention, and these modifications or substitutions should all be covered within the protection scope of the present invention.
Claims
1. A method for storing data in blockchain nodes, characterized in that, The method includes: If a new block is formed on the target blockchain, retrieve each old transaction from the unarchived old block; For each of the old transactions, the following steps are performed: Based on the target market influence of the target data asset and the transaction correlation between the target data asset and the reference data asset, the necessary rate for confirming the rights of the old transaction is determined. The target data asset is the data asset included in the old transaction, and the reference data asset is each of the data assets in the old block corresponding to the old transaction except for the target data asset. Based on the necessary rate for confirming rights for each of the old transactions, the corresponding transaction filing rate for each of the old transactions is determined respectively; Based on the transaction archiving rate corresponding to each of the old transactions, an archiving operation is performed on the old blocks that meet the target archiving conditions, so as to complete the data storage of the target blockchain; The step of determining the transaction archiving rate corresponding to each of the old transactions based on the necessary confirmation rate of each old transaction includes: Based on the transaction correlation between the new data asset corresponding to each new transaction in the new block and the target data asset, determine the archiving impact of each new transaction on the old transaction; For each new transaction, the following steps are performed: Based on the new transaction's ownership necessity rate, the new transaction's impact on the archiving of the old transaction, and the old transaction's ownership necessity rate, determine the local archiving rate of the old transaction under the influence of the new transaction; By utilizing the local archiving rate of the old transaction under the influence of each new transaction, the transaction archiving rate corresponding to the old transaction is determined; The step of performing archiving operations on old blocks that meet the target archiving conditions based on the transaction archiving rate corresponding to each of the old transactions includes: Based on the transaction archiving rate corresponding to each of the old transactions, the block archiving rate of each of the old blocks is determined; If the old block's archiving rate is greater than a preset archiving rate threshold, an archiving operation is performed on the old block.
2. The blockchain node data storage method according to claim 1, characterized in that, The determination of the necessary ownership rate for the old transaction based on the target market influence of the target data asset and the transaction correlation between the target data asset and the reference data asset includes: The target market influence of the target data asset is determined based on the frequency of its appearance in the target blockchain and the corresponding first old transaction time. Based on the first block corresponding to the target data asset and the second block corresponding to the reference data asset, the transaction correlation between the target data asset and the reference data asset is determined, wherein the first block is the block in which the transaction of the target data asset occurs, and the second block is the block in which the transaction of the reference data asset occurs. The necessary rate for confirming ownership of the old transaction is determined based on the target market influence and the transaction relevance.
3. The blockchain node data storage method according to claim 2, characterized in that, The step of determining the target market influence of the target data asset based on its frequency of occurrence in the target blockchain and the corresponding first old transaction time includes: Based on the first old transaction time of the target data asset in the target blockchain, determine the first interval duration between adjacent first old transaction times; The target market influence of the target data asset is determined by using the duration of each of the first intervals and the frequency of occurrence of the target data asset in the target blockchain.
4. The blockchain node data storage method according to claim 2, characterized in that, The step of determining the transaction correlation between the target data asset and the reference data asset based on the first block corresponding to the target data asset and the second block corresponding to the reference data asset includes: Based on the first block and the second block, determine the overlapping block between the first block and the second block; The transaction correlation between the target data asset and the reference data asset is determined by using the first quantity of the first block, the second quantity of the second block, and the overlap of the overlapping blocks.
5. The blockchain node data storage method according to claim 2, characterized in that, The determination of the necessary rate for confirming ownership of the old transaction based on the target market influence and the transaction relevance includes: Based on the transaction correlation between the target data asset and each of the reference data assets, and the reference market influence of each of the reference data assets, the degree of interference of each of the reference data assets with the confirmation of rights of the target data asset is determined respectively. The necessary rate for confirming ownership of the old transaction is determined by using the degree of interference of each of the reference data assets in the confirmation of ownership of the target data asset, and the target market influence of the target data asset.
6. The blockchain node data storage method according to claim 1, characterized in that, The step of determining the archiving impact of each new transaction on the old transactions based on the transaction correlation between the new data asset corresponding to each new transaction in the new block and the target data asset includes: Based on the second old transaction time of the old transaction and the new transaction time of the new transaction, determine the second interval duration between the second old transaction time and the new transaction time; The impact of the new transaction on the archiving of the old transaction is determined by using the transaction correlation between the new data asset corresponding to the new transaction and the target data asset, as well as the second interval duration.
7. The blockchain node data storage method according to claim 1, characterized in that, The step of determining the local archiving rate of the old transaction under the influence of the new transaction based on the new transaction's ownership necessity rate, the new transaction's impact on the archiving of the old transaction, and the old transaction's ownership necessity rate includes: The difference in the necessity rate between the new transaction's necessity rate and the old transaction's necessity rate is normalized using a normalization function to obtain the normalized result. By utilizing the archiving impact of the new transaction on the old transaction and the normalization result, the local archiving rate of the old transaction under the influence of the new transaction is determined.
8. A blockchain node data storage system, characterized in that, The system includes: The transaction acquisition module is used to acquire each old transaction in the unarchived old block when a new block is formed on the target blockchain. The transaction analysis module is used to perform the following for each of the old transactions: determine the confirmation necessity rate of the old transaction based on the target market influence of the target data asset and the transaction correlation between the target data asset and the reference data asset. The target data asset is the data asset included in the old transaction, and the reference data asset is each of the data assets in the old block corresponding to the old transaction except for the target data asset. The archiving rate determination module is used to determine the transaction archiving rate corresponding to each of the old transactions based on the confirmation necessity rate of each of the old transactions. The block archiving module is used to perform archiving operations on the old blocks that meet the target archiving conditions based on the transaction archiving rate corresponding to each old transaction, so as to complete the data storage of the target blockchain; The step of determining the transaction archiving rate corresponding to each of the old transactions based on the necessary confirmation rate of each old transaction includes: Based on the transaction correlation between the new data asset corresponding to each new transaction in the new block and the target data asset, determine the archiving impact of each new transaction on the old transaction; For each new transaction, the following steps are performed: Based on the new transaction's ownership necessity rate, the new transaction's impact on the archiving of the old transaction, and the old transaction's ownership necessity rate, determine the local archiving rate of the old transaction under the influence of the new transaction; By utilizing the local archiving rate of the old transaction under the influence of each new transaction, the transaction archiving rate corresponding to the old transaction is determined; The step of performing archiving operations on old blocks that meet the target archiving conditions based on the transaction archiving rate corresponding to each of the old transactions includes: Based on the transaction archiving rate corresponding to each of the old transactions, the block archiving rate of each of the old blocks is determined; If the old block's archiving rate is greater than a preset archiving rate threshold, an archiving operation is performed on the old block.
Citation Information
Patent Citations
Method for improving network access speed of block chain
CN108874512A
Data archiving processing method, apparatus, device and storage medium for block chain
CN109298835A