Distributed document safe storage system and storage means thereofTechnical field
The present invention relates to a kind of high fault-tolerant distributed document safe storage system and method thereof, particularly relate to the fault-tolerant distributed document safe storage system of a kind of height being applicable to internet intelligent TV and method thereof.
Background technology
At present, Internet user increases fast, and a large amount of user's access is all a huge test to the data throughout of system platform and system concurrency amount.In file interaction process frequently, the mistake caused because of user misoperation or network reason can be there is unavoidably, this fault-tolerance just needing system can provide enough, the operation for this row mistake is carried out correcting and is carried out operation rollback in other words, avoids or alleviate the loss that it causes.
Existing distributed file system focuses on the high-throughput aspect of system mostly, and it is fewer that the Fault-Tolerant Problems for system is considered.
In distributed file system, because user side number is many, access is frequent, there will be the faulty operation of file unavoidably, and the change of the uploading of such as mistake, mistake or more grave error are deleted, cause accidental change or the loss of file content, cause unexpected loss.In addition, because the file error that Internet Transmission mistake causes also is cause one of unsafe major reason of system file.
Summary of the invention
First technical matters that the present invention will solve be to provide a kind of can the distributed document safe storage system of high fault-tolerant recovery change file error and storage means thereof;
Second technical matters that the present invention will solve be to provide a kind of can the high fault-tolerant distributed document safe storage system giving deleted file for change and storage means thereof;
The technical solution used in the present invention is as follows:
A kind of distributed document safe storage system, is characterized in that: comprise
User side, completes the consulting of file, revises, deletes and the operation such as preservation;
Resolution server, completes the encryption and decryption to file and path orientation;
File server, completes the storage to file.
Based on the distributed document method for secure storing of above-mentioned safe storage system, concrete grammar step is:
The operation that A, operation log recording file server are changed for file content, comprises and uploads, upgrades and delete;
B, the mistake be surprisingly more transformed into file, user proposes recovery request, and system carries out operation rollback by the record of daily record, reaches the correction for mistake.
As preferably, described step also comprises: after receiving the recovery request from user, directly carries out searching the record satisfied condition in Operation Log, checks whether it has respective backup, then determine the concrete operations that file server will perform.
As preferably, the file server of described steps A does not comprise the record for query manipulation.
As preferably, the concrete grammar step of described steps A is:
Under its root directory, an Operation Log OperateLog is set up time A1, each file server bring into operation, for recording all the non-query manipulations occurred in this file server, the content of record comprises the time of operation generation, the source place of order, the particular content that order performs;
A2, Operation Log OperateLog preserve an one up-to-date mapping in internal memory, first upgrade in internal memory, be then synchronized on the disk of presents server after all operations occurs.
As preferably, described steps A 2 also comprises, upgrade be synchronized to presents server disk on after, upgrade the operation note of alternative document server.
As preferably, the concrete grammar step of described step B is:
B1, user find the mistake change action W for fileaafter, send file access pattern request, whether resolution server checking request is legal, proceeds to next step operation if legal, otherwise its request of notice user side is illegal;
File access pattern request is transferred to and performs W by B2, resolution serverafile server Sa, file server Saresolve this recovery request, the operation obtaining its correspondence and the title F of file object that will operaten;
B3, file server search by file object title and the operation that will cancel the Operation Log be stored in file server, carry out the rollback operated according to the concrete operations content of operation log recording;
Operating result is returned to resolution server by B4, file server, by resolution server, operation is returned to user side.
As preferably, described step B3 also comprises, and after the rollback of file server complete operation, notifies that its file server with group carries out operation synchronously.
As preferably, described step B3 also comprises, after the rollback of file server complete operation, simultaneously by this operation note in Operation Log.
Based on the distributed document method for secure storing of above-mentioned safe storage system, concrete grammar step is:
One, the operation changed for file content of operation log recording file server, comprises and uploads, upgrades and delete;
Two, for the file that user deletes, given for change by Operation Log and file erase backup.
As preferably, described step also comprises: resolution server receive from user give request for change after, judge this request legal after passed to before store the file server of this file.
As preferably, the file server of described step one does not comprise the record for query manipulation.
As preferably, the concrete grammar step of described step one is:
1, under its root directory, an Operation Log OperateLog is set up time each file server brings into operation, for recording all the non-query manipulations occurred in this file server, the content of record comprises the time of operation generation, the source place of order, the particular content that order performs;
2, Operation Log OperateLog preserves an one up-to-date mapping in internal memory, first upgrades in internal memory, be then synchronized on the disk of presents server after all operations occurs.
As preferably, described step 2 also comprises, upgrade be synchronized to presents server disk on after, upgrade the operation note of alternative document server.
As preferably, the concrete grammar of described step 2 is:
1, under the file will deleted moves to staging directory, and in Operation Log, this operation is recorded;
2, set a time threshold to the deleted file under staging directory, if the life period of deleted file under staging directory reaches this time threshold, then this deleted file is deleted;
3, resolution server receives and gives request for change from the file of user side;
4, the file server storing in the past this file receives after file gives request for change, parse original filename and erasing time information, searched in Operation Log by described old file name and erasing time information, judge whether operate the time gap sent is more than or equal to described time threshold, notify this deleted file of resolution server complete deletion, operating result is returned as user side by resolution server, otherwise enters next step;
5, from the staging directory of file server, described deleted file is moved to original catalogue, and in Operation Log record.
As preferably, described step 3 also comprises: when file server receives the order of deleted file, through verify legal after enter puncturing pattern again.
Compared with prior art, the invention has the beneficial effects as follows:
1, the operation of mistake is carried out correcting carry out operation rollback in other words, the loss of avoiding or alleviating it to cause, realize the high fault tolerance of system;
2, unexpected deleted file is given for change, the loss of avoiding or alleviating it to cause, realize the high fault tolerance of system.
Accompanying drawing explanation
Fig. 1 be the present invention wherein the Operation Log of an embodiment foundation and safeguard schematic diagram.
Fig. 2 be the present invention wherein an embodiment mistake change operation cancel process schematic.
Fig. 3 is the deleted file recovery process schematic diagram of the present invention's wherein embodiment.
Embodiment
In order to make object of the present invention, technical scheme and advantage clearly understand, below in conjunction with drawings and Examples, the present invention is further elaborated.Should be appreciated that specific embodiment described herein only in order to explain the present invention, be not intended to limit the present invention.
Arbitrary feature disclosed in this instructions (comprising any accessory claim, summary and accompanying drawing), unless specifically stated otherwise, all can be replaced by other equivalences or the alternative features with similar object.That is, unless specifically stated otherwise, each feature is an example in a series of equivalence or similar characteristics.
Specific embodiment one:
A high fault-tolerant distributed document safe storage system, comprising: user side, completes the consulting of file, revises, deletes and the operation such as preservation; Resolution server, completes the Encrypt and Decrypt to file and path orientation; File server, completes the storage to file.
Based on the distributed document method for secure storing that the height of above-mentioned safe storage system is fault-tolerant, concrete grammar step is:
The operation that A, operation log recording file server are changed for file content, comprises and uploads, upgrades and the change such as deletion operation;
B, the mistake be surprisingly more transformed into file, user proposes recovery request, and system carries out operation rollback by the record of daily record, reaches the correction for mistake.
Operation for mistake is carried out correcting and is carried out operation rollback in other words, the loss of avoiding or alleviating it to cause, and realizes the high fault tolerance of system.
Described step also comprises: after receiving the recovery request from user, directly carry out searching the record satisfied condition in the content image of Operation Log OperateLog, check whether it has respective backup, then determine the concrete operations that file server will perform.
In this specific embodiment, the file server of described steps A does not comprise the record for query manipulation, reduces the unnecessary of resource and takies.
As shown in Figure 1, in this specific embodiment, the concrete grammar step of described steps A is:
Under its root directory, an Operation Log OperateLog is set up time A1, each file server bring into operation, for recording all the non-query manipulations occurred in this file server, namely upload, upgrade and deletion etc., the content of record comprises the time of operation generation, the source place of order, the particular content that order performs;
A2, Operation Log OperateLog preserve an one up-to-date mapping in internal memory, first upgrade in internal memory, be then synchronized on the disk of presents server after all operations occurs.
In this specific embodiment, described steps A 2 also comprises, upgrade be synchronized to presents server disk on after, upgrade the operation note of alternative document server, avoid Single Point of Faliure.
As shown in Figure 2, the concrete grammar step of described step B is:
B1, user find the mistake change action W for fileaafter, send file access pattern request, whether resolution server checking request is legal, proceeds to next step operation if legal, otherwise its request of notice user side is illegal;
File access pattern request is transferred to and performs W by B2, resolution serverafile server Sa, file server Saresolve this recovery request, the operation obtaining its correspondence and the title F of file object that will operaten;
B3, file server search by file object title and the operation that will cancel the Operation Log be stored in file server, carry out the rollback operated according to the concrete operations content of operation log recording, and even operation is by file content Iamake I intob, then according to the record of daily record by Ibbe revised as Ia;
Operating result is returned to resolution server by B4, file server, by resolution server, operation is returned to user side.
In this specific embodiment, described step B3 also comprises, and after the rollback of file server complete operation, notifies that its file server with group carries out operation synchronous, avoids Single Point of Faliure.
Rolling back action also can cause amendment to file content, otherwise the different problem of the content that just there will be operation note and file itself, therefore, in this specific embodiment, described step B3 also comprises, after the rollback of file server complete operation, simultaneously by this operation note in Operation Log.
In addition, not every renewal rewards theory can complete rolling back action, and some renewal rewards theory are had no idea rollback, all carry out the backup of copy unless each after upgrading, and only has to carry out interpretation according to the record content of Operation Log whether it is can rollback.
Specific embodiment two
Based on the distributed document method for secure storing of safe storage system in specific embodiment one, concrete grammar step is:
One, the operation changed for file content of operation log recording file server FileSerDel, comprises and uploads, upgrades and delete;
Two, for the file that user deletes, given for change by Operation Log and file erase backup.
It is unexpected that deleted file given for change, the loss of avoiding or alleviating it to cause, realize the high fault tolerance of system.
As shown in Figure 3, described step also comprises: resolution server receive from user give request for change after, judge this request legal after passed to before store the file server of this file.Such as, judge whether have permission to giving request for change, avoid the leakage of document.
In this specific embodiment, the file server of described step one does not comprise the record for query manipulation, reduces the unnecessary of resource and takies.
As shown in Figure 1, in this specific embodiment, the concrete grammar step of described step one is:
1, under its root directory, an Operation Log OperateLog is set up time each file server brings into operation, for recording all the non-query manipulations occurred in this file server, the content of record comprises the time of operation generation, the source place of order, the particular content that order performs;
2, Operation Log OperateLog preserves an one up-to-date mapping in internal memory, first upgrades in internal memory, be then synchronized on the disk of presents server after all operations occurs.
In this specific embodiment, described step 2 also comprises, upgrade be synchronized to presents server disk on after, upgrade the operation note of alternative document server, avoid Single Point of Faliure.
As shown in Figure 3, in this specific embodiment, the concrete grammar of described step 2 is:
1, the file will deleted backs up deleted file under moving to staging directory DictionaryDel, and in Operation Log, record this operation, so that the giving for change of file;
2, set a time threshold TimeDel to the deleted file under staging directory DictionaryDel, if the life period of deleted file under staging directory DictionaryDel reaches this time threshold TimeDel, then this deleted file is deleted; This time threshold TimeDel can sets itself as required;
3, resolution server receives and gives request for change from the file of user side;
4, the file server FileSerDel of this file of storage received after file gives request for change in the past, parse original filename and erasing time information, searched in Operation Log by described old file name and erasing time information, judge whether operate the time gap sent is more than or equal to described time threshold TimeDel, illustrate that the backup file in staging directory DictionaryDel is eliminated, this file cannot be recovered, then notify this deleted file of resolution server complete deletion, operating result is returned as user side by resolution server, otherwise illustrate that backup file exists, enter next step,
5, from the staging directory of file server FileSerDel, described deleted file is moved to original catalogue, and in Operation Log record, operating result is returned to user side by resolution server.
In this specific embodiment, described step 3 also comprises: when file server FileSerDel receives the order of deleted file, through verify legal after enter puncturing pattern again, to avoid deleting file by mistake.