CN107391669A - A kind of multi version file management method and device based on file system - Google Patents
A kind of multi version file management method and device based on file system Download PDFInfo
- Publication number
- CN107391669A CN107391669A CN201710599407.4A CN201710599407A CN107391669A CN 107391669 A CN107391669 A CN 107391669A CN 201710599407 A CN201710599407 A CN 201710599407A CN 107391669 A CN107391669 A CN 107391669A
- Authority
- CN
- China
- Prior art keywords
- file
- version
- target
- directory
- under
- 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
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/10—File systems; File servers
- G06F16/16—File or folder operations, e.g. details of user interfaces specifically adapted to file systems
- G06F16/162—Delete operations
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/10—File systems; File servers
- G06F16/18—File system types
- G06F16/1873—Versioning file systems, temporal file systems, e.g. file system supporting different historic versions of files
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Databases & Information Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Human Computer Interaction (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention discloses a kind of multi version file management method based on file system, this method comprises the following steps:Receive the upload request that default file directory is uploaded to for file destination, determine under file directory with the presence or absence of the filename identical target empty file with file destination, if, then obtain the list of attribute values of target empty file, based on list of attribute values, generation corresponds to the target version number of file destination, and Update attribute value list, target version file is created based on target version number under the version library directory pre-established, the file content of file destination is written in target version file.Apply the technical scheme of the present invention, operation is deleted by mistake for the file under file directory when there is user, or when user needs to use some version of the file under file directory, the file of the version can be found from file system.The invention also discloses a kind of multi version document management apparatus based on file system, has relevant art effect.
Description
Technical field
The present invention relates to Computer Applied Technology field, more particularly to a kind of multi version file pipe based on file system
Manage method and device.
Background technology
It is responsible for being referred to as file management system, abbreviation file system with the software mechanism of storage file information in operating system
System.File system can carry out tissue and distribution to the space of file-storage device, be responsible for file storage and to the file of deposit
Protected and retrieved.
At present, file system can only carry out basic management to file, such as in the extensive distributed field system of current application
In system, it is possible to achieve establishment, deletion and modification of file etc. operate.With the continuous development of Computer Applied Technology, file
The cycle of the update of partial document under system is shorter, and file is constantly updated.Delete the file in file system by mistake as user
When, or when user has found that the new edition file that is stored in file system has problem, user can not be given for change before this document
The version deleted.That is, file system can only be carried out to the file for the current version being stored in this document system
Basic operation.
Therefore, how to realize and the multi version of file is managed based on file system, be current those skilled in the art
It is badly in need of the technical problem solved.
The content of the invention
It is an object of the invention to provide a kind of multi version management method and device based on file system, user occurs to work as
Operation is deleted by mistake for the file under file directory, or user needs to use some version of the file under file directory
When, the file of the version can be found from file system.
In order to solve the above technical problems, the present invention provides following technical scheme:
A kind of multi version file management method based on file system, including:
Receive the upload request that default file directory is uploaded to for file destination;
Determine under the file directory with the presence or absence of the filename identical target empty file with the file destination;
If it is, obtain the list of attribute values of the target empty file;
Based on the list of attribute values, generation corresponds to the target version number of the file destination, and updates the attribute
Value list;
Target version file is created based on the target version number under the version library directory pre-established;
The file content of the file destination is written in the target version file.
Preferably, after the file content by the file destination is written in the target version file, also
Including:
Receive the deletion instruction for the filename for carrying the file destination;
Deleted marker is added in the list of attribute values, and retain the target empty file under the file directory and
Each version file corresponding with the target empty file under the version library directory.
Preferably, in addition to:
When receiving listed files read requests, for each empty file under the file directory, if the empty file
List of attribute values in do not include the deleted marker, then export the filename of the empty file.
Preferably, after the file content by the file destination is written in the target version file, also
Including:
Receive the deletion instruction for the target version number for carrying the target version file;
Retain the target empty file under the file directory, delete the target version under the version library directory
File, and update the list of attribute values.
Preferably, in addition to:
When receiving the FileVersion read requests for the target empty file, institute under the version library directory is exported
State the version number of all version files corresponding to target empty file.
Preferably, after the file content by the file destination is written in the target version file, also
Including:
Receive the download instruction for the target version file sent by user;
The target version file under the version library directory is returned into the user.
Preferably, it is determined that the filename identical target ineffective law, rule, etc. with the file destination is not present under the file directory
During part, in addition to:
The filename identical target empty file with the file destination is established under the file directory;
Generation corresponds to the target version number of the file destination, establishes the list of attribute values of the target empty file.
A kind of multi version document management apparatus based on file system, including:
Upload request receiving module, the upload request of default file directory is uploaded to for file destination for receiving;
Target empty file determining module, for determining under the file directory with the presence or absence of the file with the file destination
Name identical target empty file, if it is, triggering list of attribute values acquisition module;
The property value acquisition module, for obtaining the list of attribute values of the target empty file;
Target version generation module, for based on the list of attribute values, mesh of the generation corresponding to the file destination
Version number is marked, and updates the list of attribute values;
Target version file creation module, created for being based on the target version number under the version library directory pre-established
Build target version file;
Target version file writing module, for the file content of the file destination to be written into the target version herein
In part.
Preferably, in addition to the first removing module, it is used for:
After the file content by the file destination is written in the target version file, receives and carry institute
State the deletion instruction of the filename of file destination;
Deleted marker is added in the list of attribute values, and retain the target empty file under the file directory and
Each version file corresponding with the target empty file under the version library directory.
Preferably, in addition to listed files read module, it is used for:
When receiving listed files read requests, for each empty file under the file directory, if the empty file
List of attribute values in do not include the deleted marker, then export the filename of the empty file.
The technical scheme provided using the embodiment of the present invention, when receiving the upload request for file destination, really
Determine with the presence or absence of the filename identical target empty file with file destination under the file directory of file system, if it is, obtaining
The list of attribute values of target empty file is taken, and is based on list of attribute values, generation corresponds to the target version number of file destination, and more
New list of attribute values, target version file is created based on target version number under the version library directory pre-established, by target text
The file content of part is written in target version file.
By the way that the filename of file destination and target empty file is compared, when the two filename is identical, mesh is determined
Mark file is the file for needing to carry out multi version management in this document system, afterwards further according to the attribute value column of target empty file
Table, generate the target version number of file destination and the content of file destination is write into target version file to complete to file destination
Record.In file system, the file of multiple versions of the record with identical file name, when there is user for file directory
Under file delete operation by mistake, can be from file or when user needs to use some version of the file under file directory
The file of the version is found in system.
Brief description of the drawings
In order to illustrate more clearly about the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existing
There is the required accompanying drawing used in technology description to be briefly described, it should be apparent that, drawings in the following description are only this
Some embodiments of invention, for those of ordinary skill in the art, on the premise of not paying creative work, can be with
Other accompanying drawings are obtained according to these accompanying drawings.
Fig. 1 is a kind of implementing procedure figure of the multi version management method based on file system in the present invention;
Fig. 2 is a kind of building-block of logic of the multi version management method based on file system in the present invention;
Fig. 3 is a kind of structural representation of the multi version managing device based on file system in the present invention.
Embodiment
The core of the present invention is to provide a kind of multi version management method based on file system, so that in file system,
The file of multiple versions of the record with identical file name, operation is deleted when there is user by mistake for the file under file directory,
Or user can find the text of the version when needing to use some version of the file under file directory from file system
Part.
In order that those skilled in the art more fully understand the present invention program, with reference to the accompanying drawings and detailed description
The present invention is described in further detail.Obviously, described embodiment is only part of the embodiment of the present invention, rather than
Whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art are not making creative work premise
Lower obtained every other embodiment, belongs to the scope of protection of the invention.
Fig. 1 is refer to, for a kind of implementing procedure figure of the multi version management method based on file system in the present invention.The party
Method may comprise steps of:
S101:Receive the upload request that default file directory is uploaded to for file destination.
File directory can be that user is pre-created for the file for needing to carry out multi version management in file system
Catalogue, it can also be existing catalogue in the file system that user specifies.The file being uploaded in file directory is required for carrying out
Multi version management.File destination can be user be uploaded in the default file directory of file system need carry out multi version
The file or other systems of management, which are uploaded in the default file directory of file system, needs progress multi version pipe
The file of reason.The filename of file destination, the property value of file destination, upload ground can be carried in the upload request of file destination
The information such as location.
After receiving and being uploaded to the upload request of file directory for file destination, behaviour that step S102 can be carried out
Make.
S102:Determine under file directory with the presence or absence of the filename identical target empty file with file destination.
In embodiments of the present invention, it can be pre-created under file directory and need to carry out the file of multi version management
Filename identical empty file., can be with after receiving and being uploaded to the upload request of default file directory for file destination
It is determined that multi version management is carried out to file destination.Determine under file directory with the presence or absence of the filename identical with file destination
Target empty file.Such as when including empty file file1 and empty file file2 as shown in Figure 2 under file directory, work as file destination
The entitled file1 of file, it is determined that filename identical target empty with file destination under the file directory of file system be present
File.
If it is determined that the filename identical target empty file with file destination under the file directory of file system be present, then
Show that file destination has the file of the same name with file destination to be uploaded in the file directory of this document system before uploading, Ke Yiji
The continuous operation for carrying out step S103.
When it is determined that the filename identical target empty file with file destination is not present under the file directory of file system,
It can be established under file directory and the filename identical target empty file of file destination.As shown in Figure 1.
Such as in distributed file system, can the establishment file catalogue DIR1 in file system in advance, for needing
The file f ile1 of multi version management is carried out, if be not present under file directory DIR1 empty with file f ile1 filename identical
File, then the ceph_open interfaces in libcephfs storehouses (distributed file system set of interfaces) can be used in file directory
An empty file, file f ile1 of the filename of the empty file with needing to carry out multi version management filename are created under DIR1
It is identical.It is, of course, also possible to for the different files for needing to carry out multi version management, created under file directory DIR1 more
Empty file, such as file2, as shown in Figure 2.
S103:Obtain the list of attribute values of target empty file.
, can be in file when it is determined that the filename identical target empty file with file destination is not present under file directory
The filename identical target empty file with file destination is established under catalogue, generation corresponds to the target version number of file destination,
Establish the list of attribute values of target empty file.As shown in Figure 1.
Specifically, when creating an empty file under file directory, can be somebody's turn to do by ceph_setxatter interface settings
Attribute-name, can be set to version version by the attribute of empty file, and property value is a list version_list.Property value
Each single item can deposit a version number version_id in list.Creating, empty file is initial, the attribute value column of the empty file
Table version_list is an empty list.When presence is corresponding with the empty file needs to carry out the file of multi version management,
Record has respective version number in the list of attribute values.
, can when it is determined that the filename identical target empty file with file destination under the file directory of file system be present
To obtain the list of attribute values of target empty file by ceph_getxatter interfaces.The attribute value column of the target empty file of acquisition
Table may be sky, it is also possible to house multiple version numbers.For example, for the empty file file1 under file directory, in its property value
Storage has version_id1 and version_id2 Liang Ge version numbers in list, as shown in Figure 2.
The version number being stored in list of attribute values can be 11 bit digitals or 11 letters, or alphabetical sum
Combinatorics on words.Can be by the random build version number of program, certainly, for file destination, generation corresponds to the file destination
Target version number, and other version numbers in the list of attribute values of target empty file can not be identical version number.
Certainly, for the empty file file2 under file directory, ceph_setxatter interface setting ineffective law,s rule, etc. can also be passed through
Part file2 list of attribute values, so that during the upload request of the proper file for receiving the entitled file2 of file, obtain empty file
File2 list of attribute values, as shown in Figure 2.
After the list of attribute values of target empty file is obtained, S104 operation can be carried out.
S104:Based on list of attribute values, generation corresponds to the target version number of file destination, and Update attribute value list.
Based on list of attribute values, target version number of the generation corresponding to file destination.Such as when the version in list of attribute values
This number when being version_id1 and version_id2, the target version number of generation can be version_id3.In generation target
After version number, the target version number can be recorded in the list of attribute values of target empty file to update the attribute value column
Table.
S105:Target version file is created based on target version number under the version library directory pre-established.
In embodiments of the present invention, version library directory multi_ can be pre-established by ceph_mkdir interfaces
version。
, can be under version library directory based on target version number after the target version number corresponding to file destination is generated
Create target version file.The name of target version file can be combination of the filename with target version number of file destination,
Such as can be { version_id } _ file1.Under version library directory with the empty file file1 each version of filename identical
This version file, can be named as { version_id1 } _ file1 successively, { version_id2 } _ file1 etc., such as Fig. 2 institutes
Show.Certainly, for empty file file2, can under version library directory establishment file { version_id1 } _ file2 entitled for example
{ version_id2 } _ file2 each version file, as shown in Figure 2.
S106:The file content of file destination is written in target version file.
After creating target version file based on target version number under version library directory, file system can will be uploaded to
The file content of file destination be written in target version file, it is real that the write operation can pass through ceph_write interfaces
It is existing.
The technical scheme provided using the embodiment of the present invention, when receiving the upload request for file destination, really
Determine with the presence or absence of the filename identical target empty file with file destination under the file directory of file system, if it is, obtaining
The list of attribute values of target empty file is taken, and is based on list of attribute values, generation corresponds to the target version number of file destination, and more
New list of attribute values, target version file is created based on target version number under the version library directory pre-established, by target text
The file content of part is written in target version file.
By the way that the filename of file destination and target empty file is compared, when the two filename is identical, mesh is determined
Mark file is the file for needing to carry out multi version management in this document system, afterwards further according to the attribute value column of target empty file
Table, generate the target version number of file destination and the content of file destination is write into target version file to complete to file destination
Record.In file system, the file of multiple versions of the record with identical file name, when there is user for file directory
Under file delete operation by mistake, can be from file or when user needs to use some version of the file under file directory
The file of the version is found in system.
In a kind of embodiment of the present invention, after step s 106, it can also comprise the following steps:
Step 1:Receive the deletion instruction for the filename for carrying file destination;
Step 2:Deleted marker, and target empty file and version under document retaining catalogue are added in list of attribute values
Each version file corresponding with target empty file under library directory.
For the ease of description, above-mentioned two step is merged into explanation.
In actual applications, user can send deletion instruction according to being actually needed to operating system.Carried receiving
During the deletion instruction of the filename of file destination, it can add in the list of attribute values of target empty file corresponding with file destination
Add deleted marker.Specifically, can be in the first position of list of attribute values addition deleted marker delete_marker.Certainly, delete
Except mark can also add the other positions in list of attribute values, the implementation of the present invention is had no effect on.
On the other hand, it is corresponding with target empty file under the target empty file and version library directory under document retaining catalogue
Each version file.That is, deletion action is not performed to the target empty file under file directory, also not to version library directory
Under each version file corresponding with target empty file perform deletion action.
Using this kind of embodiment of the present invention, when receiving the deletion instruction for the filename for carrying file destination, protect
Stay each version file corresponding with target empty file under the target empty file and version library directory under file directory, Neng Goushi
When deleting operation by mistake of file destination now is directed to when there is user, remains able to give for change the target of respective version under version library directory
The purpose of file.
In a kind of embodiment of the present invention, this method can also comprise the following steps:
When receiving listed files read requests, for each empty file under file directory, if the category of the empty file
Do not include deleted marker in property value list, then export the filename of the empty file.
In actual applications, when user needs to read the listed files under file directory, can be sent by client
For the read requests of listed files., can be to each under file directory after file system receives the read requests
The list of attribute values of empty file is detected.For there is one or more empty file of deleted marker in list of attribute values, then
Skip the reading of this one or more empty file.After the detection of list of attribute values of each empty file is completed, read
Listed files be list of attribute values in without deleted marker empty file filename composition list.
Using this kind of embodiment of the present invention, user can be allowed intuitively to find out the text of the carrying file destination sent
Whether the deletion instruction of part name is performed correctly.
In a kind of embodiment of the present invention, after step s 106, it can also comprise the following steps:
First step:Receive the deletion instruction for the target version number for carrying target version file;
Second step:Target empty file under document retaining catalogue, the target version file under version library directory is deleted,
And Update attribute value list.
When receiving the deletion instruction for target version file, file system can be by the target version under version library directory
File is deleted.The deletion instructs the filename and target version number that can carry file destination.By under version library directory
, can be with the target empty file under document retaining catalogue after target version file is deleted, and Update attribute value list.Namely
Say, for the list of attribute values of target empty file corresponding with file destination, target text will be corresponded in the list of attribute values
The target version number of part is deleted.Using this kind of embodiment of the present invention, user can be optionally to file destination
The file of part version is deleted, and is capable of the memory headroom of effective releasing document system.Especially file destination size compared with
Greatly, when version is more, this kind of embodiment positive effect of the invention.
In one embodiment of the invention, this method can also comprise the following steps:
When receiving the FileVersion read requests for target empty file, target empty file under version library directory is exported
The version number of corresponding all version files.
In actual applications, when user needs to read old version corresponding to target empty file, it can send and be directed to
The FileVersion read requests of target empty file.The filename of target empty file can be carried in FileVersion read requests.
After file system interface narrowing is to the FileVersion read requests of target empty file, reads and export version library directory
The version number of all version files corresponding to lower target empty file.
In a kind of embodiment of the present invention, after step s 106, it can also comprise the following steps:
First step:Receive the download instruction for target version file sent by user;
Second step:Target version file under version library directory is returned into user.
Download instruction can be the instruction of the target version number of the filename and file destination that carry file destination, i.e., under this
It is the download instruction for target version file to carry instruction, can be with after the download instruction for target version file is received
Target version file corresponding with target version number under version library directory is returned into user.It should be noted that when download
, can be by the filename identical latest edition with file destination when instructing only to carry the instruction of the filename of file destination
File returns to user.
Corresponding to above method embodiment, the embodiment of the present invention additionally provides a kind of multi version text based on file system
Part managing device, a kind of multi version document management apparatus based on file system described below are based on above-described one kind
The multi version file management method of file system can be mutually to should refer to.
It is shown in Figure 3, for a kind of structural representation of the multi version document management apparatus based on file system in the present invention
Figure, the device can include with lower module:
Upload request receiving module 301, the upload for being uploaded to default file directory for file destination for receiving please
Ask;
Target empty file determining module 302, for determining under file directory with the presence or absence of the file famous prime minister with file destination
Same target empty file, if it is, triggering list of attribute values acquisition module 303;
Property value acquisition module 303, for obtaining the list of attribute values of target empty file;
Target version generation module 304, for based on list of attribute values, target version of the generation corresponding to file destination
Number, and Update attribute value list;
Target version file creation module 305, created for being based on target version number under the version library directory pre-established
Build target version file;
Target version file writing module 306, for the file content of file destination to be written in target version file.
The device provided using the embodiment of the present invention, when receiving the upload request for file destination, it is determined that literary
With the presence or absence of the filename identical target empty file with file destination under the file directory of part system, if it is, obtaining mesh
The list of attribute values of empty file is marked, and is based on list of attribute values, generation corresponds to the target version number of file destination, and updates category
Property value list, under the version library directory pre-established based on target version number create target version file, by file destination
File content is written in target version file.
By the way that the filename of file destination and target empty file is compared, when the two filename is identical, mesh is determined
Mark file is the file for needing to carry out multi version management in this document system, afterwards further according to the attribute value column of target empty file
Table, generate the target version number of file destination and the content of file destination is write into target version file to complete to file destination
Record.In file system, the file of multiple versions of the record with identical file name, when there is user for file directory
Under file delete operation by mistake, can be from file or when user needs to use some version of the file under file directory
The file of the version is found in system.
In a kind of embodiment of the present invention, in addition to the first removing module, it is used for:
After the file content of file destination is written in target version file, the file for carrying file destination is received
The deletion instruction of name;
Deleted marker is added in list of attribute values, and under the target empty file and version library directory under document retaining catalogue
Each version file corresponding with target empty file.
In a kind of embodiment of the present invention, in addition to listed files read module, it is used for:
When receiving listed files read requests, for each empty file under file directory, if the category of the empty file
Do not include deleted marker in property value list, then export the filename of the empty file.
In a kind of embodiment of the present invention, in addition to the second removing module, it is used for:
After the file content of file destination is written in target version file, receives and carry target version file
The deletion instruction of target version number;
Target empty file under document retaining catalogue, delete the target version file under version library directory, and Update attribute
Value list.
In a kind of embodiment of the present invention, in addition to FileVersion read module, it is used for:
When receiving the FileVersion read requests for target empty file, target empty file under version library directory is exported
The version number of corresponding all version files.
In a kind of embodiment of the present invention, in addition to target version file download module, it is used for:
After the file content of file destination is written in target version file, receives and be directed to mesh by what user sent
Mark the download instruction of version file;
Target version file under version library directory is returned into user.
In a kind of embodiment of the present invention, in addition to empty file establishes module, is used for:
When it is determined that the filename identical target empty file with file destination is not present under file directory, in file directory
Lower foundation and the filename identical target empty file of file destination;
Generation corresponds to the target version number of file destination, establishes the list of attribute values of target empty file.
Each embodiment is described by the way of progressive in this specification, what each embodiment stressed be with it is other
The difference of embodiment, between each embodiment same or similar part mutually referring to.For dress disclosed in embodiment
For putting, because it is corresponded to the method disclosed in Example, so description is fairly simple, related part is referring to method part
Explanation.
Professional further appreciates that, with reference to the unit of each example of the embodiments described herein description
And algorithm steps, can be realized with electronic hardware, computer software or the combination of the two, in order to clearly demonstrate hardware and
The interchangeability of software, the composition and step of each example are generally described according to function in the above description.These
Function is performed with hardware or software mode actually, application-specific and design constraint depending on technical scheme.Specialty
Technical staff can realize described function using distinct methods to each specific application, but this realization should not
Think beyond the scope of this invention.
Directly it can be held with reference to the step of method or algorithm that the embodiments described herein describes with hardware, processor
Capable software module, or the two combination are implemented.Software module can be placed in random access memory (RAM), internal memory, read-only deposit
Reservoir (ROM), electrically programmable ROM, electrically erasable ROM, register, hard disk, moveable magnetic disc, CD-ROM or technology
In any other form of storage medium well known in field.
Specific case used herein is set forth to the principle and embodiment of the present invention, and above example is said
It is bright to be only intended to help and understand technical scheme and its core concept.It should be pointed out that for the common of the art
For technical staff, under the premise without departing from the principles of the invention, some improvement and modification can also be carried out to the present invention, these
Improve and modification is also fallen into the protection domain of the claims in the present invention.
Claims (10)
- A kind of 1. multi version file management method based on file system, it is characterised in that including:Receive the upload request that default file directory is uploaded to for file destination;Determine under the file directory with the presence or absence of the filename identical target empty file with the file destination;If it is, obtain the list of attribute values of the target empty file;Based on the list of attribute values, generation corresponds to the target version number of the file destination, and updates the attribute value column Table;Target version file is created based on the target version number under the version library directory pre-established;The file content of the file destination is written in the target version file.
- 2. according to the method for claim 1, it is characterised in that be written in the file content by the file destination After in the target version file, in addition to:Receive the deletion instruction for the filename for carrying the file destination;Deleted marker is added in the list of attribute values, and retains the target empty file under the file directory and described Each version file corresponding with the target empty file under version library directory.
- 3. according to the method for claim 2, it is characterised in that also include:When receiving listed files read requests, for each empty file under the file directory, if the category of the empty file Do not include the deleted marker in property value list, then export the filename of the empty file.
- 4. according to the method for claim 1, it is characterised in that be written in the file content by the file destination After in the target version file, in addition to:Receive the deletion instruction for the target version number for carrying the target version file;Retain the target empty file under the file directory, delete target version this paper under the version library directory Part, and update the list of attribute values.
- 5. according to the method for claim 4, it is characterised in that also include:When receiving the FileVersion read requests for the target empty file, the mesh under the version library directory is exported Mark the version number of all version files corresponding to empty file.
- 6. according to the method described in any one of claim 1 to 5, it is characterised in that in the file by the file destination After content is written in the target version file, in addition to:Receive the download instruction for the target version file sent by user;The target version file under the version library directory is returned into the user.
- 7. according to the method for claim 6, it is characterised in that it is determined that being not present and the target under the file directory During the filename identical target empty file of file, in addition to:The filename identical target empty file with the file destination is established under the file directory;Generation corresponds to the target version number of the file destination, establishes the list of attribute values of the target empty file.
- A kind of 8. multi version document management apparatus based on file system, it is characterised in that including:Upload request receiving module, the upload request of default file directory is uploaded to for file destination for receiving;Target empty file determining module, for determining under the file directory with the presence or absence of the file famous prime minister with the file destination Same target empty file, if it is, triggering list of attribute values acquisition module;The property value acquisition module, for obtaining the list of attribute values of the target empty file;Target version generation module, for based on the list of attribute values, target version of the generation corresponding to the file destination This number, and update the list of attribute values;Target version file creation module, mesh is created for being based on the target version number under the version library directory pre-established Mark version file;Target version file writing module, for the file content of the file destination to be written into the target version file In.
- 9. device according to claim 8, it is characterised in that also including the first removing module, be used for:After the file content by the file destination is written in the target version file, receives and carry the mesh Mark the deletion instruction of the filename of file;Deleted marker is added in the list of attribute values, and retains the target empty file under the file directory and described Each version file corresponding with the target empty file under version library directory.
- 10. device according to claim 9, it is characterised in that also including listed files read module, be used for:When receiving listed files read requests, for each empty file under the file directory, if the category of the empty file Do not include the deleted marker in property value list, then export the filename of the empty file.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710599407.4A CN107391669A (en) | 2017-07-20 | 2017-07-20 | A kind of multi version file management method and device based on file system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710599407.4A CN107391669A (en) | 2017-07-20 | 2017-07-20 | A kind of multi version file management method and device based on file system |
Publications (1)
Publication Number | Publication Date |
---|---|
CN107391669A true CN107391669A (en) | 2017-11-24 |
Family
ID=60336633
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710599407.4A Pending CN107391669A (en) | 2017-07-20 | 2017-07-20 | A kind of multi version file management method and device based on file system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107391669A (en) |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107832470A (en) * | 2017-11-29 | 2018-03-23 | 郑州云海信息技术有限公司 | A kind of object storage method and device based on storage system |
CN108170777A (en) * | 2017-12-26 | 2018-06-15 | 郑州云海信息技术有限公司 | A kind of distributed file system |
CN110008176A (en) * | 2019-04-11 | 2019-07-12 | 苏州浪潮智能科技有限公司 | A kind of file creating method and relevant apparatus |
CN110321332A (en) * | 2019-07-08 | 2019-10-11 | 广州酷狗计算机科技有限公司 | Multimedia file restoration methods, device, terminal and storage medium |
CN110795408A (en) * | 2019-10-28 | 2020-02-14 | 柏科数据技术(深圳)股份有限公司 | Data processing method and device based on object storage, server and storage medium |
CN111049891A (en) * | 2019-12-05 | 2020-04-21 | 浩云科技股份有限公司 | Method for uploading and downloading cascade files in centralized storage |
CN111045947A (en) * | 2019-12-13 | 2020-04-21 | 杭州安恒信息技术股份有限公司 | Test environment construction method and device and related equipment thereof |
CN112114905A (en) * | 2020-09-29 | 2020-12-22 | 中国银行股份有限公司 | Software version switching method and device |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20070244921A1 (en) * | 2006-04-14 | 2007-10-18 | Roger Blair | Method, apparatus and computer-readable medium to provide customized classification of documents in a file management system |
CN103092891A (en) * | 2011-11-08 | 2013-05-08 | 中国移动通信集团四川有限公司 | Distributed file storage system and achieving method thereof |
CN103714123A (en) * | 2013-12-06 | 2014-04-09 | 西安工程大学 | Methods for deleting duplicated data and controlling reassembly versions of cloud storage segmented objects of enterprise |
CN103793429A (en) * | 2012-11-01 | 2014-05-14 | 镇江金软计算机科技有限责任公司 | Method for managing document versions |
CN104156278A (en) * | 2014-08-01 | 2014-11-19 | 江苏大学 | File version control system and file version control method |
CN106126375A (en) * | 2016-06-24 | 2016-11-16 | 北京工业大学 | A kind of YAFFS2 file based on Hash each version restoration methods |
-
2017
- 2017-07-20 CN CN201710599407.4A patent/CN107391669A/en active Pending
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20070244921A1 (en) * | 2006-04-14 | 2007-10-18 | Roger Blair | Method, apparatus and computer-readable medium to provide customized classification of documents in a file management system |
CN103092891A (en) * | 2011-11-08 | 2013-05-08 | 中国移动通信集团四川有限公司 | Distributed file storage system and achieving method thereof |
CN103793429A (en) * | 2012-11-01 | 2014-05-14 | 镇江金软计算机科技有限责任公司 | Method for managing document versions |
CN103714123A (en) * | 2013-12-06 | 2014-04-09 | 西安工程大学 | Methods for deleting duplicated data and controlling reassembly versions of cloud storage segmented objects of enterprise |
CN104156278A (en) * | 2014-08-01 | 2014-11-19 | 江苏大学 | File version control system and file version control method |
CN106126375A (en) * | 2016-06-24 | 2016-11-16 | 北京工业大学 | A kind of YAFFS2 file based on Hash each version restoration methods |
Cited By (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107832470A (en) * | 2017-11-29 | 2018-03-23 | 郑州云海信息技术有限公司 | A kind of object storage method and device based on storage system |
CN108170777A (en) * | 2017-12-26 | 2018-06-15 | 郑州云海信息技术有限公司 | A kind of distributed file system |
CN110008176A (en) * | 2019-04-11 | 2019-07-12 | 苏州浪潮智能科技有限公司 | A kind of file creating method and relevant apparatus |
CN110321332A (en) * | 2019-07-08 | 2019-10-11 | 广州酷狗计算机科技有限公司 | Multimedia file restoration methods, device, terminal and storage medium |
CN110321332B (en) * | 2019-07-08 | 2023-07-21 | 广州酷狗计算机科技有限公司 | Multimedia file recovery method, device, terminal and storage medium |
CN110795408A (en) * | 2019-10-28 | 2020-02-14 | 柏科数据技术(深圳)股份有限公司 | Data processing method and device based on object storage, server and storage medium |
CN111049891A (en) * | 2019-12-05 | 2020-04-21 | 浩云科技股份有限公司 | Method for uploading and downloading cascade files in centralized storage |
CN111045947A (en) * | 2019-12-13 | 2020-04-21 | 杭州安恒信息技术股份有限公司 | Test environment construction method and device and related equipment thereof |
CN111045947B (en) * | 2019-12-13 | 2023-04-21 | 杭州安恒信息技术股份有限公司 | Test environment construction method and device and related equipment thereof |
CN112114905A (en) * | 2020-09-29 | 2020-12-22 | 中国银行股份有限公司 | Software version switching method and device |
CN112114905B (en) * | 2020-09-29 | 2023-09-26 | 中国银行股份有限公司 | Software version switching method and device |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107391669A (en) | A kind of multi version file management method and device based on file system | |
US8135677B2 (en) | File management system and method | |
JP6309103B2 (en) | Snapshot and clone replication | |
US7934064B1 (en) | System and method for consolidation of backups | |
US5778389A (en) | Method and system for synchronizing computer file directories | |
US9753934B2 (en) | Method and system for metadata modification | |
EP0466389B1 (en) | File system with read/write memory and write once-read many (WORM) memory | |
CN103221924B (en) | File in data-storage system is cloned and is gone clone | |
JP4406224B2 (en) | Image file management method and recording medium therefor | |
CN104778192B9 (en) | Directory structure representing content addressable storage system | |
JP4691209B2 (en) | Access device, information recording device, information recording system, file management method, and program | |
JP2010191647A (en) | File sharing system, file server, and method for managing file | |
JP4304194B2 (en) | File system management apparatus and method | |
JP2005215894A (en) | Data processor, data processing method, and data processing program | |
CN103559139B (en) | A kind of date storage method and device | |
US8204227B2 (en) | Information processing apparatus, control method thereof, and computer program | |
CN105302488B (en) | The method for writing data and system of a kind of storage system | |
JP2007233638A (en) | Information processor, information processing method, and computer program | |
JP4755244B2 (en) | Information generation method, information generation program, and information generation apparatus | |
US9009114B1 (en) | Version mapped incremental backups | |
US20140122661A1 (en) | Computer system and file server migration method | |
JP2005346564A (en) | Disk device, control method for disk device and tampering detection method | |
JP2008090378A (en) | Hybrid file system, operating system, cache control method, and recording medium | |
CN107562898A (en) | A kind of method that recycle bin is created based on KUX operating systems | |
CN105993002A (en) | In-place disk unformatting |
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 | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20171124 |
|
RJ01 | Rejection of invention patent application after publication |