CN103886059A - Method and device for cleaning up files - Google Patents

Method and device for cleaning up files Download PDF

Info

Publication number
CN103886059A
CN103886059A CN201410099214.9A CN201410099214A CN103886059A CN 103886059 A CN103886059 A CN 103886059A CN 201410099214 A CN201410099214 A CN 201410099214A CN 103886059 A CN103886059 A CN 103886059A
Authority
CN
China
Prior art keywords
file
recorded information
application
information
fileinfo
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
CN201410099214.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.)
Conew Network Technology Beijing Co Ltd
Original Assignee
Conew Network Technology 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 Conew Network Technology Beijing Co Ltd filed Critical Conew Network Technology Beijing Co Ltd
Priority to CN201410099214.9A priority Critical patent/CN103886059A/en
Publication of CN103886059A publication Critical patent/CN103886059A/en
Pending legal-status Critical Current

Links

Images

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 a method and device for cleaning up files. The method for cleaning up the files comprises the steps of obtaining a request for deleting the current application; according to the request, obtaining recording information corresponding to the current application, wherein the recording information comprises files and/or folders related to the current application; according to the recording information, deleting the files and/or the folders related to the current application. According to the method and device for cleaning up the files, the recording information corresponding to the current application is obtained according to the request for deleting the current application, then the files and/or the folders related to the current application are deleted according to the recorded information, therefore, the aim of effectively cleaning storage space is achieved, and normal running of other applications cannot be affected.

Description

The method for cleaning of file and device
Technical field
The present invention relates to field of computer technology, relate in particular to a kind of method for cleaning and device of file.
Background technology
Along with the fast development of mobile terminal technology, mobile terminal (such as mobile phone etc.) is very universal, and the function that mobile terminal provides is also more and more.For example, user can freely install various application (App), has been very general situation and tens App are installed in mobile terminal.
Because the application that can select in current mobile terminal is more and more, user also can often install and delete some application, and these application have produced a large amount of garbage files, be also do not delete the buffer memory of application or deleted application produce file for user's use be all do not have influential, but the storage space taking is very many, and be not easy identification.In addition, in the time of user's insufficient memory, dare not at will clear up again, if cleaning wrong operation that can impact application.
The mode of relevant cleaning file is: first files listed size, and then allow user select whether to clear up, can not really effectively clear up like this storage space.
Summary of the invention
The present invention is intended to solve at least to a certain extent one of technical matters in correlation technique.For this reason, one object of the present invention is to propose a kind of method for cleaning and device with the file of effectively clearing up storage space advantage.
Comprise according to the method for cleaning of the file of the embodiment of the present invention: obtain the request of deleting current application; Obtain the recorded information corresponding with current application according to request, wherein, in recorded information, comprise the file relevant to current application and/or file; And delete file and/or the file relevant to current application according to recorded information.
According to the method for cleaning of the file of the embodiment of the present invention, by according to deleting the request acquisition recorded information corresponding with current application of current application, then delete file and/or the file relevant to current application according to recorded information, reach the object of effectively clearing up storage space, and can not affect the normal operation of other application.
Comprise according to the cleaning plant of the file of the embodiment of the present invention: first obtains module, for obtaining the request of deleting current application; Second obtains module, for obtaining the recorded information corresponding with current application according to request, wherein, comprises the file relevant to current application and/or file in recorded information; And cleaning module, for deleting file and/or the file relevant to current application according to recorded information.
According to the cleaning plant of the file of the embodiment of the present invention, obtain the request of deleting current application by the first acquisition module, obtain the recorded information corresponding with above-mentioned current application by the second acquisition module according to above-mentioned request, delete file and/or the file relevant to above-mentioned current application by cleaning module according to above-mentioned recorded information, thereby can effectively clear up storage space, and can not affect the normal operation of other application.
Comprise housing, processor, storer, circuit board and power circuit according to the mobile terminal of the embodiment of the present invention, wherein, circuit board is placed in the interior volume that housing surrounds, and processor and storer are arranged on circuit board; Power circuit, is used to each circuit or the device power supply of mobile terminal; Storer is for stores executable programs code; Processor moves the program corresponding with executable program code by the executable program code of storing in read memory, for carrying out following steps:
Obtain the request of deleting current application;
Obtain the recorded information corresponding with current application according to request, wherein, in recorded information, comprise the file relevant to current application and/or file; And
Delete file and/or the file relevant to current application according to recorded information.
According to the mobile terminal of the embodiment of the present invention, by according to deleting the request acquisition recorded information corresponding with current application of current application, then delete file and/or the file relevant to current application according to recorded information, reach the object of effectively clearing up storage space, and can not affect the normal operation of other application.
Accompanying drawing explanation
Fig. 1 is the process flow diagram of the method for cleaning of file according to an embodiment of the invention.
Fig. 2 is the process flow diagram of the method for cleaning of file in accordance with another embodiment of the present invention.
Fig. 3 is the structural representation of the cleaning plant of file according to an embodiment of the invention.
Fig. 4 is the structural representation of the cleaning plant of file in accordance with another embodiment of the present invention.
Embodiment
Describe embodiments of the invention below in detail, the example of described embodiment is shown in the drawings, and wherein same or similar label represents same or similar element or has the element of identical or similar functions from start to finish.Be exemplary below by the embodiment being described with reference to the drawings, be intended to for explaining the present invention, and can not be interpreted as limitation of the present invention.
Method for cleaning and the device of the file of the embodiment of the present invention are described below with reference to accompanying drawing.
Fig. 1 is the process flow diagram of the method for cleaning of file according to an embodiment of the invention, and this method for cleaning can be for deleting the file on the equipment such as mobile terminal, computing machine.As shown in Figure 1, the method comprises:
S101, obtains the request of deleting current application.
In the time that user does not need a certain application, can delete this application, in the time that user deletes current application, the terminal device at current application place can obtain the request of deleting current application.
S102, obtains the recorded information corresponding with current application according to request, wherein, comprises the file relevant to current application and/or file in recorded information.
Before S102, the method can also comprise: set up the recorded information corresponding with the each application moving on current terminal device, for example entry; This recorded information or entry can be kept in database, comprise and corresponding relevant file and/or the file applied in this recorded information.
Obtaining after the request of deleting current application, can search database according to this request and obtain the recorded information corresponding with current application, also obtaining file and/or the file relevant to current application.
In addition, in recorded information, apply relevant file and/or file except comprising to corresponding, can also comprise: with corresponding irrelevant file and/or file, discarded record and/or file and unknown file and/or the file applied.
S103, deletes file and/or the file relevant to current application according to recorded information.
When deleting after current application, just can delete file and/or the file relevant to current application according to corresponding recorded information, thereby greatly save the storage space of equipment, and, file and/or the file relevant to current application due to what delete, therefore, can not affect because mistake deletes file the normal operation of other application.
In addition, if also comprise in recorded information: with irrelevant file and/or file, discarded record and/or file and unknown file and/or the file of current application, can after the request that obtains deletion current application, delete these files and/or file, but file and/or file for different attribute can adopt different deletion strategies, for example, for discarded record and/or file, can directly delete; For unknown file and/or file, can first back up rear deletion; For with irrelevant file and/or the file of current application, can inoperation, also can first back up rear deletion, etc.For file and/or the file of needs backup, can be moved to other position, for example, at a newly-built backup (backup) file of safe digital card (SD), in the time that feeling to delete, user really deletes again, when having on using the time of impact, can from backup file folder, recover, therefore, can not impact application.
Further, the method embodiment can also comprise: in the time of the memory space inadequate of current application place system, can show the information of memory space inadequate and delete button, user clicks and deletes after button according to this information, terminal device can be deleted discarded record and/or file automatically, the temporary file of for example cache information and/or file, to save storage space, if now storage space is still not enough, click and delete after some application user, can automatically delete file and/or the file relevant to this application.
Particularly, can determine in the following manner discarded record and/or file: determine when the application sum having moved is identical with the application sum of installing, obtain the fileinfo and/or the folder information that in predetermined amount of time, do not change, determine discarded record and/or file according to the fileinfo not changing and/or the folder information that obtain.Wherein, predetermined amount of time refers to from monitoring corresponding application and starts to till obtaining the request of deleting current application, or, start to till showing the information of memory space inadequate of corresponding application place system from monitoring corresponding application.
As can be seen here, adopt the technical scheme of the embodiment of the present invention, for the not enough situation of storage space, can automatically delete discarded record and/or file, and delete again after not needing user manually to search, reduced user's operation, for user offers convenience.
The method for cleaning embodiment of above-mentioned file, by according to deleting the request acquisition recorded information corresponding with current application of current application, then delete file and/or the file relevant to current application according to recorded information, reach the object of effectively clearing up storage space, and can not affect the normal operation of other application.
Fig. 2 is the process flow diagram of the method for cleaning of file in accordance with another embodiment of the present invention, supposes in this embodiment, and this method for cleaning is applied on the mobile phone of Android (android) system.As shown in Figure 2, the method comprises:
S201, all application that monitoring is moving.
In this embodiment, when user has installed after an application, can be in monitor service of running background, this service is registered by AndroidManifest.xml, at thread existing of running background always, in thread, obtain Activity management method by getBaseContext () .getSystemService (ACTIVITY_SERVICE) method, obtain all application that moving by getRunningTasks (1).
S202, obtains each fileinfo and/or folder information that run duration changes that be applied in, and determines file and/or the file relevant to each application according to the fileinfo obtaining and/or folder information.
Suppose, monitored in this embodiment 2 application and moved, suppose that the file relevant to application 1 is file 1, the file relevant to application 2 is file 2,3.
S203, sets up the recorded information corresponding with each application, and recorded information is kept in database.
In this embodiment, can set up a recorded information for each application, for example entry, is then kept at the recorded information of foundation in database.
S204, obtains the identification information of a newly-increased application and the start and end time of operation thereof.
S205, obtains newly-increased fileinfo and/or the folder information that run duration changes that be applied in.
In the time monitoring a newly-increased application, obtain for example title of newly-increased application of identification information of newly-increased application, suppose, the newly-increased QQ program that is applied as obtaining in this embodiment, record the start time of this application operation, in the time that this application is exited, record the post-set time of this application, and immediately file and file are scanned, record the file and/or the file that change, suppose, now having increased two files newly is file 4,5, and variation has also occurred file 2 simultaneously.
S206, is applied in existing recorded information in fileinfo that run duration changes and/or folder information and database according to newly-increased, determines with newly-increased and applies relevant file and/or file and unknown file and/or file.
According to the recorded information of the existing application of preserving in the file changing obtaining in S205 and S203, can determine the file relevant to QQ program and/or file is file 4, file 5, and unknown file folder is file 2.Then produce an entry, be added in database.
In addition, if new entry of adding increases newly, there is no the entry of QQ program before, need so other entries in newly-increased entry and database to contrast, suppose, newly-increased entry is: QQ program, sdcard qq temp; Need to look at whether to contain in other entries sdcard qq temp, if contained in other entries, sdcard qq temp is decided to be to unknown file, this unknown file is likely public documents, may be some public documents or file.
S207, obtains the request of deleting newly-increased application.
In the time that user does not need this newly-increased application examples as QQ program, can delete this newly-increased application.
S208, obtains the recorded information corresponding with newly-increased application according to this request.
Obtaining after the request of deleting QQ program, can search database according to this request and obtain the recorded information corresponding with QQ program, also obtaining file and/or file and unknown file and/or the file relevant to QQ program.
S209, directly deletes file and/or the file relevant to newly-increased application according to recorded information, and deletes after backup unknown file and/or file.
When deleting after QQ program, just can delete file and/or the file relevant to QQ program according to corresponding recorded information, thereby greatly save the storage space of equipment, and, file and/or the file relevant to QQ program due to what directly delete, be first to back up rear deletion for unknown file and/or file, therefore, can not affect because mistake deletes file the normal operation of other application.
The method for cleaning embodiment of above-mentioned file, by according to deleting the request acquisition recorded information corresponding with current application of current application, then delete file and/or the file relevant to current application according to recorded information, reach the object of effectively clearing up storage space, and can not affect the normal operation of other application.
In order to realize above-described embodiment, the present invention also proposes a kind of cleaning plant of file.
Fig. 3 is the structural representation of the cleaning plant of file according to an embodiment of the invention.As shown in Figure 3, this cleaning plant comprises the first acquisition module 31, the second acquisition module 32 and cleaning module 33, wherein:
First obtains module 31 for obtaining the request of deleting current application; Second obtains module 32 for obtaining the recorded information corresponding with above-mentioned current application according to above-mentioned request, wherein, comprises the file relevant to above-mentioned current application and/or file in above-mentioned recorded information; Cleaning module 33 is for deleting file and/or the file relevant to above-mentioned current application according to above-mentioned recorded information.
For the second acquisition module 32 can be obtained and applying corresponding recorded information, this device can also comprise sets up module 30, as shown in Figure 4, this sets up module 30 for before obtaining the recorded information corresponding with above-mentioned current application in above-mentioned the second acquisition module 32 according to above-mentioned request, all application that monitoring is moving, obtain each fileinfo and/or folder information that run duration changes that be applied in, and determine file and/or the file relevant to each application according to the above-mentioned fileinfo obtaining and/or folder information; And the foundation recorded information corresponding with each application.
Above-mentionedly set up module 30 except determining to the relevant file and/or file of application, can also be used for: determine unknown file and/or file according to the above-mentioned fileinfo and/or the folder information that obtain, and increase above-mentioned unknown file and/or file in corresponding recorded information; Also can be for: determine with corresponding and apply irrelevant file and/or file according to the above-mentioned fileinfo obtaining and/or folder information, and in corresponding recorded information, increase above-mentioned irrelevant file and/or file; Also can be for: determine discarded record and/or file, and increase above-mentioned discarded record and/or file in corresponding recorded information.
Wherein, the above-mentioned module 30 of setting up can be determined unknown file and/or file by following two kinds of modes, first kind of way: in the time determining a newly-increased recorded information, content in the content and the existing recorded information that comprise in above-mentioned newly-increased recorded information is contrasted, if existing recorded information and above-mentioned newly-increased recorded information partial content are overlapping, the file comprising in above-mentioned newly-increased recorded information and/or file are defined as to unknown file and/or file; The second way: obtain existing fileinfo and/or the folder information that run duration changes that be applied in; Obtain newly-increased fileinfo and/or the folder information that run duration changes that be applied in; And above-mentioned newly-increased fileinfo that run duration changes and/or the folder information of being applied in is applied in to fileinfo and/or the folder information that run duration changes and contrasts with above-mentioned having, determine above-mentioned unknown file and/or file.
In addition, the above-mentioned module 30 of setting up can be determined discarded record and/or file in the following manner: determine when the application sum having moved is identical with the application sum of installing, obtain the fileinfo and/or the folder information that in predetermined amount of time, do not change, determine discarded record and/or file according to the fileinfo not changing and/or the folder information that obtain.Wherein, above-mentioned predetermined amount of time refers to from monitoring corresponding application and starts to till obtaining the request of above-mentioned deletion current application, or, start to till showing the information of memory space inadequate of corresponding application place system from monitoring corresponding application.
As can be seen here, can comprise file and/or the file of various attributes by setting up recorded information in the database that module 30 sets up, for file and/or the file of different attribute, cleaning module 33 can adopt different deletion strategies, for example, cleaning module 33 can be for: in the time also comprising discarded record and/or file in above-mentioned recorded information, directly delete above-mentioned discarded record and/or file; In the time also comprising unknown file and/or file in above-mentioned recorded information, first back up above-mentioned unknown file and/or file, then delete above-mentioned unknown file and/or file; In the time also comprising the file irrelevant with above-mentioned current application and/or file in above-mentioned recorded information, first back up above-mentioned and above-mentioned current application irrelevant file and/or file, then delete above-mentioned and above-mentioned current application irrelevant file and/or file; Or, to not carrying out deletion action with irrelevant file and/or the file of above-mentioned current application.
In the present embodiment, for file and/or the file of needs backup, can be moved to other position, for example, at a newly-built backup (backup) file of safe digital card (SD), in the time that user feels to delete, really delete again, when having on using the time of impact, can from backup file folder, recover, therefore, can not impact application.
In addition, in the time of the system memory space deficiency of this device, can and delete button in the information of interface display memory space inadequate, user clicks and deletes after button according to this information, first of this device obtains module 31 can obtain the request of clearing up storage space, then deletes above-mentioned discarded record and/or file by cleaning module 33 according to the request of above-mentioned cleaning storage space.As can be seen here, this device embodiment, for the not enough situation of storage space, can automatically delete discarded record and/or file, and delete after not needing user manually to search again, and has reduced user's operation, for user offers convenience.
Said apparatus can be arranged in the equipment such as mobile terminal, computing machine, and its process of carrying out file clean-up can, referring to Fig. 1 and Fig. 2 and corresponding text description thereof, not repeat herein.
The cleaning plant embodiment of above-mentioned file, obtain the request of deleting current application by the first acquisition module, obtain the recorded information corresponding with above-mentioned current application by the second acquisition module according to above-mentioned request, delete file and/or the file relevant to above-mentioned current application by cleaning module according to above-mentioned recorded information, thereby can effectively clear up storage space, and can not affect the normal operation of other application.
In order to realize above-described embodiment, the present invention also proposes a kind of mobile terminal, this mobile terminal comprises housing, processor, storer, circuit board and power circuit, wherein, foregoing circuit plate is placed in the interior volume that above-mentioned housing surrounds, and above-mentioned processor and above-mentioned storer are arranged on foregoing circuit plate; Above-mentioned power circuit, is used to each circuit or the device power supply of above-mentioned mobile terminal; Above-mentioned storer is for stores executable programs code; Above-mentioned processor moves the program corresponding with above-mentioned executable program code by reading the executable program code of storing in above-mentioned storer, for carrying out following steps:
S101 ', obtains the request of deleting current application.
In the time that user does not need a certain application, can delete this application, in the time that user deletes current application, mobile terminal can obtain the request of deleting current application.
S102 ', obtains the recorded information corresponding with current application according to request, wherein, comprises the file relevant to current application and/or file in recorded information.
At S102 ' before, this processor can also be used for carrying out following steps: set up the recorded information corresponding with the each application moving on current terminal device, for example entry; This recorded information or entry can be kept in database, comprise and corresponding relevant file and/or the file applied in this recorded information.
Obtaining after the request of deleting current application, can search database according to this request and obtain the recorded information corresponding with current application, also obtaining file and/or the file relevant to current application.
In addition, in recorded information, apply relevant file and/or file except comprising to corresponding, can also comprise: with corresponding irrelevant file and/or file, discarded record and/or file and unknown file and/or the file applied.
S103 ', deletes file and/or the file relevant to current application according to recorded information.
When deleting after current application, just can delete file and/or the file relevant to current application according to corresponding recorded information, thereby greatly save the storage space of mobile terminal, and, file and/or the file relevant to current application due to what delete, therefore, can not affect because mistake deletes file the normal operation of other application.
In addition, if also comprise in recorded information: with irrelevant file and/or file, discarded record and/or file and unknown file and/or the file of current application, can after the request that obtains deletion current application, delete these files and/or file, but file and/or file for different attribute can adopt different deletion strategies, for example, for discarded record and/or file, can directly delete; For unknown file and/or file, can first back up rear deletion; For with irrelevant file and/or the file of current application, can inoperation, also can first back up rear deletion, etc.For file and/or the file of needs backup, can be moved to other position, for example, at a newly-built backup (backup) file of safe digital card (SD), in the time that feeling to delete, user really deletes again, when having on using the time of impact, can from backup file folder, recover, therefore, can not impact application.
Further, this mobile terminal embodiment can also be used for carrying out following steps: in the time of current system memory space inadequate, can show the information of memory space inadequate and delete button, user clicks and deletes after button according to this information, mobile terminal can be deleted discarded record and/or file automatically, the temporary file of for example cache information and/or file, to save storage space, if now storage space is still not enough, click and delete after some application user, can automatically delete file and/or the file relevant to this application.
Particularly, can determine in the following manner discarded record and/or file: determine when the application sum having moved is identical with the application sum of installing, obtain the fileinfo and/or the folder information that in predetermined amount of time, do not change, determine discarded record and/or file according to the fileinfo not changing and/or the folder information that obtain.Wherein, predetermined amount of time refers to from monitoring corresponding application and starts to till obtaining the request of deleting current application, or, start to till showing the information of memory space inadequate of corresponding application place system from monitoring corresponding application.
As can be seen here, for the not enough situation of storage space, this mobile terminal can be deleted discarded record and/or file automatically, and deletes after not needing user manually to search again, and has reduced user's operation, for user offers convenience.
Above-mentioned mobile terminal embodiment, by according to deleting the request acquisition recorded information corresponding with current application of current application, then delete file and/or the file relevant to current application according to recorded information, reach the object of effectively clearing up storage space, and can not affect the normal operation of other application.
Further, this mobile terminal is also for carrying out following steps:
S201 ', all application that monitoring is moving.
In this embodiment, when user has installed after an application, can be in monitor service of running background, this service is registered by AndroidManifest.xml, at thread existing of running background always, in thread, obtain Activity management method by getBaseContext () .getSystemService (ACTIVITY_SERVICE) method, obtain all application that moving by getRunningTasks (1).
S202 ', obtains each fileinfo and/or folder information that run duration changes that be applied in, and determines file and/or the file relevant to each application according to the fileinfo obtaining and/or folder information.
Suppose, monitored in this embodiment 2 application and moved, suppose that the file relevant to application 1 is file 1, the file relevant to application 2 is file 2,3.
S203 ', sets up the recorded information corresponding with each application, and recorded information is kept in database.
In this embodiment, can set up a recorded information for each application, for example entry, is then kept at the recorded information of foundation in database.
S204 ', obtains the identification information of a newly-increased application and the start and end time of operation thereof.
S205 ', obtains newly-increased fileinfo and/or the folder information that run duration changes that be applied in.
When mobile terminal monitored during to a newly-increased application, obtain for example title of newly-increased application of identification information of newly-increased application, suppose, the newly-increased QQ program that is applied as obtaining in this embodiment, record the start time of this application operation, in the time that this application is exited, record the post-set time of this application, and immediately file and file are scanned, record the file and/or the file that change, suppose, now having increased two files newly is file 4,5, and variation has also occurred file 2 simultaneously.
S206 ', is applied in existing recorded information in fileinfo that run duration changes and/or folder information and database according to newly-increased, determines with newly-increased and applies relevant file and/or file and unknown file and/or file.
According to the recorded information of the existing application of preserving in the file changing obtaining in S205 ' and S203, can determine the file relevant to QQ program and/or file is file 4, file 5, and unknown file folder is file 2.Then produce an entry, be added in database.
In addition, if new entry of adding increases newly, there is no the entry of QQ program before, need so other entries in newly-increased entry and database to contrast, suppose, newly-increased entry is: QQ program, sdcard qq temp; Need to look at whether to contain in other entries sdcard qq temp, if contained in other entries, sdcard qq temp is decided to be to unknown file, this unknown file is likely public documents, may be some public documents or file.
S207 ', obtains the request of deleting newly-increased application.
In the time that user does not need this newly-increased application examples as QQ program, can delete this newly-increased application.
S208 ', obtains the recorded information corresponding with newly-increased application according to this request.
Obtaining after the request of deleting QQ program, can search database according to this request and obtain the recorded information corresponding with QQ program, also obtaining file and/or file and unknown file and/or the file relevant to QQ program.
S209 ', directly deletes file and/or the file relevant to newly-increased application according to recorded information, and deletes after backup unknown file and/or file.
When deleting after QQ program, just can delete file and/or the file relevant to QQ program according to corresponding recorded information, thereby greatly save the storage space of equipment, and, file and/or the file relevant to QQ program due to what directly delete, be first to back up rear deletion for unknown file and/or file, therefore, can not affect because mistake deletes file the normal operation of other application.
Above-mentioned mobile terminal embodiment, by according to deleting the request acquisition recorded information corresponding with current application of current application, then delete file and/or the file relevant to current application according to recorded information, reach the object of effectively clearing up storage space, and can not affect the normal operation of other application.
Any process of otherwise describing in process flow diagram or at this or method are described and can be understood to, represent to comprise that one or more is for realizing module, fragment or the part of code of executable instruction of step of specific logical function or process, and the scope of the preferred embodiment of the present invention comprises other realization, wherein can be not according to order shown or that discuss, comprise according to related function by the mode of basic while or by contrary order, carry out function, this should be understood by embodiments of the invention person of ordinary skill in the field.
The logic and/or the step that in process flow diagram, represent or otherwise describe at this, for example, can be considered to the sequencing list of the executable instruction for realizing logic function, may be embodied in any computer-readable medium, use for instruction execution system, device or equipment (as computer based system, comprise that the system of processor or other can and carry out the system of instruction from instruction execution system, device or equipment instruction fetch), or use in conjunction with these instruction execution systems, device or equipment.With regard to this instructions, " computer-readable medium " can be anyly can comprise, device that storage, communication, propagation or transmission procedure use for instruction execution system, device or equipment or in conjunction with these instruction execution systems, device or equipment.The example more specifically (non-exhaustive list) of computer-readable medium comprises following: the electrical connection section (electronic installation) with one or more wirings, portable computer diskette box (magnetic device), random-access memory (ram), ROM (read-only memory) (ROM), the erasable ROM (read-only memory) (EPROM or flash memory) of editing, fiber device, and portable optic disk ROM (read-only memory) (CDROM).In addition, computer-readable medium can be even paper or other the suitable medium that can print described program thereon, because can be for example by paper or other media be carried out to optical scanning, then edit, decipher or process in electronics mode and obtain described program with other suitable methods if desired, be then stored in computer memory.
Should be appreciated that each several part of the present invention can realize with hardware, software, firmware or their combination.In the above-described embodiment, multiple steps or method can realize with being stored in software or the firmware carried out in storer and by suitable instruction execution system.For example, if realized with hardware, the same in another embodiment, can realize by any one in following technology well known in the art or their combination: there is the discrete logic for data-signal being realized to the logic gates of logic function, there is the special IC of suitable combinational logic gate circuit, programmable gate array (PGA), field programmable gate array (FPGA) etc.
Those skilled in the art are appreciated that realizing all or part of step that above-described embodiment method carries is can carry out the hardware that instruction is relevant by program to complete, described program can be stored in a kind of computer-readable recording medium, this program, in the time carrying out, comprises step of embodiment of the method one or a combination set of.
In addition, the each functional unit in each embodiment of the present invention can be integrated in a processing module, can be also that the independent physics of unit exists, and also can be integrated in a module two or more unit.Above-mentioned integrated module both can adopt the form of hardware to realize, and also can adopt the form of software function module to realize.If described integrated module realizes and during as production marketing independently or use, also can be stored in a computer read/write memory medium using the form of software function module.
The above-mentioned storage medium of mentioning can be ROM (read-only memory), disk or CD etc.
In the description of this instructions, the description of reference term " embodiment ", " some embodiment ", " example ", " concrete example " or " some examples " etc. means to be contained at least one embodiment of the present invention or example in conjunction with specific features, structure, material or the feature of this embodiment or example description.In this manual, the schematic statement of above-mentioned term is not necessarily referred to identical embodiment or example.And specific features, structure, material or the feature of description can be with suitable mode combination in any one or more embodiment or example.
Although illustrated and described embodiments of the invention, those having ordinary skill in the art will appreciate that: in the situation that not departing from principle of the present invention and aim, can carry out multiple variation, modification, replacement and modification to these embodiment, scope of the present invention is by claim and be equal to and limit.

Claims (20)

1. a method for cleaning for file, is characterized in that, comprising:
Obtain the request of deleting current application;
Obtain the recorded information corresponding with described current application according to described request, wherein, in described recorded information, comprise the file relevant to described current application and/or file; And
Delete file and/or the file relevant to described current application according to described recorded information.
2. method according to claim 1, is characterized in that, described obtain the recorded information corresponding with described current application according to described request before, also comprise:
All application that monitoring is moving;
Obtain each fileinfo and/or folder information that run duration changes that be applied in, and determine file and/or the file relevant to each application according to the described fileinfo obtaining and/or folder information; And
Set up the recorded information corresponding with each application.
3. method according to claim 1, is characterized in that, described obtain the recorded information corresponding with described current application according to described request after, also comprise:
In the time also comprising discarded record and/or file in described recorded information, directly delete described discarded record and/or file; And/or
In the time also comprising unknown file and/or file in described recorded information, first back up described unknown file and/or file, then delete described unknown file and/or file; And/or
In the time also comprising the file irrelevant with described current application and/or file in described recorded information, first back up file and/or file described and that described current application is irrelevant, then delete file and/or file described and that described current application is irrelevant; Or, to not carrying out deletion action with irrelevant file and/or the file of described current application.
4. method according to claim 2, is characterized in that, described acquisition is each be applied in the fileinfo and/or folder information that run duration changes after, also comprise:
Determine unknown file and/or file according to the described fileinfo and/or the folder information that obtain, and increase described unknown file and/or file in corresponding recorded information; And/or
Determine file and/or the file irrelevant with corresponding application according to the described fileinfo obtaining and/or folder information, and in corresponding recorded information, increase described irrelevant file and/or file.
5. method according to claim 2, is characterized in that, also comprises:
Determine discarded record and/or file, and increase described discarded record and/or file in corresponding recorded information.
6. method according to claim 4, is characterized in that, described described fileinfo and/or folder information according to acquisition determined unknown file and/or file, comprising:
In the time determining a newly-increased recorded information, content in the content and the existing recorded information that comprise in described newly-increased recorded information is contrasted, if existing recorded information and described newly-increased recorded information partial content are overlapping, the file comprising in described newly-increased recorded information and/or file are defined as to unknown file and/or file.
7. method according to claim 4, it is characterized in that, described acquisition is each is applied in fileinfo and/or the folder information that run duration changes, and determines unknown file and/or file according to the described fileinfo and/or the folder information that obtain, comprising:
Obtain existing fileinfo and/or the folder information that run duration changes that be applied in;
Obtain newly-increased fileinfo and/or the folder information that run duration changes that be applied in; And
Described newly-increased fileinfo that run duration changes and/or the folder information of being applied in is applied in to fileinfo and/or the folder information that run duration changes and contrasts with described having, determine described unknown file and/or file.
8. method according to claim 5, is characterized in that, described definite discarded record and/or file comprise:
Determine when the application sum having moved is identical with the application sum of installing, obtain the fileinfo and/or the folder information that in predetermined amount of time, do not change, determine discarded record and/or file according to the fileinfo not changing and/or the folder information that obtain.
9. method according to claim 8, it is characterized in that, described predetermined amount of time refers to from monitoring corresponding application and starts to till obtaining the request of described deletion current application, or, start the information of the memory space inadequate that extremely shows corresponding application place system from monitoring corresponding application till.
10. method according to claim 9, is characterized in that, also comprises:
After the information of memory space inadequate that shows corresponding application place system, obtain the request of cleaning storage space, delete described discarded record and/or file according to the request of described cleaning storage space.
The cleaning plant of 11. 1 kinds of files, is characterized in that, comprising:
First obtains module, for obtaining the request of deleting current application;
Second obtains module, for obtaining the recorded information corresponding with described current application according to described request, wherein, comprises the file relevant to described current application and/or file in described recorded information; And
Cleaning module, for deleting file and/or the file relevant to described current application according to described recorded information.
12. devices according to claim 11, is characterized in that, also comprise:
Set up module, before obtaining the recorded information corresponding with described current application in described the second acquisition module according to described request, all application that monitoring is moving, obtain each fileinfo and/or folder information that run duration changes that be applied in, and determine file and/or the file relevant to each application according to the described fileinfo obtaining and/or folder information; And the foundation recorded information corresponding with each application.
13. devices according to claim 11, is characterized in that, described cleaning module, also for:
In the time also comprising discarded record and/or file in described recorded information, directly delete described discarded record and/or file; And/or
In the time also comprising unknown file and/or file in described recorded information, first back up described unknown file and/or file, then delete described unknown file and/or file; And/or
In the time also comprising the file irrelevant with described current application and/or file in described recorded information, first back up file and/or file described and that described current application is irrelevant, then delete file and/or file described and that described current application is irrelevant; Or, to not carrying out deletion action with irrelevant file and/or the file of described current application.
14. devices according to claim 12, is characterized in that, the described module of setting up, also for:
Determine unknown file and/or file according to the described fileinfo and/or the folder information that obtain, and increase described unknown file and/or file in corresponding recorded information; And/or
Determine file and/or the file irrelevant with corresponding application according to the described fileinfo obtaining and/or folder information, and in corresponding recorded information, increase described irrelevant file and/or file.
15. devices according to claim 12, is characterized in that, the described module of setting up, also for:
Determine discarded record and/or file, and increase described discarded record and/or file in corresponding recorded information.
16. devices according to claim 14, is characterized in that, the described module of setting up, specifically for:
In the time determining a newly-increased recorded information, content in the content and the existing recorded information that comprise in described newly-increased recorded information is contrasted, if existing recorded information and described newly-increased recorded information partial content are overlapping, the file comprising in described newly-increased recorded information and/or file are defined as to unknown file and/or file.
17. devices according to claim 14, is characterized in that, the described module of setting up, specifically for:
Obtain existing fileinfo and/or the folder information that run duration changes that be applied in;
Obtain newly-increased fileinfo and/or the folder information that run duration changes that be applied in; And
Described newly-increased fileinfo that run duration changes and/or the folder information of being applied in is applied in to fileinfo and/or the folder information that run duration changes and contrasts with described having, determine described unknown file and/or file.
18. devices according to claim 15, is characterized in that, the described module of setting up, specifically for:
Determine when the application sum having moved is identical with the application sum of installing, obtain the fileinfo and/or the folder information that in predetermined amount of time, do not change, determine discarded record and/or file according to the fileinfo not changing and/or the folder information that obtain.
19. devices according to claim 18, it is characterized in that, described predetermined amount of time refers to from monitoring corresponding application and starts to till obtaining the request of described deletion current application, or, start the information of the memory space inadequate that extremely shows corresponding application place system from monitoring corresponding application till.
20. devices according to claim 19, is characterized in that, described first obtains module, also, for after the information of memory space inadequate that shows corresponding application place system, obtain the request of cleaning storage space;
Described cleaning module, also for deleting described discarded record and/or file according to the request of described cleaning storage space.
CN201410099214.9A 2014-03-17 2014-03-17 Method and device for cleaning up files Pending CN103886059A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410099214.9A CN103886059A (en) 2014-03-17 2014-03-17 Method and device for cleaning up files

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410099214.9A CN103886059A (en) 2014-03-17 2014-03-17 Method and device for cleaning up files

