CN104699688A - File searching method and electronic device - Google Patents

File searching method and electronic device Download PDF

Info

Publication number
CN104699688A
CN104699688A CN201310648940.7A CN201310648940A CN104699688A CN 104699688 A CN104699688 A CN 104699688A CN 201310648940 A CN201310648940 A CN 201310648940A CN 104699688 A CN104699688 A CN 104699688A
Authority
CN
China
Prior art keywords
file
key word
sector
fdisk
hard disk
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
Application number
CN201310648940.7A
Other languages
Chinese (zh)
Inventor
陈伟
汪海
范海峰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou Ying Wan Science And Technology Ltd
Original Assignee
Hangzhou Ying Wan Science And Technology Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Hangzhou Ying Wan Science And Technology Ltd filed Critical Hangzhou Ying Wan Science And Technology Ltd
Priority to CN201310648940.7A priority Critical patent/CN104699688A/en
Publication of CN104699688A publication Critical patent/CN104699688A/en
Pending legal-status Critical Current

Links

Abstract

The embodiment of the invention provides a file searching method and an electronic device. The electronic device comprises a disk, wherein the disk comprises a hard disk or a hard disk partition. The method comprises the following steps: searching in various sectors of the disk according to keywords so as to search a target sector containing the keywords; finding corresponding files in a file system according to the target sector and the keywords. By adopting the method, various sectors of the hard disk or the hard disk partition can be directly searched in the absence of the file system to most thoroughly find files; the undeleted, deleted and wasted data blocks can be directly searched in the sectors according to the method.

Description

A kind of method of search file and electronic equipment
Technical field
The present invention relates to data storage technology, refer to a kind of method and electronic equipment of search file especially.
Background technology
When being confirmed whether to there is the file comprising key word on computers, the research tool normally adopting operating system to carry realizes.But prior art can only search for not deleted file, deleted file can not be searched for.
If revise/delete the sensitive word of certain file, prior art cannot be confirmed whether residual risk in addition, such as cannot confirm the key word that the temporary file (tmp) of word may contain, because whether the file after cannot confirming to revise also has the residual risk before revising, this brings hidden danger and inconvenience for documents editing manages.
There are the following problems for prior art: cannot search out all containing the existing of key word or deleted document from DISK to Image or fdisk.
Summary of the invention
The technical problem to be solved in the present invention is to provide a kind of method and electronic equipment of search file, solves the problem that cannot search out from hard disk or fdisk all containing the existing of key word or deleted document.
For solving the problems of the technologies described above, embodiments of the invention provide a kind of method of search file, are applied to electronic equipment, and electronic equipment comprises disk, and described disk comprises hard disk or fdisk; Method comprises: search in each sector of disk according to key word, search the destination sector containing key word; In file system, corresponding file is found according to destination sector and described key word.
In described method, search in each sector of disk according to key word, the destination sector searched containing key word specifically comprises: determine one or more key word, one or more key word described is converted to the compare string of corresponding binary format; Determine the hard disk sequence number in disk or fdisk sequence number, directly read hard disk information or fdisk information according to described hard disk sequence number or fdisk sequence number; Described compare string and described hard disk information or fdisk information are carried out string matching; Determine the destination sector at key word place that described compare string is corresponding and the particular location in destination sector, export the offset address in the specific address of described destination sector and destination sector.
In described method, in file system, corresponding file is found specifically to comprise according to destination sector and described key word: in file system, find the logic sector number of destination sector according to the offset address in described specific address and destination sector, in the master file-table of disk, analyze the concrete file belonging to described destination sector according to the logic sector number of described destination sector.
In described method, also comprise: the concrete file containing key word that Delete query arrives, delete described concrete file; Select hard disk or the fdisk at the concrete file place of deleting, this hard disk or fdisk are reset.
In described method, also comprise: select deleted file, find the master file-table at deleted file place; In master file-table, select the catalogue that deleted concrete file is corresponding, according to master control file information by the date restoring corresponding to deleted concrete file in new file.
A kind of electronic equipment, comprise disk, described disk comprises hard disk or fdisk; Also comprising: search unit, for searching in each sector of disk according to key word, searching the destination sector containing key word; File matching unit, for finding corresponding file in file system according to destination sector and described key word.
In described electronic equipment, search unit also comprises: pretreatment module, for determining one or more key word, one or more key word described is converted to the compare string of corresponding binary format; Determine the hard disk sequence number in described disk or fdisk sequence number, directly read hard disk information or fdisk information according to described hard disk sequence number or fdisk sequence number; Keyword-matching module, for carrying out string matching by described compare string and described hard disk information or fdisk information; Determine the destination sector at key word place that described compare string is corresponding and the particular location in destination sector, export the offset address in the specific address of described destination sector and destination sector.
In described electronic equipment, file matching unit comprises: ff module, for in file system, find the logic sector number of destination sector according to the offset address in described specific address and destination sector, in the master file-table of disk, analyze the concrete file belonging to described destination sector according to the logic sector number of described destination sector.
In described electronic equipment, also comprise: delete cells, for the concrete file containing key word that Delete query arrives, delete described concrete file; Select hard disk or the fdisk at the concrete file place of deleting, this hard disk or fdisk are reset.
In described electronic equipment, also comprising: recovery unit, for selecting deleted file, finding the master file-table at deleted file place; In master file-table, select the catalogue that deleted concrete file is corresponding, according to master control file information by the date restoring corresponding to deleted concrete file in new file.
The beneficial effect of technique scheme of the present invention is as follows: not by file system, and each sector of direct search hard disk or fdisk realizes locating file the most thoroughly.
Accompanying drawing explanation
Fig. 1 represents a kind of method flow schematic diagram of search file;
Fig. 2 represents the schematic flow sheet of search file and deletion/recovery file.
Embodiment
For making the technical problem to be solved in the present invention, technical scheme and advantage clearly, be described in detail below in conjunction with the accompanying drawings and the specific embodiments.
The embodiment of the present invention provides a kind of method of search file, is applied to electronic equipment, and as shown in Figure 1, electronic equipment comprises disk, and described disk comprises hard disk or fdisk;
Method comprises:
Step 101, searches for according to key word, searches the destination sector containing key word in each sector of disk;
Step 102, finds corresponding file according to destination sector and described key word in file system.
The technology provided is provided, not by file system, but each sector of direct search hard disk or fdisk, realize locating file the most thoroughly.And directly can search in a sector accordingly and not delete, deleted and obsolete data block.
In a preferred embodiment, search in each sector of disk according to key word, the destination sector searched containing key word specifically comprises:
Determine one or more key word, one or more key word described is converted to the compare string of corresponding binary format;
Determine the hard disk sequence number in described disk or fdisk sequence number, directly read hard disk information or fdisk information according to described hard disk sequence number or fdisk sequence number;
Described compare string and described hard disk information or fdisk information are carried out string matching;
Determine the destination sector at key word place that described compare string is corresponding and the particular location in destination sector, export the offset address in the specific address of described destination sector and destination sector.
It is a search procedure of the information on key word and hard disk being carried out mating that described compare string and described hard disk information or fdisk information are carried out string matching, comprising:
Keyword strings converts 2 binary data of the forms such as utf8, unicode or ansi to, by 2 binary data directly and hard disc data compare (comparisons between 2 binary data), find out the offset address in the specific address of satisfactory data block-destination sector and destination sector.
In a preferred embodiment, in file system, corresponding file is found specifically to comprise according to destination sector and described key word:
In file system, find the logic sector number of destination sector according to the offset address in described specific address and destination sector, in the master file-table of disk, analyze the concrete file belonging to described destination sector according to the logic sector number of described destination sector.
After finding out satisfactory data block, read the master file-table (MFT) of hard disk, analyze the concrete file at data block place, find corresponding concrete file.Because be the character of 010101 form directly searched on bottom disk, instead of direct search file, go to be connected and file system according to the disc information searched on disk (hard disk information or fdisk information), in file system, find out concrete file.
In file system, the MFT corresponding to data is found according to the offset address in described specific address and destination sector, analyze MFT information (filename, attribute etc.) find the logic sector number of destination sector, find corresponding concrete file according to the logic sector number of described destination sector.Corresponding concrete file comprises deleted file, inquires about less than the obsolete data block of the representation of file that sector is corresponding.
The deleted document that complete deletion inquires, deleted document often just deletes the information of this file at the index part of subregion, but the content of this file is not deleted, therefore in a preferred embodiment, also comprises:
The concrete file containing key word that Delete query arrives, deletes described concrete file;
Select hard disk or the fdisk at the concrete file place of deleting, this hard disk or fdisk are reset.
In a preferred embodiment, also comprise: select deleted file, find the master file-table at deleted file place;
In master file-table, select the catalogue that deleted concrete file is corresponding, according to master control file information by the date restoring corresponding to deleted concrete file in new file.
A threshold value can be set, select recovery file catalogue when described file size is greater than threshold value, directly create temporary file at internal memory when described file is less than or equal to threshold value.
In an application scenarios, as shown in Figure 2, comprising:
Step 1, the disk of input inquiry or fdisk (sequence number) in interface, key word, search module is passed at interface;
Step 2, search module passes to the DataInfo array that file matching module contains crucial sector;
Step 3, file matching module Study document system, searches destination sector.And return DataInfo array, in interface display information; The display of Datainfo array comprises: place disk, initial sector, start byte, respective file name, file type (delete/normal), coded format, file attribute (create, revise or access).
Step 4, file access pattern/removing module: select the file matching key word, directly open normal file, as deleted, recovery file is also opened.Then manual recovery oneself open/and unknown file directly shows the hard disc data of key word context.
The embodiment of the present invention provides a kind of electronic equipment, comprises disk, and described disk comprises hard disk or fdisk; Also comprise:
Search unit, for searching in each sector of disk according to key word, searches the destination sector containing key word;
File matching unit, for finding corresponding file in file system according to destination sector and described key word.
In a preferred embodiment, search unit also comprises:
Pretreatment module, for determining one or more key word, converts the compare string of corresponding binary format to by one or more key word described; Determine the hard disk sequence number in described disk or fdisk sequence number, directly read hard disk information or fdisk information according to described hard disk sequence number or fdisk sequence number;
Keyword-matching module, for carrying out string matching by described compare string and described hard disk information or fdisk information; Determine the destination sector at key word place that described compare string is corresponding and the particular location in destination sector, export the offset address in the specific address of described destination sector and destination sector.
In a preferred embodiment, file matching unit comprises:
Ff module, for in file system, find the logic sector number of destination sector according to the offset address in described specific address and destination sector, in the master file-table of disk, analyze the concrete file belonging to described destination sector according to the logic sector number of described destination sector.
In a preferred embodiment, also comprise:
Delete cells, for the concrete file containing key word that Delete query arrives, deletes described concrete file; Select hard disk or the fdisk at the concrete file place of deleting, this hard disk or fdisk are reset.
In a preferred embodiment, also comprise:
Recovery unit, for selecting deleted file, finds the master file-table at deleted file place;
In master file-table, select the catalogue that deleted concrete file is corresponding, according to master control file information by the date restoring corresponding to deleted concrete file in new file.
Adopt the advantage after this programme to be: not by file system, each sector of direct search hard disk or fdisk, directly search in a sector and do not delete, deleted and obsolete data block, realize locating file the most thoroughly.
The above is the preferred embodiment of the present invention; it should be pointed out that for those skilled in the art, under the prerequisite not departing from principle of the present invention; can also make some improvements and modifications, these improvements and modifications also should be considered as protection scope of the present invention.

Claims (10)

1. a method for search file, is characterized in that, is applied to electronic equipment, and electronic equipment comprises disk, and described disk comprises hard disk or fdisk;
Method comprises:
Search in each sector of disk according to key word, search the destination sector containing key word;
In file system, corresponding file is found according to destination sector and described key word.
2. method according to claim 1, is characterized in that, searches in each sector of disk according to key word, and the destination sector searched containing key word specifically comprises:
Determine one or more key word, one or more key word described is converted to the compare string of corresponding binary format;
Determine the hard disk sequence number in described disk or fdisk sequence number, directly read hard disk information or fdisk information according to described hard disk sequence number or fdisk sequence number;
Described compare string and described hard disk information or fdisk information are carried out string matching;
Determine the destination sector at key word place that described compare string is corresponding and the particular location in destination sector, export the offset address in the specific address of described destination sector and destination sector.
3. method according to claim 1, is characterized in that, finds corresponding file specifically to comprise according to destination sector and described key word in file system:
In file system, find the logic sector number of destination sector according to the offset address in described specific address and destination sector, in the master file-table of disk, analyze the concrete file belonging to described destination sector according to the logic sector number of described destination sector.
4. method according to claim 1, is characterized in that, also comprises:
The concrete file containing key word that Delete query arrives, deletes described concrete file;
Select hard disk or the fdisk at the concrete file place of deleting, this hard disk or fdisk are reset.
5. method according to claim 1, is characterized in that, also comprises:
Select deleted file, find the master file-table at deleted file place;
In master file-table, select the catalogue that deleted concrete file is corresponding, according to master control file information by the date restoring corresponding to deleted concrete file in new file.
6. an electronic equipment, is characterized in that, comprises disk, and described disk comprises hard disk or fdisk;
Also comprise:
Search unit, for searching in each sector of disk according to key word, searches the destination sector containing key word;
File matching unit, for finding corresponding file in file system according to destination sector and described key word.
7. electronic equipment according to claim 6, is characterized in that, search unit also comprises:
Pretreatment module, for determining one or more key word, converts the compare string of corresponding binary format to by one or more key word described; Determine the hard disk sequence number in described disk or fdisk sequence number, directly read hard disk information or fdisk information according to described hard disk sequence number or fdisk sequence number;
Keyword-matching module, for carrying out string matching by described compare string and described hard disk information or fdisk information;
Determine the destination sector at key word place that described compare string is corresponding and the particular location in destination sector, export the offset address in the specific address of described destination sector and destination sector.
8. electronic equipment according to claim 6, is characterized in that, file matching unit comprises:
Ff module, for in file system, find the logic sector number of destination sector according to the offset address in described specific address and destination sector, in the master file-table of disk, analyze the concrete file belonging to described destination sector according to the logic sector number of described destination sector.
9. electronic equipment according to claim 6, is characterized in that, also comprises:
Delete cells, for the concrete file containing key word that Delete query arrives, deletes described concrete file; Select hard disk or the fdisk at the concrete file place of deleting, this hard disk or fdisk are reset.
10. electronic equipment according to claim 6, is characterized in that, also comprises:
Recovery unit, for selecting deleted file, finds the master file-table at deleted file place;
In master file-table, select the catalogue that deleted concrete file is corresponding, according to master control file information by the date restoring corresponding to deleted concrete file in new file.
CN201310648940.7A 2013-12-04 2013-12-04 File searching method and electronic device Pending CN104699688A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310648940.7A CN104699688A (en) 2013-12-04 2013-12-04 File searching method and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310648940.7A CN104699688A (en) 2013-12-04 2013-12-04 File searching method and electronic device

