A memory secondary tube control configuration method, device and computer readable storage medium

By performing a secondary freezing process on applications during device sleep mode, the issues of abnormal interface and high power consumption caused by prolonged freezing of third-party applications are resolved, achieving more efficient memory management, reducing power consumption, and improving battery life.

CN115495240BActive Publication Date: 2026-07-21NUBIA TECHNOLOGY CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
NUBIA TECHNOLOGY CO LTD
Filing Date
2022-09-23
Publication Date
2026-07-21

AI Technical Summary

Technical Problem

In existing technologies, prolonged freezing of third-party applications leads to abnormal interfaces and high power consumption. Directly killing these applications affects the user experience, and existing memory management methods are inefficient.

Method used

When the device enters sleep mode, it determines whether the application is in a primary freeze state, adds it to the secondary control list, and performs a secondary freeze in the maintenance state of sleep mode. When unfreezing, the process information is restored through cross-process communication.

Benefits of technology

By employing a secondary freezing mechanism, device power consumption is reduced, memory is saved, battery life is improved, and user experience is enhanced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115495240B_ABST
    Figure CN115495240B_ABST
Patent Text Reader

Abstract

The application discloses a memory secondary control configuration method and device and a computer readable storage medium, wherein the method comprises the following steps: when it is identified that a device enters a sleep state of a preset sleep mode, it is judged whether an application of the device has entered a first control state of one-time freezing corresponding to the sleep mode; the application in the first control state is added to a preset secondary control list; when the device enters a maintenance state of the sleep mode from the sleep state, the application in the secondary control list is controlled to enter a second control state of two-time freezing. A more efficient memory secondary control configuration scheme is realized, further secondary control is implemented on the basis of existing memory control in combination with the running mechanism of the sleep mode, thereby greatly reducing power consumption, saving memory, improving endurance, and enhancing user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of mobile communications, and more particularly to a method, device, and computer-readable storage medium for secondary memory management and configuration. Background Technology

[0002] In current technology, with the continuous development of smart terminal devices, the number of third-party applications on the market is also increasing. Considering that many large third-party applications have high requirements for memory and processors, this leads to problems such as insufficient memory, overheating, and high power consumption in mobile phones and other devices. Currently, most power consumption and memory management of third-party applications simply involves freezing them, or even directly killing them. It can be seen that the problems with existing technology are twofold: firstly, if a third-party application is frozen for a long time, it cannot update data in a timely manner, and after unfreezing, it may experience interface abnormalities, and maintaining a frozen process for an extended period is also costly; secondly, directly killing third-party applications would severely impact the user experience. Summary of the Invention

[0003] To address the aforementioned technical deficiencies in the prior art, this invention proposes a secondary memory management configuration method, which includes:

[0004] When the device is detected to have entered a preset sleep mode, it is determined whether the application of the device is already in a first control state of freezing corresponding to the sleep mode.

[0005] Add the application that is already in the first control state to the preset secondary control list;

[0006] When the device enters the maintenance state of the sleep mode from the sleep state, the application in the secondary control list is controlled to enter the second control state of secondary freeze;

[0007] When the application in the second control state receives an unfreeze request, it communicates across processes with the secondary freeze and restarts to restore the secondary freeze process information.

[0008] Optionally, when the device is detected to have entered a preset sleep mode, determining whether the device's application is already in a first control state of freezing corresponding to the sleep mode includes:

[0009] When the device enters the sleep mode, it is detected whether the application conforms to the one-time control policy corresponding to the sleep state;

[0010] When the device enters the sleep state, the application that conforms to the first control policy is controlled to enter the first control state, and the first freeze operation of the application is performed.

[0011] Optionally, adding the application already in the first control state to a preset secondary control list includes:

[0012] Create a secondary control strategy corresponding to the secondary freeze;

[0013] Monitor the application that has been frozen once, and check whether the application complies with the secondary control policy.

[0014] Optionally, adding the application already in the first control state to a preset secondary control list further includes:

[0015] Create the aforementioned secondary control list;

[0016] When it is determined that the application complies with the secondary control policy, the application is added to the secondary control list.

[0017] Optionally, when the device transitions from the sleep state to the maintenance state of the sleep mode, controlling the application in the secondary control list to enter a second control state of secondary freeze includes:

[0018] When the device enters the maintenance state of the sleep mode from the sleep state, the unfreezing status of the application in the secondary control list is detected;

[0019] When an application in the secondary control list is changed from frozen to unfrozen, the secondary freezing operation is performed on the unfrozen application.

[0020] Optionally, when the device enters the maintenance state of the sleep mode from the sleep state, controlling the application in the secondary control list to enter the second control state of secondary freeze further includes:

[0021] After the application that has been subjected to the second freeze operation is frozen a second time, it is determined that the application is in the second control state;

[0022] The application in the second control state is recorded through the secondary control list.

[0023] Optionally, when the application in the second control state receives an unfreezing request, the process information of the second freeze being restarted and restored through cross-process communication between the application and the second freeze includes:

[0024] Upon receiving the unfreezing request from the application, cross-process communication is conducted between the relevant processes of the application and the management process of the secondary control to restart and restore the management process;

[0025] Refresh the process information of the control process to unfreeze the application.

[0026] Optionally, when the application in the second control state receives an unfreezing request, the step of communicating across processes with the secondary freeze through the application and restarting the process information that was previously frozen to restore the secondary freeze further includes:

[0027] When the device exits the sleep mode, the secondary control list is cleared;

[0028] The application in the secondary control list is controlled to change from frozen to unfrozen.

[0029] The present invention also proposes a memory secondary management and configuration device, the device including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the computer program is executed by the processor, it implements the steps of the memory secondary management and configuration method as described in any of the preceding claims.

[0030] The present invention also proposes a computer-readable storage medium storing a memory secondary management configuration program, which, when executed by a processor, implements the steps of the memory secondary management configuration method as described in any of the preceding claims.

[0031] The present invention provides a memory secondary management configuration method, device, and computer-readable storage medium. When the device enters a preset sleep mode, it determines whether the device's applications are already in a first management state corresponding to the sleep mode (a primary freeze). Applications already in the first management state are added to a preset secondary management list. When the device transitions from the sleep state to the maintenance state of the sleep mode, the applications in the secondary management list are controlled to enter a second management state (secondary freeze). When an application in the second management state receives a defreezing request, it communicates across processes with the secondary freeze and restarts the frozen process information. This achieves a more efficient memory secondary management configuration scheme, combining existing memory management with the sleep mode's operating mechanism to implement further secondary management, thereby significantly reducing power consumption, saving memory, improving battery life, and enhancing the user experience. Attached Figure Description

[0032] The present invention will be further described below with reference to the accompanying drawings and embodiments. In the accompanying drawings:

[0033] Figure 1 This is a schematic diagram of the hardware structure of a mobile terminal according to the present invention;

[0034] Figure 2 This is a flowchart of the first embodiment of the memory secondary management and configuration method of the present invention;

[0035] Figure 3 This is a flowchart of the second embodiment of the memory secondary management and configuration method of the present invention;

[0036] Figure 4 This is a flowchart of the third embodiment of the memory secondary management and configuration method of the present invention;

[0037] Figure 5 This is a flowchart of the fourth embodiment of the memory secondary management and configuration method of the present invention;

[0038] Figure 6 This is a flowchart of the fifth embodiment of the memory secondary management and configuration method of the present invention;

[0039] Figure 7 This is a flowchart of the sixth embodiment of the memory secondary management and configuration method of the present invention;

[0040] Figure 8 This is a flowchart of the seventh embodiment of the memory secondary management and configuration method of the present invention;

[0041] Figure 9 This is a flowchart of the eighth embodiment of the memory secondary management and configuration method of the present invention. Detailed Implementation

[0042] It should be understood that the specific embodiments described herein are for illustrative purposes only and are not intended to limit the scope of the invention.

[0043] 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.

[0044] Terminals can be implemented in various forms. For example, the 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, etc., as well as fixed terminals such as digital TVs and desktop computers.

[0045] The following description will use a mobile terminal as an example. Those skilled in the art will understand that, apart from elements specifically designed for mobile purposes, the construction according to embodiments of the present invention can also be applied to fixed-type terminals.

[0046] 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.

[0047] The following is combined with Figure 1 A detailed introduction to each component of the mobile terminal:

[0048] 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).

[0049] 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.

[0050] 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.

[0051] 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.

[0052] 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.

[0053] 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.

[0054] 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.

[0055] 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.

[0056] 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.

[0057] The memory 109 can be used to store software programs and various data. The memory 109 may primarily include a program storage area and a data storage area. The program storage area may store the operating system, applications required for at least one function (such as sound playback, image playback, 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.

[0058] 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. The processor 110 may include one or more processing units; preferably, the processor 110 may integrate an application processor and a modem processor. The application processor mainly handles the operating system, user interface, and applications, while the modem processor mainly handles wireless communication. It is understood that the modem processor may not be integrated into the processor 110.

[0059] The mobile terminal 100 may also include a power supply 111 (such as a battery) that supplies power to various components. Preferably, the power supply 111 can 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 1 As not shown, the mobile terminal 100 may also include a Bluetooth module, etc., which will not be described in detail here.

[0061] Based on the above-described mobile terminal hardware structure, various embodiments of the method of the present invention are proposed.

[0062] Example 1

[0063] Figure 2 This is a flowchart of the first embodiment of the memory secondary management and control configuration method of the present invention. A memory secondary management and control configuration method, the method comprising:

[0064] S1. When it is detected that the device has entered a sleep state of a preset sleep mode, determine whether the application of the device is already in a first control state of freezing corresponding to the sleep mode.

[0065] S2. Add the application that is already in the first control state to the preset secondary control list;

[0066] S3. When the device enters the maintenance state of the sleep mode from the sleep state, control the application in the secondary control list to enter the second control state of secondary freeze;

[0067] S4. When the application in the second control state receives an unfreezing request, it communicates with the secondary freeze through the application and restarts to restore the secondary freeze process information.

[0068] This embodiment provides a process-level power and memory saving scheme. When an application is in the background for an extended period, the frozen process can be managed again without affecting user experience, thereby further reducing overhead and improving user experience. For example, regarding the application's UI process, when the application is in the background and the screen is off for a long time, the user's perception of it is extremely weak, so the UI process is no longer meaningful. However, it still causes a series of unnecessary overheads, leading to increased power consumption, wasted memory, and impacting battery life and user experience. Therefore, when the application's UI process is already frozen in sleep mode, it is further frozen again in the maintenance state of sleep mode, thereby further reducing the overhead of maintaining the UI process in a frozen state for a long time and greatly reducing system power consumption.

[0069] The beneficial effects of this embodiment are as follows: when the device is detected to have entered a preset sleep mode, it determines whether the device's applications are already in a first control state corresponding to the sleep mode; the applications already in the first control state are added to a preset secondary control list; when the device transitions from the sleep state to the maintenance state of the sleep mode, the applications in the secondary control list are controlled to enter a second control state of secondary freezing; when the application in the second control state receives an unfreezing request, the application communicates across processes with the secondary freeze and restarts to restore the process information of the secondary freeze. This achieves a more efficient memory secondary control configuration scheme, combining the existing memory control with the sleep mode's operating mechanism to implement further secondary control, thereby greatly reducing power consumption, saving memory, improving battery life, and enhancing the user experience.

[0070] Example 2

[0071] Figure 3 This is a flowchart of a second embodiment of the memory secondary management and configuration method of the present invention. Based on the above embodiment, when the device is detected to have entered a preset sleep mode, determining whether the application of the device is already in a first management and control state of primary freeze corresponding to the sleep mode includes:

[0072] S11. When the device enters the sleep mode, detect whether the application conforms to the one-time control policy corresponding to the sleep state;

[0073] S12. When the device enters the sleep state, control the application that conforms to the first control policy to enter the first control state and execute the first freeze operation of the application.

[0074] Optionally, in this embodiment, the device's sleep mode, i.e., doze mode, is monitored. The deviceidlestep node is monitored to determine if the phone is currently in doze mode. If the read node is "IDLE", then it has entered doze mode. Next, it is determined whether the application has been frozen.

[0075] Optionally, in this embodiment, it is detected whether the application complies with the freeze control policy. A single freeze control requires the application to meet various preset freeze policies, such as those for music, data usage, and TCP connections. Only when all freeze policies are met will a freeze control be implemented for the application.

[0076] Optionally, in this embodiment, the application process is determined to have undergone a freeze control by reading the / proc / %d / cgroup node. If 5:freezer: / bg is read, it indicates that the process has undergone a freeze control.

[0077] The beneficial effect of this embodiment is that, when the device enters the sleep mode, it detects whether the application conforms to the primary control policy corresponding to the sleep state; when the device enters the sleep state, it controls the application that conforms to the primary control policy to enter the first control state and executes the primary freeze operation of the application. This achieves a more efficient secondary memory control configuration scheme, implementing further secondary control based on existing memory control and the sleep mode's operating mechanism, thereby greatly reducing power consumption, saving memory, improving battery life, and enhancing the user experience.

[0078] Example 3

[0079] Figure 4 This is a flowchart of a third embodiment of the memory secondary management configuration method of the present invention. Based on the above embodiment, adding the application that is already in the first management state to a preset secondary management list includes:

[0080] S21. Create a secondary control strategy corresponding to the secondary freeze;

[0081] S22. Monitor the application that has been frozen once, and detect whether the application complies with the secondary control policy.

[0082] Optionally, considering the previous embodiment, which detects whether an application meets the freeze control policy, a single freeze control requires the application to meet various preset freeze policies, such as those for music, data traffic, and TCP connections. Only when all freeze policies are met will the application undergo a single freeze control. Therefore, in this embodiment, a different policy than the single freeze control conditions will be set for the application as a secondary control policy, where the conditions of the secondary control policy are less stringent than those of the single control policy.

[0083] Optionally, in this embodiment, control conditions related to the frozen state and / or unfrozen state of an application that has been frozen once are set as the basis for monitoring the application that has been frozen once and for determining whether the application meets the secondary control strategy.

[0084] The beneficial effects of this embodiment are that by creating a secondary control policy corresponding to the secondary freeze; monitoring the application that has been frozen in the first freeze; and detecting whether the application conforms to the secondary control policy, a more efficient memory secondary control configuration scheme is achieved. This scheme combines existing memory control with a sleep mode operating mechanism to implement further secondary control, thereby greatly reducing power consumption, saving memory, improving battery life, and enhancing the user experience.

[0085] Example 4

[0086] Figure 5 This is a flowchart of the fourth embodiment of the memory secondary management configuration method of the present invention. Based on the above embodiment, the step of adding the application that is already in the first management state to the preset secondary management list further includes:

[0087] S23. Create the secondary control list;

[0088] S24. When it is determined that the application complies with the secondary control strategy, the application is added to the secondary control list.

[0089] Optionally, in this embodiment, a secondary control list is established. Whenever a process is detected to have been frozen once, the processName of the process is obtained through ProcessInfo to determine whether secondary control is possible. If secondary control is possible, the process is added to the pre-established list.

[0090] The beneficial effect of this embodiment is that by creating the secondary control list and adding the application to the secondary control list when it is determined that the application conforms to the secondary control policy, a more efficient memory secondary control configuration scheme is achieved. This scheme combines existing memory control with a sleep mode operating mechanism to implement further secondary control, thereby greatly reducing power consumption, saving memory, improving battery life, and enhancing the user experience.

[0091] Example 5

[0092] Figure 6 This is a flowchart of the fifth embodiment of the memory secondary management configuration method of the present invention. Based on the above embodiment, when the device enters the maintenance state of the sleep mode from the sleep state, controlling the application in the secondary management list to enter the second management state of secondary freezing includes:

[0093] S31. When the device enters the maintenance state of the sleep mode from the sleep state, the unfreezing status of the application in the secondary control list is detected.

[0094] S32. When the application in the secondary control list is changed from frozen to unfrozen, the secondary freezing operation is performed on the unfrozen application.

[0095] Optionally, in this embodiment, when setting the scheme for the timing of secondary control, the mechanism of entering IDLE_MAINTENANCE mode every once in time under doze mode to update the status is combined. At this time, this embodiment considers the situation where the frozen control process will be unfrozen, and considers that the frozen process cannot perform any operation, otherwise many abnormal situations will occur. Therefore, the timing of the secondary control implemented in this embodiment is also set at the time of IDLE_MAINTENANCE state switching, that is, after the process is unfrozen, the List in the above steps is subjected to secondary control processing (secondary freezing processing) by the killApplicationProcess() method.

[0096] The beneficial effect of this embodiment is that, when the device enters the maintenance state of the sleep mode from the sleep state, the unfrozen status of the application in the secondary control list is detected; when the application in the secondary control list changes from frozen to unfrozen, the secondary freezing operation is performed on the unfrozen application. This achieves a more efficient memory secondary control configuration scheme, implementing further secondary control based on the existing memory control and the sleep mode's operating mechanism, thereby greatly reducing power consumption, saving memory, improving battery life, and enhancing the user experience.

[0097] Example 6

[0098] Figure 7 This is a flowchart of the sixth embodiment of the memory secondary management configuration method of the present invention. Based on the above embodiment, when the device enters the maintenance state of the sleep mode from the sleep state, controlling the application in the secondary management list to enter the second management state of secondary freezing further includes:

[0099] S33 After the application that has been subjected to the second freeze operation is frozen a second time, it is determined that the application is in the second control state;

[0100] S34. Record the applications that are in the second control state through the secondary control list.

[0101] Optionally, in this embodiment, applications that fail to be successfully frozen a second time are removed or marked in the aforementioned secondary control list.

[0102] Optionally, in this embodiment, during the next secondary freeze after the first freeze, the removed or marked applications will not be subject to a secondary freeze.

[0103] The beneficial effect of this embodiment is that, after the application undergoing the secondary freeze operation is frozen a second time, it is determined that the application is in the second control state; the application in the second control state is recorded through the secondary control list. This achieves a more efficient memory secondary control configuration scheme, implementing further secondary control based on existing memory control and combining it with the sleep mode operating mechanism, thereby greatly reducing power consumption, saving memory, improving battery life, and enhancing the user experience.

[0104] Example 7

[0105] Figure 8 This is a flowchart of the seventh embodiment of the memory secondary management configuration method of the present invention. Based on the above embodiment, when the application in the second management state receives an unfreezing request, the process information of the secondary freeze is restarted and restored through cross-process communication between the application and the secondary freeze, including:

[0106] S41. Upon receiving the unfreezing request from the application, cross-process communication is performed between the relevant processes of the application and the management process of the secondary control to restart and restore the management process.

[0107] S42. Refresh the process information of the control process to change the application from frozen to unfrozen.

[0108] Optionally, in this embodiment, within a certain usage cycle of the device, applications that have been actively unfrozen more than a preset number of times are removed or marked in the aforementioned secondary control list; during the next secondary freezing process after the first freezing, the removed or marked applications will not be subject to secondary freezing.

[0109] Optionally, in this embodiment, in the current sleep mode of the device, if there is an application that has been actively unfrozen in the application that has been frozen twice, it is removed or marked in the above-mentioned secondary control list; in the next consecutive sleep mode, the above-mentioned removed or marked applications will not be frozen again.

[0110] The beneficial effect of this embodiment is that, upon receiving the unfreezing request from the application, cross-process communication is conducted between the relevant processes of the application and the management process of the secondary control to restart and restore the management process; the process information of the management process is refreshed, so that the application changes from frozen to unfrozen. This achieves a more efficient memory secondary control configuration scheme, implementing further secondary control based on existing memory management and combining it with the sleep mode operating mechanism, thereby greatly reducing power consumption, saving memory, improving battery life, and enhancing the user experience.

[0111] Example 8

[0112] Figure 9 This is a flowchart of the eighth embodiment of the memory secondary management configuration method of the present invention. Based on the above embodiment, when the application in the second management state receives an unfreezing request, it performs cross-process communication with the secondary freeze through the application and restarts and restores the process information of the secondary freeze, further comprising:

[0113] S43. When the device exits the sleep mode, clear the secondary control list;

[0114] S44. Control the application in the secondary control list to change from frozen to unfrozen.

[0115] Optionally, in this embodiment, when the device exits the sleep mode, the duration of the second freeze of the application that has been frozen twice, the number of times the application that has been frozen twice was actively unfrozen, and the applications that failed to be frozen twice are recorded.

[0116] Optionally, in this embodiment, after the application in the secondary control list is changed from frozen to unfrozen, when the device enters the next sleep mode, the application whose secondary freeze duration exceeds the preset duration and which has been frozen twice but has not been actively unfrozen is directly killed.

[0117] The beneficial effect of this embodiment is that by clearing the secondary management list when the device exits the sleep mode, and controlling the applications in the secondary management list to change from frozen to unfrozen, a more efficient memory secondary management configuration scheme is achieved. This scheme combines existing memory management with the sleep mode's operating mechanism to implement further secondary management, thereby significantly reducing power consumption, saving memory, improving battery life, and enhancing the user experience.

[0118] Example 9

[0119] Based on the above embodiments, the present invention also proposes a memory secondary management and configuration device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, it implements the steps of the memory secondary management and configuration method as described in any of the above embodiments.

[0120] It should be noted that the above-described device embodiments and method embodiments belong to the same concept. The specific implementation process can be found in the method embodiments, and the technical features in the method embodiments are also applicable to the device embodiments, which will not be repeated here.

[0121] Example 10

[0122] Based on the above embodiments, the present invention also proposes a computer-readable storage medium storing a memory secondary management and configuration program, which, when executed by a processor, implements the steps of the memory secondary management and configuration method as described in any of the above embodiments.

[0123] It should be noted that the above-described medium embodiments and method embodiments belong to the same concept. The specific implementation process can be found in the method embodiments, and the technical features in the method embodiments are also applicable to the medium embodiments, which will not be repeated here.

[0124] 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.

[0125] 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.

[0126] 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.

[0127] 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 configuring secondary memory management, characterized in that, The method includes: When the device is detected to have entered a preset sleep mode, it is determined whether the application of the device is already in a first control state of freezing corresponding to the sleep mode. When the device enters the sleep mode, it is detected whether the application conforms to the first control policy corresponding to the sleep state. When the device enters the sleep state, the application that conforms to the first control policy is controlled to enter the first control state and the first freezing operation of the application is executed. The application that is already in the first control state is added to a preset secondary control list. The secondary control policy corresponding to the secondary freeze is created, the application that is frozen in the first freeze is monitored, and it is detected whether the application meets the secondary control policy. The secondary control list is created, and when it is determined that the application meets the secondary control policy, the application is added to the secondary control list. When the device enters the maintenance state of the sleep mode from the sleep state, the application in the secondary control list is controlled to enter the second control state of secondary freezing. When the device enters the maintenance state of the sleep mode from the sleep state, the unfreezing status of the application in the secondary control list is detected. When the application in the secondary control list changes from frozen to unfrozen, a secondary freezing operation is performed on the unfrozen application. After the application that has undergone the secondary freezing operation is frozen, it is determined that the application is in the second control state. The application in the second control state is recorded through the secondary control list. Upon receiving the unfreezing request from the application, cross-process communication is performed between the relevant processes of the application and the management process of the secondary control to restart and restore the management process, and refresh the process information of the management process, so that the application changes from frozen to unfrozen; When the device exits the sleep mode, the secondary control list is cleared, and the applications in the secondary control list are controlled to change from frozen to unfrozen.

2. A memory secondary management and configuration device, characterized in that, The device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, it implements the steps of the memory secondary management and configuration method as described in claim 1.

3. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a memory secondary management and control configuration program, which, when executed by a processor, implements the steps of the memory secondary management and control configuration method as described in claim 1.