A computer batch data storage method and system based on blockchain
Through data classification, homomorphic encryption and smart contract allocation, combined with blockchain index recording and security audit, the problem of inefficient data management in traditional systems is solved, and safe and efficient data storage and management are achieved.
Patent Information
- Application Number
- CN202510450580.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-11
- Publication Date
- 2025-08-15
- Estimated Expiration
- 2045-04-11
AI Technical Summary
Traditional computer batch data storage systems lack effective means to distinguish data of different access frequencies, resulting in data being vulnerable to attacks or leaks during transmission and storage, and data allocation is time-consuming and error-prone, retrieval efficiency is inefficient and difficult to verify integrity.
Data classification method is used to divide data into hot data and cold data, encrypted using homomorphic encryption method, automatically allocated to the appropriate storage level through smart contracts, and created detailed index records on the blockchain to realize permanent recording and efficient retrieval of data locations, and optimize storage strategies in combination with secure audits.
It realizes security and privacy protection of data during transmission and storage, automates and efficient data management, simplifies the data retrieval process, enhances data traceability and integrity verification, and improves data management transparency and credibility.
Smart Images

Figure CN119996433B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of computer batch data storage, and in particular to a computer batch data storage method and system based on blockchain. Background Art
[0002] Computer bulk data storage technology plays a crucial role in today's information security landscape. With the rapid development of information technology, users are increasingly demanding file security and privacy protection. Traditional encryption methods often rely on fixed keys and algorithms, resulting in complex key management and limited attack resistance, making them unable to meet users' demands for personalized, intelligent encryption. Therefore, leveraging advanced technologies to improve the intelligence and security of computer bulk data storage has become a pressing issue.
[0003] In the field of computer batch data storage, traditional data management systems lack effective means to distinguish data with different access frequencies, and data is vulnerable to attacks or leakage during transmission and storage. Traditional systems usually rely on manual or semi-automatic methods to allocate data to different storage levels. This method is not only time-consuming but also prone to errors. At the same time, when specific information needs to be retrieved from a large amount of stored data, existing systems often face problems such as low retrieval efficiency and difficulty in data integrity verification. Summary of the Invention
[0004] In view of the above existing problems, the present invention is proposed.
[0005] Therefore, the present invention provides a computer batch data storage method and system based on blockchain to solve the problems in traditional data management systems, which lack effective means to distinguish data with different access frequencies, and the data is vulnerable to attacks or leakage during transmission and storage. Traditional systems usually rely on manual or semi-automatic methods to allocate data to different storage levels, which is not only time-consuming but also prone to errors.
[0006] In order to solve the above technical problems, the present invention provides the following technical solutions:
[0007] In a first aspect, the present invention provides a computer batch data storage method based on blockchain, comprising:
[0008] The data classification method is used to analyze computer batch data, which is divided into hot data and cold data according to the access frequency to obtain the classified data set;
[0009] The classified data set is encrypted using a homomorphic encryption method to obtain an encrypted data set;
[0010] Use smart contract definition logic to allocate the encrypted data set to the corresponding storage tier, and obtain the data record of the allocated storage location;
[0011] Create detailed index records and save them on the blockchain to obtain index records on the blockchain;
[0012] The method of querying the index record on the blockchain is used to determine the data location when retrieving the corresponding data, and to obtain verified data;
[0013] Use security audit methods to check data integrity and system operation status, obtain audit results, and adjust storage strategies based on the audit results to obtain optimized data storage strategies;
[0014] Create a detailed index record and save it on the blockchain to obtain the index record on the blockchain. The specific steps are:
[0015] Create detailed index records for each allocated data block and save them on the blockchain;
[0016] The index record includes the location information of the data block, the encryption key, and the metadata of the access rights, and the expression is:
[0017] ;
[0018] in, It is a function that creates index records, and the input is the encrypted data block , its storage location and the associated key , the output is index record ;
[0019] The method of querying the index record on the blockchain is used to determine the data location when retrieving the corresponding data and obtain the verified data. The specific steps are as follows:
[0020] When the corresponding data needs to be retrieved, the system receives a retrieval request from the user, which includes a unique identifier of the data block to be retrieved;
[0021] Based on the unique identifier in the retrieval request, the corresponding index record is retrieved from the blockchain;
[0022] Extract the actual storage location of the data block and the required decryption key from the index record;
[0023] Obtaining the encrypted data block from the corresponding storage medium according to the extracted storage location;
[0024] Use the decryption key extracted from the index record to decrypt the encrypted data block and restore the original data. The expression is:
[0025] ;
[0026] in, Is the decryption function, the input is the encrypted data block and decryption key , the output is the original data ;
[0027] Use hash verification mechanism to verify the decrypted data to verify.
[0028] As a preferred solution of the blockchain-based computer batch data storage method of the present invention, wherein: the computer batch data is analyzed by a data classification method, and is divided into hot data and cold data according to the access frequency to obtain a classified data set. The specific steps are as follows:
[0029] Collect data access logs from computers;
[0030] The data access log includes the number of accesses, access time and size information of the data block;
[0031] For each data block, calculate its average access frequency, the expression is:
[0032] ;
[0033] in, Indicates the The data block in The timestamp of the first visit, is the total number of visits, is the length of the observation period, The larger the value, the hotter the data block;
[0034] Based on the dynamic threshold adjustment mechanism and combined with the average access frequency and standard deviation of all data blocks in the entire data set, the threshold is set. The expression is:
[0035] ;
[0036] in, is an empirical constant used to adjust the sensitivity. is the average access frequency of all data blocks, is its standard deviation;
[0037] When the average access frequency of a data block > , it is classified as hot data, otherwise it is considered cold data. The expression is:
[0038] ;
[0039] in, Indicates the The categories of the data blocks are divided and marked as classified datasets.
[0040] As a preferred solution of the blockchain-based computer batch data storage method of the present invention, wherein: the classified data set is encrypted using a homomorphic encryption method to obtain an encrypted data set, and the specific steps are as follows:
[0041] Based on the classified dataset Select BFV encryption parameters;
[0042] The BFV encryption parameters include the degree, modulus, and coefficient modulus of the polynomial. ;
[0043] Based on the randomization algorithm, the BFV encryption parameters are used to generate the public key and private key. The expression is:
[0044] ;
[0045] in, Is a key generation function, the input is the degree of the polynomial , modulus and coefficient modulus , the output is the public key and private key ;
[0046] For each encrypted data block , using the generated public key Encrypt and generate the corresponding ciphertext , the expression is:
[0047] ;
[0048] in, Is the encryption function, the input is the original data and public key , the output is the encrypted data ;
[0049] Using a private key Decrypt part of the ciphertext and compare it with the original data to ensure that it is correct. The expression is:
[0050] ;
[0051] in, Is the decryption function, the input is the ciphertext and private key , the output is the decrypted data .
[0052] As a preferred solution of the blockchain-based computer batch data storage method of the present invention, wherein: the encrypted data set is allocated to the corresponding storage level by using smart contract definition logic to obtain the data record of the allocated storage location, and the specific steps are as follows:
[0053] Define smart contract rules;
[0054] The smart contract rules include access frequency thresholds for data blocks, prioritizing hot data to higher-performance storage systems, and allocating cold data to the more cost-effective decentralized storage platform IPFS;
[0055] Deploy the smart contract on the blockchain platform and initialize relevant parameters. The expression is:
[0056] ;
[0057] in, Represents a smart contract instance, Contains all parameters required for initialization;
[0058] For the encrypted data block , assess whether it is hot data or cold data;
[0059] Use average visit frequency and the set threshold To make a judgment, the expression is:
[0060] ;
[0061] ;
[0062] Based on the evaluation results, the smart contract automatically allocates the data block to the appropriate storage tier;
[0063] For hot data, choose a high-performance storage system;
[0064] For cold data, choose low-cost storage media.
[0065] As a preferred solution of the blockchain-based computer batch data storage method of the present invention, wherein: the security audit method is used to check the integrity of the data and the operating status of the system, obtain the audit results, and adjust the storage strategy based on the audit results to obtain the optimized data storage strategy. The specific steps are:
[0066] defining comprehensive audit standards;
[0067] The audit standards include:
[0068] Data integrity check: Verify that the data has not been tampered with;
[0069] System performance evaluation: monitor the usage of storage resources;
[0070] Security check: detect potential security threats or vulnerabilities;
[0071] Collect necessary audit data from the system, including the hash value of each data block, status information of storage resources, and log records of any abnormal events;
[0072] For each data block, calculate its current hash value and compare it with the hash value in the index record;
[0073] Analyze storage resource usage, especially key performance indicators;
[0074] The key performance indicators include remaining storage space, average access latency and throughput;
[0075] Check system logs for any unusual behavior or potential security threats;
[0076] Summarize all audit results and generate detailed audit reports.
[0077] In a second aspect, the present invention provides a computer batch data storage system based on blockchain, comprising:
[0078] Data classification module, encryption processing module, smart contract allocation module, index record management module, data retrieval and verification module, and security audit module;
[0079] The data classification module is used to analyze computer batch data and classify it into hot data and cold data according to access frequency to obtain a classified data set;
[0080] The encryption processing module is used to encrypt the classified data set using a homomorphic encryption method to obtain an encrypted data set;
[0081] The smart contract allocation module is used to define the smart contract logic and allocate the encrypted data set to the corresponding storage tier to obtain data records of the allocated storage location;
[0082] The index record management module is used to create detailed index records and save them on the blockchain to obtain index records on the blockchain;
[0083] The data retrieval and verification module is used to determine the data location when retrieving specific data by querying the index record on the blockchain to obtain verified data;
[0084] The security audit module is used to use a security audit method to check the integrity of data and the operating status of the system, obtain audit results, and adjust the storage strategy based on the audit results to obtain an optimized data storage strategy.
[0085] In a third aspect, the present invention provides a computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: when the computer program is executed by the processor, any step of the blockchain-based computer batch data storage method as described in the first aspect of the present invention is implemented.
[0086] In a fourth aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein: when the computer program is executed by a processor, any step of the blockchain-based computer batch data storage method as described in the first aspect of the present invention is implemented.
[0087] The beneficial effects of the present invention are as follows: by using homomorphic encryption methods to encrypt data, the security of data during transmission and storage is ensured. The method allows certain computing tasks to be performed without decryption, greatly enhancing the data privacy protection capability. The encrypted data blocks are automatically allocated to the appropriate storage level through smart contracts, realizing an automated and efficient data management and distribution mechanism. By creating detailed index records and saving them on the blockchain, permanent recording and tracking of data location and metadata are achieved. This process not only simplifies the data retrieval process, but also enhances the data traceability and integrity verification capabilities, achieving the effect of enhancing data management transparency, improving data integrity and credibility, which is crucial for maintaining long-term data consistency and compliance. BRIEF DESCRIPTION OF THE DRAWINGS
[0088] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0089] Figure 1 This is a flowchart of the blockchain-based computer batch data storage method in Example 1.
[0090] Figure 2 This is a schematic diagram of the blockchain-based computer batch data storage system in Example 1. DETAILED DESCRIPTION
[0091] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the specific embodiments of the present invention are described in detail below with reference to the accompanying drawings.
[0092] In the following description, many specific details are set forth to facilitate a full understanding of the present invention. However, the present invention may also be implemented in other ways different from those described herein. Those skilled in the art may make similar generalizations without violating the connotation of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.
[0093] Secondly, the term "one embodiment" or "embodiment" herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The phrase "in one embodiment" appearing in various places throughout this specification does not necessarily refer to the same embodiment, nor does it refer to a separate or selective embodiment that is mutually exclusive of other embodiments.
[0094] Example 1, reference Figure 1 and Figure 2 , which is the first embodiment of the present invention, provides a computer batch data storage method based on blockchain, comprising the following steps:
[0095] S1. Use data classification methods to analyze computer batch data and divide it into hot data and cold data according to access frequency to obtain a classified data set;
[0096] Going a step further, data access logs are collected from computers;
[0097] Data access logs include the number of accesses, access time, and size of data blocks;
[0098] For each data block, calculate its average access frequency, the expression is:
[0099] ;
[0100] in, Indicates the The data block in The timestamp of the first visit, is the total number of visits, is the length of the observation period, The larger the value, the hotter the data block is;
[0101] Based on the dynamic threshold adjustment mechanism and combined with the average access frequency and standard deviation of all data blocks in the entire data set, the threshold is set. The expression is:
[0102] ;
[0103] in, is an empirical constant used to adjust the sensitivity. is the average access frequency of all data blocks, is its standard deviation;
[0104] When the average access frequency of a data block > , it is classified as hot data, otherwise it is considered cold data. The expression is:
[0105] ;
[0106] in, Indicates the The categories of the data blocks are marked as classified data sets;
[0107] It should be noted that by dynamically adjusting the threshold mechanism and combining the average access frequency and standard deviation of all data blocks in the entire data set to set the threshold, it can flexibly adapt to different application scenarios and data characteristics. This method not only improves the classification accuracy, but also can cope with changes in data access patterns over time, ensuring long-term data management efficiency.
[0108] S2. Use homomorphic encryption to encrypt the classified data set to obtain an encrypted data set;
[0109] Furthermore, based on the classified dataset Select BFV encryption parameters;
[0110] BFV encryption parameters include the degree, modulus, and coefficient modulus of the polynomial. ;
[0111] Based on the randomization algorithm, the BFV encryption parameters are used to generate the public key and private key. The expression is:
[0112] ;
[0113] in, Is a key generation function, the input is the degree of the polynomial , modulus and coefficient modulus , the output is the public key and private key ;
[0114] For each encrypted data block , using the generated public key Encrypt and generate the corresponding ciphertext , the expression is:
[0115] ;
[0116] in, Is the encryption function, the input is the original data and public key , the output is the encrypted data ;
[0117] Using a private key Decrypt part of the ciphertext and compare it with the original data to ensure that it is correct. The expression is:
[0118] ;
[0119] in, Is the decryption function, the input is the ciphertext and private key , the output is the decrypted data ;
[0120] It should be noted that the process of selecting BFV encryption parameters and generating public and private keys based on a randomized algorithm ensures the security and flexibility of encryption. The method supports performing computing operations on encrypted data without decryption, providing guarantees for secure computing in big data environments, while simplifying key management and data protection processes.
[0121] S3. Use smart contract-defined logic to allocate the encrypted data set to the corresponding storage tier, and obtain the data record of the allocated storage location;
[0122] Going further, define smart contract rules;
[0123] Smart contract rules include access frequency thresholds for data blocks, prioritizing hot data to higher-performance storage systems, and cold data to the more cost-effective decentralized storage platform IPFS.
[0124] Deploy the smart contract on the blockchain platform and initialize relevant parameters. The expression is:
[0125] ;
[0126] in, Represents a smart contract instance, Contains all parameters required for initialization;
[0127] For the encrypted data block , assess whether it is hot data or cold data;
[0128] Use average visit frequency and the set threshold To make a judgment, the expression is:
[0129] ;
[0130] ;
[0131] Based on the evaluation results, the smart contract automatically allocates the data block to the appropriate storage tier;
[0132] For hot data, choose a high-performance storage system;
[0133] For cold data, choose low-cost storage media;
[0134] It should be noted that by automatically evaluating the categories of data blocks through smart contracts and allocating them to the appropriate storage tiers, highly automated and intelligent data management is achieved. This strategy can not only significantly improve system response speed and service quality, but also effectively reduce operating costs and improve resource utilization.
[0135] S4. Create a detailed index record and save it on the blockchain to obtain the index record on the blockchain;
[0136] Furthermore, a detailed index record is created for each allocated data block and saved on the blockchain;
[0137] The index record includes the location information of the data block, encryption key, and metadata of access rights. The expression is:
[0138] ;
[0139] in, It is a function that creates index records, and the input is the encrypted data block , its storage location and the associated key , the output is index record ;
[0140] It should be noted that storing index records on the blockchain, taking advantage of its tamper-proof and transparent characteristics, ensures the high reliability and traceability of data location information and metadata, which not only enhances the accuracy and efficiency of data retrieval, but also provides a solid foundation for subsequent data audits and compliance checks.
[0141] S5. Use the method of querying the index record on the blockchain to determine the data location when retrieving specific data, and obtain verified data;
[0142] Furthermore, when specific data needs to be retrieved, the system receives a retrieval request from the user, which includes a unique identifier of the data block to be retrieved;
[0143] Based on the unique identifier in the retrieval request, the corresponding index record is retrieved from the blockchain;
[0144] Extract the actual storage location of the data block and the necessary decryption key from the index record;
[0145] Obtaining the encrypted data block from the corresponding storage medium according to the extracted storage location;
[0146] Use the decryption key extracted from the index record to decrypt the encrypted data block and restore the original data. The expression is:
[0147] ;
[0148] in, Is the decryption function, the input is the encrypted data block and decryption key , the output is the original data ;
[0149] Use hash verification mechanism to verify the decrypted data Conduct verification;
[0150] It should be noted that by querying index records from the blockchain and using decryption keys to restore the original data, high security and integrity are ensured during the data retrieval process. This step not only simplifies the data search process, but also further verifies the authenticity of the data through the hash verification mechanism, thereby enhancing users' trust in the system.
[0151] S6. Use a security audit method to check the integrity of the data and the operating status of the system, obtain the audit results, and adjust the storage strategy based on the audit results to obtain an optimized data storage strategy;
[0152] Going further, define comprehensive audit standards;
[0153] Audit standards include:
[0154] Data integrity check: Verify that the data has not been tampered with;
[0155] System performance evaluation: monitor the usage of storage resources;
[0156] Security check: detect potential security threats or vulnerabilities;
[0157] Collect necessary audit data from the system, including the hash value of each data block, status information of storage resources, and log records of any abnormal events;
[0158] For each data block, calculate its current hash value and compare it with the hash value in the index record;
[0159] Analyze storage resource usage, especially key performance indicators;
[0160] Key performance indicators include remaining storage space, average access latency, and throughput;
[0161] Check system logs for any unusual behavior or potential security threats;
[0162] Summarize all audit results and generate detailed audit reports;
[0163] It should be noted that regular and comprehensive security audits can not only detect potential security threats or vulnerabilities in a timely manner, but also monitor the usage of storage resources, thereby achieving the purpose of dynamically adjusting storage strategies. Continuous monitoring and optimization mechanisms help maintain the efficient operation of the system and ensure the long-term security and integrity of data.
[0164] This embodiment also provides a computer batch data storage system based on blockchain, including:
[0165] Data classification module, encryption processing module, smart contract allocation module, index record management module, data retrieval and verification module, and security audit module;
[0166] The data classification module is used to analyze computer batch data and classify it into hot data and cold data according to access frequency to obtain classified data sets;
[0167] An encryption processing module is used to encrypt the classified data set using a homomorphic encryption method to obtain an encrypted data set;
[0168] The smart contract allocation module is used to define the smart contract logic and allocate the encrypted data set to the corresponding storage tier, obtaining the data record of the allocated storage location;
[0169] The index record management module is used to create detailed index records and save them on the blockchain to obtain index records on the blockchain;
[0170] A data retrieval and verification module is used to determine the location of data when retrieving specific data by querying index records on the blockchain to obtain verified data;
[0171] The security audit module is used to check the integrity of data and the operating status of the system using security audit methods, obtain audit results, and adjust the storage strategy based on the audit results to obtain an optimized data storage strategy.
[0172] This embodiment also provides a computer device, which is suitable for the case of a blockchain-based computer batch data storage method, including: a memory and a processor; the memory is used to store computer-executable instructions, and the processor is used to execute computer-executable instructions, thereby implementing the blockchain-based computer batch data storage method proposed in the above embodiment.
[0173] The computer device may be a terminal, comprising a processor, memory, a communication interface, a display, and an input device connected via a system bus. The processor of the computer device provides computing and control capabilities. The memory of the computer device includes non-volatile storage media and internal memory. The non-volatile storage media stores an operating system and computer programs. The internal memory provides an environment for the operating system and computer programs stored in the non-volatile storage media. The communication interface of the computer device is used to communicate with external terminals via wired or wireless communication. Wireless communication may be achieved via Wi-Fi, a carrier network, NFC (near-field communication), or other technologies. The display of the computer device may be a liquid crystal display or an electronic ink display. The input device of the computer device may be a touchscreen layer covering the display, buttons, a trackball, or a touchpad provided on the computer device housing, or an external keyboard, touchpad, or mouse.
[0174] This embodiment also provides a storage medium having a computer program stored thereon, which, when executed by a processor, implements the computer batch data storage method based on blockchain as proposed in the above embodiment; the storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0175] In summary, the present invention ensures the security of data during transmission and storage by encrypting data using homomorphic encryption methods. The method allows certain computing tasks to be performed without decryption, greatly enhancing the data privacy protection capability. The encrypted data blocks are automatically allocated to the appropriate storage level through smart contracts, realizing an automated and efficient data management and distribution mechanism. By creating detailed index records and saving them on the blockchain, permanent recording and tracking of data location and metadata are achieved. This process not only simplifies the data retrieval process, but also enhances the data traceability and integrity verification capabilities, achieving the effect of enhancing data management transparency, improving data integrity and credibility, which is crucial for maintaining long-term data consistency and compliance.
[0176] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit the present invention. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention, which should all be included in the scope of the claims of the present invention.
Claims
1. A computer batch data storage method based on blockchain, characterized by: include: The data classification method is used to analyze computer batch data, which is divided into hot data and cold data according to the access frequency to obtain the classified data set; The classified data set is encrypted using a homomorphic encryption method to obtain an encrypted data set; Use smart contract definition logic to allocate the encrypted data set to the corresponding storage tier, and obtain the data record of the allocated storage location; Create detailed index records and save them on the blockchain to obtain index records on the blockchain; The method of querying the index record on the blockchain is used to determine the data location when retrieving the corresponding data, and to obtain verified data; Use security audit methods to check data integrity and system operation status, obtain audit results, and adjust storage strategies based on the audit results to obtain optimized data storage strategies; Create a detailed index record and save it on the blockchain to obtain the index record on the blockchain. The specific steps are: Create detailed index records for each allocated data block and save them on the blockchain; The index record includes the location information of the data block, the encryption key, and the metadata of the access rights, and the expression is: ; in, It is a function that creates index records, and the input is the encrypted data block , its storage location and the associated key , the output is index record ; The method of querying the index record on the blockchain is used to determine the data location when retrieving the corresponding data and obtain the verified data. The specific steps are as follows: When the corresponding data needs to be retrieved, the system receives a retrieval request from the user, which includes a unique identifier of the data block to be retrieved; Based on the unique identifier in the retrieval request, the corresponding index record is retrieved from the blockchain; Extract the actual storage location of the data block and the required decryption key from the index record; Obtaining the encrypted data block from the corresponding storage medium according to the extracted storage location; Use the decryption key extracted from the index record to decrypt the encrypted data block and restore the original data. The expression is: ; in, Is the decryption function, the input is the encrypted data block and decryption key , the output is the original data ; Use hash verification mechanism to verify the decrypted data to verify.
2. The computer batch data storage method based on blockchain according to claim 1, characterized in that: The data classification method is used to analyze computer batch data, and is divided into hot data and cold data according to access frequency to obtain a classified data set. The specific steps are as follows: Collect data access logs from computers; The data access log includes the number of accesses, access time and size information of the data block; For each data block, calculate its average access frequency, the expression is: ; in, Indicates the The data block in The timestamp of the first visit, is the total number of visits, is the length of the observation period, The larger the value, the hotter the data block; Based on the dynamic threshold adjustment mechanism and combined with the average access frequency and standard deviation of all data blocks in the entire data set, the threshold is set. The expression is: ; in, is an empirical constant used to adjust the sensitivity. is the average access frequency of all data blocks, is its standard deviation; When the average access frequency of a data block > , it is classified as hot data, otherwise it is considered cold data. The expression is: ; in, Indicates the The categories of the data blocks are divided and marked as classified datasets.
3. The computer batch data storage method based on blockchain according to claim 2, characterized in that: The homomorphic encryption method is used to encrypt the classified data set to obtain an encrypted data set. The specific steps are as follows: Based on the classified dataset Select BFV encryption parameters; The BFV encryption parameters include the degree, modulus, and coefficient modulus of the polynomial. ; Based on the randomization algorithm, the BFV encryption parameters are used to generate the public key and private key. The expression is: ; in, Is a key generation function, the input is the degree of the polynomial , modulus and coefficient modulus , the output is the public key and private key ; For each encrypted data block , using the generated public key Encrypt and generate the corresponding ciphertext , the expression is: ; in, Is the encryption function, the input is the original data and public key , the output is the encrypted data ; Using a private key Decrypt part of the ciphertext and compare it with the original data to ensure that it is correct. The expression is: ; in, Is the decryption function, the input is the ciphertext and private key , the output is the decrypted data .
4. The computer batch data storage method based on blockchain according to claim 3, characterized in that: The smart contract definition logic is used to allocate the encrypted data set to the corresponding storage level to obtain the data record of the allocated storage location. The specific steps are as follows: Define smart contract rules; The smart contract rules include access frequency thresholds for data blocks, prioritizing hot data to high-performance storage systems, and allocating cold data to the more cost-effective decentralized storage platform IPFS; Deploy the smart contract on the blockchain platform and initialize relevant parameters. The expression is: ; in, Represents a smart contract instance, Contains all parameters required for initialization; For the encrypted data block , assess whether it is hot data or cold data; Use average visit frequency and the set threshold To make a judgment, the expression is: ; ; Based on the evaluation results, the smart contract automatically allocates the data block to the appropriate storage tier; For hot data, choose a high-performance storage system; For cold data, choose low-cost storage media.
5. The computer batch data storage method based on blockchain according to claim 4, characterized in that: The security audit method is used to check the integrity of data and the operating status of the system, obtain audit results, and adjust the storage strategy based on the audit results to obtain an optimized data storage strategy. The specific steps are as follows: defining comprehensive audit standards; The audit standards include: Data integrity check: Verify that the data has not been tampered with; System performance evaluation: monitor the usage of storage resources; Security check: detect potential security threats or vulnerabilities; Collect the required audit data from the system, including the hash value of each data block, status information of storage resources, and log records of any abnormal events; For each data block, calculate its current hash value and compare it with the hash value in the index record; Analyze storage resource usage, including key performance indicators; The key performance indicators include remaining storage space, average access latency and throughput; Check system logs for any unusual behavior or potential security threats; Summarize all audit results and generate detailed audit reports.
6. A blockchain-based computer batch data storage system, based on the blockchain-based computer batch data storage method according to any one of claims 1 to 5, characterized in that: include: Data classification module, encryption processing module, smart contract allocation module, index record management module, data retrieval and verification module, and security audit module; The data classification module is used to analyze computer batch data and classify it into hot data and cold data according to access frequency to obtain a classified data set; The encryption processing module is used to encrypt the classified data set using a homomorphic encryption method to obtain an encrypted data set; The smart contract allocation module is used to define the smart contract logic and allocate the encrypted data set to the corresponding storage tier to obtain data records of the allocated storage location; The index record management module is used to create detailed index records and save them on the blockchain to obtain index records on the blockchain; The data retrieval and verification module is used to determine the data location when retrieving corresponding data by querying the index record on the blockchain to obtain verified data; The security audit module is used to use a security audit method to check the integrity of data and the operating status of the system, obtain audit results, and adjust the storage strategy based on the audit results to obtain an optimized data storage strategy.
7. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the blockchain-based computer batch data storage method according to any one of claims 1 to 5 are implemented.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the blockchain-based computer batch data storage method according to any one of claims 1 to 5 are implemented.
Citation Information
Patent Citations
Block chain data storage method based on fairness and access popularity
CN113608670A
Network information security comprehensive analysis and monitoring system and method
CN118413359A
Terminal interaction data storage security management method and system for instant messaging
CN118764496A