A method, device and storage medium for distributed heterogeneous storage of data elements
By using hot and cold sensing-based incremental asset storage and erasure coding sharding storage mechanisms, combined with blockchain verification mechanisms, the management and circulation of data elements in heterogeneous environments are solved, achieving efficient and secure data storage and circulation.
Patent Information
- Application Number
- CN202410130324.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-29
- Publication Date
- 2024-11-05
- Estimated Expiration
- 2044-01-29
AI Technical Summary
Data elements in information systems suffer from problems such as complex composition, diverse modes, scattered distribution, and heterogeneous storage media, leading to untrusted data circulation, low collaboration capabilities, and excessively high read and write overhead due to the excessive depth of the blockchain state tree.
It adopts an asset incremental storage mechanism based on hot and cold sensing and a minimum redundancy sharding storage mechanism based on erasure coding, combined with a two-way anchoring verification mechanism of library-chain fusion, to realize the rapid circulation and storage of data element ownership, status and attributes through blockchain, use hash commitment to anchor on-chain and off-chain data, and optimize storage through erasure coding to establish a distributed database.
It enables unified management and efficient circulation of data elements in a distributed heterogeneous environment, reduces read and write overhead, improves storage performance and privacy security, and ensures the immutability and controllable use of data.
Smart Images

Figure CN118012868B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of blockchain distributed storage, and in particular to a method, device and storage medium for distributed heterogeneous storage of data elements. Background Art
[0002] As a new type of production factor, data may bring about a huge revolution in traditional production methods. The storage of data elements in information systems has problems such as complex structure, diverse modes, decentralized distribution, and heterogeneous storage media. First, data elements are usually composed of several parts such as ownership, status, and content. Each part exhibits different characteristics and requires different technologies for control and management; second, the data of each part usually exists in different modes. For example, ownership and status are structured data, and the content additionally contains some multimodal data such as text, pictures, and videos; different data elements, or even different parts of the same data element, usually have different sources and may be managed by different rights-related parties. They are physically distributed in a decentralized manner and located in different types of storage media. The storage media are obviously heterogeneous, which directly affects the existence and use of data elements. In short, data elements lack a unified storage model for distributed heterogeneous environments, which seriously affects the unified and efficient circulation and value of data elements.
[0003] For the ownership, status, structured content and other data in the data elements, they are abstracted as data assets. Multiple databases managed by different institutions involved in the collaborative management and circulation of data assets may have inconsistencies, or the database centers cannot trust each other's data or data behavior, which makes the database cluster's collaboration ability low and the data circulation untrustworthy. In order to solve this problem, blockchain technology is used to achieve rapid storage of data element ownership, status, and attributes, bringing decentralization, immutability, and traceability to the data elements of distributed databases, which can ensure the credibility of data. Among them, the blockchain uses a state tree to store data assets. User entities and assets have independent account addresses. When assets are accumulated, the depth of the state tree is too high, and there may be a problem of excessive read and write overhead, resulting in inefficient data asset circulation. Summary of the invention
[0004] In order to solve the above technical problems or at least partially solve the above technical problems, the present invention provides a distributed heterogeneous storage method, device and storage medium for data elements.
[0005] In a first aspect, the present invention provides a data element distributed heterogeneous storage method, comprising: establishing a data asset storage model including an asset incremental storage mechanism based on cold and hot perception and a minimum redundancy shard storage mechanism based on erasure code, wherein the asset incremental storage mechanism based on cold and hot perception realizes the circulation and storage of data element ownership, status, and attributes through an incremental state tree for active users in a blockchain; the minimum redundancy shard storage mechanism based on erasure code uses hash commitments to anchor the data element representation on the chain with the data element content off the chain, and uses erasure code placement optimization technology to shard the content data of the data element with minimum redundancy;
[0006] Establish a data resource storage model; wherein the data resource storage model includes: hashing the multimodal data; uploading the information including the hash, physical address, authorization status, usage method, and usage record of the multimodal data to the chain through a multi-center oracle, and storing the multimodal data locally in the database storage node;
[0007] A two-way anchor verification mechanism for library-chain integration is established to ensure that the ownership and status of on-chain data assets are consistent and verifiable with the actual use and circulation of off-chain data resources, thus achieving controllable use of data and privacy security.
[0008] Furthermore, the asset incremental storage mechanism based on cold and hot perception includes:
[0009] During the state transition process, obtain the list of transactions executed in the current pre-generated block, divide the accounts whose states have changed into active and inactive groups according to their current activity, and store them after sorting them according to the account addresses;
[0010] For accounts whose status changes after executing transactions, recalculate the account activity for subsequent account classification and update of their status;
[0011] Accounts whose status has changed in the current block are inserted into groups concurrently. If they are active accounts, they are inserted in the form of incremental branches of the state tree to generate the state root of the active account in the current block; if they are inactive accounts, they are inserted in the form of Merkle prefix trees to generate the state root of the inactive account;
[0012] Hash the state roots of active accounts and inactive accounts generated by the current block to obtain the global state root, which is then stored in the block header.
[0013] Compare the account activity with the account activity table and update the account activity table.
[0014] Furthermore, each node maintains the active account table as a basis for account classification, and the active account table structure includes account addresses and account activity; if after the execution of transactions within the block, no account activity exceeds the minimum activity in the current active account table, the accounts in the active account table are unchanged, and only the activity of some accounts needs to be updated; if after the execution of transactions within the block, the activity of accounts exceeds the minimum activity in the current active account table, the account information in the active account table is reordered according to the activity and updated.
[0015] Furthermore, the active account table is composed of the addresses and activity levels of accounts whose activity levels account for a set proportion of the total number of accounts.
[0016] Furthermore, the minimum redundant shard storage mechanism based on erasure coding includes:
[0017] According to the size of the asset data, the data elements are split into K data blocks; "0" is filled at the end of the smaller data blocks to align the data length; the K data blocks are encoded using erasure codes to form M check blocks; the K data blocks and M check blocks are divided into m groups, and it is assumed that each asset data requires m database storage nodes to store, and each database storage node stores x=(K+M) / m blocks; each database storage node is mapped to a position in the distributed hash table through the same hash algorithm to form a ring storage structure; for each group of blocks of each data, the hash value is calculated to obtain the mapping position of the block on the ring storage structure.
[0018] Furthermore, the hash value of each block of each data element is calculated, and the mapping position on the ring is obtained according to the hash value. From this position forward, the first database storage node encountered is the database storage node of the first data block in the block, and starting from this position, the nearest x-1 nodes are selected clockwise to store the remaining x-1 data blocks of the block.
[0019] Furthermore, the two-way anchor verification mechanism of the library chain fusion includes:
[0020] The user initiates a request to the multi-center oracle to obtain the off-chain data resources of other users; the multi-center oracle checks whether the anchoring structure in the data resource storage is consistent with the data asset storage; wherein, the anchoring structure includes the hash and physical address of the multimodal data; if they are consistent, the central oracle checks the authorization status and usage of the data assets stored on the chain, and uses the record data to determine whether the user requesting the data asset is authorized to use the data asset. If authorized, the data asset is returned to the user; if not authorized, the user's request is rejected; if they are inconsistent, the data is modified.
[0021] Furthermore, when the multimodal data in the data resource storage model needs to be changed, information including the hash, physical address, authorization status, usage method, and usage record of the changed multimodal data will be stored on the blockchain to ensure that the data resource storage is consistent with the anchoring structure in the data asset storage.
[0022] In a second aspect, the present invention provides a distributed heterogeneous storage device for data elements, comprising: at least one processing unit, the processing unit being connected to a storage unit via a bus unit, the storage unit storing a computer program, and when the computer program is executed by the processing unit, the distributed heterogeneous storage method for data elements is implemented.
[0023] The present invention provides a computer-readable storage medium, which stores a computer program, and is characterized in that when the computer program is executed by a processor, the distributed heterogeneous storage method of data elements is implemented.
[0024] The above technical solution provided by the embodiment of the present invention has the following advantages compared with the prior art:
[0025] The present invention establishes a data asset storage model including an asset incremental storage mechanism based on hot and cold perception and a minimum redundancy shard storage mechanism based on erasure codes, establishes a data resource storage model, and establishes a two-way anchor verification mechanism for library-chain fusion. Among them, the data asset storage model is based on the asset incremental storage mechanism based on hot and cold perception, and realizes the convenient circulation and rapid storage of data element ownership, status, and attributes through the incremental state tree for active users in the blockchain; and the data asset storage model is mainly based on the minimum redundancy shard storage mechanism of erasure codes, using hash commitments to anchor the data element representation on the chain with the data element content under the chain, and using placement optimization technologies such as erasure codes to shard the content data of the data elements with minimum redundancy to ensure that the data elements cannot be tampered with, respond quickly, and save storage. The data resource storage model establishes a distributed database for large-capacity, multi-modal, and multi-privacy-level data element content data that needs to be kept independently, ensuring multi-party collaboration among owners, service providers, and users of such data; the two-way anchor verification mechanism integrated with the library chain ensures that the ownership and status of on-chain data assets are consistent and verifiable with the actual use and circulation of off-chain data resources, thereby achieving controllable use of data and privacy security.
[0026] The present invention effectively solves the problems of data consistency and credibility when data elements are collaboratively managed by multiple database centers of different institutions. The present invention solves the problems of complex structure, dispersed distribution, diverse modalities, heterogeneous storage media, etc. of data elements in a distributed heterogeneous environment, and realizes unified management and efficient circulation of data elements. The data asset storage model of the present invention and its hot-cold-aware incremental asset storage mechanism realize convenient circulation and fast storage of data element ownership, status, and attributes, formulates an efficient incremental storage method for the accumulation of data assets, and reduces data reading and writing overhead; its minimum redundancy sharding storage mechanism based on erasure codes optimizes storage efficiency, reduces data storage space, and improves fault tolerance.
[0027] The data resource storage model of the present invention helps to meet the local management requirements of multimodal data or sensitive data in data elements, and at the same time achieves multi-party trusted collaboration among owners, service providers, and users. The two-way anchor verification mechanism of the library-chain fusion of the present invention ensures that the ownership and status of the on-chain data assets are consistent and verifiable with the actual use and circulation of the off-chain data resources, realizes the controllable use of data and privacy security, realizes the coordinated storage of data assets and data resource storage, and meets the unified management requirements of data elements.
[0028] This application integrates the library and chain, and has the ability to describe internal resources, such as the location, characteristics, and usage records of resources. Blockchain is used to record all behaviors in the network, and data usage is controlled according to the instructions in the blockchain. This controllable use and traceable management method ensures efficient use of data and privacy security. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0030] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0031] Figure 1 An architectural diagram of a method for distributed heterogeneous storage of data elements provided by an embodiment of the present invention;
[0032] Figure 2 A storage flow chart of an asset incremental storage mechanism based on cold and hot perception provided by an embodiment of the present invention;
[0033] Figure 3A storage flow chart of a minimum redundancy sharding storage mechanism based on erasure codes provided in an embodiment of the present invention;
[0034] Figure 4 An architectural diagram of a data resource storage model provided by an embodiment of the present invention;
[0035] Figure 5 A flowchart of a two-way anchor verification mechanism for library chain fusion provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0036] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0037] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.
[0038] The present invention proposes a distributed heterogeneous storage method for data elements, which is applied to the scenario where multiple database centers managed by different institutions constitute a distributed database cluster, and constructs a distributed heterogeneous storage framework that integrates databases and blockchains. The distributed heterogeneous storage framework that integrates databases and blockchains includes: data asset storage model, data resource storage model, and a two-way anchor verification mechanism that integrates databases and blockchains. It effectively solves the problems of complex structure, dispersed distribution, diverse modes, and heterogeneous storage media of data elements under the collaborative management requirements of multiple databases in different institutions, and achieves higher storage efficiency, usage efficiency, and privacy security for data elements.
[0039] like Figure 1 As shown, a distributed heterogeneous storage method for data elements proposed by the present invention includes:
[0040] A data asset storage model is established, including an asset incremental storage mechanism based on cold and hot perception and a minimum redundancy shard storage mechanism based on erasure codes. The asset incremental storage mechanism based on cold and hot perception realizes the convenient circulation and rapid storage of data element ownership, status, and attributes through the incremental state tree for active users in the blockchain. The minimum redundancy shard storage mechanism based on erasure codes uses hash commitments to anchor the data element representation on the chain with the data element content off the chain, and uses erasure code placement optimization technology to shard the content data of the data element with minimum redundancy, ensuring that the data elements cannot be tampered with, respond quickly, and save storage.
[0041] During the specific implementation process, see Figure 2 As shown, the asset incremental storage mechanism based on cold and hot perception includes:
[0042] S211, during the state transition process, obtain a list of transactions executed in the current pre-generated block, divide the accounts whose states have changed into two groups, active and inactive, according to their current activity, and store them after sorting them according to their account addresses;
[0043] S212, for accounts whose status has changed after executing a transaction, recalculate the account activity for subsequent classification of the account and update its status;
[0044] S213, insert the accounts whose status has changed in the current block into groups concurrently. If they are active accounts, proceed to step S214; if they are inactive accounts, proceed to step S215;
[0045] S214, insert in the form of incremental branch of the state tree to generate the state root of the active account of the current block, and proceed to step S216;
[0046] S215, insert in the form of Merkle prefix tree to generate the state root MPT_root of the inactive account, and proceed to step S216;
[0047] S216, performing a hash operation on the state root of the active account generated by the current block and the state root of the inactive account to obtain a global state root, and then storing the global state root in the block header;
[0048] S217, compare the activity of the account with the account activity table, and update the account activity table. If after the execution of the transaction in the block, no account activity exceeds the minimum activity in the current active account table, then the account in the active account table has not changed, and only some account activities need to be updated; if after the execution of the transaction in the block, the account activity exceeds the minimum activity in the current active account table, then the account information in the active account table needs to be updated and re-sorted according to activity.
[0049] Each node needs to maintain the active account table as the basis for account classification. The active account table structure includes account addresses and account activity. The active account table is composed of the addresses and activity of accounts whose activity accounts for a set proportion of the total number of accounts. An example ratio is 5% of the total number of accounts.
[0050] The present invention adds a global state root on the basis of the original node structure of the Merkel prefix tree. The newly added global state root is used to store the roots of the state tree branches constructed by active accounts and inactive accounts, that is, the Merkel prefix tree of the active account is created on the basis of the Merkel prefix tree, the root nodes of the two are hashed, a new global state root is generated, and the value of the global state root is stored in the blockchain header. Since in the blockchain, the state of the active account changes frequently, which will cause the Merkel prefix tree to be modified, the impact on the inactive account, in order to reduce the impact on the inactive account when the state of the active account changes frequently, when constructing the Merkel prefix tree, the account is distinguished according to the activity of the account. The complete asset management process is divided into continuous observation periods at specific time intervals. During each observation period, the active account is maintained in a consistent manner in an incremental tree organization mode to construct an active branch, and the inactive account continues to use the Merkel prefix tree update mode to construct the Merkel prefix tree branch of the inactive account. Under this organization mode, the state of the active account changes frequently, and only the incremental tree branch of the active account needs to be maintained, which reduces the number of branches that need to be maintained when the state is updated, and reduces the storage overhead. Moreover, compared with the original Merkle prefix tree, the branch tree of active accounts has fewer account nodes, and the depth of the generated tree branches is also smaller than the original Merkle prefix tree. Therefore, when the data elements of active accounts change, only the active account branch tree needs to be updated, which facilitates the circulation and rapid storage of data element ownership, status, and attributes.
[0051] During the specific implementation process, see Figure 3 As shown, the minimum redundant shard storage mechanism based on erasure coding includes:
[0052] S221, split the data elements into K data blocks according to the size of the asset data; it should be noted that after direct division, the size of each data block may be inconsistent.
[0053] S222, "0" is filled at the end of the smaller data block to align the data length; since each data block may be inconsistent in size after direct division, "0" is filled at the end of the smaller data block to align the data length.
[0054] S223, using erasure codes to encode the K data blocks to form M redundant code segments, namely, check blocks, which can be used to restore the original data segments to avoid loss or damage of the original data.
[0055] S224, divide the K data blocks and the M check blocks into m groups, configure m database storage nodes for one asset data, and one database storage node stores x=(K+M) / m blocks;
[0056] S225, each database storage node is mapped to a location in the distributed hash table DHT (Distributed Hash Table) through the same hash algorithm (hashing the IP address of the storage node) to form a ring storage structure. The ring storage structure space is divided into cache area. Each cache key is converted into a 32-bit binary number through a hash function, and all these binary numbers form a ring. Each database storage node is mapped to a position in the ring through the same hash algorithm, such as hashing the IP address of the database storage node for mapping.
[0057] S226, calculate the hash value of each block of each data element, obtain the mapping position on the ring storage structure, and from this position forward, the first database storage node encountered is the database storage node of the first data block in the block, and from this position, select the nearest x-1 nodes clockwise to store the remaining x-1 data blocks of the block. For example, if x = 6, the node closest to the data element is selected. Started by and its clockwise nodes , , , , These 6 nodes are used to store the data.
[0058] Establish a data resource storage model; among them, refer to Figure 4As shown, the data resource storage model includes: hashing the multimodal data; uploading the information including the hash, physical address, authorization, usage and usage record of the multimodal data to the blockchain through a multi-center oracle, and storing the multimodal data locally in the database storage node. Other users find the physical address of the multimodal data from the blockchain, and obtain the multimodal data from the database storage node where the multimodal data is located after authorization verification. This application establishes a distributed database for content data of large-capacity, multimodal and multi-privacy level data elements that need to be kept independently, to ensure multi-party collaboration between the owner, service provider and user of the data. When the multimodal data owner releases the asset, due to the limitation of the custody demand, the data resource itself is not uploaded to the blockchain, but the information including the hash, physical address, authorization, usage and usage record of the multimodal data is uploaded to the blockchain through a multi-center oracle, and the record is retained on the blockchain to ensure that the data cannot be tampered with. The multimodal data itself is still stored in the database storage node where the owner is located, so that the holders of many data elements form a distributed database. The hash, physical address, authorization status, usage method, and usage record information of multimodal data are all on the blockchain. When other users want to use any multimodal data, they can find the physical address of the multimodal data on the blockchain. After authorization verification, they can obtain the multimodal data from the database storage node where the data is located. Multimodal data exists locally in the database storage node, is not on the chain, and is not public. Other users who want to obtain the data need to pass authorization verification, which not only reduces the storage pressure of the blockchain, but also provides privacy protection for multimodal data.
[0059] Establish a two-way anchor verification mechanism for the integration of the library chain to ensure that the ownership and status of the on-chain data assets are consistent and verifiable with the actual use and circulation of the off-chain data resources, and realize the controllable use of data and privacy security. Figure 5 As shown, the bidirectional anchor verification mechanism of the library chain fusion includes:
[0060] S41, the user initiates a request to the multi-center oracle to obtain other users’ off-chain data resources;
[0061] S42, the multi-center oracle checks whether the anchoring structure in the data resource storage (database storage node) and the data asset storage (blockchain) is consistent. The anchoring structure contains the hash and physical address of the multimodal data, which can prevent the off-chain data from being tampered with. If they are consistent, go to step S43; if they are inconsistent, go to step S44;
[0062] S43, the central oracle will check the authorization status, usage mode and usage record data of the data asset stored on the chain to determine whether the user requesting the data asset is authorized to use the data asset. If authorized, proceed to step S45; if not, proceed to step S46;
[0063] S44, the anchor structure is inconsistent and the data is modified;
[0064] S45, returning the data assets to the user;
[0065] S46, reject the user request.
[0066] In addition, when the multimodal data in the data resource storage model needs to be changed, the hash, physical address, authorization status, usage method, and usage record of the changed multimodal data will be stored on the blockchain to ensure that the anchoring structure in the data resource storage (database storage node) and the data asset storage (blockchain) is consistent.
[0067] Example 2
[0068] An embodiment of the present invention provides a data element distributed heterogeneous storage device, comprising: at least one processing unit, the processing unit is connected to a storage unit via a bus unit, the storage unit is a computer-readable storage medium, and can be used to store software programs, computer executable programs, and modules, such as software programs, computer executable programs, and modules corresponding to a data element distributed heterogeneous storage method in an embodiment of the present invention, the processing unit implements the data element distributed heterogeneous storage method by running the software programs, computer executable programs, and modules stored in the storage unit, including;
[0069] Establish a data asset storage model that includes an asset incremental storage mechanism based on cold and hot perception and a minimum redundancy shard storage mechanism based on erasure codes, wherein the asset incremental storage mechanism based on cold and hot perception realizes the circulation and storage of data element ownership, status, and attributes through an incremental state tree for active users in the blockchain; the minimum redundancy shard storage mechanism based on erasure codes uses hash commitments to anchor the data element representation on the chain with the data element content off the chain, and uses erasure code placement optimization technology to shard the content data of the data element with minimum redundancy;
[0070] Establish a data resource storage model; wherein the data resource storage model includes: hashing the multimodal data; uploading the information including the hash, physical address, authorization status, usage method, and usage record of the multimodal data to the chain through a multi-center oracle, and storing the multimodal data locally in the database storage node;
[0071] A two-way anchor verification mechanism for library-chain integration is established to ensure that the ownership and status of on-chain data assets are consistent and verifiable with the actual use and circulation of off-chain data resources, thus achieving controllable use of data and privacy security.
[0072] Of course, the computer program stored in the storage unit of a data element distributed heterogeneous storage device provided by an embodiment of the present invention is not limited to the method operations described above, and can also execute related operations in a data element distributed heterogeneous storage method provided by any embodiment of the present invention.
[0073] Example 3
[0074] An embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program. When the computer program is executed by a processor, the method for distributed heterogeneous storage of data elements is implemented. The method includes:
[0075] Establish a data asset storage model that includes an asset incremental storage mechanism based on cold and hot perception and a minimum redundancy shard storage mechanism based on erasure codes, wherein the asset incremental storage mechanism based on cold and hot perception realizes the circulation and storage of data element ownership, status, and attributes through an incremental state tree for active users in the blockchain; the minimum redundancy shard storage mechanism based on erasure codes uses hash commitments to anchor the data element representation on the chain with the data element content off the chain, and uses erasure code placement optimization technology to shard the content data of the data element with minimum redundancy;
[0076] Establish a data resource storage model; wherein the data resource storage model includes: hashing the multimodal data; uploading the information including the hash, physical address, authorization status, usage method, and usage record of the multimodal data to the chain through a multi-center oracle, and storing the multimodal data locally in the database storage node;
[0077] A two-way anchor verification mechanism for library-chain integration is established to ensure that the ownership and status of on-chain data assets are consistent and verifiable with the actual use and circulation of off-chain data resources, thus achieving controllable use of data and privacy security.
[0078] Of course, the computer-readable storage medium provided by an embodiment of the present invention stores a computer program that is not limited to the method operations described above, but can also execute a distributed heterogeneous storage method for data elements provided by any embodiment of the present invention.
[0079] In the embodiments provided by the present invention, it should be understood that the disclosed structures and methods can be implemented in other ways. For example, the structural embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, structures or units, which can be electrical, mechanical or other forms.
[0080] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0081] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0082] The foregoing is merely a specific embodiment of the present invention, which enables those skilled in the art to understand or implement the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features claimed herein.
Claims
1. A distributed heterogeneous storage method for data elements, It is characterized in that include: Establish a data asset storage model that includes an asset incremental storage mechanism based on hot and cold perception and a minimum redundant shard storage mechanism based on erasure coding; Among them, the asset incremental storage mechanism based on cold and hot perception includes: obtaining a list of transactions executed in the current pre-generated block during the state conversion process, dividing the accounts whose status has changed into active and inactive groups according to the current activity, and storing them after sorting them according to the account address; for the accounts whose status has changed after the transaction is executed, recalculating the account activity for subsequent classification of the accounts and updating their status; inserting the accounts whose status has changed in the current block in groups and concurrently, if they are active accounts, inserting them in the form of incremental branches of the state tree to generate the state root of the active account in the current block; if they are inactive accounts, inserting them in the form of Merkel prefix trees to generate the state root of the inactive account; performing hash operations on the state roots of the active accounts generated in the current block and the state roots of the inactive accounts to obtain the global state root, and then storing the global state root in the block header; the asset incremental storage mechanism based on cold and hot perception realizes the circulation and storage of data element ownership, status, and attributes through the incremental state tree for active users in the blockchain; The minimum redundancy sharding storage mechanism based on erasure codes includes: splitting data elements into K data blocks according to the size of asset data; padding "0" at the end of smaller data blocks to align the data length; using erasure codes to encode K data blocks to form M check blocks; dividing K data blocks and M check blocks into m groups, assuming that each asset data needs m database storage nodes to store, and each database storage node stores x=(K+M) / m blocks; each database storage node is mapped to a position in a distributed hash table through the same hash algorithm to form a ring storage structure; for each group of blocks of each data, a hash value is calculated to obtain the mapping position of the block on the ring storage structure; the minimum redundancy sharding storage mechanism based on erasure codes uses hash commitments to anchor the data element representation on the chain with the data element content off the chain, and uses erasure code placement optimization technology to shard the content data of the data element with minimum redundancy; Establish a data resource storage model; wherein the data resource storage model includes: hashing the multimodal data; uploading the information including the hash, physical address, authorization status, usage method, and usage record of the multimodal data to the chain through a multi-center oracle, and storing the multimodal data locally in the database storage node; A two-way anchor verification mechanism for library-chain integration is established, and the two-way anchor verification mechanism for library-chain integration includes: the user initiates a request to the multi-center oracle to obtain the off-chain data resources of other users; the multi-center oracle checks whether the anchor structure in the data resource storage is consistent with the data asset storage; wherein the anchor structure includes the hash and physical address of the multimodal data; if consistent, the central oracle checks the authorization status, usage method, and usage record data of the data asset stored on the chain, and uses this to determine whether the user requesting the data asset is authorized to use the data asset. If authorized, the data asset is returned to the user; if not authorized, the user's request is rejected; if inconsistent, the data is modified; the two-way anchor verification mechanism ensures that the ownership and status of the on-chain data assets are consistent and verifiable with the actual use and circulation status of the off-chain data resources, so as to achieve controllable use of data and privacy security.
2. The method for distributed heterogeneous storage of data elements according to claim 1, It is characterized in that Each node maintains an active account table as a basis for account classification, and the active account table structure includes account address and account activity; If after the transactions in the block are executed, no account activity exceeds the minimum activity in the current active account table, then the accounts in the active account table remain unchanged and only the activity of some accounts needs to be updated; If after the execution of transactions in the block, the activity of an account exceeds the minimum activity in the current active account table, the account information in the active account table will be reordered according to the activity and updated.
3. The method for distributed heterogeneous storage of data elements according to claim 2, It is characterized in that The active account table is composed of the addresses and activity levels of accounts whose activity levels account for a set ratio of the total number of accounts.
4. The method for distributed heterogeneous storage of data elements according to claim 1, It is characterized in that Calculate the hash value of each block of each data element, and obtain the mapping position on the ring based on the hash value. From this position forward, the first database storage node encountered is the database storage node of the first data block in the block, and starting from this position, select the nearest x-1 nodes clockwise to store the remaining x-1 data blocks of the block.
5. The method for distributed heterogeneous storage of data elements according to claim 1, It is characterized in that When the multimodal data in the data resource storage model needs to be changed, the information including the hash, physical address, authorization status, usage method, and usage record of the changed multimodal data will be stored on the blockchain to ensure that the data resource storage is consistent with the anchoring structure in the data asset storage.
6. A distributed heterogeneous storage device for data elements, It is characterized in that include: At least one processing unit, wherein the processing unit is connected to a storage unit via a bus unit, wherein the storage unit stores a computer program, and when the computer program is executed by the processing unit, the distributed heterogeneous storage method for data elements described in any one of claims 1 to 5 is implemented.
7. A computer-readable storage medium storing a computer program, It is characterized in that When the computer program is executed by a processor, the distributed heterogeneous storage method for data elements as described in any one of claims 1 to 5 is implemented.
Citation Information
Patent Citations
Distributed storage dynamic defense system and method based on heterogeneous multiple copies
CN111866038A
Digital asset data storage and application method, system and device and storage medium
CN116599971A
