WO2020206690A1 - 应用清理方法、装置、存储介质及电子设备 - Google Patents

应用清理方法、装置、存储介质及电子设备 Download PDF

Info

Publication number
WO2020206690A1
WO2020206690A1 PCT/CN2019/082494 CN2019082494W WO2020206690A1 WO 2020206690 A1 WO2020206690 A1 WO 2020206690A1 CN 2019082494 W CN2019082494 W CN 2019082494W WO 2020206690 A1 WO2020206690 A1 WO 2020206690A1
Authority
WO
WIPO (PCT)
Prior art keywords
electronic device
information
time period
application
sub
Prior art date
Application number
PCT/CN2019/082494
Other languages
English (en)
French (fr)
Inventor
戴堃
吴建文
陆天洋
张寅祥
帅朝春
Original Assignee
深圳市欢太科技有限公司
Oppo广东移动通信有限公司
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 深圳市欢太科技有限公司, Oppo广东移动通信有限公司 filed Critical 深圳市欢太科技有限公司
Priority to CN201980092376.0A priority Critical patent/CN113439263A/zh
Priority to PCT/CN2019/082494 priority patent/WO2020206690A1/zh
Publication of WO2020206690A1 publication Critical patent/WO2020206690A1/zh

Links

Images

Classifications

    • 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

  • This application belongs to the technical field of electronic equipment, and in particular relates to an application cleaning method, device, storage medium and electronic equipment.
  • terminals have gradually evolved from simply providing call equipment to a platform for general software operation.
  • the platform no longer provides call management as its main purpose, but provides an operating environment including call management, game entertainment, office notes, mobile payment and other application software.
  • call management As a large number of popularization, it has penetrated into people's All aspects of life and work.
  • the current electronic device system supports simultaneous running of multiple applications, that is, one application runs in the foreground and other applications can run in the background.
  • the electronic device system automatically determines whether to clean up the background application.
  • This application provides an application cleaning method, device, storage medium, and electronic equipment, which can improve the accuracy of application cleaning.
  • an application cleaning method including:
  • the target application program among the one or more applications currently running on the electronic device is cleaned up.
  • an embodiment of the present application provides an application cleaning device, including: an acquisition module, a division module, a prediction module, and a processing module;
  • the acquiring module is configured to acquire historical usage information of the electronic device in a first time period, where the historical usage information is used to indicate device resource usage information of the electronic device in the first time period;
  • the dividing module is configured to obtain multiple sub-information contained in the historical usage information according to a second time period, where the first time period includes multiple second time periods;
  • the prediction module is configured to generate predicted device resource usage information of the electronic device in a second time period in the future according to the multiple sub-information;
  • the processing module is configured to clean up target applications among one or more applications currently running on the electronic device according to the predicted device resource usage information.
  • an embodiment of the present application provides a storage medium on which a computer program is stored, and when the computer program runs on a computer, the computer is caused to execute the above application cleaning method.
  • an embodiment of the present application provides an electronic device, including a processor and a memory, the memory stores a plurality of instructions, and the processor loads the instructions in the memory to perform the following steps:
  • the target application program among the one or more applications currently running on the electronic device is cleaned up.
  • FIG. 1 is a schematic flowchart of an application cleaning method provided by an embodiment of this application.
  • FIG. 2 is a schematic diagram of another process of an application cleaning method provided by an embodiment of the application.
  • FIG. 3 is a schematic diagram of a scenario of an application cleaning method provided in an embodiment of the application.
  • Figure 4 is a schematic structural diagram of an application cleaning device provided by an embodiment of the application.
  • FIG. 5 is a schematic diagram of another structure of the application cleaning device provided by an embodiment of the application.
  • FIG. 6 is another schematic structural diagram of the application cleaning device provided by an embodiment of the application.
  • FIG. 7 is a schematic structural diagram of an electronic device provided by an embodiment of the application.
  • FIG. 8 is a schematic diagram of another structure of an electronic device provided by an embodiment of the application.
  • the embodiment of the application provides an application cleaning method.
  • the execution subject of the application cleaning method may be the application cleaning device provided in the embodiment of the application, or an electronic device integrated with the application cleaning device, wherein the application cleaning device may use hardware or Realized by software.
  • the application cleaning method includes: acquiring historical usage information of an electronic device in a first time period, where the historical usage information is used to indicate device resource usage information of the electronic device in the first time period;
  • the target application program among the one or more applications currently running on the electronic device is cleaned up.
  • the historical usage information includes: one or more historical time points in the first time period, and device resource usage information of the electronic device at the historical time point, according to the multiple sub-
  • the information generating the predicted device resource usage information of the electronic device in the second time period in the future includes:
  • assigning weight values to the multiple pieces of sub-information respectively includes:
  • the weight value is assigned to the multiple sub-information according to the difference between the intermediate time point of the multiple sub-information and the current time.
  • cleaning up target applications in one or more applications currently running on the electronic device according to the predicted device resource usage information includes:
  • cleaning the target application in one or more applications currently running on the electronic device includes:
  • cleaning the target application in one or more applications currently running on the electronic device includes:
  • the target application in the one or more applications currently running on the electronic device is cleaned up.
  • the device resources include a CPU, a memory, and a battery.
  • the method further includes:
  • FIG. 1 is a schematic flowchart of an application cleaning method provided by an embodiment of the application.
  • the application cleaning method provided in the embodiment of the application is applied to electronic equipment, and the specific process may be as follows:
  • Step 101 Obtain historical usage information of an electronic device in a first time period, where the historical usage information is used to indicate device resource usage information of the electronic device in the first time period.
  • the electronic device can record the current device resource usage rate in real time, and when the application cleaning method of this application needs to be executed, the historical usage information of the electronic device in the first time period is obtained.
  • the historical usage information includes the time point and the corresponding device
  • the mapping relationship of the resource usage rate, the time point can be in hours or minutes.
  • the above-mentioned historical usage information is used to predict the user’s usage habits, so it is possible to obtain historical usage information for a longer period of time to improve the accuracy of the prediction.
  • the above-mentioned first time period can be three days or four days, etc.
  • the first time period can also be set by the user according to requirements.
  • the above device resource usage rate may include one or more of a CPU usage rate, a memory usage rate, and a battery usage rate, which may reflect the usage of the electronic device.
  • the electronic device can record the current CPU usage rate, memory usage rate, and battery usage rate in real time, and then calculate the current device resource usage rate using the weight values of the above CPU usage rate, memory usage rate, and battery usage rate, and then store it to the electronic device Of historical usage information.
  • the application cleaning instruction is received, the historical usage information of the first time period is acquired. That is, before acquiring the historical usage information of the electronic device in the first time period, the method further includes:
  • Step 102 Acquire multiple pieces of sub-information included in the historical usage information according to a second time period, where the first time period includes multiple second time periods.
  • the historical usage information After receiving the historical use information of the electronic device in the first time period, since the above historical use information reflects the use of the electronic device in a relatively long period of time, it can further improve the prediction of the next use of the electronic device. For accuracy, the historical usage information can be divided into multiple sub-information according to the second time period, where the second time period is smaller than the first time period.
  • the above-mentioned first time period is 3 days, that is, the acquired historical usage information of the electronic device in the previous 72 hours
  • the second time period can be 24 hours, that is, the three-day historical usage information is divided into three
  • the historical use sub-information is the historical use sub-information of the first day, the second day, and the third day.
  • Step 103 Generate predicted device resource usage information of the electronic device in a second time period in the future according to the multiple sub-information.
  • the electronic device may predict the next second time period. For example, after obtaining the historical usage sub-information on the first, second, and third days before the current time, predict the user usage information for the next day, and predict the device resource usage at each time point in the next day rate.
  • the average value may be calculated according to the device resource usage rate corresponding to each time point in the multiple pieces of sub-information, so as to obtain the predicted device resource usage information of the electronic device in the second time period in the future.
  • the device resource usage rate corresponding to a certain time point is 20%, 30%, and 40%, respectively, and then the device resource usage rate at that time point in the future can be predicted by calculation to be 30%.
  • Step 104 According to the predicted device resource usage information, the target application program among the one or more applications currently running on the electronic device is cleaned up.
  • the predicted device resource usage information includes the predicted value of the device resource usage rate corresponding to each time point in the second time period in the future.
  • the electronic Clean up the applications running in the device is less than the preset value.
  • the application program currently running on the electronic device can be acquired through the application identifier, where the application identifier refers to the unique identifier of the application installed in the electronic device, so that the application identifier can be used to identify the application of the electronic device.
  • the opened application identifier may be recorded when the electronic device starts the application.
  • cleaning the applications in the electronic device can reduce the power consumption of the electronic device, thereby improving the battery life of the mobile phone.
  • a switch can be set to turn on when the electronic device is low, otherwise it is turned off The function.
  • the remaining power of the electronic device can be obtained before cleaning the application running in the electronic device, and when the remaining power is less than the preset power, the step of cleaning the application is executed.
  • the electronic device may obtain the current remaining power before cleaning up the application running in the electronic device, determine whether the remaining power is less than the preset power, and if it is less, perform a check on the electronic device based on the predicted device resource usage information. Steps to clean up the running application.
  • the initial power of the electronic device is predicted.
  • the electronic device consumes a certain amount of power by running multiple programs installed on the electronic device or using hardware.
  • the electronic device can obtain the remaining power of the electronic device in a variety of ways, such as : Directly use the remaining power of the power supply on the electronic device as the remaining power of the electronic device.
  • the main detection methods used by the fuel gauge include voltage test method, battery modeling method, coulomb meter, etc., which are not specifically limited here.
  • the remaining power of the power supply of the electronic device can be detected in real time, or the remaining power of the power supply of the electronic device can be detected regularly, and it can also be adjusted by the user according to actual needs.
  • the electronic device detects the remaining power of the power supply every hour Power, or real-time detection of the remaining power of the electronic device power supply, etc.
  • the remaining power of the power supply of the electronic device may be selected to be periodically detected to save energy consumption, for example, the remaining power of the power supply of the electronic device may be detected every hour.
  • the application when the remaining power of the electronic device is obtained, it is determined whether the application needs to be closed by judging whether the remaining power of the electronic device is less than the preset power, where the preset power is preset by the electronic device according to actual conditions Or user-defined, such as 20% or 30%, etc., which is not specifically limited here. If the remaining power of the electronic device is less than the preset power, then perform cleaning up the application running in the electronic device based on the predicted device resource usage information. If the remaining power of the electronic device is not less than the preset power, then it is determined that the electronic device does not need to clean the application , Directly end the process.
  • the application cleaning method can obtain the historical usage information of the electronic device in the first time period.
  • the historical usage information is used to indicate the device resource usage information of the electronic device in the first time period.
  • the second time period is to obtain multiple sub-information contained in the historical usage information, where the first time period includes multiple second time periods, and the predicted device resource usage information of the electronic device in the second time period in the future is generated according to the multiple sub-information, and according to the predicted The device resource usage information cleans up target applications among one or more applications currently running on the electronic device.
  • the application cleaning method provided in this embodiment can predict the user's future habit of using the electronic device based on the historical usage information of the electronic device, and then clean the applications running in the electronic device according to the prediction result, which can improve the accuracy of application cleaning, and It can also improve the endurance of electronic equipment after cleaning.
  • FIG. 2 is another flowchart of an application cleaning method provided by an embodiment of the application, and the application cleaning method includes:
  • Step 201 Obtain historical usage information of an electronic device in a first time period, where the historical usage information includes a mapping relationship between a time point and a corresponding device resource usage rate.
  • the electronic device can record the current device resource usage rate in real time, and when the application cleaning method of this application needs to be executed, the historical usage information of the electronic device in the first time period is obtained.
  • the historical usage information includes the time point and the corresponding device
  • the mapping relationship of the resource usage rate, the time point can be in hours or minutes.
  • the foregoing historical usage information is used to predict the user's usage habits, and therefore, historical usage information for a longer period of time can be obtained to improve the accuracy of the prediction.
  • the foregoing first time period may be three days.
  • Step 202 Divide the historical usage information into multiple sub-information according to the second time period, where the second time period is smaller than the first time period.
  • the above-mentioned first time period is 3 days, that is, the acquired historical usage information of the electronic device in the previous 72 hours
  • the second time period can be 24 hours, that is, the three-day historical usage information is divided into three
  • the historical use sub-information is the historical use sub-information of the first day, the second day, and the third day.
  • Step 203 Obtain the intermediate time points of the multiple sub-information respectively, and assign weight values to the multiple sub-information according to the difference between the intermediate time points of the multiple sub-information and the current time.
  • the electronic device may predict the next second time period. For example, after obtaining the historical usage sub-information on the first, second, and third days before the current time, predict the user usage information for the next day, and predict the device resource usage at each time point in the next day rate.
  • weight values are assigned to the multiple sub-information based on the difference between the intermediate time point of the multiple sub-information and the current time. For example, after obtaining the historical usage sub-information on the first, second, and third days before the current moment, the historical usage sub-information on the first day has a higher weight than the historical usage sub-information on the second day. The historical use sub-information has a higher weight than the third-day historical use sub-information.
  • Step 204 Calculate and generate predicted device resource usage information of the electronic device in a second time period in the future according to the weight values of the multiple sub-information.
  • the equipment resource utilization rate corresponding to a certain time point is 20%, 30%, and 40%, and their weight values are respectively If it is 50%, 30%, and 20%, the calculation can predict that the equipment resource utilization rate at that time point in the future is 27%.
  • the predicted device resource usage information of the above electronic device in the second time period in the future includes a mapping relationship between a time point and a corresponding device resource usage rate.
  • Step 205 Obtain the predicted device resource usage rate corresponding to the current time according to the predicted device resource usage information.
  • Step 206 Determine whether the predicted device resource usage rate is less than the preset value, if yes, execute step 207, if not, end the process.
  • the above preset value can be 30%.
  • the applications running in the electronic device can be further cleaned up. If it is not less than, the current process is ended. .
  • Step 207 Clean up the applications running in the electronic device.
  • the above-mentioned preset application program can be added by the user or automatically set by the system, which is not further limited in this application.
  • cleaning up the applications running in the electronic device may include:
  • FIG. 3 is a schematic diagram of a scene of an application cleaning method provided by an embodiment of the application.
  • the predicted value of the resource usage rate corresponding to the current time of the electronic device is less than the preset value, obtain the background applications currently running on the electronic device, including application a, application b, and application c, where the above application a is the preset Application, therefore, the electronic device cleans the application b and application c in the background when cleaning, and keeps the application a to continue running in the background.
  • the number of background applications that need to be cleaned up can also be determined according to the predicted device resource usage. For example, if the predicted device resource usage rate at the current moment is 20%, the corresponding number of background applications that need to be cleaned up is 5 , If the predicted device resource utilization rate at the current moment is 15%, the corresponding number of background applications that need to be cleaned up is 6, etc., after determining the number of background applications that need to be cleaned up, you can proceed according to the importance level of the background application shut down.
  • the number of applications that can be reserved in the background of the electronic device can also be determined according to the predicted device resource usage rate.
  • cleaning up the applications running in the electronic device may also include:
  • the application cleaning method can obtain the historical usage information of the electronic device in the first time period, and the historical usage information includes the mapping relationship between the time point and the corresponding device resource usage rate, according to the second time period Divide the historical usage information into multiple sub-information, where the second time period is less than the first time period, respectively obtain the intermediate time points of the multiple sub-information, and compare the multiple sub-information according to the difference between the intermediate time point of the multiple sub-information and the current time Allocate weight values, calculate and generate predicted device resource usage information of the electronic device in the second time period in the future based on the weight values of multiple sub-information, obtain the predicted device resource usage rate corresponding to the current time according to the predicted device resource usage information, and determine the predicted device Whether the resource usage rate is less than the preset value, and if so, clean up the applications running in the electronic device.
  • the application cleaning method provided in this embodiment can predict the user's future habit of using the electronic device based on the historical usage information of the electronic device, and then clean the applications running in the electronic device according to the prediction result, which can improve the accuracy of application cleaning, and It can also improve the endurance of electronic equipment after cleaning.
  • FIG. 4 is a schematic structural diagram of an application cleaning device provided by an embodiment of the application.
  • the application cleaning device 300 includes an acquisition module 301, a division module 302, a prediction module 303, and a processing module 304;
  • the acquiring module 301 is configured to acquire historical usage information of an electronic device in a first time period, where the historical usage information is used to indicate device resource usage information of the electronic device in the first time period;
  • the dividing module 302 is configured to obtain multiple sub-information contained in the historical usage information according to a second time period, where the first time period includes multiple second time periods;
  • the prediction module 303 is configured to generate predicted device resource usage information of the electronic device in a second time period in the future according to the multiple sub-information;
  • the processing module 304 is configured to clean up target applications in one or more applications currently running on the electronic device according to the predicted device resource usage information.
  • the historical usage information includes: one or more historical time points in the first time period, and device resource usage information of the electronic device at the historical time point. Please refer to FIG. 5.
  • FIG. 5 is a schematic structural diagram of an application cleaning device provided by an embodiment of the application, where the prediction module 303 includes: an allocation sub-module 3031 and a prediction sub-module 3032;
  • the allocation sub-module 3031 is configured to allocate weight values to the multiple pieces of information respectively;
  • the prediction sub-module 3032 is configured to calculate and generate predicted device resource usage information of the electronic device in a second time period in the future according to the weight values of the multiple sub-information.
  • the allocation sub-module 3031 is specifically configured to obtain the intermediate time points of the multiple sub-information separately, and compare the multiple sub-information information according to the difference between the intermediate time points of the multiple sub-information and the current time. Assign weight values.
  • the processing module 304 includes: an acquisition sub-module 3041, a judgment sub-module 3042, and a cleaning sub-module 3043;
  • the obtaining submodule 3041 is configured to obtain the predicted device resource usage rate corresponding to the current time according to the predicted device resource usage information
  • the judging sub-module 3042 is used to judge whether the predicted device resource usage rate is less than a preset value
  • the cleaning sub-module 3043 is configured to clean up the target application in the one or more applications currently running on the electronic device when the judgment sub-module 3042 judges yes.
  • the device resources include CPU, memory, and battery. Please refer to FIG. 6.
  • the device 30 further includes: a recording module 305 and a calculation module 306;
  • the recording module 305 is configured to record the CPU usage rate, memory usage rate, and battery usage rate of the electronic device in real time before the acquisition module 301 acquires the historical usage information of the electronic device in the first time period;
  • the calculation module 306 is configured to calculate the current device resource usage information of the electronic device according to the CPU usage rate, memory usage rate, and battery usage rate.
  • the application cleaning apparatus of the embodiment of the present application can obtain the historical usage information of the electronic device in the first time period.
  • the historical usage information is used to indicate the device resource usage information of the electronic device in the first time period.
  • Time period acquires multiple sub-information contained in historical usage information, where the first time period includes multiple second time periods, the predicted device resource usage information of the electronic device in the second time period in the future is generated according to the multiple sub-information, and the predicted device resource usage information is based on the predicted device
  • the resource usage information cleans up target applications among one or more applications currently running on the electronic device.
  • the application cleaning method provided in this embodiment can predict the user's future habit of using the electronic device based on the historical usage information of the electronic device, and then clean the applications running in the electronic device according to the prediction result, which can improve the accuracy of application cleaning, and It can also improve the endurance of electronic equipment after cleaning.
  • the application cleaning device and the application cleaning method in the above embodiment belong to the same concept. Any method provided in the application cleaning method embodiment can be run on the application cleaning device. For the specific implementation process, see Application cleaning The embodiment of the method will not be repeated here.
  • module used herein can be regarded as a software object executed on the operating system.
  • the different components, modules, engines, and services described in this article can be regarded as implementation objects on the computing system.
  • the devices and methods described herein can be implemented in the form of software, or of course, can also be implemented on hardware, and they are all within the protection scope of the present application.
  • An embodiment of the present application also provides a storage medium on which a computer program is stored, and when the computer program runs on a computer, the computer is caused to execute the above-mentioned application cleaning method.
  • the embodiment of the present application also provides an electronic device, such as a tablet computer, a mobile phone, and so on.
  • the processor in the electronic device will load the instructions corresponding to the process of one or more application programs into the memory according to the following steps, and the processor will run the application programs stored in the memory to realize various functions:
  • the target application program among the one or more applications currently running on the electronic device is cleaned up.
  • the historical usage information includes: one or more historical time points in the first time period, and device resource usage information of the electronic device at the historical time point;
  • the processor When generating predicted device resource usage information of the electronic device in a second time period in the future according to the multiple sub-information, the processor is configured to perform the following steps:
  • the processor when assigning weight values to the multiple sub-information respectively, the processor is configured to perform the following steps:
  • the weight value is assigned to the multiple sub-information according to the difference between the intermediate time point of the multiple sub-information and the current time.
  • the processor when the target application in one or more applications currently running on the electronic device is cleaned up according to the predicted device resource usage information, the processor is configured to perform the following steps:
  • the processor when cleaning up the target application in one or more applications currently running on the electronic device, the processor is configured to perform the following steps:
  • the processor when cleaning up the target application in one or more applications currently running on the electronic device, the processor is configured to perform the following steps:
  • the target application in the one or more applications currently running on the electronic device is cleaned up.
  • the device resources include a CPU, a memory, and a battery.
  • the processor is further configured to perform the following steps:
  • the electronic device 400 includes a processor 401 and a memory 402.
  • the processor 401 is electrically connected to the memory 402.
  • the processor 400 is the control center of the electronic device 400. It uses various interfaces and lines to connect the various parts of the entire electronic device. It executes the electronic device by running or loading the computer program stored in the memory 402 and calling the data stored in the memory 402. Various functions of the device 400 and processing data, so as to monitor the electronic device 400 as a whole.
  • the memory 402 can be used to store software programs and modules.
  • the processor 401 executes various functional applications and data processing by running the computer programs and modules stored in the memory 402.
  • the memory 402 may mainly include a storage program area and a storage data area.
  • the storage program area may store an operating system, a computer program required by at least one function (such as a sound playback function, an image playback function, etc.), etc.; Data created by the use of electronic equipment, etc.
  • the memory 402 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other volatile solid-state storage devices.
  • the memory 402 may also include a memory controller to provide the processor 401 with access to the memory 402.
  • the processor 401 in the electronic device 400 will load the instructions corresponding to the process of one or more computer programs into the memory 402 according to the following steps, and the processor 401 will run and store the instructions in the memory 402 In order to realize various functions in the computer program, as follows:
  • the target application program among the one or more applications currently running on the electronic device is cleaned up.
  • the electronic device 400 may further include: a display 403, a radio frequency circuit 404, an audio circuit 405, and a power supply 406.
  • the display 403, the radio frequency circuit 404, the audio circuit 405, and the power supply 406 are electrically connected to the processor 401, respectively.
  • the display 403 may be used to display information input by the user or information provided to the user, and various graphical user interfaces. These graphical user interfaces may be composed of graphics, text, icons, videos, and any combination thereof.
  • the display 403 may include a display panel.
  • the display panel may be configured in the form of a liquid crystal display (LCD), or an organic light-emitting diode (OLED).
  • LCD liquid crystal display
  • OLED organic light-emitting diode
  • the radio frequency circuit 404 may be used to transmit and receive radio frequency signals to establish wireless communication with network equipment or other electronic equipment through wireless communication, and to transmit and receive signals with the network equipment or other electronic equipment.
  • the audio circuit 405 may be used to provide an audio interface between the user and the electronic device through a speaker or a microphone.
  • the power supply 406 can be used to power various components of the electronic device 400.
  • the power supply 406 may be logically connected to the processor 401 through a power management system, so that functions such as charging, discharging, and power consumption management can be managed through the power management system.
  • the electronic device 400 may also include a camera, a Bluetooth module, etc., which will not be repeated here.
  • the storage medium may be a magnetic disk, an optical disc, a read only memory (Read Only Memory, ROM), or a random access memory (Random Access Memory, RAM), etc.
  • the computer program may be stored in a computer readable storage medium, such as stored in the memory of an electronic device, and executed by at least one processor in the electronic device.
  • the execution process may include the application of the cleaning method of the embodiment. Process.
  • the storage medium can be magnetic disk, optical disk, read-only memory, random access memory, etc.
  • the application cleaning device of the embodiment of the present application its functional modules may be integrated into one processing chip, or each module may exist alone physically, or two or more modules may be integrated into one module.
  • the above-mentioned integrated modules can be implemented in the form of hardware or software functional modules. If the integrated module is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer readable storage medium, such as a read-only memory, a magnetic disk, or an optical disk.

Landscapes

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

Abstract

一种应用清理方法、装置、存储介质和电子设备。方法包括:获取电子设备在第一时间段内的历史使用信息,根据第二时间段获取历史使用信息包含的多个子信息,根据多个子信息生成电子设备在未来第二时间段内的预测设备资源使用信息并对电子设备中的应用程序进行清理。

Description

应用清理方法、装置、存储介质及电子设备 技术领域
本申请属于电子设备技术领域,尤其涉及一种应用清理方法、装置、存储介质及电子设备。
背景技术
随着终端技术的发展,终端已经开始从以前简单地提供通话设备渐渐变成一个通用软件运行的平台。该平台不再以提供通话管理为主要目的,而是提供一个包括通话管理、游戏娱乐、办公记事、移动支付等各类应用软件在内的运行环境,随着大量的普及,已经深入至人们的生活、工作的方方面面。
目前,智能手机等电子设备上,通常会安装多个不同功能的应用,以解决用户的不同需求。目前电子设备的系统支持多个应用同时运行,即一个应用在前台运行,其他应用可以在后台运行,由电子设备系统自动判断是否对后台应用程序进行清理。
发明内容
本申请提供一种应用清理方法、装置、存储介质及电子设备,能够提升应用程序清理的准确性。
第一方面,本申请实施例提供一种应用清理方法,包括:
获取电子设备在第一时间段内的历史使用信息,所述历史使用信息用于表示所述电子设备在第一时间段内的设备资源使用信息;
根据第二时间段获取所述历史使用信息包含的多个子信息,其中,所述第一时间段包括多个第二时间段;
根据所述多个子信息生成所述电子设备在未来第二时间段内的预测设备资源使用信息;
根据所述预测设备资源使用信息对所述电子设备当前运行的一个或多个应用程序中的目标应用程序进行清理。
第二方面,本申请实施例提供一种应用清理装置,包括:获取模块、划分模块、预测模块以及处理模块;
所述获取模块,用于获取电子设备在第一时间段内的历史使用信息,所述历史使用信息用于表示所述电子设备在第一时间段内的设备资源使用信息;
所述划分模块,用于根据第二时间段获取所述历史使用信息包含的多个子信息,其中,所述第一时间段包括多个第二时间段;
所述预测模块,用于根据所述多个子信息生成所述电子设备在未来第二时间段内的预测设备资源使用信息;
所述处理模块,用于根据所述预测设备资源使用信息对所述电子设备当前运行的一个或多个应用程序中的目标应用程序进行清理。
第三方面,本申请实施例提供一种存储介质,其上存储有计算机程序,当所述计算机程序在计算机上运行时,使得所述计算机执行上述的应用清理方法。
第四方面,本申请实施例提供一种电子设备,包括处理器和存储器,所述存储器存储有多条指令,所述处理器加载所述存储器中的指令用于执行以下步骤:
获取电子设备在第一时间段内的历史使用信息,所述历史使用信息用于表示所述电子设备在第一时间段内的设备资源使用信息;
根据第二时间段获取所述历史使用信息包含的多个子信息,其中,所述第一时间段包括多个第二时间段;
根据所述多个子信息生成所述电子设备在未来第二时间段内的预测设备资源使用信息;
根据所述预测设备资源使用信息对所述电子设备当前运行的一个或多个应用程序中的目标应用程序进行清理。
附图说明
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍。显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1为本申请实施例提供的应用清理方法的一种流程示意图。
图2为本申请实施例提供的应用清理方法的另一流程示意图。
图3为本申请实施例提供的应用清理方法的场景示意图。
图4为本申请实施例提供的应用清理装置的结构示意图。
图5为本申请实施例提供的应用清理装置的另一结构示意图。
图6为本申请实施例提供的应用清理装置的又一结构示意图。
图7为本申请实施例提供的电子设备的结构示意图。
图8为本申请实施例提供的电子设备的另一结构示意图。
具体实施方式
请参照图式,其中相同的组件符号代表相同的组件,本申请的原理是以实施在一适当的运算环境中来举例说明。以下的说明是基于所例示的本申请具体实施例,其不应被视为限制本申请未在此详述的其它具体实施例。
在以下的说明中,本申请的具体实施例将参考由一部或多部计算机所执行的步骤及符号来说明,除非另有述明。因此,这些步骤及操作将有数次提到由计算机执行,本文所指的计算机执行包括了由代表了以一结构化型式中的数据的电子信号的计算机处理单元的操作。此操作转换该数据或将其维持在该计算机的内存系统中的位置处,其可重新配置或另外以本领域测试人员所熟知的方式来改变该计算机的运作。该数据所维持的数据结构为该内存的实体位置,其具有由该数据格式所定义的特定特性。但是,本申请原理以上述文字来说明,其并不代表为一种限制,本领域测试人员将可了解到以下所述的多种步骤及操作亦可实施在硬件当中。
本申请中的术语“第一”、“第二”和“第三”等是用于区别不同对象,而不是用于描述特定顺序。此外,术语“包括”和“具有”以及它们任何变形,意图在于覆盖不排他的包含。例如包含了一系列步骤或模块的过程、方法、系统、产品或设备没有限定于已列出的步骤或模块,而是某些实施例还包括没有列出的步骤或模块,或某些实施例还包括对于这些过程、方法、产品或设备固有的其它步骤或模块。
现有技术当中,当电子设备后台可以常驻许多应用程序,如果长时间不清理后台运行的应用,则会导致电子设备的可用内存变小、中央处理器(central processing unit,CPU)占用率过高,导致电子设备出现运行速度变慢,卡顿,耗电过快等问题。市面上大部分智能手机通常是通过应用程序在后台运行的时长判断其是否需要被关闭,而这种方法就会造成后台应用程序的清理不准确的问题,因此,有必要提供一种方法解决上述问题。
本申请实施例提供一种应用清理方法,该应用清理方法的执行主体可以是本申请实施例提供的应用清理装置,或者集成了该应用清理装置的电子设备,其中该应用清理装置可以采用硬件或者软件的方式实现。
本申请实施例将从应用清理装置的角度进行描述,该应用清理装置具体可以集成在电子设备中。该应用清理方法包括:获取电子设备在第一时间段内的历史使用信息,所述历史使用信息用于表示所述电子设备在第一时间段内的设备资源使用信息;
根据第二时间段获取所述历史使用信息包含的多个子信息,其中,所述第一时间段包括多个第二时间段;
根据所述多个子信息生成所述电子设备在未来第二时间段内的预测设备资源使用信息;
根据所述预测设备资源使用信息对所述电子设备当前运行的一个或多个应用程序中的目标应用程序进行清理。
一实施例中,所述历史使用信息包括:所述第一时间段内的一个或多个历史时间点,与在所述历史时间点所述电子设备的设备资源使用信息,根据所述多个子信息生成所述电子设备在未来第二时间段内的预测设备资源使用信息,包括:
分别对所述多个子信息分配权重值;
根据所述多个子信息的权重值计算并生成所述电子设备在未来第二时间段内的预测设备资源使用信息。
一实施例中,分别对所述多个子信息分配权重值,包括:
分别获取所述多个子信息的中间时间点;
根据所述多个子信息的中间时间点与当前时间的差值对所述多个子信息分配权重值。
一实施例中,根据所述预测设备资源使用信息对所述电子设备当前运行的一个或多个应用程序中的目标应用程序进行清理,包括:
根据所述预测设备资源使用信息获取当前时间对应的预测设备资源使用率;
判断所述预测设备资源使用率是否小于预设值;
若是,则对所述电子设备当前运行的一个或多个应用程序中的目标应用程序进行清理。
一实施例中,对所述电子设备当前运行的一个或多个应用程序中的目标应用程序进行清理,包括:
获取所述电子设备当中运行的后台应用程序;
判断所述后台应用程序是否为预设应用程序;
若否,则关闭所述后台应用程序。
一实施例中,对所述电子设备当前运行的一个或多个应用程序中的目标应用程序进行清理,包括:
根据所述预测设备资源使用率确定待清理应用程序的数量;
根据所述数量对所述电子设备当前运行的一个或多个应用程序中的目标应用程序进行清理。
一实施例中,所述设备资源包括CPU、内存以及电池,在获取电子设备在第一时间段内的历史使用信息之前,所述方法还包括:
实时记录所述电子设备的CPU使用率、内存使用率以及电池使用率;
根据所述CPU使用率、内存使用率以及电池使用率计算所述电子设备当前的设备资源使用信息。
请参阅图1,图1为本申请实施例提供的应用清理方法的流程示意图。本申请实施例提供的应用清理方法应用于电子设备,具体流程可以如下:
步骤101,获取电子设备在第一时间段内的历史使用信息,历史使用信息用于表示电子设备在第一时间段内的设备资源使用信息。
其中,电子设备可以实时记录当前的设备资源使用率,当需要执行本申请的应用清理方法时,获取电子设备在第一时间段内的历史使用信息,该历史使用信息包括时间点与对应的设备资源使用率的映射关系,该时间点可以以小时为单位也可以以分钟为单位等。上 述历史使用信息用于对用户的使用习惯进行预测,因此可以获取较长一段时间的历史使用信息,以提高预测的准确性,比如上述第一时间段可以为三天或者四天等等,该第一时间段也可以由用户根据需求自行设定。
在一实施例中,上述设备资源使用率可以包括CPU使用率、内存使用率以及电池使用率当中的一个或多个,可以体现电子设备的使用情况。比如,电子设备可以实时记录当前的CPU使用率、内存使用率以及电池使用率,然后上述CPU使用率、内存使用率以及电池使用率的权重值计算当前的设备资源使用率,然后存储至电子设备的历史使用信息当中。当接收到应用清理指令时,在获取第一时间段的历史使用信息。也即在获取电子设备在第一时间段内的历史使用信息之前,所述方法还包括:
实时记录所述电子设备的CPU使用率、内存使用率以及电池使用率;
根据所述CPU使用率、内存使用率以及电池使用率计算所述电子设备当前的设备资源使用率。
步骤102,根据第二时间段获取历史使用信息包含的多个子信息,其中,第一时间段包括多个第二时间段。
在接收到电子设备在第一时间段内的历史使用信息之后,由于上述历史使用信息体现的是电子设备在较长一段时间内的使用情况,为进一步提升对电子设备接下来的使用情况预测的准确性,可以根据第二时间段将历史使用信息划分为多个子信息,其中,第二时间段小于第一时间段。
比如,上述第一时间段为3天,也即获取到的电子设备在此前72小时内的历史使用信息,该第二时间段可以为24小时,即将这三天的历史使用信息划分为三个历史使用子信息,分别为此前第一天、第二天以及第三天的历史使用子信息。
步骤103,根据多个子信息生成电子设备在未来第二时间段内的预测设备资源使用信息。
在一实施例中,在获取上述多个子信息后,电子设备可以对接下来的第二时间段进行预测。比如,在获取到当前时刻前的第一天、第二天以及第三天的历史使用子信息后,对未来一天的用户使用信息进行预测,预测未来一天内每个时间点对应的设备资源使用率。
其中,上述根据多个子信息生成电子设备在未来第二时间段内的预测设备资源使用信息的方法可以有多种。一实施例中可以根据上述多个子信息当中内各时间点对应的设备资源使用率计算平均值,以得到电子设备在未来第二时间段内的预测设备资源使用信息。比如在三个历史使用子信息当中,某一时间点对应的设备资源使用率分别为20%、30%以及40%,那么通过计算可以预测未来在该时间点的设备资源使用率为30%。
步骤104,根据预测设备资源使用信息对电子设备当前运行的一个或多个应用程序中的目标应用程序进行清理。
在一实施例中,上述预测设备资源使用信息包括未来第二时间段内每一时间点对应的设备资源使用率预测值,当某一时间点对应的预测值小于预设值时,可以对电子设备中运行的应用程序进行清理。
其中,获取电子设备当前运行的应用程序可以通过应用标识来进行获取,其中,应用标识是指电子设备中所安装的应用的唯一标识,从而可用应用标识对电子设备的应用进行识别。具体地,在本发明一些可能的实施方式中,可以在电子设备开启应用的时候记录所开启的应用标识。
在实际使用当中,清理电子设备中的应用程序可以降低电子设备的功耗,从而提升手机的续航能力,在一实施例中还可以设置一个开关,在电子设备电量较少时进行开启,否则关闭该功能。比如可以在对电子设备中运行的应用程序进行清理之前获取电子设备剩余电量,当剩余电量小于预设电量时,在执行清理应用程序的步骤。具体的,电子设备可以在对电子设备中运行的应用程序进行清理之前获取当前的剩余电量,判断所述剩余电量是否小于预设电量,若小于,则执行根据预测设备资源使用信息对电子设备中运行的应用程序进行清理的步骤。
其中,电子设备的初始电量是预知的,电子设备通过运行安装在电子设备上的多个程序或者使用硬件等方式消耗一定的电量,则电子设备可以根据多种方式获取电子设备的剩余电量,例如:直接将电子设备上电源的剩余电量作为电子设备的剩余电量,在实际应用中,在电源的内部设置有电量计,用于指示电源的剩余电量以及在特定工作条件下电源还能持续供电的时间,其中电量计主要运用的检测方式有电压测试法,电池建模法,库仑计等,此处不做具体限定。
在一实施例中,可以实时检测电子设备电源的剩余电量,也可以定时检测电子设备的电源的剩余电量,还可以由用户根据实际需要进行调整,例如,电子设备每间隔一小时检测电源的剩余电量,或者,实时地检测电子设备电源的剩余电量等。优选的,可以选择定时检测电子设备的电源的剩余电量,以节省能耗,例如,每隔一小时检测一次电子设备的电源的剩余电量。
本发明实施例中,当获取电子设备的剩余电量后,通过判断电子设备的剩余电量是否小于预设电量来决定是否需要关闭应用程序,其中,该预设电量是电子设备根据实际情况预设的或者用户自定义的,比如可以为20%或30%等等,此处不做具体限定。若电子设备的剩余电量小于预设电量,则执行根据预测设备资源使用信息对电子设备中运行的应用程序进行清理,若电子设备的剩余电量不小于预设电量,则确定电子设备无需清理应用程序,直接结束流程。
由上可知,本申请实施例提供的应用清理方法可以获取电子设备在第一时间段内的历史使用信息,历史使用信息用于表示电子设备在第一时间段内的设备资源使用信息,根据 第二时间段获取历史使用信息包含的多个子信息,其中,第一时间段包括多个第二时间段,根据多个子信息生成电子设备在未来第二时间段内的预测设备资源使用信息,根据预测设备资源使用信息对电子设备当前运行的一个或多个应用程序中的目标应用程序进行清理。本实施例提供的应用清理方法可以通过电子设备的历史使用信息来对用户未来使用电子设备的习惯进行预测,然后根据预测结果清理电子设备当中运行的应用程序,可以提升应用清理的准确性,并且在清理后也能提升电子设备的续航能力。
下面将在上述实施例描述的方法基础上,对本申请的清理方法做进一步介绍。参阅图2,图2为本申请实施例提供的应用清理方法的另一流程示意图,该应用清理方法包括:
步骤201,获取电子设备在第一时间段内的历史使用信息,历史使用信息包括时间点与对应的设备资源使用率的映射关系。
其中,电子设备可以实时记录当前的设备资源使用率,当需要执行本申请的应用清理方法时,获取电子设备在第一时间段内的历史使用信息,该历史使用信息包括时间点与对应的设备资源使用率的映射关系,该时间点可以以小时为单位也可以以分钟为单位等。上述历史使用信息用于对用户的使用习惯进行预测,因此可以获取较长一段时间的历史使用信息,以提高预测的准确性,比如上述第一时间段可以为三天。
步骤202,根据第二时间段将历史使用信息划分为多个子信息,其中,第二时间段小于第一时间段。
比如,上述第一时间段为3天,也即获取到的电子设备在此前72小时内的历史使用信息,该第二时间段可以为24小时,即将这三天的历史使用信息划分为三个历史使用子信息,分别为此前第一天、第二天以及第三天的历史使用子信息。
步骤203,分别获取多个子信息的中间时间点,根据多个子信息的中间时间点与当前时间的差值对多个子信息分配权重值。
具体的,在获取上述多个子信息后,电子设备可以对接下来的第二时间段进行预测。比如,在获取到当前时刻前的第一天、第二天以及第三天的历史使用子信息后,对未来一天的用户使用信息进行预测,预测未来一天内每个时间点对应的设备资源使用率。
在一实施例中,由于用户每段时间使用电子设备的使用习惯都可能有所不同,越接近当前时间的历史使用子信息对于未来用户的使用习惯预测越准确,因此可以分别获取多个子信息的中间时间点,根据多个子信息的中间时间点与当前时间的差值对多个子信息分配权重值。比如在获取到当前时刻前的第一天、第二天以及第三天的历史使用子信息后,第一天的历史使用子信息权重高于第二天的历史使用子信息,第二天的历史使用子信息权重高于第三天的历史使用子信息。
步骤204,根据多个子信息的权重值计算并生成电子设备在未来第二时间段内的预测设备资源使用信息。
比如在当前时刻前的第一天、第二天以及第三天三个历史使用子信息当中,某一时间点对应的设备资源使用率分别为20%、30%以及40%,其权重值分别为50%、30%、以及20%,那么计算可预测未来在该时间点的设备资源使用率为27%。上述电子设备在未来第二时间段内的预测设备资源使用信息包括时间点与对应的设备资源使用率的映射关系。
步骤205,根据预测设备资源使用信息获取当前时间对应的预测设备资源使用率。
步骤206,判断预测设备资源使用率是否小于预设值,若是,则执行步骤207,若否,则结束流程。
比如,上述预设值可以为30%,当某一时间点其对应的预测设备资源使用率小于30%时,可以进一步对电子设备中运行的应用程序进行清理,若不小于,则结束当前流程。
步骤207,对电子设备中运行的应用程序进行清理。
在一实施例中,还可以预先设置一些比较重要的应用程序为预设应用程序,然后在清理应用程序之前先判断该应用程序是否为预设应用程序,若否,则继续执行清理应用程序的步骤。这样可以避免关闭对用户较为重要的应用程序,从而造成错失信息数据。其中,上述预设应用程序可以由用户自行添加也可以由系统自动设置,本申请对此不做进一步限定。
也即,对所述电子设备中运行的应用程序进行清理,可以包括:
获取所述电子设备当中运行的后台应用程序;
判断所述后台应用程序是否为预设应用程序;
若否,则关闭所述后台应用程序。
如图3所示,图3为本申请实施例提供的应用清理方法的场景示意图。当电子设备当前时刻对应的资源使用率预测值小于预设值时,获取电子设备当前运行的后台应用程序,包括应用程序a、应用程序b以及应用程序c,其中,上述应用程序a为预设应用程序,因此在清理时电子设备将后台的应用程序b和应用程序c进行清理,保留应用程序a继续在后台运行。
在实际使用当中,可能存在用户正在使用该应用程序的情况,比如即时通信类应用需要在后台接收消息,此时清理该应用程序可能影响用户使用,因此在清理该应用程序之前还可以生成一提示信息并显示在屏幕中,比如“是否关闭XX应用”若用户点击“是”则继续关闭,若用户点击“否”则停止关闭该应用程序。
在其他实施例当中,还可以根据预测设备资源使用率来确定需要清理的后台应用程序的数量,比如若当前时刻的预测设备资源使用率为20%,对应需要清理的后台应用程序数量为5个,若当前时刻的预测设备资源使用率为15%,对应需要清理的后台应用程序数量为6个,等等,在确定需要清理的后台应用程序的数量后,可以根据后台应用程序的重要等级进行关闭。
在其他实施例中,还可以根据预测设备资源使用率来确定电子设备后台可以保留的应用程序的数量。
也即,对所述电子设备中运行的应用程序进行清理,还可以包括:
根据所述预测设备资源使用率确定待清理应用程序的数量;
根据所述数量所述电子设备中运行的应用程序进行清理。
由上可知,本申请实施例提供的应用清理方法可以获取电子设备在第一时间段内的历史使用信息,历史使用信息包括时间点与对应的设备资源使用率的映射关系,根据第二时间段将历史使用信息划分为多个子信息,其中,第二时间段小于第一时间段,分别获取多个子信息的中间时间点,根据多个子信息的中间时间点与当前时间的差值对多个子信息分配权重值,根据多个子信息的权重值计算并生成电子设备在未来第二时间段内的预测设备资源使用信息,根据预测设备资源使用信息获取当前时间对应的预测设备资源使用率,判断预测设备资源使用率是否小于预设值,若是,则对电子设备中运行的应用程序进行清理。本实施例提供的应用清理方法可以通过电子设备的历史使用信息来对用户未来使用电子设备的习惯进行预测,然后根据预测结果清理电子设备当中运行的应用程序,可以提升应用清理的准确性,并且在清理后也能提升电子设备的续航能力。
请参阅图4,图4为本申请实施例提供的应用清理装置的一种结构示意图。其中该应用清理装置300包括获取模块301、划分模块302、预测模块303以及处理模块304;
所述获取模块301,用于获取电子设备在第一时间段内的历史使用信息,所述历史使用信息用于表示所述电子设备在第一时间段内的设备资源使用信息;
所述划分模块302,用于根据第二时间段获取所述历史使用信息包含的多个子信息,其中,所述第一时间段包括多个第二时间段;
所述预测模块303,用于根据所述多个子信息生成所述电子设备在未来第二时间段内的预测设备资源使用信息;
所述处理模块304,用于根据所述预测设备资源使用信息对所述电子设备当前运行的一个或多个应用程序中的目标应用程序进行清理。
在一实施例中,所述历史使用信息包括:所述第一时间段内的一个或多个历史时间点,与在所述历史时间点所述电子设备的设备资源使用信息。请参阅图5,图5为本申请实施例提供的应用清理装置的一种结构示意图,其中,所述预测模块303包括:分配子模块3031和预测子模块3032;
所述分配子模块3031,用于分别对所述多个子信息分配权重值;
所述预测子模块3032,用于根据所述多个子信息的权重值计算并生成所述电子设备在未来第二时间段内的预测设备资源使用信息。
在一实施例中,所述分配子模块3031,具体用于分别获取所述多个子信息的中间时间 点,根据所述多个子信息的中间时间点与当前时间的差值对所述多个子信息分配权重值。
在一实施例中,所述处理模块304包括:获取子模块3041、判断子模块3042以及清理子模块3043;
所述获取子模块3041,用于根据所述预测设备资源使用信息获取当前时间对应的预测设备资源使用率;
所述判断子模块3042,用于判断所述预测设备资源使用率是否小于预设值;
所述清理子模块3043,用于当所述判断子模块3042判断为是时,对所述电子设备当前运行的一个或多个应用程序中的目标应用程序进行清理。
在一实施例中,所述设备资源包括CPU、内存以及电池,请参阅图6,所述装置30还包括:记录模块305和计算模块306;
所述记录模块305,用于在所述获取模块301获取电子设备在第一时间段内的历史使用信息之前,实时记录所述电子设备的CPU使用率、内存使用率以及电池使用率;
所述计算模块306,用于根据所述CPU使用率、内存使用率以及电池使用率计算所述电子设备当前的设备资源使用信息。
由上述可知,本申请实施例的应用清理装置可以获取电子设备在第一时间段内的历史使用信息,历史使用信息用于表示电子设备在第一时间段内的设备资源使用信息,根据第二时间段获取历史使用信息包含的多个子信息,其中,第一时间段包括多个第二时间段,根据多个子信息生成电子设备在未来第二时间段内的预测设备资源使用信息,根据预测设备资源使用信息对电子设备当前运行的一个或多个应用程序中的目标应用程序进行清理。本实施例提供的应用清理方法可以通过电子设备的历史使用信息来对用户未来使用电子设备的习惯进行预测,然后根据预测结果清理电子设备当中运行的应用程序,可以提升应用清理的准确性,并且在清理后也能提升电子设备的续航能力。
本申请实施例中,应用清理装置与上文实施例中的应用清理方法属于同一构思,在应用清理装置上可以运行应用清理方法实施例中提供的任一方法,其具体实现过程详见应用清理方法的实施例,此处不再赘述。
本文所使用的术语“模块”可看作为在该运算系统上执行的软件对象。本文所述的不同组件、模块、引擎及服务可看作为在该运算系统上的实施对象。而本文所述的装置及方法可以以软件的方式进行实施,当然也可在硬件上进行实施,均在本申请保护范围之内。
本申请实施例还提供一种存储介质,其上存储有计算机程序,当所述计算机程序在计算机上运行时,使得所述计算机执行上述的应用清理方法。
本申请实施例还提供一种电子设备,如平板电脑、手机等。电子设备中的处理器会按照如下的步骤,将一个或一个以上的应用程序的进程对应的指令加载到存储器中,并由处理器来运行存储在存储器中的应用程序,从而实现各种功能:
获取电子设备在第一时间段内的历史使用信息,所述历史使用信息用于表示所述电子设备在第一时间段内的设备资源使用信息;
根据第二时间段获取所述历史使用信息包含的多个子信息,其中,所述第一时间段包括多个第二时间段;
根据所述多个子信息生成所述电子设备在未来第二时间段内的预测设备资源使用信息;
根据所述预测设备资源使用信息对所述电子设备当前运行的一个或多个应用程序中的目标应用程序进行清理。
在一实施例中,所述历史使用信息包括:所述第一时间段内的一个或多个历史时间点,与在所述历史时间点所述电子设备的设备资源使用信息;
根据所述多个子信息生成所述电子设备在未来第二时间段内的预测设备资源使用信息时,所述处理器用于执行以下步骤:
分别对所述多个子信息分配权重值;
根据所述多个子信息的权重值计算并生成所述电子设备在未来第二时间段内的预测设备资源使用信息。
在一实施例中,分别对所述多个子信息分配权重值时,所述处理器用于执行以下步骤:
分别获取所述多个子信息的中间时间点;
根据所述多个子信息的中间时间点与当前时间的差值对所述多个子信息分配权重值。
在一实施例中,根据所述预测设备资源使用信息对所述电子设备当前运行的一个或多个应用程序中的目标应用程序进行清理时,所述处理器用于执行以下步骤:
根据所述预测设备资源使用信息获取当前时间对应的预测设备资源使用率;
判断所述预测设备资源使用率是否小于预设值;
若是,则对所述电子设备当前运行的一个或多个应用程序中的目标应用程序进行清理。
在一实施例中,对所述电子设备当前运行的一个或多个应用程序中的目标应用程序进行清理时,所述处理器用于执行以下步骤:
获取所述电子设备当中运行的后台应用程序;
判断所述后台应用程序是否为预设应用程序;
若否,则关闭所述后台应用程序。
在一实施例中,对所述电子设备当前运行的一个或多个应用程序中的目标应用程序进行清理时,所述处理器用于执行以下步骤:
根据所述预测设备资源使用率确定待清理应用程序的数量;
根据所述数量对所述电子设备当前运行的一个或多个应用程序中的目标应用程序进行清理。
在一实施例中,所述设备资源包括CPU、内存以及电池,在获取电子设备在第一时间段内的历史使用信息之前,所述处理器还用于执行以下步骤:
实时记录所述电子设备的CPU使用率、内存使用率以及电池使用率;
根据所述CPU使用率、内存使用率以及电池使用率计算所述电子设备当前的设备资源使用信息。
在本文中提及“实施例”意味着,结合实施例描述的特定特征、结构或特性可以包含在本申请的至少一个实施例中。在说明书中的各个位置出现该短语并不一定均是指相同的实施例,也不是与其它实施例互斥的独立的或备选的实施例。本领域技术人员显式地和隐式地理解的是,本文所描述的实施例可以与其它实施例相结合。
请参阅图7,电子设备400包括处理器401以及存储器402。其中,处理器401与存储器402电性连接。
处理器400是电子设备400的控制中心,利用各种接口和线路连接整个电子设备的各个部分,通过运行或加载存储在存储器402内的计算机程序,以及调用存储在存储器402内的数据,执行电子设备400的各种功能并处理数据,从而对电子设备400进行整体监控。
存储器402可用于存储软件程序以及模块,处理器401通过运行存储在存储器402的计算机程序以及模块,从而执行各种功能应用以及数据处理。存储器402可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的计算机程序(比如声音播放功能、图像播放功能等)等;存储数据区可存储根据电子设备的使用所创建的数据等。此外,存储器402可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。相应地,存储器402还可以包括存储器控制器,以提供处理器401对存储器402的访问。
在本申请实施例中,电子设备400中的处理器401会按照如下的步骤,将一个或一个以上的计算机程序的进程对应的指令加载到存储器402中,并由处理器401运行存储在存储器402中的计算机程序,从而实现各种功能,如下:
获取电子设备在第一时间段内的历史使用信息,所述历史使用信息用于表示所述电子设备在第一时间段内的设备资源使用信息;
根据第二时间段获取所述历史使用信息包含的多个子信息,其中,所述第一时间段包括多个第二时间段;
根据所述多个子信息生成所述电子设备在未来第二时间段内的预测设备资源使用信息;
根据所述预测设备资源使用信息对所述电子设备当前运行的一个或多个应用程序中的目标应用程序进行清理。
请一并参阅图8,在一些实施方式中,电子设备400还可以包括:显示器403、射频 电路404、音频电路405以及电源406。其中,其中,显示器403、射频电路404、音频电路405以及电源406分别与处理器401电性连接。
显示器403可以用于显示由用户输入的信息或提供给用户的信息以及各种图形用户接口,这些图形用户接口可以由图形、文本、图标、视频和其任意组合来构成。显示器403可以包括显示面板,在一些实施方式中,可以采用液晶显示器(Liquid Crystal Display,LCD)、或者有机发光二极管(Organic Light-Emitting Diode,OLED)等形式来配置显示面板。
射频电路404可以用于收发射频信号,以通过无线通信与网络设备或其他电子设备建立无线通讯,与网络设备或其他电子设备之间收发信号。
音频电路405可以用于通过扬声器、传声器提供用户与电子设备之间的音频接口。
电源406可以用于给电子设备400的各个部件供电。在一些实施例中,电源406可以通过电源管理系统与处理器401逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。
尽管图8中未示出,电子设备400还可以包括摄像头、蓝牙模块等,在此不再赘述。
在本申请实施例中,存储介质可以是磁碟、光盘、只读存储器(Read Only Memory,ROM)、或者随机存取记忆体(Random Access Memory,RAM)等。
在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述的部分,可以参见其他实施例的相关描述。
需要说明的是,对本申请实施例的应用清理方法而言,本领域普通测试人员可以理解实现本申请实施例应用清理方法的全部或部分流程,是可以通过计算机程序来控制相关的硬件来完成,计算机程序可存储于一计算机可读取存储介质中,如存储在电子设备的存储器中,并被该电子设备内的至少一个处理器执行,在执行过程中可包括如应用清理方法的实施例的流程。其中,的存储介质可为磁碟、光盘、只读存储器、随机存取记忆体等。
对本申请实施例的应用清理装置而言,其各功能模块可以集成在一个处理芯片中,也可以是各个模块单独物理存在,也可以两个或两个以上模块集成在一个模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。集成的模块如果以软件功能模块的形式实现并作为独立的产品销售或使用时,也可以存储在一个计算机可读取存储介质中,存储介质譬如为只读存储器,磁盘或光盘等。
以上对本申请实施例所提供的一种应用清理方法、装置、存储介质及电子设备进行了详细介绍,本文中应用了具体个例对本申请的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本申请的方法及其核心思想;同时,对于本领域的技术人员,依据本申请的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本申请的限制。

Claims (20)

  1. 一种应用清理方法,其中,所述方法包括以下步骤:
    获取电子设备在第一时间段内的历史使用信息,所述历史使用信息用于表示所述电子设备在第一时间段内的设备资源使用信息;
    根据第二时间段获取所述历史使用信息包含的多个子信息,其中,所述第一时间段包括多个第二时间段;
    根据所述多个子信息生成所述电子设备在未来第二时间段内的预测设备资源使用信息;
    根据所述预测设备资源使用信息对所述电子设备当前运行的一个或多个应用程序中的目标应用程序进行清理。
  2. 根据权利要求1所述的应用清理方法,其中,所述历史使用信息包括:所述第一时间段内的一个或多个历史时间点,与在所述历史时间点所述电子设备的设备资源使用信息;
    根据所述多个子信息生成所述电子设备在未来第二时间段内的预测设备资源使用信息,包括:
    分别对所述多个子信息分配权重值;
    根据所述多个子信息的权重值计算并生成所述电子设备在未来第二时间段内的预测设备资源使用信息。
  3. 根据权利要求2所述的应用清理方法,其中,分别对所述多个子信息分配权重值,包括:
    分别获取所述多个子信息的中间时间点;
    根据所述多个子信息的中间时间点与当前时间的差值对所述多个子信息分配权重值。
  4. 根据权利要求1所述的应用清理方法,其中,根据所述预测设备资源使用信息对所述电子设备当前运行的一个或多个应用程序中的目标应用程序进行清理,包括:
    根据所述预测设备资源使用信息获取当前时间对应的预测设备资源使用率;
    判断所述预测设备资源使用率是否小于预设值;
    若是,则对所述电子设备当前运行的一个或多个应用程序中的目标应用程序进行清理。
  5. 根据权利要求4所述的应用清理方法,其中,对所述电子设备当前运行的一个或多个应用程序中的目标应用程序进行清理,包括:
    获取所述电子设备当中运行的后台应用程序;
    判断所述后台应用程序是否为预设应用程序;
    若否,则关闭所述后台应用程序。
  6. 根据权利要求4所述的应用清理方法,其中,对所述电子设备当前运行的一个或 多个应用程序中的目标应用程序进行清理,包括:
    根据所述预测设备资源使用率确定待清理应用程序的数量;
    根据所述数量对所述电子设备当前运行的一个或多个应用程序中的目标应用程序进行清理。
  7. 根据权利要求1所述的应用清理方法,其中,所述设备资源包括CPU、内存以及电池,在获取电子设备在第一时间段内的历史使用信息之前,所述方法还包括:
    实时记录所述电子设备的CPU使用率、内存使用率以及电池使用率;
    根据所述CPU使用率、内存使用率以及电池使用率计算所述电子设备当前的设备资源使用信息。
  8. 一种应用清理装置,其中,所述装置包括:获取模块、划分模块、预测模块以及处理模块;
    所述获取模块,用于获取电子设备在第一时间段内的历史使用信息,所述历史使用信息用于表示所述电子设备在第一时间段内的设备资源使用信息;
    所述划分模块,用于根据第二时间段获取所述历史使用信息包含的多个子信息,其中,所述第一时间段包括多个第二时间段;
    所述预测模块,用于根据所述多个子信息生成所述电子设备在未来第二时间段内的预测设备资源使用信息;
    所述处理模块,用于根据所述预测设备资源使用信息对所述电子设备当前运行的一个或多个应用程序中的目标应用程序进行清理。
  9. 根据权利要求8所述的应用清理装置,其中,所述历史使用信息包括:所述第一时间段内的一个或多个历史时间点,与在所述历史时间点所述电子设备的设备资源使用信息;
    所述预测模块包括:分配子模块和预测子模块;
    所述分配子模块,用于分别对所述多个子信息分配权重值;
    所述预测子模块,用于根据所述多个子信息的权重值计算并生成所述电子设备在未来第二时间段内的预测设备资源使用信息。
  10. 根据权利要求9所述的应用清理装置,其中,
    所述分配子模块,具体用于分别获取所述多个子信息的中间时间点,根据所述多个子信息的中间时间点与当前时间的差值对所述多个子信息分配权重值。
  11. 根据权利要求8所述的应用清理装置,其中,所述处理模块包括:获取子模块、判断子模块以及清理子模块;
    所述获取子模块,用于根据所述预测设备资源使用信息获取当前时间对应的预测设备资源使用率;
    所述判断子模块,用于判断所述预测设备资源使用率是否小于预设值;
    所述清理子模块,用于当所述判断子模块判断为是时,对所述电子设备当前运行的一个或多个应用程序中的目标应用程序进行清理。
  12. 根据权利要求8所述的应用清理装置,其中,所述设备资源包括CPU、内存以及电池,所述装置还包括:记录模块和计算模块;
    所述记录模块,用于在所述获取模块获取电子设备在第一时间段内的历史使用信息之前,实时记录所述电子设备的CPU使用率、内存使用率以及电池使用率;
    所述计算模块,用于根据所述CPU使用率、内存使用率以及电池使用率计算所述电子设备当前的设备资源使用信息。
  13. 一种存储介质,其上存储有计算机程序,其中,当所述计算机程序在计算机上运行时,使得所述计算机执行如权利要求1至7任一项所述的应用清理方法。
  14. 一种电子设备,包括处理器和存储器,所述存储器存储有多条指令,其中,所述处理器加载所述存储器中的指令用于执行以下步骤:
    获取电子设备在第一时间段内的历史使用信息,所述历史使用信息用于表示所述电子设备在第一时间段内的设备资源使用信息;
    根据第二时间段获取所述历史使用信息包含的多个子信息,其中,所述第一时间段包括多个第二时间段;
    根据所述多个子信息生成所述电子设备在未来第二时间段内的预测设备资源使用信息;
    根据所述预测设备资源使用信息对所述电子设备当前运行的一个或多个应用程序中的目标应用程序进行清理。
  15. 根据权利要求14所述的电子设备,其中,所述历史使用信息包括:所述第一时间段内的一个或多个历史时间点,与在所述历史时间点所述电子设备的设备资源使用信息;
    根据所述多个子信息生成所述电子设备在未来第二时间段内的预测设备资源使用信息时,所述处理器用于执行以下步骤:
    分别对所述多个子信息分配权重值;
    根据所述多个子信息的权重值计算并生成所述电子设备在未来第二时间段内的预测设备资源使用信息。
  16. 根据权利要求15所述的电子设备,其中,分别对所述多个子信息分配权重值时,所述处理器用于执行以下步骤:
    分别获取所述多个子信息的中间时间点;
    根据所述多个子信息的中间时间点与当前时间的差值对所述多个子信息分配权重值。
  17. 根据权利要求14所述的电子设备,其中,根据所述预测设备资源使用信息对所述 电子设备当前运行的一个或多个应用程序中的目标应用程序进行清理时,所述处理器用于执行以下步骤:
    根据所述预测设备资源使用信息获取当前时间对应的预测设备资源使用率;
    判断所述预测设备资源使用率是否小于预设值;
    若是,则对所述电子设备当前运行的一个或多个应用程序中的目标应用程序进行清理。
  18. 根据权利要求17所述的电子设备,其中,对所述电子设备当前运行的一个或多个应用程序中的目标应用程序进行清理时,所述处理器用于执行以下步骤:
    获取所述电子设备当中运行的后台应用程序;
    判断所述后台应用程序是否为预设应用程序;
    若否,则关闭所述后台应用程序。
  19. 根据权利要求17所述的电子设备,其中,对所述电子设备当前运行的一个或多个应用程序中的目标应用程序进行清理时,所述处理器用于执行以下步骤:
    根据所述预测设备资源使用率确定待清理应用程序的数量;
    根据所述数量对所述电子设备当前运行的一个或多个应用程序中的目标应用程序进行清理。
  20. 根据权利要求14所述的电子设备,其中,所述设备资源包括CPU、内存以及电池,在获取电子设备在第一时间段内的历史使用信息之前,所述处理器还用于执行以下步骤:
    实时记录所述电子设备的CPU使用率、内存使用率以及电池使用率;
    根据所述CPU使用率、内存使用率以及电池使用率计算所述电子设备当前的设备资源使用信息。
PCT/CN2019/082494 2019-04-12 2019-04-12 应用清理方法、装置、存储介质及电子设备 WO2020206690A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201980092376.0A CN113439263A (zh) 2019-04-12 2019-04-12 应用清理方法、装置、存储介质及电子设备
PCT/CN2019/082494 WO2020206690A1 (zh) 2019-04-12 2019-04-12 应用清理方法、装置、存储介质及电子设备

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2019/082494 WO2020206690A1 (zh) 2019-04-12 2019-04-12 应用清理方法、装置、存储介质及电子设备

Publications (1)

Publication Number Publication Date
WO2020206690A1 true WO2020206690A1 (zh) 2020-10-15

Family

ID=72752173

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/082494 WO2020206690A1 (zh) 2019-04-12 2019-04-12 应用清理方法、装置、存储介质及电子设备

Country Status (2)

Country Link
CN (1) CN113439263A (zh)
WO (1) WO2020206690A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112214376A (zh) * 2020-10-19 2021-01-12 维沃移动通信有限公司 存储空间提示方法及装置
CN112423004A (zh) * 2020-11-05 2021-02-26 深圳Tcl新技术有限公司 视频数据传输方法、装置、发送端以及存储介质

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102946486A (zh) * 2012-11-20 2013-02-27 惠州Tcl移动通信有限公司 一种基于手机的后台应用自动清理方法及手机
CN103544063A (zh) * 2013-09-30 2014-01-29 三星电子(中国)研发中心 应用于安卓平台的进程清除方法和装置
US20150347209A1 (en) * 2014-05-30 2015-12-03 Genesys Telecommunications Laboratories, Inc. System and method for application inactivity control
CN105786552A (zh) * 2014-12-26 2016-07-20 联想(北京)有限公司 一种内存清理方法和电子设备
CN105892613A (zh) * 2015-12-04 2016-08-24 乐视移动智能信息技术(北京)有限公司 一种清理后台应用程序的方法和装置
CN107450985A (zh) * 2017-07-27 2017-12-08 北京珠穆朗玛移动通信有限公司 内存管理方法、移动终端及存储介质

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2015161480A1 (en) * 2014-04-24 2015-10-29 Empire Technology Development Llc Resource consumption optimization
CN106055404B (zh) * 2016-05-18 2020-05-01 Oppo广东移动通信有限公司 一种清理后台应用程序的方法和装置
CN107608748B (zh) * 2017-09-30 2019-09-13 Oppo广东移动通信有限公司 应用程序管控方法、装置、存储介质及终端设备
CN107800651B (zh) * 2017-10-31 2021-03-02 Oppo广东移动通信有限公司 应用程序关闭方法、装置、存储介质和电子设备
CN107943583B (zh) * 2017-11-14 2022-02-22 Oppo广东移动通信有限公司 应用程序的处理方法、装置、存储介质及电子设备

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102946486A (zh) * 2012-11-20 2013-02-27 惠州Tcl移动通信有限公司 一种基于手机的后台应用自动清理方法及手机
CN103544063A (zh) * 2013-09-30 2014-01-29 三星电子(中国)研发中心 应用于安卓平台的进程清除方法和装置
US20150347209A1 (en) * 2014-05-30 2015-12-03 Genesys Telecommunications Laboratories, Inc. System and method for application inactivity control
CN105786552A (zh) * 2014-12-26 2016-07-20 联想(北京)有限公司 一种内存清理方法和电子设备
CN105892613A (zh) * 2015-12-04 2016-08-24 乐视移动智能信息技术(北京)有限公司 一种清理后台应用程序的方法和装置
CN107450985A (zh) * 2017-07-27 2017-12-08 北京珠穆朗玛移动通信有限公司 内存管理方法、移动终端及存储介质

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112214376A (zh) * 2020-10-19 2021-01-12 维沃移动通信有限公司 存储空间提示方法及装置
CN112423004A (zh) * 2020-11-05 2021-02-26 深圳Tcl新技术有限公司 视频数据传输方法、装置、发送端以及存储介质
CN112423004B (zh) * 2020-11-05 2024-02-06 深圳Tcl新技术有限公司 视频数据传输方法、装置、发送端以及存储介质

Also Published As

Publication number Publication date
CN113439263A (zh) 2021-09-24

Similar Documents

Publication Publication Date Title
US10467025B2 (en) Managing delivery of code and dependent data using application containers
WO2019119985A1 (en) Method for preloading application, storage medium, and terminal device
CN109947496B (zh) 应用程序预加载方法、装置、存储介质及移动终端
CN107483751B (zh) 终端设备及其电量分配方法、计算机可读存储介质
US9465622B2 (en) Application defined computing component configuration
US11431182B2 (en) Resource statistics collection method and apparatus and terminal
JP2020537213A (ja) 端末の電力消費を低減するための方法、および端末
WO2019085749A1 (zh) 应用程序管控方法、装置、介质及电子设备
WO2020206690A1 (zh) 应用清理方法、装置、存储介质及电子设备
WO2019085754A1 (zh) 应用清理方法、装置、存储介质及电子设备
CN107734618B (zh) 应用程序关闭方法、装置、存储介质和电子设备
CN106406494A (zh) 一种处理器调度的方法及终端
JP7272694B2 (ja) 端末の電力消費を低減するための方法、および端末
CN107797832B (zh) 应用清理方法、装置、存储介质及电子设备
CN107832131B (zh) 应用程序关闭方法、装置、存储介质和电子设备
WO2019072179A1 (zh) 应用程序运行控制方法及装置
WO2020133408A1 (zh) 应用程序的优先级调整方法、装置、存储介质及电子设备
WO2020206688A1 (zh) 视频播放方法、装置、存储介质及电子设备
US10884484B2 (en) Extending a battery life of a battery-powered computing device
WO2020133437A1 (zh) 应用程序的管理方法、装置、存储介质及电子设备
CN112199245B (zh) 移动终端屏幕检测方法、系统、存储介质及移动终端
WO2023207671A1 (zh) 一种电池电量状态的确定方法
CN114844911B (zh) 数据存储方法、装置、电子设备及计算机可读存储介质
CN107807855B (zh) 应用清理方法、装置、存储介质及电子设备
WO2020133455A1 (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: 19924449

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 25.02.2022)

122 Ep: pct application non-entry in european phase

Ref document number: 19924449

Country of ref document: EP

Kind code of ref document: A1