Block chain-based SaaS data storage method and system

By adopting blockchain-based technology in SaaS data storage, using QRNG to generate high random keys and smart contract management data, the problems of insufficient encryption security and low storage efficiency in the existing technology are solved, and high security and efficient storage of data are achieved.

CN120144667APending Publication Date: 2025-06-13WANHUI INTERNET (SHENZHEN) TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510209263.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-25
Publication Date
2025-06-13

AI Technical Summary

Technical Problem

In the existing SaaS data storage technology, the generation of encryption keys is predictable, resulting in insufficient encryption security and unreasonable storage structure, resulting in low storage efficiency and waste of resources. At the same time, in a multi-user environment, data isolation is not thorough, affecting security and privacy.

Method used

The blockchain-based SaaS data storage method is adopted to generate high random keys through QRNG for encryption, and smart contracts and blockchain technology are used to ensure the secure storage and access management of data. Data preprocessing and smart contract generation, encryption and storage location determination, blockchain recording and monitoring, user request and verification, data acquisition and decryption, data access monitoring and optimization and other steps jointly realize secure storage and efficient access of data.

Benefits of technology

It improves the security and efficiency of data storage, ensures the privacy and integrity of data, avoids resource waste, and achieves complete data isolation in a multi-user environment, improving the security and user experience of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120144667A_ABST
    Figure CN120144667A_ABST
Patent Text Reader

Abstract

The invention discloses a block chain-based SaaS data storage method and system, and relates to the field of data storage, and the method comprises the following operation steps: S1, data preprocessing and intelligent contract generation; s2, encryption and storage position determination; s3, recording and monitoring the block chain; s4, user request and verification; s5, data acquisition and decryption; and S6, monitoring and optimizing data access. According to the SaaS data storage method and system based on the block chain, a caching strategy of user behaviors is established, particularly hot data caching and dynamic caching updating, the data reading speed is increased, hot data accessed at high frequency are stored in a high-speed cache, a user does not need to read from a low-speed storage medium when accessing again, and the user experience is improved. The data is directly obtained from the cache, waiting time is greatly shortened, dynamic cache updating ensures that the cache always stores the most valuable data, changes of user requirements are adapted, and efficient data access service and data storage layout optimization are continuously provided for users.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data storage, and particularly to a blockchain-based SaaS data storage method and system. Background Art

[0002] SaaS data storage refers to a solution provided for users to store and manage their business data in the SaaS mode. Multiple users share the same software instance and storage infrastructure, but the data is isolated from each other. The data of each tenant is logically independent, which can ensure the security and privacy of the data, and can flexibly adjust the storage capacity according to the growth of the user data volume and business requirements. Whether it is the rapid development of a small startup or the seasonal business peak of a large enterprise, the required storage resources can be obtained in real time.

[0003] In the prior art, the generation of encryption keys may have a certain degree of predictability, which may lead to insufficient encryption security after data storage, and the storage structure is unreasonable. Its storage structure lacks effective analysis of data types and access patterns, resulting in problems in the selection of the storage structure, low storage efficiency, increased waste of resources, and at the same time, in a multi-user environment, there is a risk of incomplete data isolation, resulting in a significant reduction in security and privacy.

[0004] Therefore, it is necessary to propose a blockchain-based SaaS data storage method and system to solve the above problems. Summary of the Invention

[0005] The main object of the present invention is to provide a blockchain-based SaaS data storage method and system, which can effectively solve the problems in the background art.

[0006] To achieve the above object, the technical solution adopted by the present invention is as follows:

[0007] A blockchain-based SaaS data storage method includes the following operating steps:

[0008] S1: Data preprocessing and smart contract generation. The user uploads data to the SaaS platform. The SaaS platform first uses artificial intelligence algorithms to preprocess the data, including data format checking, intelligent classification, and preliminary analysis. At the same time, the SaaS platform generates corresponding smart contracts according to the service requirements of the user. After the user confirms, the smart contract will be deployed to the blockchain.

[0009] S2: Encryption and storage location determination. Use the key generated by QRNG to encrypt the data, and generate the corresponding private key according to the extended Euclidean algorithm. Determine the storage location based on the nature of the data and the current storage network status, and store the data on the intelligent storage nodes of the distributed storage ecosystem. The storage nodes will optimize the data storage method according to their own intelligent algorithms and update the storage information to the blockchain;

[0010] S3: Blockchain recording and monitoring. The storage information and the user's service contract information will be recorded on the blockchain. The blockchain network will continuously monitor the storage status of the data, and the storage nodes will continuously send update information about the storage status to the blockchain, including the health status of the storage, data integrity, and availability;

[0011] S4: User request and verification. The user initiates a data access request, and the request is first verified through the blockchain network. The verification process includes user identity verification, access permission verification, and data ownership verification. The verification process uses the random number generated by QRNG for encrypted communication to ensure the secure transmission of verification information;

[0012] S5: Data acquisition and decryption. After verification, the user obtains the encrypted data from the storage node. The storage node transfers the data to the user through the optimized network topology according to the data storage mode and user requirements. The user decrypts the data using the private key corresponding to the encryption key originally generated by QRNG to obtain the original data;

[0013] S6: Data access monitoring and optimization. The blockchain will record the user's data access information. The storage nodes will optimize the data storage and access policies according to the user's access behavior. If it is found that the user frequently accesses certain data, the storage nodes will automatically adjust the storage location and storage structure of these data to improve the subsequent access speed.

[0014] Preferably, the blockchain in S1 is integrated through public chain, private chain, and permissioned chain. In S3, through cross-chain bridging technology, ensure the consistency of service contract information on public chain, private chain, and permissioned chain.

[0015] Preferably, in S1, the smart contract includes data ownership and control smart contract, incentive-compatible smart contract, privacy protection and zero-knowledge proof smart contract. Among them, the ownership and control smart contract is developed using Ethereum based on the decentralized characteristics of the blockchain. In the contract code, define the structure of data ownership, including the address of the data owner, the hash value of the data, and relevant metadata information. Through the private key signature and verification mechanism, ensure that only the data owner can authorize operations on the data. At the same time, use the immutable characteristics of the blockchain to permanently record the ownership information on the blockchain;

[0016] The incentive - compatible smart contract is based on Ethereum. By creating a cryptocurrency system through the smart contract, it is used to reward storage resource sharers and data quality contributors. In the contract, the rules for resource sharing and data quality assessment and the corresponding reward mechanism are defined. When the reward conditions are met, the smart contract automatically distributes cryptocurrency to the contributors;

[0017] The privacy - protection and zero - knowledge proof smart contract combines the zero - knowledge proof library with the smart contract. In the smart contract, the logic of data processing is defined, and at the same time, zero - knowledge proof technology is used to ensure that calculations and verifications are completed without revealing the original data.

[0018] Preferably, the data ownership and control smart contract includes the following operation steps:

[0019] S101: Data upload. When the user uploads data to the SaaS platform, the SaaS platform calls the data ownership and control smart contract to generate a unique data identifier, and records the hash value of the data and the user address in the contract to establish the initial data ownership;

[0020] S102: Permission setting. If the user needs to share data, they can enter the address of the authorized party, set the corresponding access permissions and time limits, sign these settings with the private key, and then submit them to the data ownership and control smart contract for verification;

[0021] S103: Authorization verification. When the authorized party attempts to access the data, the data ownership and control smart contract will verify whether its access permissions meet the settings. Only after passing the verification can the authorized party access the data;

[0022] The incentive - compatible smart contract includes the following operation steps:

[0023] S104: Resource registration. Users with idle storage resources register their sharable storage capacity and location information on the SaaS platform. The incentive - compatible smart contract records this information and assigns a resource identifier to it;

[0024] S105: Resource request. Users with storage needs search for available shared resources on the SaaS platform. After finding suitable resources, they send requests to the resource owners, and the request information will be sent to the incentive - compatible smart contract for recording;

[0025] S106: Transaction completion. After receiving the request, the resource owner confirms the transaction in the incentive - compatible smart contract. The incentive - compatible smart contract deducts the corresponding cryptocurrency from the account of the demander according to the agreed price and usage duration, and distributes it to the resource owner. At the same time, the incentive - compatible smart contract records the relevant information of this resource usage;

[0026] S107: Data quality operation. When users find that the data is incorrect or incomplete, they submit corrected and supplementary data on the platform. The incentive-compatible smart contract will verify the submitted data to check whether it meets the standards for data quality improvement.

[0027] S108: Reward distribution. Different reward amounts are set according to the importance of the data and the complexity of the modification. If the submitted data passes the verification, the incentive-compatible smart contract will distribute cryptocurrency to the contributor according to the preset reward rules.

[0028] The privacy protection and zero-knowledge proof smart contract includes the following operation steps:

[0029] S109: Encrypted data upload. Users encrypt the data and upload it to the SaaS platform to ensure the security of the data during transmission and storage.

[0030] S110: Zero-knowledge proof request. When users need to analyze or perform other operations on the data, they send a zero-knowledge proof request to the privacy protection and zero-knowledge proof smart contract. The users specify the operations to be performed in the request.

[0031] S111: Calculation and verification. After receiving the request, the privacy protection and zero-knowledge proof smart contract uses zero-knowledge proof technology to perform calculations on the encrypted data. After the calculation is completed, the smart contract provides the proof result to the user. The user can verify the proof to confirm the correctness of the calculation result without viewing the original data.

[0032] S112: Privacy audit. The privacy protection and zero-knowledge proof smart contract will regularly audit the storage and use process of the data. When potential privacy risks are detected, the privacy protection and zero-knowledge proof smart contract triggers an alarm and records the relevant information. Users can view the audit report at any time to understand the security status of their data.

[0033] Preferably, in S2, the following steps are specifically included:

[0034] S201: Data classification and analysis, including content recognition: The storage node includes image recognition, text analysis, and audio-video parsing algorithms, which are used to quickly determine the data type when new data is received; it also includes access pattern prediction: By analyzing past data access records through machine learning algorithms, a user behavior model is established, and the correlation between data is analyzed simultaneously.

[0035] S202: Storage structure optimization, including based on data types: For structured data such as database tables, the storage nodes adopt efficient columnar storage and row-based storage structures, and select according to the data reading and writing characteristics. When the data is mainly read and often queried by column, columnar storage is adopted; for unstructured data such as pictures and videos, a specific file system format is used to ensure image quality while reducing storage space; it also includes based on access frequency: Store frequently accessed data in the cache module of the solid-state drive to reduce the reading time. For infrequently accessed data, transfer it to the mechanical hard drive. In terms of storage layout, store data that is often accessed together in adjacent physical locations to reduce disk seek time;

[0036] S203: Data compression and encoding, including algorithm selection: For different types of data, the storage nodes automatically select appropriate compression algorithms. For text data, the LZ77 compression algorithm is used; for image data, the JPEG compression algorithm is adopted, and a trade-off is made according to the requirements for image quality and storage space needs; it also includes dynamic adjustment: As the data is updated and the usage situation changes, the storage nodes dynamically adjust the compression strategy. When it is found that a certain part of the text data becomes more repetitive after update, the compression algorithm is reapplied to further improve the storage efficiency;

[0037] S204: Update the storage information to the blockchain. The storage nodes monitor the usage of their own storage capacity, remaining space, and data reading and writing speed in real time; record the specific physical location and logical address of each data block in the storage medium for fast positioning and retrieval. At the same time, record the backup location information of the data to ensure data reliability; the storage nodes record the optimization operations performed on the data in detail, including data compression and storage structure adjustment, including operation time, operation type, and data range involved;

[0038] S205: The storage nodes use the RSA algorithm to encrypt the collected storage information to generate ciphertext to prevent information from being stolen or tampered with; the storage nodes use their own private keys to digitally sign the encrypted information to prove the source and integrity of the information. The signature process generates a hash value based on the encrypted information using the hash algorithm, and then signs the hash value with the private key. The specific steps for encrypting the storage information using the RSA algorithm are as follows:

[0039] Select two different large prime numbers p and q, and calculate the product of p and q. The formula is:

[0040] n = p × q;

[0041] Where n is the length of the key and is represented in binary bits;

[0042] Calculate the Euler's totient function of n. The formula is:

[0043]

[0044] Then select an integer e, where e is a prime number, and such that e is relatively prime to Here, e is part of the public key. Then calculate the private key d according to the formula:

[0045]

[0046] mod is used to find the remainder. Generate the public key (n, e) and the private key (n, d) based on the formula;

[0047] Assume that the storage information to be encrypted by the storage node is m, where m is an integer less than n. Use the public key (n, e) to encrypt and calculate the ciphertext. The formula is:

[0048] c = m e mod n;

[0049] c is the ciphertext, so that the storage information m is converted into the ciphertext c;

[0050] S206: The storage node sends the encrypted and signed storage information to the blockchain network through a pre-set blockchain interface; after the smart contract on the blockchain receives the information sent by the storage node, it first verifies the validity of the digital signature to ensure that the information has not been tampered with and comes from a legitimate storage node. After the verification passes, the smart contract parses and stores the storage information in a specific block of the blockchain, and at the same time updates the relevant data indexes and status information for subsequent query and management.

[0051] Preferably, in S6, it specifically includes the following steps:

[0052] S601: Hot data caching. According to the behavior records of user data storage, analyze the frequently accessed data. The storage node marks this data as hot data and stores it in the cache. When the user requests this data again, it is directly read from the cache, greatly shortening the data access time;

[0053] S602: Dynamic cache update. As the user access behavior changes, the storage node dynamically adjusts the cache content. When it is found that the user's access frequency to a certain data suddenly increases and the data in the original cache is no longer hot, the storage node timely replaces the data in the original cache with the new hot data to ensure that the cache always stores the most frequently accessed data;

[0054] S603: Associated data storage. By analyzing the user's access path and data operation types, when the storage node discovers that there is a close association between certain data, these two types of data will be stored in adjacent physical locations and similar storage areas. At this time, when the user accesses the order data, the associated customer data can be read more quickly to reduce the disk seek time and improve the data access efficiency.

[0055] S604: Load balancing. When multiple users access the storage node simultaneously, the storage node adopts load balancing technology to avoid data transmission delays caused by excessive load on a single node.

[0056] S605: Network link optimization. Based on the transmission delay problem, the storage node analyzes the network link status. When it discovers that a certain network link often experiences delays and packet loss, the storage node will automatically switch to the backup link for data transmission. At the same time, it collaborates with the network administrator to optimize the network link, including upgrading the network bandwidth and repairing link failures, to improve the stability and speed of data transmission.

[0057] A blockchain-based SaaS data storage system includes a blockchain fusion module, a dynamic chain structure adjustment module, a storage node module, a network topology optimization module, a data storage optimization module, a smart contract module, and an autonomous decision-making module.

[0058] Preferably, the blockchain fusion module is used to fuse the public chain, private chain, and permissioned chain in a hyper-converged blockchain network. The public chain part is used for public data verification and traceability to attract more participants to conduct trusted verification of the data. The private chain is used to store highly sensitive user privacy information and is only accessible by the user and authorized service providers. The permissioned chain is used for collaboration and resource sharing among data storage service providers, and only permitted nodes can join. At the same time, through cross-chain bridging technology, seamless interaction between the public chain, private chain, and permissioned chain is achieved, enabling different types of data to be stored and managed in the most suitable blockchain environment while ensuring overall consistency and interoperability.

[0059] The dynamic chain structure adjustment module dynamically adjusts the structure of the blockchain according to the storage requirements of the data and the network load.

[0060] Preferably, the storage node module includes storage nodes for preprocessing the stored data. Each storage node is equipped with a machine learning model to automatically learn the data storage and access patterns, predict user needs, and perform prefetching and caching of data in advance to improve data access efficiency.

[0061] The network topology optimization module adopts a storage network topology optimization algorithm based on reinforcement learning. Storage nodes will dynamically adjust their connection relationships according to data access frequencies and network latencies to form an optimal storage network topology, which is used to adjust in real time according to network conditions and user behaviors, so that the data always selects the fastest and safest path during storage and transmission;

[0062] The data storage optimization module is used to continuously optimize the storage method of storage nodes according to the stored data content and user behaviors.

[0063] Preferably, the intelligent contract module combines artificial intelligence technology to automatically generate intelligent contracts according to the storage and service requirements of users. It is used to understand user requirements using natural language processing technology based on a simple description input by the user, and then automatically generate corresponding intelligent contract codes through machine learning algorithms, which is used to reduce errors and time costs in manually writing contracts;

[0064] The autonomous decision-making module is used to automatically adjust the storage strategy according to the storage status of data, user behaviors, and changes in the external environment. When it is found that some data has not been accessed for a long time, the intelligent contract can decide to transfer it to a more economical storage medium; when the data access volume suddenly increases, the intelligent contract can automatically trigger an operation to expand the storage capacity and simultaneously adjust the allocation of storage nodes.

[0065] Compared with the prior art, the present invention provides a blockchain-based SaaS data storage method and system, which has the following beneficial effects:

[0066] 1. This blockchain-based SaaS data storage method and system uses QRNG to generate truly random numbers by utilizing the uncertainty principle of quantum physics. Different from traditional pseudo-random number generators, the generated random numbers have higher randomness and unpredictability. Such random numbers have higher security for data encryption and key generation, can greatly enhance the security of encryption algorithms, and prevent encryption vulnerabilities caused by the predictability of random numbers. Based on this, the security of data storage can be improved.

[0067] 2. This blockchain-based SaaS data storage method and system can deeply understand user requirements by detailed recording of user access time and frequency, access paths, and data operation types, enabling users to accurately grasp busy periods, providing a strong basis for resource allocation and business decision-making, helping to prepare data in advance, optimize server resource allocation, and ensure that users can quickly obtain data during peak periods.

[0068] 3. The blockchain-based SaaS data storage method and system establish a caching strategy for user behavior, especially hot data caching and dynamic cache updating, which greatly improves the data reading speed. The hot data with high-frequency access is stored in the cache. When the user accesses again, there is no need to read from the low-speed storage medium, but directly obtain from the cache, which greatly shortens the waiting time. The dynamic cache updating ensures that the cache always stores the most valuable data, adapts to the changes in user needs, and continuously provides users with efficient data access services, and optimizes the data storage layout.

[0069] 4. The blockchain-based SaaS data storage method and system evenly distribute user requests to multiple storage nodes, improving the concurrent processing ability of the entire storage system, ensuring that users can still quickly access data under high concurrency conditions. It can not only enhance the user experience but also make full use of the resources of the storage system, avoiding resource waste.

[0070] 5. The keys generated by QRNG in the blockchain-based SaaS data storage method and system are mainly used to encrypt the data stored by users, which can ensure the confidentiality of data during storage and transmission, preventing unauthorized users from obtaining the content of the data. The keys generated by the RSA algorithm are used to encrypt the storage information collected by the storage nodes. At the same time, the RSA key can also be used for digital signatures to ensure the reliability and integrity of the source of the storage information, preventing these information from being tampered with or stolen. BRIEF DESCRIPTION OF THE DRAWINGS

[0071] Figure 1 is a flowchart of the present invention. DETAILED DESCRIPTION OF THE INVENTION

[0072] In order to make the technical means, creative features, achieved purposes and effects of the present invention easy to understand, the present invention will be further described below in conjunction with specific embodiments.

[0073] Embodiment 1:

[0074] As Figure 1 shown, a blockchain-based SaaS data storage method includes the following operation steps:

[0075] S1: Data preprocessing and smart contract generation. The user uploads data to the SaaS platform. The SaaS platform first uses artificial intelligence algorithms to preprocess the data, including data format checking, intelligent classification, and preliminary analysis. At the same time, the SaaS platform generates corresponding smart contracts according to the user's service requirements. After the user confirms, the smart contract will be deployed to the blockchain, and the blockchain is integrated through public chain, private chain, and permissioned chain;

[0076] Smart contracts include data ownership and control smart contracts, incentive-compatible smart contracts, and privacy protection and zero-knowledge proof smart contracts. Among them, the ownership and control smart contracts are developed using Ethereum based on the decentralized characteristics of the blockchain. In the contract code, a structure for data ownership is defined, including the address of the data owner, the hash value of the data, and relevant metadata information. Through the private key signature and verification mechanism, it is ensured that only the data owner can authorize operations on the data. At the same time, using the immutable characteristic of the blockchain, the ownership information is permanently recorded on the blockchain;

[0077] The incentive-compatible smart contract is based on Ethereum and creates a cryptocurrency system through the smart contract to reward storage resource sharers and data quality contributors. In the contract, rules for resource sharing and data quality assessment and corresponding reward mechanisms are defined. When the reward conditions are met, the smart contract automatically distributes cryptocurrency to the contributors;

[0078] The privacy protection and zero-knowledge proof smart contract combines a zero-knowledge proof library with the smart contract. In the smart contract, the logic of data processing is defined, and at the same time, zero-knowledge proof technology is used to ensure that calculations and verifications are completed without revealing the original data. When performing data statistical analysis, homomorphic encryption calculations are performed on the encrypted data through zero-knowledge proof technology, and the results are returned to the user;

[0079] The data ownership and control smart contract includes the following operation steps:

[0080] S101: Data upload. When the user uploads data to the SaaS platform, the SaaS platform calls the data ownership and control smart contract to generate a unique data identifier, and records the hash value of the data and the user address in the contract to establish the initial ownership of the data;

[0081] S102: Permission setting. If the user needs to share data, they can enter the address of the authorized party and set the corresponding access permissions and time limits. The user signs these settings with the private key and then submits them to the data ownership and control smart contract for verification;

[0082] S103: Authorization verification. When the authorized party attempts to access the data, the data ownership and control smart contract will verify whether its access permissions conform to the settings. Only after passing the verification can the authorized party access the data. If the set permission is read-only, the authorized party will not be able to modify the data;

[0083] The incentive-compatible smart contract includes the following operation steps:

[0084] S104: Resource registration. Users with idle storage resources register their shareable storage capacity and location information on the SaaS platform, incentivizing compatible smart contracts to record this information and assigning a resource identifier to them.

[0085] S105: Resource request. Users with storage needs search for available shared resources on the SaaS platform. After finding suitable resources, they send a request to the resource owner, and the request information is sent to a compatible smart contract for recording.

[0086] S106: Transaction completion. After receiving the request, the resource owner confirms the transaction in the compatible smart contract. The compatible smart contract deducts the corresponding cryptocurrency from the demander's account according to the agreed price and usage duration and distributes it to the resource owner. At the same time, the compatible smart contract records the relevant information of this resource usage.

[0087] S107: Data quality operation. When users find that the data is incorrect or incomplete, they submit corrected and supplementary data on the platform. The compatible smart contract will verify the submitted data to check whether it meets the standards for data quality improvement.

[0088] S108: Reward distribution. Different reward amounts are set according to the importance of the data and the complexity of the modification. If the submitted data passes the verification, the compatible smart contract distributes cryptocurrency to the contributor according to the preset reward rules.

[0089] The privacy protection and zero - knowledge proof smart contract includes the following operation steps:

[0090] S109: Encrypted data upload. Users encrypt the data and upload it to the SaaS platform to ensure the security of the data during transmission and storage.

[0091] S110: Zero - knowledge proof request. When users need to analyze or perform other operations on the data, they send a zero - knowledge proof request to the privacy protection and zero - knowledge proof smart contract, specifying the operations to be performed in the request.

[0092] S111: Calculation and verification. After receiving the request, the privacy protection and zero - knowledge proof smart contract uses zero - knowledge proof technology to perform calculations on the encrypted data. After the calculation is completed, it provides the proof result to the user. The user can verify the proof to confirm the correctness of the calculation result without viewing the original data.

[0093] S112: Privacy Audit. The privacy protection and zero-knowledge proof smart contract will regularly audit the process of data storage and usage. When potential privacy risks are detected, the privacy protection and zero-knowledge proof smart contract will trigger an alarm and record relevant information. Users can view the audit report at any time to understand the security status of their data.

[0094] S2: Encryption and Storage Location Determination. Use the key generated by QRNG to encrypt the data, and generate the corresponding private key according to the extended Euclidean algorithm. Determine the storage location based on the nature of the data and the current storage network status, and store the data on the intelligent storage nodes of the distributed storage ecosystem. The storage nodes will optimize the data storage method according to their own intelligent algorithms and update the storage information to the blockchain.

[0095] Specifically, it includes the following steps:

[0096] S201: Data Classification and Analysis, including Content Recognition: The storage nodes include image recognition, text analysis, and audio-video parsing algorithms, which are used to quickly determine the data type when receiving new data. For a picture, it can identify whether it is a landscape photo or a portrait photo; for text, it can determine whether it is a news report or an academic paper. It also includes Access Pattern Prediction: Analyze the past data access records through machine learning algorithms to establish a user behavior model. When it is found that the user often accesses the sales data report on Monday morning, the storage node will predict that there is a high probability of accessing this data during this period. At the same time, analyze the correlation between data, such as the correlation between order data, customer data, and product data. When a certain order data is accessed, predict that the related data may also be accessed.

[0097] S202: Storage Structure Optimization, including Based on Data Type: For structured data, such as database tables, the storage nodes adopt efficient columnar storage and row-based storage structures, and select according to the data reading and writing characteristics. When the data is mainly read and often queried by column, columnar storage is adopted; for unstructured data, such as pictures and videos, use specific file system formats, such as the JPEG-XR format for pictures, to ensure image quality while reducing storage space. It also includes Based on Access Frequency: Store the frequently accessed data in the high-speed cache module of the solid-state drive to reduce the reading time. For the low-frequency accessed data, transfer it to the mechanical hard disk. In the storage layout, store the data that is often accessed together in adjacent physical locations to reduce the disk seek time.

[0098] S203: Data Compression and Encoding, including algorithm selection: For different types of data, the storage node automatically selects an appropriate compression algorithm. For text data, the LZ77 compression algorithm is used; for image data, the JPEG compression algorithm is adopted, with a trade-off based on the requirements for image quality and storage space. It also includes dynamic adjustment: As the data is updated and usage patterns change, the storage node dynamically adjusts the compression strategy. When it is found that a certain part of the text data becomes more repetitive after update, the compression algorithm is reapplied to further improve storage efficiency;

[0099] S204: Update the stored information to the blockchain. The storage node monitors its own storage capacity usage, remaining space, and data read / write speed in real time, for example, collecting this data every 5 minutes to form a time-series record of the storage state; record the specific physical location and logical address of each data block in the storage medium for fast location and retrieval. At the same time, record the backup location information of the data to ensure data reliability; the storage node records in detail the optimization operations performed on the data, including data compression and storage structure adjustment, including the operation time, operation type, and data range involved;

[0100] S205: The storage node uses the RSA algorithm to encrypt the collected storage information to generate ciphertext to prevent information from being stolen or tampered with; the storage node uses its own private key to digitally sign the encrypted information to prove the source and integrity of the information. The signature process generates a hash value of the encrypted information based on the hash algorithm, and then signs the hash value with the private key. The specific steps for encrypting the storage information using the RSA algorithm are as follows:

[0101] Select two different large prime numbers p and q, and calculate the product of p and q. The formula is:

[0102] n = p × q;

[0103] where n is the length of the key and is represented in binary bits;

[0104] Calculate the Euler's totient function of n. The formula is:

[0105]

[0106] Then select an integer e, where e is a prime number, and such that e is relatively prime to Here, e is part of the public key, and then calculate the private key d according to the formula. The formula is:

[0107]

[0108] mod is to find the remainder. Based on the formula, generate the public key (n, e) and the private key (n, d);

[0109] Suppose the storage information to be encrypted by the storage node is m, where m is an integer less than n. The public key (n, e) is used for encryption to calculate the ciphertext. The formula is as follows:

[0110] c = m e mod n;

[0111] c is the ciphertext, which converts the storage information m into the ciphertext c;

[0112] S206: The storage node sends the encrypted and signed storage information to the blockchain network through a pre-set blockchain interface. After receiving the information sent by the storage node, the smart contract on the blockchain first verifies the validity of the digital signature to ensure that the information has not been tampered with and comes from a legitimate storage node. After passing the verification, the smart contract parses and stores the storage information in a specific block of the blockchain, and at the same time updates the relevant data indexes and status information for subsequent query and management.

[0113] S3: Blockchain recording and monitoring. The storage information and the service contract information of users will be recorded on the blockchain. The blockchain network continuously monitors the storage status of data. At the same time, through cross-chain bridging technology, it ensures the consistency of information on public blockchains, private blockchains, and permissioned blockchains. The storage node continuously sends update information on the storage status to the blockchain, including the health status of storage, data integrity, and availability.

[0114] S4: User request and verification. The user initiates a data access request, and the request is first verified through the blockchain network. The verification process includes user identity verification, access permission verification, and data ownership verification. The verification process uses random numbers generated by QRNG for encrypted communication to ensure the secure transmission of verification information.

[0115] S5: Data acquisition and decryption. After passing the verification, the user obtains the encrypted data from the storage node. The storage node transfers the data to the user through an optimized network topology according to the storage mode of the data and the user's needs. The user uses the private key corresponding to the encryption key initially generated by QRNG to decrypt the data to obtain the original data.

[0116] S6: Data access monitoring and optimization. The blockchain records the user's data access information. The storage node optimizes the data storage and access policies according to the user's access behavior. If it is found that the user frequently accesses certain data, the storage node will automatically adjust the storage location and storage structure of these data to improve the subsequent access speed;

[0117] Specifically, it includes the following steps:

[0118] S601: Hot data caching. Based on the behavior records of user data storage, frequently accessed data is analyzed. The storage node marks this data as hot data and stores it in the cache. When the user requests this data again, it is directly read from the cache, greatly shortening the data access time.

[0119] S602: Dynamic cache update. As the user access behavior changes, the storage node dynamically adjusts the cache content. When it is found that the access frequency of a certain data by the user suddenly increases while the data in the original cache is no longer hot, the storage node timely replaces the data in the original cache with the new hot data to ensure that the cache always stores the most frequently accessed data.

[0120] S603: Associated data storage. By analyzing the user's access path and data operation types, when the storage node discovers that there is a close association between certain data, these two types of data will be stored in adjacent physical locations and similar storage areas. At this time, when the user accesses the order data, the associated customer data can be read faster to reduce the disk seek time and improve the data access efficiency.

[0121] S604: Load balancing. When multiple users access the storage node simultaneously, the storage node adopts load balancing technology to avoid data transmission delays caused by excessive load on a single node. The user access requests are evenly distributed to multiple storage nodes through a software load balancer to ensure that the load of each node is within a reasonable range, thereby improving the overall data access speed.

[0122] S605: Network link optimization. Based on the transmission delay problem, the storage node analyzes the network link status. When it is found that a certain network link often experiences delays and packet loss, the storage node will automatically switch to the backup link for data transmission. At the same time, it collaborates with the network administrator to optimize the network link, including upgrading the network bandwidth and repairing link failures, to improve the stability and speed of data transmission.

[0123] Embodiment 2:

[0124] A blockchain-based SaaS data storage system includes a blockchain integration module, a dynamic chain structure adjustment module, a storage node module, a network topology optimization module, a data storage optimization module, a smart contract module, and an autonomous decision-making module.

[0125] The blockchain fusion module is used to fuse public blockchains, private blockchains, and permissioned blockchains in a hyper-converged blockchain network. The public blockchain part is used for public data verification and traceability, attracting more participants to conduct trusted verification of data; the private blockchain is used to store highly sensitive user privacy information, which can only be accessed by users and authorized service providers; the permissioned blockchain is used for collaboration and resource sharing among data storage service providers, and only authorized nodes can join. At the same time, through cross-chain bridging technology, seamless interaction among public blockchains, private blockchains, and permissioned blockchains is achieved, enabling different types of data to be stored and managed in the most suitable blockchain environment while ensuring overall consistency and interoperability;

[0126] The dynamic chain structure adjustment module dynamically adjusts the structure of the blockchain according to the storage requirements of data and network load. When a large number of users need to store data, new sub-chains and side-chains are automatically created, and a part of the data is diverted to these new chains. At the same time, intelligent contracts on the chain are used to automatically allocate resources and adjust the consensus mechanism to ensure performance and security. Through intelligent monitoring and analysis algorithms, real-time decisions can be made based on storage capacity, transaction frequency, and node performance metrics to ensure that the system is always in an optimal state.

[0127] The storage node module includes storage nodes, which are used to preprocess the stored data. Each storage node is equipped with a machine learning model to automatically learn the storage and access patterns of data, predict user needs, and perform prefetching and caching of data in advance to improve data access efficiency;

[0128] The network topology optimization module adopts a storage network topology optimization algorithm based on reinforcement learning. Storage nodes will dynamically adjust their connection relationships according to data access frequency and network latency to form an optimal storage network topology, which is used to adjust in real time according to network conditions and user behavior, enabling data to always select the fastest and safest path during storage and transmission;

[0129] The data storage optimization module is used to continuously optimize the storage method according to the stored data content and user behavior of the storage nodes. For data that is often accessed together, the storage nodes will store them in close physical locations to reduce the latency of data reading; for similar types of data, similar storage structures and compression algorithms will be adopted to improve storage efficiency.

[0130] The intelligent contract module combines artificial intelligence technology to automatically generate intelligent contracts according to users' storage and service requirements. It uses natural language processing technology to understand users' needs based on the simple descriptions input by users, and then automatically generates the corresponding intelligent contract code through machine learning algorithms to reduce errors and time costs in manually writing contracts;

[0131] The autonomous decision-making module is used to automatically adjust the storage policy according to the storage status of data, user behavior, and changes in the external environment. When it is found that some data has not been accessed for a long time, the smart contract can decide to transfer it to a more economical storage medium; when the data access volume suddenly increases, the smart contract can automatically trigger an operation to expand the storage capacity and adjust the allocation of storage nodes at the same time.

[0132] The above shows and describes the basic principles, main features, and advantages of the present invention. Those skilled in the art of this industry should understand that the present invention is not limited by the above embodiments. What is described in the above embodiments and the specification only illustrates the principles of the present invention. Without departing from the spirit and scope of the present invention, the present invention will have various changes and improvements, and these changes and improvements all fall within the scope of the present invention claimed. The scope of protection claimed by the present invention is defined by the appended claims and their equivalents.

Claims

1. A blockchain-based SaaS data storage method, characterized by: The steps include: S1: Data preprocessing and smart contract generation. Users upload data to the SaaS platform. The SaaS platform first uses artificial intelligence algorithms to preprocess the data, including data format checking, intelligent classification, and preliminary analysis. At the same time, the SaaS platform generates corresponding smart contracts based on the user's service needs. After the user confirms, the smart contract will be deployed on the blockchain. S2: Encryption and storage location determination: Encrypt the data using the key generated by QRNG, and generate the corresponding private key according to the Euclidean expansion algorithm. Determine the storage location based on the nature of the data and the current state of the storage network, and store the data on the intelligent storage nodes of the distributed storage ecosystem. The storage nodes will optimize the data storage method based on their own intelligent algorithms and update the storage information to the blockchain. S3: Blockchain recording and monitoring. Storage information and user service contract information will be recorded on the blockchain. The blockchain network will continuously monitor the storage status of the data. Storage nodes will continuously send updated information on the storage status to the blockchain, including storage health, data integrity and availability. S4: User request and verification. The user initiates a data access request, which is first verified through the blockchain network. The verification process includes user identity authentication, access permission verification, and data ownership verification. The verification process uses random numbers generated by QRNG for encrypted communication to ensure the secure transmission of verification information. S5: Data acquisition and decryption. After verification, the user obtains the encrypted data from the storage node. The storage node transmits the data to the user through the optimized network topology according to the data storage mode and user needs. The user uses the private key corresponding to the encryption key originally generated by QRNG to decrypt the data and obtain the original data. S6: Data access monitoring and optimization. The blockchain will record the user's data access information. The storage node will optimize the data storage and access strategy based on the user's access behavior. If it is found that the user frequently accesses certain data, the storage node will automatically adjust the storage location and storage structure of this data to improve the subsequent access speed.

2. A blockchain-based SaaS data storage method according to claim 1, characterized in that: The blockchain in S1 is integrated through public chain, private chain and permission chain. In S3, the consistency of service contract information on public chain, private chain and permission chain is ensured through cross-chain bridging technology.

3. A blockchain-based SaaS data storage method according to claim 1, characterized in that: In S1, smart contracts include data ownership and control smart contracts, incentive-compatible smart contracts, and privacy protection and zero-knowledge proof smart contracts. The ownership and control smart contracts are based on the decentralized nature of blockchain and are developed using Ethereum. In the contract code, the structure of data ownership is defined, including the address of the data owner, the hash value of the data, and related metadata information. Through the private key signature and verification mechanism, it is ensured that only the data owner can authorize operations on the data. At the same time, the ownership information is permanently recorded on the blockchain using the tamper-proof nature of the blockchain. Incentive-compatible smart contracts are based on Ethereum. Through smart contracts, a cryptocurrency system is created to reward storage resource sharers and data quality contributors. In the contract, the rules for resource sharing and data quality assessment and the corresponding reward mechanism are defined. When the reward conditions are met, the smart contract automatically issues cryptocurrency to the contributors. Privacy protection and zero-knowledge proof smart contracts use the zero-knowledge proof library combined with smart contracts. In the smart contract, the logic of data processing is defined, and zero-knowledge proof technology is used to ensure that calculations and verifications are completed without leaking the original data.

4. A blockchain-based SaaS data storage method according to claim 3, characterized in that: The data ownership and control smart contract includes the following steps: S101: Data upload. When a user uploads data to the SaaS platform, the SaaS platform calls the data ownership and control smart contract to generate a unique data identifier, and records the data’s hash value and user address in the contract to establish the initial ownership of the data. S102: Permission setting. If the user needs to share data, he can enter the address of the authorized party and set the corresponding access rights and time limits. The user signs these settings with the private key and then submits them to the data ownership and control smart contract for verification; S103: Authorization verification. When the authorized party attempts to access the data, the data ownership and control smart contract will verify whether its access rights comply with the settings. Only after passing the verification can the authorized party access the data. The incentive-compatible smart contract includes the following steps: S104: Resource registration: Users with idle storage resources register their sharable storage capacity and location information on the SaaS platform, and the incentive-compatible smart contract records this information and assigns it a resource identifier; S105: Resource request. Users with storage requirements search for available shared resources on the SaaS platform. After finding suitable resources, they send a request to the resource owner. The request information is sent to the incentive-compatible smart contract for recording. S106: The transaction is completed. After receiving the request, the resource owner confirms the transaction in the incentive-compatible smart contract. The incentive-compatible smart contract deducts the corresponding cryptocurrency from the demander's account according to the price and usage time agreed by both parties, and distributes it to the resource owner. At the same time, the incentive-compatible smart contract records the relevant information of this resource usage; S107: Data quality operation: When users find that the data is wrong or incomplete, they submit the corrected or supplemented data on the platform. The incentive-compatible smart contract will verify the submitted data to check whether it meets the standards for improving data quality. S108: Reward issuance: different reward amounts are set according to the importance of the data and the complexity of the modification. If the submitted data passes the verification, the incentive-compatible smart contract will issue cryptocurrency to the contributor according to the preset reward rules; The privacy protection and zero-knowledge proof smart contract includes the following steps: S109: Data encryption upload: users encrypt data and upload it to the SaaS platform to ensure the security of data during transmission and storage; S110: Zero-knowledge proof request. When the user needs to analyze or perform other operations on the data, a zero-knowledge proof request is sent to the privacy protection and zero-knowledge proof smart contract. The user specifies the operations to be performed in the request. S111: Calculation and verification, privacy protection and zero-knowledge proof After receiving the request, the smart contract uses zero-knowledge proof technology to perform calculations on the encrypted data. After the calculation is completed, the proof result is provided to the user. The user can verify the proof to confirm the correctness of the calculation result without viewing the original data; S112: Privacy audit, privacy protection and zero-knowledge proof smart contracts will regularly audit the storage and use of data. When potential privacy risks are detected, the privacy protection and zero-knowledge proof smart contracts will trigger an alarm and record relevant information. Users can view the audit report at any time to understand the security status of their data.

