CN113806792A - File cloud storage method and device, readable storage medium and electronic equipment - Google Patents

File cloud storage method and device, readable storage medium and electronic equipment Download PDF

Info

Publication number
CN113806792A
CN113806792A CN202011375992.8A CN202011375992A CN113806792A CN 113806792 A CN113806792 A CN 113806792A CN 202011375992 A CN202011375992 A CN 202011375992A CN 113806792 A CN113806792 A CN 113806792A
Authority
CN
China
Prior art keywords
file
block
blocks
information
network
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202011375992.8A
Other languages
Chinese (zh)
Inventor
范鑫
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Jingdong Zhenshi Information Technology Co Ltd
Original Assignee
Beijing Jingdong Zhenshi Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Jingdong Zhenshi Information Technology Co Ltd filed Critical Beijing Jingdong Zhenshi Information Technology Co Ltd
Priority to CN202011375992.8A priority Critical patent/CN113806792A/en
Publication of CN113806792A publication Critical patent/CN113806792A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6209Protecting access to data via a platform, e.g. using keys or access control rules to a single file or object, e.g. in a secure envelope, encrypted and accessed using a key, or with access control rules appended to the object itself
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/11File system administration, e.g. details of archiving or snapshots
    • G06F16/113Details of archiving
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/16File or folder operations, e.g. details of user interfaces specifically adapted to file systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2221/00Indexing scheme relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/21Indexing scheme relating to G06F21/00 and subgroups addressing additional information or applications relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/2107File encryption

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Human Computer Interaction (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • Software Systems (AREA)
  • Storage Device Security (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the invention provides a file cloud storage method and device, a readable storage medium and electronic equipment. The method comprises the following steps: encrypting a first file to be uploaded by adopting a preset encryption algorithm to obtain a second file; splitting the second file into a plurality of file blocks according to the number of the registered network disks, wherein the number of the file blocks is not more than the number of the registered network disks; uploading each file block to a registered network disk respectively, wherein different file blocks are uploaded to different registered network disks; and uploading the metadata information of the first file, the position information of each file block in the second file and the corresponding relation between each file block and the network disk to a block chain. The invention improves the security of the file cloud storage.

Description

File cloud storage method and device, readable storage medium and electronic equipment
Technical Field
The invention relates to the technical field of data storage, in particular to a file cloud storage method and device, a readable storage medium and electronic equipment.
Background
With the development of internet technology, technologies such as big data, cloud computing, cloud storage, block chaining and the like have entered various aspects of people's lives. The data of the users and the data of the enterprises are stored by a single machine at the beginning, the storage is gradually transited to the storage by using a cloud server, and then the successive appearance of various network disks is accompanied. The network disk, namely the network hard disk, is an online cloud storage service released by some network companies. The method mainly provides file management functions of storage, backup, sharing and the like for users.
With the development of communication technology, the blockchain is gradually applied to an application scenario of data processing due to the advantages of decentralization, openness, transparency, incapability of tampering and the like. A blockchain is generally considered to be a distributed ledger, which is essentially a distributed computing and storage system. The block chain has a plurality of nodes, the nodes need to be commonly identified through certain nodes, and the nodes are organized together to form the block chain.
The current defects of the mesh disc technology are as follows:
1. since each network disk is operated by a single service provider, even if the network disk uses various encryption algorithms or the file is stored in a split manner, the security of the file data is difficult to guarantee. Such as: sudden network breakdown of the service provider, stop of service provider operation, stealing of user data on the network disk by internal staff, hacking and the like all result in loss of user data.
2. The integrity of the data cannot be verified. Such as: when a picture stored on a network disk by a user is maliciously modified by a few pixels or is added with partial pixels, the user does not know that own file data has been tampered at all, and therefore information transmission by a malicious person can be helped.
3. The uploading or downloading of the file is completely dependent on the bandwidth provided by the network disk service provider. Such as: the user must deal with various members to temporarily increase the upload or download speed.
4. Storage is limited. For example, the network disk capacity of an ordinary user is only 5G, and when the user needs to upload a file of 6G or more to the network disk, the user is limited, or only can request for a larger storage space.
The block chain as a distributed storage system needs to distribute each piece of data to each node in the chain, so that the node data in the chain will expand rapidly, and the block chain is not suitable for storing massive data.
Disclosure of Invention
The embodiment of the invention provides a file cloud storage method and device, a readable storage medium and electronic equipment, and aims to improve the security of file cloud storage.
The technical scheme of the embodiment of the invention is realized as follows:
a file cloud storage method comprises the following steps:
encrypting a first file to be uploaded by adopting a preset encryption algorithm to obtain a second file;
splitting the second file into a plurality of file blocks according to the number of the registered network disks, wherein the number of the file blocks is not more than the number of the registered network disks;
uploading each file block to a registered network disk respectively, wherein different file blocks are uploaded to different registered network disks;
and uploading the metadata information of the first file, the position information of each file block in the second file and the corresponding relation between each file block and the network disk to a block chain.
After the uploading the metadata information of the first file, the location information of each file block in the second file, and the corresponding relationship between each file block and the network disk to the block chain, the method further includes:
downloading metadata information of the first file, position information of each file block in the second file and the corresponding relation between each file block and the network disk from the block chain;
downloading the file blocks from the network disks respectively according to the corresponding relation between each file block and the network disks;
combining the file blocks into a second file according to the position information of each file block in the second file;
and decrypting the second file by adopting a decryption algorithm corresponding to the preset encryption algorithm, and obtaining the first file according to the file obtained by decryption and the metadata information of the first file.
After splitting the second file into a plurality of file blocks and before uploading each file block to a registered network disk, the method further includes:
calculating all file blocks by adopting a preset check algorithm to obtain check blocks;
the uploading the metadata information of the first file, the position information of each file block in the second file, and the corresponding relationship between each file block and the network disk to the block chain includes:
and uploading the metadata information of the first file, the position information of each file block in the second file, the corresponding relation between each file block and the network disk and the check block to a block chain.
After the uploading the metadata information of the first file, the location information of each file block in the second file, the correspondence between each file block and the network disk, and the check block to the block chain, the method further includes:
downloading metadata information of the first file, position information of each file block in the second file, corresponding relation between each file block and a network disk and a check block from a block chain;
downloading the file blocks from the network disks respectively according to the corresponding relation between each file block and the network disks;
if any file block fails to be downloaded, the check block is used for recovering the file block;
combining the file blocks into a second file according to the position information of each file block in the second file;
and decrypting the second file by adopting a decryption algorithm corresponding to the preset encryption algorithm, and obtaining the first file according to the file obtained by decryption and the metadata information of the first file.
After obtaining the check block, before uploading the metadata information of the first file, the location information of each file block in the second file, the corresponding relationship between each file block and the network disk, and the check block to the block chain, the method further includes:
respectively adopting a preset hash algorithm to calculate each file block to obtain a plurality of hash values;
the uploading the metadata information of the first file, the position information of each file block in the second file, the corresponding relation between each file block and the network disk and the check block to the block chain comprises:
and uploading the metadata information of the first file, the position information of each file block in the second file, the corresponding relation between each file block and the network disk, the check block and the hash value of each file block to a block chain.
After uploading the metadata information of the first file, the location information of each file block in the second file, the correspondence between each file block and the network disk, the check block, and the hash value of each file block to the block chain, the method further includes:
downloading metadata information of a first file, position information of each file block in a second file, corresponding relation between each file block and a network disk, a check block and a hash value of each file block from a block chain;
downloading the file blocks from the network disks respectively according to the corresponding relation between each file block and the network disks;
if any file block fails to be downloaded, the check block is used for recovering the file block;
verifying whether each file block is tampered by using the hash value of each file block, and if any file block is tampered, recovering the file block by using the check block;
combining the file blocks into a second file according to the position information of each file block in the second file;
and decrypting the second file by adopting a decryption algorithm corresponding to the preset encryption algorithm, and obtaining the first file according to the file obtained by decryption and the metadata information of the first file.
A file cloud storage apparatus, the apparatus comprising:
the encryption module is used for encrypting the first file to be uploaded by adopting a preset encryption algorithm to obtain a second file;
the splitting module is used for splitting the second file into a plurality of file blocks according to the number of the registered network disks, wherein the number of the file blocks is not more than the number of the registered network disks;
the file uploading module is used for uploading each file block to a registered network disk respectively, wherein different file blocks are uploaded to different registered network disks;
and the file information uploading module is used for uploading the metadata information of the first file, the position information of each file block in the second file and the corresponding relation between each file block and the network disk to the block chain.
The apparatus further comprises:
the file information downloading module is used for downloading the metadata information of the first file, the position information of each file block in the second file and the corresponding relation between each file block and the network disk from the block chain;
the file downloading module is used for respectively downloading the file blocks from the network disks according to the corresponding relation between each file block and the network disks;
the file block merging module is used for merging each file block into a second file according to the position information of each file block in the second file;
and the decryption module is used for decrypting the second file by adopting a decryption algorithm corresponding to the first encryption algorithm and obtaining the first file according to the file obtained by decryption and the metadata information of the first file.
A computer readable storage medium storing instructions that, when executed by a processor, cause the processor to perform the steps of the file cloud storage method of any one of the above.
An electronic device comprising a computer readable storage medium as described above, and the processor having access to the computer readable storage medium.
In the embodiment of the present invention, recording the storage of the first file includes: the metadata information of the first file, the position information of each file block in the second file and the corresponding relation between each file block and the network disk are uploaded to a block chain, and because the data volume of the storage record of the first file is small, the storage record of the first file is prevented from being stolen by a network disk operator, so that the safety of the first file is improved; and the recovery of the first file depends on the storage record of the first file, and the file data and the file cloud storage record of the first file are respectively stored on the network disk and the block chain, so that the safety of the first file is further improved.
Drawings
Fig. 1 is a flowchart of a file cloud storage method according to an embodiment of the present invention;
fig. 2 is a flowchart of a file cloud storage method according to another embodiment of the present invention;
fig. 3 is a flowchart of an uploading method in a file cloud storage process according to an embodiment of the present invention;
fig. 4 is a schematic diagram of a processing procedure performed before uploading a first file in the uploading method of the present invention;
fig. 5 is a flowchart of a downloading method in a file cloud storage process according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of a file cloud storage device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The terms "first," "second," "third," "fourth," and the like in the description and in the claims, as well as in the drawings, if any, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are, for example, capable of operation in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprising" and "having," as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements explicitly listed, but may include other steps or elements not explicitly listed or inherent to such process, method, article, or apparatus.
The technical solution of the present invention will be described in detail with specific examples. Several of the following embodiments may be combined with each other and some details of the same or similar concepts or processes may not be repeated in some embodiments.
Fig. 1 is a flowchart of a file cloud storage method according to an embodiment of the present invention, which includes the following specific steps:
step 101: and encrypting the first file to be uploaded by adopting a preset encryption algorithm to obtain a second file.
The specific encryption algorithm used in this step is not limited, and for example, a symmetric encryption algorithm may be used.
Step 102: and splitting the second file into a plurality of file blocks according to the number of the registered network disks, wherein the number of the file blocks is not more than the number of the registered network disks.
The execution subject of this embodiment may be a client, and the information of each network disk owned by the user that is registered on the client first includes: the name, access address, capacity, login account number and password of the network disk, and the like, so that the client knows the number of the registered network disks of the user.
In practical applications, in order to protect the file to the maximum, the number of file blocks may be equal to the number of the registered network disks of the user, that is, if the number of the registered network disks of the user is n, the second file is uniformly split into n file blocks, wherein if the size of the last file block is smaller than the first n-1 file blocks, the insufficient part is filled with 0.
Step 103: and uploading each file block to a registered network disk respectively, wherein different file blocks are uploaded to different registered network disks.
The client determines the number of the network disks needing to be connected according to the number of the file blocks, establishes connection with the network disks with the corresponding number according to the account numbers and the passwords of the network disks registered by the user, and uploads each file block to one network disk respectively.
Step 104: and uploading the metadata information of the first file, the position information of each file block in the second file and the corresponding relation between each file block and the network disk to a block chain.
The metadata information of the first file mainly includes: the file name and suffix of the first file may further include: and one or any combination of the size of the first file, the storage path, the uploading time, the number of split blocks and the like.
Wherein, the position information of each file block in the second file can be represented by the position sequence number 1, 2, 3,. of each file block in the second file. In practical application, one or any combination of the following information of the file blocks can be uploaded to the block chain together: the size of each file block, whether a padding exists, the offset of the padding, and the like.
In the corresponding relationship between each file block and the network disk, the file block may be identified by a position serial number of the file block in the second file, and the network disk may be identified by an access address of the network disk or a name of the network disk.
In practical application, in order to improve security, metadata information of the first file, position information of each file block in the second file, and a corresponding relationship between each file block and the network disk may be packaged and encrypted, and then uploaded to the block chain.
Fig. 2 is a flowchart of a file cloud storage method according to another embodiment of the present invention, which includes the following specific steps:
step 201: and encrypting the first file to be uploaded by adopting a preset encryption algorithm to obtain a second file.
The specific encryption algorithm used in this step is not limited, and for example, a symmetric encryption algorithm may be used.
Step 202: and splitting the second file into a plurality of file blocks according to the number of the registered network disks, wherein the number of the file blocks is not more than the number of the registered network disks.
The execution subject of this embodiment may be a client, and the information of each network disk owned by the user that is registered on the client first includes: the name, access address, capacity, login account number and password of the network disk, and the like, so that the client knows the number of the registered network disks of the user.
In practical applications, in order to protect the file to the maximum, the number of file blocks may be equal to the number of the registered network disks of the user, that is, if the number of the registered network disks of the user is n, the second file is uniformly split into n file blocks, wherein if the size of the last file block is smaller than the first n-1 file blocks, the insufficient part is filled with 0.
Step 203: and uploading each file block to a registered network disk respectively, wherein different file blocks are uploaded to different registered network disks.
The client determines the number of the network disks needing to be connected according to the number of the file blocks, establishes connection with the network disks with the corresponding number according to the account numbers and the passwords of the network disks registered by the user, and uploads each file block to one network disk respectively.
Step 204: and uploading the metadata information of the first file, the position information of each file block in the second file and the corresponding relation between each file block and the network disk to a block chain.
The metadata information of the first file mainly includes: the file name and suffix of the first file may further include: and one or any combination of the size of the first file, the storage path, the uploading time, the number of split blocks and the like.
Wherein, the position information of each file block in the second file can be represented by the position sequence number 1, 2, 3,. of each file block in the second file. In practical application, one or any combination of the following information of the file blocks can be uploaded to the block chain together: the size of each file block, whether a padding exists, the offset of the padding, and the like.
In the corresponding relationship between each file block and the network disk, the file block may be identified by a position serial number of the file block in the second file, and the network disk may be identified by an access address of the network disk or a name of the network disk.
In practical application, in order to improve security, metadata information of the first file, position information of each file block in the second file, and a corresponding relationship between each file block and the network disk may be packaged and encrypted, and then uploaded to the block chain.
Step 205: and downloading the metadata information of the first file, the position information of each file block in the second file and the corresponding relation between each file block and the network disk from the blockchain.
The method includes that a user registers authentication information of a block chain on a client in advance, the client uses the authentication information of the block chain to connect the block chain, and a storage record of a first file is downloaded from the block chain, and the method includes the following steps: the metadata information of the first file, the position information of each file block in the second file, the corresponding relation between each file block and the network disk and the like.
Step 206: and downloading the file blocks from each network disk respectively according to the corresponding relation between each file block and the network disk.
The client knows the access address or name of the network disk corresponding to each file block according to the corresponding relationship between each file block and the network disk, and then finds out the registration information of the network disk according to the access address or name of the network disk, such as: account number and password, etc., which are used to establish a connection with the network disk, and then the file blocks are downloaded from the network disk.
Step 207: and combining the file blocks into a second file according to the position information of each file block in the second file.
Here, before merging the file blocks, if it is known from the storage record of the first file: and if the last file block has a padding bit, removing the padding bit according to the padding bit offset.
Step 208: and decrypting the second file by adopting a decryption algorithm corresponding to the preset encryption algorithm, and obtaining the first file according to the file obtained by decryption and the metadata information of the first file.
The file cloud storage process in the invention comprises the following steps: the file uploading process and the file downloading process are respectively explained in detail as follows:
fig. 3 is a flowchart of an uploading method in a file cloud storage process according to an embodiment of the present invention, which includes the following specific steps:
step 301: the client encrypts the first file to be uploaded by adopting a preset encryption algorithm to obtain a second file.
The specific encryption algorithm used in this step is not limited, and for example, a symmetric encryption algorithm may be used.
Step 302: and the client splits the second file into a plurality of file blocks according to the number of the registered network disks, wherein the number of the file blocks is not more than the number of the registered network disks.
The execution subject of this embodiment may be a client, and the information of each network disk owned by the user that is registered on the client first includes: the name, access address, capacity, login account number and password of the network disk, and the like, so that the client knows the number of the registered network disks of the user.
In practical applications, in order to protect the file to the maximum, the number of file blocks may be equal to the number of the registered network disks of the user, that is, if the number of the registered network disks of the user is n, the second file is uniformly split into n file blocks, wherein if the size of the last file block is smaller than the first n-1 file blocks, the insufficient part is filled with 0.
Step 303: and the client calculates all the file blocks by adopting a preset check algorithm to obtain check blocks.
Here, the preset check algorithm may be a parity check algorithm.
Step 304: and the client side respectively adopts a preset Hash algorithm to carry out Hash calculation on each file block and the check block so as to obtain a Hash value corresponding to each file block and the check block.
Here, the preset Hash algorithm may employ an MD (Message Digest) 5 algorithm.
For example: if n file blocks exist, MD5 calculation is carried out on each file block and each check block respectively, and n +1 Hash values are obtained.
Step 305: and the client uploads each file block to one registered network disk respectively, wherein different file blocks are uploaded to different registered network disks.
The client determines the number of the network disks needing to be connected according to the number of the file blocks, establishes connection with the network disks with the corresponding number according to the account numbers and the passwords of the network disks registered by the user, and uploads each file block to one network disk respectively.
Step 306: the client uploads the metadata information, the file block information, the check block, the file check information and the file uploading information of the first file to the block chain.
The metadata information of the first file mainly includes: the file id, file name and suffix of the first file may further include: and one or any combination of information such as the size, the storage path, the uploading time, the number of split file blocks and the like of the first file.
Wherein the file block information includes: the file id of the first file, the file block id, the position serial number of each file block in the second file, the size of each file block, whether the last file block has a bit complement, the offset of the bit complement, the Hash value of each file block and the like.
The file verification information includes: the file id of the first file, the check block id, the Hash value of the check block and the like.
The file uploading information comprises: the file id of the first file, the corresponding relation between each file block id and the network disk id, the check block id and the like.
In practical application, in order to improve security, metadata information, file block information, check blocks, file check information, and file upload information of the first file may be packaged and encrypted, and then uploaded to the block chain.
Fig. 4 is a schematic diagram of a processing procedure performed before uploading the first file in the uploading method of the present invention.
Fig. 5 is a flowchart of a downloading method in a file cloud storage process according to an embodiment of the present invention, which includes the following specific steps:
step 501: the client downloads the metadata information, the file block information, the check block, the file check information and the file uploading information of the first file from the block chain.
The user registers authentication information of the block chain on the client in advance, the client uses the authentication information of the block chain to connect the block chain, and metadata information, file block information, check blocks, file check information and file uploading information of the first file are downloaded from the block chain.
Step 502: and the client downloads the file blocks from the network disks respectively according to the corresponding relation between the file block ids and the network disk ids in the file uploading information and the registered network disk information of the user.
Step 503: the client judges whether the downloading of the file blocks fails, if so, the step 504 is executed; otherwise, step 506 is performed.
Step 504: the client judges whether the number of file blocks failed in downloading is greater than 1, if so, the first file downloading is determined to fail, and the process is ended; otherwise, step 505 is performed.
Step 505: and the client recovers the file blocks which fail to be downloaded by adopting the check blocks.
Before the check block is used for recovering the file block which fails to be downloaded, the Hash value of the check block is calculated by adopting a preset Hash algorithm, then the Hash value is compared with the Hash value in the downloaded file check information, if the Hash value is consistent with the Hash value in the downloaded file check information, the check block is determined not to be tampered, the file block which fails to be downloaded is recovered by adopting the check block, otherwise, the check block is determined to be tampered, the file block which fails to be downloaded cannot be recovered by using the check block, the file failure is determined, and the process is ended.
Step 506: and the client side respectively carries out Hash calculation on each file block by adopting a preset Hash algorithm to obtain the Hash value of each file block, and respectively compares the Hash value of each file block with the Hash value of the file block in the file block information.
Step 507: the client judges whether a file block with inconsistent Hash values exists, if so, the step 508 is executed; otherwise, step 510 is performed.
Step 508: the client judges whether the number of the file blocks with inconsistent Hash values is larger than one, if so, the first file downloading is determined to fail, and the process is ended; otherwise, step 509 is performed.
Step 509: and the client recovers the file blocks with inconsistent Hash values by adopting the check blocks.
Step 510: and if the client determines that the last file block has a bit complement according to the file block information, removing the bit complement in the last file block according to the bit complement offset in the file block information, and then combining the file blocks into a second file according to the file block id in the file block information and the position serial numbers of the file blocks in the second file.
Step 511: and the client decrypts the second file by adopting a decryption algorithm corresponding to the preset encryption algorithm, and obtains the first file according to the file obtained by decryption and the metadata information of the first file.
The embodiment of the invention has the following beneficial technical effects:
firstly), recording the storage of the first file, comprising: the metadata information of the first file, the position information of each file block in the second file and the corresponding relation between each file block and the network disk are uploaded to a block chain, and because the data volume of the storage record of the first file is small, the storage record of the first file is prevented from being stolen by a network disk operator, so that the safety of the first file is improved;
secondly), the recovery of the first file depends on the storage record of the first file, and the file data and the file cloud storage record of the first file are respectively stored on the network disk and the block chain, so that the safety of the first file is further improved;
thirdly), the first file is encrypted and then split into a plurality of file blocks, and each file block is uploaded to one network disk only, so that on the premise of ensuring the safety of the first file, redundant storage space is not required to be occupied;
and fourthly) generating a check block for the split file blocks before uploading the first file, so that when any file block is lost, damaged or tampered, the check block can be used for recovery, and the safety of the first file is further improved.
Fig. 6 is a schematic structural diagram of a file cloud storage device according to an embodiment of the present invention, where the device mainly includes:
the encryption module 61 is configured to encrypt the first file to be uploaded by using a preset encryption algorithm to obtain a second file, and send metadata information of the first file to the file information uploading module 64.
The splitting module 62 is configured to split the second file obtained by the encrypting module 61 into a plurality of file blocks according to the number of the registered network disks, where the number of the file blocks is not greater than the number of the registered network disks, and send the location information of each file block in the second file to the file information uploading module 64.
And the file uploading module 63 is configured to upload each file block obtained by splitting by the splitting module 62 to one registered network disk, where different file blocks are uploaded to different registered network disks, and a correspondence between each file block and a network disk is sent to the file information uploading module 64.
And a file information uploading module 64, configured to upload the metadata information of the first file, the location information of each file block in the second file, and the corresponding relationship between each file block and the network disk to the block chain.
And the file information downloading module 65 is configured to download, from the blockchain, the metadata information of the first file, the location information of each file block in the second file, and the corresponding relationship between each file block and the network disk.
And a file downloading module 66, configured to download file blocks from each network disk respectively according to the corresponding relationship between each file block downloaded by the file information downloading module 65 and the network disk.
And the file block merging module 67 is configured to merge the file blocks downloaded by the file downloading module 66 into the second file according to the location information of each file block downloaded by the file information downloading module 65 in the second file.
And the decryption module 68 is configured to decrypt the second file obtained by the file block merging module 67 by using a decryption algorithm corresponding to the first encryption algorithm, and obtain the first file according to the file obtained by decryption and the metadata information of the first file downloaded by the file information downloading module 65.
Embodiments of the present application also provide a computer-readable storage medium, which stores instructions that, when executed by a processor, may perform the steps of the file cloud storage method as described above. In practical applications, the computer readable medium may be included in the apparatus/device/system described in the above embodiments, or may exist alone without being assembled into the apparatus/device/system. The computer-readable storage medium carries one or more programs, and when the one or more programs are executed, the implementation method for implementing application containerization described in the embodiments above can be implemented. According to embodiments disclosed herein, the computer-readable storage medium may be a non-volatile computer-readable storage medium, which may include, for example and without limitation: a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing, without limiting the scope of the present disclosure. In the embodiments disclosed herein, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
The embodiment of the invention also provides electronic equipment, wherein the device for realizing the method in the embodiment of the application can be integrated. Specifically, the method comprises the following steps:
the electronic device may include a processor of one or more processing cores, memory of one or more computer-readable storage media, and a computer program stored on the memory and executable on the processor. When the program of the memory is executed, the file cloud storage method can be realized.
Specifically, in practical applications, the electronic device may further include a power supply, an input unit, an output unit, and other components. Those skilled in the art will appreciate that the configuration of the electronic device in the embodiments of the present invention is not intended to be limiting, and may include more or fewer components than those shown, or some components in combination, or a different arrangement of components. Wherein:
the processor is a control center of the electronic device, connects various parts of the whole electronic device by various interfaces and lines, and performs various functions of the server and processes data by running or executing software programs and/or modules stored in the memory and calling data stored in the memory, thereby performing overall monitoring of the electronic device.
The memory may be used to store software programs and modules, i.e., the computer-readable storage media described above. The processor executes various functional applications and data processing by executing software programs and modules stored in the memory. The memory may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function, and the like; the storage data area may store data created according to the use of the server, and the like. Further, the memory may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device. Accordingly, the memory may also include a memory controller to provide the processor access to the memory.
The electronic equipment also comprises a power supply for supplying power to each component, and the power supply can be logically connected with the processor through the power management system, so that the functions of charging, discharging, power consumption management and the like can be managed through the power management system. The power supply may also include any component of one or more dc or ac power sources, recharging systems, power failure detection circuitry, power converters or inverters, power status indicators, and the like.
The electronic device may further include an input unit operable to receive input numeric or character information and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control.
The electronic device may further include an output unit that may be used to display information input by or provided to a user as well as various graphical user interfaces that may be made up of graphics, text, icons, video, and any combination thereof.
The flowchart and block diagrams in the figures of the present application illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments disclosed herein. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
Those skilled in the art will appreciate that various combinations and/or combinations of features recited in the various embodiments and/or claims of the present disclosure can be made, even if such combinations or combinations are not explicitly recited in the present application. In particular, the features recited in the various embodiments and/or claims of the present application may be combined and/or coupled in various ways, all of which fall within the scope of the present disclosure, without departing from the spirit and teachings of the present application.
The principles and embodiments of the present invention are explained herein using specific examples, which are provided only to help understanding the method and the core idea of the present invention, and are not intended to limit the present application. It will be appreciated by those skilled in the art that changes may be made in this embodiment and its broader aspects and without departing from the principles, spirit and scope of the invention, and that all such modifications, equivalents, improvements and equivalents as may be included within the scope of the invention are intended to be protected by the claims.

