WO2019047045A1 - 一种内存清理方法及用户终端 - Google Patents

一种内存清理方法及用户终端 Download PDF

Info

Publication number
WO2019047045A1
WO2019047045A1 PCT/CN2017/100630 CN2017100630W WO2019047045A1 WO 2019047045 A1 WO2019047045 A1 WO 2019047045A1 CN 2017100630 W CN2017100630 W CN 2017100630W WO 2019047045 A1 WO2019047045 A1 WO 2019047045A1
Authority
WO
WIPO (PCT)
Prior art keywords
application
cleaned
memory
list
applications
Prior art date
Application number
PCT/CN2017/100630
Other languages
English (en)
French (fr)
Inventor
李德鹏
黄成钟
郑雪瑞
Original Assignee
深圳传音通讯有限公司
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 深圳传音通讯有限公司 filed Critical 深圳传音通讯有限公司
Priority to PCT/CN2017/100630 priority Critical patent/WO2019047045A1/zh
Publication of WO2019047045A1 publication Critical patent/WO2019047045A1/zh

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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]

Definitions

  • the present invention relates to the field of electronic device technologies, and in particular, to a memory cleaning method and a user terminal.
  • the user can manually clean up the memory occupied by the application in the user terminal through some memory cleaning software, but this method relies too much on the user's operation, and the user may forget to clean up the memory occupied by the application for a long time. In turn, it affects the running speed of the user terminal and affects the user experience.
  • the embodiment of the invention provides a memory cleaning method and a user terminal, which can intelligently implement memory cleaning, and can improve the running speed of the user terminal and improve the user experience.
  • a first aspect of the embodiments of the present invention provides a memory cleaning method, including:
  • the feature information includes an operating status
  • the feature information includes a usage priority
  • the memory occupation information includes a memory occupation size
  • the preset memory information includes a preset memory size
  • the to-be-cleaned application that selects the memory occupation information from the selected application list that does not match the preset memory information includes:
  • the performing a memory cleaning process on the to-be-cleaned application except the target application in the to-be-cleaned application list includes:
  • the memory to be cleaned is performed on the application to be cleaned except the target application in the application list to be cleaned.
  • the performing a memory cleaning process on the to-be-cleaned application except the target application in the to-be-cleaned application list includes:
  • the method further includes:
  • the processing information corresponding to the memory cleaning process is sent to the server.
  • a second aspect of the embodiments of the present invention provides a user terminal, including:
  • An obtaining unit configured to obtain memory occupation information of the selected application in the selected application list and preset memory information corresponding to the selected application
  • a matching unit configured to select, from the selected application list, an application to be cleaned that does not match the memory occupation information and the preset memory information, to obtain a list of applications to be cleaned;
  • a selecting unit configured to select a target application from the list of applications to be cleaned according to the feature information of the application to be cleaned
  • a cleaning unit configured to perform a memory cleaning process on the application to be cleaned except the target application in the application list to be cleaned.
  • the user terminal provided by the second aspect of the present invention is used to implement the memory clearing method provided by the first aspect of the present invention.
  • the specific implementation process refer to the detailed description of the first aspect, and details are not described herein.
  • a third aspect of the embodiments of the present invention provides another user terminal, including a processor, an input device, an output device, and a memory, wherein the processor, the input device, the output device, and the memory are connected to each other, wherein the memory is used to store the computer.
  • a program, the computer program comprising program instructions, the processor being configured to invoke the program instructions to perform the method of the first aspect of the embodiments of the present invention.
  • a fourth aspect of embodiments of the present invention provides a computer readable storage medium, the computer storage medium storing a computer program, the computer program comprising program instructions, the program instructions, when executed by a processor, causing the processor to execute The method of the first aspect of the embodiments of the present invention.
  • the memory occupation information of the selected application in the selected application list and the preset memory information corresponding to the selected application are obtained; and the memory occupation information and the preset are selected from the selected application list.
  • the application to be cleaned that does not match the memory information obtains a list of applications to be cleaned; selects the target application from the list of applications to be cleaned according to the feature information of the application to be cleaned; and the target application to be cleaned except the target application
  • the application to be cleaned performs memory cleaning processing, which can intelligently implement memory cleaning, and can improve the running speed of the user terminal and improve the user experience.
  • FIG. 1 is a schematic flowchart of a memory cleaning method according to an embodiment of the present invention.
  • FIG. 2 is a schematic flowchart of another memory cleaning method according to an embodiment of the present invention.
  • FIG. 3 is a schematic flowchart of still another method for cleaning a memory according to an embodiment of the present invention.
  • FIG. 4 is a schematic structural diagram of a user terminal according to an embodiment of the present disclosure.
  • FIG. 5 is a schematic structural diagram of another user terminal according to an embodiment of the present invention.
  • the user terminal involved in the embodiments of the present invention may include, but is not limited to, an electronic device such as a smart phone, a palmtop computer, a notebook computer, and a desktop computer.
  • the operating system of the user terminal may include, but is not limited to, an Android operating system, an IOS operating system, a Symbian operating system, a Blackberry operating system, a Windows Phone 8 operating system, and the like.
  • the memory cleaning method is applicable to the memory cleaning application provided by the user terminal, and can also be applied to the memory cleaning application downloaded and installed by the user terminal.
  • FIG. 1 is a schematic flowchart of a memory cleaning method according to an embodiment of the present invention.
  • the method may include:
  • Step S101 Obtain memory occupation information of the selected application in the selected application list and preset memory information corresponding to the selected application.
  • the user terminal acquires memory occupation information of the selected application in the selected application list and preset memory information corresponding to the selected application.
  • the selected application list may include all applications installed in the user terminal, and may also include some applications installed in the user terminal, including specific applications added by the user.
  • the user can add an application that needs automatic memory cleaning in the memory cleaning application, and the user terminal generates the selected application list according to the application added by the user. In other words, the selections included in the selected application list
  • the memory occupied by the application can be automatically cleaned up by the user terminal without manual cleaning by the user.
  • the memory usage information of the selected application includes a size of a memory space currently occupied by the selected application
  • the preset memory information corresponding to the selected application includes a preset memory size
  • the memory occupation information of the selected application includes a proportion of a memory space currently occupied by the selected application
  • the preset memory information corresponding to the selected application includes a preset memory ratio
  • the memory occupation information and the preset memory information of the application terminal selected by the user terminal include, but are not limited to, the foregoing two modes.
  • the preset memory information may be set by the user terminal, or may be set by the user.
  • the user terminal may provide the user with auxiliary setting information, including but not limited to the default preset memory information of the user terminal, the total memory space of the user terminal, and the current application.
  • the memory size, the initial memory space occupied by the application, and the remaining memory space of the user terminal help the user to better select the preset memory information.
  • Step S102 Select, from the selected application list, an application to be cleaned that does not match the memory occupation information and the preset memory information, and obtain a list of applications to be cleaned.
  • the user terminal determines whether the memory occupation information of the selected application and the preset memory information corresponding to the selected application are match.
  • the user terminal determines whether the memory usage size of the currently selected application exceeds a preset memory size, and if the currently selected application occupies a memory size greater than a preset memory size, determining the application memory usage. If the information does not match the preset memory information, then the application is determined to be the application to be cleaned.
  • the user terminal determines whether the memory usage ratio of the currently selected application exceeds a preset memory ratio, and determines the application if the currently selected application occupies a memory usage ratio greater than a preset memory ratio. If the memory usage information does not match the preset memory information, then the application is determined to be the application to be cleaned.
  • the user terminal determines the to-be-cleaned program in the selected program list one by one by the above-mentioned judging manner, and generates a to-be-cleaned program list according to the to-be-cleaned program.
  • Step S103 The application to be cleaned according to the feature information of the application to be cleaned Select the target application from the list.
  • the user terminal selects the target application from the list of applications to be cleaned according to the feature information of the application to be cleaned. There may be more than one target application, depending on the situation.
  • the feature information includes an operating state
  • the user terminal selects an application to be cleaned whose working state is an operating state from a list of applications to be cleaned, and sets the working state to a running state.
  • the cleanup application is determined to be the target application.
  • the feature information includes using a priority
  • the user terminal sorts the to-be-cleaned application list according to a usage priority from highest to lowest, and obtains the sorted application to be cleaned. a list, selecting the top N to-be-cleaned applications from the sorted list of applications to be cleaned, and determining the top N to-be-cleaned applications as the target application.
  • N is an integer greater than or equal to 1.
  • the priority division method includes, but is not limited to, the total number of applications used, the frequency of application usage, or the usage duration of the application.
  • Step S104 Perform a memory cleaning process on the application to be cleaned except the target application in the application list to be cleaned.
  • the memory cleaning process of the application to be cleaned other than the target application in the cleaning application list is to be performed in a predetermined manner.
  • the predetermined manner includes: performing, in a case where the user terminal is in a lock screen state, performing a memory cleaning process on the application to be cleaned except the target application in the application list to be cleaned, or the user terminal periodically Performing a memory cleaning process on the application to be cleaned except the target application in the list of applications to be cleaned.
  • the specific cleanup includes, but is not limited to, application cache data, advertisement data in the application, application registry data, application installation package data, application uninstallation residual data, and the like.
  • the user terminal After completing the application memory cleaning process, the user terminal sends the processing information corresponding to the memory cleaning process to the server, so that the server knows the cleaning situation.
  • the processing information includes, but is not limited to, the name of the cleaned application, the memory occupied by the cleaned application, the content of the cleaned application, the memory space saved by the user terminal after cleaning, the optional manual cleanup option, and the like.
  • the server may be a server corresponding to the memory cleaning application provided by the user terminal, or may be a server corresponding to the memory cleaning application downloaded and installed by the user terminal.
  • the user terminal After completing the application memory cleaning process, the user terminal outputs a prompt dialog box,
  • the contents of the prompt dialog box include, but are not limited to, the name of the application that is cleaned up, the memory occupied by the cleaned application, the content of the cleaned application, and the memory space saved by the user terminal after cleaning.
  • the prompt dialog is outputted so that the user knows the cleanup situation.
  • the memory occupation information of the selected application in the selected application list and the preset memory information corresponding to the selected application are obtained; and the memory occupation information and the preset are selected from the selected application list.
  • the application to be cleaned that does not match the memory information obtains a list of applications to be cleaned; selects the target application from the list of applications to be cleaned according to the feature information of the application to be cleaned; and the target application to be cleaned except the target application
  • the application to be cleaned performs memory cleaning processing, which can intelligently implement memory cleaning, and can improve the running speed of the user terminal and improve the user experience.
  • FIG. 2 is a schematic flowchart of a memory cleaning method according to Embodiment 2 of the present invention, where the method may include:
  • Step S201 Obtain memory occupation information of the selected application in the selected application list and preset memory information corresponding to the selected application.
  • the user terminal acquires memory occupation information of the selected application in the selected application list and preset memory information corresponding to the selected application.
  • the memory usage information of the selected application includes a size of a memory space currently occupied by the selected application, and the preset memory information corresponding to the selected application includes a preset memory size, where
  • the same application can have different preset memory sizes in different user terminals, and different applications in the same user terminal can also have different preset memory sizes.
  • the default memory size of the application 1 in the terminal with a total memory size of 16G is 100M
  • the preset memory size of the application 1 in the terminal with a total memory size of 32G is 200M
  • the application 2 is in the memory.
  • the preset memory size in the terminal with a total space of 16G is 400M.
  • the specific value of the preset memory size and the ratio corresponding to the application is not limited in the embodiment of the present invention.
  • the memory occupation information of the selected application includes a proportion of a memory space currently occupied by the selected application
  • the preset memory information corresponding to the selected application includes a preset memory ratio
  • the default memory ratio of application 1 in a terminal with a total memory size of 16G For example, 1:100, the default memory size of application 1 in a terminal with a total memory size of 32G is 1:200, and the default memory of application 2 in a terminal with a total memory size of 16G is 1:50.
  • the specific value of the preset memory size and the ratio corresponding to the application is not limited in the embodiment of the present invention.
  • the memory occupation information and the preset memory information of the application terminal selected by the user terminal include, but are not limited to, the foregoing two modes, and the preset memory information may also be set by the user.
  • Step S202 Select an application to be cleaned that does not match the memory occupation information and the preset memory information from the selected application list, and obtain a list of applications to be cleaned.
  • the user terminal determines the memory occupation information of the selected application and the preset memory corresponding to the selected application. Whether the information matches.
  • the user terminal determines whether the memory usage size of the currently selected application exceeds a preset memory size, and if the currently selected application occupies a memory size greater than a preset memory size, determining the application memory usage. If the information does not match the preset memory information, the application is determined to be an application to be cleaned. If the currently selected application occupies less than or equal to the preset memory size, the application memory usage information and the preset memory are determined. The information matches, then the selected application does not process.
  • the selected application occupies a memory size of 200M, and the preset memory size is 150M. Obviously, if the selected application occupies a larger memory than the preset memory size, it determines the memory usage information of the selected application and the selected application. If the preset memory information corresponding to the program does not match, the selected application is determined to be an application to be cleaned.
  • the user terminal determines whether the memory usage ratio of the currently selected application exceeds a preset memory ratio, and determines the application if the currently selected application occupies a memory usage ratio greater than a preset memory ratio. If the memory usage information does not match the preset memory information, the application is determined to be an application to be cleaned. If the current occupied application occupied memory ratio is less than or equal to the preset memory ratio, the application memory occupation information is determined. If the preset memory information matches, then the selected application is not processed.
  • the selected application occupies a memory size of 200M and the total memory space of the user terminal is 20000M, the memory usage ratio of the selected application is 1:100, and the preset memory ratio is 1:200.
  • the selected application If the program occupancy ratio is greater than the preset memory, determining that the memory usage information of the selected application does not match the preset memory information corresponding to the selected application, then the selected application is selected. The order is determined to be the application to be cleaned.
  • the list of applications to be cleaned includes all the information to be cleaned, wherein the information to be cleaned includes, but is not limited to, the name of the application to be cleaned, the application to be cleaned The memory size of the program, the proportion of memory occupied by the application to be cleaned, and so on.
  • Step S203 Select a target application from the list of applications to be cleaned according to the working state of the application to be cleaned.
  • the user terminal selects an application to be cleaned whose working state is the running state from the list of applications to be cleaned, and determines the to-be-cleaned application whose working state is the running state as the target application.
  • the working state of the application to be cleaned can be divided into an operating state and a stationary state.
  • the working state of the to-be-cleaned application is an operating state, and the to-be-cleaned application can be determined as the target application.
  • the working state of the application to be cleaned is a running state, and the application to be cleaned can be determined as the target application.
  • the working state of the application to be cleaned is the running state, and the application to be cleaned can be determined as the target application.
  • the working state of the application to be cleaned is a stationary state.
  • the number of target applications may be more than one, depending on the specific situation.
  • Step S204 Select a target application from the list of applications to be cleaned according to a usage priority of the application to be cleaned.
  • the user terminal sorts the list of applications to be cleaned according to the order of use priority from high to low, obtains a list of the applications to be cleaned after sorting, and selects the top N from the list of applications to be cleaned after sorting.
  • the application to be cleaned and the first N applications to be cleaned are determined as the target application.
  • N is an integer greater than or equal to 1
  • the priority division manner includes, but is not limited to, the total number of uses according to the application, the frequency of application usage, and the usage duration of the application.
  • the user terminal determines the use based on the total number of times the application is used. Priority, the user terminal defines the opening of the application to the closing of the application as one use, the higher the total number of applications, the higher the priority of the application. For example, if N is equal to 3, the user terminal will use the top three digits of the application priority of the top three applications, and define the top three applications using the priority as the target application.
  • the user terminal determines the usage priority according to the frequency of use of the application, and the frequency definition used by the application includes, but is not limited to, the number of times the user uses the application every day or the user uses the hourly The number of applications, etc. For example, if N is equal to 4, the user terminal will use the first four digits of the application priority of the top four applications, and define the application using the top four priority rankings as the target application.
  • the user terminal determines the usage priority based on the length of use of the application.
  • the duration of use of the application may be the total duration of the application by the user.
  • the duration of use of the application may also be an average duration of the application of the application by the user, which is not limited by the embodiment of the present invention. . For example, if N is equal to 5, the top five use priority of the top five applications will be used, and the top five applications using the priority ranking will be defined as the target application.
  • Step S205 Perform a memory cleaning process on the application to be cleaned except the target application in the application list to be cleaned.
  • the user to be cleaned by the target to be cleaned in the lock screen state or the periodic list of the application to be cleaned is performed. deal with.
  • Step S206 Send the processing information corresponding to the memory cleaning process to the server.
  • the user terminal After completing the application memory cleaning process, the user terminal sends the processing information corresponding to the memory cleaning process to the server, so that the server knows the cleaning situation. After the user terminal sends the processing information corresponding to the memory cleaning process to the server, the server stores the processing information.
  • the memory occupation information of the selected application in the selected application list and the preset memory information corresponding to the selected application are obtained; and the memory occupation information and the preset are selected from the selected application list.
  • the application to be cleaned that does not match the memory information, obtains a list of applications to be cleaned; selects a target application from the list of applications to be cleaned according to the working state or usage priority of the application to be cleaned; and cleans the application In addition to the target application in the list
  • the application to be cleaned performs memory cleaning processing, which can intelligently implement memory cleaning, and can improve the running speed of the user terminal and improve the user experience.
  • FIG. 3 is a schematic flowchart of a memory cleaning method according to Embodiment 3 of the present invention, where the method may include:
  • Step S301 Obtain memory occupation information of the selected application in the selected application list and preset memory information corresponding to the selected application;
  • Step S302 Select, from the selected application list, an application to be cleaned that does not match the memory occupation information and the preset memory information, and obtain a list of applications to be cleaned.
  • Step S303 Select a target application from the list of applications to be cleaned according to the feature information of the application to be cleaned.
  • the user terminal selects the target application from the list of applications to be cleaned according to the feature information of the application to be cleaned, and the feature information may be a working state, a priority of use, or other information.
  • step S304 and step S305 After the user terminal determines the target application, at least one of step S304 and step S305 will be performed.
  • Step S304 Perform a memory cleaning process on the application to be cleaned except the target application in the application list to be cleaned in a case that the user terminal is in a lock screen state.
  • the user terminal finds an application to be cleaned other than the target application according to the obtained application list to be cleaned and the target application, and the application to be cleaned is
  • the program performs memory cleanup processing.
  • the memory cleaning process is started to be performed on the cleaning application.
  • the user unlocks the user terminal, and the user terminal pauses the memory cleaning processing operation.
  • the specific cleaning contents include, but are not limited to, application cache data, advertisement data in the application program, application registry data, application installation package data, and application.
  • the program unloads residual data and so on.
  • Step S305 Periodically perform a memory cleaning process on the to-be-cleaned application except the target application in the to-be-cleaned application list.
  • the user terminal determines a period of memory cleaning, and then performs memory cleaning processing on the application to be cleaned except the target application according to the period.
  • the memory cleaning cycle can For a value preset by the user terminal according to the user's habit, the user may also modify the preset value. Cleanups include, but are not limited to, application cache data, ad data in applications, application registry data, application installation package data, application uninstallation residual data, and more.
  • the user terminal can determine the cleaning period as 1 o'clock every night. If the user terminal is in the shutdown state, the next cleaning cycle time will be Point to clean up the user terminal. Or, the user wants to set the cleaning cycle by himself, and sets the cleaning cycle to 1 am every week, and the user terminal performs memory cleaning on the application to be cleaned except the target application at 1 am every week. deal with.
  • Step S306 Send processing information corresponding to the memory cleaning process to the server.
  • the user terminal After completing the application memory cleaning process, the user terminal sends the processing information corresponding to the memory cleaning process to the server, so that the server knows the cleaning situation. After the user terminal sends the processing information corresponding to the memory cleaning process to the server, the server stores the processing information.
  • the memory occupation information of the selected application in the selected application list and the preset memory information corresponding to the selected application are obtained; and the memory occupation information and the preset are selected from the selected application list.
  • the application to be cleaned does not match the memory information, and the application list to be cleaned is obtained; the target application is selected from the list of applications to be cleaned according to the feature information of the application to be cleaned; the application is cleaned in a lock screen state or periodically
  • the application to be cleaned except the target application in the program list performs memory cleaning processing, and uploads the processed result to the server, which can intelligently implement memory cleaning, and can improve the running speed of the user terminal and improve the user experience.
  • FIG. 4 and FIG. 5 The memory cleaning user terminal provided by the embodiment of the present invention will be described in detail below with reference to FIG. 4 and FIG. It should be noted that the memory cleaning user terminal shown in FIG. 4 and FIG. 5 is used to perform the method of the embodiment shown in FIG. 1 to FIG. 3 of the present invention. For the convenience of description, only the embodiment of the present invention is shown. For related parts, the specific technical details are not disclosed, please refer to the embodiment shown in Figs. 1 to 3 of the present invention.
  • FIG. 4 is a schematic structural diagram of a memory cleaning user terminal according to the present invention
  • the memory cleaning user terminal 40 may include: an obtaining unit 401, a matching unit 402, a selecting unit 403, and a cleaning unit 404.
  • the obtaining unit 401 is configured to obtain memory occupation information of the selected application in the selected application list and preset memory information corresponding to the selected application;
  • the obtaining unit 401 is configured to obtain memory occupation information of the selected application in the selected application list and preset memory information corresponding to the selected application, where the selected application list may include the user. All applications installed in the terminal may also include some applications installed in the user terminal, including which applications are added by the user.
  • the matching unit 402 is configured to select, from the selected application list, an application to be cleaned that does not match the memory occupation information and the preset memory information, and obtain a list of applications to be cleaned.
  • the user terminal selects, from the selected application list, the to-be-cleaned application that the memory occupancy ratio is greater than the preset memory ratio;
  • the matching unit includes a determining unit 4021 and a generating unit 4022;
  • the determining unit 4021 is configured to determine a relationship between the size of the memory occupied by the application to be cleaned and the preset memory size;
  • the determining unit 4021 is configured to determine whether the memory usage size of the currently selected application exceeds a preset memory size, and if the currently selected application occupies a memory size greater than a preset memory size, determining the application memory occupation information and If the preset memory information does not match, the application is determined to be an application to be cleaned. If the currently selected application occupies less than or equal to the preset memory size, it is determined that the application memory occupation information is compared with the preset memory information. Match, then the selected application is not processed.
  • the generating unit 4022 is configured to generate a list of applications to be cleaned.
  • the generating unit 4022 is configured to generate, according to all the applications to be cleaned, a list of applications to be cleaned, where the application list to be cleaned includes all the information to be cleaned, wherein the information to be cleaned includes but is not limited to The name of the application to be cleaned, the amount of memory occupied by the application to be cleaned, the proportion of memory occupied by the application to be cleaned, and so on.
  • the user terminal selects, from the selected application list, the to-be-cleaned application that the memory occupancy ratio is greater than the preset memory ratio
  • the matching unit includes a determining unit 4021 and a generating unit 4022;
  • the determining unit 4021 is further configured to determine a relationship between a memory size of the application to be cleaned and a preset memory size;
  • the determining unit 4021 is configured to determine whether the memory usage ratio of the currently selected application exceeds a preset memory ratio, and if the currently selected application occupies a memory occupation ratio greater than the preset memory The ratio determines that the application memory occupation information does not match the preset memory information, and then determines the application as the application to be cleaned, and if the currently selected application occupies less than or equals the preset memory ratio, then determines The application memory footprint information matches the preset memory information, and the selected application is not processed.
  • the generating unit 4022 is further configured to generate a list of applications to be cleaned.
  • the generating unit 4022 is configured to generate a list of applications to be cleaned according to all applications to be cleaned.
  • the selecting unit 403 is configured to select a target application from the list of applications to be cleaned according to the feature information of the application to be cleaned.
  • the user terminal selects the target application from the list of applications to be cleaned according to the working state of the application to be cleaned;
  • the selecting unit 403 selects an application to be cleaned whose working state is the running state from the list of applications to be cleaned, and determines the to-be-cleaned application whose working state is the running state as the target application.
  • the user terminal selects the target application from the list of applications to be cleaned according to the usage priority of the application to be cleaned.
  • the selecting unit 403 sorts the list of applications to be cleaned according to the order of use priority from high to low, and after obtaining the sorted application list to be cleaned, the selecting unit 403 selects the application to be cleaned from the sorted
  • the top N to-be-cleaned applications are selected in the list, and the first N to-be-cleaned applications are determined as target applications.
  • N is an integer greater than or equal to 1
  • the priority division manner includes, but is not limited to, the total number of uses according to the application, the frequency of application usage, and the usage duration of the application.
  • the cleaning unit 404 is configured to perform a memory cleaning process on the application to be cleaned except the target application in the application list to be cleaned.
  • the cleaning unit 404 is configured to perform memory cleaning on the application to be cleaned except the target application in the application list to be cleaned in a case where the user terminal is in a lock screen state. deal with.
  • the cleaning unit 404 when the user terminal detects that the user terminal is in the lock screen state, the cleaning unit 404 starts to perform memory cleaning processing on the application to be cleaned. When the processing is not completed, the user unlocks the user terminal, and the user terminal pauses the memory cleaning process. Operation, when the user terminal is in the lock screen state again, continue Memory cleanup processing operations, including but not limited to application cache data, application data in the application, application registry data, application installation package data, application uninstall residual data, etc. After cleaning, clean up the unit 404 sends the cleaned result to the server.
  • the cleaning unit 404 is configured to periodically perform a memory cleaning process on the to-be-cleaned application except the target application in the to-be-cleaned application list.
  • the cleaning unit 404 determines a period of memory cleaning, and then performs memory cleaning processing on the application to be cleaned except the target application according to the period.
  • the period of the memory cleaning may be a value preset by the user terminal according to the user's habit, and the user may also modify the preset value.
  • the cleaned content includes, but is not limited to, application cache data, advertisement data in the application, application registry data, application installation package data, application uninstall residual data, etc.
  • the cleaning unit 404 sends the cleaned result. To the server.
  • FIG. 5 is a schematic structural diagram of another user terminal according to an embodiment of the present invention.
  • the user terminal includes at least one processor 501, an input device 503, an output device 504, a memory 505, and at least one communication bus 502.
  • the communication bus 502 is used to implement connection communication between these components.
  • the memory 505 may be a high speed RAM memory or a non-volatile memory such as at least one disk memory.
  • the memory 505 can also optionally be at least one storage device located remotely from the aforementioned processor 501.
  • the processor 501 can be combined with the terminal described in FIG. 4.
  • the memory 505 stores a set of program codes, and the processor 501 calls the program code stored in the memory 505 for performing the following operations:
  • the processor 501 calls the program code stored in the memory 505 to execute the target application from the list of applications to be cleaned according to the feature information of the application to be cleaned. Specifically, it is used to perform the following steps:
  • the processor 501 when the processor 501 calls the program code stored in the memory 505 to perform the selection of the target application from the list of applications to be cleaned according to the feature information of the application to be cleaned, the processor 501 is specifically configured to perform the following steps:
  • the processor 501 calls the program code stored in the memory 505 to perform a memory cleaning process on the application to be cleaned except the target application in the application list to be cleaned, specifically for Perform the following steps:
  • the memory to be cleaned is performed on the application to be cleaned except the target application in the application list to be cleaned.
  • the processor 501 calls the program code stored in the memory 505 to perform a memory cleaning process on the application to be cleaned except the target application in the application list to be cleaned, specifically for Perform the following steps:
  • the processor 501 calls the program code stored in the memory 505 to perform a memory cleaning process on the application to be cleaned except the target application in the application list to be cleaned, and further Perform the following steps:
  • the processing information corresponding to the memory cleaning process is sent to the server.
  • the unit in the embodiment of the present invention may be implemented by a general-purpose integrated circuit, such as a CPU (Central Processing Unit) or an ASIC (Application Specific Integrated Circuit).
  • a CPU Central Processing Unit
  • ASIC Application Specific Integrated Circuit
  • modules or units in the terminal in the embodiment of the present invention may be combined, divided, and deleted according to actual needs.
  • the storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).
  • the processor 501 may be a central processing unit (CPU), and the processor may also be another general-purpose processor, a digital signal processor (DSP). , Application Specific Integrated Circuit (ASIC), Field-Programmable Gate Array (FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware component, etc.
  • the general purpose processor may be a microprocessor or the processor or any conventional processor or the like.
  • the bus 504 may be an Industry Standard Architecture (ISA) bus, a Peripheral Component (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc., and the bus 504 may be divided into Address bus, data bus, control bus, etc., for ease of representation, Figure 5 is only indicated by a thick line, but does not mean that there is only one bus or one type of bus.
  • ISA Industry Standard Architecture
  • PCI Peripheral Component
  • EISA Extended Industry Standard Architecture
  • the computer storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

一种内存清理方法及用户终端,其中方法包括:获取选定应用程序列表中选定应用程序的内存占用信息以及选定应用程序对应的预设内存信息;从选定应用程序列表中选择出内存占用信息与预设内存信息不匹配的待清理应用程序,得到待清理应用程序列表;根据待清理应用程序的特征信息从待清理应用程序列表中选择出目标应用程序;对待清理应用程序列表中除目标应用程序之外的待清理应用程序进行内存清理处理。采用本发明实施例,可以智能地实现内存清理,同时可以提高用户终端的运行速度,提升用户体验。

Description

一种内存清理方法及用户终端 技术领域
本发明涉及电子设备技术领域,尤其涉及一种内存清理方法及用户终端。
背景技术
随着电子技术的发展和人们日常生活水平的不断提高,各种用户终端(手机、平板电脑等)逐渐成为人们生活中不可缺少的工具。
这些用户终端设备往往安装了各种各样的应用程序,但用户终端在运行这些应用程序的过程中难免会积累一些无用数据,如应用程序缓存文件、应用程序卸载后产生的剩余文件、临时文件等,这些无用数据占用了用户终端大量的内存空间。
目前,用户可以通过一些内存清理软件对用户终端中的应用程序占用的内存进行手动清理,但这种方式过于依赖用户的操作,用户可能会在很长一段时间内忘记清理应用程序占用的内存,进而影响用户终端的运行速度,影响用户体验。
发明内容
本发明实施例提供一种内存清理方法及用户终端,可以智能地实现内存清理,同时可以提高用户终端的运行速度,提升用户体验。
本发明实施例第一方面提供一种内存清理方法,包括:
获取选定应用程序列表中选定应用程序的内存占用信息以及所述选定应用程序对应的预设内存信息;
从所述选定应用程序列表中选择出所述内存占用信息与所述预设内存信息不匹配的待清理应用程序,得到待清理应用程序列表;
根据所述待清理应用程序的特征信息从所述待清理应用程序列表中选择出目标应用程序;
对所述待清理应用程序列表中除所述目标应用程序之外的待清理应用程序进行内存清理处理。
在一种可能实现的方式中,所述特征信息包括工作状态;
所述根据所述待清理应用程序的特征信息从所述待清理应用程序列表中选择出目标应用程序,包括:
从所述待清理应用程序列表中选择出所述工作状态为运行状态的待清理应用程序,并将所述工作状态为运行状态的待清理应用程序确定为目标应用程序。
在一种可能实现的方式中,所述特征信息包括使用优先级;
所述根据所述待清理应用程序的特征信息从所述待清理应用程序列表中选择出目标应用程序,包括:
按照所述使用优先级从高到低的顺序对所述待清理应用程序列表进行排序,得到排序后的待清理应用程序列表;
从所述排序后的待清理应用程序列表中选择前N个待清理应用程序,并将所述前N个待清理应用程序确定为目标应用程序。
在一种可能实现的方式中,所述内存占用信息包括内存占用大小,所述预设内存信息包括预设内存大小;
所述从所述选定应用程序列表中选择出所述内存占用信息与所述预设内存信息不匹配的待清理应用程序,包括:
从所述选定应用程序列表中选择出所述内存占用大小大于所述预设内存大小的待清理应用程序。
在一种可能实现的方式中,所述对所述待清理应用程序列表中除所述目标应用程序之外的待清理应用程序进行内存清理处理,包括:
在用户终端处于锁屏状态的情况下,对所述待清理应用程序列表中除所述目标应用程序之外的待清理应用程序进行内存清理处理。
在一种可能实现的方式中,所述对所述待清理应用程序列表中除所述目标应用程序之外的待清理应用程序进行内存清理处理,包括:
周期性地对所述待清理应用程序列表中除所述目标应用程序之外的待清理应用程序进行内存清理处理。
在一种可能实现的方式中,所述对所述待清理应用程序列表中除所述目标应用程序之外的待清理应用程序进行内存清理处理之后,还包括:
将所述内存清理处理对应的处理信息发送至服务器。
本发明实施例第二方面提供一种用户终端,包括:
获取单元,用于获取选定应用程序列表中选定应用程序的内存占用信息以及所述选定应用程序对应的预设内存信息;
匹配单元,用于从所述选定应用程序列表中选择出所述内存占用信息与所述预设内存信息不匹配的待清理应用程序,得到待清理应用程序列表;
选择单元,用于根据所述待清理应用程序的特征信息从所述待清理应用程序列表中选择出目标应用程序;
清理单元,用于对所述待清理应用程序列表中除所述目标应用程序之外的待清理应用程序进行内存清理处理。
本发明实施例第二方面提供的用户终端用于实现本发明实施例第一方面提供的内存清理方法,具体实现过程可参见第一方面的具体描述,在此不再赘述。
本发明实施例第三方面提供另一种用户终端,包括处理器、输入设备、输出设备和存储器,所述处理器、输入设备、输出设备和存储器相互连接,其中,所述存储器用于存储计算机程序,所述计算机程序包括程序指令,所述处理器被配置用于调用所述程序指令,执行本发明实施例第一方面所述的方法。
本发明实施例第四方面提供一种计算机可读存储介质,所述计算机存储介质存储有计算机程序,所述计算机程序包括程序指令,所述程序指令当被处理器执行时使所述处理器执行本发明实施例第一方面所述的方法。
在本发明实施例中,通过获取选定应用程序列表中选定应用程序的内存占用信息以及选定应用程序对应的预设内存信息;从选定应用程序列表中选择出内存占用信息与预设内存信息不匹配的待清理应用程序,得到待清理应用程序列表;根据待清理应用程序的特征信息从待清理应用程序列表中选择出目标应用程序;对待清理应用程序列表中除目标应用程序之外的待清理应用程序进行内存清理处理,可以智能地实现内存清理,同时可以提高用户终端的运行速度,提升用户体验。
附图说明
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是 本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1为本发明实施例提供的一种内存清理方法的流程示意图;
图2为本发明实施例提供的另一种内存清理方法的流程示意图;
图3为本发明实施例提供的又一种内存清理方法的流程示意图;
图4为本发明实施例提供的一种用户终端的结构示意图;
图5为本发明实施例提供的另一种用户终端的结构示意图。
具体实施方式
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。
本发明实施例涉及的用户终端可包括但不限于智能手机、掌上电脑、笔记本电脑和台式电脑等电子设备。该用户终端的操作系统可包括但不限于Android操作系统、IOS操作系统、Symbian(塞班)操作系统、Black Berry(黑莓)操作系统、Windows Phone8操作系统等等,本发明实施例不做限定。该内存清理方法适用于用户终端自带的内存清理应用程序,也可以适用于用户终端下载安装的内存清理应用程序中。
请参见图1,为本发明实施例提供的一种内存清理方法的流程示意图,该方法可包括:
步骤S101、获取选定应用程序列表中选定应用程序的内存占用信息以及所述选定应用程序对应的预设内存信息。
具体的,用户终端获取选定应用程序列表中选定应用程序的内存占用信息以及所述选定应用程序对应的预设内存信息。其中,所述选定应用程序列表可以包括用户终端中已安装的全部应用程序,也可以包括用户终端中已安装的部分应用程序,具体包括哪些应用程序由用户添加。用户可以在内存清理应用程序中添加需要自动进行内存清理的应用程序,用户终端根据用户添加的应用程序生成所述选定应用程序列表。换言之,所述选定应用程序列表中所包括的选 定应用程序占用的内存可由用户终端自动清理,无需用户手动清理。
在一种可能的实现方式中,所述选定应用程序的内存占用信息包括选定应用程序当前占用内存空间大小,所述选定应用程序对应的预设内存信息包括预设内存大小。
在另一种可能实现的方式中,所述选定应用程序的内存占用信息包括选定应用程序当前占用内存空间比例,所述选定应用程序对应的预设内存信息包括预设内存比例。
需要说明的是,所述用户终端选定应用程序的内存占用信息和预设内存信息包括但不限于上述两种方式。
所述预设内存信息可由用户终端设置,也可由用户自行设置。当用户对预设内存信息进行设置时,用户终端可以向用户提供辅助设置信息,所述辅助设置信息包括但不限于用户终端默认的预设内存信息、用户终端的内存总空间大小、应用程序当前占用内存大小、应用程序初始占用内存空间大小、用户终端剩余内存空间大小等,帮助用户更好的选择预设内存信息。
步骤S102、从所述选定应用程序列表中选择出所述内存占用信息与所述预设内存信息不匹配的待清理应用程序,得到待清理应用程序列表。
具体的,用户终端获取到选定应用程序的内存占用信息以及选定应用程序对应的预设内存信息之后,将判断选定应用程序的内存占用信息与选定应用程序对应的预设内存信息是否匹配。
在一种可能实现的方法中,用户终端判断当前选定应用程序的内存占用大小是否超过预设内存大小,若当前选定应用程序占用内存大小大于预设内存大小,则确定该应用程序内存占用信息与预设内存信息不匹配,那么将该应用程序确定为待清理应用程序。
在另一种可能实现的方法中,用户终端判断当前选定应用程序的内存占用比例是否超过预设内存比例,若当前选定应用程序占用内存占用比例大于预设内存比例,则确定该应用程序内存占用信息与预设内存信息不匹配,那么将该应用程序确定为待清理应用程序。
用户终端通过上述判断方式逐一确定选定程序列表中的待清理程序,根据所述待清理程序生成待清理程序列表。
步骤S103、根据所述待清理应用程序的特征信息从所述待清理应用程序 列表中选择出目标应用程序。
具体的,用户终端根据所述待清理应用程序的特征信息从所述待清理应用程序列表中选择出目标应用程序。目标应用程序的数量可能不止一个,具体数量视具体情况而定。
在一种可能实现的方式中,所述特征信息包括工作状态,用户终端从待清理应用程序列表中选择出工作状态为运行状态的待清理应用程序,并将所述工作状态为运行状态的待清理应用程序确定为目标应用程序。
在另一种可能实现的方式中,所述特征信息包括使用优先级,用户终端按照使用优先级从高到低的顺序对所述待清理应用程序列表进行排序,得到排序后的待清理应用程序列表,从排序后的待清理应用程序列表中选择前N个待清理应用程序,并将所述前N个待清理应用程序确定为目标应用程序。其中,N为一个大于或等于1的整数。需要说明的是,使用优先级的划分方式包括但不限于应用程序使用总次数、应用程序使用频率来或应用程序的使用时长等。
步骤S104、对所述待清理应用程序列表中除所述目标应用程序之外的待清理应用程序进行内存清理处理。
具体的,用户终端确定待清理应用程序列表和目标应用程序之后,将会按照预定的方式对待清理应用程序列表中除所述目标应用程序之外的待清理应用程序进行内存清理处理。其中预定的方式包括在用户终端处于锁屏状态的情况下,对所述待清理应用程序列表中除所述目标应用程序之外的待清理应用程序进行内存清理处理,或者,用户终端周期性地对所述待清理应用程序列表中除所述目标应用程序之外的待清理应用程序进行内存清理处理。具体清理的内容包括但不限于应用程序缓存数据、应用程序中的广告数据、应用程序注册表数据、应用程序安装包数据、应用程序卸载残留数据等。
用户终端在完成应用程序内存清理处理之后,会将内存清理处理对应的处理信息发送至服务器,以便服务器知晓清理情况。所述处理信息包括但不限于清理的应用程序的名称、清理的应用程序占用内存、清理的应用程序的内容、清理之后用户终端节省的内存空间、可选的手动清理选项等。所述服务器可以是用户终端自带的内存清理应用程序对应的服务器,也可以是用户终端下载安装的内存清理应用程序对应的服务器。
用户终端在完成应用程序内存清理处理之后,输出一个提示对话框,所述 提示对话框中的内容包括但不限于此次清理的应用程序的名称、清理的应用程序占用内存、清理的应用程序的内容、清理之后用户终端节省的内存空间等。输出所述提示对话框,以便用户知晓清理情况。
在本发明实施例中,通过获取选定应用程序列表中选定应用程序的内存占用信息以及选定应用程序对应的预设内存信息;从选定应用程序列表中选择出内存占用信息与预设内存信息不匹配的待清理应用程序,得到待清理应用程序列表;根据待清理应用程序的特征信息从待清理应用程序列表中选择出目标应用程序;对待清理应用程序列表中除目标应用程序之外的待清理应用程序进行内存清理处理,可以智能地实现内存清理,同时可以提高用户终端的运行速度,提升用户体验。
请参见图2,为本发明实施例二提供的内存清理方法的流程示意图,该方法可包括:
步骤S201、获取选定应用程序列表中选定应用程序的内存占用信息以及所述选定应用程序对应的预设内存信息。
具体的,用户终端获取选定应用程序列表中选定应用程序的内存占用信息以及所述选定应用程序对应的预设内存信息。
在一种可能的实现方式中,所述选定应用程序的内存占用信息包括选定应用程序当前占用内存空间大小,所述选定应用程序对应的预设内存信息包括预设内存大小,其中,相同的应用程序在不同的用户终端中可以有不同的预设内存大小,同一用户终端中不同的应用程序也可以有不同的预设内存大小。
举例说明,应用程序1在内存总空间大小为16G的终端中的预设内存大小为100M,应用程序1在内存总空间大小为32G的终端中的预设内存大小为200M,应用程序2在内存总空间大小为16G的终端中的预设内存大小为400M。对于应用程序对应的预设内存大小和比例的具体数值,本发明实施例不做限定。
在另一种可能实现的方式中,所述选定应用程序的内存占用信息包括选定应用程序当前占用内存空间比例,所述选定应用程序对应的预设内存信息包括预设内存比例,其中,相同的应用程序在不同的用户终端中可以有不同的预设内存比例,同一用户终端中不同的应用程序也可以有不同的预设内存比例。
举例说明,应用程序1在内存总空间大小为16G的终端中的预设内存比 例为1:100,应用程序1在内存总空间大小为32G的终端中的预设内存大小为1:200,应用程序2在内存总空间大小为16G的终端中的预设内存1:50。对于应用程序对应的预设内存大小和比例的具体数值,本发明实施例不做限定。
需要说明的是,所述用户终端选定应用程序的内存占用信息和预设内存信息包括但不限于上述两种方式,所述预设内存信息也可由用户自行设置。
步骤S202、从所述选定应用程序列表中选择出所述内存占用信息与所述预设内存信息不匹配的待清理应用程序,得到待清理应用程序列表。
具体的,用户终端获取到选定应用程序的内存占用信息以及所述选定应用程序对应的预设内存信息之后,将判断选定应用程序的内存占用信息与选定应用程序对应的预设内存信息是否匹配。
在一种可能实现的方法中,用户终端判断当前选定应用程序的内存占用大小是否超过预设内存大小,若当前选定应用程序占用内存大小大于预设内存大小,则确定该应用程序内存占用信息与预设内存信息不匹配,那么将该应用程序确定为待清理应用程序,若当前选定应用程序占用内存大小小于或等于预设内存大小,则确定该应用程序内存占用信息与预设内存信息相匹配,那么所述选定应用程序不做处理。
举例说明,选定应用程序占用内存大小为200M,而预设内存大小为150M,显然,选定应用程序占用内存大小大于预设内存大小,则确定选定应用程序的内存占用信息与选定应用程序对应的预设内存信息不匹配,那么将所述选定应用程序确定为待清理应用程序。
在另一种可能实现的方法中,用户终端判断当前选定应用程序的内存占用比例是否超过预设内存比例,若当前选定应用程序占用内存占用比例大于预设内存比例,则确定该应用程序内存占用信息与预设内存信息不匹配,那么将该应用程序确定为待清理应用程序,若当前选定应用程序占用内存占用比例小于或等于预设内存比例,则确定该应用程序内存占用信息与预设内存信息相匹配,那么对所述选定应用程序不做处理。
例如,选定应用程序占用内存大小为200M,用户终端总的内存空间为20000M,则选定应用程序的内存占用比例为1:100,而预设内存比例为1:200,显然,选定应用程序占用比例大于预设内存不理,则确定选定应用程序的内存占用信息与选定应用程序对应的预设内存信息不匹配,那么将所述选定应用程 序确定为待清理应用程序。
根据所有待清理的应用程序生成待清理应用程序列表,所述待清理应用程序列表包括了所有待清理应用程序信息,其中,待清理应用程序信息包括但不限于待清理应用程序名称、待清理应用程序占用内存大小、待清理应用程序占用内存比例等。用户终端确定待清理应用程序列表之后,将执行步骤S203和步骤S204中的至少一个。
步骤S203、根据所述待清理应用程序的工作状态从所述待清理应用程序列表中选择出目标应用程序。
具体的,用户终端从待清理应用程序列表中选择出工作状态为运行状态的待清理应用程序,并将所述工作状态为运行状态的待清理应用程序确定为目标应用程序。所述待清理应用程序的工作状态可以分为运行状态和静止状态。
当用户终端处于亮屏状态,用户正在对某个待清理应用程序进行操作时,该待清理应用程序的工作状态为运行状态,可以将该待清理应用程序确定为目标应用程序。当用户终端处于亮屏状态,某个待清理应用程序在后台运行时,该待清理应用程序的工作状态为运行状态,可以将该待清理应用程序确定为目标应用程序。当用户终端处于锁屏状态,但后台检测到某个待清理应用程序正在运行时,该待清理应用程序的工作状态为运行状态,可以将该待清理应用程序确定为目标应用程序。当某个待清理应用程序未在用户终端中运行时,该待清理应用程序的工作状态为静止状态。
需要说明的是,目标应用程序的数量可能不止一个,具体数量视具体情况而定。
步骤S204、根据所述待清理应用程序的使用优先级从所述待清理应用程序列表中选择出目标应用程序。
具体的,用户终端按照使用优先级从高到低的顺序对所述待清理应用程序列表进行排序,得到排序后的待清理应用程序列表,从排序后的待清理应用程序列表中选择前N个待清理应用程序,并将所述前N个待清理应用程序确定为目标应用程序。其中,N为一个大于或等于1的整数,使用优先级的划分方式包括但不限于根据应用程序使用总次数、应用程序使用频率和应用程序的使用时长等。
在一种可能实现的方式中,用户终端根据应用程序的使用总次数确定使用 优先级,用户终端将应用程序的打开到应用程序的关闭定义为一次使用,使用总次数越多的应用程序优先级越高。例如,N等于3,则用户终端将使用总次数为排名前三位的应用程序的使用优先级排名前三位,并将使用优先级排名前三位的应用程序定义为目标应用程序。
在一种可能实现的方式中,用户终端根据应用程序的使用频率确定使用优先级,所述应用程序使用的频率定义包括但不限于用户每天使用所述应用程序的次数或者用户每小时使用所述应用程序的次数等。例如,N等于4,则用户终端将使用频率为排名前四位的应用程序的使用优先级排名前四位,并将使用优先级排名前四位的应用程序定义为目标应用程序。
在一种可能实现的方式中,用户终端根据应用程序的使用时长确定使用优先级。所述应用程序的使用时长可以为用户使用该应用程序的总时长,可选的,所述应用程序的使用时长还可以为用户每天使用所述应用程序的平均时长,本发明实施例不做限定。例如,N等于5,则将使用时长为排名前五位的应用程序的使用优先级排名前五位,并将使用优先级排名前五位的应用程序定义为目标应用程序。
步骤S205、对所述待清理应用程序列表中除所述目标应用程序之外的待清理应用程序进行内存清理处理。
具体的,用户终端确定待清理应用程序列表和目标应用程序之后,将会在锁屏状态下或周期性的对待清理应用程序列表中除所述目标应用程序之外的待清理应用程序进行内存清理处理。
步骤S206、将所述内存清理处理对应的处理信息发送至服务器。
具体的,用户终端在完成了应用程序内存清理处理之后,会将内存清理处理对应的处理信息发送至服务器,以便服务器知晓清理情况。用户终端将内存清理处理对应的处理信息发送至服务器之后,服务器会对该处理信息进行存储。
在本发明实施例中,通过获取选定应用程序列表中选定应用程序的内存占用信息以及选定应用程序对应的预设内存信息;从选定应用程序列表中选择出内存占用信息与预设内存信息不匹配的待清理应用程序,得到待清理应用程序列表;根据所述待清理应用程序的工作状态或使用优先级从所述待清理应用程序列表中选择出目标应用程序;对待清理应用程序列表中除目标应用程序之外 的待清理应用程序进行内存清理处理,可以智能地实现内存清理,同时可以提高用户终端的运行速度,提升用户体验。
请参见图3,为本发明实施例三提供的内存清理方法的流程示意图,该方法可包括:
步骤S301、获取选定应用程序列表中选定应用程序的内存占用信息以及所述选定应用程序对应的预设内存信息;
步骤S302、从所述选定应用程序列表中选择出所述内存占用信息与所述预设内存信息不匹配的待清理应用程序,得到待清理应用程序列表。
步骤S303、根据所述待清理应用程序的特征信息从所述待清理应用程序列表中选择出目标应用程序。
具体的,用户终端根据所述待清理应用程序的特征信息从所述待清理应用程序列表中选择出目标应用程序,所述特征信息可以是工作状态,也可以是使用优先级,还可以是其他信息。
用户终端确定目标应用程序之后,将执行步骤S304和步骤S305中的至少一个。
步骤S304、在用户终端处于锁屏状态的情况下,对所述待清理应用程序列表中除所述目标应用程序之外的待清理应用程序进行内存清理处理。
具体的,用户终端处于锁屏状态时,用户终端会根据获取到的待清理应用程序列表和目标应用程序,找到除所述目标应用程序之外的待清理应用程序,并对所述待清理应用程序进行内存清理处理。
在一种可能实现的方式中,用户终端在锁屏状态下时,开始对待清理应用程序进行内存清理处理,当处理未完成时,用户将用户终端解锁,此时用户终端将暂停内存清理处理操作,当用户终端再次处于锁屏状态时,继续内存清理处理操作,具体清理的内容包括但不限于应用程序缓存数据、应用程序中的广告数据、应用程序注册表数据、应用程序安装包数据、应用程序卸载残留数据等。
步骤S305、周期性地对所述待清理应用程序列表中除所述目标应用程序之外的待清理应用程序进行内存清理处理。
具体的,用户终端确定内存清理的周期,然后根据该周期对除所述目标应用程序之外的待清理应用程序进行内存清理处理。其中,内存清理的周期可以 为用户终端根据用户习惯而预设的一个值,用户也可以对预设的值进行修改。清理的内容包括但不限于应用程序缓存数据、应用程序中的广告数据、应用程序注册表数据、应用程序安装包数据、应用程序卸载残留数据等。
举例说明,用户在每天晚上12点之后停止对用户终端的使用,则用户终端可以将清理的周期确定为每晚的凌晨1点,若此时用户终端处于关机状态,则将在下一次清理周期时间点对用户终端进行清理。或者,用户希望自行设置清理周期,并将清理周期设置为每周1凌晨1点,用户终端则会在每周1凌晨1点对除所述目标应用程序之外的待清理应用程序进行内存清理处理。
步骤S306、将所述内存清理处理对应的处理信息发送至服务器。
具体的,用户终端在完成了应用程序内存清理处理之后,会将内存清理处理对应的处理信息发送至服务器,以便服务器知晓清理情况。用户终端将内存清理处理对应的处理信息发送至服务器之后,服务器会对该处理信息进行存储。
在本发明实施例中,通过获取选定应用程序列表中选定应用程序的内存占用信息以及选定应用程序对应的预设内存信息;从选定应用程序列表中选择出内存占用信息与预设内存信息不匹配的待清理应用程序,得到待清理应用程序列表;根据待清理应用程序的特征信息从待清理应用程序列表中选择出目标应用程序;在锁屏状态下或周期性的对待清理应用程序列表中除目标应用程序之外的待清理应用程序进行内存清理处理,并将处理后的结果上传至服务器,可以智能地实现内存清理,同时可以提高用户终端的运行速度,提升用户体验。
下面将结合附图4和附图5对本发明实施例提供的内存清理用户终端进行详细介绍。需要说明的是,附图4和附图5所示的内存清理用户终端,用于执行本发明图1-图3所示实施例的方法,为了便于说明,仅示出了与本发明实施例相关的部分,具体技术细节未揭示的,请参照本发明图1-图3所示的实施例。
请参见图4,为本发明提供的一种内存清理用户终端的结构示意图;该内存清理用户终端40可包括:获取单元401、匹配单元402、选择单元403和清理单元404。
获取单元401,用于获取选定应用程序列表中选定应用程序的内存占用信息以及所述选定应用程序对应的预设内存信息;
具体实现中,获取单元401用于获取选定应用程序列表中选定应用程序的内存占用信息以及所述选定应用程序对应的预设内存信息,其中,所述选定应用程序列表可以包括用户终端中已安装的全部应用程序,也可以包括用户终端中已安装的部分应用程序,具体包括哪些应用程序由用户添加。
匹配单元402,用于从所述选定应用程序列表中选择出所述内存占用信息与所述预设内存信息不匹配的待清理应用程序,得到待清理应用程序列表。
在一种可能实现的方式中,用户终端从所述选定应用程序列表中选择出所述内存占用比例大于所述预设内存比例的待清理应用程序;
所述匹配单元包括判断单元4021和生成单元4022;
判断单元4021,用于判断待清理应用占用内存大小与预设内存大小的关系;
具体实现中,判断单元4021用于判断当前选定应用程序的内存占用大小是否超过预设内存大小,若当前选定应用程序占用内存大小大于预设内存大小,则确定该应用程序内存占用信息与预设内存信息不匹配,那么将该应用程序确定为待清理应用程序,若当前选定应用程序占用内存大小小于或等于预设内存大小,则确定该应用程序内存占用信息与预设内存信息相匹配,那么对所述选定应用程序不做处理。
生成单元4022,用于生成待清理应用程序列表。
具体实现中,生成单元4022用于根据所有待清理的应用程序生成待清理应用程序列表,所述待清理应用程序列表包括了所有待清理应用程序信息,其中,待清理应用程序信息包括但不限于待清理应用程序名称、待清理应用程序占用内存大小、待清理应用程序占用内存占用比例等。
在另一种可能实现的方式中,用户终端从所述选定应用程序列表中选择出所述内存占用比例大于所述预设内存比例的待清理应用程序;
所述匹配单元包括判断单元4021和生成单元4022;
所述判断单元4021,还用于判断待清理应用占用内存大小与预设内存大小的关系;
具体实现中,判断单元4021用于判断当前选定应用程序的内存占用比例是否超过预设内存比例,若当前选定应用程序占用内存占用比例大于预设内存 比例,则确定该应用程序内存占用信息与预设内存信息不匹配,那么将该应用程序确定为待清理应用程序,若当前选定应用程序占用内存占用比例小于或等于预设内存比例,则确定该应用程序内存占用信息与预设内存信息相匹配,那么对所述选定应用程序不做处理。
所述生成单元4022,还用于生成待清理应用程序列表。
具体实现中,生成单元4022用于根据所有待清理的应用程序生成待清理应用程序列表。
选择单元403,用于根据所述待清理应用程序的特征信息从所述待清理应用程序列表中选择出目标应用程序。
在一种可能实现的方式中,用户终端根据所述待清理应用程序的工作状态从所述待清理应用程序列表中选择出目标应用程序;
具体实现中,选择单元403从待清理应用程序列表中选择出工作状态为运行状态的待清理应用程序,并将所述工作状态为运行状态的待清理应用程序确定为目标应用程序。
在另一种可能实现的方式中,用户终端根据所述待清理应用程序的使用优先级从所述待清理应用程序列表中选择出目标应用程序。
具体实现中,选择单元403按照使用优先级从高到低的顺序对所述待清理应用程序列表进行排序,得到排序后的待清理应用程序列表后,选择单元403从排序后的待清理应用程序列表中选择前N个待清理应用程序,并将所述前N个待清理应用程序确定为目标应用程序。其中,N为一个大于或等于1的整数,使用优先级的划分方式包括但不限于根据应用程序使用总次数、应用程序使用频率和应用程序的使用时长等。
清理单元404,用于对所述待清理应用程序列表中除所述目标应用程序之外的待清理应用程序进行内存清理处理。
在一种可能实现的方式中,清理单元404用于在用户终端处于锁屏状态的情况下,对所述待清理应用程序列表中除所述目标应用程序之外的待清理应用程序进行内存清理处理。
具体实现中,清理单元404在检测到用户终端在锁屏状态下时,开始对待清理应用程序进行内存清理处理,当处理未完成时,用户将用户终端解锁,此时用户终端将暂停内存清理处理操作,当用户终端再次处于锁屏状态时,继续 内存清理处理操作,具体清理的内容包括但不限于应用程序缓存数据、应用程序中的广告数据、应用程序注册表数据、应用程序安装包数据、应用程序卸载残留数据等,完成清理后,清理单元404将清理的结果发送至服务器。
在另一种可能实现的方式中,清理单元404用于周期性地对所述待清理应用程序列表中除所述目标应用程序之外的待清理应用程序进行内存清理处理。
具体实现中,清理单元404确定内存清理的周期,然后根据该周期对除所述目标应用程序之外的待清理应用程序进行内存清理处理。其中,内存清理的周期可以为用户终端根据用户习惯而预设的一个值,用户也可以对预设的值进行修改。清理的内容包括但不限于应用程序缓存数据、应用程序中的广告数据、应用程序注册表数据、应用程序安装包数据、应用程序卸载残留数据等,完成清理后,清理单元404将清理的结果发送至服务器。
请参见图5,为本发明实施例提供了另一种用户终端的结构示意图。如图5所示,该用户终端包括:至少一个处理器501,输入设备503、输出设备504,存储器505,至少一个通信总线502。其中,通信总线502用于实现这些组件之间的连接通信。其中,存储器505可以是高速RAM存储器,也可以是非不稳定的存储器(non-volatile memory),例如至少一个磁盘存储器。存储器505可选的还可以是至少一个位于远离前述处理器501的存储装置。其中处理器501可以结合图4所描述的终端,存储器505中存储一组程序代码,且处理器501调用存储器505中存储的程序代码,用于执行以下操作:
获取选定应用程序列表中选定应用程序的内存占用信息以及所述选定应用程序对应的预设内存信息;
从所述选定应用程序列表中选择出所述内存占用信息与所述预设内存信息不匹配的待清理应用程序,得到待清理应用程序列表;
根据所述待清理应用程序的特征信息从所述待清理应用程序列表中选择出目标应用程序;
对所述待清理应用程序列表中除所述目标应用程序之外的待清理应用程序进行内存清理处理。
在可选的实施例中,处理器501调用存储器505中存储的程序代码执行根据待清理应用程序的特征信息从待清理应用程序列表中选择出目标应用程序 时,具体用于执行以下步骤:
从所述待清理应用程序列表中选择出所述工作状态为运行状态的待清理应用程序,并将所述工作状态为运行状态的待清理应用程序确定为目标应用程序。
在可选的实施例中,处理器501调用存储器505中存储的程序代码执行根据待清理应用程序的特征信息从待清理应用程序列表中选择出目标应用程序时,具体用于执行以下步骤:
按照所述使用优先级从高到低的顺序对所述待清理应用程序列表进行排序,得到排序后的待清理应用程序列表;
从所述排序后的待清理应用程序列表中选择前N个待清理应用程序,并将所述前N个待清理应用程序确定为目标应用程序。
在可选的实施例中,处理器501调用存储器505中存储的程序代码执行对所述待清理应用程序列表中除所述目标应用程序之外的待清理应用程序进行内存清理处理,具体用于执行以下步骤:
在用户终端处于锁屏状态的情况下,对所述待清理应用程序列表中除所述目标应用程序之外的待清理应用程序进行内存清理处理。
在可选的实施例中,处理器501调用存储器505中存储的程序代码执行对所述待清理应用程序列表中除所述目标应用程序之外的待清理应用程序进行内存清理处理,具体用于执行以下步骤:
周期性地对所述待清理应用程序列表中除所述目标应用程序之外的待清理应用程序进行内存清理处理。
在可选的实施例中,处理器501调用存储器505中存储的程序代码执行对所述待清理应用程序列表中除所述目标应用程序之外的待清理应用程序进行内存清理处理之后,还用于执行以下步骤:
将所述内存清理处理对应的处理信息发送至服务器。
本发明实施例中所述单元,可以通过通用集成电路,例如CPU(Central Processing Unit,中央处理器),或通过ASIC(Application Specific Integrated Circuit,专用集成电路)来实现。
本发明实施例方法中的步骤可以根据实际需要进行顺序调整、合并和删 减。
本发明实施例终端中的模块或单元可以根据实际需要进行合并、划分和删减。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,所述的程序可存储于一计算机可读取存储介质中,该程序在执行时,可包括如上述各方法的实施例的流程。其中,所述的存储介质可为磁碟、光盘、只读存储记忆体(Read-Only Memory,ROM)或随机存储记忆体(Random Access Memory,RAM)等。
以上所揭露的仅为本发明较佳实施例而已,当然不能以此来限定本发明之权利范围,因此依本发明权利要求所作的等同变化,仍属本发明所涵盖的范围。
应当理解,在本发明实施例中,所称处理器501可以是中央处理单元(Central Processing Unit,CPU),该处理器还可以是其他通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现成可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。
总线504可以是工业标准体系结构(Industry Standard Architecture,ISA)总线、外部设备互联(Peripheral Component,PCI)总线或扩展工业标准体系结构(Extended Industry Standard Architecture,EISA)总线等,该总线504可以分为地址总线、数据总线、控制总线等,为便于表示,图5仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,所述的程序可存储于计算机存储介质中,该程序在执行时,可包括如上述各方法的实施例的流程。其中,所述的计算机存储介质可为磁碟、光盘、只读存储记忆体(Read-Only Memory,ROM)或随机存储记忆体(Random Access Memory,RAM)等。
以上所揭露的仅为本发明较佳实施例而已,当然不能以此来限定本发明之权利范围,因此依本发明权利要求所作的等同变化,仍属本发明所涵盖的范围。

Claims (10)

  1. 一种内存清理方法,其特征在于,包括:
    获取选定应用程序列表中选定应用程序的内存占用信息以及所述选定应用程序对应的预设内存信息;
    从所述选定应用程序列表中选择出所述内存占用信息与所述预设内存信息不匹配的待清理应用程序,得到待清理应用程序列表;
    根据所述待清理应用程序的特征信息从所述待清理应用程序列表中选择出目标应用程序;
    对所述待清理应用程序列表中除所述目标应用程序之外的待清理应用程序进行内存清理处理。
  2. 根据权利要求1所述的方法,其特征在于,所述特征信息包括工作状态;
    所述根据所述待清理应用程序的特征信息从所述待清理应用程序列表中选择出目标应用程序,包括:
    从所述待清理应用程序列表中选择出所述工作状态为运行状态的待清理应用程序,并将所述工作状态为运行状态的待清理应用程序确定为目标应用程序。
  3. 根据权利要求1所述的方法,其特征在于,所述特征信息包括使用优先级;
    所述根据所述待清理应用程序的特征信息从所述待清理应用程序列表中选择出目标应用程序,包括:
    按照所述使用优先级从高到低的顺序对所述待清理应用程序列表进行排序,得到排序后的待清理应用程序列表;
    从所述排序后的待清理应用程序列表中选择前N个待清理应用程序,并将所述前N个待清理应用程序确定为目标应用程序。
  4. 根据权利要求1-3任一项所述的方法,其特征在于,所述内存占用信息包括内存占用大小,所述预设内存信息包括预设内存大小;
    所述从所述选定应用程序列表中选择出所述内存占用信息与所述预设内 存信息不匹配的待清理应用程序,包括:
    从所述选定应用程序列表中选择出所述内存占用大小大于所述预设内存大小的待清理应用程序。
  5. 根据权利要求1-3任一项所述的方法,其特征在于,所述对所述待清理应用程序列表中除所述目标应用程序之外的待清理应用程序进行内存清理处理,包括:
    在用户终端处于锁屏状态的情况下,对所述待清理应用程序列表中除所述目标应用程序之外的待清理应用程序进行内存清理处理。
  6. 根据权利要求1-3任一项所述的方法,其特征在于,所述对所述待清理应用程序列表中除所述目标应用程序之外的待清理应用程序进行内存清理处理,包括:
    周期性地对所述待清理应用程序列表中除所述目标应用程序之外的待清理应用程序进行内存清理处理。
  7. 根据权利要求1所述的方法,其特征在于,所述对所述待清理应用程序列表中除所述目标应用程序之外的待清理应用程序进行内存清理处理之后,还包括:
    将所述内存清理处理对应的处理信息发送至服务器。
  8. 一种用户终端,其特征在于,包括用于执行如权利要求1-7任一权利要求所述的方法的单元。
  9. 一种用户终端,其特征在于,包括处理器、输入设备、输出设备和存储器,所述处理器、输入设备、输出设备和存储器相互连接,其中,所述存储器用于存储计算机程序,所述计算机程序包括程序指令,所述处理器被配置用于调用所述程序指令,执行如权利要求1-7任一项所述的方法。
  10. 一种计算机可读存储介质,其特征在于,所述计算机存储介质存储有计算机程序,所述计算机程序包括程序指令,所述程序指令当被处理器执行时使所述处理器执行如权利要求1-7任一项所述的方法。
PCT/CN2017/100630 2017-09-06 2017-09-06 一种内存清理方法及用户终端 WO2019047045A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/CN2017/100630 WO2019047045A1 (zh) 2017-09-06 2017-09-06 一种内存清理方法及用户终端

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2017/100630 WO2019047045A1 (zh) 2017-09-06 2017-09-06 一种内存清理方法及用户终端

Publications (1)

Publication Number Publication Date
WO2019047045A1 true WO2019047045A1 (zh) 2019-03-14

Family

ID=65633349

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/100630 WO2019047045A1 (zh) 2017-09-06 2017-09-06 一种内存清理方法及用户终端

Country Status (1)

Country Link
WO (1) WO2019047045A1 (zh)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103092700A (zh) * 2013-02-01 2013-05-08 华为终端有限公司 内存清理方法、装置和终端设备
CN103324575A (zh) * 2012-03-23 2013-09-25 腾讯科技(深圳)有限公司 清理内存的方法和移动终端
CN104536907A (zh) * 2015-01-26 2015-04-22 联想(北京)有限公司 一种内存清理方法及电子设备
CN105335099A (zh) * 2015-09-25 2016-02-17 深圳市金立通信设备有限公司 一种内存清理方法及终端
CN105893153A (zh) * 2016-03-31 2016-08-24 北京百纳威尔无线通信设备有限公司 移动终端的内存清理方法和装置
CN106776030A (zh) * 2016-12-21 2017-05-31 维沃移动通信有限公司 一种动态管理内存的方法及移动终端

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103324575A (zh) * 2012-03-23 2013-09-25 腾讯科技(深圳)有限公司 清理内存的方法和移动终端
CN103092700A (zh) * 2013-02-01 2013-05-08 华为终端有限公司 内存清理方法、装置和终端设备
CN104536907A (zh) * 2015-01-26 2015-04-22 联想(北京)有限公司 一种内存清理方法及电子设备
CN105335099A (zh) * 2015-09-25 2016-02-17 深圳市金立通信设备有限公司 一种内存清理方法及终端
CN105893153A (zh) * 2016-03-31 2016-08-24 北京百纳威尔无线通信设备有限公司 移动终端的内存清理方法和装置
CN106776030A (zh) * 2016-12-21 2017-05-31 维沃移动通信有限公司 一种动态管理内存的方法及移动终端

Similar Documents

Publication Publication Date Title
CN108958844B (zh) 一种应用程序的控制方法及终端
US20170076208A1 (en) Terminal application launching method, and terminal
US8510748B2 (en) Portable communication device operating method
US20060264197A1 (en) Mobile device battery warning for data downloads
CN108063818B (zh) 数据下载方法、装置、终端和计算机可读存储介质
CN105988805B (zh) 一种应用程序的管理方法及移动终端
CN103631522A (zh) 一种在移动终端上自定义快捷操作方式的方法和装置
CN110896578A (zh) 基于音乐律动的车内氛围灯调节方法、系统、及电子设备
CN107992631B (zh) 一种文件管理方法及终端
JP2009514084A (ja) リセット装置を具えたデータ処理装置
CN105955770A (zh) 一种应用程序的卸载方法和终端
CN108701026A (zh) 用于在存储器约束下管理进程的方法和装置
CN104486483A (zh) 一种终端
CN112083988A (zh) 屏幕刷新率控制方法、移动终端及计算机可读存储介质
CN105224421A (zh) 一种数据备份方法、装置及电子设备
US9965295B2 (en) Creating a custom series of commands
WO2020082376A1 (zh) 桌面管理方法、装置、移动终端以及存储介质
CN108293197B (zh) 一种资源统计方法、装置及终端
CN104199708A (zh) 一种系统清理方法、设备和移动终端
CN105827838A (zh) 一种屏幕亮度的调大方法和终端
WO2019047045A1 (zh) 一种内存清理方法及用户终端
WO2020132991A1 (zh) 应用推送方法、装置、移动终端及存储介质
CN107766057B (zh) 一种卸载控制方法、装置、终端及可读存储介质
CN108133123B (zh) 一种应用程序的识别方法及系统
CN106406740A (zh) 功能的快速启动方法、装置及终端

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17924310

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 17924310

Country of ref document: EP

Kind code of ref document: A1