Terminal application management method, mobile terminal and storage medium
By detecting, prioritizing, or locking the priority of terminal applications, the issue of app crashes caused by system resource reclamation during application invocation was resolved, thus improving the user experience.
Patent Information
- Application Number
- CN201911138149.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-11-19
- Publication Date
- 2026-08-25
- Estimated Expiration
- 2039-11-19
AI Technical Summary
When an application calls another application, the terminal device may mistakenly reclaim the application with lower running priority, causing both the calling and called applications to crash, thus affecting the user experience.
By detecting the second application associated with the first application running in the foreground of the terminal, the priority of the second application can be obtained and elevated or locked to prevent the system resource reclamation mechanism from mistakenly closing these applications.
This effectively avoids the problem of applications closing due to system resource reclamation errors, thus improving the user experience.
Smart Images

Figure CN110865879B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of terminal application technology, and in particular to a method for managing terminal applications, a mobile terminal, and a computer-readable storage medium. Background Technology
[0002] With the rapid advancement of technology, terminal devices have become increasingly ubiquitous, forming an essential part of people's daily lives. To meet diverse work, leisure, and entertainment needs, terminal devices often install numerous and varied applications. Consequently, as the number of installed applications grows, the resources consumed by the terminal device also increase. Existing terminal devices have technologies to reclaim system resources. When a severe memory shortage is detected, lower-priority applications are killed to alleviate the slowdown and lag caused by insufficient memory.
[0003] However, in scenarios where one application calls another application to run (an instruction within one application calls another application to run), the terminal device needs to run the called application, thus lowering the running priority of the calling application. In this case, the terminal device may kill the calling application with the lower running priority to reclaim system resources. As a result, the calling application is closed, and the called application will also close as a result (i.e., the terminal device's running state at the user level is: the application crashes when calling other applications), which seriously affects the user experience. Summary of the Invention
[0004] The main objective of this invention is to provide a method for managing terminal applications, a mobile terminal, and a computer-readable storage medium, aiming to solve the technical problem of app crashes when an application calls other applications to run.
[0005] To achieve the above objectives, embodiments of the present invention provide a method for managing terminal applications, the method comprising:
[0006] Detect the second application associated with the first application currently running in the foreground of the terminal;
[0007] Obtain the second application priority of the second application and either increase or lock the second application priority.
[0008] Optionally, the step of prioritizing the second application includes:
[0009] Obtain the first application priority of the first application;
[0010] Raise the second application's second application priority to the first application priority.
[0011] Optionally, the process management method for the terminal application further includes:
[0012] The priority range of the running applications that the detection terminal recycling system needs to reclaim for resource recovery is located in.
[0013] Optionally, the step of prioritizing the second application further includes:
[0014] Obtain the upper priority threshold of the priority range;
[0015] Raise the second application's second application priority to a priority above the upper priority threshold.
[0016] Optionally, the step of detecting the second application associated with the first application running in the foreground of the terminal includes:
[0017] Extract the startup information of the first application currently running in the foreground of the terminal;
[0018] From the startup information, the application that triggered the running instruction of the first application is selected as the second application.
[0019] Optionally, the step of locking the priority of the second application includes:
[0020] Obtain the running priority when the second application triggers the running instruction of the first application;
[0021] The execution priority of the second application when it triggers the execution instruction of the first application is locked.
[0022] Optionally, the method for managing the terminal application further includes:
[0023] If the first application stops running, the priority of the second application is restored from its previous level, or the priority of the second application is unlocked.
[0024] Optionally, the step of obtaining the second application priority of the second application includes:
[0025] Extract the preset running priority mapping table, and match the running priority of the second application as the second application priority according to the preset running priority mapping table.
[0026] Furthermore, to achieve the above objectives, the present invention also provides a terminal application management and control device, the terminal application management and control device comprising:
[0027] The detection module is used to detect the second application associated with the first application currently running in the foreground of the terminal;
[0028] The control module is used to obtain the second application priority of the second application and either increase or lock the second application priority.
[0029] In addition, to achieve the above objectives, the present invention also provides a mobile terminal;
[0030] The mobile terminal includes: a memory, a processor, and a management program for a terminal application stored in the memory and executable on the processor. When the management program for the terminal application is executed by the processor, it implements the steps of the management method for the terminal application as described above.
[0031] In addition, to achieve the above objectives, the present invention also provides a computer-readable storage medium;
[0032] The computer-readable storage medium stores a management program for a terminal application, which, when executed by a processor, implements the steps of the terminal application management method described above.
[0033] This invention discloses a method, apparatus, mobile terminal, and computer-readable storage medium for managing terminal applications. The method detects a second application associated with a first application running in the foreground of the terminal; obtains the second application priority of the second application; and either elevates or locks the second application priority. When the terminal device is running a first application invoked by the second application, the running priority of the second application is elevated. This avoids the problem of both the first and second applications stopping due to the terminal device mistakenly killing the second application with a lower running priority while reclaiming system resources, thus improving the user experience. Attached Figure Description
[0034] Figure 1 This is a schematic diagram of the hardware structure of an optional mobile terminal according to an embodiment of the present invention;
[0035] Figure 2 for Figure 1 A schematic diagram of the wireless communication device of a China Mobile terminal;
[0036] Figure 3 This is a flowchart illustrating the first embodiment of the control method for terminal applications of the present invention.
[0037] Figure 4 This is a detailed flowchart of step S20 in one embodiment of the terminal application control method of the present invention.
[0038] Figure 5 This is a flowchart illustrating the third embodiment of the terminal application control method of the present invention;
[0039] Figure 6 This is a schematic diagram of the functional modules of a control device for a terminal application of the present invention.
[0040] The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0041] It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
[0042] In the following description, the use of suffixes such as "module," "part," or "unit" to denote elements is solely for the purpose of illustrative purposes and has no specific meaning in itself. Therefore, "module," "part," or "unit" may be used interchangeably.
[0043] Terminals can be implemented in various forms. For example, mobile terminals described in this invention may include mobile terminals such as mobile phones, tablets, laptops, handheld computers, personal digital assistants (PDAs), portable media players (PMPs), navigation devices, wearable devices, smart bracelets, pedometers, and other terminal devices such as digital TVs and desktop computers.
[0044] The following description will use a mobile terminal as an example. Those skilled in the art will understand that, apart from components specifically designed for mobile purposes, the construction according to embodiments of the present invention can also be applied to other types of terminals.
[0045] Please see Figure 1 This is a schematic diagram of the hardware structure of a mobile terminal implementing various embodiments of the present invention. The mobile terminal 100 may include: an RF (Radio Frequency) unit 101, a WiFi module 102, an audio output unit 103, an A / V (Audio / Video) input unit 104, a sensor 105, a display unit 106, a user input unit 107, an interface unit 108, a memory 109, a processor 110, and a power supply 111, etc. Those skilled in the art will understand that... Figure 1 The mobile terminal structure shown does not constitute a limitation on the mobile terminal. The mobile terminal may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0046] The following is combined Figure 1 A detailed introduction to each component of the mobile terminal:
[0047] The radio frequency unit 101 can be used for receiving and transmitting signals during information transmission or calls. Specifically, it receives downlink information from the base station and processes it with the processor 110; additionally, it transmits uplink data to the base station. Typically, the radio frequency unit 101 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low-noise amplifier, and a duplexer. Furthermore, the radio frequency unit 101 can also communicate wirelessly with networks and other devices. The aforementioned wireless communications may use any communication standard or protocol, including but not limited to GSM (Global System of Mobile communication), GPRS (General Packet Radio Service), CDMA2000 (Code Division Multiple Access 2000), WCDMA (Wideband Code Division Multiple Access), TD-SCDMA (Time Division-Synchronous Code Division Multiple Access), FDD-LTE (Frequency Division Duplexing-Long Term Evolution), and TDD-LTE (Time Division Duplexing-Long Term Evolution).
[0048] WiFi is a short-range wireless transmission technology. Mobile terminals, through the WiFi module 102, can help users send and receive emails, browse web pages, and access streaming media, providing users with wireless broadband internet access. Although Figure 1 WiFi module 102 is shown, but it is understood that it is not a necessary component of a mobile terminal and can be omitted as needed without changing the nature of the invention.
[0049] The audio output unit 103 can convert audio data received by the radio frequency unit 101 or the WiFi module 102 or stored in the memory 109 into audio signals and output them as sound when the mobile terminal 100 is in call signal receiving mode, call mode, recording mode, voice recognition mode, broadcast receiving mode, etc. Furthermore, the audio output unit 103 can also provide audio output related to specific functions performed by the mobile terminal 100 (e.g., call signal receiving sound, message receiving sound, etc.). The audio output unit 103 may include a speaker, a buzzer, etc.
[0050] The A / V input unit 104 is used to receive audio or video signals. The A / V input unit 104 may include a graphics processing unit (GPU) 1041 and a microphone 1042. The GPU 1041 processes image data of still images or videos acquired by an image capture device (such as a camera) in video capture mode or image capture mode. The processed image frames can be displayed on the display unit 106. The image frames processed by the GPU 1041 can be stored in the memory 109 (or other storage medium) or transmitted via the radio frequency unit 101 or the WiFi module 102. The microphone 1042 can receive sound (audio data) in operating modes such as telephone call mode, recording mode, and voice recognition mode, and can process such sound into audio data. The processed audio (voice) data can be converted into a format that can be transmitted to a mobile communication base station via the radio frequency unit 101 in telephone call mode. The microphone 1042 can implement various types of noise cancellation (or suppression) algorithms to eliminate (or suppress) noise or interference generated during the reception and transmission of audio signals.
[0051] The mobile terminal 100 also includes at least one sensor 105, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor includes an ambient light sensor and a proximity sensor. The ambient light sensor can adjust the brightness of the display panel 1061 according to the ambient light level, and the proximity sensor can turn off the display panel 1061 and / or backlight when the mobile terminal 100 is moved to the ear. As a type of motion sensor, the accelerometer sensor can detect the magnitude of acceleration in various directions (generally three axes). When stationary, it can detect the magnitude and direction of gravity and can be used for applications that recognize the phone's posture (such as landscape / portrait switching, related games, magnetometer posture calibration), vibration recognition-related functions (such as pedometer, tapping), etc. Other sensors that may be configured in the phone, such as fingerprint sensors, pressure sensors, iris sensors, molecular sensors, gyroscopes, barometers, hygrometers, thermometers, and infrared sensors, will not be described in detail here.
[0052] The display unit 106 is used to display information input by the user or information provided to the user. The display unit 106 may include a display panel 1061, which may be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), or the like.
[0053] User input unit 107 can be used to receive input numerical or character information, and generate key signal inputs related to user settings and function control of the mobile terminal. Specifically, user input unit 107 may include touch panel 1071 and other input devices 1072. Touch panel 1071, also known as touch screen, can collect touch operations on or near the user (such as operations performed by the user using a finger, stylus, or any suitable object or accessory on or near touch panel 1071), and drive corresponding connection devices according to a pre-set program. Touch panel 1071 may include two parts: a touch detection device and a touch controller. The touch detection device detects the user's touch position and the signal generated by the touch operation, and transmits the signal to the touch controller; the touch controller receives touch information from the touch detection device, converts it into touch point coordinates, sends it to processor 110, and can receive and execute commands from processor 110. In addition, touch panel 1071 can be implemented using various types such as resistive, capacitive, infrared, and surface acoustic wave. In addition to the touch panel 1071, the user input unit 107 may also include other input devices 1072. Specifically, other input devices 1072 may include, but are not limited to, one or more of the following: physical keyboard, function keys (such as volume control buttons, power buttons, etc.), trackball, mouse, joystick, etc., without being limited here.
[0054] Furthermore, the touch panel 1071 may cover the display panel 1061. When the touch panel 1071 detects a touch operation on or near it, it transmits the information to the processor 110 to determine the type of touch event. Subsequently, the processor 110 provides corresponding visual output on the display panel 1061 based on the type of touch event. Although in Figure 1 In this embodiment, the touch panel 1071 and the display panel 1061 are two independent components to realize the input and output functions of the mobile terminal. However, in some embodiments, the touch panel 1071 and the display panel 1061 can be integrated to realize the input and output functions of the mobile terminal. The specific implementation is not limited here.
[0055] Interface unit 108 serves as an interface through which at least one external device can connect to mobile terminal 100. For example, the external device may include a wired or wireless headset port, an external power supply (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device with an identification module, an audio input / output (I / O) port, a video I / O port, a headphone port, and so on. Interface unit 108 may be used to receive input (e.g., data, power, etc.) from the external device and transmit the received input to one or more elements within mobile terminal 100, or it may be used to transmit data between mobile terminal 100 and the external device.
[0056] The memory 109 can be used to store software programs and various data. The memory 109 can be a computer storage medium, storing the control program for the terminal application of this invention. The memory 109 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, at least one terminal application required for a function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created based on the use of the mobile phone (such as audio data, phonebook, etc.). Furthermore, the memory 109 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device.
[0057] The processor 110 is the control center of the mobile terminal. It connects various parts of the mobile terminal via various interfaces and lines. By running or executing software programs and / or modules stored in the memory 109, and by calling data stored in the memory 109, it performs various functions and processes data of the mobile terminal, thereby providing overall monitoring of the mobile terminal. For example, the processor 110 executes the terminal application management program in the memory 109 to implement the steps of the various embodiments of the terminal application management method of the present invention.
[0058] Processor 110 may include one or more processing units; optionally, processor 110 may integrate an application processor and a modem processor, wherein the application processor mainly handles the operating system, user interface, and applications, and the modem processor mainly handles wireless communication. It is understood that the modem processor may also not be integrated into processor 110.
[0059] The mobile terminal 100 may also include a power supply 111 (such as a battery) that supplies power to various components. Optionally, the power supply 111 may be logically connected to the processor 110 through a power management system, thereby enabling functions such as charging, discharging, and power consumption management through the power management system.
[0060] although Figure 1As not shown, the mobile terminal 100 may also include a Bluetooth module, etc., which will not be described in detail here.
[0061] To facilitate understanding of the embodiments of the present invention, the communication network system on which the mobile terminal of the present invention is based is described below.
[0062] Please see Figure 2 , Figure 2 This invention provides a communication network system architecture diagram. The communication network system is an LTE system based on the universal mobile communication technology. The LTE system includes a UE (User Equipment) 201, an E-UTRAN (Evolved UMTS Terrestrial Radio Access Network) 202, an EPC (Evolved Packet Core) 203, and the operator's IP services 204, which are connected in sequence.
[0063] Specifically, UE201 can be the aforementioned mobile terminal 100, which will not be elaborated here.
[0064] E-UTRAN202 includes eNodeB2021 and other eNodeB2022s. Among them, eNodeB2021 can connect to other eNodeB2022s via backhaul (e.g., X2 interface), and eNodeB2021 connects to EPC203. eNodeB2021 can provide UE201 with access to EPC203.
[0065] EPC203 may include MME (Mobility Management Entity) 2031, HSS (Home Subscriber Server) 2032, other MMEs 2033, SGW (Serving Gateway) 2034, PGW (Packet Data Network Gateway) 2035, and PCRF (Policy and Charging Rules Function) 2036, etc. Among them, MME2031 is the control node that handles signaling between UE201 and EPC203, providing bearer and connection management. HSS2032 provides registers to manage functions such as the Home Location Register (not shown in the diagram) and stores user-specific information such as service characteristics and data rates. All user data can be sent through SGW2034. PGW2035 can provide UE 201 IP address allocation and other functions. PCRF2036 is the policy and charging control decision point for service data flow and IP bearer resources. It selects and provides available policy and charging control decisions for the policy and charging enforcement function unit (not shown in the figure).
[0066] IP services 204 may include the Internet, intranet, IMS (IP Multimedia Subsystem), or other IP services.
[0067] Although the above description uses the LTE system as an example, those skilled in the art should understand that the present invention is not only applicable to the LTE system, but also to other wireless communication systems, such as GSM, CDMA2000, WCDMA, TD-SCDMA, and future new network systems, etc., which are not limited here.
[0068] Based on the aforementioned mobile terminal hardware structure and communication network system, various embodiments of the method of the present invention are proposed.
[0069] This invention provides a method for managing terminal applications, which is mainly applied to mobile terminals. The method for managing terminal applications includes:
[0070] The system detects a second application associated with a first application currently running in the foreground of the terminal; obtains the second application priority of the second application; and promotes the priority of the second application.
[0071] Specifically, in the first embodiment of the control method for terminal applications of the present invention, referring to Figure 3 , Figure 3This is a flowchart illustrating a first embodiment of the terminal application management method of the present invention. In the first embodiment of the terminal application management method of the present invention, the terminal application management method includes:
[0072] Step S10: Detect the second application associated with the first application currently running in the foreground of the terminal.
[0073] When it is detected that the first application is currently running in the foreground of the terminal, the system further detects the second application associated with the first application currently running in the foreground of the terminal among all the applications installed on the terminal.
[0074] It should be noted that among the various applications installed on the terminal, when there is a calling and being called situation between the applications, for example, the WeChat application needs to call the camera application installed on the terminal to implement the "scan code" function, then there is an association between the calling application (i.e., the WeChat application) and the called application (i.e., the camera application), or in other words, at this time, the calling application is an application associated with the called application.
[0075] Specifically, for example, when it is detected that a camera application is currently running in the foreground of a smartphone (for ease of description, in the following embodiments, "smartphone" will be used as a specific instance of the "terminal" mentioned above), that is, the camera application is marked as a first application, then the system further detects a second application among all the applications installed on the smartphone that has a relationship with the camera application currently running in the foreground of the smartphone.
[0076] Further, detecting the second application associated with the first application currently running in the foreground of the terminal, step S10 includes:
[0077] Step S101: Extract the startup information of the first application currently running in the foreground of the terminal.
[0078] It should be noted that each application installed on the terminal generates its own startup information when the terminal starts running the application according to the running instruction. This startup information stores the time when the terminal started the corresponding application and the triggering source of the running instruction. For example, the startup information generated by the smartphone for the camera application currently running in the foreground will record the camera application's startup time as 15:24 and the triggering source of the running instruction for the camera application as being triggered by a call from the WeChat application.
[0079] After detecting the first application running in the foreground of the terminal, the startup information of the current first application generated by the terminal is extracted.
[0080] Specifically, for example, when it is detected that the current foreground application running on the smartphone is the camera application, the startup information of the current camera application generated from the smartphone.
[0081] Step S102: Obtain the application that triggered the first application's running instruction from the startup information as the second application.
[0082] From the startup information of the first application running in the foreground generated by the extracted terminal, obtain the application that triggered the running instruction to start the application, and use that application as the second application.
[0083] Specifically, for example, after extracting the startup information of the camera application currently running in the foreground generated by the smartphone, if the application that triggers the startup command to run the camera application is found to be the WeChat application, then the WeChat application is considered as the second application associated with the camera application currently running in the foreground.
[0084] Step S20: Obtain the second application priority of the second application and either increase or lock the second application priority.
[0085] After detecting the second application associated with the first application currently running in the foreground of the terminal among all installed applications, the system obtains the running process of the second application and its priority among all running priorities of the terminal. The system then either raises or locks the priority of the second application to prevent the terminal from lowering the running priority of the second application process when switching to the running process of the first application, thereby ensuring that the running process of the second application will not be killed by the terminal's system resource reclamation mechanism.
[0086] Specifically, for example, when it is detected that among all the applications installed on the current smartphone, the application associated with the camera application currently running in the foreground of the smartphone is the WeChat application, the running process of the WeChat application is obtained from all the running processes of the smartphone system at the current moment, and the running priority of the current WeChat application process is matched with the running priority of the smartphone's running priority, and the obtained running priority is raised to a higher running priority in the order of priority from low to high.
[0087] It should be noted that the running priority of terminals based on the Android system is arranged in order from low to high as follows: cache (high-speed cache storage) processes, processes that only hold unusable activities, infrequently used service processes in the B List (secondary importance), previous application service processes, desktop application running processes, application service processes, heavy-weight (background heavyweight) application processes, processes that manage backup operations, processes that hold user-aware components, processes that hold user-aware components, foreground application processes, processes bound to system or persistent processes, persistent processes, system processes, and native processes, etc.
[0088] Further, in step S20, the step of obtaining the second application priority of the second application includes:
[0089] Step S201: Extract the preset running priority mapping table, and match the running priority of the second application as the second application priority according to the preset running priority mapping table.
[0090] It should be noted that the default priority mapping table is a search list of the running priorities of application processes established based on the priority configuration file of the terminal system. This list stores the process name of each application process and the running priority corresponding to each process.
[0091] Specifically, for example, after detecting that among all applications installed on the current smartphone, the application associated with the camera application currently running in the foreground is the WeChat application, in the application running process search list established based on the terminal system's priority configuration file, according to the process name of the WeChat application running process, the running priority of the WeChat application running process is matched among all running priorities of the smartphone from low to high: cache process, process holding only unusable activities, infrequently used service processes in the B List, previous application service process, desktop program running process, application service process, heavy-weight application process, process hosting backup operations, process holding user-aware components, process holding user-aware components, foreground application process, process bound to system or persistent process, persistent process, system process, and native process, etc., and the running priority is: previous application service process.
[0092] Furthermore, step S20, the step of raising the priority of the second application, includes:
[0093] Step S202: Obtain the first application priority of the first application.
[0094] In the extracted preset running priority mapping table, the running priority corresponding to the process name of the first application is matched as the first application priority of the first application.
[0095] Specifically, for example, in the application running process priority search list established based on the terminal system priority configuration file, according to the process name of the camera application running process currently running in the smartphone foreground at the moment, the running priority of the camera application running process is matched in the smartphone's total running priorities from low to high, and the running priority is: foreground service process.
[0096] Step S203: Upgrade the second application priority of the second application to the first application priority.
[0097] After obtaining the running priorities of the first application and the second application associated with the first application, the running priority of the second application is adjusted to the same running priority as the running priority of the first application among all running priorities of the terminal.
[0098] Specifically, for example, in the application running process search list established based on the priority configuration file of the terminal system, the running process of the camera application currently running in the foreground of the smartphone is matched according to the process name of the camera application running process at the current moment. Among all running priorities of the smartphone arranged from low to high, its running priority is: foreground service process. And, according to the process name of the WeChat application running process associated with the current camera application, the running process of the WeChat application is matched. Among all running priorities of the smartphone arranged from low to high, its running priority is: after the previous application service process. The running priority of the WeChat application running process associated with the current camera application - the previous application service process - is adjusted to the same running priority as the current camera application running process - the foreground service process.
[0099] In this embodiment, when it is detected that a first application is currently running in the foreground of the terminal, the system further detects all applications installed on the terminal, identifying a second application associated with the currently running first application. After detecting this second application, the system obtains the priority of the second application's running process within the terminal's overall running priority list and elevates this priority. This ensures that the second application's running process will not be killed by the terminal's system resource reclamation mechanism. This avoids the problem of both the first and second applications stopping due to the terminal device mistakenly killing the running process of a lower-priority second application while reclaiming system resources, thus improving the user experience.
[0100] Furthermore, based on the first embodiment of the terminal application management method of the present invention, a second embodiment of the terminal application management method of the present invention is proposed. In this embodiment, the terminal application management method of the present invention further includes:
[0101] Step A: Detect the priority range of the running applications that the terminal recycling system needs to reclaim resources from.
[0102] The system detects the current memory status of the terminal and determines the priority range of each application process that needs to be detected and reclaimed during the current system resource reclamation mechanism based on the terminal's current memory status.
[0103] Specifically, for example, if a large amount of remaining memory is detected in the smartphone system, when the system resource reclaimer is triggered, it only needs to kill and reclaim the running processes of applications corresponding to each running priority from "cache processes" to "processes performing managed backup operations" (i.e., processes that only hold unusable activities, infrequently used service processes in the B List, previous application service processes, desktop application running processes, application service processes, and heavy-weight application processes) in the smartphone system's total running priority. This is sufficient to reclaim enough system resources for the current smartphone. Therefore, the priority range from "cache processes" to "processes performing managed backup operations" is determined as the running process range that needs to be killed and reclaimed.
[0104] Further, please refer to Figure 4 , Figure 4 This is a detailed flowchart of step S20 in one embodiment of the terminal application management method of the present invention. Step S20, the step of prioritizing the second application, further includes:
[0105] Step S204: Obtain the upper priority threshold of the priority range.
[0106] Step S205: Increase the second application priority of the second application to a priority above the upper priority threshold.
[0107] When the system resource reclamation mechanism of the terminal is performing system resource reclamation, the application processes that need to be detected and reclaimed are determined. After the priority range in the total running priority of the terminal, the upper priority threshold of the priority range is extracted according to the order of running priority from low to high. The running priority of the second application process associated with the first application running in the foreground of the terminal is adjusted to a level above the determined upper priority threshold of the priority range.
[0108] Specifically, for example, if the system resource reclamation mechanism of a smartphone is triggered due to a large amount of remaining memory in the current smartphone system, it is only necessary to check the priority range of the reclaiming processes, from "cache processes" to "processes managing backup operations". Then, if the priority of the processes above "processes managing backup operations" is "processes holding user-perceptible components", then the priority of the WeChat application process associated with the camera application currently running in the foreground of the smartphone will be raised to the level of "processes holding user-perceptible components".
[0109] In this embodiment, the current memory status of the terminal is detected. Based on the current memory, the system resource reclamation mechanism is determined to identify and reclaim the running processes of each application. Within the priority range of all running applications on the terminal, the upper priority threshold of that priority range is extracted in ascending order of priority. The running priority of the second application process associated with the first application currently running on the foreground is then raised to the level above the determined upper priority threshold. Based on the remaining memory of the terminal system, the required running priority for the second application is determined. This avoids directly raising the second application process to a higher priority, preventing application processes from being reclaimed and reducing overall terminal power consumption, improving application management efficiency, and further enhancing the user experience.
[0110] Furthermore, based on the first embodiment of the terminal application management method of the present invention, a third embodiment of the terminal application management method of the present invention is proposed, please refer to... Figure 5 , Figure 5This is a flowchart illustrating a third embodiment of the terminal application management method of the present invention. In this embodiment, step S20 of the terminal application management method of the present invention, the step of locking the priority of the second application, includes:
[0111] Step B: Obtain the running priority when the second application triggers the running instruction of the first application.
[0112] When the terminal detects that the second application has triggered the instruction to run the first application, the running priority of the second application process is determined among all running priorities of the terminal.
[0113] Specifically, for example, when a smartphone detects that the WeChat application triggers a command to run the camera application due to calling the camera application, at the moment the terminal detects that the WeChat application triggers a command to run the camera application, the current running process of the WeChat application is detected to be in the foreground application process among all running priorities of the smartphone.
[0114] Step C: Lock the running priority when the second application triggers the running instruction of the first application.
[0115] When the detected second application calls trigger the first application's execution command, the execution priority of the second application's running process is locked among all execution priorities on the terminal. This prevents the terminal from lowering the execution priority of the current second application's running process by switching the running process of the first application after detecting the execution command of the first application.
[0116] Specifically, for example, when the terminal detects that the WeChat application triggers the call to run the camera application, the running priority of the WeChat application process in the smartphone's overall running priority is locked as the foreground application process. That is, the smartphone is prevented from running the camera application based on the camera application's running instruction, and the running priority of the WeChat application process is switched to a lower running priority.
[0117] Furthermore, in another embodiment, the control method for the terminal application of the present invention further includes:
[0118] Step D: Upon detecting that the first application has stopped running, restore the elevated priority of the second application, or unlock the priority of the second application.
[0119] When the first application stops running as detected by a second application call, the priority of the second application process associated with the first application currently running in the foreground of the terminal will be restored to the priority of the second application process in the terminal's overall running priority at the time when the second application called the instruction to run the first application; or, when the first application stops running, the running priority of the second application process, which is currently locked, will be released so that the running priority of the second application process will be lowered accordingly when the terminal switches to running other applications.
[0120] In this embodiment, when the terminal detects that the second application has triggered the execution command of the first application, the execution priority of the second application process is determined among all execution priorities of the terminal. The execution priority of the process at the moment the second application triggers the execution command of the first application is locked. This prevents the terminal from lowering the execution priority of the second application process after detecting the execution command of the first application and switching to the running process of the first application. This avoids the terminal device mistakenly killing the second application process with a lower priority due to the need to reclaim system resources. Furthermore, while preventing the application process from being killed and reclaimed, the terminal does not need to adjust the execution priority of the second application process, reducing terminal power consumption. When the first application, triggered by the second application, stops running, the adjustment operation on the execution priority of the second application process is restored, avoiding confusion in the terminal system's management of various applications and improving the efficiency of terminal application management.
[0121] In addition, please refer to Figure 6 , Figure 6 This is a functional module diagram of the control device for a terminal application of the present invention. In an embodiment of the present invention, a control device for a terminal application is also provided, the control device for the terminal application comprising:
[0122] The detection module is used to detect the second application associated with the first application currently running in the foreground of the terminal;
[0123] The control module is used to obtain the second application priority of the second application and either increase or lock the second application priority.
[0124] Furthermore, the control module includes:
[0125] The first acquisition unit is used to acquire the first application priority of the first application.
[0126] The first adjustment unit is also used to raise the second application priority of the second application to the first application priority.
[0127] Furthermore, the detection module of the terminal application management device is also used to detect the priority range of the running applications that the terminal recycling system needs to reclaim resources from.
[0128] Furthermore, the control module also includes:
[0129] The second acquisition unit is used to acquire the upper priority threshold of the priority range;
[0130] The second adjustment unit is used to raise the second application's second application priority to a priority above the upper priority threshold.
[0131] Furthermore, the detection module includes:
[0132] The extraction unit is used to extract the startup information of the first application running in the foreground of the terminal;
[0133] The third acquisition unit is used to acquire the application that triggered the first application's running instruction from the startup information as the second application.
[0134] Furthermore, the control module also includes:
[0135] The acquisition unit is used to acquire the running priority when the second application triggers the running instruction of the first application;
[0136] The locking unit is used to lock the running priority when the second application triggers the running instruction of the first application.
[0137] Furthermore, the control device for the terminal application also includes:
[0138] The recovery module is used to restore the elevated priority of the second application or unlock the priority of the second application when the first application is detected to have stopped running.
[0139] Furthermore, the control module also includes:
[0140] The matching unit extracts a preset running priority mapping table and matches the running priority of the second application as the second application priority according to the preset running priority mapping table.
[0141] The steps for implementing each functional module of the terminal application management and control device can be referred to the various embodiments of the terminal application management and control method of the present invention, and will not be repeated here.
[0142] The present invention also provides a mobile terminal, the mobile terminal comprising: a memory, a processor, a communication bus, and a management program for a terminal application stored in the memory.
[0143] The communication bus is used to enable communication between the processor and the memory;
[0144] The processor is used to execute the management program of the terminal application to implement the steps of the various embodiments of the above-described terminal application management method.
[0145] The present invention also provides a storage medium for use in a computer, wherein the storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the steps of the various embodiments of the control method for the aforementioned terminal application.
[0146] The specific implementation of the storage medium of the present invention is basically the same as the various embodiments of the control method for the terminal application described above, and will not be repeated here.
[0147] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0148] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0149] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of the present invention.
[0150] The embodiments of the present invention have been described above with reference to the accompanying drawings. However, the present invention is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of the present invention without departing from the spirit and scope of the claims. All of these forms are within the protection scope of the present invention.
Claims
1. A method for managing and controlling terminal applications, characterized in that, The management and control methods for the terminal applications include: Detect the second application associated with the first application currently running in the foreground of the terminal; Obtain the second application priority of the second application and either increase or decrease the second application priority; The steps for detecting the second application associated with the first application currently running in the foreground of the detection terminal include: Extract the startup information of the first application currently running in the foreground of the terminal, wherein the startup information includes the time when the terminal starts running the first application, and the trigger source of the running instruction to start running the first application; From the startup information, the application that triggered the first application's execution instruction is selected as the second application; The step of prioritizing the second application further includes: Obtain the upper priority threshold of the priority range, where the priority range is the range in which the running application that needs to be reclaimed by the terminal recycling system resources is located; Raise the second application's second application priority to a priority above the upper priority threshold.
2. The terminal application management and control method as described in claim 1, characterized in that, The step of prioritizing the second application includes: Obtain the first application priority of the first application; Raise the second application's second application priority to the first application priority.
3. The terminal application management method as described in claim 1, characterized in that, The step of locking the priority of the second application includes: Obtain the running priority when the second application triggers the running instruction of the first application; The execution priority of the second application when it triggers the execution instruction of the first application is locked.
4. The terminal application management and control method as described in claim 1, characterized in that, The method for managing the terminal application also includes: If the first application stops running, the priority of the second application is restored from its previous level, or the priority of the second application is unlocked.
5. The terminal application management and control method as described in claim 1, characterized in that, The step of obtaining the second application priority of the second application includes: According to the preset running priority mapping table, the running priority of the second application is matched as the second application priority.
6. A mobile terminal, characterized in that, The mobile terminal includes: a memory, a processor, and a management program for a terminal application stored in the memory and executable on the processor. When the management program for the terminal application is executed by the processor, it implements the steps of the management method for the terminal application as described in any one of claims 1 to 5.
7. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a management program for a terminal application, which, when executed by a processor, implements the steps of the management method for a terminal application as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Terminal and application program protection method
CN103324536A