Processing method and device of application program and storage medium

By adjusting the trigger threshold of the low memory termination daemon and optimizing memory management strategies in the continuous startup mode of electronic devices, the memory consumption problem of older devices when continuously launching applications is solved, and the stability and smoothness of device operation are improved.

CN115344357BActive Publication Date: 2026-06-05BEIJING XIAOMI MOBILE SOFTWARE CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
BEIJING XIAOMI MOBILE SOFTWARE CO LTD
Filing Date
2021-05-11
Publication Date
2026-06-05

AI Technical Summary

Technical Problem

In older or lower-version Android-based electronic devices, continuous application launches can cause lag due to memory consumption. Existing technologies that release memory by closing lower-priority processes may prevent applications from running properly.

Method used

The system detects the number of applications launched within a preset time period. After entering continuous launch mode, it adjusts the trigger threshold of the low memory termination daemon and optimizes memory management strategies, including adjusting the processor frequency and memory pages of background applications, and closing unused applications.

Benefits of technology

It reduces the likelihood of closing newly launched applications, improves the stability of normal application operation, reduces device lag, and provides flexibility in adapting to the current scenario.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115344357B_ABST
    Figure CN115344357B_ABST
Patent Text Reader

Abstract

The present disclosure relates to a kind of application processing method, device and storage medium.The method comprises: determining the quantity of application program in preset time period according to preset starting mode;In the case where the quantity of application program started according to the preset starting mode is greater than preset quantity threshold, it is determined that the electronic device enters continuous start mode;In the continuous start mode, the adjustment strategy corresponding to the continuous start mode is executed;The adjustment strategy at least includes: adjusting the trigger threshold of low memory termination daemon execution termination process task of the electronic device.The technical solution in the present disclosure can not only trigger more timely, but also reduce the possibility of closing the application program just started, and by setting the trigger threshold as adjustable, the application processing procedure is more flexible, more suitable for current scene, and can ensure the normal operation of application program as far as possible.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to communication application technology, and more particularly to a method, apparatus and storage medium for processing an application. Background Technology

[0002] Since Android applications (APPs) are developed based on programming languages ​​(such as Java), to make APPs run more smoothly, a compiler can be introduced to compile the application, compiling the bytecode of the programming language into machine code.

[0003] Currently, there are many electronic devices running the Android system; for example, Android phones occupy a large share of the mobile phone market. When an electronic device has a lower-version processor or is older, continuously launching applications can cause lag due to the large amount of code executed during startup, including allocating memory and loading resources such as images, which consumes available memory.

[0004] In related technologies, when system memory is insufficient, lower-priority processes can be closed to free up memory. However, this method of freeing up memory increases the likelihood that newly launched applications will be closed, which may cause some applications that need to be used to fail to run properly. Summary of the Invention

[0005] This disclosure provides a method, apparatus, and storage medium for processing an application.

[0006] According to a first aspect of the present disclosure, a method for processing an application is provided, applied to an electronic device, comprising:

[0007] Determine the number of applications launched within a preset time period according to a preset launch method;

[0008] If the number of applications launched according to the preset launch method exceeds a preset number threshold, the electronic device is determined to enter a continuous launch mode.

[0009] In the continuous startup mode, an adjustment strategy corresponding to the continuous startup mode is executed; the adjustment strategy includes at least: adjusting the trigger threshold for the low memory termination daemon of the electronic device to execute the process termination task.

[0010] Optionally, adjusting the trigger threshold for the low-memory termination daemon of the electronic device to execute the process termination task includes:

[0011] The trigger threshold for the low memory termination daemon to execute the process termination task is adjusted from the standard trigger threshold to the target trigger threshold corresponding to the continuous startup mode;

[0012] Wherein, the target trigger threshold is less than the standard trigger threshold.

[0013] Optionally, the method further includes:

[0014] When the electronic device exits the continuous startup mode, the trigger threshold for the low memory termination daemon to execute the process termination task is adjusted from the target trigger threshold to the standard trigger threshold.

[0015] Optionally, the adjustment strategy further includes: adjusting the application memory pages of background applications; adjusting the application memory pages of background applications includes:

[0016] Reclaim the application memory pages of the first type to a preset cache; and / or,

[0017] The application memory pages of the second type are compressed, and the compressed application memory pages are stored in the system memory of the electronic device.

[0018] Optionally, the adjustment strategy further includes: adjusting the operating frequency of the processor of the electronic device; the adjustment of the operating frequency of the processor of the electronic device includes:

[0019] Adjust the operating frequency of the processor of the electronic device from the current operating frequency to the target operating frequency;

[0020] The target operating frequency is greater than the current operating frequency.

[0021] Optionally, the adjustment strategy further includes: adjusting the running state of background applications; adjusting the running state of background applications includes:

[0022] When the number of applications running in the background exceeds a preset threshold, close applications that have not been used within a preset runtime.

[0023] Optionally, determining the number of applications launched according to a preset launch method within a preset time period includes:

[0024] Determine the number of applications launched according to the preset launch method within a first preset time period;

[0025] The start time of the first preset duration is the moment when an application is detected to be launched according to the preset launch method.

[0026] According to a second aspect of the present disclosure, an application processing apparatus is provided, applied to an electronic device, comprising:

[0027] The first determining module is configured to determine the number of applications launched according to a preset launch method;

[0028] The second determining module is configured to determine that the electronic device enters a continuous startup mode when the number of applications launched according to the preset startup method is greater than a preset number threshold.

[0029] The execution module is configured to execute an adjustment strategy corresponding to the continuous startup mode in the continuous startup mode; the adjustment strategy includes at least: adjusting the trigger threshold for the low memory termination daemon of the electronic device to execute the process termination task.

[0030] Optionally, the execution module is further configured to:

[0031] The trigger threshold for the low memory termination daemon to execute the process termination task is adjusted from the standard trigger threshold to the target trigger threshold corresponding to the continuous startup mode;

[0032] Wherein, the target trigger threshold is less than the standard trigger threshold.

[0033] Optionally, the device further includes:

[0034] The adjustment module is configured to adjust the trigger threshold for the low memory termination daemon to execute the process termination task from the target trigger threshold to the standard trigger threshold when the electronic device exits the continuous startup mode.

[0035] Optionally, the adjustment strategy further includes: adjusting the application memory pages of background applications; the execution module is further configured to:

[0036] Reclaim the application memory pages of the first type to a preset cache; and / or,

[0037] The application memory pages of the second type are compressed, and the compressed application memory pages are stored in the system memory of the electronic device.

[0038] Optionally, the adjustment strategy further includes: adjusting the operating frequency of the processor of the electronic device; the execution module is further configured to:

[0039] Adjust the operating frequency of the processor of the electronic device from the current operating frequency to the target operating frequency;

[0040] The target operating frequency is greater than the current operating frequency.

[0041] Optionally, the adjustment strategy further includes: adjusting the running state of background applications; the execution module is further configured to:

[0042] When the number of applications running in the background exceeds a preset threshold, close applications that have not been used within a preset runtime.

[0043] Optionally, the first determining module is further configured as follows:

[0044] Determine the number of applications launched according to the preset launch method within a first preset time period;

[0045] The start time of the first preset duration is the moment when an application is detected to be launched according to the preset launch method.

[0046] According to a third aspect of the present disclosure, an application processing apparatus is provided, comprising:

[0047] processor;

[0048] Memory configured to store processor-executable instructions;

[0049] The processor is configured to implement the steps in the processing method of any of the applications described in the first aspect above when executing.

[0050] According to a fourth aspect of the present disclosure, a non-transitory computer-readable storage medium is provided, wherein when instructions in the storage medium are executed by a processor of an application processing device, the device is enabled to perform any of the application processing methods described in the first aspect.

[0051] The technical solutions provided by the embodiments of this disclosure may include the following beneficial effects:

[0052] In this embodiment of the disclosure, when the number of applications launched according to the preset launch method is greater than the preset number threshold, it can be determined that the electronic device has entered the continuous launch mode. In the continuous launch mode, an adjustment strategy corresponding to the continuous launch mode is executed, and the adjustment strategy includes at least: adjusting the trigger threshold for the low memory termination daemon of the electronic device to execute the process termination task.

[0053] In this way, compared with the related technologies that determine whether to close low-priority processes based solely on the memory state of the electronic device's system memory, the present embodiment starts executing the adjustment strategy corresponding to the continuous startup mode after the electronic device enters the continuous startup mode. That is, it determines the corresponding adjustment strategy based on the application's state, starting from the application's perspective rather than analyzing the memory state of the system memory before closing low-priority processes, which can trigger the process more promptly.

[0054] On the other hand, this disclosure can adjust the trigger threshold for the low memory termination daemon to perform the process termination task according to the current application scenario of the electronic device. For example, the trigger threshold can be lowered. Compared with the related technology that only considers the memory state of the system memory without considering the current usage scenario of the electronic device, it can reduce the possibility of closing the application that has just started. Moreover, by setting the trigger threshold to be adjustable, the application processing is more flexible and more adapted to the current scenario, and the normal operation of the application can be guaranteed as much as possible.

[0055] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description

[0056] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0057] Figure 1 This is a flowchart illustrating an application processing method according to an exemplary embodiment.

[0058] Figure 2 This is a flowchart illustrating another application processing method according to an exemplary embodiment.

[0059] Figure 3 This is a block diagram of a processing apparatus for an application according to an exemplary embodiment.

[0060] Figure 4 This is a block diagram illustrating an application processing apparatus 1200 according to an exemplary embodiment.

[0061] Figure 5 This is a block diagram of a processing apparatus 1300 for another application, according to an exemplary embodiment. Detailed Implementation

[0062] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.

[0063] This disclosure provides a method for processing an application, which can be applied to an electronic device. Figure 1This is a flowchart illustrating a processing method for an application according to an exemplary embodiment, such as... Figure 1 As shown, the method mainly includes the following steps:

[0064] In step 101, the number of applications launched according to a preset launch method within a preset time period is determined;

[0065] In step 102, if the number of applications launched according to the preset launch method is greater than a preset number threshold, it is determined that the electronic device enters the continuous launch mode.

[0066] In step 103, in the continuous startup mode, an adjustment strategy corresponding to the continuous startup mode is executed; the adjustment strategy includes at least: adjusting the trigger threshold for the low memory termination daemon of the electronic device to execute the process termination task.

[0067] The application processing method disclosed in this embodiment can be applied to electronic devices, including mobile terminals and fixed terminals. Mobile terminals include mobile phones, tablets, laptops, etc.; fixed terminals include personal computers. In other optional embodiments, the application processing method can also run on network-side devices, including servers, processing centers, etc.

[0068] In some embodiments, an application may be a computer program that performs one or more specific tasks, can interact with the user when the application is running in user mode, and has a visual user interface, while an application process is an entity of the application, which is an application with independent functions running on a certain data set.

[0069] Here, applications launched according to the preset launch method include: applications whose application processes have not yet been created by the system and require loading application resources during the startup process, such as applications that require loading some or all application resources during startup; or applications that were previously launched but then closed. Applications launched according to the preset launch method have no history of startup and operation, which is equivalent to launching the application for the first time.

[0070] The preset startup methods may include a cold start or a warm start. For example, an application launched using a cold start needs to load all application resources during the startup process, while an application launched using a warm start only needs to load some application resources. In some embodiments, launching an application using a cold start is slower than launching it using a warm start, and the memory resources consumed by launching an application using a cold start are higher than those consumed by launching it using a warm start. Repeatedly launching previously launched applications does not accumulate memory usage.

[0071] In this embodiment, the number of applications launched according to a preset launch method within a preset time period can be counted. If the number of applications launched according to the preset launch method within the preset time period exceeds a preset threshold, it is determined that the electronic device has entered a continuous launch mode. Since applications launched according to the preset launch method consume a lot of system memory of the electronic device, the demand on memory resources is particularly high when the number of applications launched according to the preset launch method is large, i.e., exceeding the preset threshold. At this time, it can be determined that the electronic device has entered a continuous launch mode.

[0072] In this embodiment of the disclosure, after entering continuous startup mode, an adjustment strategy corresponding to continuous startup mode can be determined. For example, the trigger threshold for the Low Memory Killer Daemon (LMKD) to execute process termination tasks can be adjusted. Here, the Low Memory Killer Daemon (LMKD) is used to monitor the system memory status of the electronic device and reduce memory pressure by terminating unnecessary processes.

[0073] In this embodiment of the disclosure, if the number of applications launched according to a preset launch method exceeds a preset threshold, it can be determined that the electronic device has entered a continuous launch mode. In this continuous launch mode, an adjustment strategy corresponding to the continuous launch mode is executed, and the adjustment strategy includes at least adjusting the trigger threshold for the low-memory termination daemon of the electronic device to execute the process termination task. For example, the trigger threshold for the low-memory termination daemon to execute the process termination task can be lowered.

[0074] In some embodiments, the trigger threshold for the low memory termination daemon can be determined based on the remaining system memory of the electronic device. When this threshold is reached, the low memory termination daemon begins to execute the process termination task, that is, it begins to close processes with lower priority. For example, the process termination task can be started when the remaining system memory is 180MB, and then adjusted to be executed when the remaining system memory is 100MB.

[0075] In this way, compared with the related technologies that determine whether to close low-priority processes based solely on the memory state of the electronic device's system memory, the present embodiment starts executing the adjustment strategy corresponding to the continuous startup mode after the electronic device enters the continuous startup mode. That is, it determines the corresponding adjustment strategy based on the application's state, starting from the application's perspective rather than analyzing the memory state of the system memory before closing low-priority processes, which can trigger the process more promptly.

[0076] On the other hand, this disclosure can adjust the trigger threshold for the low memory termination daemon to perform the process termination task according to the current application scenario of the electronic device. For example, the trigger threshold can be lowered. Compared with the related technology that only considers the memory state of the system memory without considering the current usage scenario of the electronic device, it can reduce the possibility of closing the application that has just started. Moreover, by setting the trigger threshold to be adjustable, the application processing is more flexible and more adapted to the current scenario, and the normal operation of the application can be guaranteed as much as possible.

[0077] In some embodiments, adjusting the trigger threshold for the low-memory termination daemon of the electronic device to execute the process termination task includes:

[0078] The trigger threshold for the low memory termination daemon to execute the process termination task is adjusted from the standard trigger threshold to the target trigger threshold corresponding to the continuous startup mode;

[0079] Wherein, the target trigger threshold is less than the standard trigger threshold.

[0080] In this embodiment, the trigger threshold of the low-memory termination daemon can be determined based on the remaining system memory of the electronic device. When this trigger threshold is reached, the low-memory termination daemon begins to execute the process termination task, that is, it begins to close processes with lower priority. For example, the standard trigger threshold can be 180MB, meaning that before adjusting the trigger threshold, the process termination task is executed when the remaining system memory is less than or equal to 180MB. As another example, the target trigger threshold can be 100MB, meaning that after adjusting the trigger threshold, the process termination task is executed when the remaining system memory is less than or equal to 100MB. Of course, the standard trigger threshold and the target trigger threshold can also be other values, as long as the target trigger threshold is lower than the standard trigger threshold; no specific limitation is made here.

[0081] In some embodiments, the target trigger threshold can be set as needed. For example, the target trigger threshold for the electronic device in continuous startup mode can be determined based on the system memory capacity of the electronic device. Specifically, the target trigger threshold is positively correlated with the system memory capacity of the electronic device; that is, the larger the system memory capacity, the larger the target trigger threshold, and vice versa. By associating the target trigger threshold with the system memory of the electronic device, the target trigger threshold can be made to correspond to the system memory of the electronic device, thereby making the application's processing more compatible with the system memory of the electronic device.

[0082] Of course, in other embodiments, the target trigger threshold corresponding to the electronic device in continuous system mode can also be determined based on the model of the electronic device; in other embodiments, the target trigger threshold corresponding to the electronic device in continuous system mode can also be determined based on the performance of the processor of the electronic device, without specific limitations here.

[0083] In this embodiment of the disclosure, after the electronic device enters the continuous startup mode, the trigger threshold for the low memory termination daemon can be reduced from the standard trigger threshold to the target trigger threshold. In this way, the process task is terminated when the system memory is relatively low, thereby reducing the possibility that the electronic device will close the application that has just been launched.

[0084] Furthermore, compared to setting a fixed standard trigger threshold in related technologies, the trigger threshold in this embodiment can be adjusted according to the number of applications launched, making the application processing more flexible and better suited to the application scenarios of the current electronic devices.

[0085] In some embodiments, the method further includes:

[0086] When the electronic device exits the continuous startup mode, the trigger threshold for the low memory termination daemon to execute the process termination task is adjusted from the target trigger threshold to the standard trigger threshold.

[0087] In some embodiments, the electronic device is determined to exit continuous launch mode when the number of applications launched according to a preset launch method is less than or equal to a preset threshold. In other embodiments, the electronic device may also be determined to exit continuous launch mode when a preset operation is detected. For example, the electronic device may be determined to exit continuous launch mode when a screen lock operation is detected. As another example, the electronic device may be determined to exit continuous launch mode when a cleanup command for background applications is detected. The cleanup command may be used to instruct the one-click cleanup of all background applications.

[0088] In this embodiment of the disclosure, when the electronic device exits continuous startup mode, the trigger threshold for the low-memory termination daemon to execute the process termination task can be adjusted from the target trigger threshold to the standard trigger threshold. By promptly restoring the trigger threshold for the low-memory termination daemon to execute the process termination task from the target trigger threshold to the standard trigger threshold, the additional power consumption of the electronic device can be reduced.

[0089] In some embodiments, the adjustment strategy further includes: adjusting the application memory pages of background applications; the adjustment of the application memory pages of background applications includes:

[0090] Reclaim the application memory pages of the first type to a preset cache; and / or,

[0091] The application memory pages of the second type are compressed, and the compressed application memory pages are stored in the system memory of the electronic device.

[0092] Here, the first type of application memory page may include reclaimable memory pages, such as process file pages. In this embodiment of the disclosure, memory reclamation can be performed on the first type of application memory pages. Here, memory reclamation refers to the reclamation of system memory that can be reclaimed after release, such as cache and buffer, which are reclaimable memory pages and are usually referred to as process file pages in memory management. Most process file pages can be directly reclaimed to a preset cache area, and then read again from the preset cache area (e.g., disk) when needed.

[0093] The second type of application memory pages includes non-reclaimable memory pages, such as anonymous memory pages. Here, anonymous memory pages can be dynamically allocated heap memory by the application. Since anonymous memory pages are likely to be accessed again, they cannot be directly reclaimed. Furthermore, anonymous memory pages are rarely accessed after allocation, which is a waste of resources. In this embodiment, the second type of application memory pages can be compressed before storage. For example, compression of the second type of application memory pages can be achieved by adjusting the zram swappiness configuration.

[0094] In this embodiment of the disclosure, the first type of application memory pages can be recycled to a preset cache area, which can reduce the burden on system memory. The application memory pages of the second memory can also be compressed and stored in the system memory of the electronic device to further reduce the burden on system memory, thereby reducing the occurrence of lag in the electronic device.

[0095] In other embodiments, the first type of application memory page and / or the second type of application memory page can be: an application memory page switched to the background. In this embodiment, the application memory page switched to the background can be recycled or compressed, thus reducing the system memory burden while ensuring available memory. By limiting the memory resources consumed by background applications, the smoothness of foreground applications is guaranteed.

[0096] In some embodiments, the adjustment strategy further includes: adjusting the operating frequency of the processor of the electronic device; the adjustment of the operating frequency of the processor of the electronic device includes:

[0097] Adjust the operating frequency of the processor of the electronic device from the current operating frequency to the target operating frequency;

[0098] The target operating frequency is greater than the current operating frequency.

[0099] During the continuous launch of applications, each application executes a large amount of code, including code that allocates the memory needed or loads image resources. Even after the application is switched to the background, the code continues to perform these tasks, thus consuming central processing unit (CPU) resources. This affects the launch process of subsequent applications, causing electronic devices to lag.

[0100] In this embodiment of the disclosure, after the electronic device enters continuous startup mode, the operating frequency of the electronic device's processor can be increased from the current operating frequency to the target operating frequency. This ensures the normal operation of the electronic device even when many applications are launched, reducing the possibility of lag.

[0101] In other embodiments, the processor frequency of the electronic device may be adjusted after the application memory pages of the background application are adjusted.

[0102] In other embodiments, after the electronic device exits the continuous startup mode, the operating frequency of the electronic device's processor can be adjusted from the target operating frequency to the current operating frequency. By promptly restoring the operating frequency of the electronic device's processor to the current operating frequency, additional power consumption can be reduced.

[0103] In this embodiment of the disclosure, in scenarios where applications are launched continuously, the CPU operating frequency can be increased, thereby ensuring the smoothness of the foreground application.

[0104] In some embodiments, the adjustment strategy further includes: adjusting the running state of background applications; adjusting the running state of background applications includes:

[0105] When the number of applications running in the background exceeds a preset threshold, close applications that have not been used within a preset runtime.

[0106] Here, when the number of background applications exceeds a preset threshold, it indicates that the electronic device is currently placing high demands on its processor. Continuing to maintain the normal operation of all background applications would increase the processor load on the electronic device. In this embodiment, when it is determined that the number of background applications exceeds the preset threshold, applications that have not been used within a preset runtime can be closed promptly.

[0107] Since applications that are not used within a preset runtime may be applications that the user does not want to use but has forgotten to close, closing applications that are not used within a preset runtime can reduce the processor's burden without diminishing the user's experience of using electronic devices.

[0108] The preset threshold can be set as needed. For example, it can be determined based on the system memory capacity of the electronic device, such that the preset threshold is positively correlated with the system memory capacity. That is, the larger the system memory capacity of the electronic device, the more applications can run in the background, and the smaller the system memory capacity, the fewer applications can run in the background. Of course, the preset threshold can also be determined in other ways, such as based on the model or performance of the electronic device, which is not specifically limited here.

[0109] For example, with a preset threshold of 5 and a preset runtime of 2 minutes, if the number of background applications detected exceeds 5, applications that have not been used within 2 minutes can be closed.

[0110] In this embodiment of the disclosure, by restricting the running state of background applications, the burden on the processor caused by background applications can be reduced, thus ensuring the normal operation of electronic devices.

[0111] In some embodiments, determining the number of applications launched according to a preset launch method includes:

[0112] Determine the number of applications launched according to the preset launch method within a first preset time period;

[0113] The start time of the first preset duration is the moment when an application is detected to be launched according to the preset launch method.

[0114] In this embodiment of the disclosure, timing begins when an application launched according to a preset launch method is detected, and the number of applications launched according to the preset launch method within a first preset time period is determined. The first preset time period can be determined as needed; in implementation, it can be determined based on experiments or historical application data, and is not specifically limited here.

[0115] For example, the first preset duration can be set to 60 seconds (s). Taking a first preset duration of 60 seconds as an example, if the number of applications launched according to the preset launch method is greater than the preset number threshold within 60 seconds, the electronic device is determined to have entered continuous launch mode; otherwise, the electronic device has not entered continuous launch mode. The preset number threshold can be set as needed, for example, it can be 5, etc., without being specifically limited here.

[0116] Taking a mobile phone as an example, in this embodiment of the disclosure, during the process of a user continuously launching applications on the mobile phone, the usage scenario of the electronic device can be identified. When the electronic device enters the scenario of continuously launching applications, the trigger threshold of LMKD can be reduced, decreasing the probability of closing processes and thus reducing the number of applications closed by LMKD, thereby ensuring application persistence. By actively compressing or reclaiming application memory pages, the memory occupied by processes can be reduced. By increasing the CPU's operating frequency, the performance of the electronic device can be enhanced. When the electronic device exits the continuous launch mode, the trigger threshold of LMKD and the CPU's operating frequency are restored to reduce the power consumption of the electronic device.

[0117] Figure 2 This is a flowchart illustrating another application processing method according to an exemplary embodiment, such as... Figure 2 As shown, the method mainly includes the following steps:

[0118] In step 201, the application is launched.

[0119] Here, the application can be launched when a trigger action (e.g., a click action) is detected on the desktop interface of an electronic device.

[0120] In step 202, it is determined whether the application is launched according to the preset launch method.

[0121] In step 203, when it is determined that the application's launch method is a preset launch method, the first dwell time on the desktop interface of the electronic device is determined.

[0122] In step 204, after the application has finished launching, if an operation to return from the application interface to the desktop interface is detected, the second dwell time on the application interface is obtained.

[0123] In step 205, it is determined whether the first dwell time is less than the second preset time and whether the second dwell time is less than the third preset time.

[0124] In step 206, the cumulative number of applications launched according to the preset launch method is incremented by 1.

[0125] Here, if the first dwell time is less than the second preset time, and the second dwell time is less than the third preset time, then counting of applications launched according to the preset launch method begins. The second and third preset times can be determined as needed; in implementation, they can be determined based on experiments or historical application data, and are not specifically limited here.

[0126] In some embodiments, when the number of applications launched according to the preset launch method exceeds a preset number threshold, the electronic device is determined to enter a continuous launch mode. In other embodiments, the moment when the first dwell time is less than the second preset time and the second dwell time is less than the third preset time can be determined as the start time of the first preset time.

[0127] For example, when a click action is detected on an application on the desktop interface of an electronic device, the application can be launched, and it can be determined whether the application was launched in a preset launch mode.

[0128] When it is determined that the application launch method is the preset launch method, the first dwell time (T) on the desktop interface of the electronic device can be determined. After the application launch is completed, if an operation to return from the application interface to the desktop interface is detected, the second dwell time (A) on the application interface is obtained. If T is less than 5 seconds and A is less than 10 seconds, the cumulative number of applications launched according to the preset launch method is incremented by 1.

[0129] In step 207, it is determined whether the number of applications launched according to the preset launch method is greater than a preset number threshold.

[0130] In step 208, when the number of applications launched according to the preset launch method exceeds a preset number threshold, the electronic device is determined to enter the continuous launch mode.

[0131] In other embodiments, when the number of applications launched according to the preset launch method exceeds a preset threshold, the electronic device is determined to enter continuous launch mode. For example, when the number of applications launched according to the preset launch method exceeds 5, the electronic device is determined to enter continuous launch mode.

[0132] In other embodiments, the moment when the first dwell time is less than the second preset time and the second dwell time is less than the third preset time can be determined as the start time of the first preset time.

[0133] Figure 3 This is a block diagram of a processing apparatus for an application according to an exemplary embodiment. Figure 3 As shown, the processing device 300 of this application is used in an electronic device and mainly includes:

[0134] The first determining module 301 is configured to determine the number of applications launched in a preset time period according to a preset launch method;

[0135] The second determining module 302 is configured to determine that the electronic device enters a continuous startup mode when the number of applications launched according to the preset startup method is greater than a preset number threshold.

[0136] The execution module 303 is configured to execute an adjustment strategy corresponding to the continuous startup mode in the continuous startup mode; the adjustment strategy includes at least: adjusting the trigger threshold for the low memory termination daemon of the electronic device to execute the process termination task.

[0137] In some embodiments, the execution module 303 is further configured to:

[0138] The trigger threshold for the low memory termination daemon to execute the process termination task is adjusted from the standard trigger threshold to the target trigger threshold corresponding to the continuous startup mode;

[0139] Wherein, the target trigger threshold is less than the standard trigger threshold.

[0140] In some embodiments, the device 300 further includes:

[0141] The adjustment module is configured to adjust the trigger threshold for the low memory termination daemon to execute the process termination task from the target trigger threshold to the standard trigger threshold when the electronic device exits the continuous startup mode.

[0142] In some embodiments, the adjustment strategy further includes: adjusting the application memory pages of background applications; the execution module 303 is further configured to:

[0143] Reclaim the application memory pages of the first type to a preset cache; and / or,

[0144] The application memory pages of the second type are compressed, and the compressed application memory pages are stored in the system memory of the electronic device.

[0145] In some embodiments, the adjustment strategy further includes: adjusting the operating frequency of the processor of the electronic device; the execution module 303 is further configured to:

[0146] Adjust the operating frequency of the processor of the electronic device from the current operating frequency to the target operating frequency;

[0147] The target operating frequency is greater than the current operating frequency.

[0148] In some embodiments, the adjustment strategy further includes: adjusting the running state of background applications; the execution module is further configured to:

[0149] When the number of applications running in the background exceeds a preset threshold, close applications that have not been used within a preset runtime.

[0150] In some embodiments, the first determining module 301 is further configured to:

[0151] Determine the number of applications launched according to the preset launch method within a first preset time period;

[0152] The start time of the first preset duration is the moment when an application is detected to be launched according to the preset launch method.

[0153] Regarding the apparatus in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here.

[0154] Figure 4 This is a block diagram illustrating an application processing device 1200 according to an exemplary embodiment. For example, device 1200 may be a mobile phone, computer, digital broadcasting terminal, messaging device, game console, tablet device, medical device, fitness equipment, personal digital assistant, etc.

[0155] Reference Figure 4 The device 1200 may include one or more of the following components: a processing component 1202, a memory 1204, a power supply component 1206, a multimedia component 1208, an audio component 1210, an input / output (I / O) interface 1212, a sensor component 1214, and a communication component 1216.

[0156] Processing component 1202 typically controls the overall operation of device 1200, such as operations associated with display, telephone calls, data communication, camera operation, and recording operations. Processing component 1202 may include one or more processors 1220 to execute instructions to perform all or part of the steps of the methods described above. Furthermore, processing component 1202 may include one or more modules to facilitate interaction between processing component 1202 and other components. For example, processing component 1202 may include a multimedia module to facilitate interaction between multimedia component 1208 and processing component 1202.

[0157] Memory 1204 is configured to store various types of data to support the operation of device 1200. Examples of such data include instructions for any application or method operating on device 1200, contact data, phonebook data, messages, pictures, videos, etc. Memory 1204 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.

[0158] Power supply component 1206 provides power to various components of device 1200. Power supply component 1206 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to device 1200.

[0159] Multimedia component 1208 includes a screen that provides an output interface between the device 1200 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touchscreen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensors may sense not only the boundaries of the touch or swipe action but also the duration and pressure associated with the touch or swipe operation. In some embodiments, multimedia component 1208 includes a front-facing camera and / or a rear-facing camera. When the device 1200 is in an operating mode, such as a shooting mode or a video mode, the front-facing camera and / or the rear-facing camera may receive external multimedia data. Each front-facing camera and rear-facing camera may be a fixed optical lens system or have focal length and optical zoom capabilities.

[0160] Audio component 1210 is configured to output and / or input audio signals. For example, audio component 1210 includes a microphone (MIC) configured to receive external audio signals when device 1200 is in an operating mode, such as call mode, recording mode, and voice recognition mode. The received audio signals may be further stored in memory 1204 or transmitted via communication component 1216. In some embodiments, audio component 1210 also includes a speaker for outputting audio signals.

[0161] I / O interface 1212 provides an interface between processing component 1202 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to, home buttons, volume buttons, power buttons, and lock buttons.

[0162] Sensor assembly 1214 includes one or more sensors for providing status assessments of various aspects of device 1200. For example, sensor assembly 1214 may detect the on / off state of device 1200, the relative positioning of components such as the display and keypad of device 1200, changes in the position of device 1200 or a component of device 1200, the presence or absence of user contact with device 1200, the orientation or acceleration / deceleration of device 1200, and temperature changes of device 1200. Sensor assembly 1214 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. Sensor assembly 1214 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, sensor assembly 1214 may also include an accelerometer, a gyroscope, a magnetometer, a pressure sensor, or a temperature sensor.

[0163] Communication component 1216 is configured to facilitate wired or wireless communication between device 1200 and other devices. Device 1200 can access wireless networks based on communication standards, such as WiFi, 2G, or 3G, or combinations thereof. In one exemplary embodiment, communication component 1216 receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, communication component 1216 also includes a near-field communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on radio frequency identification (RFID) technology, Infrared Data Association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.

[0164] In an exemplary embodiment, the apparatus 1200 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the methods described above.

[0165] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 1204 including instructions, which can be executed by a processor 1220 of the device 1200 to perform the above-described method. For example, the non-transitory computer-readable storage medium may be a ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device, etc.

[0166] A non-transitory computer-readable storage medium, wherein instructions in the storage medium, when executed by a processor of an application processing device, enable the application processing device to perform an application processing method, the method comprising:

[0167] Determine the number of applications launched within a preset time period according to a preset launch method;

[0168] If the number of applications launched according to the preset launch method exceeds a preset number threshold, the electronic device is determined to enter a continuous launch mode.

[0169] In the continuous startup mode, an adjustment strategy corresponding to the continuous startup mode is executed; the adjustment strategy includes at least: adjusting the trigger threshold for the low memory termination daemon of the electronic device to execute the process termination task.

[0170] Figure 5 This is a block diagram illustrating a processing apparatus 1300 for another application according to an exemplary embodiment. For example, apparatus 1300 may be provided as a server. (Refer to...) Figure 5 The device 1300 includes a processing component 1322, which further includes one or more processors, and memory resources represented by memory 1332 for storing instructions executable by the processing component 1322, such as application programs. The application programs stored in memory 1332 may include one or more modules, each corresponding to a set of instructions. Furthermore, the processing component 1322 is configured to execute instructions to perform a processing method of the aforementioned application program, the method comprising:

[0171] Determine the number of applications launched within a preset time period according to a preset launch method;

[0172] If the number of applications launched according to the preset launch method exceeds a preset number threshold, the electronic device is determined to enter a continuous launch mode.

[0173] In the continuous startup mode, an adjustment strategy corresponding to the continuous startup mode is executed; the adjustment strategy includes at least: adjusting the trigger threshold for the low memory termination daemon of the electronic device to execute the process termination task.

[0174] Device 1300 may also include a power supply component 1326 configured to perform power management of device 1300, a wired or wireless network interface 1350 configured to connect device 1300 to a network, and an input / output (I / O) interface 1358. Device 1300 may operate on an operating system stored in memory 1332, such as Windows Server™, MacOS X™, Unix™, Linux™, FreeBSD™, or similar.

[0175] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the following claims.

[0176] It should be understood that this disclosure is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this disclosure is limited only by the appended claims.

Claims

1. A method for processing an application, characterized in that, Applied to electronic devices, including: Determine the number of applications launched within a preset time period according to a preset launch method; the applications launched according to the preset launch method include: applications whose application processes have not been created by the system and whose application resources need to be loaded during the startup process; If the number of applications launched according to the preset launch method exceeds a preset number threshold, the electronic device is determined to enter a continuous launch mode. In the continuous startup mode, an adjustment strategy corresponding to the continuous startup mode is executed; the adjustment strategy includes at least: adjusting the trigger threshold for the low memory termination daemon of the electronic device to execute the process termination task; adjusting the trigger threshold for the low memory termination daemon of the electronic device to execute the process termination task includes: lowering the trigger threshold for the low memory termination daemon to execute the process termination task.

2. The method according to claim 1, characterized in that, The adjustment of the trigger threshold for the low-memory termination daemon of the electronic device to execute the process termination task includes: The trigger threshold for the low memory termination daemon to execute the process termination task is adjusted from the standard trigger threshold to the target trigger threshold corresponding to the continuous startup mode; Wherein, the target trigger threshold is less than the standard trigger threshold.

3. The method according to claim 2, characterized in that, The method further includes: When the electronic device exits the continuous startup mode, the trigger threshold for the low memory termination daemon to execute the process termination task is adjusted from the target trigger threshold to the standard trigger threshold.

4. The method according to claim 1, characterized in that, The adjustment strategy further includes: adjusting the application memory pages of background applications; adjusting the application memory pages of background applications includes: Reclaim the application memory pages of the first type to a preset cache; and / or, The application memory pages of the second type are compressed, and the compressed application memory pages are stored in the system memory of the electronic device.

5. The method according to claim 1, characterized in that, The adjustment strategy further includes: adjusting the operating frequency of the processor of the electronic device; the adjustment of the operating frequency of the processor of the electronic device includes: Adjust the operating frequency of the processor of the electronic device from the current operating frequency to the target operating frequency; The target operating frequency is greater than the current operating frequency.

6. The method according to claim 1, characterized in that, The adjustment strategy further includes: adjusting the running state of background applications; adjusting the running state of background applications includes: When the number of applications running in the background exceeds a preset threshold, close applications that have not been used within a preset runtime.

7. The method according to claim 1, characterized in that, Determining the number of applications launched within a preset time period according to a preset launch method includes: Determine the number of applications launched according to the preset launch method within a first preset time period; The start time of the first preset duration is the moment when an application is detected to be launched according to the preset launch method.

8. A processing apparatus for an application, characterized in that, Applied to electronic devices, including: The first determining module is configured to determine the number of applications launched within a preset time period according to a preset launch method; the applications launched according to the preset launch method include: applications whose application processes have not been created by the system and whose application resources need to be loaded during the startup process; The second determining module is configured to determine that the electronic device enters a continuous startup mode when the number of applications launched according to the preset startup method is greater than a preset number threshold. The execution module is configured to execute an adjustment strategy corresponding to the continuous startup mode in the continuous startup mode; the adjustment strategy includes at least: adjusting the trigger threshold for the low memory termination daemon of the electronic device to execute the process termination task; adjusting the trigger threshold for the low memory termination daemon of the electronic device to execute the process termination task includes: lowering the trigger threshold for the low memory termination daemon to execute the process termination task.

9. The apparatus according to claim 8, characterized in that, The execution module is further configured as follows: The trigger threshold for the low memory termination daemon to execute the process termination task is adjusted from the standard trigger threshold to the target trigger threshold corresponding to the continuous startup mode; Wherein, the target trigger threshold is less than the standard trigger threshold.

10. The apparatus according to claim 9, characterized in that, The device further includes: The adjustment module is configured to adjust the trigger threshold for the low memory termination daemon to execute the process termination task from the target trigger threshold to the standard trigger threshold when the electronic device exits the continuous startup mode.

11. The apparatus according to claim 8, characterized in that, The adjustment strategy also includes: adjusting the application memory pages of background applications; the execution module is further configured to: Reclaim the application memory pages of the first type to a preset cache; and / or, The application memory pages of the second type are compressed, and the compressed application memory pages are stored in the system memory of the electronic device.

12. The apparatus according to claim 8, characterized in that, The adjustment strategy further includes: adjusting the operating frequency of the processor of the electronic device; the execution module is further configured to: Adjust the operating frequency of the processor of the electronic device from the current operating frequency to the target operating frequency; The target operating frequency is greater than the current operating frequency.

13. The apparatus according to claim 8, characterized in that, The adjustment strategy also includes: adjusting the running state of background applications; the execution module is further configured to: When the number of applications running in the background exceeds a preset threshold, close applications that have not been used within a preset runtime.

14. The apparatus according to claim 8, characterized in that, The first determining module is further configured as follows: Determine the number of applications launched according to the preset launch method within a first preset time period; The start time of the first preset duration is the moment when an application is detected to be launched according to the preset launch method.

15. A processing apparatus for an application, characterized in that, include: processor; Memory configured to store processor-executable instructions; The processor is configured to execute the steps of the processing method of any one of the application programs in claims 1 to 7.

16. A non-transitory computer-readable storage medium, wherein instructions in the storage medium, when executed by a processor of an application processing device, enable the device to perform the processing method of any one of claims 1 to 7.