CN107590233B - File management method and device - Google Patents
File management method and device Download PDFInfo
- Publication number
- CN107590233B CN107590233B CN201710800638.7A CN201710800638A CN107590233B CN 107590233 B CN107590233 B CN 107590233B CN 201710800638 A CN201710800638 A CN 201710800638A CN 107590233 B CN107590233 B CN 107590233B
- Authority
- CN
- China
- Prior art keywords
- file
- storage area
- search range
- acquiring
- header information
- 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.)
- Active
Links
- 238000007726 management method Methods 0.000 title claims abstract description 27
- 238000000034 method Methods 0.000 abstract description 13
- 238000011084 recovery Methods 0.000 abstract description 10
- 230000000694 effects Effects 0.000 abstract description 4
- 239000012634 fragment Substances 0.000 description 5
- 238000010586 diagram Methods 0.000 description 3
- 238000013480 data collection Methods 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000004458 analytical method Methods 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000012545 processing Methods 0.000 description 1
Images
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention provides a file management method and a device, wherein the method comprises the following steps: acquiring file header information of a file which carries a target keyword and is located in a storage area, and acquiring a file type according to the file header information; determining a target storage area parameter corresponding to the file according to the content characteristics corresponding to the file type; determining a search range value of a storage area according to the size of the acquired file; and acquiring files in a space with a storage area as a search range value according to the target storage area parameters. The technical scheme provides a scattered file collection and matching method in data recovery, so that the current situation that the integrity effect of scattered file recovery is poor after file indexes are damaged by current file recovery software is avoided.
Description
Technical Field
The invention belongs to the technical field of computers, and particularly relates to a file management method and device.
Background
With the rapid development of internet technology, the number of network attacks suffered by computers is also increasing, which is also a main cause of file loss in computers.
When file recovery software is used to recover a lost file, it is common to scan directories for fragments of the file and then assemble the file from the fragments, but in the event that a directory is corrupted, it is difficult to retrieve the lost file in this way.
Therefore, it is desirable to provide a file management scheme to solve the above technical problems.
Disclosure of Invention
The invention provides a file management method and a file management device, which aim to solve the problems.
The embodiment of the invention provides a file management method, which comprises the following steps: acquiring file header information of a file which carries a target keyword and is located in a storage area, and acquiring a file type according to the file header information;
determining a target storage area parameter corresponding to the file according to the content characteristics corresponding to the file type;
determining a search range value of a storage area according to the size of the acquired file;
and acquiring files in a space with a storage area as a search range value according to the target storage area parameters.
The embodiment of the invention also provides a file management device, which comprises a processor, a file management module and a file management module, wherein the processor is suitable for realizing each instruction; a storage device adapted to store a plurality of instructions, the instructions adapted to be loaded and executed by the processor;
acquiring file header information of a file which carries a target keyword and is located in a storage area, and acquiring a file type according to the file header information;
determining a target storage area parameter corresponding to the file according to the content characteristics corresponding to the file type;
determining a search range value of a storage area according to the size of the acquired file;
and acquiring files in a space with a storage area as a search range value according to the target storage area parameters.
The technical scheme provided by the embodiment of the invention is as follows: acquiring file header information of a file which carries a target keyword and is located in a storage area, and acquiring a file type according to the file header information; determining a target storage area parameter corresponding to the file according to the content characteristics corresponding to the file type; determining a search range value of a storage area according to the size of the acquired file; and acquiring files in a space with a storage area as a search range value according to the target storage area parameters.
The technical scheme provides a scattered file collection and matching method in data recovery, so that the current situation that the integrity effect of scattered file recovery is poor after file indexes are damaged by current file recovery software is avoided.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
FIG. 1 is a schematic diagram showing file management in embodiment 1 of the present invention;
FIG. 2 is a flowchart showing a file management method according to embodiment 2 of the present invention;
FIG. 3 is a view showing the structure of a file management apparatus according to embodiment 3 of the present invention.
Detailed Description
The invention will be described in detail hereinafter with reference to the accompanying drawings in conjunction with embodiments. It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict.
The invention provides a scattered file collection and matching method in data recovery, so that the current situation that the integrity effect of scattered file recovery is poor after file indexes are damaged by current file recovery software is avoided.
Fig. 1 is a schematic diagram of file management according to embodiment 1 of the present invention, including the following steps:
step 101: and (3) retrieval process: retrieving file headers of scattered file areas according to the keyword matching scheme;
step 102: and (3) an analysis process: analyzing the address fragment area of the area where the file is located according to the information contained in the file header obtained in the retrieval process;
step 103: and (3) positioning: based on different content characteristics, a file storage space is defined, and a target storage area parameter of the file is determined;
step 104: and (3) collecting: and retrieving the contents of the data storage areas before and after the target storage area parameter obtained in the positioning process, thereby realizing the collection of scattered files.
The method can greatly reduce errors possibly occurring in the original data collection stage of scattered file recovery, and enables scattered file collection and matching to become efficient and accurate.
The method comprises the following concrete steps:
1) searching a file header of a file to be searched, and searching in a storage area by a keyword matching method due to the specific format of the file header to identify whether the data block contains key information;
2) and analyzing the address fragment area of the file according to the information contained in the retrieved file header. Typically, the binary sequence of the header will contain a lot of attribute information related to the file. By analyzing the attribute information, the file type of the file can be known, namely the form of the file tail is known, then the file tail is positioned, and the size of the file is estimated. If the region contains more than one file, setting a variable group (Ai) to warehouse key information of different files;
3) based on different content characteristics of different file types, the file is defined to be possible to store, and a target storage area (TargetArea) parameter of the file is locked. The file and the information in the file tail are comprehensively analyzed, and different file sizes can be obtained. If the size of the file i is ai.targetarea, the sum of all ai.targetarea is stored through the accumulator S, and the size of the area is also determined;
4) and retrieving the data content in the space with the storage area S according to the target storage area parameters, and combining the related attribute information in the file header to realize the collection of scattered files. The fragment content of the file i is stored in different attribute items of Ai, and classified and collected.
In conclusion, the method can greatly reduce errors possibly occurring in the original data collection stage of scattered file recovery, and enables scattered file collection and matching to become efficient and accurate.
Fig. 2 is a processing flow chart of a file management method according to embodiment 2 of the present invention, which includes the following steps:
step 201: acquiring file header information of a file which carries a target keyword and is located in a storage area, and acquiring a file type according to the file header information;
further, the file type is obtained according to the file attribute in the file header information.
Step 202: determining a target storage area parameter corresponding to the file according to the content characteristics corresponding to the file type;
step 203: determining a search range value of a storage area according to the size of the acquired file;
further, determining file tail information according to the file type;
and obtaining the size of the file according to the file header information and the file tail information.
In particular, the steps 202 and 203 are not executed in a strict time sequence, and may be executed sequentially (step 202 may be executed first, and then step 203 may be executed), or may be executed simultaneously.
Further, the file is one or more.
Preferably, if there are a plurality of files, the search range values of the storage areas corresponding to the respective files are accumulated by the accumulator to determine a final search range value of the storage area.
Step 204: and acquiring files in a space with a storage area as a search range value according to the target storage area parameters.
FIG. 3 is a diagram showing a structure of a file management apparatus according to embodiment 3 of the present invention, including a processor adapted to implement instructions; a storage device adapted to store a plurality of instructions, the instructions adapted to be loaded and executed by the processor to:
acquiring file header information of a file which carries a target keyword and is located in a storage area, and acquiring a file type according to the file header information;
determining a target storage area parameter corresponding to the file according to the content characteristics corresponding to the file type;
determining a search range value of a storage area according to the size of the acquired file;
and acquiring files in a space with a storage area as a search range value according to the target storage area parameters.
Further, the file type is obtained according to the file attribute in the file header information.
Further, determining file tail information according to the file type;
and obtaining the size of the file according to the file header information and the file tail information.
Further, the file is one or more.
Preferably, if there are a plurality of files, the search range values of the storage areas corresponding to the respective files are accumulated by the accumulator to determine a final search range value of the storage area.
The technical scheme provided by the embodiment of the invention is as follows: acquiring file header information of a file which carries a target keyword and is located in a storage area, and acquiring a file type according to the file header information; determining a target storage area parameter corresponding to the file according to the content characteristics corresponding to the file type; determining a search range value of a storage area according to the size of the acquired file; and acquiring files in a space with a storage area as a search range value according to the target storage area parameters.
The technical scheme provides a scattered file collection and matching method in data recovery, so that the current situation that the integrity effect of scattered file recovery is poor after file indexes are damaged by current file recovery software is avoided.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims (10)
1. A file management method, comprising the steps of:
acquiring file header information of a file which carries a target keyword and is located in a storage area, and acquiring a file type according to the file header information;
determining a target storage area parameter corresponding to the file according to the content characteristics corresponding to the file type;
determining a search range value of a storage area according to the size of the acquired file;
and acquiring files in a space with a storage area as a search range value according to the target storage area parameters.
2. The file management method according to claim 1, wherein a file type is obtained based on a file attribute in said header information.
3. The file management method according to claim 2, wherein file end information is determined according to the file type;
and obtaining the size of the file according to the file header information and the file tail information.
4. The file management method according to claim 1, wherein the file is one or more files.
5. The file management method according to claim 4, wherein if there are a plurality of files, the search range values of the storage areas corresponding to the respective files are accumulated by an accumulator to determine a final search range value of the storage area.
6. A file management apparatus comprising a processor adapted to implement instructions; a storage device adapted to store a plurality of instructions, the instructions adapted to be loaded and executed by the processor to:
acquiring file header information of a file which carries a target keyword and is located in a storage area, and acquiring a file type according to the file header information;
determining a target storage area parameter corresponding to the file according to the content characteristics corresponding to the file type;
determining a search range value of a storage area according to the size of the acquired file;
and acquiring files in a space with a storage area as a search range value according to the target storage area parameters.
7. The file management apparatus according to claim 6, wherein a file type is obtained from a file attribute in said header information.
8. The file management apparatus according to claim 7, wherein file end information is determined based on the file type;
and obtaining the size of the file according to the file header information and the file tail information.
9. The file management apparatus according to claim 6, wherein said file is one or more.
10. The file management apparatus according to claim 9, wherein if there are a plurality of files, the search range values of the storage areas corresponding to the respective files are accumulated by an accumulator to determine a final search range value of the storage area.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710800638.7A CN107590233B (en) | 2017-09-07 | 2017-09-07 | File management method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710800638.7A CN107590233B (en) | 2017-09-07 | 2017-09-07 | File management method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107590233A CN107590233A (en) | 2018-01-16 |
CN107590233B true CN107590233B (en) | 2021-03-19 |
Family
ID=61050464
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710800638.7A Active CN107590233B (en) | 2017-09-07 | 2017-09-07 | File management method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107590233B (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108647116A (en) * | 2018-04-13 | 2018-10-12 | 深圳大普微电子科技有限公司 | Data reconstruction method and storage device |
CN110929110B (en) * | 2019-11-13 | 2023-02-21 | 北京北信源软件股份有限公司 | Electronic document detection method, device, equipment and storage medium |
CN117216011B (en) * | 2023-08-30 | 2024-05-03 | 建银工程咨询有限责任公司 | File transmission method and device and electronic equipment |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102609531A (en) * | 2012-02-14 | 2012-07-25 | 北京鼎普科技股份有限公司 | Method for pegging files according to keywords |
CN103645974A (en) * | 2013-12-31 | 2014-03-19 | 厦门市美亚柏科信息股份有限公司 | Method and device for recovering portable document format (PDF) file |
CN106874147A (en) * | 2017-03-01 | 2017-06-20 | 四川艾特赢泰智能科技有限责任公司 | A kind of recovery simultaneously parses the method that Windows operating system pre-reads file |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8218763B2 (en) * | 2009-04-22 | 2012-07-10 | International Business Machines Corporation | Method for ensuring the validity of recovered electronic documents from remote storage |
-
2017
- 2017-09-07 CN CN201710800638.7A patent/CN107590233B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102609531A (en) * | 2012-02-14 | 2012-07-25 | 北京鼎普科技股份有限公司 | Method for pegging files according to keywords |
CN103645974A (en) * | 2013-12-31 | 2014-03-19 | 厦门市美亚柏科信息股份有限公司 | Method and device for recovering portable document format (PDF) file |
CN106874147A (en) * | 2017-03-01 | 2017-06-20 | 四川艾特赢泰智能科技有限责任公司 | A kind of recovery simultaneously parses the method that Windows operating system pre-reads file |
Also Published As
Publication number | Publication date |
---|---|
CN107590233A (en) | 2018-01-16 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106534344B (en) | Cloud platform video processing system and application method thereof | |
CN110569214B (en) | Index construction method and device for log file and electronic equipment | |
WO2015078273A1 (en) | Method and apparatus for search | |
CN107590233B (en) | File management method and device | |
EP3438845A1 (en) | Data updating method and device for a distributed database system | |
WO2013119603A1 (en) | Web page retrieval method and device | |
CN111125298A (en) | Method, equipment and storage medium for reconstructing NTFS file directory tree | |
CN109726186B (en) | Method and device for retrieving error log and computer readable storage medium | |
CN103530369A (en) | De-weight method and system | |
CN107153692B (en) | Method and equipment for matching character strings | |
Billard et al. | Making sense of unstructured flash-memory dumps | |
CN112328379A (en) | Application migration method, device, equipment and medium | |
CN111475464B (en) | Method for automatically finding and mining fingerprints of Web component | |
US10884873B2 (en) | Method and apparatus for recovery of file system using metadata and data cluster | |
CN113806647A (en) | Method for identifying development framework and related equipment | |
CN107943849B (en) | Video file retrieval method and device | |
US10614102B2 (en) | Method and system for creating entity records using existing data sources | |
CN112527757B (en) | Rapid retrieval method based on large-scale chip test result | |
CN112131215B (en) | Bottom-up database information acquisition method and device | |
CN110633430B (en) | Event discovery method, apparatus, device, and computer-readable storage medium | |
US9996621B2 (en) | System and method for retrieving internet pages using page partitions | |
CN111723266A (en) | Mass data processing method and device | |
CN110543622A (en) | Text similarity detection method and device, electronic equipment and readable storage medium | |
US9864765B2 (en) | Entry insertion apparatus, method, and program | |
CN114490164B (en) | Log collection method, system, device and computer storage medium |
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 | ||
TA01 | Transfer of patent application right | ||
TA01 | Transfer of patent application right |
Effective date of registration: 20210204 Address after: Building 9, No.1, guanpu Road, Guoxiang street, Wuzhong Economic Development Zone, Wuzhong District, Suzhou City, Jiangsu Province Applicant after: SUZHOU LANGCHAO INTELLIGENT TECHNOLOGY Co.,Ltd. Address before: Room 1601, floor 16, 278 Xinyi Road, Zhengdong New District, Zhengzhou City, Henan Province Applicant before: ZHENGZHOU YUNHAI INFORMATION TECHNOLOGY Co.,Ltd. |
|
GR01 | Patent grant | ||
GR01 | Patent grant |