Publications (1)

Publication Number Publication Date
CN104699688A true CN104699688A (en) 2015-06-10

Family

ID=53346826

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310648940.7A Pending CN104699688A (en) 2013-12-04 2013-12-04 File searching method and electronic device

Country Status (1)

Country Link
CN (1) CN104699688A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107273523A (en) * 2017-06-22 2017-10-20 北京北信源软件股份有限公司 A kind of network access record purge method and device
CN107301351A (en) * 2017-06-22 2017-10-27 北京北信源软件股份有限公司 A kind of method and apparatus scanned with removing network access record
CN108280192A (en) * 2018-01-25 2018-07-13 中孚信息股份有限公司 A kind of implementation method inversely positioning file according to sector
CN108491324A (en) * 2018-03-12 2018-09-04 威创集团股份有限公司 Target vocabulary searching method and device in a kind of software

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070030734A1 (en) * 2005-08-03 2007-02-08 Sinclair Alan W Reclaiming Data Storage Capacity in Flash Memories
CN101464900A (en) * 2009-01-15 2009-06-24 上海交通大学 Light file hiding method in NTFS file system
CN102289451A (en) * 2011-06-17 2011-12-21 奇智软件(北京)有限公司 Method and device for searching files or folders
CN102298546A (en) * 2011-09-07 2011-12-28 深圳市万兴软件有限公司 Method and computer for restoring deleted joint picture group (JPG) file from disk
CN102609531A (en) * 2012-02-14 2012-07-25 北京鼎普科技股份有限公司 Method for pegging files according to keywords
CN102880713A (en) * 2012-09-29 2013-01-16 北京奇虎科技有限公司 File deleting method and file deleting device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070030734A1 (en) * 2005-08-03 2007-02-08 Sinclair Alan W Reclaiming Data Storage Capacity in Flash Memories
CN101464900A (en) * 2009-01-15 2009-06-24 上海交通大学 Light file hiding method in NTFS file system
CN102289451A (en) * 2011-06-17 2011-12-21 奇智软件(北京)有限公司 Method and device for searching files or folders
CN102298546A (en) * 2011-09-07 2011-12-28 深圳市万兴软件有限公司 Method and computer for restoring deleted joint picture group (JPG) file from disk
CN102609531A (en) * 2012-02-14 2012-07-25 北京鼎普科技股份有限公司 Method for pegging files according to keywords
CN102880713A (en) * 2012-09-29 2013-01-16 北京奇虎科技有限公司 File deleting method and file deleting device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
WLZY0938: ""_第二章 FAT文件系统"", 《百度文库》 *

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107273523A (en) * 2017-06-22 2017-10-20 北京北信源软件股份有限公司 A kind of network access record purge method and device
CN107301351A (en) * 2017-06-22 2017-10-27 北京北信源软件股份有限公司 A kind of method and apparatus scanned with removing network access record
CN108280192A (en) * 2018-01-25 2018-07-13 中孚信息股份有限公司 A kind of implementation method inversely positioning file according to sector
CN108491324A (en) * 2018-03-12 2018-09-04 威创集团股份有限公司 Target vocabulary searching method and device in a kind of software
CN108491324B (en) * 2018-03-12 2022-03-22 威创集团股份有限公司 Target vocabulary searching method and device in software

Similar Documents

Publication Publication Date Title
CN101719141B (en) File processing method and system based on directory object
US8898138B2 (en) Efficiently indexing and searching similar data
US8495022B1 (en) Systems and methods for synthetic backups
CN106663047A (en) Systems and methods for oprtimized signature comparisons and data replication
CN100498782C (en) Method for quick updating data domain in full text retrieval system
CN109726177A (en) A kind of mass file subregion indexing means based on HBase
EP3814930B1 (en) System and method for bulk removal of records in a database
CN105474200A (en) Hydration and dehydration with placeholders
CN104978151A (en) Application awareness based data reconstruction method in repeated data deletion and storage system
JP2005267600A5 (en)
CN104090922B (en) A kind of method and apparatus for clearing up private data
CN100507919C (en) FAT file system and its processing method
CN110888837B (en) Object storage small file merging method and device
US20140358868A1 (en) Life cycle management of metadata
US20090254585A1 (en) Method for Associating Administrative Policies with User-Definable Groups of Files
CN104699688A (en) File searching method and electronic device
CN104424219A (en) Method and equipment of managing data documents
CN102609531B (en) Method for pegging files according to keywords
CN110352410A (en) Track the access module and preextraction index node of index node
JP2007287147A (en) Fast file attribute search
US10311021B1 (en) Systems and methods for indexing backup file metadata
EP3343395B1 (en) Data storage method and apparatus for mobile terminal
KR20130053152A (en) Method of file management based on tag and system of the same
CN107621924A (en) A kind of method and apparatus based on high in the clouds cleaning solid state hard disc data
CN104182479A (en) Method and device for processing information

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20150610