5. A blockchain-based SaaS data storage method according to claim 1, characterized in that: The S2 specifically includes the following steps: S201: Data classification and analysis, including content identification: storage nodes include image recognition, text analysis, audio and video parsing algorithms, which are used to quickly determine the data type when new data is received; access pattern prediction: using machine learning algorithms to analyze past data access records, establish user behavior models, and analyze the correlation between data; S202: Optimization of storage structure, including based on data type: for structured data, such as database tables, storage nodes use efficient column storage and row storage structures, and are selected according to the data reading and writing characteristics. When the data is mainly read and often queried by column, column storage is used; for unstructured data, such as pictures and videos, a specific file system format is used to ensure image quality while reducing storage space; also based on access frequency: frequently accessed data is stored in the cache module of the solid-state hard disk to reduce reading time, and infrequently accessed data is transferred to the mechanical hard disk. In terms of storage layout, data that is frequently accessed together is stored in adjacent physical locations to reduce disk seek time; S203: Data compression and encoding, including algorithm selection: For different types of data, the storage node automatically selects the appropriate compression algorithm. For text data, the LZ77 compression algorithm is used; for image data, the JPEG compression algorithm is used, based on the trade-off between image quality requirements and storage space requirements; it also includes dynamic adjustment: as data is updated and usage changes, the storage node dynamically adjusts the compression strategy. When it is found that a part of text data becomes more repetitive after being updated, the compression algorithm is reapplied to further improve storage efficiency; S204: Update the storage information to the blockchain. The storage node monitors its own storage capacity usage, remaining space, and data read and write speed in real time. The specific physical location and logical address of each data block in the storage medium are recorded for rapid positioning and retrieval. At the same time, the backup location information of the data is recorded to ensure the reliability of the data. The storage node records the optimization operations performed on the data, including data compression and storage structure adjustment, in detail, including the operation time, operation type, and data range involved. S205: The storage node uses the RSA algorithm to encrypt the collected storage information and generate ciphertext to prevent the information from being stolen or tampered with; the storage node uses its own private key to digitally sign the encrypted information to prove the source and integrity of the information. The signing process generates a hash value from the encrypted information based on the hash algorithm, and then signs the hash value with the private key. The RSA algorithm is used to encrypt the storage information, which specifically includes the following steps: Select two different large prime numbers p and q, and calculate the product of p and q. The formula is: n = p × q; Where n is the length of the key and is expressed in binary bits; Calculate the Euler function of n, the formula is: Then choose an integer e, e is a prime number, where So that e and Mutually prime, where e is part of the public key, and then the private key d is calculated according to the formula: mod is the remainder, and the public key (n, e) and private key (n, d) are generated based on the formula; Assume that the storage information to be encrypted by the storage node is m, where m is an integer less than n. Use the public key (n, e) for encryption and calculate the ciphertext. The formula is: c=m e modn ; c is the ciphertext, so that the stored information m is converted into the ciphertext c; S206: The storage node sends the encrypted and signed storage information to the blockchain network through a pre-set blockchain interface; after receiving the information sent by the storage node, the smart contract on the blockchain first verifies the validity of the digital signature to ensure that the information has not been tampered with and comes from a legitimate storage node. After the verification is passed, the smart contract parses the storage information and stores it in a specific block of the blockchain, and updates the relevant data index and status information for subsequent query and management.

6. A blockchain-based SaaS data storage method according to claim 1, characterized in that: The S6 specifically includes the following steps: S601: Hotspot data cache: according to the user data storage behavior record, the frequently accessed data is analyzed, and the storage node marks the data as hotspot data and stores it in the cache. When the user requests the data again, it is directly read from the cache, which greatly shortens the data access time. S602: Dynamic cache update: As the user access behavior changes, the storage node dynamically adjusts the cache content. When it is found that the user's access frequency to a certain data suddenly increases, and the data in the original cache is no longer a hot spot, the storage node promptly replaces the data in the original cache with the new hot data to ensure that the cache always stores the most frequently accessed data. S603: Associated data storage: by analyzing the user's access path and data operation type, when the storage node finds that there is a close association between certain data, the two types of data will be stored in adjacent physical locations and close storage areas. At this time, when the user accesses the order data, the associated customer data can be read faster, which is used to reduce the disk seek time and improve the data access efficiency. S604: Load balancing. When multiple users access a storage node at the same time, the storage node uses load balancing technology to avoid data transmission delay caused by excessive load on a single node. S605: Network link optimization. Based on the transmission delay problem, the storage node analyzes the network link status. When it is found that a certain network link often has delays and packet loss, the storage node will automatically switch to the backup link for data transmission. At the same time, it cooperates with the network administrator to optimize the network link, including upgrading the network bandwidth and repairing link failures, to improve the stability and speed of data transmission.

7. A blockchain-based SaaS data storage system, using a blockchain-based SaaS data storage method according to claims 1-6, characterized in that: It includes blockchain fusion module, dynamic chain structure adjustment module, storage node module, network topology optimization module, data storage optimization module, smart contract module and autonomous decision-making module.

8. A blockchain-based SaaS data storage system according to claim 7, characterized in that: The blockchain fusion module is used to integrate the public chain, private chain and permission chain into a hyper-converged blockchain network. The public chain part is used for public data verification and traceability to attract more participants to conduct credible data verification; the private chain is used to store highly sensitive user privacy information and is only accessible by users and authorized service providers; the permission chain is used for collaboration and resource sharing between data storage service providers, and only licensed nodes can join. At the same time, the seamless interaction of the public chain, private chain and permission chain is achieved through cross-chain bridging technology, so that data of different natures can be stored and managed in the most suitable blockchain environment, while ensuring overall consistency and interoperability; The dynamic chain structure adjustment module dynamically adjusts the structure of the blockchain according to the data storage requirements and network load.

9. A blockchain-based SaaS data storage system according to claim 7, characterized in that: The storage node module includes storage nodes for preprocessing stored data. Each storage node is equipped with a machine learning model for automatically learning data storage and access patterns, predicting user needs, and pre-fetching and caching data in advance to improve data access efficiency. The network topology optimization module adopts a storage network topology optimization algorithm based on reinforcement learning. The connection relationship between storage nodes is dynamically adjusted according to data access frequency and network delay to form an optimal storage network topology, which is used to make real-time adjustments based on network conditions and user behavior, so that data always chooses the fastest and safest path during storage and transmission; The data storage optimization module is used to continuously optimize the storage mode of the storage node according to the stored data content and user behavior.

10. A blockchain-based SaaS data storage system according to claim 7, characterized in that: The smart contract module combines artificial intelligence technology to automatically generate smart contracts based on the user's storage and service requirements. It uses natural language processing technology to understand user needs based on a simple description entered by the user, and then automatically generates the corresponding smart contract code through a machine learning algorithm to reduce errors and time costs in manually writing contracts. The autonomous decision-making module is used to automatically adjust the storage strategy according to the storage status of the data, user behavior and changes in the external environment. When it is found that certain data has not been accessed for a long time, the smart contract can decide to transfer it to a more economical storage medium; when the data access volume suddenly increases, the smart contract can automatically trigger the operation of expanding the storage capacity and adjust the allocation of storage nodes.

Citation Information

Cited By

  • Electronic component manufacturing production data traceability system based on block chain

    CN121304198A