Block chain decentralized data security storage method and system
By using blockchain as a decentralized data security storage method, the issues of data security and privacy in distributed data storage systems are solved, achieving efficient and secure data storage.
Patent Information
- Application Number
- CN202511505084.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-21
- Publication Date
- 2025-11-18
AI Technical Summary
Existing distributed data storage systems cannot ensure that data is stored securely, reliably, and efficiently on nodes, and it is difficult to guarantee the security, privacy, and reliability of data during transmission and storage.
By adopting a decentralized data security storage method based on blockchain, a data distribution strategy is formulated through data sharding, encryption processing, network evaluation, and node selection, and encrypted data fragments are distributed to the blockchain network for storage.
It enhances data security, privacy, storage efficiency, and reliability, ensuring data security and privacy during transmission and storage.
Smart Images

Figure CN120974544A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data processing technology, specifically to a method and system for secure decentralized data storage using blockchain. Background Technology
[0002] In today's era of rapid information technology development, the generation and storage needs of data are experiencing explosive growth. Data has become an indispensable core asset of modern society. Traditional data storage methods, especially centralized data storage, although they have met basic storage needs for some time, face many challenges such as security, scalability, efficiency, and cost-effectiveness. For example, there are issues such as single points of failure, low data security, and high maintenance costs. In particular, with the widespread application of technologies such as big data and cloud computing, the value of data is constantly increasing, and the requirements for data security and privacy protection are also increasing. Some data may be illegally obtained or tampered with during the storage process, thereby affecting the data security and privacy protection capabilities.
[0003] Therefore, current data storage technologies suffer from technical problems such as the inability to ensure that data can be stored on secure, reliable, and efficient nodes, and the difficulty in guaranteeing the security, privacy, and reliability of data during transmission and storage. Summary of the Invention
[0004] This application provides a blockchain-based decentralized data security storage method and system. By employing technologies such as data sharding, encryption processing, network evaluation, node selection, and distribution strategies, it solves the technical problems of existing distributed data storage, which cannot ensure that data can be stored on secure, reliable, and efficient nodes, and cannot guarantee the security, privacy, and reliability of data during transmission and storage. This achieves the technical effect of improving data security, privacy, data storage efficiency, and reliability.
[0005] This application provides a blockchain-based decentralized data security storage method, comprising: sharding the data to be stored to generate N data fragments, where N is an integer greater than 1; encrypting the N data fragments to obtain N encrypted data fragments; retrieving application scenario information of the data to be stored to perform storage evaluation on the blockchain network, and determining M nodes of the blockchain network based on the evaluation results, where M is an integer greater than or equal to 2; traversing the M nodes of the blockchain network and selecting nodes based on node types, and formulating a data distribution strategy based on the selection results; distributing the N encrypted data fragments to the blockchain network for data storage verification according to the data distribution strategy, and performing distributed storage of the N encrypted data fragments based on the storage verification results.
[0006] In a possible implementation, the data to be stored is sharded to generate N data fragments, and the following processes are performed: determining a sharding key based on the data attributes of the data to be stored; extracting the key value of the sharding key and calculating it to determine multiple data sharding parameters, including a data sharding range, a data sharding quantity, and load balancing parameters; mapping the data to be stored using the sharding key to obtain a data mapping table; and sharding the data according to the data sharding range and the data sharding quantity based on the load balancing parameters and the data mapping table to generate the N data fragments.
[0007] In a possible implementation, the application scenario information of the data to be stored is retrieved to evaluate the blockchain network. Based on the evaluation results, M nodes of the blockchain network are determined, and the following processes are performed: data analysis is conducted based on the data attributes of the data to be stored to determine multiple data sources, each of which has data type information; data characteristic analysis is performed on the multiple data sources based on the data type information, and the application scenario information of the data to be stored is determined based on the characteristic analysis results; data access frequency is extracted based on the application scenario information of the data to be stored, and multiple evaluation indicators are formulated; the performance requirements of the blockchain network are evaluated according to the multiple evaluation indicators to obtain the evaluation results.
[0008] In a possible implementation, the M nodes of the blockchain network are traversed and node selection is performed based on node type, and the following processes are executed: The M nodes of the blockchain network are traversed through a network discovery mechanism to identify node types; the M nodes are identified based on the identification results, generating multiple identification results; it is determined whether any of the M nodes meet a preset performance index based on the multiple identification results; the nodes that meet the preset performance index are extracted and subjected to trust analysis, and a comprehensive node score is generated based on the analysis results; the load balancing parameters are retrieved and combined with the comprehensive node score to generate a node selection strategy; the node selection strategy is executed to select nodes from the M nodes of the blockchain network, determining W nodes, where W is an integer greater than 0 and less than or equal to M; the W nodes are added to the selection results.
[0009] In a possible implementation, based on the selection results, a data distribution strategy is formulated, and the following processes are also performed: a demand analysis is conducted on the data to be stored based on the node comprehensive score to obtain data storage requirements, including data access requirements and data storage volume requirements; based on the data access requirements and data storage volume requirements, a growth analysis is performed on the N data segments in conjunction with the data type information to generate a data growth trend; the N data segments are replicated according to the data growth trend to determine N data replica segments; the N data replica segments are distributed to the W nodes for data distribution testing to generate test results; and the data distribution strategy is formulated based on the test results.
[0010] In a possible implementation, the N data replica fragments are distributed to the W nodes for data distribution testing, and test results are generated. The following processing is also performed: The N data replica fragments are distributed to the W nodes, and it is determined whether the data distribution test of the W nodes reaches a preset distribution balance threshold. If the data distribution test of the W nodes does not reach the preset distribution balance threshold, a reorganization instruction is generated. The reorganization instruction is executed to reorganize the data structure of the N data replica fragments, and the reorganization results are redistributed to the W nodes for a second data distribution test. This process is iterated until the data distribution test of the W nodes reaches the preset distribution balance threshold, and the test results are generated and output.
[0011] In a possible implementation, executing the reorganization instruction to reorganize the data structure of the N data replica fragments also includes the following processing: performing data analysis on the N data replica fragments to obtain multiple data structures, which correspond to the N data replica fragments; extracting the association between the multiple data structures and the N data replica fragments; defining fields for the N data replica fragments to determine target data fields; and formulating a reorganization strategy according to the target data fields to reorganize the data structure of the N data replica fragments, thereby generating the reorganization result.
[0012] This application also provides a blockchain decentralized data security storage system, comprising: a data sharding processing module, which shards the data to be stored into N data fragments, where N is an integer greater than 1; an encrypted data fragment obtaining module, which traverses the N data fragments and encrypts them to obtain N encrypted data fragments; a blockchain network node determining module, which retrieves application scenario information of the data to be stored to perform storage evaluation on the blockchain network and determines M nodes of the blockchain network based on the evaluation results, where M is an integer greater than or equal to 2; a data distribution strategy formulating module, which traverses the M nodes of the blockchain network and selects nodes based on node type, and formulates a data distribution strategy based on the selection results; and a data storage module, which distributes the N encrypted data fragments to the blockchain network for data storage according to the data distribution strategy.
[0013] This application proposes a blockchain-based decentralized data security storage method and system. The method involves: fragmenting the data to be stored into N data segments; obtaining N encrypted data segments; retrieving application scenario information of the data to be stored to evaluate the blockchain network; determining M nodes for the blockchain network based on the evaluation results; selecting nodes and formulating a data distribution strategy based on the selection results; and distributing the N encrypted data segments to the blockchain network for data storage according to the data distribution strategy. This addresses the technical problems of existing distributed data storage systems, such as the inability to ensure data is stored securely, reliably, and efficiently on nodes, and the difficulty in guaranteeing the security, privacy, and reliability of data during transmission and storage. It achieves the technical effect of improving data security, privacy, data storage efficiency, and reliability. Attached Figure Description
[0014] To more clearly illustrate the technical solutions of the embodiments of this disclosure, the accompanying drawings of the embodiments of this disclosure will be briefly described below. Flowcharts are used in this application to illustrate the operations performed by the system according to the embodiments of this application. It should be understood that the preceding or following operations are not necessarily performed precisely in sequence. Instead, various steps can be processed in reverse order or simultaneously as needed. Furthermore, other operations can be added to these processes, or one or more steps can be removed from these processes.
[0015] Figure 1 This is a schematic diagram of a blockchain decentralized data security storage method provided in an embodiment of this application; Figure 2 This is a schematic diagram of the blockchain decentralized data security storage system provided in the embodiments of this application.
[0016] Figure labeling: Data fragment processing module 10, encrypted data fragment acquisition module 20, blockchain network node determination module 30, data distribution strategy formulation module 40, data storage module 50. Detailed Implementation
[0017] The above description is only an overview of the technical solution of this application. In order to better understand the technical means of this application and to implement it in accordance with the contents of the specification, and to make the above and other objects, features and advantages of this application more obvious and understandable, specific embodiments of this application are given below.
[0018] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description of this application will be provided in conjunction with the accompanying drawings. The described embodiments should not be considered as limitations on this application. All other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0019] In the following description, references to "some embodiments" describe a subset of all possible embodiments. However, it is understood that "some embodiments" may be the same or different subsets of all possible embodiments and may be combined with each other without conflict. The terms "first" and "second" are used merely to distinguish similar objects and do not represent a specific ordering of objects. The terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or server that includes a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or modules not explicitly listed or inherent to these processes, methods, products, or devices. Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only.
[0020] This application provides a blockchain-based decentralized data security storage method, such as... Figure 1 As shown, the method includes: Step S100: The data to be stored is sharded to generate N data fragments, where N is an integer greater than 1. In a distributed data storage system, to improve the efficiency of data storage and processing, the originally large dataset is divided into smaller, more manageable parts (i.e., data fragments). Specifically, the data to be stored is divided into N smaller data fragments, each containing a portion of the original dataset. For example, the data can be divided into multiple fragments based on a certain range (such as ID range, time range, etc.). A hash function is used to map the data to different fragments. This method can ensure the uniformity of data distribution, but may lead to higher access pressure on some hot data. Here, N represents the number of data fragments into which the data to be stored is divided, and is an integer greater than 1. A larger value of N can improve the parallel processing capability of the system, but it will also increase the complexity of data management and the overhead of network transmission. By dividing data into multiple smaller fragments, data can be stored and processed in parallel on multiple nodes, thereby improving overall performance. When the amount of data increases, storage and processing capacity can be expanded by adding new nodes without large-scale modifications to existing data or systems. After data is fragmented, data fragments can be dynamically allocated according to the load of each node to avoid situations where some nodes are overloaded while other nodes are idle.
[0021] In one possible implementation, step S100 further includes step S110, determining a sharding key based on the data attributes of the data to be stored. A sharding key is a key field or combination of fields used to distribute data across different shards (or partitions, nodes). When determining the sharding key, the data attributes of the data to be stored are considered, such as data access patterns, query frequency, and data distribution uniformity. For example, in user data, the user ID can be used as the sharding key, where ID is the key value. Step S120 involves extracting the key value of the sharding key and calculating multiple data sharding parameters, including the data sharding range, the number of data shards, and load balancing parameters. Extract the key values of the sharding keys from the data records, and calculate and determine multiple data sharding parameters, including the data sharding range, the number of data shards, and load balancing parameters. Specifically, the data sharding range defines the range of key values covered by each data shard, which helps determine which data should be stored on which shard; the number of data shards refers to determining how many data shards need to be created based on the system's capacity, performance, and availability requirements; and the load balancing parameters are used to optimize the distribution of data among the shards to ensure system load balance, which may include data migration strategies between shards and dynamic adjustment of shard capacity.
[0022] The method also includes step S130, which maps the data to be stored using the sharding key to obtain a data mapping table. Based on the sharding key and the determined data sharding parameters, the data to be stored is mapped to the corresponding data shards, including calculating which shard range the key value of a data item falls into and recording this mapping relationship to obtain the data mapping table, which records the correspondence between each data item and the shard. Step S140, based on the load balancing parameters and the data mapping table, the data is sharded according to the data shard range and the number of data shards to generate the N data fragments. Load balancing parameters ensure that data is evenly distributed across shards, preventing some shards from becoming performance bottlenecks due to excessive data load, while other shards remain relatively idle. Specifically, data is sharded according to the data shard range and the number of data shards, for example, by sorting the data to ensure the orderliness and predictability of the data shards. Then, based on the data shard range and the number of data shards, the sorted data is divided into multiple segments, each containing data items within a certain range, and the total number of these segments equals the specified number of data shards. Finally, according to the data mapping table or sharding strategy, each data segment is assigned to the corresponding shard, ultimately generating N data segments containing all the content of the data to be stored, but distributed across different shards to achieve distributed storage and management of the data. Each data segment contains sufficient information (such as shard identifier, data range, etc.) to allow for recombination or querying of the original data when needed.
[0023] Step S200: Encrypt the N data segments to obtain N encrypted data segments. The obtained N data segments are encrypted to protect data privacy and security, preventing unauthorized access or tampering. Specifically, based on the security requirements and data sensitivity of the distributed storage system, a suitable encryption algorithm is selected, including symmetric encryption algorithms (such as AES) and public-key encryption algorithms (such as RSA). Each data segment is iterated over, and the selected encryption algorithm is applied to each data segment to generate a corresponding encrypted data segment. During the encryption process, a key (for symmetric encryption) or a public key (for public-key encryption) may be used to encrypt the data. After encryption, each original data segment is transformed into an encrypted data segment, resulting in N encrypted data segments.
[0024] Step S300: Retrieve the application scenario information of the data to be stored to perform a storage evaluation on the blockchain network, and determine M nodes of the blockchain network based on the evaluation results, where M is an integer greater than or equal to 2. First, clearly define the application scenarios of the data to be stored, including the data type, scale, access frequency, security requirements, and privacy protection requirements. Then, evaluate the blockchain network, which may include data source and usage analysis, data sensitivity assessment, data storage requirements, network performance evaluation, and security assessment. Specifically, data source and usage analysis refers to determining the source of the data (e.g., medical data, financial transaction data) and its intended use (e.g., real-time querying, historical record storage), understanding the importance of the data and application needs. Data sensitivity assessment evaluates the sensitivity of the data, such as whether it contains personal privacy information or trade secrets, and determines whether additional security measures are needed. Data storage requirements analyze the data storage needs, including data volume, storage period, and access frequency, to determine whether the blockchain network can meet these needs. Network performance evaluation assesses the performance parameters of the blockchain network, such as throughput, latency, and storage capacity, based on the application scenario information of the data to be stored, ensuring that the network can efficiently process and store the data. Security assessment evaluates the security characteristics of the blockchain network, such as encryption methods, access control mechanisms, and node security, based on data sensitivity and application scenarios, ensuring the security of data during transmission and storage. After completing the blockchain network evaluation, based on the evaluation results and the specific needs of the application scenario, M nodes are determined to be responsible for storing data, verifying transactions, and participating in the consensus process. Specifically, geographically dispersed nodes are selected to improve the network's fault tolerance and anti-attack capabilities. The hardware resources of the nodes (such as computing power, storage capacity, network bandwidth, etc.) should meet the operational requirements of the blockchain network. The nodes have high credibility to ensure the security and stability of the blockchain network. Based on the consensus mechanism of the blockchain network (such as proof-of-work, proof-of-stake, etc.), an appropriate number of nodes are selected to ensure the normal operation and security of the network.
[0025] In one possible implementation, step S300 further includes step S310, which involves performing data analysis based on the data attributes of the data to be stored to determine multiple data sources, wherein the multiple data sources have data type information. The data attributes of the data to be stored may include the data format (e.g., JSON, XML, CSV, etc.), data structure (e.g., relational, non-relational, graph database, etc.), physical storage location of the data (e.g., local file system, remote server, cloud storage, etc.), data generation method (e.g., user input, sensor collection, system logs, etc.), and business meaning of the data (e.g., user information, transaction records, product inventory, etc.). A thorough analysis of the data attributes of the data to be stored is conducted to identify multiple sources of the data to be stored. Each source may contain some or all of the data to be stored and has its unique data structure and format.
[0026] The method also includes step S320, which involves performing data characteristic analysis on the multiple data sources based on the data type information, and matching and determining the application scenario information of the data to be stored based on the characteristic analysis results. Based on data type information, such as structured data (e.g., tables in a relational database), semi-structured data (e.g., JSON, XML), and unstructured data (e.g., text, images, videos), data characteristic analysis is performed on multiple data sources. This includes data volume assessment (assessing the total amount of data to be stored and its future growth trend), data security requirements (analyzing data security needs, including confidentiality, integrity, and availability), and data update frequency (understanding the data update frequency to select appropriate storage and access strategies). Based on the results of the data characteristic analysis, the application scenario information of the data to be stored is matched and determined. For example, high-frequency transaction data may require a high-throughput and low-latency blockchain network; big data analysis may require powerful computing capabilities and scalable storage solutions.
[0027] The method also includes step S330, which involves extracting the data access frequency based on the application scenario information of the data to be stored and formulating multiple evaluation indicators. The data access frequency is extracted based on the application scenario information of the data to be stored, and multiple evaluation indicators, including throughput, latency, scalability, and security, are formulated based on this data. Specifically, data access frequency refers to the frequency at which data is read, written, or queried; throughput refers to the number of transactions or data volume that the system can process within a certain time; latency refers to the time required from initiating a data access request to the system responding to the request; scalability refers to the system's ability to maintain or improve performance when facing an ever-increasing volume of data and users; and security refers to the system's ability to protect data from unauthorized access, tampering, or leakage.
[0028] The process also includes step S340, which evaluates the performance requirements of the blockchain network according to the multiple evaluation metrics to obtain evaluation results. Multiple evaluation metrics are used to measure and judge the performance and capabilities of the blockchain network under different application scenarios. Specifically, the processing capacity of the blockchain network under specific conditions is measured by simulating a large number of transaction requests; tests are conducted under conditions exceeding normal load to evaluate the stability and performance of the blockchain network under high pressure; software is used to monitor transaction latency in the blockchain network in real time; the performance changes of the blockchain network are observed by simulating a gradual increase in data volume and user volume; automated tools are used to scan the blockchain network for vulnerabilities to discover potential security threats; and a comprehensive evaluation result of the blockchain network performance requirements is formed.
[0029] Step S400: Traverse the M nodes of the blockchain network and select nodes based on node type, then formulate a data distribution strategy based on the selection results. Each node in the blockchain network undergoes a detailed inspection and evaluation to understand its status, performance, geographical location, resource type, and other information. Node selection is based on node type. Specifically, nodes in the blockchain network can be classified according to different criteria, such as functional type (full node, light node, miner node, etc.), geographical location (cross-regional distribution, within the same data center, etc.), or resource type (strong computing power, large storage capacity, high network bandwidth, etc.). During the node selection process, the specific needs of the application scenario for the data to be stored are considered to select a suitable node type. For example, full nodes can store complete blockchain data, suitable for application scenarios requiring high security and integrity; light nodes only store partial data, suitable for resource-constrained environments; selecting geographically dispersed nodes can improve the network's fault tolerance and anti-attack capabilities. Based on the needs of data distribution and processing, select nodes with sufficient computing power, storage capacity, and network bandwidth. Then, based on the node selection results, formulate a reasonable data distribution strategy to achieve efficient, secure, and scalable distributed data storage for the blockchain. This includes replicating data fragments across multiple nodes to improve data availability and fault tolerance, preventing data loss due to single points of failure; rationally allocating storage and processing tasks for data fragments based on node performance and resource usage; dynamically adjusting data distribution based on node performance and load to ensure load balancing among nodes; and dynamically adjusting the data distribution strategy as the blockchain network develops and data volume increases, such as by monitoring node performance and resource usage, and analyzing network traffic and transaction patterns to optimize the data distribution strategy.
[0030] In one possible implementation, step S400 further includes step S410, which involves traversing the M nodes of the blockchain network through a network discovery mechanism to identify node types, and then labeling the M nodes based on the identification results to generate multiple labeling results. The network discovery mechanism refers to the ability of each node to discover other nodes in the network through a P2P (peer-to-peer) communication protocol within the blockchain network, and then identify the node types, such as full nodes (store complete blockchain data), light nodes (store only block headers), miner nodes (participate in the mining process), and validator nodes (verify transactions and blocks). Based on the node type identification results, each node is assigned a label. Through these labels, specific types of nodes can be quickly identified, and operations can be performed as needed to generate multiple labeling results, which together constitute a comprehensive description of the node types in the blockchain network.
[0031] The process also includes step S420, which determines whether any of the M nodes meet preset performance indicators based on the multiple identification results. Performance evaluation of the M nodes is performed by sending test transactions or query requests to each node and measuring response times. This evaluation includes assessing network latency, processing speed, and storage capacity. The preset performance indicators may include requirements for network latency, processing speed, and storage capacity. By comparing the identification results of each node with the preset indicators, nodes that meet or exceed these indicators are selected. The process also includes step S430, which extracts nodes that meet the preset performance indicators and performs trust analysis on them. A comprehensive node score is generated based on the analysis results. Further trust analysis is performed on the selected nodes, which may include checking the nodes' historical behavior (e.g., whether they have committed malicious acts), interaction records with other nodes, and reputation in the network. Based on the trust analysis results, a comprehensive node score is generated for each node, reflecting the node's overall reliability and performance.
[0032] The process also includes step S440, which retrieves the load balancing parameters and combines them with the node comprehensive score to generate a node selection strategy. After obtaining the load balancing parameters and the node comprehensive score, a node selection strategy is generated based on this information. This strategy aims to optimize system performance, improve resource utilization, and ensure data security and reliability. For example, during request distribution, requests are preferentially assigned to nodes with higher comprehensive scores; requests are evenly distributed to each node based on the current system load and the node's processing capacity to avoid some nodes being overloaded while others are idle; when a node fails or cannot process a request, the request is automatically transferred to other available nodes; and nodes with closer proximity and lower network latency are selected to process the request based on the geographical location of the request source.
[0033] The process also includes step S450, which executes the node selection strategy to select W nodes from the M nodes of the blockchain network, where W is an integer greater than 0 and less than or equal to M. The node selection strategy evaluates and filters the M nodes of the blockchain network, ultimately determining W nodes, where W is an integer greater than 0 and less than or equal to M, representing the number of selected nodes. The selected W nodes will be responsible for performing specific tasks or processing specific requests, which may include verifying transactions, storing block data, participating in consensus mechanisms, etc. By selecting nodes appropriately, the stable operation, efficient processing, and data security of the blockchain network can be ensured. The process also includes step S460, which adds the W nodes to the selection result. Adding these W nodes to the selection result may be used to process specific tasks or requests in the blockchain network, such as verifying transactions, storing block data, etc.
[0034] In one possible implementation, step S400 further includes step S470, which involves performing a demand analysis on the data to be stored based on the node comprehensive score to obtain data storage requirements. These requirements include data access requirements and data storage volume requirements. Based on the characteristics of the data to be stored (such as data type, access frequency, importance, etc.), and combined with the node comprehensive score, a data storage demand analysis is performed to obtain data storage requirements, including data access requirements (such as real-time performance, access frequency, access latency, concurrent access volume, etc.) and data storage volume requirements (such as total data volume, growth rate, data type, and data importance, etc.).
[0035] The method also includes step S480, which involves performing growth analysis on the N data segments based on the data access requirements and data storage requirements, combined with the data type information, to generate a data growth trend. Considering data type information (such as structured data, unstructured data, etc.), as well as historical growth patterns and future predictions, growth analysis is performed on the N data segments to generate a growth trend for each data segment, guiding subsequent data replication and distribution strategies. The method also includes step S490, which involves replicating the N data segments according to the data growth trend to determine N data replica segments. Based on the data growth trend, and considering factors such as data importance, access frequency, and fault tolerance requirements, the number of replicas required for each data segment is determined, and corresponding replicas are created for each data segment, forming N data replica segments to improve data availability, reliability, and fault tolerance.
[0036] The method also includes step S4100, distributing the N data replica fragments to the W nodes for data distribution testing and generating test results. Distributing the N data replica fragments to the W nodes in the blockchain network for data distribution testing includes aspects such as data availability, reliability, performance, and security. This ensures uniform data distribution, reduces data skew, determines the number and location of replicas, and establishes data consistency guarantee mechanisms (such as real-time replication, asynchronous replication, etc.), while considering the balance between data consistency and system fault tolerance. The method tests data access speed and response time on the nodes, simulates multiple users or requests accessing data simultaneously, tests the concurrent processing capabilities of the nodes, simulates node failures or data loss, tests the system's fault recovery capabilities and data redundancy effects, and tests the security of data encryption, decryption, and transmission. Test results are generated, including specific performance metrics, fault recovery time, and the discovery and remediation of security vulnerabilities. The method also includes step S4200, formulating the data distribution strategy based on the test results. Based on the test results, formulate or adjust the data distribution strategy. The strategy may include optimizing node selection, adjusting the number of data replicas, and improving data access paths to ensure efficient, secure, and reliable data storage, and to meet business needs and performance requirements.
[0037] In one possible implementation, step S4100 further includes step S4110, distributing the N data replica fragments to the W nodes and determining whether the data distribution test of the W nodes has reached a preset distribution balance threshold. The preset distribution balance threshold is a pre-set standard used to determine whether the data distribution has reached a balanced state. It is determined based on multiple factors, such as load differences between nodes, the balance of data access efficiency, and the rationality of storage utilization. After the data distribution test is completed, the test results are compared with the preset distribution balance threshold. If the test results meet or exceed the threshold requirements, it indicates that the current data distribution is balanced and can meet the system's performance and reliability requirements. The implementation also includes step S4120, where if the data distribution test of the W nodes does not reach the preset distribution balance threshold, a reorganization instruction is generated. If the test results show that the data distribution has not reached the preset balance threshold, a reorganization instruction is generated to guide how to reorganize the data structure of the N data replica fragments to improve the unbalanced state of the data distribution.
[0038] It also includes step S4130, which executes the reorganization instruction to reorganize the data structure of the N data replica fragments, and redistributes them to the W nodes for secondary data distribution testing based on the reorganization results. This process is iterated until the data distribution test of the W nodes reaches the preset distribution balance threshold, and the test results are generated and output. According to the reorganization instruction, the data structure of N data replica fragments is reorganized, and the data replica fragments are processed to ensure that the reorganized data structure can more effectively balance the load of nodes, improve data access efficiency, and meet other preset performance and reliability requirements. Based on the reorganization result, the new data replica fragments are distributed to W nodes. Then, the load capacity of the nodes, network bandwidth, storage resources, and other factors are re-evaluated to ensure that the data can be reasonably distributed across the nodes. The data distribution test is performed again on the W nodes to verify whether the reorganization and redistribution operations have effectively improved the unbalanced state of the data distribution and to check whether the preset distribution balance threshold has been reached. The iteration continues until the data distribution test meets the preset balance threshold. The final test result is generated and output, reflecting the optimized data distribution state, including key indicators such as the load balancing between nodes, data access efficiency, and storage utilization.
[0039] In one possible implementation, step S4130 further includes step S4131, which involves performing data analysis on the N data replica fragments to obtain multiple data structures, wherein the multiple data structures correspond to the N data replica fragments. The data analysis of the N data replica fragments involves in-depth analysis of the content, structure, format of each data replica fragment, and the relationships between them, resulting in multiple different data structures that reflect the inherent logic and connections between the data replica fragments. Each data structure corresponds to a specific set of data replica fragments.
[0040] The method also includes step S4132, which involves extracting the association between the multiple data structures and the N data replica fragments, defining fields for the N data replica fragments, and determining target data fields. Defining fields for the N data replica fragments involves identifying key information elements in the data replica fragments, such as name, value, type, and unit, and defining them as different fields. This further determines the target data fields, which are those fields that are most critical and important for subsequent data processing, analysis, or application.
[0041] The process also includes step S4133, which involves formulating a reorganization strategy according to the target data field to reorganize the data structure of the N data replica fragments, generating the reorganization result. Based on the requirements of the target data field, a corresponding reorganization strategy is formulated. This strategy guides how to reorganize the data structure of the N data replica fragments to better meet the needs of data processing. This includes various operations such as data merging, splitting, deduplication, transformation, and sorting. By executing these operations, a new data structure, i.e., the reorganization result, can be generated, thereby improving the efficiency and accuracy of data processing.
[0042] Step S500: The N encrypted data fragments are distributed to the blockchain network for data storage verification according to the data distribution strategy. Based on the storage verification results, the N encrypted data fragments are distributed for storage. Utilizing the data distribution mechanism of the blockchain network (such as a P2P network, distributed peer-to-peer network, etc.), suitable nodes are selected from the blockchain network according to the data distribution strategy. The encrypted data fragments are distributed to the selected nodes. The address management mechanism in the blockchain network (such as the Kademlia protocol) is used to manage the addresses of the encrypted data fragments, ensuring that the data of each node matches the data of other nodes. Simultaneously, after receiving the encrypted data fragments, the nodes maintain the consistency and synchronization of data across all nodes in the network through a distributed ledger and consensus mechanism. After the encrypted data fragments are distributed to multiple nodes, distributed storage is achieved, improving data reliability and availability. Even if some nodes fail or are attacked, other nodes can still maintain data integrity and accessibility. In this blockchain system, the hash value of each encrypted fragment is recorded on the blockchain as a verification basis. Randomly selected nodes are required to provide proof of the fragment's existence. Nodes reach a consensus on the verification result through a consensus algorithm. Once the verification result is on the chain, it cannot be tampered with, ensuring credibility. Nodes in the blockchain network periodically synchronize their data to ensure data consistency and up-to-dateness. During synchronization, nodes exchange the latest block and transaction information and update their locally stored data. Verified nodes are authorized to store encrypted fragments, forming a decentralized storage network. If a node fails verification, its stored fragments are redistributed to other nodes. Integrity is checked periodically, and redundant fragments are used to recover lost data. Based on the access permissions set in the data distribution strategy, the blockchain network strictly controls data access. Only authorized users can access and process specific encrypted data fragments and verify the fragment status at any time through the blockchain, achieving truly decentralized storage and thus protecting data privacy and security.
[0043] In the above text, refer to Figure 1 A blockchain-based decentralized data security storage method according to embodiments of the present invention is described in detail. Next, reference will be made to... Figure 2 A blockchain-based decentralized data security storage system according to embodiments of the present invention is described.
[0044] The blockchain decentralized data security storage system according to embodiments of the present invention addresses the technical problems of existing distributed data storage, such as the inability to ensure data is stored on secure, reliable, and efficient nodes, and the difficulty in guaranteeing the security, privacy, and reliability of data during transmission and storage. It achieves the technical effect of improving data security, privacy, data storage efficiency, and reliability. The blockchain decentralized data security storage system includes: a data sharding processing module 10, an encrypted data fragment acquisition module 20, a blockchain network node determination module 30, a data distribution strategy formulation module 40, and a data storage module 50.
[0045] The system comprises: a data sharding processing module 10, which shards the data to be stored into N data fragments, where N is an integer greater than 1; an encrypted data fragment obtaining module 20, which encrypts the N data fragments to obtain N encrypted data fragments; a blockchain network node determining module 30, which retrieves application scenario information of the data to be stored to perform storage evaluation on the blockchain network and determines M nodes of the blockchain network based on the evaluation results, where M is an integer greater than or equal to 2; a data distribution strategy formulating module 40, which selects nodes by combining the node type with the M nodes of the blockchain network and formulates a data distribution strategy based on the selection results; and a data storage module 50, which distributes the N encrypted data fragments to the blockchain network for data storage verification according to the data distribution strategy and performs distributed storage of the N encrypted data fragments based on the storage verification results.
[0046] The specific configuration of the data sharding processing module 10 will be described in detail below. The data sharding processing module 10 may further include: determining a sharding key based on the data attributes of the data to be stored; extracting the key value of the sharding key and calculating it to determine multiple data sharding parameters, including a data sharding range, a data sharding quantity, and load balancing parameters; mapping the data to be stored using the sharding key to obtain a data mapping table; and performing data sharding according to the data sharding range and the data sharding quantity based on the load balancing parameters and the data mapping table to generate the N data fragments.
[0047] The specific configuration of the blockchain network node determination module 30 will be described in detail below. The blockchain network node determination module 30 further includes: performing data analysis based on the data attributes of the data to be stored to determine multiple data sources, wherein the multiple data sources have data type information; performing data characteristic analysis on the multiple data sources based on the data type information, and matching and determining the application scenario information of the data to be stored based on the characteristic analysis results; extracting data access frequency based on the application scenario information of the data to be stored, and formulating multiple evaluation indicators; evaluating the performance requirements of the blockchain network according to the multiple evaluation indicators, and obtaining evaluation results.
[0048] The following will describe in detail the specific configuration of the infrared camera deployment array matching module 30. The infrared camera deployment array matching module 30 may further include: traversing the M nodes of the blockchain network through a network discovery mechanism to identify node types; identifying the M nodes based on the identification results to generate multiple identification results; determining whether any of the M nodes meet preset performance indicators based on the multiple identification results; extracting the nodes that meet the preset performance indicators for trust analysis; generating a comprehensive node score based on the analysis results; retrieving the load balancing parameters and combining them with the comprehensive node score to generate a node selection strategy; executing the node selection strategy to select nodes from the M nodes of the blockchain network, determining W nodes, where W is an integer greater than 0 and less than or equal to M; and adding the W nodes to the selection results.
[0049] The specific configuration of the data distribution strategy formulation module 40 will be described in detail below. The data distribution strategy formulation module 40 may further include: performing a demand analysis on the data to be stored based on the node comprehensive score to obtain data storage requirements, which include data access requirements and data storage volume requirements; performing a growth analysis on the N data segments based on the data access requirements and the data storage volume requirements, combined with the data type information, to generate a data growth trend; replicating the N data segments according to the data growth trend to determine N data replica segments; distributing the N data replica segments to the W nodes for data distribution testing to generate test results; and formulating the data distribution strategy based on the test results.
[0050] The specific configuration of the data distribution strategy formulation module 40 will be described in detail below. The data distribution strategy formulation module 40 may further include: distributing the N data replica fragments to the W nodes; determining whether the data distribution test of the W nodes reaches a preset distribution balance threshold; if the data distribution test of the W nodes does not reach the preset distribution balance threshold, generating a reorganization instruction; executing the reorganization instruction to reorganize the data structure of the N data replica fragments; redistributing the data to the W nodes based on the reorganization result for a second data distribution test; iterating in this way until the data distribution test of the W nodes reaches the preset distribution balance threshold; and generating and outputting the test result.
[0051] The specific configuration of the data distribution strategy formulation module 40 will be described in detail below. The data distribution strategy formulation module 40 may further include: performing data analysis on the N data replica fragments to obtain multiple data structures, wherein the multiple data structures correspond to the N data replica fragments; extracting the association between the multiple data structures and the N data replica fragments; defining fields for the N data replica fragments; determining target data fields; and formulating a reorganization strategy according to the target data fields to reorganize the data structures of the N data replica fragments, generating the reorganization result.
[0052] The blockchain decentralized data security storage system provided in this embodiment of the invention can execute the blockchain decentralized data security storage method provided in any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0053] Although this application makes various references to certain modules in the system according to the embodiments of this application, any number of different modules can be used and run on user terminals and / or servers. The various units and modules included are only divided according to functional logic, but are not limited to the above division, as long as the corresponding functions can be achieved; in addition, the specific names of each functional unit are only for easy distinction between each other and are not used to limit the scope of protection of this invention.
[0054] The specific embodiments described above do not constitute a limitation on the scope of protection of this application. Those skilled in the art should understand that various modifications, combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this application should be included within the scope of protection of this application.
Claims
1. A blockchain-based decentralized data security storage method, characterized in that, The method includes: The data to be stored is divided into N data fragments, where N is an integer greater than 1. Encrypt the N data segments by traversing them to obtain N encrypted data segments; The application scenario information of the data to be stored is retrieved to evaluate the storage of the blockchain network. Based on the evaluation results, M nodes of the blockchain network are determined, where M is an integer greater than or equal to 2. The M nodes of the blockchain network are traversed to select nodes based on their types, and a data distribution strategy is formulated based on the selection results. The N encrypted data fragments are distributed to the blockchain network for data storage verification according to the data distribution strategy, and the N encrypted data fragments are distributed for storage based on the storage verification results.
2. The blockchain decentralized data security storage method as described in claim 1, characterized in that, The data to be stored is divided into fragments to generate N data segments. Methods include: Determine the sharding key based on the data attributes of the data to be stored; Extract the key value of the sharding key and perform calculations to determine multiple data sharding parameters, including data sharding range, number of data shards, and load balancing parameters; The data to be stored is mapped using the sharding key to obtain a data mapping table; Based on the load balancing parameters and the data mapping table, the data is sharded according to the data sharding range and the number of data shards to generate the N data segments.
3. The blockchain decentralized data security storage method as described in claim 2, characterized in that, The method involves retrieving application scenario information of the data to be stored to perform a storage evaluation on the blockchain network, and determining the M nodes of the blockchain network based on the evaluation results. Based on the data attributes of the data to be stored, data analysis is performed to determine multiple data sources, and the multiple data sources have data type information; Based on the data type information, data characteristic analysis is performed on the multiple data sources, and the application scenario information of the data to be stored is determined by matching the characteristic analysis results. Based on the application scenario information of the data to be stored, extract the data access frequency and formulate multiple evaluation indicators; The performance requirements of the blockchain network are evaluated based on the aforementioned multiple evaluation metrics, and the evaluation results are obtained.
4. The blockchain decentralized data security storage method as described in claim 3, characterized in that, The method for traversing the M nodes of the blockchain network and selecting nodes based on node type includes: The M nodes of the blockchain network are traversed through the network discovery mechanism to identify the node type. Based on the identification results, the M nodes are identified, and multiple identification results are generated. Based on the multiple identification results, determine whether any of the M nodes meet the preset performance indicators; Extract nodes that meet the preset performance indicators and perform trust analysis; generate a comprehensive node score based on the analysis results. The load balancing parameters are retrieved and combined with the node comprehensive score to generate a node selection strategy; The node selection strategy is executed to select nodes from the M nodes of the blockchain network, and W nodes are determined, where W is an integer greater than 0 and less than or equal to M. Add the W nodes to the selection result.
5. The blockchain decentralized data security storage method as described in claim 4, characterized in that, Develop a data distribution strategy based on the selection results. Methods include: Based on the comprehensive node score, a demand analysis is performed on the data to be stored to obtain data storage requirements, which include data access requirements and data storage volume requirements. Based on the data access requirements and data storage requirements, growth analysis is performed on the N data fragments in conjunction with the data type information to generate a data growth trend. Based on the data growth trend, the N data segments are copied to determine N data copy segments; Distribute the N data replica fragments to the W nodes for data distribution testing and generate test results; The data distribution strategy is formulated based on the test results.
6. The blockchain decentralized data security storage method as described in claim 5, characterized in that, Distribute the N data replica fragments to the W nodes for data distribution testing and generate test results. The method includes: The N data replica fragments are distributed to the W nodes, and it is determined whether the data distribution test of the W nodes has reached a preset distribution balance threshold. If the data distribution test of the W nodes does not reach the preset distribution balance threshold, a reorganization instruction is generated; The reorganization instruction is executed to reorganize the data structure of the N data replica fragments. Based on the reorganization result, the data is redistributed to the W nodes for secondary data distribution testing. This process is iterated until the data distribution test of the W nodes reaches the preset distribution balance threshold, and the test result is generated and output.
7. The blockchain decentralized data security storage method as described in claim 6, characterized in that, The method for reorganizing the N data replica fragments by executing the reorganization instruction includes: Data analysis is performed on the N data replica fragments to obtain multiple data structures, and the multiple data structures correspond to the N data replica fragments; Extract the association between the multiple data structures and the N data replica fragments, define the fields of the N data replica fragments, and determine the target data fields; Based on the target data field, a reorganization strategy is formulated to reorganize the data structure of the N data copy fragments, generating the reorganization result.
8. A blockchain-based decentralized data security storage system, characterized in that: The system is used to implement the blockchain decentralized data security storage method according to any one of claims 1-7, and the system includes: A data sharding processing module is used to shard the data to be stored, generating N data fragments, where N is an integer greater than 1. An encrypted data fragment acquisition module is used to traverse the N data fragments and encrypt them to obtain N encrypted data fragments; A blockchain network node determination module is used to retrieve application scenario information of the data to be stored to perform storage evaluation on the blockchain network, and determine M nodes of the blockchain network based on the evaluation results, where M is an integer greater than or equal to 2. A data distribution strategy formulation module is used to traverse the M nodes of the blockchain network, select nodes based on node type, and formulate a data distribution strategy based on the selection result. The data storage module is used to distribute the N encrypted data fragments to the blockchain network for data storage verification according to the data distribution strategy, and to perform distributed storage of the N encrypted data fragments based on the storage verification results.
Citation Information
Patent Citations
Data backup storage method and system based on block chain
CN117421157A
Artificial intelligence data aggregation method based on big data
CN119690974A
Cross-engine data processing method and device and computer equipment
CN120067223A
Distributed data security storage system and method based on block chain
CN120509045A