Distributed File Storage via IPFS and Blockchain Encryption
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing blockchain file storage methods face issues with high server pressure, low encryption efficiency, and poor security, making it difficult to meet the storage requirements for large files.
Innovation Solution
A file storage method that splits a to-be-stored file into sub-files, uploads them to the InterPlanetary File System (IPFS), generates an address set from the IPFS addresses, encrypts this address set, and stores the encrypted address set on a blockchain network.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If files are stored using existing blockchain storage mode with server-based splitting and encryption, then file storage functionality is achieved, but server pressure becomes excessive and encryption efficiency is low
Solution Approach 1:
The patent divides the file into multiple sub-files and distributes them across different IPFS nodes rather than processing everything through a centralized server. This segmentation reduces server pressure and enables parallel encryption operations, thereby improving encryption efficiency while maintaining security through distributed storage architecture
Solution Approach 2:
The patent introduces IPFS as an intermediary layer between the user and blockchain storage. Files are first uploaded to IPFS to obtain storage addresses, then only these addresses (not the actual files) are stored on the blockchain. This intermediary approach significantly reduces server pressure and improves encryption efficiency by minimizing the data that needs to be processed and encrypted
2Ease of operation
If all sub-files are obtained and decrypted through the server for file download, then file retrieval is achieved, but server pressure remains excessive
Solution Approach 1:
The patent extracts the file storage function from the centralized server and relocates it to the distributed IPFS network. The server only needs to manage blockchain addresses, while actual file retrieval operations are performed directly by users from IPFS nodes, dramatically reducing server pressure while maintaining ease of operation
Solution Approach 2:
Users directly retrieve files from IPFS nodes using the blockchain-stored addresses without requiring server intervention for each download operation. The system enables self-service file retrieval where users can independently access their files from the distributed network, eliminating the need for server-based file delivery and reducing server pressure
3Reliability
If files are split into multiple sub-files and encrypted at the server, then storage security is improved, but encryption efficiency decreases
Solution Approach 1:
The patent segments the encryption process across multiple distributed nodes in the IPFS network rather than concentrating it at the server. Each node can independently encrypt sub-files in parallel, significantly reducing total encryption time while maintaining or enhancing security through the distributed architecture
Solution Approach 2:
The patent performs file splitting and address generation in advance before encryption. By pre-processing files into sub-files and obtaining their IPFS addresses beforehand, the system prepares the data structure for efficient parallel encryption operations, reducing the overall time required for the encryption process while maintaining security
Data Source
AI summary
Embodiments of the present disclosure disclose a file storage method, terminal, and storage medium. The file storage method includes: obtaining a to-be-stored file, performing splitting processing on the to-be-stored file to obtain N sub-files corresponding to the to-be-stored file, wherein N is an integer greater than or equal to 1; sending the N sub-files to an IPFS, and receiving M pieces of address information corresponding to the N sub-files returned by the IPFS, wherein M is an integer greater than or equal to 1 and less than or equal to N; generating an address set corresponding to the to-be-stored file according to the M pieces of address information, and encrypting the address set to obtain an address set ciphertext; sending the address set ciphertext to a blockchain network and receiving a target index value returned by the blockchain network, wherein the target index value is used to identify the address set ciphertext.