Publications (1)

Publication Number Publication Date
CN103886059A true CN103886059A (en) 2014-06-25

Family

ID=50954951

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410099214.9A Pending CN103886059A (en) 2014-03-17 2014-03-17 Method and device for cleaning up files

Country Status (1)

Country Link
CN (1) CN103886059A (en)

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104123199A (en) * 2014-07-03 2014-10-29 可牛网络技术(北京)有限公司 Method and device for recovering application program and mobile terminal
CN104133641A (en) * 2014-07-24 2014-11-05 深圳市同洲电子股份有限公司 External storage equipment file deleting method and device
CN105204739A (en) * 2015-09-22 2015-12-30 小米科技有限责任公司 Item deletion method, device and terminal
CN105446985A (en) * 2014-06-30 2016-03-30 北京金山安全软件有限公司 Cache folder identification method and device
CN105574011A (en) * 2014-10-13 2016-05-11 腾讯科技(深圳)有限公司 Method and device for scanning storage space
CN106294576A (en) * 2016-07-28 2017-01-04 Tcl集团股份有限公司 The method for cleaning of a kind of Android system memory space and system
CN106682026A (en) * 2015-11-09 2017-05-17 北京金山安全软件有限公司 File cleaning method and device and electronic equipment
CN106909632A (en) * 2017-01-23 2017-06-30 努比亚技术有限公司 Garbage files searching method and terminal
CN106991130A (en) * 2017-03-07 2017-07-28 广东欧珀移动通信有限公司 A kind of document handling method, device and intelligent terminal
CN107273433A (en) * 2017-05-22 2017-10-20 努比亚技术有限公司 A kind of file scanning method, equipment and computer-readable recording medium
CN107609071A (en) * 2017-08-31 2018-01-19 深圳天珑无线科技有限公司 A kind of method of file management, mobile terminal and the device with store function
CN108874591A (en) * 2018-06-19 2018-11-23 Oppo广东移动通信有限公司 Document handling method and Related product
CN111984601A (en) * 2020-08-31 2020-11-24 深圳壹账通智能科技有限公司 Log file deleting method and device, electronic equipment and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050114406A1 (en) * 2003-11-26 2005-05-26 Veritas Operating Corporation System and method for detecting and storing file content access information within a file system
CN103577567A (en) * 2013-10-29 2014-02-12 广东欧珀移动通信有限公司 Method for uninstalling application and deleting garbage file in Android system

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050114406A1 (en) * 2003-11-26 2005-05-26 Veritas Operating Corporation System and method for detecting and storing file content access information within a file system
CN103577567A (en) * 2013-10-29 2014-02-12 广东欧珀移动通信有限公司 Method for uninstalling application and deleting garbage file in Android system

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105446985A (en) * 2014-06-30 2016-03-30 北京金山安全软件有限公司 Cache folder identification method and device
CN104123199A (en) * 2014-07-03 2014-10-29 可牛网络技术(北京)有限公司 Method and device for recovering application program and mobile terminal
CN104133641A (en) * 2014-07-24 2014-11-05 深圳市同洲电子股份有限公司 External storage equipment file deleting method and device
CN105574011A (en) * 2014-10-13 2016-05-11 腾讯科技(深圳)有限公司 Method and device for scanning storage space
CN105204739A (en) * 2015-09-22 2015-12-30 小米科技有限责任公司 Item deletion method, device and terminal
CN106682026A (en) * 2015-11-09 2017-05-17 北京金山安全软件有限公司 File cleaning method and device and electronic equipment
CN106294576A (en) * 2016-07-28 2017-01-04 Tcl集团股份有限公司 The method for cleaning of a kind of Android system memory space and system
CN106909632A (en) * 2017-01-23 2017-06-30 努比亚技术有限公司 Garbage files searching method and terminal
CN106991130A (en) * 2017-03-07 2017-07-28 广东欧珀移动通信有限公司 A kind of document handling method, device and intelligent terminal
CN107273433A (en) * 2017-05-22 2017-10-20 努比亚技术有限公司 A kind of file scanning method, equipment and computer-readable recording medium
CN107609071A (en) * 2017-08-31 2018-01-19 深圳天珑无线科技有限公司 A kind of method of file management, mobile terminal and the device with store function
CN108874591A (en) * 2018-06-19 2018-11-23 Oppo广东移动通信有限公司 Document handling method and Related product
CN111984601A (en) * 2020-08-31 2020-11-24 深圳壹账通智能科技有限公司 Log file deleting method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN103886059A (en) Method and device for cleaning up files
CN104156414A (en) Terminal, device and method for clearing junk files
CN103577567A (en) Method for uninstalling application and deleting garbage file in Android system
CN103092938A (en) Method for intelligently cleaning garbage file of secure digital (SD) card of Android mobile phone
CN105676993A (en) Method and device for saving electric quantity and electronic equipment
CN104123199A (en) Method and device for recovering application program and mobile terminal
CN103823813A (en) Method and device for processing history operation records of electronic terminal
WO2016000541A1 (en) Method and device for automatically identifying junk files
CN103677880A (en) Information processing method and electronic equipment
CN103810060A (en) Data backup method and system thereof based on distributed database
CN102591680A (en) Method for automatically deleting and unloading software related files
CN105260438A (en) File management method and electronic device
CN103902562A (en) Method and device for upgrading terminal databases
US20200104054A1 (en) Methods, apparatuses, system and computer program products for managing storage units
CN104216802A (en) Memory database recovery method and device
CN112764663B (en) Space management method, device and system for cloud storage space, electronic equipment and computer readable storage medium
CN104182532A (en) Terminal file cleaning method and device and terminal
CN103713926A (en) Method and system for updating software of client in advance
CN103176920A (en) Nor flash power down protection method and Nor flash power down protection device
CN104077053A (en) Terminal information operating method and device and mobile terminal
US11176089B2 (en) Systems and methods for implementing dynamic file systems
CN111488117B (en) Method, electronic device, and computer-readable medium for managing metadata
CN110851398B (en) Garbage data recovery processing method and device and electronic equipment
CN110058938B (en) Memory processing method and device, electronic equipment and readable medium
CN109542672B (en) Method and apparatus for reclaiming memory blocks in snapshot memory space

Legal Events

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

Application publication date: 20140625

RJ01 Rejection of invention patent application after publication