A data encryption storage device and data encryption storage method based on blockchain
Through type extraction and scale prediction of blockchain data, combined with operation location and authority control, encryption methods adapted to different needs are generated, which solves the problem of insufficient data storage flexibility in the existing technology and achieves efficient and secure data encryption. storage.
Patent Information
- Application Number
- CN202310670670.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-07
- Publication Date
- 2024-10-25
- Estimated Expiration
- 2043-06-07
AI Technical Summary
The existing blockchain-based data encryption storage method is too single, insufficiently flexible, unable to meet different data storage needs, and in some cases overly complicates simple data storage.
By obtaining blockchain storage data, data type extraction and scale prediction are performed, corresponding encryption methods are generated according to data type and scale, and fine-grained access permission control is generated based on operation location and permission data to achieve refined encrypted storage of data.
It improves data security and storage efficiency, ensures that only users with legal permissions can access data, meets different needs, avoids data leakage and tampering, and simplifies complex storage processes.
Smart Images

Figure CN116842559B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of blockchain technology, and in particular to a blockchain-based data encryption storage device and a data encryption storage method. Background Art
[0002] Blockchain is a distributed ledger technology that uses cryptography and decentralized networks to record and verify transactions. It initially attracted attention as the underlying technology of Bitcoin, but has now been widely used in various fields. Blockchain distributes transaction records to computer nodes of multiple participants and uses cryptography to ensure the security and integrity of data. Data encryption storage method is a technology that protects data security and privacy by encrypting data. It uses cryptographic algorithms to convert data into ciphertext form so that unauthorized users cannot read or understand the data content. Only users with the correct key or permission can decrypt the encrypted data to obtain the original plaintext data. Data encryption storage methods usually include key management, encryption algorithm selection, data encryption and decryption and other key steps to ensure the security and confidentiality of data during storage and transmission. In actual processes, the methods used by blockchain-based data encryption storage methods in different situations are too single and inflexible, which may fail to meet specific data storage needs or overly complicate some simple data storage situations. Summary of the invention
[0003] In order to solve the above technical problems, the present invention proposes a data encryption storage device and a data encryption storage method based on blockchain to solve at least one of the above technical problems.
[0004] This application provides a data encryption storage method based on blockchain, comprising the following steps:
[0005] Step S1: Obtain blockchain storage data, and extract data types and predict data scale based on the blockchain storage data, thereby obtaining blockchain storage type data and blockchain storage scale data;
[0006] Step S2: Processing the data storage requirement according to the blockchain storage type data and the blockchain storage scale data, thereby obtaining the first blockchain storage encryption method data;
[0007] Step S3: Acquire the operation location data, and perform data location authority processing according to the operation location data and the blockchain storage type data, thereby obtaining the second blockchain storage encryption mode data;
[0008] Step S4: performing access permission function processing according to the first blockchain storage encryption method data and the second blockchain storage encryption method data to generate third blockchain storage encryption method data;
[0009] Step S5: Encrypt the blockchain storage data using the third blockchain storage encryption method data, thereby generating blockchain storage encrypted data, and sending it to the data encryption storage device for data encryption storage operation.
[0010] In the present invention, by adopting blockchain storage and encryption technology, the security of data can be effectively improved. The decentralized and distributed characteristics of blockchain make data more difficult to tamper with and forge, ensuring the integrity and credibility of stored data. The application of encryption algorithm ensures the confidentiality of data, so that data stored on the blockchain can only be accessed and decrypted by authorized users, providing a higher level of data protection. Through the generation of the second blockchain storage encryption method data and the access permission function processing, refined permission control of data is realized. According to the operation location data and the blockchain storage type data, the access rights of a specific location or user to the stored data can be limited to ensure that only users with legal permissions can access and operate the data. This fine-grained permission control helps prevent unauthorized data access and abuse. According to the processing of blockchain storage scale data and the first blockchain storage encryption method data, the method can effectively adjust the requirements and encryption methods of data storage to adapt to data storage of different types and scales. Through reasonable storage requirement processing and encryption method selection, the efficiency of data storage and encryption can be improved, and the storage space occupation and computing resource consumption can be reduced. By using the third blockchain storage encryption method data to encrypt the blockchain storage data, the integrity of the data during storage and transmission is ensured. The encrypted data can be safely transferred to the data encryption storage device for storage, avoiding the risk of data leakage and tampering. It can meet the data storage needs in different situations, thus avoiding over-complication of some simple data storage needs and ensuring security.
[0011] Preferably, step S1 specifically includes:
[0012] Step S11: Obtain blockchain storage data;
[0013] Step S12: extracting the data structure and identifying the data content of the blockchain storage data, thereby obtaining the blockchain storage data structure data and the blockchain storage content data;
[0014] Step S13: Perform storage type processing according to the blockchain storage data structure data and the blockchain storage content data, thereby obtaining blockchain storage type data;
[0015] Step S14: extracting storage rate characteristics of blockchain storage data to obtain blockchain storage rate characteristic data, and extracting blockchain storage service characteristics of blockchain storage type data to obtain blockchain storage service characteristic data;
[0016] Step S15: performing a first data prediction based on the blockchain storage rate characteristic data, thereby obtaining first blockchain storage scale prediction data;
[0017] Step S16: performing a second data prediction based on the blockchain storage service characteristic data, thereby obtaining second blockchain storage scale prediction data;
[0018] Step S17: Perform local storage capacity limitation processing according to the first blockchain storage scale prediction data and the second blockchain storage scale prediction data to obtain blockchain storage scale data.
[0019] In the present invention, by obtaining blockchain storage data, the method ensures the integrity of the data. As a distributed ledger, blockchain has the characteristics of decentralization and immutability, which can effectively prevent data from being tampered with or deleted. By extracting the data structure and identifying the content of the blockchain storage data, the method can accurately understand the organizational structure and content of the data. This is helpful for subsequent storage type processing and business feature extraction. According to the blockchain storage data structure data and content data, the method performs storage type processing on the data. This means that different types of data can be stored in different ways, such as distributed storage, cloud storage or local storage, to meet the requirements of data security and access efficiency. By extracting storage rate features and business features from blockchain storage data, the method can obtain useful information about data storage rate and business features. This helps to optimize the performance and resource allocation of the storage system. By performing storage scale prediction and local storage capacity limitation processing, the method can predict and evaluate the scale requirements of the storage system and determine the appropriate local storage capacity. This helps to optimize the utilization of storage resources and improve the scalability and efficiency of the system.
[0020] Preferably, step S17 is specifically:
[0021] Obtain local storage system parameter data, and use the local storage system parameter data to correct the first blockchain storage scale prediction data and the second blockchain storage scale prediction data, respectively, so as to obtain the first blockchain storage scale correction prediction data and the second blockchain storage scale correction prediction data;
[0022] The weighted merging is performed according to the first blockchain storage scale correction prediction data and the second blockchain storage scale correction prediction data, so as to obtain the blockchain storage scale data; wherein the weighted merging is calculated by the blockchain storage scale weighted merging calculation formula, so as to generate the blockchain storage scale weighted merging value, so as to obtain the blockchain storage scale data, and the blockchain storage scale weighted merging calculation formula is specifically as follows:
[0023] ;
[0024] The combined value of the blockchain storage scale weight, is the combined coefficient term, is the first merging weight coefficient, To incorporate the constant term, is the second merging weight coefficient, Corrected forecast data for the first blockchain storage size, To incorporate the initial adjustments, is the third merging weight coefficient, Corrected forecasts for the second blockchain storage size, is the fourth merging weight coefficient, is the error correction term, is the fifth merging weight coefficient, is the combined index factor coefficient, is the sixth combined weight coefficient, is the merge scaling factor.
[0025] The present invention constructs a blockchain storage scale weight merging calculation formula, which fully considers the merging coefficient term , the first merging weight coefficient , Combine constant terms , the second merge weight coefficient , First blockchain storage scale revised forecast data , Merge initial adjustments , the third combined weight coefficient , Second blockchain storage scale revised forecast data , the fourth combined weight coefficient , Error correction term , the fifth combined weight coefficient , Merger index factor coefficient , the sixth combined weight coefficient , Merge scaling factor And the interaction between them, where the combined coefficient term Used to adjust the weights of each item in the merging process. It can be adjusted according to actual needs. The first merging weight coefficient Indicates the weight of the first item, which is used to adjust the contribution of the first item to the combined value of the storage scale weight, error correction item Used to correct the error term in the merging process, which can be adjusted according to actual needs, and the merging index factor coefficient Used to adjust the exponential value of the exponential function, affecting the exponential term in the merging process and the merging scaling factor Used to adjust the scaling value during the merging process, which can be adjusted according to actual needs. This calculation formula obtains the final storage scale weight value through weight merging. By adjusting various coefficients and constant terms, different factors can be flexibly adjusted and weighed according to actual needs and system characteristics, so as to more accurately evaluate the scale requirements of blockchain storage. This helps to optimize the configuration of storage resources, improve the performance and efficiency of the system, and ensure that the storage scale matches the actual needs, providing more precise guidance for blockchain-based data encryption storage methods.
[0026] In the present invention, by obtaining the parameter data of the local storage system, the method can obtain various parameter information related to the local storage system, such as storage capacity, bandwidth, and delay. The first blockchain storage scale prediction data is corrected using the local storage system parameter data. This step takes into account the actual characteristics of the local storage system, such as available storage space, network bandwidth limitations, etc., so as to more accurately predict the scale requirements of the first blockchain storage. Similarly, the second blockchain storage scale prediction data is corrected using the local storage system parameter data. This step further comprehensively considers the limitations and characteristics of the local storage system to ensure that the scale prediction of the second blockchain storage is more accurate. Weighted merging is performed based on the first blockchain storage scale correction prediction data and the second blockchain storage scale correction prediction data. The weight here reflects the importance or credibility of different prediction data, and by merging weighted data, more comprehensive and accurate blockchain storage scale data is obtained. Step S17 in the blockchain-based data encryption storage method uses the local storage system parameter data for correction and weight merging, which can more accurately predict and evaluate the scale requirements of blockchain storage. This helps to optimize the resource allocation of the storage system, improve the availability and performance of the system, and ensure that the storage capacity matches the actual needs, thereby providing a more effective solution for the encrypted storage of data.
[0027] Preferably, step S2 specifically includes:
[0028] Step S21: Perform data sensitivity assessment based on blockchain storage type data to obtain blockchain sensitivity data;
[0029] Step S22: Select an encryption algorithm according to the blockchain sensitivity data and the blockchain storage scale data, so as to obtain the first blockchain storage encryption method data.
[0030] In the present invention, by performing data sensitivity assessment and encryption algorithm selection, a suitable encryption method can be selected according to the sensitivity of different data, thereby improving data security. Sensitive data will be protected by a stronger encryption algorithm to reduce the risk of data leakage and information tampering. According to the storage scale data and encryption algorithm selection, storage resources can be optimized. Smaller-scale storage requirements may use lightweight encryption algorithms, while larger-scale storage requirements may require more powerful encryption algorithms. By reasonably selecting encryption methods, unnecessary waste of resources can be avoided and the utilization of storage resources can be improved. This method takes into account the combined impact of multiple factors such as data sensitivity and storage scale. According to different storage requirements and data characteristics, a suitable encryption method can be flexibly selected to make the system more adaptable and flexible.
[0031] Preferably, the blockchain sensitivity data includes first blockchain sensitivity data and second blockchain sensitivity data, the first blockchain sensitivity data and the second blockchain sensitivity data are different blockchain sensitivity data, the first blockchain storage encryption mode data includes first storage encryption mode data and second storage encryption mode data, and step S22 is specifically:
[0032] Generate a first encryption method according to the first blockchain sensitivity data and the blockchain storage scale data, thereby obtaining first storage encryption method data;
[0033] A second encryption method is generated according to the second blockchain sensitivity data and the blockchain storage scale data, thereby obtaining second storage encryption method data.
[0034] In the present invention, by generating corresponding storage encryption methods according to different blockchain sensitivity data and storage scale data, the security of stored data can be protected more accurately. Data of different sensitivity levels can be protected by different encryption methods, thereby improving the confidentiality and protection capabilities of the data. Due to the existence of different sensitivity data sets and storage scale data, the method allows the generation of corresponding storage encryption methods according to different situations. This provides greater flexibility and adaptability, enabling the system to select the best encryption method according to specific needs and perform customized data protection for different storage needs. By generating corresponding storage encryption methods according to different sensitivity data sets and storage scale data, the configuration of storage resources can be optimized. Different encryption methods may have different computing and storage costs, so by selecting a suitable encryption method according to actual needs, effective utilization of resources and efficient execution of storage operations can be achieved.
[0035] Preferably, step S3 specifically includes:
[0036] Step S31: Acquire operation location data based on the location verification mechanism of the blockchain network;
[0037] Step S32: performing permission limitation according to the operation location data and the blockchain storage type data, thereby obtaining blockchain storage permission data, wherein the blockchain storage permission data includes first blockchain storage permission data and second blockchain storage permission data;
[0038] Step S33: Generate second blockchain storage encryption method data according to the blockchain storage authority data.
[0039] In the present invention, the operation location data is obtained by a location verification mechanism based on the blockchain network, which can ensure the legitimacy and accuracy of data operations. At the same time, by comparing and verifying the operation location data with the storage type data, and generating a corresponding storage encryption method according to the permission data, the security and confidentiality of data access can be ensured. Through the permission definition in step S32, data access rights can be restricted according to the operation location and storage type data. Only authorized locations and users can obtain the corresponding storage permission data, thereby ensuring the compliance and privacy protection of the data. Such a permission control mechanism can effectively prevent unauthorized data access and operation. By generating the second blockchain storage encryption method data according to the blockchain storage permission data, a suitable encryption method can be selected for different permission levels and storage requirements. This provides flexibility and customizability, enabling the system to select the best encryption method according to specific permission requirements and security requirements, and further enhance the reliability and adaptability of data protection.
[0040] Preferably, the authority limitation is calculated by an authority limitation calculation formula to generate a blockchain storage authority limitation value, so as to obtain blockchain storage authority data, wherein the authority limitation calculation formula is specifically:
[0041] ;
[0042] The permission limit value for blockchain storage, is the first permission item, is a constant term, is the second permission item, To manipulate location data, is the initial adjustment item, is the third permission item, Stores type data for blockchain, is the fourth permission item, Verify data for IP addresses, is the fifth permission item, To correct the adjustment items, Verify data for the blockchain network.
[0043] The present invention constructs a permission limitation calculation formula, which fully considers the first permission item , constant term , Second permission item , Operation location data , Initial Adjustment , Third permission item , Blockchain storage type data 、The fourth permission item , IP address verification data 、The fifth permission item , Correction adjustment items , blockchain network verification data The comprehensive evaluation of blockchain storage permissions is realized through the interaction of different parameters. Different parameters represent different permissions. Each permission has a corresponding weight and function adjustment in the calculation to reflect its importance and influence in the permission limitation. The parameters in the calculation formula include the operation location data , Blockchain storage type data , IP address verification data Verify data with blockchain network , the changes of these parameters can realize the dynamic adjustment of permission restrictions. For example, the operation location data and IP address verification data Can reflect the current user's location and identity information, blockchain storage type data Verify data with blockchain network It can reflect the current storage environment and network status. Through the changes of these parameters, the permission limit value can be dynamically adjusted to adapt to different environments and needs. The parameter weights and function adjustments in the calculation formula reflect the relative importance and influence of each permission item in the permission limit. By adjusting the weights and functions, different permission items can be flexibly weighted to meet actual needs and security requirements. For example, some permission items may be more important to security and can be given higher weights, while some permission items may have a greater impact on performance, which can be reasonably balanced through function adjustment. Multiple parameters in the calculation formula represent different permission items, including multiple dimensions such as location, type, and verification. By comprehensively considering the information of these dimensions, more accurate and comprehensive permission limits can be achieved. Permission limits in different dimensions can complement each other and improve the system's control over stored data. Through the permission limit calculation formula, the weights and function adjustments of different permission items can be comprehensively considered, and the permission limit value can be dynamically adjusted to achieve detailed control and evaluation of blockchain storage permissions, thereby improving data security and permission management capabilities.
[0044] Preferably, the first blockchain stores encryption data including key management policy data, and the second blockchain stores encryption data including access control mechanism data, and step S4 is specifically as follows:
[0045] Step S41: Obtain user role data;
[0046] Step S42: Generate permissions through a preset smart contract according to the access control mechanism data and the user role data, thereby obtaining the user role permission data;
[0047] Step S43: Generate third blockchain storage encryption method data according to the user role authority data, the first blockchain storage encryption method data and the second blockchain storage encryption method data.
[0048] In the present invention, the user role permission data is generated by the smart contract in step S42, which can ensure the accuracy and precision of the permission. According to the access control mechanism data and the user role data, the smart contract can generate specific permission settings according to preset rules to ensure that the permissions of each user are consistent with their roles and prevent unauthorized access and operations. By integrating the user role permission data with the first blockchain storage encryption method data and the second blockchain storage encryption method data, a third blockchain storage encryption method data that adapts to different user roles and permissions can be generated. This encryption method can be customized according to the user's specific permission requirements and data protection requirements, providing a higher level of data security and confidentiality. Through the third blockchain storage encryption method data generated in step S43, refined access control of data can be achieved. According to the user role permission data and the encryption method data, the system can ensure that only users with corresponding permissions can decrypt and access the corresponding data, thereby enhancing the confidentiality and protection capabilities of the data.
[0049] Preferably, step S5 is specifically:
[0050] Encrypting the blockchain storage data using the data encryption method in the third blockchain storage encryption method data, thereby generating preliminary blockchain storage encrypted data;
[0051] The access control policy data in the third blockchain storage encryption method data is used to perform access restriction marking on the preliminary blockchain storage encrypted data, thereby obtaining the blockchain storage encrypted data and sending it to the data encryption storage device for data encryption storage operations.
[0052] In the present invention, the blockchain storage data is encrypted by the data encryption method in step S51. In this way, the security of the data during transmission and storage can be protected. Even if the data is obtained by unauthorized users, the data content cannot be decrypted and accessed, thereby improving the confidentiality and protection capabilities of the data. The access control policy data in step S52 is used to mark the preliminary blockchain storage encrypted data for access restrictions. In this way, the access rights of the data can be finely controlled and restricted according to the set policy. Only users who meet the authorization conditions can decrypt and access the corresponding data, thereby strengthening the access control capabilities of the data and preventing unauthorized access. By combining the data encryption method and access control policy data in the third blockchain storage encryption method data, customized data encryption storage can be achieved. According to actual needs and security requirements, a suitable data encryption method is selected, and the corresponding access control policy is defined to meet the data security requirements of different scenarios and applications.
[0053] Preferably, a data encryption storage device based on blockchain is characterized by comprising:
[0054] at least one processor;
[0055] a memory communicatively coupled to the at least one processor;
[0056] The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the blockchain-based data encryption storage method as described above.
[0057] The beneficial effects of the present invention are: obtaining blockchain storage data, and extracting data types and predicting data scale. In this way, the characteristics and scale of the data to be stored can be fully understood and grasped, providing an accurate data basis for the processing of subsequent steps. Through data type extraction, corresponding storage and encryption methods can be adopted according to different types of data to increase data security and storage efficiency. Data storage requirements are processed according to blockchain storage type data and blockchain storage scale data. This means that the storage system can dynamically manage and adjust data according to actual needs. By reasonably processing storage requirements, the resource utilization and performance of the storage system can be optimized, while improving data security and reliability. Involving operation location data and blockchain storage type data, it is used to perform data location permission processing. This means that different operation locations can limit the access rights of stored data, thereby achieving more refined and personalized data protection. Through data location permission processing, it can be ensured that only users with legal permissions can access and operate stored data, thereby improving data privacy and security. Using the first blockchain storage encryption method data and the second blockchain storage encryption method data, access permission function processing is performed. This step realizes flexible management and control of access rights. Through mechanisms such as smart contracts, corresponding access rights can be generated according to user roles and permission requirements to ensure that only authorized users can access and operate stored data. The blockchain storage data is encrypted using the third blockchain storage encryption method. This step ensures the confidentiality and security of the stored data during transmission and storage. By selecting the appropriate encryption method and combining it with access control, the stored data can be protected from unauthorized access and malicious attacks. BRIEF DESCRIPTION OF THE DRAWINGS
[0058] Other features, objects and advantages of the present application will become more apparent by reading the detailed description of non-limiting implementations made with reference to the following drawings:
[0059] Figure 1 A flowchart showing a method for encrypting and storing data based on blockchain according to an embodiment of the present invention is shown;
[0060] Figure 2 A flowchart of step S1 of an embodiment is shown;
[0061] Figure 3 A flowchart of step S3 of an embodiment is shown;
[0062] Figure 4 A flow chart of step S4 of an embodiment is shown. DETAILED DESCRIPTION
[0063] The following is a clear and complete description of the technical method of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by technicians in this field without creative work are within the scope of protection of the present invention.
[0064] In addition, the accompanying drawings are only schematic illustrations of the present invention and are not necessarily drawn to scale. The same reference numerals in the figures represent the same or similar parts, and their repeated description will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities and do not necessarily correspond to physically or logically independent entities. The functional entities can be implemented in software form, or implemented in one or more hardware modules or integrated circuits, or implemented in different networks and / or processor methods and / or microcontroller methods.
[0065] It should be understood that, although the terms "first", "second", etc. may be used herein to describe various units, these units should not be limited by these terms. These terms are used only to distinguish one unit from another unit. For example, without departing from the scope of the exemplary embodiments, the first unit may be referred to as the second unit, and similarly the second unit may be referred to as the first unit. The term "and / or" used herein includes any and all combinations of one or more of the listed associated items.
[0066] See also Figures 1 to 4 , the present application provides a data encryption storage method based on blockchain, comprising the following steps:
[0067] Step S1: Obtain blockchain storage data, and extract data types and predict data scale based on the blockchain storage data, thereby obtaining blockchain storage type data and blockchain storage scale data;
[0068] Specifically, for example, a blockchain storage system stores various types of data, such as text documents, images, videos, etc. Data is obtained from the blockchain storage system, and the type is extracted according to the characteristics and format of each data, and the data is classified into text type, image type, and video type. The data scale can be predicted and estimated through the information of the size, quantity, and number of storage blocks of the data, and the blockchain storage scale data can be obtained.
[0069] Step S2: Processing the data storage requirement according to the blockchain storage type data and the blockchain storage scale data, thereby obtaining the first blockchain storage encryption method data;
[0070] Specifically, for example, according to the blockchain storage type data and storage scale data obtained in step S1, the storage requirements required for different types of data are determined. For example, for text type data, a symmetric encryption algorithm is selected for storage encryption; for image type data, a hash function is selected for integrity verification. Depending on the data type and scale, corresponding storage requirements can be formulated to obtain the first blockchain storage encryption method data.
[0071] Step S3: Acquire the operation location data, and perform data location authority processing according to the operation location data and the blockchain storage type data, thereby obtaining the second blockchain storage encryption mode data;
[0072] Specifically, for example, the user's operation location data can be obtained, which can be the user's geographic location information or network location information. Then, according to the operation location data and the blockchain storage type data, data location permission processing can be performed. For example, for some sensitive data, users can be required to be in a specific location to access or modify the data. According to different locations and data types, corresponding data location permission policies can be formulated to obtain the second blockchain storage encryption method data.
[0073] Step S4: performing access permission function processing according to the first blockchain storage encryption method data and the second blockchain storage encryption method data to generate third blockchain storage encryption method data;
[0074] Specifically, for example, the first blockchain storage encryption method data and the second blockchain storage encryption method data are combined to perform access permission function processing. This may include using smart contracts or other mechanisms to generate access permission keys, verify user permissions, and restrict user access to data. Through these processes, a third blockchain storage encryption method data can be generated, which includes access permission functions that comprehensively consider data storage requirements and location permissions.
[0075] Step S5: Encrypt the blockchain storage data using the third blockchain storage encryption method data, thereby generating blockchain storage encrypted data, and sending it to the data encryption storage device for data encryption storage operation.
[0076] Specifically, for example, the blockchain storage data is encrypted using the third blockchain storage encryption method data. According to the encryption algorithm, key management strategy and access control mechanism specified in the third blockchain storage encryption method data, the stored data is encrypted. The encrypted data can be sent to the data encryption storage device, which is responsible for storing and managing the encrypted data.
[0077] In the present invention, by adopting blockchain storage and encryption technology, the security of data can be effectively improved. The decentralized and distributed characteristics of blockchain make data more difficult to tamper with and forge, ensuring the integrity and credibility of stored data. The application of encryption algorithm ensures the confidentiality of data, so that data stored on the blockchain can only be accessed and decrypted by authorized users, providing a higher level of data protection. Through the generation of the second blockchain storage encryption method data and the access permission function processing, refined permission control of data is realized. According to the operation location data and the blockchain storage type data, the access rights of a specific location or user to the stored data can be limited to ensure that only users with legal permissions can access and operate the data. This fine-grained permission control helps prevent unauthorized data access and abuse. According to the processing of blockchain storage scale data and the first blockchain storage encryption method data, the method can effectively adjust the requirements and encryption methods of data storage to adapt to data storage of different types and scales. Through reasonable storage requirement processing and encryption method selection, the efficiency of data storage and encryption can be improved, and the storage space occupation and computing resource consumption can be reduced. By using the third blockchain storage encryption method data to encrypt the blockchain storage data, the integrity of the data during storage and transmission is ensured. The encrypted data can be safely transferred to the data encryption storage device for storage, avoiding the risk of data leakage and tampering. It can meet the data storage needs in different situations, thus avoiding over-complication of some simple data storage needs and ensuring security.
[0078] Preferably, step S1 specifically includes:
[0079] Step S11: Obtain blockchain storage data;
[0080] Specifically, for example, the stored data obtained from the blockchain storage system may be text, images, videos or other forms of data.
[0081] Step S12: extracting the data structure and identifying the data content of the blockchain storage data, thereby obtaining the blockchain storage data structure data and the blockchain storage content data;
[0082] Specifically, for example, the acquired blockchain storage data is parsed and processed to extract the structural information of the data, such as the fields, attributes and relationships of the data. At the same time, the data content is identified and analyzed to determine the actual content and format of the data.
[0083] Step S13: Perform storage type processing according to the blockchain storage data structure data and the blockchain storage content data, thereby obtaining blockchain storage type data;
[0084] Specifically, for example, the storage type of the data is determined based on the data structure and content stored in the blockchain. For example, it is determined whether the data is text, image or video type data, and it is identified and classified.
[0085] Step S14: extracting storage rate characteristics of blockchain storage data to obtain blockchain storage rate characteristic data, and extracting blockchain storage service characteristics of blockchain storage type data to obtain blockchain storage service characteristic data;
[0086] Specifically, for example, by analyzing the blockchain storage data, the storage rate characteristics of the data are extracted, such as the data writing speed, reading speed and transmission speed, etc. At the same time, according to the blockchain storage type data, the business characteristics related to the type of data are extracted, such as the data consensus mechanism, transaction frequency and data storage priority.
[0087] Step S15: performing a first data prediction based on the blockchain storage rate characteristic data, thereby obtaining first blockchain storage scale prediction data;
[0088] Specifically, for example, the extracted storage rate characteristic data is used to apply a prediction algorithm or model to predict the storage demand in the future. This may include the growth trend of the data volume, the fluctuation of storage demand, etc., so as to obtain the first blockchain storage scale prediction data.
[0089] Specifically, for example, according to the characteristics of the blockchain storage rate characteristic data and the problem requirements, a suitable prediction model can be selected. Regression models (such as linear regression, polynomial regression, support vector regression) or time series analysis models (such as ARIMA model, exponential smoothing method) can be used for prediction.
[0090] Step S16: performing a second data prediction based on the blockchain storage service characteristic data, thereby obtaining second blockchain storage scale prediction data;
[0091] Specifically, for example, based on the extracted blockchain storage business characteristic data, the development trend and characteristics of the business are analyzed to predict the changes in storage demand in the future. This may involve user growth rate, business expansion plan, data storage strategy, and thus obtain the second blockchain storage scale prediction data.
[0092] Specifically, for example, the collected blockchain storage business feature data is preprocessed, including data cleaning, removal of outliers, smoothing, etc. This can improve the accuracy and reliability of the data and prepare for subsequent predictive analysis. The preprocessed data is divided into a training set and a test set. Usually, the data is divided in chronological order, with the older data as the training set and the newer data as the test set. According to the characteristics of the blockchain storage business feature data and the problem requirements, a suitable prediction model is selected. Regression models (such as linear regression, polynomial regression, support vector regression, etc.) or time series analysis models (such as ARIMA model, exponential smoothing method, etc.) can be used for prediction.
[0093] Step S17: Perform local storage capacity limitation processing according to the first blockchain storage scale prediction data and the second blockchain storage scale prediction data to obtain blockchain storage scale data.
[0094] Specifically, for example, based on the first blockchain storage scale prediction data and the second blockchain storage scale prediction data, combined with the actual capabilities and resource limitations of the local storage system, determine the appropriate blockchain storage scale. This may include determining requirements and limitations in terms of storage capacity, bandwidth, processing power, etc., thereby obtaining blockchain storage scale data.
[0095] Specifically, for example, storage capacity limitation: compare the first blockchain storage scale prediction data with the local storage capacity upper limit. If it exceeds the upper limit, the storage scale is limited to the upper limit. Compare the second blockchain storage scale prediction data with the local storage bandwidth limit. If it exceeds the bandwidth limit, the storage scale is limited to the range that the bandwidth can support. Compare the first blockchain storage scale prediction data with the local storage rate limit. If it exceeds the rate limit, the storage scale is limited to the range that the rate can handle.
[0096] In the present invention, by obtaining blockchain storage data, the method ensures the integrity of the data. As a distributed ledger, blockchain has the characteristics of decentralization and immutability, which can effectively prevent data from being tampered with or deleted. By extracting the data structure and identifying the content of the blockchain storage data, the method can accurately understand the organizational structure and content of the data. This is helpful for subsequent storage type processing and business feature extraction. According to the blockchain storage data structure data and content data, the method performs storage type processing on the data. This means that different types of data can be stored in different ways, such as distributed storage, cloud storage or local storage, to meet the requirements of data security and access efficiency. By extracting storage rate features and business features from blockchain storage data, the method can obtain useful information about data storage rate and business features. This helps to optimize the performance and resource allocation of the storage system. By performing storage scale prediction and local storage capacity limitation processing, the method can predict and evaluate the scale requirements of the storage system and determine the appropriate local storage capacity. This helps to optimize the utilization of storage resources and improve the scalability and efficiency of the system.
[0097] Preferably, step S17 is specifically:
[0098] Obtain local storage system parameter data, and use the local storage system parameter data to correct the first blockchain storage scale prediction data and the second blockchain storage scale prediction data, respectively, so as to obtain the first blockchain storage scale correction prediction data and the second blockchain storage scale correction prediction data;
[0099] Specifically, for example, storage capacity correction: compare the first blockchain storage scale prediction data with the actual storage capacity. If it exceeds the capacity limit, make a correction to limit the storage scale to the actual available capacity. Storage bandwidth correction: compare the first blockchain storage scale prediction data with the actual storage bandwidth. If it exceeds the bandwidth limit, make a correction to limit the storage scale to the range that the bandwidth can support. Storage rate correction: compare the first blockchain storage scale prediction data with the actual storage rate. If it exceeds the rate limit, make a correction to limit the storage scale to the actual processable rate. According to the actual local storage system parameter data, the second blockchain storage scale prediction data is corrected. The correction method can be similar to the correction method for the first blockchain storage scale prediction data, and corresponding adjustments can be made according to the meaning of the parameter data and the influencing factors.
[0100] Weighted merging is performed according to the first blockchain storage scale correction prediction data and the second blockchain storage scale correction prediction data, thereby obtaining blockchain storage scale data;
[0101] Specifically, for example, according to actual needs and weight allocation strategy, the modified first blockchain storage scale prediction data and the second blockchain storage scale prediction data are weighted merged. The specific merging method can be simple weighted average, weighted sum, and the weight is determined according to different factors.
[0102] The weight merging is calculated by the blockchain storage scale weight merging calculation formula, thereby generating a blockchain storage scale weight merging value to obtain blockchain storage scale data. The blockchain storage scale weight merging calculation formula is as follows:
[0103] ;
[0104] The combined value of the blockchain storage scale weight, is the combined coefficient term, is the first merging weight coefficient, To incorporate the constant term, is the second merging weight coefficient, Corrected forecast data for the first blockchain storage size, To incorporate the initial adjustments, is the third merging weight coefficient, Corrected forecasts for the second blockchain storage size, is the fourth merging weight coefficient, is the error correction term, is the fifth merging weight coefficient, is the combined index factor coefficient, is the sixth combined weight coefficient, is the merge scaling factor.
[0105] The present invention constructs a blockchain storage scale weight merging calculation formula, which fully considers the merging coefficient term , the first merging weight coefficient , Combine constant terms , the second merge weight coefficient , First blockchain storage scale revised forecast data , Merge initial adjustments , the third combined weight coefficient , Second blockchain storage scale revised forecast data , the fourth combined weight coefficient , Error correction term , the fifth combined weight coefficient , Merger index factor coefficient , the sixth combined weight coefficient , Merge scaling factor And the interaction between them, where the combined coefficient term Used to adjust the weights of each item in the merging process. It can be adjusted according to actual needs. The first merging weight coefficient Indicates the weight of the first item, which is used to adjust the contribution of the first item to the combined value of the storage scale weight, error correction item Used to correct the error term in the merging process, which can be adjusted according to actual needs, and the merging index factor coefficient Used to adjust the exponential value of the exponential function, affecting the exponential term in the merging process and the merging scaling factor Used to adjust the scaling value during the merging process, which can be adjusted according to actual needs. This calculation formula obtains the final storage scale weight value through weight merging. By adjusting various coefficients and constant terms, different factors can be flexibly adjusted and weighed according to actual needs and system characteristics, so as to more accurately evaluate the scale requirements of blockchain storage. This helps to optimize the configuration of storage resources, improve the performance and efficiency of the system, and ensure that the storage scale matches the actual needs, providing more precise guidance for blockchain-based data encryption storage methods.
[0106] In the present invention, by obtaining the parameter data of the local storage system, the method can obtain various parameter information related to the local storage system, such as storage capacity, bandwidth, and delay. The first blockchain storage scale prediction data is corrected using the local storage system parameter data. This step takes into account the actual characteristics of the local storage system, such as available storage space, network bandwidth limitations, etc., so as to more accurately predict the scale requirements of the first blockchain storage. Similarly, the second blockchain storage scale prediction data is corrected using the local storage system parameter data. This step further comprehensively considers the limitations and characteristics of the local storage system to ensure that the scale prediction of the second blockchain storage is more accurate. Weighted merging is performed based on the first blockchain storage scale correction prediction data and the second blockchain storage scale correction prediction data. The weight here reflects the importance or credibility of different prediction data, and by merging weighted data, more comprehensive and accurate blockchain storage scale data is obtained. Step S17 in the blockchain-based data encryption storage method uses the local storage system parameter data for correction and weight merging, which can more accurately predict and evaluate the scale requirements of blockchain storage. This helps to optimize the resource allocation of the storage system, improve the availability and performance of the system, and ensure that the storage capacity matches the actual needs, thereby providing a more effective solution for the encrypted storage of data.
[0107] Preferably, step S2 specifically includes:
[0108] Step S21: Perform data sensitivity assessment based on blockchain storage type data to obtain blockchain sensitivity data;
[0109] Specifically, for example, data classification assessment: Blockchain storage data is classified into different categories, such as personal identity information, financial data, health records, etc. Each category of data has a different degree of sensitivity. Sensitivity level assessment: Assign a sensitivity level to each data category based on the sensitivity characteristics of the data, laws and regulations, and privacy protection standards. Levels can be represented by numbers or identifiers, such as 1 for the highest sensitivity, 2 for high sensitivity, 3 for medium sensitivity, 4 for low sensitivity, etc. Data value assessment: Assess the value and importance of data, including the commercial value of the data, the privacy value of the data, and the possible impact of data leakage. Depending on the value of the data, it can be considered sensitive or non-sensitive data. Risk assessment: Consider risk factors such as data leakage and unauthorized access, and conduct a risk assessment on each data category. The assessment results may include the possibility of data being attacked or leaked and the severity of the risk.
[0110] Step S22: Select an encryption algorithm according to the blockchain sensitivity data and the blockchain storage scale data, so as to obtain the first blockchain storage encryption method data.
[0111] Specifically, for example, encryption algorithm adaptability assessment: Evaluate the adaptability of various encryption algorithms for data with different sensitivity levels. Consider factors such as the strength, complexity, and performance overhead of the encryption algorithm, and select an encryption algorithm that can meet the data sensitivity and storage scale requirements. Storage encryption scheme selection: According to the blockchain storage scale data, consider the processing power and resource limitations of the storage system, and select an encryption scheme suitable for large-scale data storage. For example, for large-scale data, distributed storage and encryption schemes can be selected to improve the performance and scalability of the system. Key management strategy formulation: According to the selection of encryption algorithms and the level of data sensitivity, formulate corresponding key management strategies. Including considerations such as key generation, distribution, update, and revocation to ensure the security and effectiveness of keys.
[0112] In the present invention, by performing data sensitivity assessment and encryption algorithm selection, a suitable encryption method can be selected according to the sensitivity of different data, thereby improving data security. Sensitive data will be protected by a stronger encryption algorithm to reduce the risk of data leakage and information tampering. According to the storage scale data and encryption algorithm selection, storage resources can be optimized. Smaller-scale storage requirements may use lightweight encryption algorithms, while larger-scale storage requirements may require more powerful encryption algorithms. By reasonably selecting encryption methods, unnecessary waste of resources can be avoided and the utilization of storage resources can be improved. This method takes into account the combined impact of multiple factors such as data sensitivity and storage scale. According to different storage requirements and data characteristics, a suitable encryption method can be flexibly selected to make the system more adaptable and flexible.
[0113] Preferably, the blockchain sensitivity data includes first blockchain sensitivity data and second blockchain sensitivity data, the first blockchain sensitivity data and the second blockchain sensitivity data are different blockchain sensitivity data, the first blockchain storage encryption mode data includes first storage encryption mode data and second storage encryption mode data, and step S22 is specifically:
[0114] Generate a first encryption method according to the first blockchain sensitivity data and the blockchain storage scale data, thereby obtaining first storage encryption method data;
[0115] Specifically, for example, a high-complexity encryption method is generated, such as a symmetric encryption algorithm with a key length of 256 bits and an asymmetric encryption algorithm with a key length of 4096 bits. Symmetric encryption algorithms include ECB, CBC, CTR, etc. Each encryption mode has different characteristics and applicable scenarios. For example, the ECB mode is suitable for processing independent data blocks, while the CBC mode is suitable for processing continuous data streams.
[0116] A second encryption method is generated according to the second blockchain sensitivity data and the blockchain storage scale data, thereby obtaining second storage encryption method data.
[0117] Specifically, for example, an encryption method with lower complexity is generated, such as a symmetric encryption algorithm with a key length of 128 bits or an asymmetric encryption algorithm with a key length of 2048 bits.
[0118] Specifically, for example, the first storage encryption mode data is relatively complex storage encryption mode data, and the second storage encryption mode data is relatively simple and convenient storage encryption mode data.
[0119] Specifically, for example, the first blockchain sensitivity data is high, the second blockchain sensitivity data is medium, and the blockchain storage scale data is large. According to the first blockchain sensitivity data and the blockchain storage scale data, a high-strength symmetric encryption algorithm (such as AES) and a long key length (such as 256 bits) can be selected to generate the first storage encryption method data. This can ensure the high security and confidentiality of the data. According to the second blockchain sensitivity data and the blockchain storage scale data, a medium-strength symmetric encryption algorithm (such as 3DES) and an appropriate key length (such as 128 bits) can be selected to generate the second storage encryption method data. This can protect the security of the data to a certain extent while taking into account the factors of performance and efficiency.
[0120] Specifically, for example, the first blockchain sensitivity data is low, the second blockchain sensitivity data is high, and the blockchain storage scale data is medium. According to the first blockchain sensitivity data and the blockchain storage scale data, a low-intensity symmetric encryption algorithm (such as RC4) and a shorter key length (such as 64 bits) can be selected to generate the first storage encryption method data. Due to the low sensitivity of the data, the requirements of security and performance can be weighed and a moderate encryption method can be selected. According to the second blockchain sensitivity data and the blockchain storage scale data, a high-intensity asymmetric encryption algorithm (such as RSA) and a long key length (such as 4096 bits) can be selected to generate the second storage encryption method data. This can provide higher security and confidentiality, and is suitable for data storage requirements with higher sensitivity.
[0121] In the present invention, by generating corresponding storage encryption methods according to different blockchain sensitivity data and storage scale data, the security of stored data can be protected more accurately. Data of different sensitivity levels can be protected by different encryption methods, thereby improving the confidentiality and protection capabilities of the data. Due to the existence of different sensitivity data sets and storage scale data, the method allows the generation of corresponding storage encryption methods according to different situations. This provides greater flexibility and adaptability, enabling the system to select the best encryption method according to specific needs and perform customized data protection for different storage needs. By generating corresponding storage encryption methods according to different sensitivity data sets and storage scale data, the configuration of storage resources can be optimized. Different encryption methods may have different computing and storage costs, so by selecting a suitable encryption method according to actual needs, effective utilization of resources and efficient execution of storage operations can be achieved.
[0122] Preferably, step S3 specifically includes:
[0123] Step S31: Acquire operation location data based on the location verification mechanism of the blockchain network;
[0124] Specifically, for example, the location verification mechanism based on the blockchain network can use the node's geographic location information and network topology to ensure that the node's location verification has a certain degree of security and accuracy. For example, the node's operating location data can be obtained through GPS positioning, IP address verification, and network delay measurement.
[0125] Step S32: performing permission limitation according to the operation location data and the blockchain storage type data, thereby obtaining blockchain storage permission data, wherein the blockchain storage permission data includes first blockchain storage permission data and second blockchain storage permission data;
[0126] Specifically, for example, based on the operation location data and the blockchain storage type data, permission restrictions can be made to determine which operation locations have permission to read or write data. For example, a specific geographic area or node type can be defined as having read permission, while other areas or nodes require additional identity verification to obtain write permission. In this way, blockchain storage permission data can be generated according to specific needs, including first blockchain storage permission data and second blockchain storage permission data.
[0127] Step S33: Generate second blockchain storage encryption method data according to the blockchain storage authority data.
[0128] Specifically, for example, based on the blockchain storage permission data, it can be determined which data needs to be encrypted and protected. According to different permission levels or operation locations, appropriate encryption algorithms, key lengths, and encryption modes can be selected. For example, for high-authority data, a strong encryption algorithm and a long key length can be used; while for low-authority data, a weaker encryption algorithm and a short key length can be used. By generating a second blockchain storage encryption mode data, the security and confidentiality of data under different permissions can be ensured.
[0129] In the present invention, the operation location data is obtained by a location verification mechanism based on the blockchain network, which can ensure the legitimacy and accuracy of data operations. At the same time, by comparing and verifying the operation location data with the storage type data, and generating a corresponding storage encryption method according to the permission data, the security and confidentiality of data access can be ensured. Through the permission definition in step S32, data access rights can be restricted according to the operation location and storage type data. Only authorized locations and users can obtain the corresponding storage permission data, thereby ensuring the compliance and privacy protection of the data. Such a permission control mechanism can effectively prevent unauthorized data access and operation. By generating the second blockchain storage encryption method data according to the blockchain storage permission data, a suitable encryption method can be selected for different permission levels and storage requirements. This provides flexibility and customizability, enabling the system to select the best encryption method according to specific permission requirements and security requirements, and further enhance the reliability and adaptability of data protection.
[0130] Preferably, the authority limitation is calculated by an authority limitation calculation formula to generate a blockchain storage authority limitation value, so as to obtain blockchain storage authority data, wherein the authority limitation calculation formula is specifically:
[0131] ;
[0132] The permission limit value for blockchain storage, is the first permission item, is a constant term, is the second permission item, To manipulate location data, is the initial adjustment item, is the third permission item, Stores type data for blockchain, is the fourth permission item, Verify data for IP addresses, is the fifth permission item, To correct the adjustment items, Verify data for the blockchain network.
[0133] The present invention constructs a permission limitation calculation formula, which fully considers the first permission item , constant term , Second permission item , Operation location data , Initial Adjustment , Third permission item , Blockchain storage type data 、The fourth permission item , IP address verification data 、The fifth permission item , Correction adjustment items , blockchain network verification data The comprehensive evaluation of blockchain storage permissions is realized through the interaction of different parameters. Different parameters represent different permissions. Each permission has a corresponding weight and function adjustment in the calculation to reflect its importance and influence in the permission limitation. The parameters in the calculation formula include the operation location data , Blockchain storage type data , IP address verification data Verify data with blockchain network , the changes of these parameters can realize the dynamic adjustment of permission restrictions. For example, the operation location data and IP address verification data Can reflect the current user's location and identity information, blockchain storage type data Verify data with blockchain network It can reflect the current storage environment and network status. Through the changes of these parameters, the permission limit value can be dynamically adjusted to adapt to different environments and needs. The parameter weights and function adjustments in the calculation formula reflect the relative importance and influence of each permission item in the permission limit. By adjusting the weights and functions, different permission items can be flexibly weighted to meet actual needs and security requirements. For example, some permission items may be more important to security and can be given higher weights, while some permission items may have a greater impact on performance, which can be reasonably balanced through function adjustment. Multiple parameters in the calculation formula represent different permission items, including multiple dimensions such as location, type, and verification. By comprehensively considering the information of these dimensions, more accurate and comprehensive permission limits can be achieved. Permission limits in different dimensions can complement each other and improve the system's control over stored data. Through the permission limit calculation formula, the weights and function adjustments of different permission items can be comprehensively considered, and the permission limit value can be dynamically adjusted to achieve detailed control and evaluation of blockchain storage permissions, thereby improving data security and permission management capabilities.
[0134] Preferably, the first blockchain stores encryption data including key management policy data, and the second blockchain stores encryption data including access control mechanism data, and step S4 is specifically as follows:
[0135] Step S41: Obtain user role data;
[0136] Specifically, for example, user role data may include the roles played by different users in the system, such as administrator, ordinary user, auditor, etc. The permissions and access levels of these roles may be different. By obtaining user role data, the role to which each user belongs can be determined for subsequent permission generation and access control.
[0137] Step S42: Generate permissions through a preset smart contract according to the access control mechanism data and the user role data, thereby obtaining the user role permission data;
[0138] Specifically, for example, the access control mechanism data defines the access rights rules for different user roles in the system. Based on the access control mechanism data and the user role data, the user role permission data can be generated through a preset smart contract. The smart contract can automatically generate permission information for each user based on the role and the corresponding permission rules, such as the permission to read, write or perform specific operations.
[0139] Step S43: Generate third blockchain storage encryption method data according to the user role authority data, the first blockchain storage encryption method data and the second blockchain storage encryption method data.
[0140] Specifically, for example, based on the user role authority data, the first blockchain storage encryption method data, and the second blockchain storage encryption method data, different factors can be comprehensively considered to generate the final third blockchain storage encryption method data. These data can be used to determine the specific encryption method and security measures required for each user role when accessing and operating data. For example, for high-authority users, stronger encryption algorithms and key management strategies can be selected; for low-authority users, weaker encryption algorithms and simplified key management strategies can be used.
[0141] In the present invention, the user role permission data is generated by the smart contract in step S42, which can ensure the accuracy and precision of the permission. According to the access control mechanism data and the user role data, the smart contract can generate specific permission settings according to preset rules to ensure that the permissions of each user are consistent with their roles and prevent unauthorized access and operations. By integrating the user role permission data with the first blockchain storage encryption method data and the second blockchain storage encryption method data, a third blockchain storage encryption method data that adapts to different user roles and permissions can be generated. This encryption method can be customized according to the user's specific permission requirements and data protection requirements, providing a higher level of data security and confidentiality. Through the third blockchain storage encryption method data generated in step S43, refined access control of data can be achieved. According to the user role permission data and the encryption method data, the system can ensure that only users with corresponding permissions can decrypt and access the corresponding data, thereby enhancing the confidentiality and protection capabilities of the data.
[0142] Preferably, step S5 is specifically:
[0143] Encrypting the blockchain storage data using the data encryption method in the third blockchain storage encryption method data, thereby generating preliminary blockchain storage encrypted data;
[0144] Specifically, for example, according to the data encryption method specified in the third blockchain storage encryption method data, a symmetric encryption algorithm or an asymmetric encryption algorithm can be used to encrypt the blockchain storage data. The symmetric encryption algorithm can use the same key for encryption and decryption, while the asymmetric encryption algorithm uses a pair of public keys and private keys for encryption and decryption. The specific encryption method can be selected according to security requirements and performance requirements, such as using AES (Advanced Encryption Standard) for symmetric encryption or using RSA (Rivest-Shamir-Adleman) for asymmetric encryption.
[0145] Specifically, for example, the third blockchain storage encryption method specifies that the data is encrypted using the AES (Advanced Encryption Standard) symmetric encryption algorithm. Obtain the blockchain storage data to be encrypted, such as transaction records or file contents. Generate a key that will be used for encryption and decryption operations. A key generation algorithm (such as PBKDF2 or RSA) can be used to generate a key of sufficient strength according to security requirements and storage scale. Using the AES algorithm and the generated key, the blockchain storage data is encrypted in blocks. The size of each data block is usually 128 bits or 256 bits. For each data block, different encryption modes can be selected, such as ECB (Electronic Codebook), CBC (Cipher Block Chaining), or CTR (Counter). The encryption mode selection depends on security requirements and application scenarios. The encrypted data blocks are combined into preliminary blockchain storage encrypted data to ensure the integrity and confidentiality of the data.
[0146] The access control policy data in the third blockchain storage encryption method data is used to perform access restriction marking on the preliminary blockchain storage encrypted data, thereby obtaining the blockchain storage encrypted data and sending it to the data encryption storage device for data encryption storage operations.
[0147] Specifically, for example, according to the access control policy data in the third blockchain storage encryption method data, the preliminary blockchain storage encrypted data can be marked with access restrictions. These access control policy data can define which users or roles have access to specific encrypted data, as well as the conditions and permission levels for access. For example, it can be set that only authorized users can decrypt and read encrypted data, or that specific users can only perform specific operations. Access restrictions on marking encrypted data can be achieved by adding access control information tags, permission bits, or encryption keys.
[0148] In the present invention, the blockchain storage data is encrypted by the data encryption method in step S51. In this way, the security of the data during transmission and storage can be protected. Even if the data is obtained by unauthorized users, the data content cannot be decrypted and accessed, thereby improving the confidentiality and protection capabilities of the data. The access control policy data in step S52 is used to mark the preliminary blockchain storage encrypted data for access restrictions. In this way, the access rights of the data can be finely controlled and restricted according to the set policy. Only users who meet the authorization conditions can decrypt and access the corresponding data, thereby strengthening the access control capabilities of the data and preventing unauthorized access. By combining the data encryption method and access control policy data in the third blockchain storage encryption method data, customized data encryption storage can be achieved. According to actual needs and security requirements, a suitable data encryption method is selected, and the corresponding access control policy is defined to meet the data security requirements of different scenarios and applications.
[0149] Preferably, a data encryption storage device based on blockchain is characterized by comprising:
[0150] at least one processor;
[0151] a memory communicatively coupled to the at least one processor;
[0152] The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the blockchain-based data encryption storage method as described above.
[0153] The beneficial effects of the present invention are: obtaining blockchain storage data, and extracting data types and predicting data scale. In this way, the characteristics and scale of the data to be stored can be fully understood and grasped, providing an accurate data basis for the processing of subsequent steps. Through data type extraction, corresponding storage and encryption methods can be adopted according to different types of data to increase data security and storage efficiency. Data storage requirements are processed according to blockchain storage type data and blockchain storage scale data. This means that the storage system can dynamically manage and adjust data according to actual needs. By reasonably processing storage requirements, the resource utilization and performance of the storage system can be optimized, while improving data security and reliability. Involving operation location data and blockchain storage type data, it is used to perform data location permission processing. This means that different operation locations can limit the access rights of stored data, thereby achieving more refined and personalized data protection. Through data location permission processing, it can be ensured that only users with legal permissions can access and operate stored data, thereby improving data privacy and security. Using the first blockchain storage encryption method data and the second blockchain storage encryption method data, access permission function processing is performed. This step realizes flexible management and control of access rights. Through mechanisms such as smart contracts, corresponding access rights can be generated according to user roles and permission requirements to ensure that only authorized users can access and operate stored data. The blockchain storage data is encrypted using the third blockchain storage encryption method. This step ensures the confidentiality and security of the stored data during transmission and storage. By selecting the appropriate encryption method and combining it with access control, the stored data can be protected from unauthorized access and malicious attacks.
[0154] Therefore, from any point of view, the embodiments should be regarded as illustrative and non-restrictive, and the scope of the present invention is limited by the attached application documents rather than the above description, and it is intended that all changes falling within the meaning and scope of equivalent elements of the application documents are included in the present invention.
[0155] The above description is only a specific embodiment of the present invention, so that those skilled in the art can understand or implement the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but should conform to the widest scope consistent with the principles and novel features invented herein.
Claims
1. A data encryption storage method based on blockchain, characterized in that: The following steps are involved: Step S1: Obtain blockchain storage data, and extract data types and predict data scale based on the blockchain storage data, so as to obtain blockchain storage type data and blockchain storage scale data; wherein step S1 includes the following steps: Step S11: Obtain blockchain storage data; Step S12: extracting the data structure and identifying the data content of the blockchain storage data, thereby obtaining the blockchain storage data structure data and the blockchain storage content data; Step S13: Perform storage type processing according to the blockchain storage data structure data and the blockchain storage content data, thereby obtaining blockchain storage type data; Step S14: extracting storage rate characteristics of blockchain storage data to obtain blockchain storage rate characteristic data, and extracting blockchain storage service characteristics of blockchain storage type data to obtain blockchain storage service characteristic data; Step S15: performing a first data prediction based on the blockchain storage rate characteristic data, thereby obtaining first blockchain storage scale prediction data; Step S16: performing a second data prediction based on the blockchain storage service characteristic data, thereby obtaining second blockchain storage scale prediction data; Step S17: performing local storage capacity limitation processing according to the first blockchain storage scale prediction data and the second blockchain storage scale prediction data, thereby obtaining blockchain storage scale data; Step S2: Processing the data storage requirement according to the blockchain storage type data and the blockchain storage scale data, thereby obtaining the first blockchain storage encryption method data; Step S3: Acquire the operation location data, and perform data location authority processing according to the operation location data and the blockchain storage type data, thereby obtaining the second blockchain storage encryption mode data; Step S4: performing access permission function processing according to the first blockchain storage encryption method data and the second blockchain storage encryption method data to generate third blockchain storage encryption method data; Step S5: Encrypt the blockchain storage data using the third blockchain storage encryption method data, thereby generating blockchain storage encrypted data, and sending it to the data encryption storage model for data encryption storage operations.
2. The data encryption storage method based on blockchain according to claim 1 is characterized in that: Step S17 is specifically as follows: Obtain local storage system parameter data, and use the local storage system parameter data to correct the first blockchain storage scale prediction data and the second blockchain storage scale prediction data, respectively, so as to obtain the first blockchain storage scale correction prediction data and the second blockchain storage scale correction prediction data; Weighted merging is performed according to the first blockchain storage scale correction prediction data and the second blockchain storage scale correction prediction data, thereby obtaining blockchain storage scale data; The weight merging is calculated by the blockchain storage scale weight merging calculation formula, thereby generating a blockchain storage scale weight merging value to obtain blockchain storage scale data. The blockchain storage scale weight merging calculation formula is as follows: ; The combined value of the blockchain storage scale weight, is the combined coefficient term, is the first merging weight coefficient, To incorporate the constant term, is the second merging weight coefficient, Corrected forecast data for the first blockchain storage size, To incorporate the initial adjustments, is the third merging weight coefficient, Corrected forecasts for the second blockchain storage size, is the fourth merging weight coefficient, is the error correction term, is the fifth merging weight coefficient, is the combined index factor coefficient, is the sixth combined weight coefficient, is the merge scaling factor.
3. The data encryption storage method based on blockchain according to claim 1 is characterized in that: Step S2 is specifically as follows: Step S21: Perform data sensitivity assessment based on blockchain storage type data to obtain blockchain sensitivity data; Step S22: Select an encryption algorithm according to the blockchain sensitivity data and the blockchain storage scale data, so as to obtain the first blockchain storage encryption method data.
4. The data encryption storage method based on blockchain according to claim 3 is characterized in that: The blockchain sensitivity data includes first blockchain sensitivity data and second blockchain sensitivity data, the first blockchain sensitivity data and the second blockchain sensitivity data are different blockchain sensitivity data, the first blockchain storage encryption mode data includes first storage encryption mode data and second storage encryption mode data, and step S22 is specifically as follows: Generate a first encryption method according to the first blockchain sensitivity data and the blockchain storage scale data, thereby obtaining first storage encryption method data; A second encryption method is generated according to the second blockchain sensitivity data and the blockchain storage scale data, thereby obtaining second storage encryption method data.
5. The data encryption storage method based on blockchain according to claim 1 is characterized in that: Step S3 is specifically as follows: Obtaining operation location data based on the location verification mechanism of the blockchain network; Performing permission limitation according to the operation location data and the blockchain storage type data, thereby obtaining blockchain storage permission data, wherein the blockchain storage permission data includes first blockchain storage permission data and second blockchain storage permission data; Generate second blockchain storage encryption method data based on blockchain storage authority data.
6. The data encryption storage method based on blockchain according to claim 5 is characterized in that: The permission limit is calculated by the permission limit calculation formula to generate the blockchain storage permission limit value, so as to obtain the blockchain storage permission data, wherein the permission limit calculation formula is specifically as follows: ; The permission limit value for blockchain storage, is the first permission item, is a constant term, is the second permission item, To manipulate location data, is the initial adjustment item, is the third permission item, Stores type data for blockchain, is the fourth permission item, Verify data for IP addresses, is the fifth permission item, To correct the adjustment items, Verify data for the blockchain network.
7. The data encryption storage method based on blockchain according to claim 1 is characterized in that: The first blockchain stores encryption data including key management policy data, and the second blockchain stores encryption data including access control mechanism data. Step S4 is specifically as follows: Get user role data; Generate permissions based on access control mechanism data and user role data through a preset smart contract to obtain user role permission data; The third blockchain storage encryption method data is generated according to the user role authority data, the first blockchain storage encryption method data and the second blockchain storage encryption method data.
8. The data encryption storage method based on blockchain according to claim 1 is characterized in that: Step S5 is specifically as follows: Encrypting the blockchain storage data using the data encryption method in the third blockchain storage encryption method data, thereby generating preliminary blockchain storage encrypted data; The access control policy data in the third blockchain storage encryption method data is used to perform access restriction marking on the preliminary blockchain storage encrypted data, thereby obtaining the blockchain storage encrypted data and sending it to the data encryption storage model for data encryption storage operations.
9. A data encryption storage device based on blockchain, characterized in that: include: at least one processor; a memory communicatively coupled to the at least one processor; The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute a blockchain-based data encryption storage method as described in any one of claims 1 to 8.