Claims (10)

1. A file cloud storage method is characterized by comprising the following steps:
encrypting a first file to be uploaded by adopting a preset encryption algorithm to obtain a second file;
splitting the second file into a plurality of file blocks according to the number of the registered network disks, wherein the number of the file blocks is not more than the number of the registered network disks;
uploading each file block to a registered network disk respectively, wherein different file blocks are uploaded to different registered network disks;
and uploading the metadata information of the first file, the position information of each file block in the second file and the corresponding relation between each file block and the network disk to a block chain.
2. The method according to claim 1, wherein after uploading the metadata information of the first file, the location information of each file block in the second file, and the correspondence relationship between each file block and the network disk onto the block chain, further comprising:
downloading metadata information of the first file, position information of each file block in the second file and the corresponding relation between each file block and the network disk from the block chain;
downloading the file blocks from the network disks respectively according to the corresponding relation between each file block and the network disks;
combining the file blocks into a second file according to the position information of each file block in the second file;
and decrypting the second file by adopting a decryption algorithm corresponding to the preset encryption algorithm, and obtaining the first file according to the file obtained by decryption and the metadata information of the first file.
3. The method of claim 1, wherein after splitting the second file into a plurality of file blocks and before uploading each file block to a registered network disk, further comprising:
calculating all file blocks by adopting a preset check algorithm to obtain check blocks;
the uploading the metadata information of the first file, the position information of each file block in the second file, and the corresponding relationship between each file block and the network disk to the block chain includes:
and uploading the metadata information of the first file, the position information of each file block in the second file, the corresponding relation between each file block and the network disk and the check block to a block chain.
4. The method according to claim 3, wherein after uploading the metadata information of the first file, the location information of each file block in the second file, the correspondence relationship between each file block and the network disk, and the check block to the block chain, further comprising:
downloading metadata information of the first file, position information of each file block in the second file, corresponding relation between each file block and a network disk and a check block from a block chain;
downloading the file blocks from the network disks respectively according to the corresponding relation between each file block and the network disks;
if any file block fails to be downloaded, the check block is used for recovering the file block;
combining the file blocks into a second file according to the position information of each file block in the second file;
and decrypting the second file by adopting a decryption algorithm corresponding to the preset encryption algorithm, and obtaining the first file according to the file obtained by decryption and the metadata information of the first file.
5. The method of claim 3, wherein after obtaining the parity chunks and before uploading the metadata information of the first file, the location information of each file chunk in the second file, the correspondence between each file chunk and the network disk, and the parity chunks to the chunk chain, further comprising:
respectively adopting a preset hash algorithm to calculate each file block to obtain a plurality of hash values;
the uploading the metadata information of the first file, the position information of each file block in the second file, the corresponding relation between each file block and the network disk and the check block to the block chain comprises:
and uploading the metadata information of the first file, the position information of each file block in the second file, the corresponding relation between each file block and the network disk, the check block and the hash value of each file block to a block chain.
6. The method according to claim 5, wherein after uploading the metadata information of the first file, the location information of each file block in the second file, the correspondence between each file block and the network disk, the check block, and the hash value of each file block onto the block chain, further comprising:
downloading metadata information of a first file, position information of each file block in a second file, corresponding relation between each file block and a network disk, a check block and a hash value of each file block from a block chain;
downloading the file blocks from the network disks respectively according to the corresponding relation between each file block and the network disks;
if any file block fails to be downloaded, the check block is used for recovering the file block;
verifying whether each file block is tampered by using the hash value of each file block, and if any file block is tampered, recovering the file block by using the check block;
combining the file blocks into a second file according to the position information of each file block in the second file;
and decrypting the second file by adopting a decryption algorithm corresponding to the preset encryption algorithm, and obtaining the first file according to the file obtained by decryption and the metadata information of the first file.
7. A file cloud storage device, the device comprising:
the encryption module is used for encrypting the first file to be uploaded by adopting a preset encryption algorithm to obtain a second file;
the splitting module is used for splitting the second file into a plurality of file blocks according to the number of the registered network disks, wherein the number of the file blocks is not more than the number of the registered network disks;
the file uploading module is used for uploading each file block to a registered network disk respectively, wherein different file blocks are uploaded to different registered network disks;
and the file information uploading module is used for uploading the metadata information of the first file, the position information of each file block in the second file and the corresponding relation between each file block and the network disk to the block chain.
8. The apparatus of claim 7, further comprising:
the file information downloading module is used for downloading the metadata information of the first file, the position information of each file block in the second file and the corresponding relation between each file block and the network disk from the block chain;
the file downloading module is used for respectively downloading the file blocks from the network disks according to the corresponding relation between each file block and the network disks;
the file block merging module is used for merging each file block into a second file according to the position information of each file block in the second file;
and the decryption module is used for decrypting the second file by adopting a decryption algorithm corresponding to the first encryption algorithm and obtaining the first file according to the file obtained by decryption and the metadata information of the first file.
9. A computer readable storage medium storing instructions which, when executed by a processor, cause the processor to perform the steps of the file cloud storage method of any of claims 1 to 6.
10. An electronic device comprising the computer-readable storage medium of claim 9, and the processor having access to the computer-readable storage medium.
CN202011375992.8A 2020-11-30 2020-11-30 File cloud storage method and device, readable storage medium and electronic equipment Pending CN113806792A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011375992.8A CN113806792A (en) 2020-11-30 2020-11-30 File cloud storage method and device, readable storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011375992.8A CN113806792A (en) 2020-11-30 2020-11-30 File cloud storage method and device, readable storage medium and electronic equipment

