CN106372003B - Cache data cleaning method and device and terminal - Google Patents

Cache data cleaning method and device and terminal Download PDF

Info

Publication number
CN106372003B
CN106372003B CN201610811176.4A CN201610811176A CN106372003B CN 106372003 B CN106372003 B CN 106372003B CN 201610811176 A CN201610811176 A CN 201610811176A CN 106372003 B CN106372003 B CN 106372003B
Authority
CN
China
Prior art keywords
cache data
preset
application
frequency
span
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201610811176.4A
Other languages
Chinese (zh)
Other versions
CN106372003A (en
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.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp 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 Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201610811176.4A priority Critical patent/CN106372003B/en
Publication of CN106372003A publication Critical patent/CN106372003A/en
Application granted granted Critical
Publication of CN106372003B publication Critical patent/CN106372003B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/0223User address space allocation, e.g. contiguous or non contiguous base addressing
    • G06F12/023Free address space management
    • G06F12/0253Garbage collection, i.e. reclamation of unreferenced memory

Abstract

The invention provides a cache data cleaning method, a cache data cleaning device and a cache data cleaning terminal, wherein the method comprises the following steps: periodically acquiring the use frequency of applications preset in the terminal and a reading record of cache data of each application within a preset time length, wherein the reading record records the generation time of the cache data of each application read within the preset time length; determining the number of cache data retention days corresponding to each application according to the use frequency and the reading record; and when the system time reaches a preset cleaning time point, searching the data to be cleaned in the cache data of each application according to the number of the reserved days of each cache data, and cleaning. The invention realizes the self-adaptive cleaning based on the personalized data cleaning model, has the advantages of timely cleaning, flexibility and pertinence, and better meets the actual requirements of users, thereby being more intelligent.

Description

Cache data cleaning method and device and terminal
Technical Field
The present invention relates to the field of data processing technologies, and in particular, to a method, an apparatus, and a terminal for cleaning cache data.
Background
With the development of computers, various computer terminals such as personal computers, smart phones, tablet computers, smart cameras and the like have higher and higher popularity in life. In order to extend the application functions of the terminal, various application programs need to be installed in the terminal, such as: browser, media player program, game program, chat tool client program, and the like. In order to improve the reading speed of the program on the historical data, the application program caches data generated in the running process. Over time, the cached historical data is more and more, and the occupied storage resources are more and more, so that the running speed of the machine is slower and slower.
In order to solve the above technical problem, the existing cache data cleaning technology mainly provides the following two cleaning methods:
1. the cache data of each application program are listed and then presented to the user so that the user can confirm the cache data one by one and clean the cache data manually;
2. and automatically cleaning according to a preset cloud cleaning list.
The first cleaning method requires the user to determine the objects to be cleaned one by one, and is complex to operate. Above-mentioned second kind clearance mode, because high in the clouds clearance list can't exhaust all data that need clear up, and which can clear up, which can not clear up, judge that the mode is very general, lack the flexibility, can't satisfy different users ' demand, intelligent degree is lower.
Disclosure of Invention
The invention provides a cache data cleaning method, a cache data cleaning device and a cache data cleaning terminal, and aims to solve the technical problems that manual cleaning operation is complicated, automatic cleaning is performed according to a cloud cleaning list, flexibility is poor, and the intelligent degree is low.
The first aspect of the present invention provides a method for cleaning cache data, including:
periodically acquiring the use frequency of applications preset in a terminal and a reading record of cache data of each application within a preset time length, wherein the reading record records the generation time of the cache data of each application read within the preset time length;
determining the number of cache data retention days corresponding to each application according to the use frequency and the reading record;
when the system time reaches a preset cleaning time point, searching data to be cleaned in the cache data of each application according to the number of retention days of each cache data, and cleaning, wherein the data to be cleaned is as follows: and in the cache data of each application, the cache duration exceeds the data of the cache data retention days.
A second aspect of the present invention provides a cache data cleaning apparatus, including:
the acquisition module is used for periodically acquiring the use frequency of applications preset in the terminal and the reading record of the cache data of each application within a preset time length, wherein the reading record records the generation time of the cache data of each application read within the preset time length;
the determining module is used for determining the number of cache data retention days corresponding to each application according to the use frequency and the reading record;
the cleaning module is used for searching data to be cleaned in the cache data of each application according to the number of retention days of each cache data when the system time reaches a preset cleaning time point, and cleaning the data to be cleaned, wherein the data to be cleaned is: and in the cache data of each application, the cache duration exceeds the data of the cache data retention days.
A third aspect of the present invention provides a terminal, in which the apparatus for cleaning cache data as provided in the second aspect of the present invention is operated.
According to the method, the device and the terminal for cleaning the cache data, provided by the embodiment of the invention, the use frequency of the applications preset in the terminal and the reading record of the cache data of each application are obtained regularly within the preset duration, and the data cleaning model is established by combining the use frequency and the generation time of the cache data of each application read within the preset duration recorded in the reading record, and the cache data of each application is processed in a targeted manner according to the data cleaning model; on the other hand, the data cleaning model is established based on the use frequency of each application and the habit of browsing the cache data by the user, so that the cleaning operation has more flexibility and pertinence, and the actual requirements of the user are better met, thereby being more intelligent.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without inventive exercise.
Fig. 1 shows a block diagram of a terminal;
fig. 2 is a schematic flow chart illustrating an implementation of a cache data cleaning method according to a first embodiment of the present invention;
fig. 3 is a schematic flow chart illustrating an implementation of a cache data cleaning method according to a second embodiment of the present invention;
fig. 4 is a schematic structural diagram of a cache data cleaning apparatus according to a third embodiment of the present invention;
fig. 5 is a schematic structural diagram of a cache data cleaning apparatus according to a fourth embodiment of the present invention.
Detailed Description
In order to make the objects, features and advantages of the present invention more obvious and understandable, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Fig. 1 shows a block diagram of a terminal. The terminal may include, but is not limited to: the mobile or non-mobile electronic terminal comprises a mobile or non-mobile electronic terminal such as a personal computer, a portable computer, a smart phone, a tablet computer, a multimedia player and an intelligent wearable device. As shown in FIG. 1, the terminal 10 includes a memory 102, a memory controller 104, one or more processors 106 (only one shown), a peripheral interface 108, a radio frequency module 110, a key module 112, an audio module 114, and a display module 116. These components communicate with each other via one or more communication buses/signal lines 122.
It is to be understood that the configuration shown in fig. 1 is merely exemplary and is not intended to limit the configuration of the terminal 10. For example, the terminal 10 may include more or fewer components than shown in FIG. 1, or may have a different configuration than shown in FIG. 1. The components shown in fig. 1 may be implemented in hardware, software, or a combination thereof.
The memory 102 may be used to store software programs and modules, such as program instructions/modules corresponding to the method and apparatus for cleaning cache data in the embodiments of the present invention, and the processor 106 executes various functional applications and data processing by running the software programs and modules stored in the memory 102, so as to implement the above-mentioned method for cleaning cache data.
The modules stored in the memory 102 may specifically include: an acquisition module 31, a determination module 32 and a cleaning module 33 (none shown in fig. 1).
Optionally, the modules stored in the memory 102 may specifically further include: an analysis module 41, a correction module 42, and a labeling module 43 (none shown in fig. 1). Wherein the determining module 32 further comprises: span determination module 321, and day determination module 322 (both not shown in FIG. 1). The day determination module 322 further comprises: a frequency score determining module 3221, a span score determining module 3222, a total score obtaining module 3223, and a day number determining sub-module 3224 (none shown in fig. 1).
The specific processes of the modules stored in the memory 102 to implement the respective functions can be referred to with reference to fig. 4 and 5, and the related contents in the third embodiment and the fourth embodiment are not described herein again.
The memory 102 may include high speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 102 may further include memory located remotely from the processor 106, which may be connected to the terminal 10 via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof. Access to the memory 102 by the processor 106, and possibly other components, may be under the control of the memory controller 104.
The peripherals interface 108 couples various input/output devices to the processor 106 as well as to the memory 102. The processor 106 executes various software, instructions within the memory 102 to perform various functions of the terminal 10 and to perform data processing.
In some examples, the peripheral interface 108, the processor 106, and the memory controller 104 may be implemented in a single chip. In other examples, they may be implemented separately from the individual chips.
The rf module 110 is used for receiving and transmitting electromagnetic waves, and implementing interconversion between the electromagnetic waves and electrical signals, so as to communicate with a communication network or other devices. The rf module 110 may include various existing circuit elements for performing these functions, such as an antenna, an rf transceiver, a digital signal processor, an encryption/decryption chip, a Subscriber Identity Module (SIM) card, memory, and so forth. The rf module 110 may communicate with various networks such as the internet, an intranet, a preset type of wireless network, or other devices through a preset type of wireless network. The preset types of wireless networks described above may include cellular telephone networks, wireless local area networks, or metropolitan area networks. The Wireless network of the above-mentioned preset type may use various communication standards, protocols and technologies, including but not limited to Global System for mobile communication (GSM), Enhanced Data GSM Environment (EDGE), Wideband Code Division Multiple Access (W-CDMA), Code Division Multiple Access (CDMA), Time Division Multiple Access (TDMA), bluetooth, Wireless Fidelity (WiFi) (e.g., IEEE802.11a, IEEE802.11 b, IEEE802.11g and/or IEEE802.11 n), Voice over internet Protocol (VoIP), Worldwide Interoperability Access (world for mobile communication, Wi-Max), and any other suitable short-range communication protocols, and may even include those protocols that have not yet been developed.
The key module 112 provides an interface for a user to input to the terminal 10, and the user can cause the terminal 10 to perform different functions by pressing different keys.
Audio module 114 provides an audio interface to a user that may include one or more microphones, one or more speakers, and audio circuitry. The audio circuitry receives audio data from the peripheral interface 108, converts the audio data to electrical information, and transmits the electrical information to the speaker. The speaker converts the electrical information into sound waves that the human ear can hear. The audio circuitry also receives electrical information from the microphone, converts the electrical information to voice data, and transmits the voice data to the peripheral interface 108 for further processing. The audio data may be retrieved from the memory 102 or through the radio frequency module 110. In addition, the audio data may also be stored in the memory 102 or transmitted through the radio frequency module 110. In some examples, the audio module 114 may also include a headphone jack for providing an audio interface to headphones or other devices.
The display module 116 provides an output interface between the terminal 10 and the user. In particular, display module 116 displays video output to the user, the content of which may include text, graphics, video, and any combination thereof. Some of the output results are for some of the user interface objects. Further, the display module 116 provides an input interface between the terminal 10 and the user for receiving user inputs, such as user clicks, swipes, and other gesture operations, so that the user interface objects respond to the user inputs. The technique of detecting user input may be based on resistive, capacitive, or any other possible touch detection technique. Specific examples of display units of the display module 116 include, but are not limited to, a liquid crystal display or a light emitting polymer display.
Referring to fig. 2, fig. 2 is a schematic flow chart illustrating an implementation of the cache data cleaning method according to the first embodiment of the present invention. The cache data cleaning method provided in this embodiment can be applied to the terminal 10 shown in fig. 1, as shown in fig. 2, the method mainly includes the following steps:
s101, regularly acquiring the use frequency of applications preset in a terminal and the reading record of cache data of each application within a preset time length;
specifically, the predetermined period and the preset time duration may be set according to a user-defined operation, and optionally, the predetermined period and the preset time duration are both set as default to one day (24 hours), for example, 12 hours per night: 00 obtains the use frequency of each Application (APP) installed in the terminal within 24 hours (0: 00-24: 00) of the day, and the reading record of the cache data of each APP within 24 hours of the day.
The preset APP types in the terminal may include, but are not limited to: web browsing, instant messaging, multimedia playing, and social, among others. In practical application, the APP preset in the terminal may refer to all APPs installed in the terminal, or may refer to a part of APPs specified by a user in all APPs installed in the terminal. And taking the packet name of each APP as an index key, and recording the use times and the use duration of each APP. The use frequency indicates the use times of each APP in a preset time length, such as: 5 times per day.
And reading the generation time of each cache data read within a preset time length in all the cache data of each APP recorded in the record. For example: if the user checks 12 chat records of yesterday and the last day in 24 hours through the instant messaging APP, the generation time of the 12 chat records is recorded in the reading record.
S102, determining the number of cache data retention days corresponding to each application according to the use frequency and the reading record;
and analyzing the habit of the user for browsing the cache data of different APPs according to the generation time of the read cache data of each APP within the preset time length recorded in the read record. And establishing a data cleaning model according to the use frequency of each APP and the habit of a user browsing the cache data of different APPs so as to determine the respective corresponding cache data retention days of the different APPs. It is understood that the higher the usage frequency, the earlier the generation time of the read cache data within the preset time length is, and the longer the number of cache data retention days is.
S103, when the system time reaches a preset cleaning time point, searching data to be cleaned in the cache data of each application according to the number of days for retaining each cache data, and cleaning.
The preset cleaning time point can be set according to user-defined operation of a user. And detecting whether the system time reaches the preset cleaning time point, and searching and cleaning data to be cleaned in the cache data of the APP corresponding to each cache data retention day according to each cache data retention day when the system time reaches the preset cleaning time point. The data to be cleaned is the data with the cache duration exceeding the number of cache data retention days in the cache data of each APP.
It should be noted that, acquiring the use frequency and the read record, and determining the number of cache data retention days corresponding to each application according to the use frequency and the read record is a process of periodically triggering execution for multiple cycles. When the starting time point of the first preset time limit arrives, triggering and executing the steps of acquiring the use frequency and the reading record, and determining the number of cache data retention days corresponding to each application according to the use frequency and the reading record; and when the starting time point of the next preset time limit arrives, triggering and executing the steps of obtaining the use frequency and the reading record again, determining the number of cache data retention days corresponding to each application according to the use frequency and the reading record, and repeating the steps until the number of circulation reaches the preset number or the interruption operation is interrupted according to the interruption operation of the user.
Similarly, at the preset cleaning time point, the process of executing the cache data cleaning operation is also a process of periodically triggering the execution for multiple times of circulation. The cycle of executing the cache data cleaning operation may be consistent with or inconsistent with the cycle of obtaining the use frequency and the read record, and determining the number of cache data retention days corresponding to each application according to the use frequency and the read record. For example, the operation of acquiring the usage frequency and the read record once a day, and determining the number of cache data retention days corresponding to each application according to the usage frequency and the read record may be performed, but the operation of performing the cache data cleaning operation at the preset cleaning time point may be performed once every three days.
According to the cache data cleaning method provided by the embodiment of the invention, the use frequency of the applications preset in the terminal and the reading records of the cache data of each application are regularly obtained within the preset duration, and the data cleaning model is established by combining the use frequency and the generation time of the cache data of each application read within the preset duration recorded in the reading records, and the cache data of each application is specifically processed according to the data cleaning model; on the other hand, the data cleaning model is established based on the use frequency of each application and the habit of browsing the cache data by the user, so that the cleaning operation has more flexibility and pertinence, and the actual requirements of the user are better met, thereby being more intelligent.
Referring to fig. 3, fig. 3 is a schematic flow chart illustrating an implementation of a cache data cleaning method according to a second embodiment of the present invention. The cache data cleaning method provided in this embodiment can be applied to the terminal 10 shown in fig. 1, as shown in fig. 3, the method mainly includes the following steps:
s201, regularly acquiring the use frequency of applications preset in the terminal and the reading record of cache data of each application within a preset time length;
specifically, the predetermined period and the preset time duration may be set according to a user-defined operation, and optionally, the predetermined period and the preset time duration are both set as default to one day (24 hours), for example, 12 hours per night: 00 obtains the use frequency of each Application (APP) installed in the terminal within 24 hours (0: 00-24: 00) of the day, and the reading record of the cache data of each APP within 24 hours of the day.
The preset APP types in the terminal may include, but are not limited to: web browsing, instant messaging, multimedia playing, and social, among others. In practical application, the APP preset in the terminal may refer to all APPs installed in the terminal, or may refer to a part of APPs specified by a user in all APPs installed in the terminal. And taking the packet name of each APP as an index key, and recording the use times and the use duration of each APP. The use frequency indicates the use times of each APP in a preset time length, such as: 5 times per day.
And recording the generation time of each read cache data in all the cache data of each APP within a preset time length in the read record. For example: if the user checks 12 chat records of yesterday and the last day in 24 hours through the instant messaging APP, the generation time of the 12 chat records is recorded in the reading record.
S202, respectively obtaining target data with the earliest generation time from the generation time of each cache data recorded in each reading record, and taking the generation time of each target data as the browsing span of each corresponding application;
browsing span, which indicates how many days ago a user may view cache data of a certain APP, such as: the instant messaging APP user only looks at the current day chat records and the friend circle messages, and the user can often look at yesterday or previous day cache information. In other words, the browsing span can be considered as: and the time span between the acquisition time of the read record and the generation time of the data with the longest cache duration in all the cache data viewed by the user within the preset duration recorded in the read record. It will be appreciated that the earlier the production time, the greater the time span or browsing span. For example: and 9, 5 days in 9 months, wherein the chat records of 3 days in 9 months and 2 days in 9 months are checked by the WeChat user, so that 5 days in 9 months, the time span of WeChat is 3 days, and the browsing span is 2 days in 9 months. Alternatively, the day or hour is used as a measure of the viewing span.
Or, the cache duration of the data with the earliest time generated in all the cache data of the APP viewed by the user within the preset duration recorded in the read record of a certain APP may be used as the browsing span of the APP.
S203, determining the number of cache data retention days corresponding to each application according to the use frequency and the browsing span;
specifically, the determining method for determining the number of cache data retention days corresponding to each APP according to the use frequency and the browsing span may include the following steps:
step one, ranking the frequency of each application according to the sequence of the use frequency from high to low, and determining the frequency integral of each application according to a ranking result and a preset frequency integral determining rule;
TABLE 1
APP Frequency of use (times/day) Browsing span (time)
Pkg1 A1=10 B1 day (or 3 days) 9 month
Pkg2 A2=30 B2 day 2 month (or 4 days)
Pkg3 A3=17 B3 day 1 month (or 5 days)
Pkg4 A4=25 B4-8 month-30 days (or 7 days)
…… …… ……
TABLE 2
Figure BDA0001111387370000101
Specifically, with reference to table 1 and table 2, the frequency ranking of the APPs is performed in the order of the use frequency from high to low, and the higher the use frequency, the higher the ranking. And secondly, determining the frequency integral of each APP according to the ranking result of the frequency ranking and a preset frequency integral determining rule, wherein the frequency integral is more when the frequency ranking is higher.
Further, determining the frequency integral of each APP according to the ranking result of the frequency ranking and a preset frequency integral determination rule, specifically comprising: and determining a preset upper limit value of the frequency integral as the frequency integral of the APP with the first frequency ranking, and then determining the frequency integral of other APPs except the APP with the first frequency ranking according to a mode of gradually decreasing the preset decreasing interval of the frequency integral. Or, further, when determining the frequency integrals of the APPs other than the APP with the first frequency rank in a manner of being gradually decreased according to a preset frequency integral decreasing interval, when decreasing to a preset frequency integral lower limit value, determining the frequency integral lower limit value as the frequency integral of all the remaining APPs for which the frequency integral is not determined.
For example, as shown in table 2 above, assuming that the preset upper limit value of the frequency integral is 10 points, the preset lower limit value of the frequency integral is 1 point, the decrement interval of the frequency integral is 1, and the frequency ranking results are as follows in order from top to bottom: pkg2, Pkg4, Pkg3, Pkg1, Pkg7, Pkg5, Pkg6, Pkg8, Pkg9, Pkg10 and Pkg11, the corresponding integrals are respectively as follows according to the frequency integral determination rule: pkg2 ═ 10 points, Pkg4 ═ 9 points, Pkg3 ═ 8 points, Pkg1 ═ 7 points, Pkg7 ═ 6 points, Pkg5 ═ 5 points, Pkg6 ═ 4 points, Pkg8 ═ 3 points, Pkg9 ═ 2 points, Pkg10 ═ 1 points, and Pkg11 ═ 1 points. It can be understood that when the integral reaches the lower limit value when the Pkg10 is determined, the frequency integral of each APP (such as the Pkg11) after the rank 10 is all 1.
Step two, carrying out span ranking on each application according to the sequence of browsing spans from large to small, determining the span integral of each application according to a ranking result and a preset span integral determining rule, wherein the higher the span ranking is, the more the span integral is;
specifically, with reference to the above table 1 and table 2, first, the APP is ranked in order of browsing span from large to small, that is, in order of generation time of the target data, where the earlier the generation time is, the larger the browsing span is. Secondly, determining the span integral of each APP according to the ranking result and a preset span integral determination rule, wherein the higher the span ranking is, the more the span integral is.
Further, determining the span integral of each APP according to the ranking result and a preset span integral determination rule specifically includes: determining a preset span integral upper limit value as the span integral of the APP with the first span ranking; and determining the span integrals of other APPs except the APP with the first span ranking in a mode of gradually decreasing according to a preset span integral decreasing interval. Or, further, when determining the span integrals of other APPs except the APP with the first span ranking in a manner of gradually decreasing according to a preset span integral decreasing interval, when decreasing to a preset span integral lower limit value, determining the span integral lower limit value as the span integral of all the remaining APPs for which the span integral is not determined.
For example, as shown in table 2 above, assuming that the preset upper value of the span integral is 10 minutes, the preset lower value of the span integral is 1 minute, the descending interval of the span integral is 1, and the span ranking results are sequentially from high to low: pkg4, Pkg3, Pkg2, Pkg1, Pkg5, Pkg6, Pkg7, Pkg8, Pkg9, Pkg10 and Pkg11, the corresponding integrals are respectively: pkg4 ═ 10 points, Pkg3 ═ 9 points, Pkg2 ═ 8 points, Pkg1 ═ 7 points, Pkg5 ═ 6 points, Pkg6 ═ 5 points, Pkg7 ═ 4 points, Pkg8 ═ 3 points, Pkg9 ═ 2 points, Pkg10 ═ 1 points, and Pkg11 ═ 1 points. It can be understood that, for the top 10 APPs, the integral is determined in a decreasing manner, and when the 10 th APP is determined, the integral after the 10 th APP is 1 point because the integral reaches the lower limit value.
Step three, obtaining the total integral of each application according to the frequency integral and the frequency weight value corresponding to the frequency integral and the span weight value corresponding to the span integral;
the frequency weight value that the frequency integral corresponds and the span weight value that the span integral corresponds can set up according to user's custom operation, and wherein, frequency weight value + span weight value equals 100%, and each APP's total integral equals frequency integral value + span integral value. Optionally, the frequency weight value is 40% and the span weight value is 60%.
And fourthly, performing score ranking on each application according to the sequence of the total scores from most to few, and determining the cache data retention days corresponding to each application according to the ranking result and a preset determination rule, wherein the higher the score ranking is, the longer the corresponding cache data retention days are.
TABLE 3
Total points ranking Number of cache data retention days
Pkg4 5
Pkg2 4
Pkg3 3
Pkg1 2
Pkg5 1
…… 1
Specifically, with reference to tables 1 to 3, the APP is subjected to integral ranking in the order of the total integral from the top to the bottom, and the higher the total integral is, the higher the ranking is. Secondly, determining the number of cache data retention days corresponding to each APP according to the ranking result and a preset determination rule, wherein the higher the integral ranking is, the longer the number of cache data retention days corresponding to each APP is.
Further, determining the number of cache data retention days corresponding to each APP according to the ranking result and a preset determination rule specifically includes: determining a preset upper limit value of cache data retention days as cache data retention days corresponding to the APP with the first integral ranking; and determining the number of cache data retention days corresponding to other APPs except the APP with the first integral ranking according to a mode of gradually decreasing according to a preset total integral decreasing interval. Further, when determining the number of cache data retention days corresponding to other APPs except for the APP with the first integral ranking in a manner of gradually decreasing according to a preset total integral decreasing interval, and when decreasing to a preset lower limit value of the number of cache data retention days, determining the lower limit value as the number of cache data retention days corresponding to the remaining APPs with undetermined retention days. The upper limit value of the number of cache data retention days can be configured according to user-defined operation of a user. Optionally, an average value of the cache durations of the target data corresponding to each APP may be taken as an upper limit value of the number of cache data retention days.
For example, as shown in table 3 above, assuming that the preset upper limit of the number of cache data retention days is 5 days, the lower limit of the number of cache data retention days is 1 day, and the total point decrement interval is 1, the ranking results of the points from Pkg1 to Pkg5 are as follows from high to low: pkg4(9 × 40% +10 × 60% ═ 9.6 points), Pkg2(10 × 40% +8 × 60% + 8.8 points), Pkg3(8 × 40% +9 × 60% + 8.4 points), Pkg1(7 × 40% +7 × 60% +7 points), and Pkg5(5 × 40% + 6% + 60% + 5.6 points), the corresponding days of retention were, according to the above-identified rules: 5 days for Pkg4, 4 days for Pkg3, 3 days for Pkg2, 2 days for Pkg1 and 1 day for Pkg 5. If the total integral of other APPs is less than Pkg5, the remaining days for the other APPs are all 1 day.
And S204, when the system time reaches a preset cleaning time point, searching the data to be cleaned in the cache data of each application according to the number of the reserved days of each cache data, and cleaning.
And detecting whether the system time reaches a preset cleaning time point, and searching and cleaning data to be cleaned in the cache data of each APP according to the number of days of retention of each cache data when the system time reaches the preset cleaning time point. Wherein, the data to be cleaned is: in the cache data of each APP, the cache duration exceeds the data of the cache data retention days. For example, as shown in table 3, the application of Pkg4 will clear the buffered data generated 5 days ago each day, Pkg2 will clear the data generated 4 days ago each day, Pkg3 will clear the data generated 3 days ago each day, and so on.
In another embodiment of the present invention, cache data scrubbing may be selectively performed. Specifically, at any time point before cleaning, in response to a marking operation of a user, a preset mark is added to an application pointed by the marking operation. Judging whether the APP has a preset mark or not during cleaning; if the preset mark does not exist, searching data to be cleaned in the cache data of the APP according to the number of cache data retention days corresponding to the APP, and cleaning; and if the preset mark exists, not performing cache data cleaning operation on the APP. Like this, allow the user to carry out selective mark to each APP according to own needs, can make cache data cleaning operation more pointed, more accord with user's actual demand, improve the flexibility of cache data cleaning operation.
In another embodiment of the present invention, the number of cache data retention days can be corrected according to the manual cleaning habit of the user, so that the number of cache data retention days more meets the actual requirement of the user, and the cleaning result is more accurate. Specifically, when the data cleaning operation of the user is detected, according to the target retention days input by the user, the data with the cache duration exceeding the target retention days in the cache data of the target APP pointed by the data cleaning operation is cleaned; analyzing whether the error between the target retention days and the cache data retention days corresponding to the target APP is out of a preset error interval or not; and if the current time is out of the error interval, adjusting the cache data retention days corresponding to the target APP according to the target retention days and a preset adjustment rule.
The cache data retention days corresponding to the target APP are adjusted according to the target retention days and a preset adjustment rule, and specifically, the cache data retention days corresponding to the target APP are adjusted to be consistent with the target retention days input by the user.
Optionally, the cache data retention days corresponding to the target APP are adjusted according to the target retention days and a preset adjustment rule, and specifically, the method may further include: analyzing whether the frequency of the error occurrence is greater than a preset frequency in the previous data cleaning operation process; if the number of the cache data retention days corresponding to the target APP is larger than the preset number, the number of the cache data retention days corresponding to the target APP is adjusted to be consistent with the number of the target retention days, and the modification permission of the cache data retention days corresponding to the target APP is locked, so that the modification operation of the cache data retention days corresponding to the target APP is forbidden.
For example, in connection with table 3, it is assumed that the cached data before 3 days of Pkg4 is currently processed according to the target retention days (3 days) of Pkg4 input by the user, and the cache data retention days corresponding to the Pkg4 is 5 days. At this time, the error between the target number of retention days corresponding to Pkg4 and the number of retention days of the cache data is-2, and is out of the preset error interval [ -1, 1 ]. If the error is-2 for 10 times and the preset number of times is 7 for Pkg4 in the process of the data cleaning operation, the number of cache data retention days of Pkg4 is adjusted to 3 days. Meanwhile, the modification authority of the number of cache data retention days of the Pkg4 is locked, so that the number of cache data retention days of the Pkg4 is not modified. The specific locking mode can be by adding a forbidden revision flag, or setting the attribute of the setting parameter of the number of cache data retention days of Pkg4 as unchangeable.
Furthermore, the user can be regularly reminded of carrying out manual cleaning operation, and then the cache data retention days are adjusted according to the manual cleaning habit of the user when the user carries out the manual cleaning operation. Specifically, prompt information is output periodically to prompt a user to clear cache data of each APP; and responding to a cleaning instruction triggered by a user, and cleaning data of which the cache duration exceeds the target retention days in the cache data of the target APP pointed by the cleaning instruction according to the target retention days input by the user. Then, analyzing whether the error between the target retention days and the cache data retention days corresponding to the target APP is out of a preset error interval or not; and if the current time is out of the preset error interval, adjusting the number of cache data retention days corresponding to the target APP according to the target retention days and a preset adjustment rule.
According to the cache data cleaning method provided by the embodiment of the invention, the use frequency of the applications preset in the terminal and the reading records of the cache data of each application are regularly obtained within the preset duration, and the data cleaning model is established by combining the use frequency and the generation time of the cache data of each application read within the preset duration recorded in the reading records, and the cache data of each application is specifically processed according to the data cleaning model; on the other hand, the data cleaning model is established based on the use frequency of each application and the habit of browsing the cache data by the user, so that the cleaning operation has more flexibility and pertinence, and the actual requirements of the user are better met, thereby being more intelligent.
Referring to fig. 4, fig. 4 is a schematic structural diagram of a cache data cleaning apparatus according to a third embodiment of the present invention, and for convenience of description, only the parts related to the embodiment of the present invention are shown. The cache data cleaning apparatus illustrated in fig. 4 may be an execution subject of the cache data cleaning method provided in the foregoing embodiment, and may be a terminal or a functional module of the terminal. The cache data cleaning device illustrated in fig. 4 mainly includes: an acquisition module 31, a determination module 32 and a cleaning module 33. The functional modules are explained in detail as follows:
an obtaining module 31, configured to periodically obtain, within a preset time duration, a use frequency of an application preset in a terminal and a read record of cache data of each application, where the read record records a generation time of the cache data of each application read within the preset time duration;
a determining module 32, configured to determine, according to the usage frequency and the read record, the number of cache data retention days corresponding to each application;
the cleaning module 33 is configured to, when the system time reaches a preset cleaning time point, search for data to be cleaned in the cache data of each application according to the number of days for which the cache data is reserved, and perform cleaning, where the data to be cleaned is: and in the cache data of each application, the cache duration exceeds the data of the number of retention days of the cache data.
Specifically, the obtaining module 31 obtains the use frequency of the application preset in the terminal and the reading record of the cache data of each application within a preset time period at regular intervals, and then the triggering determining module 32 determines the number of cache data retention days corresponding to each application according to the use frequency and the reading record. The cleaning module 33 detects whether the system time reaches a preset cleaning time point, and when the system time reaches the preset cleaning time point, searches for data to be cleaned in the cache data of each application according to the number of days for retaining each cache data, and cleans the data.
Reference is made to the related contents of the first and second embodiments, which are not exhaustive in the present embodiment.
According to the cache data cleaning device provided by the embodiment of the invention, the use frequency of the applications preset in the terminal and the reading records of the cache data of each application are regularly obtained within the preset duration, and the data cleaning model is established by combining the use frequency and the generation time of the cache data of each application read within the preset duration recorded in the reading records, and the cache data of each application is specifically processed according to the data cleaning model; on the other hand, the data cleaning model is established based on the use frequency of each application and the habit of browsing the cache data by the user, so that the cleaning operation has more flexibility and pertinence, and the actual requirements of the user are better met, thereby being more intelligent.
Referring to fig. 5, fig. 5 is a schematic structural diagram of a cache data cleaning apparatus according to a fourth embodiment of the present invention, and for convenience of description, only the parts related to the embodiment of the present invention are shown. The cache data cleaning apparatus illustrated in fig. 5 may be an execution subject of the cache data cleaning method provided in the foregoing embodiment, and may be a terminal or a functional module in the terminal. On the basis of the cache data cleaning apparatus illustrated in fig. 4, unlike the third embodiment, in this embodiment:
further, the determination module 32 includes:
a span determining module 321, configured to obtain target data with the earliest generation time from the generation time of each piece of cache data recorded in each read record, and use the generation time of each piece of target data as a browsing span of each corresponding application;
the number-of-days determining module 322 is configured to determine, according to the usage frequency and the browsing span, a number of cache data retention days corresponding to each application.
Further, the day determination module 322 includes:
a frequency integral determining module 3221, configured to rank the frequencies of the applications in order from high to low according to the use frequencies, and determine a frequency integral of each application according to a ranking result and a preset frequency integral determining rule, where the higher the frequency ranking is, the more the frequency integral is;
a span score determining module 3222, configured to perform span ranking on the applications according to a sequence of the browsing spans from large to small, and determine a span score of each application according to a ranking result and a preset span score determining rule, where the higher the span ranking is, the more the span score is;
a total score obtaining module 3223, configured to obtain a total score of each application according to the frequency score and a frequency weight value corresponding to the frequency score, and the span score and a span weight value corresponding to the span score;
the number-of-days determining sub-module 3224 is configured to perform score ranking on the applications according to the order of the total score from the largest to the smallest, and determine, according to the ranking result and a preset determination rule, the number of cache data retention days corresponding to each application, where the higher the score ranking is, the longer the corresponding cache data retention days are.
Further, the number-of-days determining submodule 3224 is specifically configured to determine, as the number of cache data retention days corresponding to the application with the first score ranking, a preset upper limit value of cache data retention days; determining cache data retention days corresponding to other applications except the application with the first integral ranking according to a mode of gradually decreasing according to a preset total integral decreasing interval, wherein when the cache data retention days decrease to a preset cache data retention day lower limit value, the cache data retention day lower limit value is determined as cache data retention days corresponding to the remaining applications with undetermined retention days;
the number-of-days determining submodule 3224 is further configured to specifically take an average value of the cache durations of the target data, and use the average value as an upper limit value of the number of days for retaining the cache data;
the frequency integral determining module 3221 is specifically configured to determine a preset upper limit value of frequency integral as the frequency integral of the application with the first frequency rank; determining frequency integrals of other applications except the application with the first frequency ranking in a mode of gradually decreasing according to a preset frequency integral decreasing interval, wherein when the frequency integrals decrease to a preset frequency integral lower limit value, the frequency integral lower limit value is determined as the frequency integral of all the remaining applications of which the frequency integrals are not determined;
the span integral determining module 3222 is specifically configured to determine a preset span integral upper limit value as the span integral of the application with the first span ranking; and determining the span integrals of the other applications except the application with the first span ranking in a mode of gradually decreasing according to a preset span integral decreasing interval, wherein when the span integral decreases to a preset span integral lower limit value, the span integral lower limit value is determined as the span integral of all the rest applications which are not determined by the span integral.
Further, the cleaning module 33 is further configured to, when detecting a data cleaning operation of a user, clean, according to a target retention number of days input by the user, data whose cache duration exceeds the target retention number of days in the cache data of the target application to which the data cleaning operation points;
the device also includes:
the analysis module 41 is configured to analyze whether an error between the number of target retention days and the number of cache data retention days corresponding to the target application is outside a preset error interval;
a correcting module 42, configured to adjust the number of cache data retention days corresponding to the target application according to the target retention days and a preset adjustment rule if the error is outside the preset error interval;
the correction module 42 is specifically configured to analyze whether the number of times of occurrence of the error is greater than a preset number of times in the previous data cleaning operation process; if the number of the cache data retention days corresponding to the target application is larger than the preset number, the number of the cache data retention days corresponding to the target application is adjusted to be consistent with the number of the target retention days, and the modification authority of the cache data retention days corresponding to the target application is locked, so that the modification operation of the cache data retention days corresponding to the target application is forbidden.
Further, the apparatus further comprises:
a marking module 43, configured to add a preset mark to an application pointed by a marking operation in response to the marking operation of a user;
a cleaning module 33, specifically configured to determine whether the application has the preset mark; if the preset mark is not available, searching data to be cleaned in the cache data of the application according to the number of cache data retention days corresponding to the application, and cleaning; and if the preset mark exists, the cache data cleaning operation is not carried out on the application.
Optionally, the cleaning module 33 may be further configured to periodically remind the user of performing a manual cleaning operation, and then trigger the correction module 42 to adjust the number of cache data retention days according to a manual cleaning habit of the user when the user performs the manual cleaning operation. Specifically, the cleaning module 33 periodically outputs prompt information to prompt a user to clean the cache data of each APP, then responds to a cleaning instruction triggered by the user, and cleans data, of which the cache duration exceeds the target retention days, in the cache data of the target APP to which the cleaning instruction points according to the target retention days input by the user. Then, the trigger analysis module 41 analyzes whether the error between the target retention days and the cache data retention days corresponding to the target APP is outside the preset error interval. If the current time is out of the preset error interval, the trigger correction module 42 adjusts the number of cache data retention days corresponding to the target APP according to the target retention days and the preset adjustment rule.
The specific process of each module for implementing its function may refer to the related contents in the first embodiment and the second embodiment, and is not described herein again.
According to the cache data cleaning device provided by the embodiment of the invention, the use frequency of the applications preset in the terminal and the reading records of the cache data of each application are regularly obtained within the preset duration, and the data cleaning model is established by combining the use frequency and the generation time of the cache data of each application read within the preset duration recorded in the reading records, and the cache data of each application is specifically processed according to the data cleaning model; on the other hand, the data cleaning model is established based on the use frequency of each application and the habit of browsing the cache data by the user, so that the cleaning operation has more flexibility and pertinence, and the actual requirements of the user are better met, thereby being more intelligent.
In the several embodiments provided in the present application, it should be understood that the disclosed method, apparatus, and terminal may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the module is only one logical division, and other divisions may be realized in practice, for example, a plurality of modules or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or modules, and may be in an electrical, mechanical or other form.
The modules described as separate parts may or may not be physically separate, and parts displayed as modules may or may not be physical modules, may be located in one place, or may be distributed on a plurality of network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
In addition, functional modules in the embodiments of the present invention may be integrated into one processing module, or each of the modules may exist alone physically, or two or more modules are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode.
The integrated module, if implemented in the form of a software functional module and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
It should be noted that, for the sake of simplicity, the above-mentioned method embodiments are described as a series of acts or combinations, but those skilled in the art should understand that the present invention is not limited by the described order of acts, as some steps may be performed in other orders or simultaneously according to the present invention. Further, those skilled in the art will appreciate that the embodiments described in the specification are presently preferred and that no acts or modules are necessarily required of the invention.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the above description, for the method, the apparatus and the terminal for clearing cache data provided by the present invention, for those skilled in the art, according to the idea of the embodiment of the present invention, there may be changes in the specific implementation and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (15)

1. A cache data cleaning method is characterized by comprising the following steps:
periodically acquiring the use frequency of applications preset in a terminal and a reading record of cache data of each application within a preset time length, wherein the reading record records the generation time of the cache data of each application read within the preset time length;
determining the number of cache data retention days corresponding to each application according to the use frequency and the reading record;
when the system time reaches a preset cleaning time point, searching data to be cleaned in the cache data of each application according to the number of retention days of each cache data, and cleaning, wherein the data to be cleaned is as follows: in the cache data of each application, the cache duration exceeds the data of the number of retention days of the cache data;
determining the number of cache data retention days corresponding to each application according to the use frequency and the read record, wherein the determining comprises:
respectively obtaining target data with the earliest generation time from the generation time of each cache data recorded in each read record, and taking the generation time of each target data as the browsing span of each corresponding application;
and determining the number of cache data retention days corresponding to each application according to the use frequency and the browsing span.
2. The method for cleaning up cached data according to claim 1, wherein the determining, according to the frequency of use and the browsing span, the number of cache data retention days corresponding to each of the applications comprises:
according to the sequence of the use frequency from high to low, performing frequency ranking on each application, and determining the frequency integral of each application according to a ranking result and a preset frequency integral determining rule, wherein the higher the frequency ranking is, the more the frequency integral is;
performing span ranking on each application according to the sequence of the browsing spans from large to small, and determining the span integral of each application according to a ranking result and a preset span integral determination rule, wherein the higher the span ranking is, the more the span integral is;
obtaining a total integral of each application according to the frequency integral and a frequency weight value corresponding to the frequency integral and the span integral and a span weight value corresponding to the span integral;
and performing score ranking on each application according to the sequence of the total scores from the largest to the smallest, and determining the cache data retention days corresponding to each application according to a ranking result and a preset determination rule, wherein the higher the score ranking is, the longer the corresponding cache data retention days are.
3. The method for cleaning up cached data according to claim 2, wherein the determining, according to the ranking result and a preset determination rule, the number of cache data retention days corresponding to each application comprises:
determining the preset upper limit value of the cache data retention days as the cache data retention days corresponding to the application with the first integral ranking;
and determining the cache data retention days corresponding to other applications except the application with the first integral ranking according to a mode of gradually decreasing according to a preset total integral decreasing interval, wherein when the cache data retention days decrease to a preset cache data retention day lower limit value, the cache data retention day lower limit value is determined as the cache data retention days corresponding to the residual applications with undetermined retention days.
4. The cache data scrubbing method according to claim 3, wherein said method further comprises:
and taking the average value of the caching duration of each target data as the upper limit value of the number of the caching data retention days.
5. The method for cleaning up cached data according to claim 2, wherein the determining the frequency score of each application according to the ranking result and a preset frequency score determination rule comprises:
determining a preset upper limit value of the frequency integral as the frequency integral of the application with the first frequency ranking;
and determining the frequency integrals of other applications except the application with the first frequency ranking in a mode of gradually decreasing according to a preset frequency integral decreasing interval, wherein when the frequency integral decreases to a preset frequency integral lower limit value, the frequency integral lower limit value is determined as the frequency integral of all the rest applications of which the frequency integrals are not determined.
6. The method for cleaning up cached data according to claim 2, wherein the determining the span score of each application according to the ranking result and a preset span score determination rule comprises:
determining a preset span integral upper limit value as the span integral of the application with the first span ranking;
and determining the span integrals of other applications except the application with the first span ranking in a mode of gradually decreasing according to a preset span integral decreasing interval, wherein when the span integrals decrease to a preset span integral lower limit value, the span integral lower limit value is determined as the span integrals of all the rest applications which are not determined by the span integrals.
7. The cache data scrubbing method according to claim 1, wherein said method further comprises:
when data cleaning operation of a user is detected, according to the target retention days input by the user, cleaning data of which the cache duration exceeds the target retention days in the cache data of the target application pointed by the data cleaning operation;
analyzing whether the error between the target retention days and the cache data retention days corresponding to the target application is out of a preset error interval or not;
and if the current time interval is outside the preset error interval, adjusting the number of cache data retention days corresponding to the target application according to the target retention days and a preset adjustment rule.
8. The method for clearing cache data according to claim 7, wherein the adjusting the number of cache data retention days corresponding to the target application according to the number of target retention days and a preset adjustment rule comprises:
analyzing whether the occurrence frequency of the errors is greater than a preset frequency in the previous data cleaning operation process;
if the number of the cache data retention days corresponding to the target application is larger than the preset number of times, adjusting the number of the cache data retention days corresponding to the target application to be consistent with the target retention days, and locking the modification authority of the cache data retention days corresponding to the target application so as to forbid the modification operation of the cache data retention days corresponding to the target application.
9. The cache data scrubbing method according to any one of claims 1 to 8, wherein said method further comprises:
responding to a marking operation of a user, and adding a preset mark for an application pointed by the marking operation;
the searching and cleaning the data to be cleaned in the cache data of each application according to the number of the cache data retention days comprises the following steps:
judging whether the application has the preset mark;
if the preset mark is not available, searching data to be cleaned in the cache data of the application according to the number of cache data retention days corresponding to the application, and cleaning;
and if the preset mark exists, not performing cache data cleaning operation on the application.
10. A cache data scrubbing apparatus, said apparatus comprising:
the acquisition module is used for periodically acquiring the use frequency of applications preset in the terminal and the reading record of the cache data of each application within a preset time length, wherein the reading record records the generation time of the cache data of each application read within the preset time length;
the determining module is used for determining the number of cache data retention days corresponding to each application according to the use frequency and the reading record;
the cleaning module is used for searching data to be cleaned in the cache data of each application according to the number of retention days of each cache data when the system time reaches a preset cleaning time point, and cleaning the data to be cleaned, wherein the data to be cleaned is: in the cache data of each application, the cache duration exceeds the data of the number of retention days of the cache data;
the determining module comprises:
a span determining module, configured to obtain target data with the earliest generation time from generation times of the cache data recorded in the read records, respectively, and use the generation time of each target data as a browsing span of a corresponding application;
and the number-of-days determining module is used for determining the number of cache data retention days corresponding to each application according to the use frequency and the browsing span.
11. The cache data scrubbing apparatus according to claim 10, wherein said number-of-days determining module comprises:
a frequency integral determining module, configured to perform frequency ranking on each application according to a sequence from high to low of the usage frequency, and determine a frequency integral of each application according to a ranking result and a preset frequency integral determining rule, where the higher the frequency ranking is, the more the frequency integral is;
the span integral determining module is used for carrying out span ranking on the applications according to the sequence of the browsing spans from large to small, and determining the span integral of each application according to a ranking result and a preset span integral determining rule, wherein the higher the span ranking is, the more the span integral is;
a total score obtaining module, configured to obtain a total score of each application according to the frequency score and a corresponding frequency weight value thereof, and the span score and a corresponding span weight value thereof;
and the number-of-days determining submodule is used for performing point ranking on each application according to the sequence of the total points from most to least, and determining the number of cache data retention days corresponding to each application according to the ranking result and a preset determining rule, wherein the higher the point ranking is, the longer the corresponding cache data retention days are.
12. The cache data scrubbing apparatus according to claim 11,
the number-of-days determination submodule is specifically configured to determine a preset cache data retention number-of-days upper limit value as a cache data retention number of days corresponding to an application with a first integral ranking; determining cache data retention days corresponding to other applications except the application with the first integral ranking according to a mode of gradually decreasing according to a preset total integral decreasing interval, wherein when the cache data retention days decrease to a preset cache data retention day lower limit value, the cache data retention day lower limit value is determined as the cache data retention days corresponding to the remaining applications with undetermined retention days;
the number-of-days determining submodule is further specifically configured to take an average value of cache durations of the target data as an upper limit value of the number of days for retaining the cache data;
the frequency integral determining module is specifically configured to determine a preset upper limit value of the frequency integral as the frequency integral of the application with the first frequency ranking; determining frequency integrals of other applications except the application with the first frequency ranking in a mode of gradually decreasing according to a preset frequency integral decreasing interval, wherein when the frequency integrals decrease to a preset frequency integral lower limit value, the frequency integral lower limit value is determined as the frequency integral of all the remaining applications of which the frequency integrals are not determined;
the span integral determining module is specifically configured to determine a preset span integral upper limit value as a span integral of an application with a first span ranking; and determining the span integrals of other applications except the application with the first span ranking in a mode of gradually decreasing according to a preset span integral decreasing interval, wherein when the span integrals decrease to a preset span integral lower limit value, the span integral lower limit value is determined as the span integrals of all the rest applications which are not determined by the span integrals.
13. The cache data scrubbing apparatus according to claim 10,
the cleaning module is further configured to, when a data cleaning operation of a user is detected, clean data, of which the cache duration exceeds the target retention days, in the cache data of the target application to which the data cleaning operation points according to the target retention days input by the user;
the device further comprises:
the analysis module is used for analyzing whether the error between the target retention days and the cache data retention days corresponding to the target application is out of a preset error interval or not;
the correction module is used for adjusting the cache data retention days corresponding to the target application according to the target retention days and a preset adjustment rule if the error is outside the preset error interval;
the correction module is specifically used for analyzing whether the frequency of the error occurrence is greater than a preset frequency in the previous data cleaning operation process; if the number of the cache data retention days corresponding to the target application is larger than the preset number of times, adjusting the number of the cache data retention days corresponding to the target application to be consistent with the target retention days, and locking the modification authority of the cache data retention days corresponding to the target application so as to forbid the modification operation of the cache data retention days corresponding to the target application.
14. The cache data scrubbing apparatus according to any one of claims 10 to 13, wherein said apparatus further comprises:
the marking module is used for responding to marking operation of a user and adding a preset mark to an application pointed by the marking operation;
the cleaning module is specifically configured to determine whether the application has the preset mark; if the preset mark is not available, searching data to be cleaned in the cache data of the application according to the number of cache data retention days corresponding to the application, and cleaning; and if the preset mark exists, not performing cache data cleaning operation on the application.
15. A terminal, characterized in that the terminal runs therein the cache data cleaning apparatus according to any one of claims 10 to 14.
CN201610811176.4A 2016-09-08 2016-09-08 Cache data cleaning method and device and terminal Active CN106372003B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610811176.4A CN106372003B (en) 2016-09-08 2016-09-08 Cache data cleaning method and device and terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610811176.4A CN106372003B (en) 2016-09-08 2016-09-08 Cache data cleaning method and device and terminal

Publications (2)

Publication Number Publication Date
CN106372003A CN106372003A (en) 2017-02-01
CN106372003B true CN106372003B (en) 2020-01-10

Family

ID=57899525

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610811176.4A Active CN106372003B (en) 2016-09-08 2016-09-08 Cache data cleaning method and device and terminal

Country Status (1)

Country Link
CN (1) CN106372003B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107193885A (en) * 2017-04-27 2017-09-22 维沃移动通信有限公司 A kind of data cached management method of music and mobile terminal
CN107291632B (en) * 2017-06-06 2020-03-27 北京金山安全软件有限公司 Method and device for clearing cache data and terminal equipment
CN109542802A (en) * 2018-11-26 2019-03-29 努比亚技术有限公司 Data cached method for cleaning, device, mobile terminal and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104731712A (en) * 2015-02-06 2015-06-24 深圳市中兴移动通信有限公司 Method for automatically cleaning up caching data and mobile terminal
CN105095107A (en) * 2014-05-04 2015-11-25 腾讯科技(深圳)有限公司 Buffer memory data cleaning method and apparatus
CN105893173A (en) * 2015-12-10 2016-08-24 乐视网信息技术(北京)股份有限公司 Caching data processing method and device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105095107A (en) * 2014-05-04 2015-11-25 腾讯科技(深圳)有限公司 Buffer memory data cleaning method and apparatus
CN104731712A (en) * 2015-02-06 2015-06-24 深圳市中兴移动通信有限公司 Method for automatically cleaning up caching data and mobile terminal
CN105893173A (en) * 2015-12-10 2016-08-24 乐视网信息技术(北京)股份有限公司 Caching data processing method and device

Also Published As

Publication number Publication date
CN106372003A (en) 2017-02-01

Similar Documents

Publication Publication Date Title
CN106033419B (en) Method, device and system for pushing messages in real time
CN108733342B (en) Volume adjusting method, mobile terminal and computer readable storage medium
EP3119070B1 (en) Method and device for determining a crank phone number
CN106528745B (en) Method and device for recommending resources on mobile terminal and mobile terminal
AU2022200464B2 (en) Method for reducing power consumption of terminal, and terminal
US20140189597A1 (en) Method and electronic device for presenting icons
US20130078976A1 (en) Adjustable mobile phone settings based on environmental conditions
US9477678B2 (en) Data synchronization management methods and systems
US20210410040A1 (en) Terminal Behavior Triggering Method and Terminal
CN108156508B (en) Barrage information processing method and device, mobile terminal, server and system
CN104917896A (en) Data pushing method and terminal equipment
US20180342231A1 (en) Sound effect parameter adjustment method, mobile terminal and storage medium
CN106372003B (en) Cache data cleaning method and device and terminal
JP6910300B2 (en) A method for displaying chat history records and a device for displaying chat history records
CN105187692A (en) Video recording method and device
CN109842820B (en) Barrage information input method and device, mobile terminal and readable storage medium
CN106649645B (en) Playlist processing method and device
KR20190117753A (en) Message notification method and terminal
EP3137971A1 (en) System and method for providing a user cognitive load service
TW202020652A (en) Voice processing method and apparatus
JP2022008797A (en) Method for reducing power consumption of terminal, and terminal
CN106502833A (en) Data back up method and device
CN107632985B (en) Webpage preloading method and device
CN106304287B (en) Method for reducing standby power consumption of mobile terminal and mobile terminal
CN109213398A (en) A kind of application quick start method, terminal and computer readable storage medium

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information

Address after: 523860 No. 18, Wu Sha Beach Road, Changan Town, Dongguan, Guangdong

Applicant after: OPPO Guangdong Mobile Communications Co., Ltd.

Address before: 523860 No. 18, Wu Sha Beach Road, Changan Town, Dongguan, Guangdong

Applicant before: Guangdong OPPO Mobile Communications Co., Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant