A data storage method and system based on blockchain

By using blockchain technology for multi-dimensional encoding and encryption in metadata management, the security, reliability and scalability problems of traditional metadata management are solved, users' control over data and privacy protection are enhanced, and the More efficient data management and protection.

CN118690396BActive Publication Date: 2024-10-25ZHEJIANG COMM SERVICES +1
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202411191732.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-28
Publication Date
2024-10-25
Estimated Expiration
2044-08-28

AI Technical Summary

Technical Problem

Traditional metadata management has single points of failure, data tampering risks and scalability issues, and users have limited privacy protection and control over data.

Method used

Using a blockchain-based data storage method, multi-dimensional coding and weighted entropy index coding are performed on metadata assets to generate multi-dimensional coding identifiers and store them in a decentralized blockchain chain group, combining hierarchical encryption and Double-layer encryption strategy ensures data security and privacy protection.

Benefits of technology

It improves the security, reliability and scalability of metadata management, enhances users' control over data and privacy protection, solves the single point of failure and data tampering risks of traditional systems, and improves the transparency of data management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118690396B_ABST
    Figure CN118690396B_ABST
Patent Text Reader

Abstract

The present invention discloses a data storage method and system based on blockchain, the method comprising: receiving original metadata assets to be stored, encoding each metadata asset in the original metadata assets, and obtaining corresponding multi-dimensional coding identifiers respectively; storing each metadata asset and its corresponding coding identifier in a decentralized blockchain chain group, wherein the blockchain chain group comprises: mutually verified nodes and their connected sub-nodes, each node stores a metadata asset, and the sub-nodes of the node store the corresponding coding identifier; hierarchically encrypting each node according to the sensitivity level of each metadata asset, and performing double-layer encryption on the node and the sub-node. By using the embodiments of the present invention, the characteristics of blockchain can be utilized to solve the security, reliability and scalability problems faced by traditional metadata management, while increasing data privacy protection and user control.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of data management technology, and in particular to a data storage method and system based on blockchain. Background Art

[0002] In the current information age, data security and privacy protection have become important issues. With the rapid development of network technology and the substantial increase in data exchange, the security management of metadata assets is particularly critical.

[0003] Metadata, or data about data, is critical to the interpretation and use of data in management information systems. Traditional metadata management usually relies on centralized database systems for storage and access. Although simple, this approach has several disadvantages: Single point of failure: The centralized system may make metadata inaccessible due to hardware failure, software defects or network problems, affecting the operation of the entire data management system; Data tampering risk: Centralized storage methods are vulnerable to malicious attacks, and data integrity and security are difficult to ensure; Scalability issues: As the amount of data grows, traditional systems face challenges in scalability and performance; Data privacy issues: Users have limited control over their own data, making it difficult to ensure data privacy and transparency. Summary of the invention

[0004] The purpose of the present invention is to provide a blockchain-based data storage method and system to address the deficiencies in the prior art, and to utilize the characteristics of blockchain to solve the security, reliability and scalability issues faced by traditional metadata management, while increasing data privacy protection and user control.

[0005] An embodiment of the present application provides a data storage method based on blockchain, the method comprising:

[0006] Receiving original metadata assets to be stored, encoding each metadata asset in the original metadata assets, and obtaining corresponding multi-dimensional encoding identifiers respectively; wherein for each metadata asset, the metadata asset is divided into metadata sub-assets of multiple dimensions;

[0007] Performing weighted entropy index coding on the metadata sub-asset of each dimension respectively to obtain a weighted entropy index of the metadata sub-asset;

[0008] Cross-merging the weighted entropy indexes of the metadata sub-assets to obtain a multi-dimensional coding identifier corresponding to the metadata asset;

[0009] Storing each metadata asset and its corresponding coded identifier in a decentralized blockchain group, wherein the blockchain group includes: mutually verified nodes and their connected sub-nodes, each node stores a metadata asset, and the sub-nodes of the node store the corresponding coded identifier;

[0010] According to the sensitivity level of each metadata asset, each node is encrypted hierarchically, and the node and the sub-node are double-encrypted.

[0011] Optionally, cross-merging the weighted entropy indexes of the metadata sub-assets to obtain a multi-dimensional coding identifier corresponding to the metadata asset includes:

[0012] Calculating a hash value of a weighted entropy index of each of the metadata sub-assets;

[0013] The hash values ​​are string-concatenated to merge the hash values ​​and generate a multi-dimensional encoding identifier corresponding to the metadata asset.

[0014] Optionally, the multi-dimensional encoding identifier is: Among them, the HFC is a coding identifier, the text{hash} function is an encrypted hash function, the text{concat} function is a string concatenation function, and the WEI_1, the WEI_2, and the WEI_k represent the weighted entropy indexes of the metadata sub-assets of the first dimension, the second dimension, and the kth dimension.

[0015] Optionally, the step of performing hierarchical encryption on each node according to the sensitivity level of each metadata asset, and performing double-layer encryption on the node and the sub-node, includes:

[0016] For each metadata asset, determining a sensitivity dynamic score of the metadata asset according to the sensitivity level of the metadata asset;

[0017] Determining an encryption level of the metadata asset according to the sensitivity dynamic score;

[0018] Determine a node encryption strategy corresponding to the encryption level, and perform a first-layer encryption on the node corresponding to the metadata asset based on the node encryption strategy to protect the storage security of the metadata asset, wherein the node encryption strategy includes: an encryption algorithm and a key;

[0019] A second layer of encryption is performed on the node corresponding to the metadata asset and its sub-nodes to protect the transmission security of the metadata asset and its encoded identifier, wherein the second layer of encryption includes: public key encryption.

[0020] Another embodiment of the present application provides a data storage system based on blockchain, the system comprising:

[0021] An encoding module, used for receiving original metadata assets to be stored, encoding each metadata asset in the original metadata assets, and obtaining corresponding multi-dimensional encoding identifiers respectively; wherein for each metadata asset, the metadata asset is divided into metadata sub-assets of multiple dimensions;

[0022] Performing weighted entropy index coding on the metadata sub-asset of each dimension respectively to obtain a weighted entropy index of the metadata sub-asset;

[0023] Cross-merging the weighted entropy indexes of the metadata sub-assets to obtain a multi-dimensional coding identifier corresponding to the metadata asset;

[0024] A storage module, used to store each metadata asset and its corresponding coded identifier in a decentralized blockchain chain group, wherein the blockchain chain group includes: mutually verified nodes and their connected sub-nodes, each node stores a metadata asset, and the sub-nodes of the node store the corresponding coded identifier;

[0025] The encryption module is used to perform hierarchical encryption on each node according to the sensitivity level of each metadata asset, and to perform double-layer encryption on the node and the sub-node.

[0026] Yet another embodiment of the present application provides a storage medium, wherein the storage medium stores a computer program, wherein the computer program is configured to execute any of the above methods when running.

[0027] Yet another embodiment of the present application provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute any of the methods described above.

[0028] Compared with the prior art, the present invention provides a data storage method based on blockchain, which receives the original metadata assets to be stored, encodes each metadata asset in the original metadata assets, and obtains corresponding multi-dimensional encoding identifiers respectively; stores each metadata asset and its corresponding encoding identifier in a decentralized blockchain chain group, wherein the blockchain chain group includes: mutually verified nodes and their connected sub-nodes, each node stores a metadata asset, and the sub-nodes of the node store the corresponding encoding identifier; hierarchically encrypts each node according to the sensitivity level of each metadata asset, and performs double-layer encryption on the node and the sub-node, so as to utilize the characteristics of blockchain to solve the security, reliability and scalability problems faced by traditional metadata management, while increasing data privacy protection and user control. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] Figure 1 A hardware structure block diagram of a computer terminal for a data storage method based on blockchain provided by an embodiment of the present invention;

[0030] Figure 2 A flowchart of a data storage method based on blockchain provided by an embodiment of the present invention;

[0031] Figure 3 A schematic diagram of the structure of a blockchain-based data storage system provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0032] The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, but should not be construed as limiting the present invention.

[0033] The embodiment of the present invention first provides a data storage method based on blockchain, which can be applied to electronic devices such as computer terminals, specifically ordinary computers, etc.

[0034] The following describes it in detail by taking running on a computer terminal as an example. Figure 1 The hardware structure block diagram of a computer terminal of a data storage method based on blockchain provided by an embodiment of the present invention. Figure 1 As shown, the computer terminal may include one or more ( Figure 1 Only one is shown in the figure) a processor 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data. Optionally, the computer terminal may also include a transmission device 106 for communication functions and an input and output device 108. It can be understood by those skilled in the art that Figure 1The structure shown is only for illustration and does not limit the structure of the above-mentioned computer terminal. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown.

[0035] The memory 104 can be used to store software programs and modules of application software, such as program instructions / modules corresponding to the data storage method based on blockchain in the embodiment of the present application. The processor 102 executes various functional applications and data processing by running the software programs and modules stored in the memory 104, that is, implementing the above method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the computer terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0036] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of a computer terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0037] See also Figure 2 , an embodiment of the present invention provides a data storage method based on blockchain, which may include the following steps:

[0038] S201, receiving original metadata assets to be stored, encoding each metadata asset in the original metadata assets, and obtaining corresponding multi-dimensional encoding identifiers respectively;

[0039] Specifically, for each metadata asset, the metadata asset can be divided into metadata sub-assets of multiple dimensions; the metadata sub-assets of each dimension are respectively encoded with weighted entropy indexes to obtain weighted entropy indexes of the metadata sub-assets; the weighted entropy indexes of the metadata sub-assets are cross-fused to obtain a multi-dimensional encoding identifier corresponding to the metadata asset. An implementation method may include:

[0040] Step 1: Data preprocessing First, receive the raw metadata assets to be stored. These assets may include various types of data, such as text, images, videos, etc. In order to ensure that the data can be effectively processed, the data needs to be preprocessed. The preprocessing steps include data cleaning (removing useless information), format standardization (ensuring data format consistency), and data normalization (scaling the data to a uniform range, such as between 0 and 1).

[0041] Step 2: Multi-dimensional segmentation: Each metadata asset is divided into metadata sub-assets of multiple dimensions. For example, a metadata asset containing text and images can be divided into text dimension and image dimension. The key to this step is to identify which metadata features belong to the same dimension, which usually requires domain knowledge or data-driven methods (such as cluster analysis) to achieve.

[0042] Step 3: Deep Feature Extraction For each dimension of metadata sub-asset, deep features are extracted using deep learning models. These models can be pre-trained neural networks, such as the BERT model for text and the ResNet model for images. Through these models, feature vectors that reflect the deep semantics and structure of the sub-asset content can be extracted.

[0043] Step 4: Weighted Entropy Index Coding Weighted entropy index coding is applied to the extracted feature vector. The entropy index is an indicator to measure the complexity and information content of data, while weighted entropy index coding further considers the importance of features. Specifically, different weights can be assigned to different features, and these weights can be determined based on the performance of the features in the training data (such as the feature importance score in the classification task).

[0044] Step 5: Cross-fusion The weighted entropy index encoding results of each dimension are cross-fused to form a comprehensive multi-dimensional encoding identifier. The fusion method can be a simple vector concatenation or a more complex operation, such as using an autoencoder or a neural network to learn the optimal fusion method between different encodings. The purpose of this step is to create a coded identifier that contains all dimensional information and can effectively represent the overall characteristics of the metadata asset.

[0045] Furthermore, in one implementation, the hash value of the weighted entropy index of each metadata sub-asset may be calculated, and each hash value may be merged to obtain a multi-dimensional encoding identifier. Specifically, the method may include:

[0046] First, for each metadata sub-asset's weighted entropy index, calculate its hash value. The choice of hash function is critical because it needs to ensure that the calculated hash value can effectively capture and express the information of the original entropy index while maintaining good hashability and reducing the possibility of collision. A secure hash algorithm such as SHA-256 can be used to implement this step, ensuring that each weighted entropy index is converted into a unique and consistent hash value.

[0047] After obtaining the individual hash values, the next task is to fuse these hash values ​​into a multi-dimensional encoded identifier. A deep learning model can be used here to achieve efficient fusion of hash values. Specifically, an autoencoder network can be used, which is trained to receive the individual hash values ​​of the input and generate a compressed feature representation in the middle layer of the network, which captures the main information of the input hash value. The network then decodes this compressed representation back into a multi-dimensional encoded identifier.

[0048] The training of the autoencoder can be carried out in the following way: First, a training dataset needs to be prepared, which includes multiple known metadata sub-assets and their corresponding weighted entropy index hash values. The autoencoder is trained with this data so that it can learn how to effectively fuse and reconstruct the hash values. In this training process, the choice of loss function is also crucial. Commonly used loss functions include mean square error (MSE) and cross entropy loss, which can help the model better optimize its weights during the learning process.

[0049] Once the autoencoder is trained, it can be used to process the weighted entropy index hash values ​​of new metadata sub-assets. Through the network, these hash values ​​are converted into a comprehensive multi-dimensional encoded identifier that not only retains the key information of the original data, but also adds additional security and unpredictability through the processing of the deep learning model.

[0050] This autoencoder-based feature fusion method can not only generate complex and highly informative multi-dimensional encoded identifiers, but also ensure that these identifiers are highly secure and reliable in practical applications, and are suitable for use in a decentralized blockchain environment to enhance the management and protection of metadata assets.

[0051] In another implementation, the hash value of the weighted entropy index of each metadata sub-asset may be calculated; each hash value may be string-concatenated to merge each hash value, and the multi-dimensional encoding identifier corresponding to the metadata asset may be generated as follows: Among them, HFC is the encoding identifier, text{hash} function is the encrypted hash function, text{concat} function represents the string concatenation function, which is used to merge multiple hash values ​​to generate the final encoding identifier, and WEI_1, WEI_2, ..., WEI_k represent the weighted entropy index of the metadata sub-assets of the first dimension, the second dimension, ..., the kth dimension.

[0052] Step 6: Output the coded identifier Finally, the generated multi-dimensional coded identifier will be used as the representation of the processed metadata asset. This coded identifier not only contains the detailed information of the metadata asset, but also captures the complex relationship and intrinsic characteristics of the asset through the powerful ability of the deep learning model, so that it has efficient indexing and retrieval capabilities in subsequent blockchain storage and management.

[0053] Through the above steps, a complex and rich multi-dimensional encoding identifier can be generated for each original metadata asset, which not only improves the efficiency and accuracy of data management, but also enhances data security and privacy protection.

[0054] S202, storing each metadata asset and its corresponding coded identifier in a decentralized blockchain group, wherein the blockchain group includes: mutually verified nodes and their connected sub-nodes, each node stores a metadata asset, and the sub-nodes of the node store the corresponding coded identifier;

[0055] Specifically, one implementation may include:

[0056] Step 1: Structural design of blockchain chain group First, design a decentralized blockchain chain group structure, which includes multiple master nodes and their respective connected child nodes. Each master node is responsible for storing a metadata asset, while its corresponding child node is responsible for storing the multi-dimensional encoding identifier of the metadata asset. This parent-child node relationship helps to disperse risks and improve the efficiency of data retrieval while maintaining data integrity.

[0057] Step 2: Development and deployment of smart contracts Develop smart contracts to automatically manage the storage process of metadata assets and coded identifiers. Smart contracts should include the following functions: receiving metadata assets and their coded identifiers, verifying the legitimacy of metadata assets, assigning metadata assets and coded identifiers to designated nodes and subnodes, and recording the timestamp and transaction ID of each data storage. Smart contracts should also be able to handle mutual verification between nodes to ensure data consistency and integrity. Step 3: Upload metadata assets and generate coded identifiers When a new metadata asset is ready to be stored, its multi-dimensional coded identifier is first generated through the aforementioned weighted entropy exponential encoding method. Then, the metadata asset is automatically uploaded to its corresponding master node using a smart contract, and the coded identifier is stored in the corresponding subnode. This process should be carried out through the transaction mechanism of the blockchain to ensure its atomicity and immutability.

[0058] Step 4: Node Verification and Data Synchronization After receiving the metadata asset or coded identifier, each node must pass the verification process defined in the smart contract. This includes verifying the integrity of the data, checking whether the data has not been tampered with, and confirming the consistency of the data between all associated nodes (master nodes and child nodes). In this way, each node in the blockchain chain group not only stores the data, but also participates in the verification and maintenance of the data, which enhances the security and stability of the entire system. Step 5: Secure encryption of data In order to further ensure the security of stored data, encryption measures can be implemented in smart contracts. Specifically, metadata assets are encrypted before being uploaded to the master node, and coded identifiers are also encrypted before being stored in the child node. The keys used for encryption should be dynamically generated and managed by the smart contract to ensure that only authorized users can access specific data.

[0059] Through the above steps, each metadata asset and its multi-dimensional encoded identifier can be effectively stored securely and efficiently in a decentralized blockchain chain group. At the same time, smart contracts are used to automatically manage the data storage and verification process, enhancing the reliability and transparency of data management.

[0060] S203, performing hierarchical encryption on each node according to the sensitivity level of each metadata asset, and performing double-layer encryption on the node and the sub-node.

[0061] Specifically, for each metadata asset, a sensitivity dynamic score of the metadata asset may be determined according to the sensitivity level of the metadata asset;

[0062] Among them, a real-time monitoring system can be developed, which is integrated into the management platform of metadata assets. This system uses a high-performance data processing framework (such as Apache Kafka or Apache Spark) to process large-scale data streams and monitor the usage patterns and access frequency of metadata in real time.

[0063] In real-time monitoring systems, machine learning predictive models can be integrated, such as using adaptive learning algorithms (such as incremental learning or online learning models), which can continuously learn the usage trends of metadata assets and predict sensitivity levels and change trends. Such models are particularly suitable for dynamically changing environments and can adapt to new data patterns in real time.

[0064] According to the sensitivity level of the current metadata asset, such as low, medium, and high, the corresponding sensitivity dynamic score is determined from the pre-built sensitivity level-score relationship table, for example, low corresponds to a score of 50, medium corresponds to a score of 70, high corresponds to a score of 90, etc. The sensitivity dynamic score can be dynamically adjusted according to the content of the metadata asset and its security sensitivity.

[0065] Determining an encryption level of the metadata asset according to the sensitivity dynamic score;

[0066] Among them, metadata assets can be divided into different encryption levels according to the dynamic sensitivity score. These levels may include basic encryption, enhanced encryption and advanced encryption, and each layer uses different encryption technology and key strength. Configure a dedicated encryption algorithm for each level. For example, for the advanced encryption level, elliptic curve cryptography (ECC) may be used in conjunction with hardware security module (HSM) for key management; for the enhanced and basic levels, the more common AES encryption may be sufficient. For example, for the enhanced encryption level, you can choose to use 256-bit AES encryption or RSA-4096-bit encryption; for the basic level, choose 128-bit AES encryption, and so on.

[0067] Determine a node encryption strategy corresponding to the encryption level, and perform a first-layer encryption on the node corresponding to the metadata asset based on the node encryption strategy to protect the storage security of the metadata asset, wherein the node encryption strategy includes: an encryption algorithm and a key;

[0068] Among them, in one implementation, at the node level, metadata assets are encrypted using corresponding encryption algorithms and keys according to the determined encryption hierarchy and strategy. This process is automatically controlled by smart contracts to ensure that all operations comply with preset security policies. Keys are generated and distributed by a dynamic key management system to ensure the security of encryption keys and compliance of key lifecycles. Key updates and revocations are automatically handled by a central key management service. An encryption library can be built to support multiple encryption algorithms, including but not limited to AES, RSA, ECC, and quantum key distribution (QKD). This allows the system to select the most appropriate encryption method based on the specific needs of the data.

[0069] In another implementation, for each node storing metadata assets, a first layer of encryption is implemented based on its sensitivity level. This layer of encryption uses the selected encryption strategy, and the keys are dynamically generated and distributed by a centralized key management system to ensure that the encryption of each node is independent of other nodes. The encoded identifier of each metadata asset is stored in the child node. The child node uses a different encryption strategy from the main node for the first layer of encryption to increase security and complexity. For example, if the main node uses symmetric encryption (AES), the child node can use asymmetric encryption (such as RSA).

[0070] A second layer of encryption is performed on the node corresponding to the metadata asset and its sub-nodes to protect the transmission security of the metadata asset and its encoded identifier, wherein the second layer of encryption includes: public key encryption.

[0071] In one implementation, public key encryption is used for data transmission between nodes and subnodes. Each node and subnode has its own public-private key pair, with the public key used to encrypt the transmitted data and the private key used to decrypt the received data. When the metadata asset and its encoded identifier are transmitted from the node to the subnode, the data is first signed with the node's private key and then encrypted with the public key of the receiving subnode. This ensures that even if the data is intercepted during transmission, the content cannot be deciphered without the corresponding private key.

[0072] In another implementation, a second layer of encryption is implemented when metadata assets and their encoded identifiers are transmitted from the master node to the child node or vice versa. This layer of encryption uses a public key infrastructure (PKI), where the transmitted data will be encrypted using the public key of the receiving node, ensuring that even if it is intercepted during transmission, the data cannot be decrypted by unauthorized persons. To further improve security, the keys used by the master node and the child node are completely isolated. After the keys are used, they are securely destroyed through a key recovery mechanism to prevent key leakage from threatening system security.

[0073] Through the above steps, each metadata asset is protected at an appropriate level according to its sensitivity, and the double-layer encryption strategy provides additional security during storage and transmission, greatly enhancing data security and privacy protection. The implementation of this method can meet the needs of high security in a decentralized blockchain environment and is suitable for handling sensitive or important metadata assets. By effectively performing hierarchical encryption based on the sensitivity level of metadata assets and implementing double-layer encryption for nodes and their subnodes, the security of the entire system and the confidentiality of data are greatly enhanced. This method not only increases the complexity of encryption, but also improves the system's defense capabilities against external threats and internal leaks.

[0074] It can be seen that by receiving the original metadata assets to be stored, each metadata asset in the original metadata assets is encoded to obtain corresponding multi-dimensional encoding identifiers respectively; each metadata asset and its corresponding encoding identifier are stored in a decentralized blockchain chain group, wherein the blockchain chain group includes: mutually verified nodes and their connected sub-nodes, each node stores a metadata asset, and the sub-nodes of the node store the corresponding encoding identifier; according to the sensitivity level of each metadata asset, each node is hierarchically encrypted, and the node and the sub-node are double-encrypted, so that the characteristics of the blockchain can be used to solve the security, reliability and scalability problems faced by traditional metadata management, while increasing data privacy protection and user control.

[0075] Another embodiment of the present invention provides a data storage system based on blockchain, see Figure 3 , the system may include:

[0076] The encoding module 301 is used to receive the original metadata assets to be stored, encode each metadata asset in the original metadata assets, and obtain corresponding multi-dimensional encoding identifiers respectively;

[0077] The storage module 302 is used to store each metadata asset and its corresponding coded identifier in a decentralized blockchain chain group, wherein the blockchain chain group includes: mutually verified nodes and their connected sub-nodes, each node stores a metadata asset, and the sub-nodes of the node store the corresponding coded identifier;

[0078] The encryption module 303 is used to perform hierarchical encryption on each node according to the sensitivity level of each metadata asset, and to perform double-layer encryption on the node and the sub-node.

[0079] It can be seen that by receiving the original metadata assets to be stored, each metadata asset in the original metadata assets is encoded to obtain corresponding multi-dimensional encoding identifiers respectively; each metadata asset and its corresponding encoding identifier are stored in a decentralized blockchain chain group, wherein the blockchain chain group includes: mutually verified nodes and their connected sub-nodes, each node stores a metadata asset, and the sub-nodes of the node store the corresponding encoding identifier; according to the sensitivity level of each metadata asset, each node is hierarchically encrypted, and the node and the sub-node are double-encrypted, so that the characteristics of the blockchain can be used to solve the security, reliability and scalability problems faced by traditional metadata management, while increasing data privacy protection and user control.

[0080] An embodiment of the present invention further provides a storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when running.

[0081] Specifically, in this embodiment, the above storage medium may be configured to store a computer program for performing the following steps:

[0082] S201, receiving original metadata assets to be stored, encoding each metadata asset in the original metadata assets, and obtaining corresponding multi-dimensional encoding identifiers respectively;

[0083] S202, storing each metadata asset and its corresponding coded identifier in a decentralized blockchain group, wherein the blockchain group includes: mutually verified nodes and their connected sub-nodes, each node stores a metadata asset, and the sub-nodes of the node store the corresponding coded identifier;

[0084] S203, performing hierarchical encryption on each node according to the sensitivity level of each metadata asset, and performing double-layer encryption on the node and the sub-node.

[0085] It can be seen that by receiving the original metadata assets to be stored, each metadata asset in the original metadata assets is encoded to obtain corresponding multi-dimensional encoding identifiers respectively; each metadata asset and its corresponding encoding identifier are stored in a decentralized blockchain chain group, wherein the blockchain chain group includes: mutually verified nodes and their connected sub-nodes, each node stores a metadata asset, and the sub-nodes of the node store the corresponding encoding identifier; according to the sensitivity level of each metadata asset, each node is hierarchically encrypted, and the node and the sub-node are double-encrypted, so that the characteristics of the blockchain can be used to solve the security, reliability and scalability problems faced by traditional metadata management, while increasing data privacy protection and user control.

[0086] An embodiment of the present invention further provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0087] Specifically, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.

[0088] Specifically, in this embodiment, the processor may be configured to perform the following steps through a computer program:

[0089] S201, receiving original metadata assets to be stored, encoding each metadata asset in the original metadata assets, and obtaining corresponding multi-dimensional encoding identifiers respectively;

[0090] S202, storing each metadata asset and its corresponding coded identifier in a decentralized blockchain group, wherein the blockchain group includes: mutually verified nodes and their connected sub-nodes, each node stores a metadata asset, and the sub-nodes of the node store the corresponding coded identifier;

[0091] S203, performing hierarchical encryption on each node according to the sensitivity level of each metadata asset, and performing double-layer encryption on the node and the sub-node.

[0092] Specifically, the specific examples in this embodiment can refer to the examples described in the above embodiments and optional implementation modes, and this embodiment will not be described in detail here.

[0093] It can be seen that by receiving the original metadata assets to be stored, each metadata asset in the original metadata assets is encoded to obtain corresponding multi-dimensional encoding identifiers respectively; each metadata asset and its corresponding encoding identifier are stored in a decentralized blockchain chain group, wherein the blockchain chain group includes: mutually verified nodes and their connected sub-nodes, each node stores a metadata asset, and the sub-nodes of the node store the corresponding encoding identifier; according to the sensitivity level of each metadata asset, each node is hierarchically encrypted, and the node and the sub-node are double-encrypted, so that the characteristics of the blockchain can be used to solve the security, reliability and scalability problems faced by traditional metadata management, while increasing data privacy protection and user control.

[0094] The above describes in detail the structure, features and effects of the present invention based on the embodiments shown in the drawings. The above is only a preferred embodiment of the present invention, but the present invention is not limited to the scope of implementation shown in the drawings. Any changes made according to the concept of the present invention, or modifications to equivalent embodiments with equivalent changes, which still do not exceed the spirit covered by the description and drawings, should be within the protection scope of the present invention.

Claims

1. In a data storage method based on blockchain, it is characterized in that: The method comprises: Receiving original metadata assets to be stored, encoding each metadata asset in the original metadata assets, and obtaining corresponding multi-dimensional encoding identifiers respectively; wherein for each metadata asset, the metadata asset is divided into metadata sub-assets of multiple dimensions; Performing weighted entropy index coding on the metadata sub-asset of each dimension respectively to obtain a weighted entropy index of the metadata sub-asset; Cross-merging the weighted entropy indexes of the metadata sub-assets to obtain a multi-dimensional coding identifier corresponding to the metadata asset; Storing each metadata asset and its corresponding coded identifier in a decentralized blockchain group, wherein the blockchain group includes: mutually verified nodes and their connected sub-nodes, each node stores a metadata asset, and the sub-nodes of the node store the corresponding coded identifier; According to the sensitivity level of each metadata asset, each node is encrypted hierarchically, and the node and the sub-node are double-encrypted; The step of performing hierarchical encryption on each node according to the sensitivity level of each metadata asset and performing double-layer encryption on the node and the sub-node includes: For each metadata asset, determining a sensitivity dynamic score of the metadata asset according to the sensitivity level of the metadata asset; Determining an encryption level of the metadata asset according to the sensitivity dynamic score; Determine a node encryption strategy corresponding to the encryption level, and perform a first-layer encryption on the node corresponding to the metadata asset based on the node encryption strategy to protect the storage security of the metadata asset, wherein the node encryption strategy includes: an encryption algorithm and a key; A second layer of encryption is performed on the node corresponding to the metadata asset and its sub-nodes, wherein the second layer of encryption includes: public key encryption, specifically including using public key encryption for data transmission between the node and the sub-nodes.

2. The method according to claim 1, characterized in that The cross-fusion of the weighted entropy indexes of the metadata sub-assets to obtain a multi-dimensional coding identifier corresponding to the metadata asset includes: Calculating a hash value of a weighted entropy index of each of the metadata sub-assets; The hash values ​​are string-concatenated to merge the hash values ​​and generate a multi-dimensional encoding identifier corresponding to the metadata asset.

3. The method according to claim 2, characterized in that The multi-dimensional encoding identifier is: Among them, the HFC is a coding identifier, the text{hash} function is an encrypted hash function, the text{concat} function is a string concatenation function, and the WEI_1, the WEI_2, and the WEI_k represent the weighted entropy indexes of the metadata sub-assets of the first dimension, the second dimension, and the kth dimension.

4. A data storage system based on blockchain, characterized in that: The system comprises: An encoding module, used for receiving original metadata assets to be stored, encoding each metadata asset in the original metadata assets, and obtaining corresponding multi-dimensional encoding identifiers respectively; wherein for each metadata asset, the metadata asset is divided into metadata sub-assets of multiple dimensions; Performing weighted entropy index coding on the metadata sub-asset of each dimension respectively to obtain a weighted entropy index of the metadata sub-asset; Cross-merging the weighted entropy indexes of the metadata sub-assets to obtain a multi-dimensional coding identifier corresponding to the metadata asset; A storage module, used to store each metadata asset and its corresponding coded identifier in a decentralized blockchain chain group, wherein the blockchain chain group includes: mutually verified nodes and their connected sub-nodes, each node stores a metadata asset, and the sub-nodes of the node store the corresponding coded identifier; An encryption module, used to perform hierarchical encryption on each node according to the sensitivity level of each metadata asset, and perform double-layer encryption on the node and the sub-node; The encryption module is specifically used for: For each metadata asset, determining a sensitivity dynamic score of the metadata asset according to the sensitivity level of the metadata asset; Determining an encryption level of the metadata asset according to the sensitivity dynamic score; Determine a node encryption strategy corresponding to the encryption level, and perform a first-layer encryption on the node corresponding to the metadata asset based on the node encryption strategy to protect the storage security of the metadata asset, wherein the node encryption strategy includes: an encryption algorithm and a key; A second layer of encryption is performed on the node corresponding to the metadata asset and its sub-nodes, wherein the second layer of encryption includes: public key encryption, specifically including using public key encryption for data transmission between the node and the sub-nodes.

5. The system according to claim 4, characterized in that The encoding module is specifically used for: Calculating a hash value of a weighted entropy index of each of the metadata sub-assets; The hash values ​​are string-concatenated to merge the hash values ​​and generate a multi-dimensional encoding identifier corresponding to the metadata asset.

6. The system according to claim 5, characterized in that The multi-dimensional encoding identifier is: Among them, the HFC is a coding identifier, the text{hash} function is an encrypted hash function, the text{concat} function is a string concatenation function, and the WEI_1, the WEI_2, and the WEI_k represent the weighted entropy indexes of the metadata sub-assets of the first dimension, the second dimension, and the kth dimension.

7. A storage medium, characterized in that: The storage medium stores a computer program, wherein the computer program is configured to execute the method according to any one of claims 1 to 3 when executed.

8. An electronic device, comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to run the computer program to perform the method according to any one of claims 1 to 3.

Citation Information

Patent Citations

  • Food safety traceability method, device and equipment based on block chain

    CN115374189A

  • Information identification system and device based on master-slave block chain storage mode, and medium

    CN115941692A

  • Digital asset management method and related product

    CN116028484A

  • Hierarchical encryption privacy protection method based on block chain

    CN116842573A

  • Metadata asset platform-based application assembly platform system

    CN118350030A