Publications (1)

Publication Number Publication Date
CN113806792A true CN113806792A (en) 2021-12-17

Family

ID=78943509

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011375992.8A Pending CN113806792A (en) 2020-11-30 2020-11-30 File cloud storage method and device, readable storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN113806792A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114726884A (en) * 2022-06-06 2022-07-08 深圳市佑荣信息科技有限公司 Financial-grade file safe storage method and system

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105812383A (en) * 2016-05-03 2016-07-27 江苏科技大学 Information hiding method based on divided storage of multiple network disks
CN107249046A (en) * 2017-08-15 2017-10-13 李俊庄 A kind of distributed cloud storage system construction method based on block chain

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105812383A (en) * 2016-05-03 2016-07-27 江苏科技大学 Information hiding method based on divided storage of multiple network disks
CN107249046A (en) * 2017-08-15 2017-10-13 李俊庄 A kind of distributed cloud storage system construction method based on block chain

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114726884A (en) * 2022-06-06 2022-07-08 深圳市佑荣信息科技有限公司 Financial-grade file safe storage method and system
CN114726884B (en) * 2022-06-06 2022-09-27 深圳市佑荣信息科技有限公司 Financial-grade file safe storage method and system

Similar Documents

Publication Publication Date Title
US9171145B2 (en) Protecting cryptographic secrets using file system attributes
US11074139B2 (en) Dynamic block chain system using metadata for backing up data based on digest rules
CN109995505B (en) Data security duplicate removal system and method in fog computing environment and cloud storage platform
CN110661748B (en) Log encryption method, log decryption method and log encryption device
US20170140175A1 (en) Secure removable storage for aircraft systems
US9288042B1 (en) Securely and redundantly storing encryption credentials system and method
US20160335017A1 (en) Information processing apparatus for storing data in cloud environment, terminal device, and storage method
CN111783078A (en) Android platform security chip control system
CA3028091C (en) Securing data at rest utilizing cloud provider service agnostic encrypted data transportability
CN109274646B (en) Key management client server side method, system and medium based on KMIP protocol
CN109150811B (en) Method and device for realizing trusted session and computing equipment
CN113726515B (en) UKEY-based key processing method, storage medium and electronic device
CN114189337A (en) Firmware burning method, device, equipment and storage medium
CN113806792A (en) File cloud storage method and device, readable storage medium and electronic equipment
CN112818404B (en) Data access permission updating method, device, equipment and readable storage medium
CN116800535A (en) Method and device for avoiding secret between multiple servers
CN116707885A (en) Secure and trusted starting method and system for generating random key based on TPCM
CN110674511A (en) Offline data protection method and system based on elliptic curve encryption algorithm
CN113468607B (en) Method for generating and using encrypted tamper-proof file
KR101885146B1 (en) Method and apparatus for protecting an application
CN111130788B (en) Data processing method and system, data reading method and iSCSI server
CN111737771A (en) Supervision place police service terminal system based on Android dual-system trusted operation framework
CN111143863A (en) Data processing method, device, equipment and computer readable storage medium
Rong et al. Enhanced Secure Storage of Big Data at Rest with Improved ECC and Paillier Homomorphic Encryption Algorithms.
CN114650175B (en) Verification method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination