CN106909542A - The method and device of information erasing is carried out on the terminal device - Google Patents

The method and device of information erasing is carried out on the terminal device Download PDF

Info

Publication number
CN106909542A
CN106909542A CN201510970917.9A CN201510970917A CN106909542A CN 106909542 A CN106909542 A CN 106909542A CN 201510970917 A CN201510970917 A CN 201510970917A CN 106909542 A CN106909542 A CN 106909542A
Authority
CN
China
Prior art keywords
block
data
erased
file system
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.)
Pending
Application number
CN201510970917.9A
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.)
Beijing Qihoo Technology Co Ltd
Qizhi Software Beijing Co Ltd
Original Assignee
Beijing Qihoo Technology Co Ltd
Qizhi Software Beijing Co 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 Beijing Qihoo Technology Co Ltd, Qizhi Software Beijing Co Ltd filed Critical Beijing Qihoo Technology Co Ltd
Priority to CN201510970917.9A priority Critical patent/CN106909542A/en
Publication of CN106909542A publication Critical patent/CN106909542A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/16File or folder operations, e.g. details of user interfaces specifically adapted to file systems
    • G06F16/162Delete operations

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention provides the method and device for carrying out information erasing on the terminal device, the method includes:Receive deletion instruction of the user to data to be erased;Search the store path of data to be erased, and according to the store path of data to be erased, judge data to be erased whether be EXT file system data;When data of the data to be erased for EXT file system, the scanning strategy of matching is performed on the store path of data to be erased, to position the storage region of data to be erased, the data in storage region are deleted.When realizing cleaning data to be erased operational efficiency is improve without scan full hard disk, operand during reduction cleaning.

Description

The method and device of information erasing is carried out on the terminal device
Technical field
The present invention relates to file clean-up technical field, row information wiping is more particularly to entered on the terminal device The method and device removed.
Background technology
Hardware storage device can all cause certain infringement when read-write operation is performed to it:Read-write time Number is fewer, and reading-writing life-span is more long.The read-write operation of infringement hardware store structure is performed to reduce, Perform file deletion action when and it is non-immediate file wipe from hardware storage device, but needs Made marks on deleted file, be can determine that when the mark is read the file for being made marks by Delete.
However, these are made marks and not by the file of complete deletion so that equipment reaction compares one in one day It is slow.To find out its cause, being that the remaining garbage files of equipment are more and more.On the other hand, these Only made marks and can again not recovered based on file access pattern method by the file of complete deletion, it is right Personally for, if malicious user is not carried out extensive to only being made marks by the file of complete deletion Multiple, these files may store personal photo, message registration, the short message record of other users, so The leakage of the individual privacy of other users can be caused, and the personal property of other users can be endangered even Personal personal safety;For collective, if malicious user is not deleted thoroughly to only being made marks The file for removing is recovered, these files may store the trade secret of company even with national security Related secret, such that Company Confidential is exposed so as to endanger the commercial interest of company, can also make The science and technology related to national security, strategic plan is obtained to expose so as to endanger the peace of the country and people Entirely.
At present, complete deletion these made marks and not by the scheme of the file of complete deletion in, lead to It is often to be realized by artificial operation.When the need for there are substantial amounts by the file of complete deletion, people Work operation will be unable to meet so huge demand, also, due to needing by the file of complete deletion not Together, artificial operation causes artificial behaviour to needing mistake easily occur by the identification of the file of complete deletion That makees is time-consuming more, and accuracy rate reduction, storage medium reading-writing life-span reduction, cost increases.
Further, since the ability of the execution task of storage device is poor, the reading speed of storage organization Also slow, if performing a scan full hard disk on a storage device, speed can be slow, has performed institute The time for having file deletion action to need is long, causes cleaning efficiency low.
The content of the invention
In view of the above problems, the present invention proposes and overcomes above mentioned problem or solve at least in part above-mentioned The method and device for carrying out information erasing on the terminal device of problem.
According to an aspect of the invention, there is provided a kind of side for carrying out information erasing on the terminal device Method, comprises the following steps:
Receive deletion instruction of the user to data to be erased;
The store path of the data to be erased is searched, and according to the storage road of the data to be erased Footpath, judge the data to be erased whether be EXT file system data;
When data of the data to be erased for EXT file system, in the data to be erased The scanning strategy of matching is performed on store path, it is right to position the storage region of the data to be erased Data in the storage region are deleted.
Alternatively, when data of the data to be erased for EXT file system, wherein, work as institute When stating the data that data to be erased are EXT file system, in the store path of the data to be erased It is upper perform matching scanning strategy, to position the storage region of the data to be erased, specifically include with Lower step:
Default first kind mark is extracted according to the EXT file system;
Each block group block group is extracted from the EXT file system;
The data block for having and mark being not used is extracted for currently processed block group block group block;
Specified location in the data block block reads Second Type mark;
When first kind mark is identical with the Second Type mark, the data block is read Other data in block;
When described other data include end mark, continuous one or more data for reading are judged Whether the data in block block have complete fileinfo;
When with complete fileinfo, the data block block is depositing for the data to be erased Storage area domain.
Alternatively, the method also includes:
When first kind mark is differed with Second Type mark, then have next The specified location being not used in the data block block of mark reads Second Type mark.
Preferably, the default first kind mark is generated in the following manner:
Determine corresponding data structure according to the EXT file system;
The coded string of specified format is searched in the data structure;
The coded string is extracted to be identified as the default first kind.
Preferably, the currently processed block group block group include block table of comparisons block Bitmap, the unused mark includes that list item value is zero, wherein, it is described for currently processed area Block group block group extract the step of having the data block block that mark is not used to be included:
Read block table of comparisons block bitmap;
List item value is zero corresponding data block block in recording the block table of comparisons block bitmap Number;
Using the corresponding data block block of the number retention.
Alternatively, the currently processed block group block group include the information node table of comparisons Inode bitmap, it is described extract to have for currently processed block group block group do not make After the step of with the data block block for marking, the method also includes:
Each list item value is zero in the block table of comparisons block bitmap are found, and described information When each list item value is zero in node table of comparisons inode bitmap, the block table of comparisons block is read The minimum data block block of number in bitmap;
Initial data in the first data block block is read using the number;
If the initial data is zero, the currently processed block group block group are skipped, Process next block group block group.
Alternatively, if the data storage to be erased is in the data block block of discontinuous number, The block group block group include information node form inode table, described for current The block group block group for the treatment of extract the step of having the data block block that mark is not used Afterwards, the method also includes:
List item value is zero corresponding information node in reading described information node table of comparisons inode bitmap The number of inode;
According to the number residual risk, the residual are extracted from information node form inode table Information include being stored with the data to be erased data block block number;
When the data block block with unused mark has the number, perform described The step of specified location reading Second Type in data block block is identified.
Preferably, the data to be erased include do not deleted thoroughly photo, short message, address list, Message registration, chat record, recording and video.
According to another aspect of the present invention, there is provided a kind of to carry out information erasing on the terminal device Device, including:
Receiver module, for receiving deletion instruction of the user to data to be erased;
Searching modul, the store path for searching the data to be erased, and wait to wipe according to described Except the store path of data, judge the data to be erased whether be EXT file system data;
Erasing module, for when the data to be erased for EXT file system data when, in institute The scanning strategy of matching is performed on the store path for stating data to be erased, to position the data to be erased Storage region, the data in the storage region are deleted.
Preferably, the erasing module is specifically included:
First kind marker extraction submodule, for extracting default according to the EXT file system The first kind is identified;
Block group extracting sub-module, for extracting each block from the EXT file system Group block group;
Data block extracting sub-module, for being extracted for currently processed block group block group Data block block with unused mark;
Second Type identifies reading submodule, reads for the specified location in the data block block Take Second Type mark;
Other digital independent submodules, for being identified when first kind mark and the Second Type When identical, other data in the data block block are read;
Fileinfo judging submodule, for when described other data include end mark, judging Whether the data in continuous one or more data blocks block for reading have complete fileinfo;
Zone location submodule, for when with complete fileinfo, the data block block It is the storage region of the data to be erased.
Preferably, the erasing module includes:
Next Second Type identifies reading submodule, for when first kind mark and described second It is when type identification is differed, then specified in next data block block with unused mark Read Second Type mark in position.
Alternatively, the device also includes:
Data structure determining module, for determining corresponding data knot according to the EXT file system Structure;
Coded string searching modul, the coded word for searching specified format in the data structure Symbol string;
First kind marker extraction module, for extracting the coded string as the default first kind Type is identified.
Preferably, the currently processed block group block group include block table of comparisons block Bitmap, the unused mark includes that list item value is zero, and the data block extracting sub-module includes:
Block table of comparisons reading unit, for reading block table of comparisons block bitmap;
Data block block number record units, for recording the block table of comparisons block bitmap Middle list item value is the number of zero corresponding data block block;
Data block block extraction units, for using the corresponding data block block of the number retention.
Alternatively, the currently processed block group block group include the information node table of comparisons Inode bitmap, the device also includes:
Minimum data block block read modules, for for currently processed block group block Group is extracted to have and is not used after the data block block of mark, when the discovery block table of comparisons Each list item value is zero in block bitmap, and in described information node table of comparisons inode bitmap When each list item value is zero, the data of number minimum in the block table of comparisons block bitmap are read Block block;
Initial data read module, for using in the number reading first data block block Initial data;
Next block group processing module, if being zero for the initial data, skips described current The block group block group for the treatment of, process next block group block group.
Alternatively, if the data storage to be erased is in the data block block of discontinuous number, The block group block group include information node form inode table, and described device is also wrapped Include:
Node number read module, for being carried for currently processed block group block group Take with being not used after the data block block of mark, read described information node table of comparisons inode List item value is the number of zero corresponding information node inode in bitmap;
Residual risk extraction module, for according to the number from information node form inode table Extract residual risk, the residual risk includes being stored with the data block of the data to be erased The number of block;
Step jump module, for working as the data block block with unused mark with described During number, the step of performing specified location in the data block block and read Second Type and identify.
Preferably, the data to be erased include do not deleted thoroughly photo, short message, address list, Message registration, chat record, recording and video.
According to such scheme disclosed by the invention, first, receive deletion of the user to data to be erased and refer to Order;Then, the store path of data to be erased is searched, and according to the store path of data to be erased, Judge data to be erased whether be EXT file system data, the storage road according to data to be erased Footpath may determine that data to be erased whether be EXT file system data, rather than a pair of file systems System data are searched, and targetedly the data to EXT file system are searched, Ke Yijia The speed of data to be erased is searched soon;When data of the data to be erased for EXT file system, The scanning strategy of matching is performed on the store path of data to be erased, to position the storage of data to be erased Data in storage region are deleted by region, screen out the storage location that need not be cleared up, soon Speed orients the storage location for being possible to the data to be erased with specified format, by data to be erased Match after coming, directly clear up data to be erased.Need not be swept totally when realizing cleaning data to be erased Retouch, reduce operand during cleaning, improve operational efficiency.
The additional aspect of the present invention and advantage will be set forth in part in the description, and these will be from following Description in become obvious, or by it is of the invention practice recognize.
Brief description of the drawings
The above-mentioned and/or additional aspect of the present invention and advantage to embodiment from retouching below in conjunction with the accompanying drawings Be will be apparent in stating and be readily appreciated that, wherein:
Fig. 1 is the stream of the method for carrying out information erasing on the terminal device of one embodiment of the invention Journey schematic diagram;
Fig. 2 is the method for carrying out information erasing on the terminal device of a preferred embodiment of the invention Schematic flow sheet;
Fig. 3 is the structural representation for carrying out information erasing on the terminal device of another embodiment of the present invention Figure.
Specific embodiment
Embodiments of the invention are described below in detail, the example of the embodiment is shown in the drawings, its In from start to finish same or similar label represent same or similar element or with same or like The element of function.Embodiment below with reference to Description of Drawings is exemplary, is only used for explaining this Invention, and be not construed as limiting the claims.
Those skilled in the art of the present technique are appreciated that unless expressly stated, singulative used herein " one ", " one ", " described " and " being somebody's turn to do " may also comprise plural form.It is to be further understood that Used in specification of the invention wording " including " refer to the presence of the feature, integer, step, behaviour Make, element and/or component, but it is not excluded that in the presence of or add one or more other features, whole Number, step, operation, element, component and/or their group.It should be understood that when we claim element It is " connected " or during " coupled " to another element, it can be directly connected or coupled to other elements, or Can also there is intermediary element in person.Additionally, " connection " used herein or " coupling " can be included wirelessly Connection or wireless coupling.Wording "and/or" used herein includes one or more associated listing The whole or any cell of item and all combination.
Those skilled in the art of the present technique are appreciated that unless otherwise defined, all terms used herein (including technical term and scientific terminology), with art of the present invention in those of ordinary skill General understanding identical meaning.It should also be understood that those arts defined in such as general dictionary Language, it should be understood that with the meaning that the meaning in the context with prior art is consistent, and remove It is non-as here by specific definitions, will not otherwise be explained with idealization or excessively formal implication.
Fig. 1 is the stream of the method for carrying out information erasing on the terminal device of one embodiment of the invention Journey schematic diagram.
Step S 110:Receive deletion instruction of the user to data to be erased;Step S 120:Lookup is treated The store path of data is wiped, and according to the store path of data to be erased, judges data to be erased Whether be EXT file system data;Step S 130:When data to be erased are EXT file system Data when, the scanning strategy of matching is performed on the store path of data to be erased, wait to wipe to position Except the storage region of data, the data in storage region are deleted.
Step S 110, receives deletion instruction of the user to data to be erased.
For example, receiving the cleaning request that user clicks on the first predetermined interface location.Wherein, in advance The position of the button that the first fixed interface location can be directed to cleaning data to be erased and set.
Step 120, searches the store path of data to be erased, and according to the storage of data to be erased Path, judge data to be erased whether be EXT file system data.
In implementing, data to be erased include do not deleted thoroughly photo, short message, address list, Message registration, chat record, recording, video.
In implementing, by the store path that the file system of different-format in mobile phone has Difference, the form of file system can be uniquely determined according to store path.
By the store path that the file system of different-format in mobile phone has is different, for example, hand The file system of machine fuselage typically EXT file system, EXT file system can include EXT2 file system, EXT3 file system, EXT4 file system etc., EXT file system exists Store path in mobile phone is usually mobile phone root, therefore, when the storage for extracting mobile phone Chinese part During path, you can to determine the form of file system.
For example, when store path is mobile phone root, it is possible to determine that the form of file system is EXT File system;When mobile phone includes the file that store path is mnt/sdcard/external-sd, The form that can be determined that file system is FAT file system.
Step 130, when data of the data to be erased for EXT file system, in data to be erased The scanning strategy of matching is performed on store path, to position the storage region of data to be erased, to storage Data on region are deleted.
In a kind of preferred exemplary of the invention, deleting instruction includes the storage road of data to be erased Footpath, will delete instruction and is sent to clean up process;Clean up process is used for according to the storage road of data to be erased Data to be erased are searched in footpath, and the data to be erased that will be found are returned;
In actual applications, clean up process can perform corresponding cleaning operation according to cleaning request, clearly Reason operation can include searching the data to be erased of EXT file system, and read and write data etc..
After receiving cleaning request, cleaning request can be sent to clean up process, clean up process foundation The store path that cleaning request includes, determines the form of file system, when store path and mobile phone When root is matched, show the form of file system for EXT file system, i.e., what will be cleared up is The data to be erased of the EXT file system in handset memory space, call EXT file system Interface lookup EXT file system data to be erased.
Used as a kind of example of concrete application of the present invention, the data to be erased of EXT file system can be wrapped Include in local storage medium one or more and deleted data, and during each has been deleted data Part or all of data are not by new data cover.Specifically, the number to be erased of EXT file system According to object can include photo, short message, address list, mobile phone application, internet records, software privacy Record etc., software privacy record can be included for example:Chat record, image cache, speech message Record etc..
After the data to be erased of EXT file system are found, the EXT that clean up process will find The data to be erased of file system are returned.
As embodiments of the invention, after receiving the result of cleaning completion of clean up process transmission, can It is illustrated in interface with by the result.
The data block for having and mark being not used is extracted in the file system from EXT of the invention Block, can orient the storage location for being possible to the data to be erased with specified format, with mistake Filter the storage location of unnecessary cleaning.
Identified in conjunction with the default first kind of the invention, the Second Type mark with little data is right Than by Data Matching to be erased out, so as to clear up data to be erased, thus solving to clear up and waiting to wipe Except data need scan full hard disk, cause computing many, speed is slow, and time-consuming, the low problem of efficiency, takes Obtain computing few, speed is fast, take short, the beneficial effect of efficiency high.
As shown in Fig. 2 when data of the data to be erased for EXT file system, in number to be erased According to store path on perform the scanning strategy of matching, to position the step of the storage region of data to be erased It is rapid specifically include step S231, step S232, step S233, step S234, step S235, Step S236 and step S237.
Step S231:Default first kind mark is extracted according to EXT file system;Step S232: Each block group block group is extracted from EXT file system;Step S233:For work as The block group block group of pre-treatment extract the data block block for having and mark being not used;Step S234:Specified location in data block block reads Second Type mark;Step S235:When When institute's first kind mark is identical with Second Type mark, other data in read block block; Step S236:When other data include end mark, continuous one or more for reading are judged Whether the data in data block block have complete fileinfo;Step S237:When with complete During whole fileinfo, data block block is the storage region of data to be erased.
Step S231:Default first kind mark is extracted according to EXT file system.
Wherein, first kind mark can be the coded string of specified format, and coded string can be with It is the part start field of the specified format.
In actual applications, specified format can refer to used data for data storage special Coded system.
Can include that request is searched and deletes the EXT files system for clearance of specified format in cleaning request The data to be erased of system.When the cleaning request for receiving carries treating for EXT file system for clearance When wiping the specified format of data, first private data for clearance of specified format will be searched simultaneously Delete.
It should be noted that the data of same form can use identical coded word in the head of data Symbol string, because the data to be erased of EXT file system are also retained in storage medium in itself, therefore, The coding of respective form can also be remained with the head of the data to be erased of each bar EXT file system Character string.
In a kind of preferred exemplary of the embodiment of the present invention, EXT file system for clearance it is to be erased The specified format of data includes picture format.
In actual applications, the specified format of the data to be erased of EXT file system for clearance is at least Picture format can be included.The data to be erased of the EXT file system of picture format are relatively conventional, Hence, it can be determined that the specified format of the data to be erased of EXT file system for clearance is picture lattice Formula.
It should be noted that the present invention can not only clear up treating for the EXT file system of picture format Erasing data, can also clear up the EXT files of text formatting, compressed package form etc. specified format The data to be erased of system, can extract the default first kind and identify according to specified format, Those skilled in the art can according to actual needs set the number to be erased of the EXT file system of cleaning According to specified format.
In actual applications, the coded string of every kind of form can be fixed, also, form Species is different, coded string is also just different, therefore, when it is determined that EXT file system for clearance During the specified format of data to be erased, the coded string of the specified format namely determination can be used The coded string is identified as the default first kind of the specified format.
Preferably, default first kind mark is generated in the following manner:Step S2311:Foundation EXT file system determines corresponding data structure;Step S2312:Searched in data structure and specified The coded string of form;Step S2313:Coded string is extracted as default first kind mark Know.
Step S2311:Determine corresponding data structure according to EXT file system.
Used as a kind of example of concrete application of the present invention, the data structure of various forms can be fixed in advance Justice is good, it is determined that the title of specified format, you can to find corresponding data structure.
Step S2312:The coded string of specified format is searched in data structure.
Generally, in the file header field that the coded string of specified format can be in data structure, look into Find the file header in data structure, you can to find the coded string of specified format.
Step S2313:Coded string is extracted to be identified as the default first kind.
In a particular application, after finding the coded string of specified format, the code character can be extracted String is identified as the default first kind.
The generating mode of first kind mark of the invention, in the data structure of known specified format On the premise of, the data of all specified formats can be cleared up, thus solve cleaning EXT The data to be erased of file system need scan full hard disk, cause computing many, and speed is slow, and time-consuming, effect The low problem of rate, it is few to achieve computing, and speed is fast, takes short, the beneficial effect of efficiency high.
Step S232, extracts each block group block group from EXT file system.
In implementing, the operation of file system is relevant with the file data of operating system, newer The file data of operating system usually contains very many attributes, for example in addition to file actual content The file permission (read-only, read-write etc.) of (SuSE) Linux OS and file attribute (owner, group, when Between parameter etc.), the data of this two part would generally be respectively stored in different areas by EXT file system Block, authority is placed into inode (information node, information node) with attribute, as reality Data are then placed into data block (data block).In addition, also one superblock is (super Level block) can record the Global Information of whole file system, including inode and block (data block) Total amount, usage amount, surplus etc..
Because each inode and block have number, and each file can take an inode, Then there are the block numbers that file data is placed in inode.If it is possible to find this document Inode, then, it is possible to know that this file places the block numbers of data, also can just read Go out the real data of this document.When file system is up to several GB, then by all of inode with It will be the very not decision of intelligence that block puts together all, because the quantity of inode and block is too It is huge, it is not easy to manage.
Therefore, EXT file system is substantially to divide into multiple block groups when formatting (block group's), there are independent inode/block/superblock systems in each block group.
File system Description (file system descriptor explanation) can describe each block group Beginning and the block numbers for terminating, and illustrate the superblock in the block group, Block bitmap (the block table of comparisons), inode bitmap (the information node table of comparisons), inode table (letter Breath node form), the particular location of data block, particular location can distinguish two block of number Between, it is also possible on the block of certain number.
Generally, File system Description can be in No. 1 block.
Step S233, extracts to have to be not used and marks for currently processed block group block group The data block block of note.
In actual applications, can respectively to the block group treatment of each block group, by Need to use block in the storage of file, one file of placement is at most merely able in each block Data, therefore, need that mark is not used to empty block additions in EXT file system, for new File store when use.Likewise, when some files are deleted, what these files took originally Block numbers will be discharged, and now the mark of the block numbers will be revised as being not used.
Therefore, it can that will there is the data block that mark is not used to extract.
In a kind of preferred exemplary of the embodiment of the present invention, currently processed block group block group Including block table of comparisons block bitmap, mark is not used includes that list item value is zero, wherein, for Currently processed block group block group are extracted has the unused data block block's for marking Step can specifically include step S2331, step S2332 and step S2333:Step S2331, Read block table of comparisons block bitmap;Step S2332, the record block table of comparisons block bitmap Middle list item value is the number of zero corresponding data block block;Step S2333, using number retention pair The data block block for answering.
Step S2331, reads block table of comparisons block bitmap.
Used as a kind of example of concrete application of the present invention, the position of block table of comparisons block bitmap can To be read out in being illustrated in file system descriptor, this is have recorded in block table of comparisons block bitmap The service condition of block in block, the block for having used is labeled as 1, untapped block marks It is designated as 0.
List item value is zero corresponding data in step S2332, the record block table of comparisons block bitmap The number of block block.
In actual applications, block table of comparisons block bitmap can be recorded respectively in the form of form The service condition of individual block, can respectively record the number of each block, and this number in list item The service condition of the corresponding block of code.With 0 or 1 mark service condition, 0 can be as not making With mark represent block be not used, 1 can as using mark represent block used.
The number record that list item value is 0 corresponding data block block is got off.
Step S2333, using the corresponding data block block of number retention.
In implementing, data can be navigated to using the number of the data block block for recording In block on corresponding data block block, data block block is extracted.
Alternatively, currently processed block group block group include information node table of comparisons inode Bitmap, has the unused number for marking being extracted for currently processed block group block group After the step of according to block block, the method also includes:
Each list item value is zero in block table of comparisons block bitmap are found, and information node is compareed When each list item value is zero in table inode bitmap, block table of comparisons block bitmap medium sizes are read The minimum data block block of code;
Initial data in first data block block is read using number;
If initial data is zero, currently processed block group block group are skipped, processed next Individual block group block group.
Used as a kind of example of embodiment of the present invention concrete application, the storage of EXT file system can be What the order according to block group was carried out, preferentially can be deposited using the block group being arranged in front Storage, next block group is just used when the memory space of the block group is used up, original Data block in block group all has unused mark, therefore, if may determine that currently processed Block group was not used, then can skip this currently processed block group, and EXT is searched to reduce The time of the data to be erased of file system.
Specifically, each list item value is zero in block table of comparisons block bitmap are detected, i.e., When data block block is respectively provided with and mark is not used in currently processed block group, there are two kinds of situations can With this phenomenon of correspondence, one kind be the block group from being not used, one kind is that the block group uses Cross, but the data of storage are all deleted.
At this point it is possible to information node table of comparisons inode bitmap are read, if the information node table of comparisons Each list item value is zero in inode bitmap, i.e. inode is also respectively provided with unused mark, then can be with More determine block group or from being not used, or used, but the data quilt of storage All delete.
The data block block of number minimum in block table of comparisons block bitmap is read, if the data Block block initial datas are 0, then can be determined that the block, from being not used, is skipped by the block group Group, directly processes next block group.
Each list item value in block table of comparisons block bitmap are found of the invention is zero, and When each list item value is zero in information node table of comparisons inode bitmap, the block table of comparisons is read The minimum data block block of number, can fast skip from original area in block bitmap Block group, thus solve in original block group clear up EXT file system wait wipe , it is necessary to scan the problem of all data block block with unused mark during except data, achieve The cleaning degree of accuracy is high while reading little data, and speed is fast, and computing is few, time-consuming short, efficiency high Beneficial effect.
Step S234, the specified location in data block block reads Second Type mark.
In actual applications, specified location can be identified in data structure with the default first kind Position it is identical.That is original position and default first kind mark of the specified location in data block block Know that original position in data structure is identical, specified location data block block end position with End position of the default first kind mark in data structure is identical.
After data block block with unused mark is extracted, can be from data block block Original position starts to read and default first kind data of the mark with identical length, used as the Two type identifications.
Step S235, when first kind mark is identical with Second Type mark, read block block In other data.
In actual applications, after reading out Second Type mark, by Second Type mark and default the One type identification is contrasted, if Second Type mark is identical with first kind mark, shows the data block There may be the data to be erased of EXT file system in block, also, in data block block The form of the data to be erased of EXT file system is identical with specified format, by data block block Other digital independents out.
In a kind of preferred exemplary of the embodiment of the present invention, when first kind mark and Second Type mark When differing, then the specified location in next data block block with unused mark reads Second Type is identified.
In implementing, the Second Type mark for reading out is differed with default first kind mark Two kinds of situations can be included, the first situation is that the Second Type for reading out is designated zero, shows the number According to the data to be erased for not having EXT file system in block block;Second situation reads out Second Type mark is not zero, and shows to have in data block block its that differ with specified format The data of his form.Therefore, it can when finding that first kind mark is differed with Second Type mark, Data block block can be directly skipped, next data block block with unused mark is read, Specified location in data block block reads Second Type mark.
It is of the invention when find the first kind mark with Second Type mark differ when, then read Specified location in next data block block with unused mark reads Second Type mark, Can quick depositing from the data to be erased for being possible to the EXT file system with specified format During storage space is put, the storage of the data to be erased of the EXT file system without specified format is screened out Position.Thus solving the data to be erased of cleaning EXT file system needs scanning with unused The problem of all data in the data block block of mark, clears up while achieving reading little data The degree of accuracy is high, and speed is fast, and computing is few, takes short, the beneficial effect of efficiency high.
Step S236, when other data include end mark, judge continuous for reading or Whether the data in multiple data block block have complete fileinfo.
As a kind of example of concrete application of the present invention, when the data mistake to be erased of EXT file system When big, one or more block can be taken, at this time, it may be necessary to judge that one or more block are No shared one or more block when being the data storage to be erased of EXT file system, If one or more shared block during the data storage to be erased of EXT file system, The data then continuously read in one or more data blocks block have complete fileinfo, can To be judged to the data to be erased of EXT file system, not treating as EXT file system is otherwise judged Erasing data.
Step S237, if the data in continuous one or more data blocks block for reading have had Whole fileinfo, then be judged to find a data to be erased for EXT file system.
In actual applications, when the data in one or more data blocks block can be combined into completely Fileinfo when, show that data in one or more data blocks block are an EXT text The complete content of the data to be erased of part system, one or more data blocks block that judgement finds In data be a data to be erased for EXT file system.
The data block for having and mark being not used is extracted in the file system from EXT of the invention Block, can orient the data to be erased for being possible to the EXT file system with specified format Storage location, to filter out the storage location of unnecessary cleaning, in conjunction with of the invention default One type identification, contrast is identified with the Second Type of little data, by EXT file system wait wipe Come except data are matched, so as to clear up the data to be erased of EXT file system, thus solve clear The data to be erased for managing EXT file system need scan full hard disk, cause computing many, and speed is slow, consumption Duration, the low problem of efficiency, it is few to achieve computing, and speed is fast, takes short, the beneficial effect of efficiency high Really.
Alternatively, if data storage to be erased is in the data block block of discontinuous number, block Group block group include information node form inode table, for currently processed block After the step of group block group extract the data block block for having and being not used and mark, the party Method also includes:List item value is zero corresponding information section in reading information node table of comparisons inode bitmap The number of point inode;Residual risk is extracted from information node form inode table according to number, Residual risk include being stored with data to be erased data block block number;When with unused When the data block block of mark has number, the specified location performed in data block block reads The step of Second Type is identified.
First, list item value is zero corresponding information section in reading information node table of comparisons inode bitmap The number of point inode.
In implementing, inode bitmap be used for record use with untapped inode number Code, the number of untapped inode can represent the inode of the number from being not used, or should The inode of number was used, and the data file that the inode is indicated has been deleted.
List item value be 0 can as it is unused mark represent the number inode be not used, 1 can Used as the inode for representing the number using mark.
The number that list item value is 0 corresponding information node inode is read out.
Then, residual risk, residual letter are extracted from information node form inode table according to number Breath include being stored with data to be erased data block block number.
In actual applications, residual risk can refer to work as has data to be deleted from EXT file system, Inode using mark by using be revised as be not used when, remain in the letter in inode table Breath.Inode table can be used for recording the content of inode, including record EXT file system The block of the actual storage of data to be erased of the attribute of data to be erased and the EXT file system Number.
When the data storage to be erased of EXT file system is in the data block block of discontinuous number When, can be with each number of the data to be erased of the record storage EXT file system in inode table According to block number and/or record rising for a certain section of data to be erased of the Coutinuous store EXT file system Beginning data block and termination data block.
When the data storage to be erased of EXT file system is in the data block block of consecutive number, Can be with the initial data block of the data to be erased of the record storage EXT file system in inode table With termination data block.
Finally, when the data block block with unused mark has number, perform in data block The step of specified location reading Second Type in block is identified.
As a kind of example of concrete application of the present invention, when the data block with unused mark have it is residual When staying the number in information, then show that one or more data blocks potentially include storage at discontinuous number In the data block block of code, and the data block of the discontinuous number has all found.
List item value is zero correspondence in reading information node table of comparisons inode bitmap of the invention Information node inode number, extract residual from information node form inode table according to number Information is stayed, EXT text of the cleaning storage on the data block block of discontinuous number is thus solved The problem of the data to be erased of part system, the cleaning degree of accuracy is high while achieving reading little data, Speed is fast, and computing is few, takes short, efficiency high, makes the more complete beneficial effect of cleaning.
The data block for having and mark being not used is extracted in the file system from EXT of the invention Block, can orient the data to be erased for being possible to the EXT file system with specified format Storage location, to filter out the storage location of unnecessary cleaning, in conjunction with of the invention default One type identification, contrast is identified with the Second Type of little data, by EXT file system wait wipe Come except data are matched, so as to clear up the data to be erased of EXT file system, thus solve clear The data to be erased for managing EXT file system need scan full hard disk, cause computing many, and speed is slow, consumption Duration, the low problem of efficiency, it is few to achieve computing, and speed is fast, takes short, the beneficial effect of efficiency high Really.
Fig. 3 is the device for carrying out information erasing on the terminal device of another embodiment of the present invention Structural representation.
Receiver module 310 receives deletion instruction of the user to data to be erased;Searching modul 320 is searched The store path of data to be erased, and according to the store path of data to be erased, judge number to be erased According to whether be EXT file system data;Erasing module 330 is EXT files when data to be erased During the data of system, the scanning strategy of matching is performed on the store path of data to be erased, to position Data in storage region are deleted by the storage region of data to be erased.
Receiver module 310 receives deletion instruction of the user to data to be erased.
For example, receiving the cleaning request that user clicks on the first predetermined interface location.Wherein, in advance The position of the button that the first fixed interface location can be directed to cleaning data to be erased and set.
Searching modul 320 searches the store path of data to be erased, and depositing according to data to be erased Storage path, judge data to be erased whether be EXT file system data.
In implementing, data to be erased include do not deleted thoroughly photo, short message, address list, Message registration, chat record, recording, video.
In implementing, by the store path that the file system of different-format in mobile phone has Difference, the form of file system can be uniquely determined according to store path.
By the store path that the file system of different-format in mobile phone has is different, for example, hand The file system of machine fuselage typically EXT file system, EXT file system can include EXT2 file system, EXT3 file system, EXT4 file system etc., EXT file system exists Store path in mobile phone is usually mobile phone root, therefore, when the storage for extracting mobile phone Chinese part During path, you can to determine the form of file system.
For example, when store path is mobile phone root, it is possible to determine that the form of file system is EXT File system;When mobile phone includes the file that store path is mnt/sdcard/external-sd, The form that can be determined that file system is FAT file system.
Module 330 is wiped when data of the data to be erased for EXT file system, in number to be erased According to store path on perform the scanning strategy of matching, it is right to position the storage region of data to be erased Data in storage region are deleted.
In a kind of preferred exemplary of the invention, deleting instruction includes the storage road of data to be erased Footpath, will delete instruction and is sent to clean up process;Clean up process is used for according to the storage road of data to be erased Data to be erased are searched in footpath, and the data to be erased that will be found are returned;
In actual applications, clean up process can perform corresponding cleaning operation according to cleaning request, clearly Reason operation can include searching the data to be erased of EXT file system, and read and write data etc..
After receiving cleaning request, cleaning request can be sent to clean up process, clean up process foundation The store path that cleaning request includes, determines the form of file system, when store path and mobile phone When root is matched, show the form of file system for EXT file system, i.e., what will be cleared up is The data to be erased of the EXT file system in handset memory space, call EXT file system Interface lookup EXT file system data to be erased.
Used as a kind of example of concrete application of the present invention, the data to be erased of EXT file system can be wrapped Include in local storage medium one or more and deleted data, and during each has been deleted data Part or all of data are not by new data cover.Specifically, the number to be erased of EXT file system According to object can include photo, short message, address list, mobile phone application, internet records, software privacy Record etc., software privacy record can be included for example:Chat record, image cache, speech message Record etc..
After the data to be erased of EXT file system are found, the EXT that clean up process will find The data to be erased of file system are returned.
As embodiments of the invention, after receiving the result of cleaning completion of clean up process transmission, can It is illustrated in interface with by the result.
The data block for having and mark being not used is extracted in the file system from EXT of the invention Block, can orient the storage location for being possible to the data to be erased with specified format, with mistake Filter the storage location of unnecessary cleaning.
Identified in conjunction with the default first kind of the invention, the Second Type mark with little data is right Than by Data Matching to be erased out, so as to clear up data to be erased, thus solving to clear up and waiting to wipe Except data need scan full hard disk, cause computing many, speed is slow, and time-consuming, the low problem of efficiency, takes Obtain computing few, speed is fast, take short, the beneficial effect of efficiency high.
Erasing module 330 specifically includes the extraction of first kind marker extraction submodule 331, block group Submodule 332, data block extracting sub-module 333, Second Type mark reading submodule 334, its His digital independent submodule 335, fileinfo judging submodule 336 and zone location submodule 337.
First kind marker extraction submodule 331 extracts the default first kind according to EXT file system Type is identified;Block group extracting sub-module 332 extracts each block group from EXT file system Group block group;Data block extracting sub-module 333 is directed to currently processed block group block Group extracts the data block block for having and mark being not used;Second Type identifies reading submodule 334 Specified location in data block block reads Second Type mark;Other digital independent submodules 335 when institute first kind mark is identical with Second Type mark, its in read block block His data;Fileinfo judging submodule 336 judges to connect when other data include end mark Whether the data in one or more data blocks block for resuming studies out have complete fileinfo;Area Domain positions submodule 337 when with complete fileinfo, and data block block is data to be erased Storage region.
First kind marker extraction submodule 331 extracts the default first kind according to EXT file system Type is identified.
Wherein, first kind mark can be the coded string of specified format, and coded string can be with It is the part start field of the specified format.
In actual applications, specified format can refer to used data for data storage special Coded system.
Can include that request is searched and deletes the EXT files system for clearance of specified format in cleaning request The data to be erased of system.When the cleaning request for receiving carries treating for EXT file system for clearance When wiping the specified format of data, first private data for clearance of specified format will be searched simultaneously Delete.
It should be noted that the data of same form can use identical coded word in the head of data Symbol string, because the data to be erased of EXT file system are also retained in storage medium in itself, therefore, The coding of respective form can also be remained with the head of the data to be erased of each bar EXT file system Character string.
In a kind of preferred exemplary of the embodiment of the present invention, EXT file system for clearance it is to be erased The specified format of data includes picture format.
In actual applications, the specified format of the data to be erased of EXT file system for clearance is at least Picture format can be included.The data to be erased of the EXT file system of picture format are relatively conventional, Hence, it can be determined that the specified format of the data to be erased of EXT file system for clearance is picture lattice Formula.
It should be noted that the present invention can not only clear up treating for the EXT file system of picture format Erasing data, can also clear up the EXT files of text formatting, compressed package form etc. specified format The data to be erased of system, can extract the default first kind and identify according to specified format, Those skilled in the art can according to actual needs set the number to be erased of the EXT file system of cleaning According to specified format.
In actual applications, the coded string of every kind of form can be fixed, also, form Species is different, coded string is also just different, therefore, when it is determined that EXT file system for clearance During the specified format of data to be erased, the coded string of the specified format namely determination can be used The coded string is identified as the default first kind of the specified format.
Preferably, default first kind mark is generated by with lower module:Data structure determining module Determine corresponding data structure according to EXT file system;Coded string searching modul is in data knot The coded string of specified format is searched in structure;First kind marker extraction module extracts coded string Identified as the default first kind.
Data structure determining module determines corresponding data structure according to EXT file system.
Used as a kind of example of concrete application of the present invention, the data structure of various forms can be fixed in advance Justice is good, it is determined that the title of specified format, you can to find corresponding data structure.
Coded string searching modul searches the coded string of specified format in data structure.
Generally, in the file header field that the coded string of specified format can be in data structure, look into Find the file header in data structure, you can to find the coded string of specified format.
First kind marker extraction module is extracted coded string and is identified as the default first kind.
In a particular application, after finding the coded string of specified format, the code character can be extracted String is identified as the default first kind.
The generating mode of first kind mark of the invention, in the data structure of known specified format On the premise of, the data of all specified formats can be cleared up, thus solve cleaning EXT The data to be erased of file system need scan full hard disk, cause computing many, and speed is slow, and time-consuming, effect The low problem of rate, it is few to achieve computing, and speed is fast, takes short, the beneficial effect of efficiency high.
Block group extracting sub-module 332 extracts each block group from EXT file system block group。
In implementing, the operation of file system is relevant with the file data of operating system, newer The file data of operating system usually contains very many attributes, for example in addition to file actual content The file permission (read-only, read-write etc.) of (SuSE) Linux OS and file attribute (owner, group, when Between parameter etc.), the data of this two part would generally be respectively stored in different areas by EXT file system Block, authority is placed into inode (information node, information node) with attribute, as reality Data are then placed into data block (data block).In addition, also one superblock is (super Level block) can record the Global Information of whole file system, including inode and block (data block) Total amount, usage amount, surplus etc..
Because each inode and block have number, and each file can take an inode, Then there are the block numbers that file data is placed in inode.If it is possible to find this document Inode, then, it is possible to know that this file places the block numbers of data, also can just read Go out the real data of this document.When file system is up to several GB, then by all of inode with It will be the very not decision of intelligence that block puts together all, because the quantity of inode and block is too It is huge, it is not easy to manage.
Therefore, EXT file system is substantially to divide into multiple block groups when formatting (block group's), there are independent inode/block/superblock systems in each block group.
File system Description (file system descriptor explanation) can describe each block group Beginning and the block numbers for terminating, and illustrate the superblock in the block group, Block bitmap (the block table of comparisons), inode bitmap (the information node table of comparisons), inode table (letter Breath node form), the particular location of data block, particular location can distinguish two block of number Between, it is also possible on the block of certain number.
Generally, File system Description can be in No. 1 block.
Data block extracting sub-module 333 extracts tool for currently processed block group block group There is the data block block that mark is not used.
In actual applications, can respectively to the block group treatment of each block group, by Need to use block in the storage of file, one file of placement is at most merely able in each block Data, therefore, need that mark is not used to empty block additions in EXT file system, for new File store when use.Likewise, when some files are deleted, what these files took originally Block numbers will be discharged, and now the mark of the block numbers will be revised as being not used.
Therefore, it can that will there is the data block that mark is not used to extract.
In a kind of preferred exemplary of the embodiment of the present invention, currently processed block group block group Including block table of comparisons block bitmap, mark is not used includes that list item value is zero, and data block is extracted Submodule includes block table of comparisons reading unit, data block block number records unit, data block Block extraction units:Block table of comparisons reading unit reads block table of comparisons block bitmap;Number It is zero correspondence according to list item value in block block number record unit record block table of comparisons block bitmap Data block block number;Data block block extraction units use the corresponding data of number retention Block block.
Block table of comparisons reading unit reads block table of comparisons block bitmap.
Used as a kind of example of concrete application of the present invention, the position of block table of comparisons block bitmap can To be read out in being illustrated in file system descriptor, this is have recorded in block table of comparisons block bitmap The service condition of block in block, the block for having used is labeled as 1, untapped block marks It is designated as 0.
List item value is in data block block number record unit record block table of comparisons block bitmap The number of zero corresponding data block block.
In actual applications, block table of comparisons block bitmap can be recorded respectively in the form of form The service condition of individual block, can respectively record the number of each block, and this number in list item The service condition of the corresponding block of code.With 0 or 1 mark service condition, 0 can be as not making With mark represent block be not used, 1 can as using mark represent block used.
The number record that list item value is 0 corresponding data block block is got off.
Data block block extraction units use the corresponding data block block of number retention.
In implementing, data can be navigated to using the number of the data block block for recording In block on corresponding data block block, data block block is extracted.
Alternatively, currently processed block group block group include information node table of comparisons inode Bitmap, the device also include minimum data block block read modules, initial data read module and Next block group processing module:
Minimum data block block read modules each table in block table of comparisons block bitmap are found Entry value is zero, and when each list item value is zero in information node table of comparisons inode bitmap, read area The minimum data block block of number in block table of comparisons block bitmap.
Initial data read module reads the initial data in first data block block using number.
Next block group processing module skips currently processed block group when initial data is zero Block group, process next block group block group.
Used as a kind of example of embodiment of the present invention concrete application, the storage of EXT file system can be What the order according to block group was carried out, preferentially can be deposited using the block group being arranged in front Storage, next block group is just used when the memory space of the block group is used up, original Data block in block group all has unused mark, therefore, if may determine that currently processed Block group was not used, then can skip this currently processed block group, and EXT is searched to reduce The time of the data to be erased of file system.
Specifically, each list item value is zero in block table of comparisons block bitmap are detected, i.e., When data block block is respectively provided with and mark is not used in currently processed block group, there are two kinds of situations can With this phenomenon of correspondence, one kind be the block group from being not used, one kind is that the block group uses Cross, but the data of storage are all deleted.
At this point it is possible to information node table of comparisons inode bitmap are read, if the information node table of comparisons Each list item value is zero in inode bitmap, i.e. inode is also respectively provided with unused mark, then can be with More determine block group or from being not used, or used, but the data quilt of storage All delete.
The data block block of number minimum in block table of comparisons block bitmap is read, if the data Block block initial datas are 0, then can be determined that the block, from being not used, is skipped by the block group Group, directly processes next block group.
Each list item value in block table of comparisons block bitmap are found of the invention is zero, and When each list item value is zero in information node table of comparisons inode bitmap, the block table of comparisons is read The minimum data block block of number, can fast skip from original area in block bitmap Block group, thus solve in original block group clear up EXT file system wait wipe , it is necessary to scan the problem of all data block block with unused mark during except data, achieve The cleaning degree of accuracy is high while reading little data, and speed is fast, and computing is few, time-consuming short, efficiency high Beneficial effect.
Second Type identifies specified location of the reading submodule 334 in data block block and reads second Type identification.
In actual applications, specified location can be identified in data structure with the default first kind Position it is identical.That is original position and default first kind mark of the specified location in data block block Know that original position in data structure is identical, specified location data block block end position with End position of the default first kind mark in data structure is identical.
After data block block with unused mark is extracted, can be from data block block Original position starts to read and default first kind data of the mark with identical length, used as the Two type identifications.
Other digital independent submodules 335 when institute first kind mark is identical with Second Type mark, Other data in read block block.
In actual applications, after reading out Second Type mark, by Second Type mark and default the One type identification is contrasted, if Second Type mark is identical with first kind mark, shows the data block There may be the data to be erased of EXT file system in block, also, in data block block The form of the data to be erased of EXT file system is identical with specified format, by data block block Other digital independents out.
In a kind of preferred exemplary of the embodiment of the present invention, next Second Type mark reading submodule is worked as The first kind is identified when being differed with Second Type mark, in next data with unused mark Specified location in block block reads Second Type mark.
In implementing, the Second Type mark for reading out is differed with default first kind mark Two kinds of situations can be included, the first situation is that the Second Type for reading out is designated zero, shows the number According to the data to be erased for not having EXT file system in block block;Second situation reads out Second Type mark is not zero, and shows to have in data block block its that differ with specified format The data of his form.Therefore, it can when finding that first kind mark is differed with Second Type mark, Data block block can be directly skipped, next data block block with unused mark is read, Specified location in data block block reads Second Type mark.
It is of the invention when find the first kind mark with Second Type mark differ when, then read Specified location in next data block block with unused mark reads Second Type mark, Can quick depositing from the data to be erased for being possible to the EXT file system with specified format During storage space is put, the storage of the data to be erased of the EXT file system without specified format is screened out Position.Thus solving the data to be erased of cleaning EXT file system needs scanning with unused The problem of all data in the data block block of mark, clears up while achieving reading little data The degree of accuracy is high, and speed is fast, and computing is few, takes short, the beneficial effect of efficiency high.
Fileinfo judging submodule 336 judges continuous reading when other data include end mark Whether the data in one or more data blocks block for going out have complete fileinfo.
As a kind of example of concrete application of the present invention, when the data mistake to be erased of EXT file system When big, one or more block can be taken, at this time, it may be necessary to judge that one or more block are No shared one or more block when being the data storage to be erased of EXT file system, If one or more shared block during the data storage to be erased of EXT file system, The data then continuously read in one or more data blocks block have complete fileinfo, can To be judged to the data to be erased of EXT file system, not treating as EXT file system is otherwise judged Erasing data.
When with complete fileinfo, data block block is to wait to wipe to zone location submodule 337 Except the storage region of data.
In actual applications, when the data in one or more data blocks block can be combined into completely Fileinfo when, show that data in one or more data blocks block are an EXT text The complete content of the data to be erased of part system, one or more data blocks block that judgement finds In data be a data to be erased for EXT file system.
The data block for having and mark being not used is extracted in the file system from EXT of the invention Block, can orient the data to be erased for being possible to the EXT file system with specified format Storage location, to filter out the storage location of unnecessary cleaning, in conjunction with of the invention default One type identification, contrast is identified with the Second Type of little data, by EXT file system wait wipe Come except data are matched, so as to clear up the data to be erased of EXT file system, thus solve clear The data to be erased for managing EXT file system need scan full hard disk, cause computing many, and speed is slow, consumption Duration, the low problem of efficiency, it is few to achieve computing, and speed is fast, takes short, the beneficial effect of efficiency high Really.
Alternatively, if data storage to be erased is in the data block block of discontinuous number, block Group block group include information node form inode table, for currently processed block Group block group extract the data block block for having and mark being not used, and the device also includes node Number read module, residual risk extraction module and step jump module:Node number read module is read List item value is zero corresponding information node inode in taking information node table of comparisons inode bitmap Number;Residual risk extraction module extracts residual according to number from information node form inode table Information, residual risk include being stored with data to be erased data block block number;Step is jumped Revolving die block is performed in data block block when the data block block with unused mark has number In specified location read Second Type the step of identify.
List item value is zero during node number read module reads information node table of comparisons inode bitmap The number of corresponding information node inode.
In implementing, inode bitmap be used for record use with untapped inode number Code, the number of untapped inode can represent the inode of the number from being not used, or should The inode of number was used, and the data file that the inode is indicated has been deleted.
List item value be 0 can as it is unused mark represent the number inode be not used, 1 can Used as the inode for representing the number using mark.
The number that list item value is 0 corresponding information node inode is read out.
Residual risk extraction module extracts residual according to number from information node form inode table Information, residual risk include being stored with data to be erased data block block number.
In actual applications, residual risk can refer to work as has data to be deleted from EXT file system, Inode using mark by using be revised as be not used when, remain in the letter in inode table Breath.Inode table can be used for recording the content of inode, including record EXT file system The block of the actual storage of data to be erased of the attribute of data to be erased and the EXT file system Number.
When the data storage to be erased of EXT file system is in the data block block of discontinuous number When, can be with each number of the data to be erased of the record storage EXT file system in inode table According to block number and/or record rising for a certain section of data to be erased of the Coutinuous store EXT file system Beginning data block and termination data block.
When the data storage to be erased of EXT file system is in the data block block of consecutive number, Can be with the initial data block of the data to be erased of the record storage EXT file system in inode table With termination data block.
Step jump module is performed when the data block block with unused mark has number The step of specified location reading Second Type in data block block is identified.
As a kind of example of concrete application of the present invention, when the data block with unused mark have it is residual When staying the number in information, then show that one or more data blocks potentially include storage at discontinuous number In the data block block of code, and the data block of the discontinuous number has all found.
List item value is zero correspondence in reading information node table of comparisons inode bitmap of the invention Information node inode number, extract residual from information node form inode table according to number Information is stayed, EXT text of the cleaning storage on the data block block of discontinuous number is thus solved The problem of the data to be erased of part system, the cleaning degree of accuracy is high while achieving reading little data, Speed is fast, and computing is few, takes short, efficiency high, makes the more complete beneficial effect of cleaning.
The data block for having and mark being not used is extracted in the file system from EXT of the invention Block, can orient the data to be erased for being possible to the EXT file system with specified format Storage location, to filter out the storage location of unnecessary cleaning, in conjunction with of the invention default One type identification, contrast is identified with the Second Type of little data, by EXT file system wait wipe Come except data are matched, so as to clear up the data to be erased of EXT file system, thus solve clear The data to be erased for managing EXT file system need scan full hard disk, cause computing many, and speed is slow, consumption Duration, the low problem of efficiency, it is few to achieve computing, and speed is fast, takes short, the beneficial effect of efficiency high Really.
Those skilled in the art of the present technique are appreciated that the present invention includes being related to for performing institute in the application The equipment for stating one or more in operation.These equipment can be for needed for purpose and specially design and Manufacture, or the known device in all-purpose computer can also be included.These equipment have storage at it Interior computer program, these computer programs are optionally activated or reconstructed.Such computer journey Sequence can be stored in equipment (for example, computer) computer-readable recording medium or store and be suitable to storage electricity Sub-instructions are simultaneously coupled in any kind of medium of bus respectively, and the computer-readable medium includes But be not limited to any kind of disk (including floppy disk, hard disk, CD, CD-ROM and magneto-optic disk), ROM (Read-Only Memory, read-only storage), RAM (Random Access Memory, Memory immediately), (Erasable Programmable Read-Only Memory, can for EPROM Erasable programmable read only memory), EEPROM (Electrically Erasable Programmable Read-Only Memory, EEPROM), flash memory, magnetic card or light Card.It is, computer-readable recording medium includes being deposited in the form of it can read by equipment (for example, computer) Storage or any medium of transmission information.
Those skilled in the art of the present technique are appreciated that can realize that these are tied with computer program instructions Each frame and these structure charts and/or block diagram and/or flow graph in composition and/or block diagram and/or flow graph In frame combination.Those skilled in the art of the present technique are appreciated that can be referred to these computer programs Order is supplied to the processor of all-purpose computer, special purpose computer or other programmable data processing methods Realize, so as to perform the present invention by the processor of computer or other programmable data processing methods The scheme specified in the frame or multiple frames of disclosed structure chart and/or block diagram and/or flow graph.
Those skilled in the art of the present technique are appreciated that various operations, the side discussed in the present invention Step, measure, scheme in method, flow can be replaced, changed, combined or deleted.Further Ground, with other steps in various operations, method, the flow discussed in the present invention, arranges Apply, scheme can also be replaced, changed, reset, decompose, combines or be deleted.Further, it is existing Have in technology with various operations, method, the flow disclosed in the present invention in step, measure, Scheme can also be replaced, changed, reset, decomposed, combined or be deleted.
The above is only some embodiments of the invention, it is noted that for the art For those of ordinary skill, under the premise without departing from the principles of the invention, some improvement can also be made And retouching, these improvements and modifications also should be regarded as protection scope of the present invention.

Claims (10)

1. a kind of method for carrying out information erasing on the terminal device, it is characterised in that including following Step:
Receive deletion instruction of the user to data to be erased;
The store path of the data to be erased is searched, and according to the storage road of the data to be erased Footpath, judge the data to be erased whether be EXT file system data;
When data of the data to be erased for EXT file system, in the data to be erased The scanning strategy of matching is performed on store path, it is right to position the storage region of the data to be erased Data in the storage region are deleted.
2. method according to claim 1, it is characterised in that when the data to be erased are During the data of EXT file system, wherein, when the data to be erased are the number of EXT file system According to when, the scanning strategy of matching is performed on the store path of the data to be erased, it is described to position The storage region of data to be erased, specifically includes following steps:
Default first kind mark is extracted according to the EXT file system;
Each block group block group is extracted from the EXT file system;
The data block for having and mark being not used is extracted for currently processed block group block group block;
Specified location in the data block block reads Second Type mark;
When first kind mark is identical with the Second Type mark, the data block is read Other data in block;
When described other data include end mark, continuous one or more data for reading are judged Whether the data in block block have complete fileinfo;
When with complete fileinfo, the data block block is depositing for the data to be erased Storage area domain.
3. method according to claim 2, it is characterised in that also include:
When first kind mark is differed with Second Type mark, then have next The specified location being not used in the data block block of mark reads Second Type mark.
4. according to the method in claim 2 or 3, it is characterised in that described default first Type identification is generated in the following manner:
Determine corresponding data structure according to the EXT file system;
The coded string of specified format is searched in the data structure;
The coded string is extracted to be identified as the default first kind.
5. according to the method in claim 2 or 3, it is characterised in that described currently processed Block group block group include block table of comparisons block bitmap, and the unused mark includes List item value is zero, wherein, described extraction for currently processed block group block group has The step of data block block of mark is not used includes:
Read block table of comparisons block bitmap;
List item value is zero corresponding data block block in recording the block table of comparisons block bitmap Number;
Using the corresponding data block block of the number retention.
6. according to the method in claim 2 or 3, it is characterised in that described currently processed Block group block group include information node table of comparisons inode bitmap, described for current The block group block group for the treatment of extract the step of there is the data block block that mark is not used it Afterwards, the method also includes:
Each list item value is zero in the block table of comparisons block bitmap are found, and described information When each list item value is zero in node table of comparisons inode bitmap, the block table of comparisons block is read The minimum data block block of number in bitmap;
Initial data in the first data block block is read using the number;
If the initial data is zero, the currently processed block group block group are skipped, Process next block group block group.
7. according to the method in claim 2 or 3, it is characterised in that if the number to be erased During according to storage in the data block block of discontinuous number, the block group block group include Information node form inode table, carry described for currently processed block group block group After the step of taking the data block block with unused mark, the method also includes:
List item value is zero corresponding information node in reading described information node table of comparisons inode bitmap The number of inode;
According to the number residual risk, the residual are extracted from information node form inode table Information include being stored with the data to be erased data block block number;
When the data block block with unused mark has the number, perform described The step of specified location reading Second Type in data block block is identified.
8. method according to claim 1, it is characterised in that the data to be erased include Photo, short message, address list, message registration, chat record, recording and the video not deleted thoroughly.
9. a kind of device for carrying out information erasing on the terminal device, it is characterised in that including:
Receiver module, for receiving deletion instruction of the user to data to be erased;
Searching modul, the store path for searching the data to be erased, and wait to wipe according to described Except the store path of data, judge the data to be erased whether be EXT file system data;
Erasing module, for when the data to be erased for EXT file system data when, in institute The scanning strategy of matching is performed on the store path for stating data to be erased, to position the data to be erased Storage region, the data in the storage region are deleted.
10. device according to claim 9, it is characterised in that the erasing module is specifically wrapped Include:
First kind marker extraction submodule, for extracting default according to the EXT file system The first kind is identified;
Block group extracting sub-module, for extracting each block from the EXT file system Group block group;
Data block extracting sub-module, for being extracted for currently processed block group block group Data block block with unused mark;
Second Type identifies reading submodule, reads for the specified location in the data block block Take Second Type mark;
Other digital independent submodules, for being identified when first kind mark and the Second Type When identical, other data in the data block block are read;
Fileinfo judging submodule, for when described other data include end mark, judging Whether the data in continuous one or more data blocks block for reading have complete fileinfo;
Zone location submodule, for when with complete fileinfo, the data block block It is the storage region of the data to be erased.
CN201510970917.9A 2015-12-22 2015-12-22 The method and device of information erasing is carried out on the terminal device Pending CN106909542A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510970917.9A CN106909542A (en) 2015-12-22 2015-12-22 The method and device of information erasing is carried out on the terminal device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510970917.9A CN106909542A (en) 2015-12-22 2015-12-22 The method and device of information erasing is carried out on the terminal device

Publications (1)

Publication Number Publication Date
CN106909542A true CN106909542A (en) 2017-06-30

Family

ID=59200672

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510970917.9A Pending CN106909542A (en) 2015-12-22 2015-12-22 The method and device of information erasing is carried out on the terminal device

Country Status (1)

Country Link
CN (1) CN106909542A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110569218A (en) * 2019-08-01 2019-12-13 厦门市美亚柏科信息股份有限公司 offline modification method and device for EXT file system and storage medium
WO2020103493A1 (en) * 2018-11-22 2020-05-28 厦门市美亚柏科信息股份有限公司 Method and system for recovering deleted file based on fat32 file system
CN111933176A (en) * 2020-09-22 2020-11-13 成都启英泰伦科技有限公司 Method and device for positioning voice contents in batches
US11461482B2 (en) 2019-11-15 2022-10-04 Beijing University Of Technology Method for erasing information from electronic scrap based on dual-security mechanism

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104090924A (en) * 2014-06-20 2014-10-08 北京奇虎科技有限公司 Method and device for cleaning up privacy data

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104090924A (en) * 2014-06-20 2014-10-08 北京奇虎科技有限公司 Method and device for cleaning up privacy data

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020103493A1 (en) * 2018-11-22 2020-05-28 厦门市美亚柏科信息股份有限公司 Method and system for recovering deleted file based on fat32 file system
CN110569218A (en) * 2019-08-01 2019-12-13 厦门市美亚柏科信息股份有限公司 offline modification method and device for EXT file system and storage medium
CN110569218B (en) * 2019-08-01 2021-11-23 厦门市美亚柏科信息股份有限公司 Offline modification method and device for EXT file system and storage medium
US11461482B2 (en) 2019-11-15 2022-10-04 Beijing University Of Technology Method for erasing information from electronic scrap based on dual-security mechanism
CN111933176A (en) * 2020-09-22 2020-11-13 成都启英泰伦科技有限公司 Method and device for positioning voice contents in batches

Similar Documents

Publication Publication Date Title
CN107239666B (en) Method and system for desensitizing medical image data
EP2891109B1 (en) A video file encryption and decryption method, device, and mobile terminal
CN106909542A (en) The method and device of information erasing is carried out on the terminal device
CN106934509A (en) Customer information merging method and system
CN106445476B (en) Code change information determination method and device and electronic equipment
CN105159913B (en) Method and device for determining file to be cleaned
CN102694966A (en) Construction method of full-automatic video cataloging system
US20060206498A1 (en) Document information management apparatus, document information management method, and document information management program
CN105740103B (en) A kind of NTFS deletion file access pattern method and apparatus based on daily record
CN104090922B (en) A kind of method and apparatus for clearing up private data
WO2019041442A1 (en) Method and system for structural extraction of figure data, electronic device, and computer readable storage medium
CN104298766B (en) A kind of method of data in removing SQLite databases
CN104331376A (en) Method and device for clearing installation package stored in mobile terminal
CN104090924B (en) The method for cleaning and device of a kind of private data
CN103886028B (en) Method and apparatus from storage device copied files to advertisement machine
CN106909308A (en) The method and device of information erasing is carried out on the terminal device
CN107943849A (en) The search method and device of video file
JP2002024761A (en) Image processing device, image processing method, and storage medium
CN111309683B (en) Method and device for scanning full disk data
CN105718334B (en) Multiple file extraction methods based on feature
JP2008059136A (en) Leaking personal information retrieval system, leaking personal information retrieval method, leaking personal information retrieval device and program
CN111079375A (en) Information sorting method and device, computer storage medium and terminal
CN105718335B (en) Single file extracting method based on feature
CN113157775B (en) Drainage basin case characteristic information mining system and equipment
CN113656622B (en) Background picture screening method and device

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: 20170630

RJ01 Rejection of invention patent application after publication