CN103324643A - Terminal device and method for establishing or modifying files - Google Patents
Terminal device and method for establishing or modifying files Download PDFInfo
- Publication number
- CN103324643A CN103324643A CN2012100803928A CN201210080392A CN103324643A CN 103324643 A CN103324643 A CN 103324643A CN 2012100803928 A CN2012100803928 A CN 2012100803928A CN 201210080392 A CN201210080392 A CN 201210080392A CN 103324643 A CN103324643 A CN 103324643A
- Authority
- CN
- China
- Prior art keywords
- file
- processing unit
- storage area
- terminal device
- mark
- 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.)
- Granted
Links
Images
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention discloses a method for establishing or modifying files and a terminal device. The method is applied to the terminal device. The terminal device comprises a storage unit, wherein the storage unit stores system data and user data required by system recovery in a first storage region. The method comprises the steps as follows; when a first file is established or modified, whether a second file corresponding to the first file exists in the first storage region is judged; if the second file corresponding to the first file exists in the first storage region, the first file is saved in a second storage region of the storage unit; and a first mark is added in a file header of the first file.
Description
Technical field
The present invention relates to a kind of terminal device and document creation or amending method.
Background technology
Current, invasion for the rogue program of eliminating virus or wooden horse and so on, perhaps the operating system for fear of the terminal device such as PC, notebook or panel computer becomes more and more too fat to move, the operating system of terminal device (as, Windows or Android) usually can provide system recovery program or function.。For example, some system recovery programs or function are recovered whether to have corresponding file in its corresponding folder of certain document retrieval (whether can the unfolding mode retrieval with file) in the file in zone for its system usually.If there is this corresponding file, then deletes this corresponding file, and come the recovery operation system with the file in system's recovery file folder.In addition, if there is no this corresponding file then comes the recovery operation system with the Piece file mergence in system's recovery file folder.Yet owing to need to carry out aforesaid operations for each file in each file in system's recovery file folder, therefore this system recovery program or the common efficient of function are not high.
Summary of the invention
Therefore, in order to solve above-mentioned technical matters of the prior art, according to an aspect of the present invention, a kind of document creation or amending method are provided, be applied to terminal device, described terminal device comprises storage unit, wherein said storage unit storage system in the first storage area is recovered required system data and user data, described method comprises: when the establishment of carrying out the first file or modification, judge whether there be second file corresponding with described the first file in described the first storage area; If in described the first storage area, there be second file corresponding with described the first file, then in the second storage area of described storage unit, preserve described the first file; And in the file header of described the first file, add the first mark.
In addition, according to one embodiment of present invention, described method further comprises: if there be not second file corresponding with described the first file in described the first storage area, then preserve described the first file in the second storage area of described storage unit; And in the file header of described the first file, do not add the first mark.
In addition, according to one embodiment of present invention, wherein said the first file and described the second file have identical filename and logical directories address; And described the first file copy that is described the second file.
In addition, according to one embodiment of present invention, there be described second file corresponding with described the first file in wherein said the first mark indication in described the first storage area.
In addition, according to one embodiment of present invention, described method further comprises: when carrying out directory, judge in the file header of described the first file under the described catalogue whether have described the first mark; If have described the first mark in the file header of described the first file under definite described catalogue, then in the Query Result of described directory, delete the query term relevant with described the second file.
In addition, according to a further aspect in the invention, provide a kind of terminal device, comprising: storage unit, wherein said storage unit storage system in the first storage area is recovered required system data and user data; And processing unit, configuration carries out processing based on default program, wherein when described processing unit was carried out the establishment of the first file or revised, described processing unit judged whether there be second file corresponding with described the first file in described the first storage area; If there be second file corresponding with described the first file in described the first storage area, then processing unit is preserved described the first file in the second storage area of described storage unit; And described processing unit adds the first mark in the file header of described the first file.
In addition, according to one embodiment of present invention, if wherein in described the first storage area, there be not second file corresponding with described the first file, then processing unit is preserved described the first file in the second storage area of described storage unit, and described processing unit does not add the first mark in the file header of described the first file.
In addition, according to one embodiment of present invention, wherein said the first file and described the second file have identical filename and logical directories address; And described the first file copy that is described the second file.
In addition, according to one embodiment of present invention, there be described second file corresponding with described the first file in wherein said the first mark indication in described the first storage area.
In addition, according to one embodiment of present invention, wherein when described processing unit is carried out directory, described processing unit judges in the file header of described the first file under the described catalogue whether have described the first mark; If processing unit is determined to have described the first mark in the file header of described the first file under the described catalogue, then described processing unit is deleted the query term relevant with described the second file in the Query Result of described directory.
Description of drawings
Fig. 1 is that diagram is according to the block scheme of the terminal device of the embodiment of the invention; And
Fig. 2 is that diagram is according to the document creation of the embodiment of the invention or the process flow diagram of amending method.
Embodiment
Describe in detail with reference to the accompanying drawings according to each embodiment of the present invention.Here, it should be noted that in the accompanying drawings, identical Reference numeral is given basically had ingredient identical or similar structures and function, and will omit being repeated in this description about them.
The below is with reference to the terminal device of Fig. 1 description according to the embodiment of the invention.Fig. 1 is that diagram is according to the block scheme of the terminal device of the embodiment of the invention.Here, the terminal device according to the embodiment of the invention can comprise PC, notebook or panel computer etc.
As shown in Figure 1, the terminal device 1 according to the embodiment of the invention can comprise storage unit 11 and processing unit 12.
Here, storage unit 11 can be in default storage area (below be called system recover the zone) required operating system data and the user data of storage system recovery.Here, the operating system of common configurating terminal device is so that system recovery zone is usually invisible for the user.
According to embodiments of the invention, operating system that can configurating terminal device, so that processing unit 12 is carried out the establishment of a certain file (below be called the first file) or when revising, processing unit 12 is judged in system and is recovered whether to exist in the zone file corresponding to the file that creates or revise with institute (below be called the second file).
Here, if recover to exist in the zone second file corresponding with the first file in system, processing unit 12 this first file of preservation in another storage area of storage unit 11 (below be called the file storage area territory) then.In this case, processing unit 12 also adds specific markers in the file header of this first file.Here, it should be noted that the first file and the second file have identical filename (as, be 1.txt) and the logical directories address (as, C: abc 1.txt).Here, the first file is the copy of the second file.According to embodiments of the invention, the second file for operating system recovery be original state (as, factory state or user-defined original state) required file, and be sightless (will be described below) for the user.In this case, In the view of any file required to operating system recovery of user (as, C: abc 1.txt) modification or establishment are actually modification or the establishment for the first file in the file storage area territory (copy of the second file), and can not produce any change to the second file that system is recovered in the zone.Here, operating system that can configurating terminal device, so that even the first file has identical filename and logical address (physical address is different) with the second file, processing unit 12 also can all point to the first file rather than the second file with all with the operation that creates or modification is relevant by the physical address of the first file.In this case, when the file that creates or revise is the required file of operating system recovery, all modifications for file all are embodied in the first file, and the second file maintains the original state, and the file (comprising the second file) that can recover in the zone by system when operating system recovery thus comes the recovery operation system.
The below describes the operation that processing unit 12 is carried out as an example of file 1.txt example.Here, the processing of processing unit 12 can also be applied on the file of other any type.
For example, the operating system of user by terminal device create the first file (as, 1.txt) or the situation of the content of revised file (1.txt) under, documentor in can the configuration operation system, so that processing unit 12 is carried out the establishment of these the first files (1.txt) or when revising, processing unit 12 is judged at second file (1.txt) corresponding to file (1.txt) that whether system recovers to exist in the zone and institute creates or revises.In this case, processing unit 12 can utilize with the filename of the first file to recover in system whether retrieval exists the file with same file name to determine whether there is the second corresponding file in the system recovery zone in the zone.
Here, if recover to exist in the zone second file (1.txt) corresponding with the first file (1.txt) in system, then preserve this first file (comprising the content of revising or creating) in the file storage area territory of processing unit 12 in storage unit 11.Here, the file storage area territory in the storage unit 11 and system recovery zone can be mutual two different zones in the storage unit 11.In addition, if recover to have second file (1.txt) corresponding with the first file (1.txt) in the zone in system, then processing unit 12 also adds specific markers in the file header of this first file.Here, specific markers can be indicated in system and be recovered to exist in the zone second file corresponding with this first file.Namely, this specific markers can represent the copy that this first file is the second file.Here, according to embodiments of the invention, processing unit 12 can be determined all with content creating or revises relevant operations and all point to this first file (rather than second file) based on this specific markers.Particularly, because therefore the file header that the file of any type has same format can arrange this specific markers in the file header of various files.For example, can this mark be set in the field of the reserve area (Reserved) of file header.Here, specific markers can be the non-zero binary value of any type.
In addition, if processing unit 12 determine in the zone is recovered by system, not exist first file that creates or revise with institute (as, 1.txt) the second corresponding file, then processing unit 12 is preserved this first file in the file storage area territory of storage unit 11, and does not add specific markers in the file header of this first file.
By above-mentioned configuration, in the situation that the user wishes the executive system recovery, whether processing unit 12 need not as in the prior art for existing corresponding file to come executive operating system to recover (if there is this corresponding file in each the ff corresponding folder in the file in the system recovery zone, then delete this corresponding file, and come the recovery operation system with the file in system's recovery file folder, if there is no this corresponding file then comes the recovery operation system with the Piece file mergence in system's recovery file folder.)。According to embodiments of the invention, processing unit 12 can be by directly deleting the file in the file storage area territory in the storage unit 11, and recover the recovery that file in the zone comes executive operating system based on the system in the storage unit 11, greatly shortened thus the time of operating system recovery and improved the efficient of operating system recovery.
In addition, when processing unit 12 was carried out arbitrarily directory, processing unit 12 judged in the file header of the first file under this catalogue whether have specific markers.Here, if having specific markers in the file header of the first file under processing unit 12 definite these catalogues, then processing unit 12 is deleted the query term relevant with the second file in the Query Result of this directory.
Particularly, the user often can use the directory function of operating system when using the operating system of terminal device.For example, in the situation that the user clicks certain file, processing unit can be carried out directory under the control of operating system, and the All Files under this catalogue is shown to the user.In this case, operating system that can configurating terminal device is so that processing unit 12 judges in the file header of the file under this catalogue whether have specific markers when carrying out directory.For example, if have specific markers in the file header of certain file under processing unit 12 definite this directory results, then processing unit 12 can be determined to recover to have second file corresponding with this document in the zone in system, and this document is the first file (copy of the second file).In this case, because the first file has identical filename and logical address with the second file, therefore for fear of after having carried out directory, in the directory result, show simultaneously the first file and the second file, operating system that can configurating terminal device, so that processing unit 12 is deleted the query term relevant with the second file in the Query Result of this directory, thereby avoided wrong generation.In addition, if do not have specific markers in the file header of the first file under processing unit 12 definite these directory structures, then processing unit 12 can be determined to recover not have second file corresponding with this document in the zone in system.In this case, processing unit 12 need not the directory result is changed.
By above-mentioned configuration, in the required file of operating system recovery (the second file) and the simultaneous situation of copy (the first file) thereof, processing unit 12 can be determined by the specific markers in the first file to recover to have second file corresponding with the first file in the zone in system when carrying out directory, and does not need to show this second file.In this case, processing unit 12 is deleted the query term corresponding with the second file in the directory result, avoids thus occurring in the directory result two appearance with file of identical filename and logical address.
The below is with reference to document creation or the amending method of Fig. 2 description according to the embodiment of the invention.Fig. 2 is that diagram is according to the document creation of the embodiment of the invention or the process flow diagram of amending method.Here, the method for Fig. 2 can be applied in the terminal device shown in Figure 1, and wherein terminal device comprises for recover the required system data of zone storage system recovery and the storage unit of user data in system.
As shown in Figure 2, at step S201, when the establishment of carrying out the first file or modification, judge in system and recover whether to have second file corresponding with the first file in the zone.
Particularly, create in the operating system of user by terminal device in the situation of content of the first file or revised file, processing unit 12 can be carried out establishment or the modification of this first file.At this moment, processing unit 12 can judge in system to recover whether to exist in the zone and second file that the file that creates or revise is corresponding.Here, it should be noted that the first file and the second file have identical filename (as, be 1.txt) and the logical directories address (as, C: abc 1.txt), and the first file is the copy of the second file.Here, the second file for operating system recovery be original state (as, factory state or user-defined original state) required file.Here, processing unit 12 can utilize with the filename of the first file to recover in system whether retrieval exists the file with same file name to determine whether there is the second corresponding file in the system recovery zone in the zone.
At step S202, if recover to exist in the zone second file corresponding with the first file in system, then in the file storage area territory of storage unit, preserve this first file.
Particularly, if recover to exist in the zone second file (1.txt) corresponding with the first file (1.txt) in system, then preserve this first file (comprising the content of revising or creating) in the file storage area territory of processing unit 12 in storage unit 11.
At step S203, in the file header of the first file, add specific markers.
Particularly, if recover to have second file (1.txt) corresponding with the first file (1.txt) in the zone in system, then processing unit 12 also adds specific markers in the file header of this first file.Here, specific markers can be indicated in system and be recovered to exist in the zone second file corresponding with this first file.Namely, this specific markers can represent the copy that this first file is the second file, and processing unit 12 can be determined all with content creating or revises relevant operations and all point to this first file (rather than second file) based on this specific markers.Here, because therefore the file header that the file of any type has same format can arrange this specific markers in the file header of various files.For example, can this mark be set in the field of the reserve area (Reserved) of file header.Here, specific markers can be the non-zero binary value of any type.
In addition, the method for Fig. 2 can further include step: if recover not have second file corresponding with the first file in the storage area in system, then preserve the first file in the file storage area territory of storage unit; And in the file header of the first file, do not add specific markers.
Particularly, if processing unit 12 is determined to recover not exist in the zone the second file corresponding to the first file that creates or revise with institute in system, then processing unit 12 is preserved this first file (comprising the content of revising or creating) in the file storage area territory of storage unit 11, and does not add specific markers in the file header of this first file.
In addition, the method for Fig. 2 can further include step: when carrying out directory, judge in the file header of the first file under the catalogue whether have specific markers; If have specific markers in the file header of the first file under definite catalogue, then in the Query Result of directory, delete the query term relevant with the second file.
Particularly, when processing unit 12 was carried out arbitrarily directory, processing unit 12 judged in the file header of the first file under this catalogue whether have specific markers.Here, if having specific markers in the file header of the first file under processing unit 12 definite these catalogues, then processing unit 12 is deleted the query term relevant with the second file in the Query Result of this directory.For example, the user often can use the directory function of operating system when using the operating system of terminal device.In the situation that the user clicks certain file, processing unit can be carried out directory under the control of operating system, and the All Files under this catalogue is shown to the user.In this case, operating system that can configurating terminal device is so that processing unit 12 judges in the file header of the file under this catalogue whether have specific markers when carrying out directory.For example, if have specific markers in the file header of certain file under processing unit 12 definite this directory results, then processing unit 12 can be determined to recover to have second file corresponding with this document in the zone in system, and this document is the copy (the first file) of the second file.In this case, because the first file has identical filename and logical address with the second file, therefore for fear of after having carried out directory, in the directory result, show simultaneously the first file and the second file, operating system that can configurating terminal device, so that processing unit 12 is deleted the query term relevant with the second file in the Query Result of this directory, thereby avoided wrong generation.In addition, if do not have specific markers in the file header of the first file under processing unit 12 definite these directory structures, then processing unit 12 can be determined to recover not have second file corresponding with this document in the zone in system.In this case, processing unit 12 need not the directory result is changed.
By above-mentioned configuration, in the required file of operating system recovery (the second file) and the simultaneous situation of copy (the first file) thereof, processing unit 12 can be determined by the specific markers in the first file to recover to exist in the zone second file corresponding with the first file in system when carrying out directory.In this case, processing unit 12 is deleted the query term corresponding with the second file in the directory result, avoids thus occurring in the directory result two appearance with file of identical filename and logical address.In addition, in the situation that the user wishes the executive system recovery, processing unit 12 only needs directly to delete the file in the file storage area territory in the storage unit 11, and recover the recovery that file in the zone comes executive operating system based on the system in the storage unit 11, greatly shortened thus the time of operating system recovery and improved the efficient of operating system recovery.
Describe each embodiment of the present invention in the above in detail.Yet, it should be appreciated by those skilled in the art that without departing from the principles and spirit of the present invention, can carry out various modifications to these embodiment, combination or sub-portfolio, and such modification should fall within the scope of the present invention.
Claims (10)
1. a document creation or amending method are applied to a terminal device, and described terminal device comprises storage unit, and wherein said storage unit storage system in the first storage area is recovered required system data and user data, and described method comprises:
When the establishment of carrying out the first file or modification, judge in described the first storage area, whether there be second file corresponding with described the first file;
If in described the first storage area, there be second file corresponding with described the first file, then in the second storage area of described storage unit, preserve described the first file; And
In the file header of described the first file, add the first mark.
2. the method for claim 1 further comprises:
If in described the first storage area, there be not second file corresponding with described the first file, then in the second storage area of described storage unit, preserve described the first file; And
In the file header of described the first file, do not add the first mark.
3. the method for claim 1, wherein
Described the first file and described the second file have identical filename and logical directories address; And
Described the first file is the copy of described the second file.
4. the method for claim 1, wherein
There is described second file corresponding with described the first file in described the first mark indication in described the first storage area.
5. method as claimed in claim 4 further comprises:
When carrying out directory, judge in the file header of described the first file under the described catalogue whether have described the first mark;
If have described the first mark in the file header of described the first file under definite described catalogue, then in the Query Result of described directory, delete the query term relevant with described the second file.
6. terminal device comprises:
Storage unit, wherein said storage unit storage system in the first storage area is recovered required system data and user data; And
Processing unit, configuration come to carry out processing based on default program,
Wherein
When described processing unit was carried out the establishment of the first file or revised, described processing unit judged whether there be second file corresponding with described the first file in described the first storage area;
If there be second file corresponding with described the first file in described the first storage area, then processing unit is preserved described the first file in the second storage area of described storage unit; And
Described processing unit adds the first mark in the file header of described the first file.
7. terminal device as claimed in claim 6, wherein
If in described the first storage area, there be not second file corresponding with described the first file, then processing unit is preserved described the first file in the second storage area of described storage unit, and described processing unit does not add the first mark in the file header of described the first file.
8. terminal device as claimed in claim 6, wherein
Described the first file and described the second file have identical filename and logical directories address; And
Described the first file is the copy of described the second file.
9. terminal device as claimed in claim 6, wherein
There is described second file corresponding with described the first file in described the first mark indication in described the first storage area.
10. terminal device as claimed in claim 9, wherein
When described processing unit was carried out directory, described processing unit judged in the file header of described the first file under the described catalogue whether have described the first mark;
If processing unit is determined to have described the first mark in the file header of described the first file under the described catalogue, then described processing unit is deleted the query term relevant with described the second file in the Query Result of described directory.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210080392.8A CN103324643B (en) | 2012-03-23 | 2012-03-23 | Terminal device and method for establishing or modifying files |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210080392.8A CN103324643B (en) | 2012-03-23 | 2012-03-23 | Terminal device and method for establishing or modifying files |
Publications (2)
Publication Number | Publication Date |
---|---|
CN103324643A true CN103324643A (en) | 2013-09-25 |
CN103324643B CN103324643B (en) | 2017-02-08 |
Family
ID=49193390
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201210080392.8A Active CN103324643B (en) | 2012-03-23 | 2012-03-23 | Terminal device and method for establishing or modifying files |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103324643B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105874486A (en) * | 2013-11-28 | 2016-08-17 | 帕特里克·弗尔韦特 | Platform apparatus for providing qualitative collective knowledge |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CA2094880A1 (en) * | 1993-03-30 | 1994-10-27 | Mark Squibb | File difference engine |
CN1408084A (en) * | 2000-03-01 | 2003-04-02 | 电脑联合想象公司 | Method and system for updating an archive of a computer file |
CN1417689A (en) * | 2001-11-08 | 2003-05-14 | 联想(北京)有限公司 | Fixed disk data enciphering back-up and restoring method |
CN102023903A (en) * | 2009-09-10 | 2011-04-20 | 联想(北京)有限公司 | Version management method and device for data backup |
-
2012
- 2012-03-23 CN CN201210080392.8A patent/CN103324643B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CA2094880A1 (en) * | 1993-03-30 | 1994-10-27 | Mark Squibb | File difference engine |
CN1408084A (en) * | 2000-03-01 | 2003-04-02 | 电脑联合想象公司 | Method and system for updating an archive of a computer file |
CN1417689A (en) * | 2001-11-08 | 2003-05-14 | 联想(北京)有限公司 | Fixed disk data enciphering back-up and restoring method |
CN102023903A (en) * | 2009-09-10 | 2011-04-20 | 联想(北京)有限公司 | Version management method and device for data backup |
Non-Patent Citations (2)
Title |
---|
严刚: "数据恢复原理及技术解析", 《SCIENCE AND TECHNOLOGY INNOVATION HERALD》 * |
张延圆,焦磊: "一种闪存文件***的数据恢复机制", 《计算机工程》 * |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105874486A (en) * | 2013-11-28 | 2016-08-17 | 帕特里克·弗尔韦特 | Platform apparatus for providing qualitative collective knowledge |
CN105874486B (en) * | 2013-11-28 | 2020-10-27 | 帕特里克·弗尔韦特 | Platform device for providing qualitative cluster knowledge |
Also Published As
Publication number | Publication date |
---|---|
CN103324643B (en) | 2017-02-08 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP6144748B2 (en) | File safe deletion function providing apparatus, method thereof, computer-readable recording medium on which program for executing the method is recorded, and application distribution system | |
US9367303B2 (en) | Upgrade packet generation method, server, software upgrade method, and mobile terminal | |
US9892274B2 (en) | Accessing and providing access to computer files over a computer network | |
US20120084272A1 (en) | File system support for inert files | |
JP2014526748A (en) | Efficient data recovery | |
CN100429628C (en) | Method for rebuilding directory structure and recovering data in NTFS volume | |
JP6079152B2 (en) | Document editing notification method, server, program and system thereof | |
WO2017113317A1 (en) | File editing method and file editor | |
CN102609495A (en) | Method for deleting file and system | |
CN103119550A (en) | Storing electronic content with time-varying properties | |
CN103473277A (en) | Snapshot method and device for file systems | |
US9087093B2 (en) | Method for implementing electronic bookmarks and device thereof | |
CN102662591B (en) | Data processing method and device | |
CN104331343A (en) | File backup method and system | |
CN105843903A (en) | File management method and terminal | |
US8423573B2 (en) | Filesystem backup using directorywise hardlinking for a computer filesystem | |
CN102932476A (en) | Network storage synchronization system | |
CN108829813A (en) | A kind of File Snapshot method and system based on distributed memory system | |
KR101258387B1 (en) | The digital aging system and the management method | |
CN102346696B (en) | A kind of file access pattern method and device | |
CN103324643A (en) | Terminal device and method for establishing or modifying files | |
JP6363200B2 (en) | How to provide file aging service | |
CN110764749A (en) | System page development management method and device, computer equipment and storage medium | |
CN108038028B (en) | File backup method and device and file restoration method and device | |
US11550665B2 (en) | Techniques for preserving clone relationships between files |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant |