CN105843853A - Clearing method and apparatus for intelligent device - Google Patents
Clearing method and apparatus for intelligent device Download PDFInfo
- Publication number
- CN105843853A CN105843853A CN201610150783.0A CN201610150783A CN105843853A CN 105843853 A CN105843853 A CN 105843853A CN 201610150783 A CN201610150783 A CN 201610150783A CN 105843853 A CN105843853 A CN 105843853A
- Authority
- CN
- China
- Prior art keywords
- file
- compressed
- clearance
- memory space
- module
- 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
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/10—File systems; File servers
- G06F16/17—Details of further file system functions
- G06F16/174—Redundancy elimination performed by the file system
- G06F16/1744—Redundancy elimination performed by the file system using compression, e.g. sparse files
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/10—File systems; File servers
- G06F16/16—File or folder operations, e.g. details of user interfaces specifically adapted to file systems
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/10—File systems; File servers
- G06F16/17—Details of further file system functions
- G06F16/1727—Details of free space management performed by the file system
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/10—File systems; File servers
- G06F16/17—Details of further file system functions
- G06F16/174—Redundancy elimination performed by the file system
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Databases & Information Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Human Computer Interaction (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Stored Programmes (AREA)
Abstract
The present disclosure relates to a clearing method and apparatus for an intelligent device. The method is applied to a file that occupies a storage space of an intelligent device, and the file is a file corresponding to an application that runs in the intelligent device. The method comprises: acquiring a to-be-cleared file set, wherein the to-be-cleared file set comprises at least one file of which an access frequency is lower than a preset frequency; selecting a to-be-compressed file from the to-be-cleared file set; and performing compression processing on the to-be-compressed file, so as to obtain a compressed file, and replacing the to-be-compressed file with the compressed file. According to the scheme, the storage space of the intelligent device can be effectively saved, and the goal of clearing the device can be achieved.
Description
Technical field
It relates to field of information processing, particularly relate to method for cleaning and the device of a kind of smart machine.
Background technology
Along with the development of information technology, smart machine is the most gradually dissolved among daily life,
User can be expanded by this type of application program with the third party application such as down loading mounting software, game
The function of smart machine.
Generally, application program can take the running memory of smart machine, and application program in running
The intermediate file produced in running may take the memory space of smart machine, so, causes
The free memory of smart machine is fewer and feweri, affects the processing speed of smart machine, needs intelligence
Equipment is cleared up.
Summary of the invention
Present disclose provides method for cleaning and the device of a kind of smart machine.
First aspect according to disclosure embodiment, it is provided that the method for cleaning of a kind of smart machine, described side
Method is applied to take the file of smart machine memory space, and described file is to run in described smart machine
The file that application program is corresponding, including: obtain file set for clearance, described file set bag for clearance
Include at least one access frequency file less than predeterminated frequency;Choose from described file set for clearance and treat
Compressed file;It is compressed described file to be compressed processing, it is thus achieved that compressed file, and utilizes described pressure
Described file to be compressed replaced by contracting file.
Embodiment of the disclosure that the technical scheme of offer can include following beneficial effect: for smart machine
In file for, can be with the access frequency of statistics file, by access frequency less than the file of predeterminated frequency
It is defined as file for clearance, it is thus achieved that file set for clearance;To treating of selecting in file set for clearance
Compressed file is compressed processing, and after obtaining compressed file, preserves compressed file in smart machine, and
Delete corresponding file to be compressed.So scheme, utilizes and takies the compressed file that memory space is less,
Replace and take the file to be compressed that memory space is bigger, can the most effectively save smart machine
Memory space, it is achieved the purpose of disclosure equipment cleaning.
In the first possible embodiment of disclosure embodiment first aspect, described file for clearance
File in set is the inessential file that application program runs.
The technical scheme that the present embodiment provides can include following beneficial effect: generally, smart machine is to literary composition
Part is compressed process, decompression, can take the running memory of smart machine, may affect intelligence
The speed of service of energy equipment.In order to avoid smart machine is when application program launching, carry out unnecessary solution
Compression processes, and can be rejected by the necessary file that application program runs, retain inessential file from set,
So, contribute to saving the equipment running memory that decompression takies.
In conjunction with disclosure embodiment first aspect or the first possible embodiment of first aspect,
In two kinds of possible embodiments, the memory space that the file in described file set for clearance takies is the least
In the first preset value.
The technical scheme that the present embodiment provides can include following beneficial effect: generally, certain at compression ratio
In the case of, if the memory space that file takies is less, then the space also ratio saved after compression is relatively limited,
Therefore, can reject taking the less file of memory space from set, it is bigger that reservation takies memory space
File, be favorably improved the disclosure planning device cleaning efficiency.It is to be appreciated that take storage sky
Between bigger file refer to the memory space that the takies file not less than the first preset value.
In the third possible embodiment of disclosure embodiment first aspect, described from described treat clear
Reason file set in choose file to be compressed, including: by described smart machine to user show described in treat
File in cleaning file set;The file that described user chooses is defined as file to be compressed.
The technical scheme that the present embodiment provides can include following beneficial effect: as a kind of example, permissible
Show the list of file included by file set for clearance to user, user combine the use demand of self,
Therefrom choose file to be compressed.
At the 4th kind of possible embodiment of disclosure embodiment first aspect, described from described for clearance
File set is chosen file to be compressed, including: the file obtained in described file set for clearance takies
Memory space;By the memory space that takies not less than the file of the second preset value, be defined as described in wait to press
Contracting file.
The technical scheme that the present embodiment provides can include following beneficial effect: as a kind of example, permissible
File bigger for the memory space taken is defined as file to be compressed, is favorably improved disclosure equipment clear
The efficiency of reason.
At the 5th kind of possible embodiment of disclosure embodiment first aspect, described from described for clearance
File set is chosen file to be compressed, including: empty according to the access frequency of file and the storage that takies
Between, determine the score value of file;By score value not less than preset score value file, be defined as described in wait to press
Contracting file.
The technical scheme that the present embodiment provides can include following beneficial effect: as a kind of example, permissible
The access frequency of comprehensive file and the memory space taken, determine file to be compressed, is favorably improved this
The efficiency of open equipment cleaning.
At the 6th kind of possible embodiment of disclosure embodiment first aspect, described method also includes:
Judge whether the file that application requests accesses is compressed file;If described application requests
The file accessed is compressed file, then carry out decompression.
The technical scheme that the present embodiment provides can include following beneficial effect: need not visit at application program
When asking some file, can be compressed these files processing, reduce that these files take deposits as far as possible
Storage space;Meanwhile, when application program needs to access these files, these files can be decompressed
Contracting processes, it is simple to these files of application program normal call.
In conjunction with the 6th kind of possible embodiment of disclosure embodiment first aspect, possible at the 7th kind
In embodiment, whether the described file judging that application requests accesses is compressed file, including: sentence
Whether include presetting flag bit in the file that disconnected described application requests accesses, described default flag bit is used
In representing compressed file;If the file that described application requests accesses includes described default flag bit,
Then it is judged to compressed file.
The technical scheme that the present embodiment provides can include following beneficial effect: as a kind of example, permissible
The flag bit representing compressed file is set, judges whether the file that application requests accesses is pressure needing
During contracting file, it can be determined that whether this document includes presetting flag bit, if including presetting flag bit, then
Judge that this document is as compressed file.
Second aspect according to disclosure embodiment, it is provided that the cleaning plant of a kind of smart machine, including:
Set acquisition module, be configured to obtain file set for clearance, described file set for clearance include to
A few access frequency is less than the file of predeterminated frequency, and described file is the application journey run in smart machine
The file that ordered pair is answered;Module chosen by file, is configured to treat from described in the acquisition of described set acquisition module
Cleaning file set chooses file to be compressed;File replacement module, is configured to choose described file
The file described to be compressed that module is chosen is compressed processing, it is thus achieved that compressed file, and utilizes described compression
Described file to be compressed replaced by file.
In the first possible embodiment of disclosure embodiment second aspect, described set obtains mould
Block, is configured to obtain file set for clearance, and described file set for clearance includes that at least one accesses
Frequency is less than the file of predeterminated frequency, and described file is the inessential file that application program runs.
In the embodiment that the second of disclosure embodiment second aspect is possible, described set obtains mould
Block, is configured to obtain file set for clearance, and described file set for clearance includes that at least one accesses
Frequency is less than the file of predeterminated frequency, and the memory space that described file takies is not less than the first preset value.
In the third possible embodiment of disclosure embodiment second aspect, mould chosen by described file
Block, is configured to described smart machine and shows the file in described file set for clearance to user;
The file that described user chooses is defined as file to be compressed.
In the 4th kind of possible embodiment of disclosure embodiment second aspect, mould chosen by described file
Block, is configured to obtain the memory space that the file in described file set for clearance takies;By take
Memory space, not less than the file of the second preset value, is defined as described file to be compressed.
In the 5th kind of possible embodiment of disclosure embodiment second aspect, mould chosen by described file
Block, is configured to the access frequency according to file and the memory space taken, determines the score value of file;
By score value not less than the file of default score value, it is defined as described file to be compressed.
In the 6th kind of possible embodiment of disclosure embodiment second aspect, described device also includes:
Judge module, is configured to judge whether the file that application requests accesses is compressed file;
Decompression module, is configured to judge, at described judge module, the literary composition that described application requests accesses
When part is compressed file, carry out decompression.
In conjunction with the 6th kind of possible embodiment of disclosure embodiment second aspect, possible at the 7th kind
In embodiment, described judge module, it is configured to judge in the file that described application requests accesses
Whether include presetting flag bit, described default flag bit is used for representing compressed file;If described application journey
The file that sequence request accesses includes described default flag bit, then be judged to compressed file.
The third aspect according to disclosure embodiment, it is provided that the cleaning plant of a kind of smart machine, including:
Processor;For storing the memorizer of processor executable;Wherein, described processor is configured to:
Obtaining file set for clearance, described file set for clearance includes at least one access frequency less than presetting
The file of frequency, described file is the file that the application program run in smart machine is corresponding;Treat from described
Cleaning file set chooses file to be compressed;It is compressed described file to be compressed processing, it is thus achieved that pressure
Contracting file, and utilize described compressed file to replace described file to be compressed.
It should be appreciated that it is only exemplary and explanatory that above general description and details hereinafter describe
, the disclosure can not be limited.
Accompanying drawing explanation
Accompanying drawing herein is merged in description and constitutes the part of this specification, it is shown that meet these public affairs
The embodiment opened, and for explaining the principle of the disclosure together with description.
Fig. 1 is the flow chart of the method for cleaning according to a kind of smart machine shown in an exemplary embodiment.
Fig. 2 is the block diagram of the cleaning plant according to a kind of smart machine shown in an exemplary embodiment.
Fig. 3 is the block diagram of the cleaning plant according to a kind of smart machine shown in another exemplary embodiment.
Detailed description of the invention
Here will illustrate exemplary embodiment in detail, its example represents in the accompanying drawings.Following
When description relates to accompanying drawing, unless otherwise indicated, the same numbers in different accompanying drawings represents same or analogous
Key element.Embodiment described in following exemplary embodiment does not represent the institute consistent with the disclosure
There is embodiment.On the contrary, they only with as appended claims describes in detail, the one of the disclosure
The example of the apparatus and method that a little aspects are consistent.
Fig. 1 is the flow chart of the method for cleaning according to a kind of smart machine shown in an exemplary embodiment.
For example, smart machine can be mobile phone, panel computer, PC, notebook computer etc..Should
Method for cleaning can apply to take the file of smart machine memory space.For example, file can be
The file that in smart machine, the application program of operation is corresponding, memory space can be in smart machine
ROM (English: Read-Only Memory, Chinese: read only memory) type memory space, such as
Hard disk of smart machine etc..The method may comprise steps of:
In a step 101, obtaining file set for clearance, described file set for clearance includes at least one
Individual access frequency is less than the file of predeterminated frequency.
At present, correlation technique is mostly by deleting the intermediate file produced in application program running, clearly
The memory space of reason smart machine.Corresponding to this, disclosure scheme is then to taking smart machine storage sky
Between file be compressed process, it is achieved equipment cleaning.
As a kind of example, the disclosure can carry out equipment cleaning after user triggers;Or, Ke Yi
The free memory of system carries out equipment cleaning less than when presetting memory space;Or, can be in application
Equipment cleaning is carried out when program operation speed is less than pre-set velocity, etc., this can not be done by disclosure scheme
Limit.
In disclosure scheme, when carrying out equipment cleaning, can first the file in smart machine be united
Meter is analyzed, it is thus achieved that file set for clearance.
In a kind of possible embodiment, with the access frequency of statistics file, access frequency can be less than
The file of predeterminated frequency is defined as file for clearance.Generally, smart machine file is compressed process,
Decompression, can take the running memory of smart machine, for the file that access frequency is higher,
If being compressed frequently and decompression, the processing speed of smart machine may be affected, therefore,
Disclosure scheme, by file relatively low for access frequency, is i.e. defined as literary composition for clearance less than the file of predeterminated frequency
Part.As a kind of example, predeterminated frequency can be empirical value;Or, can carry out with combined with intelligent equipment
The running memory that compression and decompression take determines that this can not be done by predeterminated frequency, disclosure scheme
Limit.
In a kind of possible embodiment, after determining file set for clearance according to access frequency, also
File in file set for clearance can be done following process: add up the memory space that each file takies,
Reject the memory space taken and be less than the file of the first preset value, i.e. the file in file set for clearance
The memory space taken is not less than the first preset value.Generally, in the case of compression ratio is certain, if civilian
The memory space that part takies is less, then the space also ratio saved after compression is relatively limited, therefore, disclosure scheme
Can be compressed processing to taking the bigger file of memory space, be favorably improved the efficiency of equipment cleaning.
In a kind of possible embodiment, after determining file set for clearance according to access frequency, also
File in file set for clearance can be done following process: judge whether file is that application program runs
Necessary file;If file is the necessary file that application program runs, then from set, reject this document;
If file is the inessential file that application program runs, then retain this document.So, intelligence can just be avoided
Energy equipment, when application program launching, carries out unnecessary decompression.
As a kind of example, the necessary file that application program runs is it is to be understood that need when program starts
The file accessed, or when program starts, need the file of amendment.Such as, application program is music APP,
Smart machine preserves following file for this music APP: comprise the user such as account, login password letter
The configuration file of breath, comprises user and downloads the song list of song, every song that user downloads, if sound
Happy APP needs when starting to access configuration file and song list, then for this music APP for, join
Putting file and song list is necessary file, the song of download is inessential file.
In a step 102, from described file set for clearance, file to be compressed is chosen.
In a kind of possible embodiment, the All Files in file set for clearance can be defined as
File to be compressed, is compressed processing;Or, it is also possible to by the partial document in file set for clearance
Being defined as file to be compressed, be compressed processing, this can not be limited by disclosure scheme, can be in conjunction with
Depending on actual application.
As a kind of example, the disclosure provide at least the scheme choosing file to be compressed as follows.
Scheme one, obtains the memory space that the file in described file set for clearance takies;By take
Memory space, not less than the file of the second preset value, is defined as described file to be compressed.That is, will take
The file that memory space is bigger is defined as file to be compressed, so, in the case of compression ratio is certain, and can
With the space saved after improving compression as far as possible, it is favorably improved the efficiency of disclosure equipment cleaning.Can manage
Xie Di, the file that the memory space that takies is bigger refers to the memory space taken and presets not less than second
The file of value.
For example, if the All Files in file set for clearance being defined as file to be compressed, then
The first preset value in disclosure scheme can be equal to the second preset value;If by file set for clearance
Partial document be defined as file to be compressed, then the first preset value in disclosure scheme can be less than second
Preset value.
Scheme two, according to the access frequency of file and the memory space that takies, determines the score value of file;
By score value not less than the file of default score value, it is defined as described file to be compressed.
For example, in file set for clearance, the score value of each file can be presented as equation below:
Score=α A+ β B
Wherein, score represents the score value of file, and A represents the access frequency of file, and B represents that file accounts for
Memory space, α represents the weight coefficient of A, and β represents the weight coefficient of B.Such as, α and
β can be empirical value;Or, after the initial value of α and β is set, user's use habit can be carried out
Statistical analysis, and adjust the value of α and β accordingly, this can not be limited by disclosure scheme.
Scheme three, shows the file in described file set for clearance by described smart machine to user;
The file that described user chooses is defined as file to be compressed.That is, file set for clearance is shown to user
The list of included file, user the use demand combining self, therefrom choose file to be compressed.
Scheme four, can combine with scheme one or scheme two, takies memory space not by filter out
It is not less than the document presentation presetting score value to user, confession less than file or the score value of the second preset value
User therefrom chooses file to be compressed.
In step 103, it is compressed described file to be compressed processing, it is thus achieved that compressed file, and profit
Described file to be compressed is replaced with described compressed file.
It is compressed the file to be compressed chosen in step 102 processing, obtains compressed file, and delete
File to be compressed, i.e. utilize compressed file to replace original file to be compressed.Relative to literary composition to be compressed
For part, compressed file can the most effectively save the memory space of smart machine, it is achieved these public affairs
Open the purpose of equipment cleaning.
In a kind of possible embodiment, compressed file and file to be compressed can use identical file
Name, such as, treat compressed file A be compressed process after, obtain compressed file A;To literary composition to be compressed
After part B is compressed processing, obtain compressed file B.
In a kind of possible embodiment, compressed file can use different files from file to be compressed
Name, for example, it is possible to arrange the filename of compressed file according to default naming rule;Or, can treat
On the basis of compressed file filename, add and preset suffix, it is thus achieved that the filename of compressed file, the disclosure
This can not be limited by scheme.If default suffix is-1, then treat compressed file A be compressed process after,
Compressed file A-1 can be obtained;Treat compressed file B be compressed process after, can obtain compression literary composition
Part B-1.
As a kind of example, conventional compression algorithm can be used, treat compressed file and be compressed processing,
Compression algorithm can not be limited by disclosure scheme.
In a kind of possible embodiment, can update for clearance along with the service condition of application program
Memory space that file that file set includes, the access frequency of file, file take, the commenting of file
At least one in score value.Such as, user utilizes lifted music APP to download a song,
Following renewal can be done process: according to the access frequency of this song, it is determined whether be updated to treat by this song
In cleaning file set;After the relevant information of this song is added song list extremely, update song list
The memory space taken;Etc., renewal process and upgating object can not be limited by disclosure scheme.
In a kind of possible embodiment, after carrying out equipment cleaning based on disclosure scheme, application program
File can be accessed: judge whether the file that application requests accesses is compressed file according to below scheme;
If the file that described application requests accesses is compressed file, then described application requests is accessed
File carry out decompression.It is to say, when application program need not access some file, can
To be compressed these files processing, reduce the memory space that these files take as far as possible;Meanwhile, exist
When application program needs to access these files, these files can be carried out decompression, it is simple to application
These files of program normal call.
As a kind of example, in disclosure scheme, application program need not access file it is to be understood that answer
Run with program stopped;Or, application program is properly functioning, but will not call this document.Such as, pin
To lifted music APP, song A that user downloads is carried out at compression as file to be compressed
Reason, has obtained compressed file song A-1, has saved the memory space that song A takies.When user starts
This music APP play music time, if not playing this song, then this song be application program not
Need the file accessed, decompression can not be carried out;If playing this song, then this song
The file accessed for application requests, can carry out decompression to song A-1, obtain song A
Play out.
As a kind of example, the disclosure provide at least the following scheme identifying compressed file:
Scheme one, it is judged that whether include in the file that described application requests accesses presetting flag bit, institute
State default flag bit for representing compressed file;If the file that described application requests accesses includes
Described default flag bit, then be judged to compressed file.It is to say, arrange the mark representing compressed file
Position, when needing to judge whether the file that application requests accesses is compressed file, it can be determined that this article
Whether including this default flag bit in part, if including this default flag bit, then explanation this document is compression
File.
As a kind of example, default flag bit can take 4 bytes, before can being arranged at compressed file
4 bytes, disclosure scheme takies byte number, position in compressed file etc. to default flag bit can
Do not limit.
Scheme two, it is judged that whether include the file that described application requests accesses in compressed file list;
If described compressed file list includes the file that described application requests accesses, then it is judged to compression
File.It is to say, when carrying out equipment cleaning, the filename of compressed file can be added to compression
In listed files, when needing to judge whether the file that application requests accesses is compressed file, permissible
Judging whether this document is stored in compressed file list, if be stored in compressed file list, then saying
Bright this document is compressed file.
Fig. 2 is the block diagram of the cleaning plant according to a kind of smart machine shown in an exemplary embodiment.Ginseng
According to Fig. 2, this device 200 can include gathering acquisition module 201, file chooses module 202 and file
Replacement module 203.
This set acquisition module 201, can be configured to obtain file set for clearance, described for clearance
File set includes at least one access frequency file less than predeterminated frequency, and described file is smart machine
The file that the application program of middle operation is corresponding;
This document chooses module 202, can be configured to the institute obtained from described set acquisition module 201
State and file set for clearance is chosen file to be compressed;
This document replacement module 203, can be configured to choose described file the institute that module 202 is chosen
State file to be compressed to be compressed processing, it is thus achieved that compressed file, and it is described to utilize described compressed file to replace
File to be compressed.
In sum, when the device provided by the disclosure carries out equipment cleaning, mould can be obtained by set
Block 201 adds up the access frequency of the file in smart machine, and access frequency is less than the file of predeterminated frequency
It is defined as file for clearance, it is thus achieved that file set for clearance;Then module 202 is chosen by file clear from treating
Reason file set selects file to be compressed, it is provided that to file replacement module 203, file replace mould
Block 203 is treated compressed file and is compressed processing, and obtains compressed file, and utilization takies memory space relatively
Little compressed file, replaces and takies the file to be compressed that memory space is bigger.So scheme, just can be
The most effectively save the memory space of smart machine, it is achieved the purpose of disclosure equipment cleaning.
In a kind of possible embodiment, this set acquisition module 201, acquisition can be configured to and treat clearly
Reason file set, described file set for clearance includes at least one access frequency literary composition less than predeterminated frequency
Part, and the inessential file that described file is application program operation.
Generally, smart machine is compressed process, decompression to file, can take smart machine
Running memory, may affect the speed of service of smart machine.In order to avoid smart machine is at application program
During startup, carrying out unnecessary decompression, the necessary file that can be run by application program is from set
Middle rejecting, retains inessential file, so, contributes to saving in the equipment operation that decompression takies
Deposit.
In a kind of possible embodiment, this set acquisition module 201, acquisition can be configured to and treat clearly
Reason file set, described file set for clearance includes at least one access frequency literary composition less than predeterminated frequency
Part, and the memory space that described file takies is not less than the first preset value.
Generally, in the case of compression ratio is certain, if the memory space that file takies is less, then compress
The space of rear saving also ratio is relatively limited, therefore, can pick taking the less file of memory space from set
Remove, retain and take the file that memory space is bigger, be favorably improved the efficiency of disclosure planning device cleaning.
It is to be appreciated that take the bigger file of memory space to refer to the memory space taken not less than first
The file of preset value.
In a kind of possible embodiment, this document chooses module 202, can be configured to described
Smart machine shows the file in described file set for clearance to user;The file that described user is chosen
It is defined as file to be compressed.It is to say, file included by file set for clearance can be shown to user
List, user the use demand combining self, therefrom choose file to be compressed.
In a kind of possible embodiment, this document chooses module 202, can be configured to acquisition described
The memory space that file in file set for clearance takies;The memory space taken is not less than second pre-
If the file of value, it is defined as described file to be compressed.It is to say, can by the memory space that takies relatively
Big file is defined as file to be compressed, is favorably improved the efficiency of disclosure equipment cleaning.
In a kind of possible embodiment, this document chooses module 202, can be configured to according to file
Access frequency and the memory space that takies, determine the score value of file;By score value not less than presetting
The file of score value, is defined as described file to be compressed.It is to say, can be with the access frequency of comprehensive file
And the memory space taken, determine file to be compressed, be favorably improved the efficiency of disclosure equipment cleaning.
In a kind of possible embodiment, described device can also include judge module and decompression module.
This judge module, can be configured to judge whether the file that application requests accesses is compression literary composition
Part;
This decompression module, can be configured to judge that described application requests is visited at described judge module
When the file asked is compressed file, carry out decompression.
It is to be appreciated that when application program need not access some file, these files can be carried out
Compression processes, and reduces the memory space that these files take as far as possible;Need to access these literary compositions at application program
During part, these files can be carried out decompression, it is simple to these files of application program normal call.
Corresponding to this, when application requests accesses file, first this document can be judged whether by judge module
For compressed file, if it is determined that this document is identified as compressed file by module, then can be by decompression module pair
This document carries out decompression.
In a kind of possible embodiment, this judge module, can be configured to judge described application program
Whether include in the file that request accesses presetting flag bit, described default flag bit is used for representing compressed file;
If the file that described application requests accesses includes described default flag bit, then it is judged to compression literary composition
Part.
It is to say, the flag bit representing compressed file can be arranged, judge application requests at needs
When whether the file accessed is compressed file, it can be determined that whether this document includes presetting flag bit, if
Including default flag bit, then judge that this document is as compressed file.
In a kind of possible embodiment, this judge module, can be configured to judge compressed file list
In whether include the file that described application requests accesses;If described compressed file list includes institute
State the file that application requests accesses, be then judged to compressed file.
It is to say, the filename of compressed file can be added to compressing literary composition when carrying out equipment cleaning
In part list, when needing to judge whether the file that application requests accesses is compressed file, can sentence
Whether disconnected this document is stored in compressed file list, if be stored in compressed file list, then judges
This document is compressed file.
About the device in above-described embodiment, the concrete mode that wherein modules performs to operate is having
Close in the embodiment of the method and be described in detail, explanation will be not set forth in detail herein.
Fig. 3 is the block diagram of the cleaning plant 300 according to a kind of smart machine shown in an exemplary embodiment.
Such as, device 300 can be mobile phone, computer, digital broadcast terminal, messaging devices,
Game console, tablet device, armarium, body-building equipment, personal digital assistant etc..
With reference to Fig. 3, device 300 can include following one or more assembly: processes assembly 302, deposits
Reservoir 304, electric power assembly 306, multimedia groupware 308, audio-frequency assembly 310, input/output (I/O)
Interface 312, sensor cluster 314, and communications component 316.
Process assembly 302 and generally control the integrated operation of device 300, such as with display, call,
The operation that data communication, camera operation and record operation are associated.Process assembly 302 and can include one
Or multiple processor 320 performs instruction, to complete all or part of step of above-mentioned method for cleaning.This
Outward, process assembly 302 and can include one or more module, it is simple to process assembly 302 and other assemblies
Between mutual.Such as, process assembly 302 and can include multi-media module, to facilitate multimedia groupware
308 and process between assembly 302 mutual.
Memorizer 304 is configured to store various types of data to support the operation at device 300.This
The example of a little data includes any application program for operating on the device 300 or the instruction of method, connection
It is personal data, telephone book data, message, picture, video etc..Memorizer 304 can be by any type
Volatibility or non-volatile memory device or combinations thereof realize, such as static RAM
(SRAM), Electrically Erasable Read Only Memory (EEPROM), erasable programmable is read-only to be deposited
Reservoir (EPROM), programmable read only memory (PROM), read only memory (ROM), magnetic is deposited
Reservoir, flash memory, disk or CD.
The various assemblies that electric power assembly 306 is device 300 provide electric power.Electric power assembly 306 can include
Power-supply management system, one or more power supplys, and other with generate for device 300, manage and distribute electricity
The assembly that power is associated.
One output interface of offer that multimedia groupware 308 is included between described device 300 and user
Screen.In certain embodiments, screen can include liquid crystal display (LCD) and touch panel (TP).
If screen includes that touch panel, screen may be implemented as touch screen, to receive the input from user
Signal.Touch panel includes that one or more touch sensor touches with sensing, slides and on touch panel
Gesture.Described touch sensor can not only sense touch or the border of sliding action, but also detects
The persistent period relevant to described touch or slide and pressure.In certain embodiments, multimedia group
Part 308 includes a front-facing camera and/or post-positioned pick-up head.When device 300 is in operator scheme, as
When screening-mode or video mode, front-facing camera and/or post-positioned pick-up head can receive the multimedia of outside
Data.Each front-facing camera and post-positioned pick-up head can be a fixing optical lens system or have
Focal length and optical zoom ability.
Audio-frequency assembly 310 is configured to output and/or input audio signal.Such as, audio-frequency assembly 310
Including a mike (MIC), when device 300 is in operator scheme, such as call model, record mould
When formula and speech recognition mode, mike is configured to receive external audio signal.The audio frequency letter received
Number can be further stored at memorizer 304 or send via communications component 316.In some embodiments
In, audio-frequency assembly 310 also includes a speaker, is used for exporting audio signal.
I/O interface 312 provides interface, above-mentioned periphery for processing between assembly 302 and peripheral interface module
Interface module can be keyboard, puts striking wheel, button etc..These buttons may include but be not limited to: homepage is pressed
Button, volume button, start button and locking press button.
Sensor cluster 314 includes one or more sensor, for providing various aspects for device 300
State estimation.Such as, what sensor cluster 314 can detect device 300 opens/closed mode,
The relative localization of assembly, the most described assembly is display and the keypad of device 300, sensor cluster
314 position changes that can also detect device 300 or 300 1 assemblies of device, user and device 300
The presence or absence of contact, device 300 orientation or acceleration/deceleration and the variations in temperature of device 300.Pass
Sensor assembly 314 can include proximity transducer, is configured to when not having any physical contact examine
The existence of object near surveying.Sensor cluster 314 can also include optical sensor, such as CMOS or CCD
Imageing sensor, for using in imaging applications.In certain embodiments, this sensor cluster 314
Can also include that acceleration transducer, gyro sensor, Magnetic Sensor, pressure transducer or temperature pass
Sensor.
Communications component 316 is configured to facilitate wired or wireless mode between device 300 and other equipment
Communication.Device 300 can access wireless network based on communication standard, such as WiFi, 2G or 3G, or
Combinations thereof.In one exemplary embodiment, communications component 316 via broadcast channel receive from
The broadcast singal of external broadcasting management system or broadcast related information.In one exemplary embodiment, institute
State communications component 316 and also include near-field communication (NFC) module, to promote junction service.Such as, exist
NFC module can be based on RF identification (RFID) technology, Infrared Data Association (IrDA) technology, super
Broadband (UWB) technology, bluetooth (BT) technology and other technologies realize.
In the exemplary embodiment, device 300 can be by one or more application specific integrated circuits
(ASIC), digital signal processor (DSP), digital signal processing appts (DSPD), able to programme patrol
Collect device (PLD), field programmable gate array (FPGA), controller, microcontroller, micro-process
Device or other electronic components realize, and are used for performing above-mentioned method for cleaning.
In the exemplary embodiment, a kind of non-transitory computer-readable storage including instruction is additionally provided
Medium, such as, include the memorizer 304 of instruction, and above-mentioned instruction can be held by the processor 320 of device 300
Row is to complete above-mentioned method for cleaning.Such as, described non-transitory computer-readable recording medium can be
ROM, random access memory (RAM), CD-ROM, tape, floppy disk and optical data storage devices
Deng.
Those skilled in the art, after considering description and putting into practice the disclosure, will readily occur to its of the disclosure
Its embodiment.The application is intended to any modification, purposes or the adaptations of the disclosure, this
A little modification, purposes or adaptations are followed the general principle of the disclosure and include that the disclosure is not disclosed
Common knowledge in the art or conventional techniques means.Description and embodiments is considered only as example
Property, the true scope of the disclosure and spirit are pointed out by claim below.
It should be appreciated that the disclosure be not limited to described above and illustrated in the accompanying drawings accurately
Structure, and various modifications and changes can carried out without departing from the scope.The scope of the present disclosure is only by institute
Attached claim limits.
Claims (17)
1. the method for cleaning of a smart machine, it is characterised in that described method is applied to take intelligence and sets
The file of standby memory space, described file is the file that the application program run in described smart machine is corresponding,
Including:
Obtaining file set for clearance, described file set for clearance includes that at least one access frequency is less than
The file of predeterminated frequency;
File to be compressed is chosen from described file set for clearance;
It is compressed described file to be compressed processing, it is thus achieved that compressed file, and utilizes described compressed file
Replace described file to be compressed.
Method the most according to claim 1, it is characterised in that in described file set for clearance
File is the inessential file that application program runs.
Method the most according to claim 1 and 2, it is characterised in that described file set for clearance
In the memory space that takies of file not less than the first preset value.
Method the most according to claim 1, it is characterised in that described from described file set for clearance
Conjunction is chosen file to be compressed, including:
The file in described file set for clearance is shown to user by described smart machine;
The file that described user chooses is defined as file to be compressed.
Method the most according to claim 1, it is characterised in that described from described file set for clearance
Conjunction is chosen file to be compressed, including:
Obtain the memory space that the file in described file set for clearance takies;
The memory space taken is not less than the file of the second preset value, is defined as described file to be compressed.
Method the most according to claim 1, it is characterised in that described from described file set for clearance
Conjunction is chosen file to be compressed, including:
Access frequency according to file and the memory space taken, determine the score value of file;
By score value not less than the file of default score value, it is defined as described file to be compressed.
Method the most according to claim 1, it is characterised in that described method also includes:
Judge whether the file that application requests accesses is compressed file;
If the file that described application requests accesses is compressed file, then carry out decompression.
Method the most according to claim 7, it is characterised in that described judgement application requests is visited
Whether the file asked is compressed file, including:
Judge whether the file that described application requests accesses includes preset flag bit, described pre-bidding
Will position is used for representing compressed file;
If the file that described application requests accesses includes described default flag bit, then it is judged to pressure
Contracting file.
9. the cleaning plant of a smart machine, it is characterised in that including:
Set acquisition module, is configured to obtain file set for clearance, described file set bag for clearance
Include at least one access frequency less than the file of predeterminated frequency, described file be smart machine runs should
With file corresponding to program;
Module chosen by file, is configured to the file set described for clearance obtained from described set acquisition module
Conjunction is chosen file to be compressed;
File replacement module, is configured to choose described file the file described to be compressed that module chooses and enters
Row compression processes, it is thus achieved that compressed file, and utilizes described compressed file to replace described file to be compressed.
Device the most according to claim 9, it is characterised in that
Described set acquisition module, is configured to obtain file set for clearance, described file set for clearance
Close the file including at least one access frequency less than predeterminated frequency, and described file is that application program runs
Inessential file.
11. devices according to claim 9, it is characterised in that
Described set acquisition module, is configured to obtain file set for clearance, described file set for clearance
Close the file including at least one access frequency less than predeterminated frequency, and the memory space that described file takies
Not less than the first preset value.
12. devices according to claim 9, it is characterised in that
Module chosen by described file, is configured to described smart machine and shows to user described for clearance
File in file set;The file that described user chooses is defined as file to be compressed.
13. devices according to claim 9, it is characterised in that
Module chosen by described file, is configured to obtain what the file in described file set for clearance took
Memory space;The memory space taken is not less than the file of the second preset value, is defined as described to be compressed
File.
14. devices according to claim 9, it is characterised in that
Module chosen by described file, is configured to the access frequency according to file and the memory space taken,
Determine the score value of file;By score value not less than the file of default score value, it is defined as described literary composition to be compressed
Part.
15. devices according to claim 9, it is characterised in that described device also includes:
Judge module, is configured to judge whether the file that application requests accesses is compressed file;
Decompression module, is configured to judge, at described judge module, the literary composition that described application requests accesses
When part is compressed file, carry out decompression.
16. devices according to claim 15, it is characterised in that
Described judge module, is configured to judge whether include in the file that described application requests accesses
Presetting flag bit, described default flag bit is used for representing compressed file;If described application requests is visited
The file asked includes described default flag bit, then be judged to compressed file.
The cleaning plant of 17. 1 kinds of smart machines, it is characterised in that including:
Processor;
For storing the memorizer of processor executable;
Wherein, described processor is configured to:
Obtaining file set for clearance, described file set for clearance includes that at least one access frequency is less than
The file of predeterminated frequency, described file is the file that the application program run in smart machine is corresponding;
File to be compressed is chosen from described file set for clearance;
It is compressed described file to be compressed processing, it is thus achieved that compressed file, and utilizes described compressed file
Replace described file to be compressed.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610150783.0A CN105843853A (en) | 2016-03-16 | 2016-03-16 | Clearing method and apparatus for intelligent device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610150783.0A CN105843853A (en) | 2016-03-16 | 2016-03-16 | Clearing method and apparatus for intelligent device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN105843853A true CN105843853A (en) | 2016-08-10 |
Family
ID=56588129
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610150783.0A Pending CN105843853A (en) | 2016-03-16 | 2016-03-16 | Clearing method and apparatus for intelligent device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105843853A (en) |
Cited By (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106339470A (en) * | 2016-08-29 | 2017-01-18 | 北京小米移动软件有限公司 | Method and device for processing file |
CN107465413A (en) * | 2017-07-07 | 2017-12-12 | 南京城市职业学院 | A kind of self-adapting data compressibility and its method |
WO2018027750A1 (en) * | 2016-08-11 | 2018-02-15 | 王志远 | Method for pushing information about file compression technology, and compression system |
WO2018027751A1 (en) * | 2016-08-11 | 2018-02-15 | 王志远 | Method for acquiring data when automatically compressing file, and compression system |
CN108021630A (en) * | 2017-11-21 | 2018-05-11 | 深圳市雷鸟信息科技有限公司 | Cleaning garbage files method, intelligent terminal and computer-readable recording medium |
CN108228357A (en) * | 2018-01-22 | 2018-06-29 | 维沃移动通信有限公司 | A kind of memory method for cleaning and mobile terminal |
CN109033247A (en) * | 2018-07-05 | 2018-12-18 | Oppo(重庆)智能科技有限公司 | A kind of management method of application program, device, storage medium and terminal |
CN109582236A (en) * | 2018-11-29 | 2019-04-05 | 努比亚技术有限公司 | Terminal storage space management method, terminal and storage medium |
CN114461405A (en) * | 2022-04-01 | 2022-05-10 | 荣耀终端有限公司 | Storage method and related device for locking page in memory |
CN116701327A (en) * | 2022-12-07 | 2023-09-05 | 荣耀终端有限公司 | File processing method and electronic equipment |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101582067A (en) * | 2008-05-15 | 2009-11-18 | 国际商业机器公司 | Method and system for reducing storage requirements during decompressing compressed file |
CN105025166A (en) * | 2015-07-09 | 2015-11-04 | 深圳市金立通信设备有限公司 | File processing method and terminal |
CN105302477A (en) * | 2015-09-21 | 2016-02-03 | 努比亚技术有限公司 | Application processing realization method and mobile terminal |
-
2016
- 2016-03-16 CN CN201610150783.0A patent/CN105843853A/en active Pending
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101582067A (en) * | 2008-05-15 | 2009-11-18 | 国际商业机器公司 | Method and system for reducing storage requirements during decompressing compressed file |
CN105025166A (en) * | 2015-07-09 | 2015-11-04 | 深圳市金立通信设备有限公司 | File processing method and terminal |
CN105302477A (en) * | 2015-09-21 | 2016-02-03 | 努比亚技术有限公司 | Application processing realization method and mobile terminal |
Cited By (17)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2018027750A1 (en) * | 2016-08-11 | 2018-02-15 | 王志远 | Method for pushing information about file compression technology, and compression system |
WO2018027751A1 (en) * | 2016-08-11 | 2018-02-15 | 王志远 | Method for acquiring data when automatically compressing file, and compression system |
CN106339470B (en) * | 2016-08-29 | 2020-02-04 | 北京小米移动软件有限公司 | File processing method and device |
CN106339470A (en) * | 2016-08-29 | 2017-01-18 | 北京小米移动软件有限公司 | Method and device for processing file |
CN107465413A (en) * | 2017-07-07 | 2017-12-12 | 南京城市职业学院 | A kind of self-adapting data compressibility and its method |
CN107465413B (en) * | 2017-07-07 | 2020-11-17 | 南京城市职业学院 | Self-adaptive data compression system and method thereof |
CN108021630A (en) * | 2017-11-21 | 2018-05-11 | 深圳市雷鸟信息科技有限公司 | Cleaning garbage files method, intelligent terminal and computer-readable recording medium |
CN108228357A (en) * | 2018-01-22 | 2018-06-29 | 维沃移动通信有限公司 | A kind of memory method for cleaning and mobile terminal |
CN108228357B (en) * | 2018-01-22 | 2021-04-02 | 维沃移动通信有限公司 | Memory cleaning method and mobile terminal |
CN109033247A (en) * | 2018-07-05 | 2018-12-18 | Oppo(重庆)智能科技有限公司 | A kind of management method of application program, device, storage medium and terminal |
CN109033247B (en) * | 2018-07-05 | 2022-01-18 | Oppo(重庆)智能科技有限公司 | Application program management method and device, storage medium and terminal |
CN109582236A (en) * | 2018-11-29 | 2019-04-05 | 努比亚技术有限公司 | Terminal storage space management method, terminal and storage medium |
CN109582236B (en) * | 2018-11-29 | 2023-08-25 | 努比亚技术有限公司 | Terminal storage space management method, terminal and storage medium |
CN114461405A (en) * | 2022-04-01 | 2022-05-10 | 荣耀终端有限公司 | Storage method and related device for locking page in memory |
CN114461405B (en) * | 2022-04-01 | 2022-09-13 | 荣耀终端有限公司 | Storage method and related device for locking page in memory |
CN116701327A (en) * | 2022-12-07 | 2023-09-05 | 荣耀终端有限公司 | File processing method and electronic equipment |
CN116701327B (en) * | 2022-12-07 | 2024-06-21 | 荣耀终端有限公司 | File processing method and electronic equipment |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105843853A (en) | Clearing method and apparatus for intelligent device | |
CN105488112B (en) | Information-pushing method and device | |
CN108228882B (en) | recommendation method and terminal device for song audition fragments | |
CN106201686A (en) | Management method, device and the terminal of application | |
CN104933170A (en) | Information exhibition method and device | |
CN104503740A (en) | Memory management method and device | |
CN105930247A (en) | Method, device and mobile terminal for processing problem of system restart | |
CN105933539A (en) | Audio playing control method and device, and terminal | |
CN106066770A (en) | Memory space management and device | |
CN105975301A (en) | Memory cleaning method and device, and electronic equipment | |
CN105354018A (en) | Method, apparatus and device for replacing display background | |
CN104158722A (en) | Message push method and device used for light applications, as well as terminal and server | |
CN106534562A (en) | File deletion method and apparatus | |
CN105187692A (en) | Video recording method and device | |
CN106598704A (en) | Application program recovery method and apparatus | |
CN106648730A (en) | Processing method and device of abnormal application | |
CN104636475A (en) | Method and device for optimizing multimedia file storage space | |
CN106649784A (en) | Picture storing method, picture searching method, picture searching device and terminal | |
CN105892805A (en) | Instant message processing method and device | |
CN105447149A (en) | Interaction method, apparatus and electronic device for network searching | |
CN105205153A (en) | File storage method and device | |
CN108228620A (en) | A kind of Word library updating method and device | |
CN104038922B (en) | File synchronisation method and relevant apparatus | |
CN104462276B (en) | A kind of audio frequency playing method and device for desktop widget | |
CN108121720A (en) | A kind of resource recommendation method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20160810 |