Application program management method and device, equipment and storage medium
By dynamically determining the startup method of the application, the problems of insufficient memory and slow response caused by too many applications on the terminal device are solved, the application startup speed and system fluency are improved, and the user experience is improved.
Patent Information
- Application Number
- CN202411190940.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-27
- Publication Date
- 2025-01-07
AI Technical Summary
Too many applications installed on the terminal device lead to insufficient running memory, which leads to slow response. Users need to wait for a long time each time they open the application, which affects the user experience.
Dynamically determine how the application starts, including cold start, hot start and warm start, optimize the application startup speed by obtaining the duration of the application in the background state and the available running memory and system load of the terminal device.
It effectively improves the startup speed of the application and system fluency, and improves the user experience.
Smart Images

Figure CN119271295A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of device management, and in particular to an application management method, apparatus, device and storage medium. Background Art
[0002] With the popularity of terminal devices, more and more applications are installed on terminal devices. If all applications are turned on, the device will run out of memory, which will cause the device to respond slowly. If all applications are cleared from the background after use, the user needs to open the application in a cold start mode each time. If the user uses an application frequently, each time the application is opened, it will take a long time to start, resulting in a poor user experience. Therefore, how to manage applications to optimize the startup speed of applications and improve the user experience is an urgent problem to be solved. Summary of the invention
[0003] The main purpose of this application is to provide an application management method, device, equipment and storage medium, aiming to optimize the startup speed of the application to improve the user experience.
[0004] In a first aspect, the present application provides an application management method, which is applied to a terminal device, and the application management method comprises the following steps:
[0005] Obtaining the duration of the application being in the background state, and obtaining the available operating memory and system load of the terminal device;
[0006] When the duration is less than or equal to a preset first threshold, determining a target startup mode of the application according to the available running memory;
[0007] When the duration is greater than the first threshold, determining a target startup mode of the application program according to the available running memory and the system load;
[0008] The startup mode of the application is set to the target startup mode.
[0009] In some embodiments, when the duration is less than or equal to a preset first threshold, determining the target startup mode of the application according to the available running memory includes:
[0010] When the duration is less than or equal to a preset second threshold and the available running memory is less than or equal to the preset available running memory, determining that the target startup mode is a cold startup mode, and the second threshold is less than the first threshold;
[0011] When the duration is less than or equal to the second threshold and the available running memory is greater than a preset available running memory, determining that the target startup mode is a hot startup mode;
[0012] When the duration is greater than the second threshold and less than or equal to the first threshold, and the available running memory is greater than the preset available running memory, determining that the target startup mode is a warm startup mode;
[0013] When the duration is greater than the second threshold and less than or equal to the first threshold and the available running memory is less than or equal to the preset available running memory, it is determined that the target startup mode is a cold startup mode.
[0014] In some embodiments, when the duration is greater than a preset first threshold, determining the target startup mode of the application according to the available running memory and the system load includes:
[0015] When the duration is greater than a first threshold and the system load is less than or equal to a preset load, determining that the target startup mode is a cold startup mode;
[0016] When the duration is greater than a first threshold, the system load is greater than a preset load, and the available operating memory is less than or equal to a preset available operating memory, determining that the target startup mode is a cold startup mode;
[0017] When the duration is greater than a first threshold, the system load is greater than a preset load, and the available operating memory is greater than a preset available operating memory, it is determined that the target startup mode is a warm startup mode.
[0018] In some embodiments, setting the startup mode of the application to the target startup mode includes:
[0019] Obtaining a mapping relationship table between preset target startup modes and control instructions, and querying the target control instructions matching the target startup mode from the mapping relationship table;
[0020] The process of the application is adjusted according to the target control instruction to set the startup mode of the application to the target startup mode.
[0021] In some embodiments, the method further comprises:
[0022] Acquire an application type of the application, and determine a target startup mode of the application according to the duration and the application type;
[0023] The startup mode of the application is set to the target startup mode.
[0024] In some embodiments, determining the target startup mode of the application program according to the duration and the application type includes:
[0025] When the duration is less than or equal to the first threshold and the application type belongs to a preset first type, determining that the target startup mode of the application program is a hot startup mode;
[0026] When the duration is greater than the first threshold and the application type belongs to a preset first type, it is determined that the target startup mode of the application program is a warm startup mode.
[0027] In some embodiments, the method further comprises:
[0028] When the terminal device is detected to be powered on and restarted, obtaining a target application program whose application type belongs to a preset first type;
[0029] The target startup mode of each target application is adjusted to a warm startup mode.
[0030] In a second aspect, the present application further provides an application management device, the application management device comprising an acquisition module, a determination module and an adjustment module, wherein:
[0031] The acquisition module is used to acquire the duration of the application being in the background state, and to acquire the available running memory and system load of the terminal device;
[0032] The determination module is used to determine the target startup mode of the application according to the available running memory when the duration is less than or equal to a preset first threshold;
[0033] The determination module is further configured to determine a target startup mode of the application program according to the available running memory and the system load when the duration is greater than the first threshold;
[0034] The adjustment module is used to set the startup mode of the application to the target startup mode.
[0035] In a third aspect, the present application also provides a terminal device, comprising a processor, a memory, and a computer program stored in the memory and executable by the processor, wherein when the computer program is executed by the processor, the steps of the application management method as described above are implemented.
[0036] In a fourth aspect, the present application further provides a computer-readable storage medium, on which a computer program is stored, wherein when the computer program is executed by a processor, the steps of the application management method as described above are implemented.
[0037] The present application provides an application management method, apparatus, device and storage medium. The present application obtains the duration of the application being in the background state, and obtains the available running memory and system load of the terminal device; when the duration is less than or equal to a preset first threshold, the target startup mode of the application is determined according to the available running memory; when the duration is greater than the first threshold, the target startup mode of the application is determined according to the available running memory and the system load; and the startup mode of the application is set to the target startup mode. Based on the duration of the application being in the background state, the available running memory and the system load, the present application can accurately set the application to be in different startup modes, can effectively improve the startup speed of the application and improve the fluency of the system, thereby improving the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0039] Figure 1 A flowchart of an application management method provided in an embodiment of the present application;
[0040] Figure 2 A flowchart of another application management method provided in an embodiment of the present application;
[0041] Figure 3 A flowchart of another application management method provided in an embodiment of the present application;
[0042] Figure 4 A schematic block diagram of an application management device provided in an embodiment of the present application;
[0043] Figure 5 A schematic block diagram of the structure of a terminal device provided in an embodiment of the present application.
[0044] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0045] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0046] The flowcharts shown in the accompanying drawings are only examples and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps may also be decomposed, combined or partially merged, so the actual execution order may change according to actual conditions.
[0047] With the popularization of terminal devices, more and more applications are installed on terminal devices. If all applications are turned on, the device will run out of memory, which will cause the device to respond slowly. If all applications are cleared from background running after use, the user will need to open the application in cold start mode each time. If the user uses an application frequently, each time the application is opened, it will take a long time to start, resulting in a poor user experience.
[0048] To solve the above problems, the embodiments of the present application provide an application management method, apparatus, device and storage medium. The application management method includes: obtaining the duration of the application in the background state, and obtaining the available running memory and system load of the terminal device; when the duration is less than or equal to a preset first threshold, determining the target startup mode of the application according to the available running memory; when the duration is greater than the first threshold, determining the target startup mode of the application according to the available running memory and the system load; setting the startup mode of the application to the target startup mode
[0049] Among them, the application management method can be applied to terminal devices, such as mobile phones, tablet computers, laptops, desktop computers, augmented reality glasses, AR helmets, mixed reality (MR) glasses, MR helmets, VR glasses and VR helmets, etc.
[0050] In conjunction with the accompanying drawings, some embodiments of the present application are described in detail below. In the absence of conflict, the following embodiments and features in the embodiments can be combined with each other.
[0051] Please refer to Figure 1 , Figure 1 A flowchart of an application management method provided in an embodiment of the present application.
[0052] like Figure 1As shown, the application management method includes steps S101 to S104.
[0053] Step S101: Obtain the duration of the application being in the background state, and obtain the available running memory and system load of the terminal device.
[0054] Among them, the application includes but is not limited to browsers, email, WeChat, QQ, game assistants, etc.
[0055] In some embodiments, the status of each application in the terminal device is monitored, wherein the status of the application includes the foreground state, the background state, and the unstarted state. The foreground state indicates the state of the application in use; the background state indicates that the application is exited in the background and is in a standby state; the unstarted state indicates that the application has been exited. When the application exits from the foreground state to the background state, the duration of the application in the background state begins to be monitored. By monitoring the application, the duration of the application in the background state can be accurately obtained, which greatly improves the accuracy of application management.
[0056] Exemplarily, it is monitored that the browser exits from the foreground to the background state at 10:00:00, and the duration of the browser in the background state is counted. When the current timestamp is 10:05:00, it is determined that the duration of the browser in the background state is 5 minutes.
[0057] In some embodiments, the available operating memory and system load of the terminal device are obtained, wherein the available operating memory is the remaining amount of the terminal device's operating memory, and the system load is the system load thread ratio of the terminal device. For example, if the terminal device's operating memory is 12GB, the used operating memory is 9GB, and the available operating memory is 3GB. If the maximum load thread of the terminal device is 16 threads, and the used load thread is 12 threads, then the system load is 75%.
[0058] Step S102: when the duration is less than or equal to a preset first threshold, determine a target startup mode of the application according to the available running memory.
[0059] Among them, the startup methods include application startup methods such as cold start method, warm start method and hot start method. The cold start method means that before the application is clicked to start, the application process is not in the system, wherein the system is the operating system of the terminal device, and the system needs to create a new process assigned to the application; the warm start method means that the application is returned to the background after the cold start, the application process is still in the system, and the application components in the process are killed. When the application is restarted, the application components need to be re-acquired to complete the application startup process; the hot start method means that the application is returned to the background after the cold start, the application process is still in the system, and the process of returning to the application again at this time.
[0060] It should be noted that the preset first threshold value can be set according to actual conditions, and the embodiment of the present invention does not specifically limit this. For example, the preset first threshold value can be set to 10 minutes. The preset available running memory can be set according to actual conditions, and the embodiment of the present invention specifically limits this. For example, if the running memory of the terminal device is 12GB, the preset available running memory can be set to 1GB.
[0061] In some embodiments, when the duration is less than or equal to the first threshold and the available running memory is less than or equal to the preset available running memory, the target startup mode is determined to be a cold startup mode. When the available running memory of the terminal device is small, the target startup mode of the application in the background state is determined to be a cold startup mode, so as to kill the process of the application, thereby releasing the running memory of the terminal device, so as to improve the fluency of the terminal device and thus improve the user experience.
[0062] Exemplarily, the first threshold is set to 10 minutes, and the preset available running memory is 1GB; the duration of the terminal device is 8 minutes, and the available running memory is 0.5GB; it can be seen that the duration of 8 minutes is less than the first threshold setting of 10 minutes, and the available running memory of 0.5GB is less than the preset available running memory of 1GB, and it is determined that the target startup mode of the application is the cold start mode.
[0063] In some embodiments, when the duration is less than or equal to a preset second threshold and the available operating memory is less than or equal to the preset available operating memory, the target startup mode is determined to be a cold startup mode. When the available operating memory of the terminal device is small, the target startup mode of the application in the background state is determined to be a cold startup mode, so as to kill the process of the application, thereby releasing the operating memory of the terminal device, thereby improving the fluency of the terminal device and thus improving the user experience.
[0064] Exemplarily, the second threshold is set to 5 minutes, and the preset available running memory is 1GB; the duration of the terminal device is 3 minutes, and the available running memory is 0.5GB; it can be seen that the duration of 3 minutes is less than the second threshold setting of 5 minutes, and the available running memory of 0.5GB is less than the preset available running memory of 1GB, and it is determined that the target startup mode of the application is the cold start mode.
[0065] In some embodiments, when the duration is less than or equal to a preset second threshold and the available running memory is greater than the preset available running memory, the target startup mode is determined to be a hot startup mode, wherein the second threshold is less than the first threshold. Among them, the preset second threshold can be set according to actual conditions, and the embodiment of the present invention does not specifically limit this. For example, the second threshold can be set to 5 minutes, and the first threshold can be set to 10 minutes. When the application is in the background state for a short time and the terminal device has sufficient available running memory, the target startup mode of the application is determined to be a hot startup mode, so that the application process can be stored, and then the application can be started again more quickly, that is, without affecting the performance of the terminal device, the application startup speed can be improved, which greatly improves the user experience.
[0066] Exemplarily, the preset second threshold is 5 minutes, and the preset available running memory is 1GB; the duration of the terminal device is 4 minutes, and the available running memory is 4GB; it can be seen that the duration of 4 minutes is less than the second threshold setting of 5 minutes, and the available running memory of 4GB is less than the preset available running memory of 1GB, and it is determined that the target startup mode of the application is hot startup mode.
[0067] In some embodiments, when the duration is less than or equal to the first threshold and greater than the second threshold, and the available operating memory is greater than the preset available operating memory, the target startup mode is determined to be a warm startup mode. When the duration of the application in the background state is of an intermediate duration, and the terminal device has sufficient available operating memory, the target startup mode of the application is determined to be a warm startup mode, so that the application component can be killed while the application process exists, and the application startup speed can be increased without affecting the performance of the terminal device, which greatly improves the user experience.
[0068] Exemplarily, the preset first threshold is 10 minutes, the preset second threshold is 5 minutes, and the preset available running memory is 1GB; the duration of the terminal device is 8 minutes, and the available running memory is 4GB; it can be seen that the duration of 8 minutes is greater than the second threshold of 5 minutes and less than the preset first threshold of 10 minutes, and the available running memory of 4GB is less than the preset available running memory of 1GB, and it is determined that the target startup mode of the application is warm startup mode.
[0069] In some embodiments, when the duration is greater than the second threshold and less than or equal to the first threshold, and the available operating memory is less than or equal to the preset available operating memory, the target startup mode is determined to be a cold startup mode. When the available operating memory of the terminal device is small, the target startup mode of the application in the background state is determined to be a cold startup mode, so as to kill the process of the application, thereby releasing the operating memory of the terminal device, so as to improve the fluency of the terminal device, and thus improve the user experience.
[0070] Exemplarily, the first threshold is set to 10 minutes, the preset second threshold is 5 minutes, and the preset available running memory is 1GB; the duration of the terminal device is 8 minutes, and the available running memory is 0.5GB; it can be seen that the duration of 8 minutes is less than the first threshold of 10 minutes and greater than the second threshold of 5 minutes, and the available running memory of 0.5GB is less than the preset available running memory of 1GB, and it is determined that the target startup mode of the application is the cold start mode.
[0071] Step S103: when the duration is greater than the first threshold, determine a target startup mode of the application program according to the available running memory and the system load.
[0072] In some embodiments, when the duration is greater than the first threshold and the system load is less than or equal to the preset load, the target startup mode is determined to be a cold startup mode. The preset load can be set according to actual conditions, and the embodiment of the present invention does not specifically limit this. For example, the preset load can be set to 80%. When the application is in the background state for a long time and the system load is small, in order to improve the fluency of the terminal device, the target startup mode of the application is determined to be a cold startup mode, so that the system thread is started to kill the process of the application. Without affecting the performance of the terminal device, the fluency of the application can be improved, which greatly improves the user experience.
[0073] Exemplarily, the first threshold is 10 minutes, and the preset load is 80%; when the duration is obtained to be 12 minutes, the system load is 60%; it can be seen that the duration of 12 minutes is greater than the first threshold of 10 minutes, and the system load of 60% is less than the preset load of 80%, and it is determined that the target startup mode of the application is the cold start mode.
[0074] In some embodiments, when the duration is greater than a first threshold, the system load is greater than a preset load, and the available operating memory is less than or equal to the preset available operating memory, the target startup mode is determined to be a cold startup mode. When the application is in the background state for a long time, the system load is small and the available operating memory is small. In order to improve the fluency of the terminal device, the target startup mode of the application is determined to be a cold startup mode, so that the system thread is started to kill the process of the application. Without affecting the performance of the terminal device, the fluency of the application can be improved, which greatly improves the user experience.
[0075] Exemplarily, the first threshold is 10 minutes, the preset load is 80%, and the preset available running memory is 1GB; when the duration is 12 minutes, the system load is 60%, and the available running memory is 0.5GB; it can be seen that the duration of 12 minutes is greater than the first threshold of 10 minutes, the system load of 60% is less than the preset load of 80%, and the available running memory of 0.5GB is less than the preset available running memory of 1GB, and it is determined that the target startup mode of the application is the cold start mode.
[0076] In some embodiments, when the duration is greater than a first threshold, the system load is greater than a preset load, and the available operating memory is greater than the preset available operating memory, the target startup mode is determined to be a warm startup mode. When the application is in the background state for a long time, the system load is large and the available operating memory is large, in order to improve the fluency of the terminal device, the target startup mode of the application is determined to be a warm startup mode, which can avoid occupying the system load thread to process the application, and can improve the fluency of the application without affecting the performance of the terminal device, greatly improving the user experience.
[0077] Exemplarily, the first threshold is 10 minutes, the preset load is 80%, and the preset available running memory is 1GB; when the duration is 12 minutes, the system load is 90%, and the available running memory is 5GB; it can be seen that the duration of 12 minutes is greater than the first threshold of 10 minutes, the system load of 90% is greater than the preset load of 80%, and the available running memory of 5GB is greater than the preset available running memory of 1GB, and it is determined that the target startup mode of the application is the warm startup mode.
[0078] Step S104: setting the startup mode of the application to the target startup mode.
[0079] Among them, the hot start mode is that the application process does not change, so that the application with the target start mode of hot start mode can be quickly started according to the existing process when it is restarted; the warm start mode is that the application process is retained, and the application components contained in the process are killed, so that when the application with the target start mode of warm start mode is restarted, the application components are obtained according to the existing process and restarted according to the process and application components; the cold start mode is to kill the application, so that when the application with the target start mode of cold start mode is restarted, it is necessary to re-obtain the process and restart according to the process.
[0080] In some embodiments, a mapping relationship table between a preset target startup mode and a control instruction is obtained, and the target control instruction matched by the target startup mode is queried from the mapping relationship table; the process of the application is adjusted according to the target control instruction to set the startup mode of the application to the target startup mode. Among them, the mapping relationship table is established in advance according to the target startup mode and the control instruction, and the mapping relationship table can be established according to actual conditions, and the embodiment of the present invention does not specifically limit this. Through the mapping relationship table, the target control instruction matched by the target startup mode can be accurately determined, and the process of the application can be adjusted according to the target control instruction, and the startup mode of the application can be accurately set to the target startup mode, which greatly improves the efficiency and accuracy of application management.
[0081] Exemplarily, a mapping relationship table is provided between preset target startup modes and control instructions, and the target control instructions that match the warm startup mode are queried from the mapping relationship table as control instructions for retaining processes and killing application components. According to the control instructions for retaining processes and killing application components, the application process is retained and the application component is killed, so that the application is in warm startup mode.
[0082] For example, Figure 2As shown, step S201, obtain the duration of the application in the background state, and obtain the available running memory and system load of the terminal device; step S202, when the duration is less than or equal to the first threshold, determine whether the available running memory is less than the preset available running memory; step S203, when the available running memory is less than or equal to the preset available running memory, determine that the target startup mode is a cold start mode; step S204, when the available running memory is greater than the preset available running memory, determine that the target startup mode is a hot start mode; step S205, when the duration is less than or equal to the first threshold and greater than the second threshold, and the available running memory is greater than the preset Assuming that available running memory is available, determine that the target startup mode is a warm startup mode; step S206, when the duration is greater than or equal to the first threshold and the system load is less than or equal to the preset load, determine that the target startup mode is a cold startup mode; step S207, when the duration is greater than or equal to the first threshold, the system load is greater than the preset load, and the available running memory is less than or equal to the preset available running memory, determine that the target startup mode is a cold startup mode; step S208, when the duration is greater than or equal to the first threshold, the system load is greater than the preset load, and the available running memory is greater than the preset available running memory, determine that the target startup mode is a warm startup mode.
[0083] See also Figure 3 , Figure 3 A flowchart of another application management method provided in an embodiment of the present application.
[0084] like Figure 3 As shown, the application management method includes steps 301 to 302.
[0085] Step 301: Obtain the application type of the application, and determine the target startup mode of the application according to the duration and the application type.
[0086] Among them, the application type includes a preset first type and a preset second type. The preset first type is an application type that characterizes that the application is a high-frequency used application. For example, the application types of WeChat, browser and email are the preset first type. The preset second type is an application type of low-frequency used applications, such as network disk, dictionary and map, etc.
[0087] In some embodiments, a mapping table between preset applications and application types is obtained, and the application type to which the application belongs is queried from the mapping table; and the target startup mode of the application is determined according to the duration and the application type. The mapping table is established in advance according to the application and the application type, and the mapping table can be established according to the time situation, which is not specifically limited in the embodiments of the present invention.
[0088] In some embodiments, when the duration is less than or equal to the first threshold and the application type belongs to the preset first type, the target startup mode of the application is determined to be the hot startup mode; when the duration is greater than the first threshold and the application type belongs to the preset first type, the target startup mode of the application is determined to be the warm startup mode. When the type of the application belongs to the preset first type and the application is in the background state for a short time, the application is set to the hot startup mode to increase the startup speed of the application.
[0089] In some embodiments, when the duration is less than or equal to a first threshold and the application type belongs to a preset second type, the target startup mode of the application is determined to be a warm startup mode; when the duration is greater than the first threshold and the application type belongs to the preset second type, the target startup mode of the application is determined to be a cold startup mode.
[0090] Step 302: Set the startup mode of the application to the target startup mode.
[0091] In some embodiments, a mapping relationship table between a preset target startup mode and a control instruction is obtained, and the target control instruction matched by the target startup mode is queried from the mapping relationship table; the process of the application is adjusted according to the target control instruction to set the startup mode of the application to the target startup mode. Among them, the mapping relationship table is established in advance according to the target startup mode and the control instruction, and the mapping relationship table can be established according to actual conditions, and the embodiment of the present invention does not specifically limit this. Through the mapping relationship table, the target control instruction matched by the target startup mode can be accurately determined, and the process of the application can be adjusted according to the target control instruction, and the startup mode of the application can be accurately set to the target startup mode, which greatly improves the efficiency and accuracy of application management.
[0092] In some embodiments, when the terminal device is detected to be powered on and restarted, a target application program of a preset first type is obtained; and the target startup mode of each target application program is adjusted to a warm startup mode. When the terminal device is powered on and restarted, the target startup mode of the target application program of the preset first type is adjusted to a warm startup mode, so as to increase the startup speed of relatively important or frequently used applications, thereby improving the user experience.
[0093] The application management method provided in the above embodiment obtains the duration of the application being in the background state, and obtains the available running memory and system load of the terminal device; when the duration is less than or equal to a preset first threshold, the target startup mode of the application is determined according to the available running memory; when the duration is greater than the first threshold, the target startup mode of the application is determined according to the available running memory and the system load; and the startup mode of the application is set to the target startup mode. In this application, based on the duration of the application being in the background state, the available running memory and the system load, the application can be accurately set in different startup modes, which can effectively improve the startup speed of the application and improve the fluency of the system, thereby improving the user experience.
[0094] See also Figure 4 , Figure 4 A schematic block diagram of an application management device provided in an embodiment of the present application.
[0095] like Figure 4 As shown, the application management device 400 includes an acquisition module 410, a determination module 420 and an adjustment module 430, wherein:
[0096] The acquisition module 410 is used to acquire the duration of the application being in the background state, and to acquire the available operating memory and system load of the terminal device;
[0097] The determination module 420 is used to determine the target startup mode of the application according to the available running memory when the duration is less than or equal to a preset first threshold;
[0098] The determination module 420 is further configured to determine a target startup mode of the application program according to the available running memory and the system load when the duration is greater than the first threshold;
[0099] The adjustment module 430 is used to set the startup mode of the application to the target startup mode.
[0100] In some embodiments, the determining module 420 is further configured to:
[0101] When the duration is less than or equal to a preset second threshold and the available running memory is less than or equal to the preset available running memory, determining that the target startup mode is a cold startup mode, and the second threshold is less than the first threshold;
[0102] When the duration is less than or equal to the second threshold and the available running memory is greater than a preset available running memory, determining that the target startup mode is a hot startup mode;
[0103] When the duration is greater than the second threshold and less than or equal to the first threshold, and the available running memory is greater than the preset available running memory, determining that the target startup mode is a warm startup mode;
[0104] When the duration is greater than the second threshold and less than or equal to the first threshold and the available running memory is less than or equal to the preset available running memory, it is determined that the target startup mode is a cold startup mode.
[0105] In some embodiments, the determining module 420 is further configured to:
[0106] When the duration is greater than a first threshold and the system load is less than or equal to a preset load, determining that the target startup mode is a cold startup mode;
[0107] When the duration is greater than a first threshold, the system load is greater than a preset load, and the available operating memory is less than or equal to a preset available operating memory, determining that the target startup mode is a cold startup mode;
[0108] When the duration is greater than a first threshold, the system load is greater than a preset load, and the available operating memory is greater than a preset available operating memory, it is determined that the target startup mode is a warm startup mode.
[0109] In some embodiments, the determining module 420 is further configured to:
[0110] Obtaining a mapping relationship table between preset target startup modes and control instructions, and querying the target control instructions matching the target startup mode from the mapping relationship table;
[0111] The process of the application is adjusted according to the target control instruction to set the startup mode of the application to the target startup mode.
[0112] In some embodiments, the application management device 400 is further used to:
[0113] Acquire an application type of the application, and determine a target startup mode of the application according to the duration and the application type;
[0114] The startup mode of the application is set to the target startup mode.
[0115] In some embodiments, the determining module 420 is further configured to:
[0116] When the duration is less than or equal to the first threshold and the application type belongs to a preset first type, determining that the target startup mode of the application program is a hot startup mode;
[0117] When the duration is greater than the first threshold and the application type belongs to a preset first type, it is determined that the target startup mode of the application program is a warm startup mode.
[0118] In some embodiments, the application management device 400 is further used to:
[0119] When the terminal device is detected to be powered on and restarted, obtaining a target application program whose application type belongs to a preset first type;
[0120] The target startup mode of each target application is adjusted to a warm startup mode.
[0121] It should be noted that those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the above-mentioned application management device can refer to the corresponding process in the aforementioned application management method embodiment, and will not be repeated here.
[0122] See also Figure 5 , Figure 5 A schematic block diagram of the structure of a terminal device provided in an embodiment of the present application.
[0123] like Figure 5 As shown, the terminal device 500 includes a processor 502 and a memory 503 connected via a system bus 501, wherein the memory 503 may include a storage medium and an internal memory.
[0124] The storage medium can store a computer program. The computer program includes program instructions, and when the program instructions are executed, the processor can execute any application management method.
[0125] The processor 502 is used to provide computing and control capabilities to support the operation of the entire terminal device.
[0126] The internal memory provides an environment for the operation of the computer program in the storage medium. When the computer program is executed by the processor, the processor can execute any application management method.
[0127] Those skilled in the art will understand that Figure 5 The structure shown in the figure is only a block diagram of a partial structure related to the scheme of the present application, and does not constitute a limitation on the terminal device to which the scheme of the present application is applied. The specific terminal device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0128] It should be understood that the processor 502 may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0129] In one embodiment, the processor 502 is used to run a computer program stored in the memory to implement the following steps:
[0130] Obtaining the duration of the application being in the background state, and obtaining the available operating memory and system load of the terminal device;
[0131] When the duration is less than or equal to a preset first threshold, determining a target startup mode of the application according to the available running memory;
[0132] When the duration is greater than the first threshold, determining a target startup mode of the application program according to the available running memory and the system load;
[0133] The startup mode of the application is set to the target startup mode.
[0134] In one embodiment, when the processor 502 determines the target startup mode of the application according to the available running memory when the duration is less than or equal to the preset first threshold, it is configured to implement:
[0135] When the duration is less than or equal to a preset second threshold and the available running memory is less than or equal to the preset available running memory, determining that the target startup mode is a cold startup mode, and the second threshold is less than the first threshold;
[0136] When the duration is less than or equal to the second threshold and the available running memory is greater than a preset available running memory, determining that the target startup mode is a hot startup mode;
[0137] When the duration is greater than the second threshold and less than or equal to the first threshold, and the available running memory is greater than the preset available running memory, determining that the target startup mode is a warm startup mode;
[0138] When the duration is greater than the second threshold and less than or equal to the first threshold and the available running memory is less than or equal to the preset available running memory, it is determined that the target startup mode is a cold startup mode.
[0139] In one embodiment, when the processor 502 determines the target startup mode of the application according to the available running memory and the system load when the duration is greater than the preset first threshold, it is configured to implement:
[0140] When the duration is greater than a first threshold and the system load is less than or equal to a preset load, determining that the target startup mode is a cold startup mode;
[0141] When the duration is greater than a first threshold, the system load is greater than a preset load, and the available operating memory is less than or equal to a preset available operating memory, determining that the target startup mode is a cold startup mode;
[0142] When the duration is greater than a first threshold, the system load is greater than a preset load, and the available operating memory is greater than a preset available operating memory, it is determined that the target startup mode is a warm startup mode.
[0143] In one embodiment, when implementing the setting of the startup mode of the application to the target startup mode, the processor 502 is configured to implement:
[0144] Obtaining a mapping relationship table between preset target startup modes and control instructions, and querying the target control instructions matching the target startup mode from the mapping relationship table;
[0145] The process of the application is adjusted according to the target control instruction to set the startup mode of the application to the target startup mode.
[0146] In one embodiment, the processor 502 is further configured to implement:
[0147] Acquire an application type of the application, and determine a target startup mode of the application according to the duration and the application type;
[0148] The startup mode of the application is set to the target startup mode.
[0149] In one embodiment, when implementing the step of determining the target startup mode of the application program according to the duration and the application type, the processor 502 is configured to implement:
[0150] When the duration is less than or equal to the first threshold and the application type belongs to a preset first type, determining that the target startup mode of the application program is a hot startup mode;
[0151] When the duration is greater than the first threshold and the application type belongs to a preset first type, it is determined that the target startup mode of the application program is a warm startup mode.
[0152] In one embodiment, the processor 502 is further configured to implement:
[0153] When the terminal device is detected to be powered on and restarted, obtaining a target application program whose application type belongs to a preset first type;
[0154] The target startup mode of each target application is adjusted to a warm startup mode.
[0155] It should be noted that those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the terminal device described above can refer to the corresponding process in the aforementioned application management method embodiment, and will not be repeated here.
[0156] An embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored. The computer program includes program instructions. The method implemented when the program instructions are executed can refer to the various embodiments of the application management method of the present application.
[0157] The computer-readable storage medium may be an internal storage unit of the terminal device described in the foregoing embodiment, such as a hard disk or memory of the terminal device. The computer-readable storage medium may be non-volatile or volatile. The computer-readable storage medium may also be an external storage device of the terminal device, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (SecureDigital, SD) card, a flash card (Flash Card), etc., equipped on the terminal device.
[0158] It should be understood that the terms used in this application specification are only for the purpose of describing specific embodiments and are not intended to limit the application. As used in this application specification, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.
[0159] It should also be understood that the term "and / or" used in the present specification refers to any combination of one or more of the associated listed items and all possible combinations, including these combinations. It should be noted that, in this article, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "including a..." does not exclude the presence of other identical elements in the process, method, article or system including the element.
[0160] The serial numbers of the embodiments of the present application are for description only and do not represent the advantages and disadvantages of the embodiments. The above description is only a specific implementation mode of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present application, and these modifications or replacements should be included in the protection scope of the present application.
Claims
1. An application management method, characterized in that: Applied to a terminal device, the method comprises: Obtaining the duration of the application being in the background state, and obtaining the available operating memory and system load of the terminal device; When the duration is less than or equal to a preset first threshold, determining a target startup mode of the application according to the available running memory; When the duration is greater than the first threshold, determining a target startup mode of the application program according to the available running memory and the system load; The startup mode of the application is set to the target startup mode.
2. The application management method according to claim 1, characterized in that: When the duration is less than or equal to a preset first threshold, determining the target startup mode of the application according to the available running memory includes: When the duration is less than or equal to a preset second threshold and the available running memory is less than or equal to the preset available running memory, determining that the target startup mode is a cold startup mode, and the second threshold is less than the first threshold; When the duration is less than or equal to the second threshold and the available running memory is greater than a preset available running memory, determining that the target startup mode is a hot startup mode; When the duration is greater than the second threshold and less than or equal to the first threshold, and the available running memory is greater than the preset available running memory, determining that the target startup mode is a warm startup mode; When the duration is greater than the second threshold and less than or equal to the first threshold and the available running memory is less than or equal to the preset available running memory, it is determined that the target startup mode is a cold startup mode.
3. The application management method according to claim 1, characterized in that: When the duration is greater than a preset first threshold, determining a target startup mode of the application according to the available running memory and the system load includes: When the duration is greater than a first threshold and the system load is less than or equal to a preset load, determining that the target startup mode is a cold startup mode; When the duration is greater than a first threshold, the system load is greater than a preset load, and the available operating memory is less than or equal to a preset available operating memory, determining that the target startup mode is a cold startup mode; When the duration is greater than a first threshold, the system load is greater than a preset load, and the available operating memory is greater than a preset available operating memory, it is determined that the target startup mode is a warm startup mode.
4. The application management method according to claim 1, characterized in that: The step of setting the startup mode of the application to the target startup mode includes: Obtaining a mapping relationship table between preset target startup modes and control instructions, and querying the target control instructions matching the target startup mode from the mapping relationship table; The process of the application is adjusted according to the target control instruction to set the startup mode of the application to the target startup mode.
5. The application management method according to any one of claims 1 to 4, characterized in that: The method further comprises: Acquire an application type of the application, and determine a target startup mode of the application according to the duration and the application type; The startup mode of the application is set to the target startup mode.
6. The application management method according to claim 5, characterized in that: The determining the target startup mode of the application program according to the duration and the application type includes: When the duration is less than or equal to the first threshold and the application type belongs to a preset first type, determining that the target startup mode of the application program is a hot startup mode; When the duration is greater than the first threshold and the application type belongs to a preset first type, it is determined that the target startup mode of the application program is a warm startup mode.
7. The application management method according to claim 6, characterized in that: The method further comprises: When the terminal device is detected to be powered on and restarted, obtaining a target application program whose application type belongs to a preset first type; The target startup mode of each target application is adjusted to a warm startup mode.
8. An application management device, characterized in that: The application management device comprises an acquisition module, a determination module and an adjustment module, wherein: The acquisition module is used to acquire the duration of the application being in the background state, and to acquire the available running memory and system load of the terminal device; The determination module is used to determine the target startup mode of the application according to the available running memory when the duration is less than or equal to a preset first threshold; The determination module is further configured to determine a target startup mode of the application program according to the available running memory and the system load when the duration is greater than the first threshold; The adjustment module is used to set the startup mode of the application to the target startup mode.
9. A terminal device, characterized in that: The terminal device includes a processor, a memory, and a computer program stored in the memory and executable by the processor, wherein when the computer program is executed by the processor, the steps of the application management method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein when the computer program is executed by a processor, the steps of the application management method according to any one of claims 1 to 7 are implemented.