Disclosure of Invention
The invention mainly aims to provide a cloud data protection method based on distributed storage. By further blocking, encrypting, distributing and storing the data, the data are dispersedly stored in different cloud servers and processed in different encryption modes, the reliability of a single system is improved, the reliability of the data is realized, and the safety of cloud data is greatly guaranteed.
In order to achieve the above object, the present invention provides a cloud data protection method based on distributed storage, which performs data protection through a protection system, and comprises the following steps:
step S1: deploying M cloud servers E in a protection system, wherein E is { E ═ E }i1,2, …, M }, where eiIs the ith cloud server, eMIs a metadata server O;
step S2 (processing by the processing system in the protection system): the original data F is uploaded to a protection system, and first processing including block processing and encryption processing is carried out on the original data F to obtain a block processing identifier (bg) corresponding to each block and the number of the blocks (the number of the blocks N)i) The first data of (1);
step S3 (processing by the restoration processing system in the protection system): when receiving (user) an inquiry instruction for the original data F, the protection system performs a second process including a reverse encryption process and a reverse blocking process on the first data to obtain the original data F (the protection system responds to the user instruction, and the user can perform an operation of viewing or downloading, etc.).
As a further preferable embodiment of the above technical means, step S2 is specifically implemented as the following steps:
step S2.1: to pairThe uploaded original data F is processed in a blocking mode and is processed according to a formula
Determining a number of partitions N, where F ═ F
i|i=1,2,…,N},B
maxIs the maximum block data amount;
step S2.2: carrying out encryption processing on original data F after the block processing, wherein FiThe sequence number of the block of (1) is bi,fiEncrypted form tiEncryption processing, assigning to e according to the distribution rulejAnd creates a block handling identity bgi=(bi,ti,ej),i=1,2,…,N,j=1,2,…,M-1;
Step S2.3: and expressing the unique characteristic identifier of the original data F as Y, generating file processing identifier information G according to the unique characteristic identifier Y, and sending the file processing identifier information G to the metadata server O, wherein the file processing identifier information G is used for recording information of the block processing identifier comprising the unique characteristic identifier Y and the N blocks.
As a further preferable embodiment of the above technical means, step S3 is specifically implemented as the following steps:
step S3.1: the protection system acquires a unique characteristic identifier Y of original data F, and inquires corresponding file processing identifier information G in a metadata server O;
step S3.2: and the protection system performs anti-encryption processing and anti-blocking processing according to the file processing identification information G to obtain original data F.
As a further preferred embodiment of the above technical solution, step S3.2 is specifically implemented as the following steps:
step S3.2.1: by the respective block processing identification bg of the original data F recorded in the file processing identification information GiIncluding identifying fiBlock number b ofiEncryption system tiAnd storage location ej;
Step S3.2.2: fetch storage location ejAnd the sub-data is encrypted in the corresponding encryption mode tiDecrypting in the decryption manner to restore the block data fi;
Step S3.2.3: processing the identification bg by each blockiBlock number b ofiAnd recombining the blocked original data F to obtain the original data F.
As a further preferable technical solution of the above technical solution, the encryption mode is any one or combination of multiple encryption algorithms, including an AES algorithm, an RSA algorithm, and a hash algorithm.
As a further preferable technical solution of the above technical solution, the allocation rule includes sequential allocation, random allocation, and hash value allocation, and the rule is not variable when the rule is uploaded once, and the rule is freely configured when the rule is uploaded multiple times.
In order to achieve the above object, the present invention further provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements the steps of the cloud data protection method based on distributed storage when executing the program.
To achieve the above object, the present invention further provides a non-transitory computer readable storage medium, on which a computer program is stored, and the computer program, when executed by a processor, implements the steps of the cloud data protection method based on distributed storage.
The invention has the beneficial effects that: by deploying the plurality of storage servers, the data is further partitioned, encrypted, distributed and stored, the data is stored in different cloud servers in a dispersed mode and processed in different encryption modes, the reliability of a single system is improved, the reliability of the data is realized, and the safety of cloud data is greatly guaranteed.
Detailed Description
The following description is presented to disclose the invention so as to enable any person skilled in the art to practice the invention. The preferred embodiments in the following description are given by way of example only, and other obvious variations will occur to those skilled in the art. The basic principles of the invention, as defined in the following description, may be applied to other embodiments, variations, modifications, equivalents, and other technical solutions without departing from the spirit and scope of the invention.
Referring to fig. 1 of the drawings, fig. 1 is a schematic diagram of a cloud data protection method based on distributed storage according to the present invention.
In the preferred embodiment of the present invention, those skilled in the art should note that the cloud server, AES algorithm, RSA algorithm, etc. to which the present invention relates may be regarded as the prior art.
PREFERRED EMBODIMENTS
The invention discloses a cloud data protection method based on distributed storage, which carries out data protection through a protection system and comprises the following steps:
step S1: deploying M cloud servers E in a protection system, wherein E is { E ═ E }i1,2, …, M }, where eiIs the ith cloud server, eMIs a metadata server O;
step S2 (processing by the processing system in the protection system): the original data F is uploaded to a protection system, and first processing including block processing and encryption processing is carried out on the original data F to obtain a block processing identifier (bg) corresponding to each block and the number of the blocks (the number of the blocks N)i) The first data of (1);
step S3 (processing by the restoration processing system in the protection system): when receiving (user) an inquiry instruction for the original data F, the protection system performs a second process including a reverse encryption process and a reverse blocking process on the first data to obtain the original data F (the protection system responds to the user instruction, and the user can perform an operation of viewing or downloading, etc.).
Specifically, step S2 is implemented as the following steps:
step S2.1: the uploaded original data F is processed in a blocking mode and is processed according to a formula
Determining a number of partitions N, where F ═ F
i|i=1,2,…,N},B
maxIs the maximum block data amount;
step S2.2: carrying out encryption processing on original data F after the block processing, wherein FiThe sequence number of the block of (1) is bi,fiEncrypted form tiEncryption processing, assigning to e according to the distribution rulejAnd creates a block handling identity bgi=(bi,ti,ej),i=1,2,…,N,j=1,2,…,M-1;
Step S2.3: and expressing the unique characteristic identifier of the original data F as Y, generating file processing identifier information G according to the unique characteristic identifier Y, and sending the file processing identifier information G to the metadata server O, wherein the file processing identifier information G is used for recording information of the block processing identifier comprising the unique characteristic identifier Y and the N blocks.
More specifically, step S3 is specifically implemented as the following steps:
step S3.1: the protection system acquires a unique characteristic identifier Y of original data F, and inquires corresponding file processing identifier information G in a metadata server O;
step S3.2: and the protection system performs anti-encryption processing and anti-blocking processing according to the file processing identification information G to obtain original data F.
Further, step S3.2 is specifically implemented as the following steps:
step S3.2.1: by the respective block processing identification bg of the original data F recorded in the file processing identification information GiIncluding identifying fiBlock number b ofiEncryption system tiAnd storage location ej;
Step S3.2.2: fetch storage location ejAnd the sub-data is encrypted in the corresponding encryption mode tiDecrypting in the decryption manner to restore the block data fi;
Step S3.2.3: processing the identification bg by each blockiBlock number b ofiAnd recombining the blocked original data F to obtain the original data F.
Furthermore, the encryption mode is any one or combination of multiple encryption algorithms, including an AES algorithm, an RSA algorithm, and a hash algorithm.
Preferably, the allocation rules include sequential allocation, random allocation and hash value allocation, and the rules are not variable in a single upload and are freely configurable in multiple uploads.
The invention also discloses an electronic device which comprises a memory, a processor and a computer program which is stored on the memory and can run on the processor, and the steps of the cloud data protection method based on the distributed storage are realized when the processor executes the program.
The invention also discloses a non-transitory computer readable storage medium, on which a computer program is stored, which, when executed by a processor, implements the steps of the cloud data protection method based on distributed storage.
A second embodiment.
The difference between the present embodiment and the preferred embodiment is that the number, encryption manner, and the like of the cloud servers are specifically defined as follows (in conjunction with fig. 1):
the example deploys four cloud servers, where cloud server e1,e2,e3For storing user data, O serves as a metadata server for storing file handling identification information. And uploading the data by the user, wherein the unique characteristic identifier of the data is Y. The data is firstly cut into 3 blocks by a processing system: block1, block2 and block 3. In the block processing flag, 'a' indicates that the block is encrypted using the AES algorithm,'d' indicates that the block is encrypted using the DES algorithm, and 'r' indicates that the block is encrypted using the RSA algorithm. The allocation rule of the cloud server positions stored in the data blocks is random allocation. As shown in fig. 1, this example is specifically realized by the following steps:
(1) deploying 4 cloud servers E ═ E i1,2,3, 4}, wherein eiIs the ith cloud server, e4Is a metadata server O;
(2) when a user uploads data such as files, the data is processed by a processing system, and the processing system comprises the following substeps:
(2.1) performing a blocking operation on the original data, wherein the number of blocks N is 3, and the number of blocks N is block1, block2 and block 3;
(2.2) block1 is encrypted by an AES algorithm and then sent to a cloud server e1Storing the block processing identifier bg and generating the block processing identifier bg1(1, a, 1); block2 is encrypted by DES algorithm and then sent to cloud server e3Storing the block processing identifier bg and generating the block processing identifier bg2(2, d, 3); block3 is encrypted by RSA algorithm and then sent to cloud server e2Storing the block processing identifier bg and generating the block processing identifier bg3=(3,r,2),
(3) For the file data, the unique characteristic mark is Y, and file processing identification information G is generated and sent to the metadata server O for storage, wherein G is { Y, bg1,bg2,bg3}。
(4) When receiving a query instruction of a user, the system firstly acquires the unique characteristic identifier Y of the data F and queries the corresponding file processing identifier information G in the metadata server O;
(5) processing identification bg through data blocks recorded in GiAnd the treatment is carried out by a reduction treatment system, and the method comprises the following substeps:
(5.1) for bg1Recognizing that the block serial number of the block1 is 1, the encryption mode is an AES algorithm, and storing the block serial number in the cloud server e1Performing the following steps; for bg2,bg3And the identification is carried out by analogy.
(5.2) taking out e1The sub data stored in the data block storage device is decrypted by an AES algorithm, and block data block1 is restored; block2 and block3 are reduced in turn.
(5.3) by bgiThe user data are restored by the block sequence numbers in the block sequence list, the recombination block1, the block2 and the block 3;
(6) the system responds to the user instruction, and the user can perform operations of checking or downloading data and the like.
According to the method, the data uploaded by the user are encrypted in blocks, different encryption algorithms are adopted for each block, and the encrypted data are sent to different cloud servers for storage according to a specific rule. Generating file processing identification information and sending the file processing identification information to a metadata server, when a user uses data, firstly inquiring the file processing identification information in the metadata server by the system, after identification, extracting data stored in different cloud servers, decrypting, recombining and recovering the data into original information, and feeding the original information back to the user. The data are stored in different cloud servers in a scattered mode and processed in different encryption modes, the reliability of the data is achieved by improving the reliability of a single system, and the safety of cloud data is greatly improved. Compared with the traditional cloud storage scheme, the method is more reliable, stable and cheap.
It should be noted that the technical features of the cloud server, the AES algorithm, the RSA algorithm, and the like, which are referred to in the patent application of the present invention, should be regarded as the prior art, and the specific structure, the operation principle, the control mode and the spatial arrangement mode of the technical features may be conventional in the art, and should not be regarded as the invention point of the patent of the present invention, and the patent of the present invention is not further specifically described in detail.
It will be apparent to those skilled in the art that modifications and equivalents may be made in the embodiments and/or portions thereof without departing from the spirit and scope of the present invention.