CN115495240A - Memory secondary management and control configuration method and device and computer readable storage medium - Google Patents

Memory secondary management and control configuration method and device and computer readable storage medium Download PDF

Info

Publication number
CN115495240A
CN115495240A CN202211162720.9A CN202211162720A CN115495240A CN 115495240 A CN115495240 A CN 115495240A CN 202211162720 A CN202211162720 A CN 202211162720A CN 115495240 A CN115495240 A CN 115495240A
Authority
CN
China
Prior art keywords
control
application
management
state
freezing
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211162720.9A
Other languages
Chinese (zh)
Inventor
王志渊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nubia Technology Co Ltd
Original Assignee
Nubia Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nubia Technology Co Ltd filed Critical Nubia Technology Co Ltd
Priority to CN202211162720.9A priority Critical patent/CN115495240A/en
Publication of CN115495240A publication Critical patent/CN115495240A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5011Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals
    • G06F9/5016Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals the resource being the memory
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/26Power supply means, e.g. regulation thereof
    • G06F1/32Means for saving power
    • G06F1/3203Power management, i.e. event-based initiation of a power-saving mode
    • G06F1/3234Power saving characterised by the action undertaken
    • G06F1/329Power saving characterised by the action undertaken by task scheduling
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44594Unloading
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/4881Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Power Sources (AREA)

Abstract

The invention discloses a memory secondary management and control configuration method, equipment and a computer readable storage medium, wherein the method comprises the following steps: when the device is identified to enter a sleep state of a preset sleep mode, judging whether the application of the device is in a first frozen control state corresponding to the sleep mode; adding the application in the first control state to a preset secondary control list; and when the equipment enters a maintenance state of the sleep mode from the sleep state, controlling the application in the secondary control list to enter a secondary frozen second control state. The method and the device realize a more efficient configuration scheme for secondary management and control of the memory, and implement further secondary management and control by combining with a sleep mode operation mechanism on the basis of the existing memory management and control, thereby greatly reducing power consumption, saving the memory, improving cruising ability and enhancing the use experience of users.

Description

Memory secondary management and control configuration method and device and computer readable storage medium
Technical Field
The present invention relates to the field of mobile communications, and in particular, to a method and an apparatus for configuring secondary management and control of a memory, and a computer-readable storage medium.
Background
In the prior art, with the continuous development of intelligent terminal equipment, third party applications in the market are more and more. In consideration of the fact that requirements of a plurality of large third-party applications on a memory, a processor and the like are high, the problems of insufficient memory, serious heating and high power consumption of devices such as mobile phones and the like are caused. At present, most of the power consumption and memory control of the third-party application is just freezing treatment, even directly checking and killing the power consumption and memory. It can be seen that the problems in the prior art are, on one hand, that if a third-party application is in a frozen state for a long time, due to the fact that data cannot be updated in time, an interface may be abnormal after unfreezing, and on the other hand, maintaining a process in a frozen state for a long time is also an overhead, and on the other hand, if the third-party application is directly killed, user experience is seriously affected.
Disclosure of Invention
In order to solve the technical defects in the prior art, the invention provides a memory secondary management and control configuration method, which comprises the following steps:
when the device is identified to enter a sleep state of a preset sleep mode, judging whether the application of the device is in a first frozen control state corresponding to the sleep mode;
adding the application in the first control state to a preset secondary control list;
when the device enters a maintenance state of the sleep mode from the sleep state, controlling the application in the secondary control list to enter a secondary frozen second control state;
and when the application in the second control state receives a unfreezing request, performing cross-process communication with the secondary freezing through the application and restarting to recover the process information of the secondary freezing.
Optionally, when it is identified that the device enters a sleep state of a preset sleep mode, determining whether an application of the device is already in a first management and control state of one-time freezing corresponding to the sleep mode includes:
when the equipment enters the sleep mode, detecting whether the application accords with a primary control strategy corresponding to the sleep state;
when the device enters the sleep state, controlling the application which accords with the primary control strategy to enter the first control state, and executing the primary freezing operation of the application.
Optionally, the adding the application already in the first management and control state to a preset secondary management and control list includes:
creating a secondary management and control strategy corresponding to the secondary freezing;
monitoring the application executing the primary freeze, and detecting whether the application conforms to the secondary management and control policy.
Optionally, the adding the application already in the first management and control state to a preset secondary management and control list further includes:
creating the secondary management and control list;
adding the application to the secondary management and control list when the application is determined to accord with the secondary management and control strategy.
Optionally, 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 a second management state of secondary freezing includes:
when the equipment enters a maintenance state of the sleep mode from the sleep state, detecting a unfreezing state of the application in the secondary management and control list;
when the application of the secondary control list is converted from freezing to unfreezing, the secondary freezing operation is performed on the unfrozen application.
Optionally, 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 a second management state of secondary freezing further includes:
determining that the application is in the second regulation state after the application subjected to the operation of the second freezing is second frozen;
recording the application in the second management and control state through the secondary management and control list.
Optionally, when the application in the second management and control state receives a unfreezing request, performing cross-process communication with the secondary freezing through the application and restarting to recover the process information of the secondary freezing includes:
when the unfreezing request of the application is received, performing cross-process communication with the secondary control process through a related process of the application to restart and recover the control process;
and refreshing the process information of the control process so as to convert the application from freezing to unfreezing.
Optionally, when the application in the second management and control state receives a unfreezing request, performing cross-process communication with the secondary freezing through the application and restarting to recover the process information of the secondary freezing, further includes:
when the equipment exits the sleep mode, emptying the secondary management and control list;
and controlling the applications in the secondary management and control list to be converted from freezing to unfreezing.
The invention also provides a memory secondary management and control configuration device, which comprises a memory, a processor and a computer program stored on the memory and capable of running on the processor, wherein when the computer program is executed by the processor, the steps of the memory secondary management and control configuration method are realized.
The invention further provides a computer-readable storage medium, where a memory secondary management and control configuration program is stored on the computer-readable storage medium, and when executed by a processor, the memory secondary management and control configuration program implements the steps of the memory secondary management and control configuration method according to any one of the above items.
By implementing the memory secondary management and control configuration method, the equipment and the computer readable storage medium, whether the application of the equipment is in a first management and control state of primary freezing corresponding to a preset sleep mode is judged when the equipment is identified to enter the sleep state of the preset sleep mode; adding the application in the first control state to a preset secondary control list; when the device enters a maintenance state of the sleep mode from the sleep state, controlling the application in the secondary control list to enter a secondary frozen second control state; and when the application in the second control state receives a unfreezing request, performing cross-process communication with the secondary freezing through the application and restarting to recover the process information of the secondary freezing. The method and the device realize a more efficient configuration scheme for secondary management and control of the memory, and implement further secondary management and control by combining with a sleep mode operation mechanism on the basis of the existing memory management and control, thereby greatly reducing power consumption, saving the memory, improving cruising ability and enhancing the use experience of users.
Drawings
The invention will be further described with reference to the accompanying drawings and examples, in which:
fig. 1 is a schematic diagram of a hardware structure of a mobile terminal according to the present invention;
fig. 2 is a flowchart of a memory secondary management and control configuration method according to a first embodiment of the present invention;
fig. 3 is a flowchart of a second embodiment of the configuration method for secondary memory management and control according to the present invention;
fig. 4 is a flowchart illustrating a configuration method for secondary management and control of a memory according to a third embodiment of the present invention;
fig. 5 is a flowchart illustrating a configuration method for secondary management and control of a memory according to a fourth embodiment of the present invention;
fig. 6 is a flowchart of a fifth embodiment of a configuration method for secondary memory management and control according to the present invention;
fig. 7 is a flowchart illustrating a configuration method for secondary management and control of a memory according to a sixth embodiment of the present invention;
fig. 8 is a flowchart of a configuration method for secondary management and control of a memory according to a seventh embodiment of the present invention;
fig. 9 is a flowchart of an eighth embodiment of a configuration method for secondary management and control of a memory according to the present invention.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
In the following description, suffixes such as "module", "part", or "unit" used to indicate elements are used only for facilitating the description of the present invention, and have no particular meaning in themselves. Thus, "module", "component" or "unit" may be used mixedly.
The terminal may be implemented in various forms. For example, the terminal described in the present invention may include a mobile terminal such as a mobile phone, a tablet computer, a notebook computer, a palmtop computer, a Personal Digital Assistant (PDA), a Portable Media Player (PMP), a navigation device, a wearable device, a smart band, a pedometer, and the like, and a fixed terminal such as a Digital TV, a desktop computer, and the like.
The following description will be given by way of example of a mobile terminal, and it will be understood by those skilled in the art that the construction according to the embodiment of the present invention can be applied to a fixed type terminal, in addition to elements particularly used for mobile purposes.
Referring to fig. 1, which is a schematic diagram of a hardware structure of a mobile terminal for 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. Those skilled in the art will appreciate that the mobile terminal architecture shown in fig. 1 is not intended to be limiting of mobile terminals, which may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
The following describes each component of the mobile terminal in detail with reference to fig. 1:
the radio frequency unit 101 may be configured to receive and transmit signals during information transmission and reception or during a call, and specifically, receive downlink information of a base station and then process the downlink information to the processor 110; in addition, uplink data is transmitted to the base station. Typically, radio frequency unit 101 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, and the like. In addition, the radio frequency unit 101 can also communicate with a network and other devices through wireless communication. The wireless communication may use any communication standard or protocol, including but not limited to GSM (Global System for 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 multiplexing-Long Term Evolution), and TDD-LTE (Time Division multiplexing-Long Term Evolution), etc.
WiFi belongs to a short-distance wireless transmission technology, and the mobile terminal can help a user to receive and send emails, browse webpages, access streaming media and the like through the WiFi module 102, and provides wireless broadband internet access for the user. Although fig. 1 shows the WiFi module 102, it is understood that it does not belong to the essential constitution of the mobile terminal, and may be omitted entirely as needed within the scope not changing the essence of the invention.
The audio output unit 103 may convert audio data received by the radio frequency unit 101 or the WiFi module 102 or stored in the memory 109 into an audio signal and output as sound when the mobile terminal 100 is in a call signal reception mode, a call mode, a recording mode, a voice recognition mode, a broadcast reception mode, or the like. Also, the audio output unit 103 may also provide audio output related to a specific function performed by the mobile terminal 100 (e.g., a call signal reception sound, a message reception sound, etc.). The audio output unit 103 may include a speaker, a buzzer, and the like.
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 Graphics processor 1041 Processing image data of still pictures or video obtained by an image capturing device (e.g., a camera) in a video capturing mode or an image capturing mode. The processed image frames may be displayed on the display unit 106. The image frames processed by the graphic processor 1041 may 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 may receive sounds (audio data) via the microphone 1042 in a phone call mode, a recording mode, a voice recognition mode, or the like, and may be capable of processing such sounds into audio data. The processed audio (voice) data may be converted into a format output transmittable to a mobile communication base station via the radio frequency unit 101 in case of a phone call mode. The microphone 1042 may implement various types of noise cancellation (or suppression) algorithms to cancel (or suppress) noise or interference generated in the course of receiving and transmitting audio signals.
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 that can adjust the brightness of the display panel 1061 according to the brightness of ambient light, and a proximity sensor that can turn off the display panel 1061 and/or a backlight when the mobile terminal 100 is moved to the ear. As one of the motion sensors, the accelerometer sensor can detect the magnitude of acceleration in each direction (generally, three axes), can detect the magnitude and direction of gravity when stationary, and can be used for applications of recognizing the gesture of the mobile phone (such as horizontal and vertical screen switching, related games, magnetometer gesture calibration), vibration recognition related functions (such as pedometer and tapping), and the like; as for other sensors such as a fingerprint sensor, a pressure sensor, an iris sensor, a molecular sensor, a gyroscope, a barometer, a hygrometer, a thermometer, and an infrared sensor, which can be configured on the mobile phone, further description is omitted here.
The display unit 106 is used to display information input by a user or information provided to the user. The Display unit 106 may include a Display panel 1061, and the Display panel 1061 may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like.
The user input unit 107 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the mobile terminal. Specifically, the user input unit 107 may include a touch panel 1071 and other input devices 1072. The touch panel 1071, also referred to as a touch screen, can collect touch operations of a user (e.g., operations of a user on the touch panel 1071 or near the touch panel 1071 using a finger, a stylus, or any other suitable object or accessory) thereon or nearby and drive the corresponding connection device according to a predetermined program. The touch panel 1071 may include two parts of a touch detection device and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 110, and can receive and execute commands sent by the processor 110. In addition, the touch panel 1071 may be implemented in various types, such as a resistive type, a capacitive type, an infrared ray, and a surface acoustic wave. The user input unit 107 may include other input devices 1072 in addition to the touch panel 1071. In particular, other input devices 1072 may include, but are not limited to, one or more of a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like, and are not limited to these specific examples.
Further, the touch panel 1071 may cover the display panel 1061, and when the touch panel 1071 detects a touch operation thereon or nearby, the touch panel 1071 transmits the touch operation to the processor 110 to determine the type of the touch event, and then the processor 110 provides a corresponding visual output on the display panel 1061 according to the type of the touch event. Although the touch panel 1071 and the display panel 1061 are shown in fig. 1 as two separate components to implement the input and output functions of the mobile terminal, in some embodiments, the touch panel 1071 and the display panel 1061 may be integrated to implement the input and output functions of the mobile terminal, and is not limited herein.
The interface unit 108 serves as an interface through which at least one external device is connected to the 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 having an identification module, an audio input/output (I/O) port, a video I/O port, an earphone port, and the like. The interface unit 108 may be used to receive input (e.g., data information, power, etc.) from external devices and transmit the received input to one or more elements within the mobile terminal 100 or may be used to transmit data between the mobile terminal 100 and external devices.
The memory 109 may be used to store software programs as well as various data. The memory 109 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the cellular phone, and the like. Further, the memory 109 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
The processor 110 is a control center of the mobile terminal, connects various parts of the entire mobile terminal using various interfaces and lines, and performs various functions of the mobile terminal and processes data by operating or executing software programs and/or modules stored in the memory 109 and calling data stored in the memory 109, thereby performing overall monitoring of the mobile terminal. Processor 110 may include one or more processing units; preferably, the processor 110 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 110.
The mobile terminal 100 may further include a power supply 111 (e.g., a battery) for supplying power to various components, and preferably, the power supply 111 may be logically connected to the processor 110 via a power management system, so as to manage charging, discharging, and power consumption management functions via the power management system.
Although not shown in fig. 1, the mobile terminal 100 may further include a bluetooth module and the like, which will not be described in detail herein.
Based on the hardware structure of the mobile terminal, the invention provides various embodiments of the method.
Example one
Fig. 2 is a flowchart of a memory secondary management and control configuration method according to a first embodiment of the present invention. A memory secondary management and control configuration method comprises the following steps:
s1, when a sleep state that equipment enters a preset sleep mode is identified, judging whether application of the equipment is in a first once-frozen control state corresponding to the sleep mode;
s2, adding the application in the first control state to a preset secondary control list;
s3, when the equipment enters a maintenance state of the sleep mode from the sleep state, controlling the application in the secondary control list to enter a secondary frozen second control state;
and S4, when the application in the second control state receives a unfreezing request, performing cross-process communication with the secondary freezing through the application and restarting to recover the process information of the secondary freezing.
In this embodiment, a power consumption and memory secondary saving scheme based on process granularity is provided, and when an application is in a background state for a long time, secondary management and control processing can be performed on a frozen process on the premise that user usage is not affected, so that overhead is further reduced, and user experience is improved. For example: aiming at the UI process of the application, when the application is in a background screen-off long standby state, the user has very weak perception on the application, so the UI process has no meaning, but still causes a series of unnecessary expenses, which causes the power consumption of the mobile phone to be increased, the memory to be wasted, and the endurance and the user experience to be influenced.
The method has the advantages that when the device is identified to enter the sleep state of the preset sleep mode, whether the application of the device is in the first once-frozen control state corresponding to the sleep mode or not is judged; adding the application in the first control state to a preset secondary control list; when the device enters a maintenance state of the sleep mode from the sleep state, controlling the application in the secondary control list to enter a secondary frozen second control state; and when the application in the second control state receives a unfreezing request, performing cross-process communication with the secondary freezing through the application and restarting to recover the process information of the secondary freezing. The method and the device realize a more efficient configuration scheme for secondary management and control of the memory, and implement further secondary management and control by combining with an operation mechanism of a sleep mode on the basis of the existing memory management and control, thereby greatly reducing power consumption, saving the memory, improving cruising ability and enhancing the use experience of users.
Example two
Fig. 3 is a flowchart of a second embodiment of a configuration method for secondary management and control of a memory according to the present invention, where based on the above embodiments, when it is recognized that a device enters a sleep state of a preset sleep mode, determining whether an application of the device is already in a first management and control state of a primary freeze corresponding to the sleep mode includes:
s11, when the equipment enters the sleep mode, detecting whether the application accords with a primary control strategy corresponding to the sleep state;
s12, when the equipment enters the sleep state, controlling the application which accords with the primary control strategy to enter the first control state, and executing the primary freezing operation of the application.
Optionally, in this embodiment, the sleep mode of the listening device, i.e. the doze mode. Whether the mobile phone enters the doze mode at present is judged by monitoring the devicede step node, and if the read node is: IDLE, then enter into the doze mode, and then determine whether the application has been controlled by one-time freeze.
Optionally, in this embodiment, it is detected whether the application conforms to the freeze management policy. The one-time freezing management and control needs to meet all freezing strategies such as music, traffic and TCP links preset and corresponding to the application, and the one-time freezing management and control of the application can be performed only if all the freezing strategies are met.
Optionally, in this embodiment, it is determined whether the application process has performed freezing management and control once by reading/proc/% d/cgroup node, and if 5.
The method has the advantages that when the equipment enters the sleep mode, whether the application accords with a primary management and control strategy corresponding to the sleep state is detected; when the device enters the sleep state, controlling the application conforming to the primary management and control strategy to enter the first management and control state, and executing the primary freezing operation of the application. The method and the device realize a more efficient configuration scheme for secondary management and control of the memory, and implement further secondary management and control by combining with a sleep mode operation mechanism on the basis of the existing memory management and control, thereby greatly reducing power consumption, saving the memory, improving cruising ability and enhancing the use experience of users.
EXAMPLE III
Fig. 4 is a flowchart of a configuration method for secondary memory management and control according to a third embodiment of the present invention, where based on the above embodiment, the adding the application already in the first management and control state to a preset secondary management and control list includes:
s21, creating a secondary management and control strategy corresponding to the secondary freezing;
s22, monitoring the application executed with the primary freezing, and detecting whether the application conforms to the secondary management and control strategy.
Alternatively, it is considered that in the above embodiment, it is detected whether the application complies with the freeze management policy. The primary freezing management and control needs to meet all the freezing strategies such as music, traffic, TCP link and the like preset and corresponding to the application, and the primary freezing management and control of the application can be performed only if all the freezing strategies are met. Therefore, in the present embodiment, another policy different from the above-described primary freezing governing condition is set for the application as the secondary governing policy, where the condition of the secondary governing policy is lower than that of the primary governing policy.
Optionally, in this embodiment, a control condition related to a frozen state and/or a thawed state corresponding to an application that has been in a primary freezing is set as a criterion for monitoring the application that is subjected to the primary freezing, and detecting whether the application conforms to the secondary control policy.
The method has the advantages that a secondary management and control strategy corresponding to the secondary freezing is created; monitoring the application executing the primary freeze, and detecting whether the application conforms to the secondary management and control policy. The method and the device realize a more efficient configuration scheme for secondary management and control of the memory, and implement further secondary management and control by combining with an operation mechanism of a sleep mode on the basis of the existing memory management and control, thereby greatly reducing power consumption, saving the memory, improving cruising ability and enhancing the use experience of users.
Example four
Fig. 5 is a flowchart of a fourth embodiment of the configuration method for secondary memory management and control according to the present invention, where based on the above embodiments, the adding the application already in the first management and control state to a preset secondary management and control list further includes:
s23, creating the secondary management and control list;
s24, when the application is determined to accord with the secondary management and control strategy, the application is added to the secondary management and control list.
Optionally, in this embodiment, a screening secondary regulatory List is established. And when detecting that the process is subjected to primary freezing control, acquiring the processName of the process through the processInfo to judge whether secondary control can be performed or not, and adding the process into a List established in advance if the secondary control is satisfied.
The method has the advantages that the secondary management and control list is created; adding the application to the secondary management and control list when the application is determined to accord with the secondary management and control strategy. The method and the device realize a more efficient configuration scheme for secondary management and control of the memory, and implement further secondary management and control by combining with an operation mechanism of a sleep mode on the basis of the existing memory management and control, thereby greatly reducing power consumption, saving the memory, improving cruising ability and enhancing the use experience of users.
EXAMPLE five
Fig. 6 is a flowchart of a fifth embodiment of the configuration method for controlling secondary management and control of the memory according to the present invention, where based on the above embodiments, when the device enters the maintenance state of the sleep mode from the sleep state, the controlling the application in the secondary management and control list to enter the second management and control state of secondary freezing includes:
s31, when the equipment enters a maintenance state of the sleep mode from the sleep state, detecting a unfreezing state of the application in the secondary management and control list;
and S32, when the application of the secondary management and control list is converted from freezing to unfreezing, executing the secondary freezing operation on the unfrozen application.
Optionally, in this embodiment, when the scheme is set for the timing of secondary management, in combination with the mechanism of entering IDLE _ MAINTENANCEs mode at intervals in the doze mode to update the state, at this time, the timing of secondary management implemented in this embodiment is also set just at the timing of switching IDLE _ MAINTENANCEs state, that is, after the process is thawed, the List of the above steps is secondarily managed (secondarily frozen processing) by using the killApplicationProcess (), considering that the frozen process cannot be operated, otherwise many abnormal situations will occur.
The method has the advantages that when the device enters the maintenance state of the sleep mode from the sleep state, the unfreezing state of the application in the secondary management and control list is detected; when the application of the secondary control list is converted from freezing to unfreezing, the secondary freezing operation is performed on the unfrozen application. The method and the device realize a more efficient configuration scheme for secondary management and control of the memory, and implement further secondary management and control by combining with an operation mechanism of a sleep mode on the basis of the existing memory management and control, thereby greatly reducing power consumption, saving the memory, improving cruising ability and enhancing the use experience of users.
Example six
Fig. 7 is a flowchart of a sixth embodiment of the configuration method for controlling secondary management and control of a memory according to the present invention, based on the above embodiments, when the device enters the maintenance state of the sleep mode from the sleep state, the method controls the application in the secondary management and control list to enter a second management and control state of secondary freezing, further includes:
s33, after the application subjected to the secondary freezing operation is subjected to secondary freezing, determining that the application is in the second control state;
and S34, recording the application in the second control state through the secondary control list.
Optionally, in this embodiment, for an application that fails to be secondarily frozen, the application is removed or marked in the secondary management list.
Optionally, in this embodiment, during the second freezing process after the second freezing is performed, the second freezing operation is not performed on the removed or marked application.
The embodiment has the advantages that the application is determined to be in the second management and control state after the application which is subjected to the secondary freezing operation is secondarily frozen; recording the application in the second management and control state through the secondary management and control list. The method and the device realize a more efficient configuration scheme for secondary management and control of the memory, and implement further secondary management and control by combining with a sleep mode operation mechanism on the basis of the existing memory management and control, thereby greatly reducing power consumption, saving the memory, improving cruising ability and enhancing the use experience of users.
EXAMPLE seven
Fig. 8 is a flowchart of a seventh embodiment of the configuration method for controlling secondary memory management of the present invention, where based on the above embodiments, when the application in the second management and control state receives a defrosting request, the performing cross-process communication with the secondary freezing through the application and restarting to recover the process information of the secondary freezing includes:
s41, when the unfreezing request of the application is received, performing cross-process communication with the secondarily controlled control process through a related process of the application to restart and recover the control process;
s42, refreshing the process information of the control process so as to convert the freezing of the application into unfreezing of the application.
Optionally, in this embodiment, within a period of use of the device, the application that is frozen twice is actively thawed more than a preset number of times, and is removed or marked in the secondary management and control list; and in the process of secondary freezing after the next primary freezing, the secondary freezing operation is not performed on the removed or marked application.
Optionally, in this embodiment, in the current sleep mode of the device, removing or marking an application that has been actively defrosted for one time from among applications that have been frozen for two times in the secondary management and control list; in the next continuous sleep mode, the second freeze operation is no longer performed on the removed or marked application.
The method has the advantages that when the unfreezing request of the application is received, cross-process communication is carried out between the related process of the application and the control process of the secondary control, so that the control process is restarted and recovered; and refreshing the process information of the control process so as to convert the application from freezing to unfreezing. The method and the device realize a more efficient configuration scheme for secondary management and control of the memory, and implement further secondary management and control by combining with an operation mechanism of a sleep mode on the basis of the existing memory management and control, thereby greatly reducing power consumption, saving the memory, improving cruising ability and enhancing the use experience of users.
Example eight
Fig. 9 is a flowchart of an eighth embodiment of the configuration method for secondary memory management and control according to the present invention, where based on the above embodiments, when the application in the second management and control state receives a defrosting request, the application performs cross-process communication with the secondary freezing and restarts to recover process information of the secondary freezing, and the method further includes:
s43, when the equipment exits the sleep mode, emptying the secondary management and control list;
and S44, controlling the applications in the secondary management and control list to be converted from freezing to unfreezing.
Optionally, in this embodiment, when the device exits the sleep mode, a time length of the refreezing of the application that has been performed with refreezing, a number of times that the application that has been performed with refreezing is actively defrosted, and an application that fails to perform refreezing are recorded.
Optionally, in this embodiment, after the application in the secondary management and control list is controlled to be converted from freezing to thawing, when the device enters a next sleep mode, the process killing process is directly performed on the application that has been subjected to the secondary freezing and has a time length exceeding a preset time length and is not actively thawed.
The method has the advantages that when the equipment exits the sleep mode, the secondary management and control list is emptied; and controlling the application in the secondary management and control list to be converted from freezing to unfreezing. The method and the device realize a more efficient configuration scheme for secondary management and control of the memory, and implement further secondary management and control by combining with an operation mechanism of a sleep mode on the basis of the existing memory management and control, thereby greatly reducing power consumption, saving the memory, improving cruising ability and enhancing the use experience of users.
Example nine
Based on the foregoing embodiments, the present invention further provides a memory secondary management and control configuration device, which includes a memory, a processor, and a computer program stored on the memory and executable on the processor, where the computer program, when executed by the processor, implements the steps of the memory secondary management and control configuration method according to any one of the foregoing embodiments.
It should be noted that the device embodiment and the method embodiment belong to the same concept, and specific implementation processes thereof are detailed in the method embodiment, and technical features in the method embodiment are correspondingly applicable in the device embodiment, which is not described herein again.
Example ten
Based on the foregoing embodiment, the present invention further provides a computer-readable storage medium, where a memory secondary management and control configuration program is stored on the computer-readable storage medium, and when the memory secondary management and control configuration program is executed by a processor, the steps of the memory secondary management and control configuration method described in any one of the foregoing embodiments are implemented.
It should be noted that the media embodiment and the method embodiment belong to the same concept, and specific implementation processes thereof are detailed in the method embodiment, and technical features in the method embodiment are correspondingly applicable in the media embodiment, which is not described herein again.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one of 8230, and" comprising 8230does not exclude the presence of additional like elements in a process, method, article, or apparatus comprising the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the description of the foregoing embodiments, it is clear to those skilled in the art that the method of the foregoing embodiments may be implemented by software plus a necessary general hardware platform, and certainly may also be implemented by hardware, but in many cases, the former is a better implementation. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
While the present invention has been described with reference to the embodiments shown in the drawings, the present invention is not limited to the embodiments, which are illustrative and not restrictive, and it will be apparent to those skilled in the art that various changes and modifications can be made therein without departing from the spirit and scope of the invention as defined in the appended claims.

Claims (10)

1. A memory secondary management and control configuration method is characterized by comprising the following steps:
when the device is identified to enter a sleep state of a preset sleep mode, judging whether the application of the device is in a first frozen control state corresponding to the sleep mode;
adding the application in the first control state to a preset secondary control list;
when the device enters a maintenance state of the sleep mode from the sleep state, controlling the application in the secondary control list to enter a secondary frozen second control state;
and when the application in the second control state receives a unfreezing request, performing cross-process communication with the secondary freezing through the application and restarting to recover the process information of the secondary freezing.
2. The method according to claim 1, wherein the determining whether the application of the device is in a first control state of one freezing corresponding to a preset sleep mode when recognizing that the device enters the sleep state of the preset sleep mode includes:
when the equipment enters the sleep mode, detecting whether the application accords with a primary control strategy corresponding to the sleep state;
when the device enters the sleep state, controlling the application conforming to the primary management and control strategy to enter the first management and control state, and executing the primary freezing operation of the application.
3. The method according to claim 2, wherein the adding the application already in the first management and control state to a preset secondary management and control list includes:
creating a secondary management and control strategy corresponding to the secondary freezing;
monitoring the application executing the primary freeze, and detecting whether the application conforms to the secondary management and control policy.
4. The method according to claim 3, wherein the adding the application that is already in the first management and control state to a preset secondary management and control list further includes:
creating the secondary management and control list;
when the application is determined to accord with the secondary management and control strategy, the application is added to the secondary management and control list.
5. The method according to claim 4, wherein the controlling the application in the secondary management and control list to enter a second management and control state of secondary freezing when the device enters the maintenance state of the sleep mode from the sleep state comprises:
when the equipment enters a maintenance state of the sleep mode from the sleep state, detecting a unfreezing state of the application in the secondary management and control list;
when the application of the secondary control list is converted from freezing to unfreezing, the secondary freezing operation is performed on the unfrozen application.
6. The method according to claim 5, wherein when the device enters the maintenance state of the sleep mode from the sleep state, the method controls the application in the secondary management list to enter a second management state of secondary freezing, and further includes:
determining that the application is in the second management state after the application subjected to the operation of performing the secondary freezing is secondarily frozen;
recording the application in the second management and control state through the secondary management and control list.
7. The memory secondary management and control configuration method according to claim 6, wherein when the application in the second management and control state receives a unfreezing request, performing cross-process communication with the secondary freezing through the application and restarting recovery of the process information of the secondary freezing includes:
when the unfreezing request of the application is received, cross-process communication is carried out between the related process of the application and the control process of the secondary control, so that the control process is restarted and recovered;
and refreshing the process information of the control process so as to convert the application from freezing to unfreezing.
8. The memory secondary management and control configuration method according to claim 7, wherein when the application in the second management and control state receives a unfreezing request, the application performs cross-process communication with the secondary freezing and restarts to restore process information of the secondary freezing, further comprising:
when the equipment exits the sleep mode, emptying the secondary management and control list;
and controlling the applications in the secondary management and control list to be converted from freezing to unfreezing.
9. A memory secondary management and control configuration device, characterized in that the device comprises a storage, a processor and a computer program stored on the storage and capable of running on the processor, wherein the computer program, when executed by the processor, implements the steps of the memory secondary management and control configuration method according to any one of claims 1 to 8.
10. A computer-readable storage medium, wherein a memory secondary management and control configuration program is stored on the computer-readable storage medium, and when executed by a processor, the memory secondary management and control configuration program implements the steps of the memory secondary management and control configuration method according to any one of claims 1 to 8.
CN202211162720.9A 2022-09-23 2022-09-23 Memory secondary management and control configuration method and device and computer readable storage medium Pending CN115495240A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211162720.9A CN115495240A (en) 2022-09-23 2022-09-23 Memory secondary management and control configuration method and device and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211162720.9A CN115495240A (en) 2022-09-23 2022-09-23 Memory secondary management and control configuration method and device and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN115495240A true CN115495240A (en) 2022-12-20

Family

ID=84470573

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211162720.9A Pending CN115495240A (en) 2022-09-23 2022-09-23 Memory secondary management and control configuration method and device and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN115495240A (en)

Similar Documents

Publication Publication Date Title
CN107734614B (en) Wi-Fi antenna control method, mobile terminal and computer readable storage medium
CN109509473B (en) Voice control method and terminal equipment
CN107196363B (en) Method for adjusting charging current, terminal and computer readable storage medium
CN108712566B (en) Voice assistant awakening method and mobile terminal
CN112533232B (en) Method for determining energy-saving signal monitoring time, configuration method and related equipment
CN109413726B (en) Power consumption control method and mobile terminal
CN108073458B (en) Memory recovery method, mobile terminal and computer-readable storage medium
CN108322599B (en) Network access method and mobile terminal
CN109901695B (en) Screen power-saving display method, mobile terminal and computer-readable storage medium
CN110569119B (en) Background application program management method and terminal
CN109195191B (en) Cell reselection control method and terminal
CN110677897B (en) Network search control method, terminal and computer readable storage medium
CN108089935B (en) Application program management method and mobile terminal
CN112437476A (en) Network switching control method and device, intelligent terminal and readable storage medium
CN109947617B (en) Method, terminal and readable storage medium for monitoring display content of application interface
CN109151201B (en) Anti-addiction method, mobile terminal and computer storage medium
CN108170360B (en) Control method of gesture function and mobile terminal
CN107770811B (en) Data processing method, mobile terminal and computer readable storage medium
CN114064179A (en) Display mode adaptation method, terminal and storage medium
CN115495240A (en) Memory secondary management and control configuration method and device and computer readable storage medium
CN108681467B (en) System awakening method and terminal
CN112416600A (en) Memory control method and device, mobile terminal and storage medium
CN107864294B (en) Do not disturb mode starting method and mobile terminal
CN107193477B (en) Alarm clock misoperation prevention method, mobile terminal and computer readable medium
CN115134459B (en) Eye protection mode display control method, equipment and computer readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination