CN112506629B - System scheduling optimization method, terminal and computer readable storage medium - Google Patents

System scheduling optimization method, terminal and computer readable storage medium Download PDF

Info

Publication number
CN112506629B
CN112506629B CN202011355807.9A CN202011355807A CN112506629B CN 112506629 B CN112506629 B CN 112506629B CN 202011355807 A CN202011355807 A CN 202011355807A CN 112506629 B CN112506629 B CN 112506629B
Authority
CN
China
Prior art keywords
running state
application program
target
running
target application
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.)
Active
Application number
CN202011355807.9A
Other languages
Chinese (zh)
Other versions
CN112506629A (en
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 CN202011355807.9A priority Critical patent/CN112506629B/en
Publication of CN112506629A publication Critical patent/CN112506629A/en
Application granted granted Critical
Publication of CN112506629B publication Critical patent/CN112506629B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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/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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0487Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser
    • G06F3/0488Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The embodiment of the invention provides a system scheduling optimization method, a terminal and a computer readable storage medium, wherein the system scheduling optimization method comprises the following steps: acquiring target running state information of a running target application program, and judging whether the target application program is in a foreground running state or not; if yes, judging whether the target running state information is true according to a preset recognition rule; and if not, changing the running state in the target running state information. The running state of the running application program is acquired, the application program in the foreground running state is determined, the authenticity of the running state is judged for the application program in the foreground running according to the preset identification rule, the judgment result is not real-time, the running state of the application program is changed, and the problem of system resource waste caused by the fact that the application program is actually in the background running but marked as the foreground running is avoided by the method of secondarily judging and forcedly changing the running state.

Description

System scheduling optimization method, terminal and computer readable storage medium
Technical Field
The present invention relates to the field of terminal system scheduling technologies, and in particular, to a system scheduling optimization method, a terminal, and a computer readable storage medium.
Background
The state of the application program in the system is divided into a foreground operation state and a background operation state, wherein the foreground operation state is that the application program is operated on the current display interface of the system, the user needs to interact with the application program, and at the moment, the system resource can preferentially ensure the operation of the foreground application program; when the user switches the running program, the application program which runs before is generally in a background running state, and the application program is in a suspended state most of the time, so that only very limited resources can be allocated to the application program which runs in the background to maintain the running of the application program, and the power consumption of the background is reduced.
Taking an Android system as an example, the CPU use authority of a foreground process and a background process is managed and controlled by a CPU set machine of linux on the Android system at present, all CPU core operations (CPU 0-CPU7,8 core operations) can be used by an application process marked as the foreground operation on the system level at present, and only two small core operations (CPU 0 and CPU 1) can be used by the application process marked as the background operation;
however, when some applications on the Android system are logged back to the background, some foreground services are registered or the Android system can be identified as a foreground process after broadcasting, and all CPU cores can be used, so that crazy preemption of CPU resources of the applications running on the current foreground interface occurs in some cases, and the problems of blocking and slow running of the applications displayed on the foreground occur because enough CPU resources cannot be acquired for running are caused.
Disclosure of Invention
The invention aims to solve the technical problem that the current application program can also mark the system as a foreground running state by some means when the application program is in a background running state, so that system resources are wasted.
In order to solve the technical problems, the invention provides a system scheduling optimization method, which comprises the following steps:
acquiring target running state information of a running target application program, and judging whether the target application program is in a foreground running state or not;
if yes, judging whether the target running state information is true or not according to a preset identification rule;
and if not, changing the running state in the target running state information.
Optionally, before the obtaining the target running state information of the running target application program, the method further includes:
judging whether the system scheduling optimization triggering condition is met, and starting to acquire the target running state information of the running target application program when the triggering condition is met.
Optionally, obtaining the target running state information of the running target application program includes:
acquiring target application program information of the target application program, and determining the running state of the self mark of the target application program;
acquiring the running state marked by the system on the target application program information;
and determining the target running state information of the target application program according to the running state of the self mark and the running state of the system mark.
Optionally, when the running state marked by the target application program is a background running state, or when the running state marked by the system on the target application program information is a background running state, the target running state information of the target application program is a background running state;
when the running state marked by the target application program is a background running state and the running state marked by the system on the target application program information is a foreground running state, the target running state information of the target application program is the foreground running state.
Optionally, the identifying whether the target running state information is real according to a preset identification rule includes:
reading interface information of a foreground interface, and identifying an application program running in the foreground from the interface information;
judging whether the target application is included or not from the identification result, and if yes, judging that the target running state information is true.
Optionally, the identifying whether the target running state information is real according to a preset identification rule includes:
and identifying the interface interaction result of the target application program, wherein the target running state information is true when the interface interaction exists.
Optionally, the changing the operation state in the target operation state information includes:
and configuring an operation state field in the target operation state information of the target application program into a background operation state.
Optionally, the target application program is any running application program or all running application programs.
Further, the present invention also provides a terminal, which includes: a processor, a memory, and a communication bus;
the communication bus is used for realizing connection communication between the processor and the memory;
the processor is configured to execute one or more programs stored in the memory, so as to implement the steps of the system scheduling optimization method according to the embodiment of the present invention.
Further, the present invention also provides a computer readable storage medium storing one or more programs, where the one or more programs are executable by one or more processors to implement the steps of the system scheduling optimization method according to the embodiments of the present invention.
Advantageous effects
The embodiment of the invention provides a system scheduling optimization method, a terminal and a computer readable storage medium, wherein the system scheduling optimization method comprises the following steps: acquiring target running state information of a running target application program, and judging whether the target application program is in a foreground running state or not; if yes, judging whether the target running state information is true according to a preset recognition rule; and if not, changing the running state in the target running state information. The running state of the running application program is acquired, the application program in the foreground running state is determined, the authenticity of the running state is judged for the application program in the foreground running according to the preset identification rule, the judgment result is not real-time, the running state of the application program is changed, and the problem of system resource waste caused by the fact that the application program is actually in the background running but marked as the foreground running is avoided by the method of secondarily judging and forcedly changing the running state.
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 architecture of an alternative mobile terminal for implementing various embodiments of the present invention.
FIG. 2 is a basic flowchart of a system scheduling optimization method according to a first embodiment of the present invention;
fig. 3 is a schematic diagram of a refinement flow of a system scheduling optimization method according to a second embodiment of the present invention;
fig. 4 is a schematic structural diagram of a terminal according to a third embodiment of the present invention.
Detailed Description
It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
In the following description, suffixes such as "module", "component", or "unit" for representing elements are used only for facilitating the description of the present invention, and have no specific meaning per se. Thus, "module," "component," or "unit" may be used in combination.
The terminal may be implemented in various forms. For example, the terminals described in the present invention may include mobile terminals such as cell phones, tablet computers, notebook computers, palm computers, personal digital assistants (Personal Digital Assistant, PDA), portable media players (Portable Media Player, PMP), navigation devices, wearable devices, smart bracelets, pedometers, and fixed terminals such as digital TVs, desktop computers, and the like.
The following description will be given taking a mobile terminal as an example, and those skilled in the art will understand that the configuration according to the embodiment of the present invention can be applied to a fixed type terminal in addition to elements particularly used for a moving purpose.
Referring to fig. 1, which is a schematic diagram of a 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. Those skilled in the art will appreciate that the mobile terminal structure shown in fig. 1 is not limiting of the mobile terminal and that the mobile terminal may include more or fewer components than shown, or may combine certain components, or a different arrangement of components.
The following describes the components of the mobile terminal in detail with reference to fig. 1:
the radio frequency unit 101 may be used for receiving and transmitting signals during the information receiving or communication process, specifically, after receiving downlink information of the base station, processing the downlink information by the processor 110; and, the uplink data is transmitted 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, a duplexer, and the like. In addition, the radio frequency unit 101 may also communicate with networks and other devices via wireless communications. The wireless communication may use any communication standard or protocol, including but not limited to GSM (Global System of Mobile communication, global System for Mobile communications), GPRS (General Packet Radio Service ), CDMA2000 (Code Division Multiple Access, CDMA 2000), WCDMA (Wideband Code Division Multiple Access ), TD-SCDMA (Time Division-Synchronous Code Division Multiple Access, time Division synchronous code Division multiple Access), FDD-LTE (Frequency Division Duplexing-Long Term Evolution, frequency Division Duplex Long term evolution), and TDD-LTE (Time Division Duplexing-Long Term Evolution, time Division Duplex Long term evolution), etc.
WiFi belongs to a short-distance wireless transmission technology, and a mobile terminal can help a user to send and receive e-mails, browse web pages, access streaming media and the like through the WiFi module 102, so that wireless broadband Internet access is provided for the user. Although fig. 1 shows a WiFi module 102, it is understood that it does not belong to the necessary constitution of a mobile terminal, and can be omitted entirely as required within a range that does not change 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 talk 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 (e.g., a call signal reception sound, a message reception sound, etc.) related to a specific function performed by the mobile terminal 100. The audio output unit 103 may include a speaker, a buzzer, and the like.
The a/V input unit 104 is used to receive an audio or video signal. The a/V input unit 104 may include a graphics processor (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 graphics 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 can receive sound (audio data) via the microphone 1042 in a phone call mode, a recording mode, a voice recognition mode, and the like, and can process such sound into audio data. The processed audio (voice) data may be converted into a format output that can be transmitted to the mobile communication base station via the radio frequency unit 101 in the case of a telephone 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 the audio signal.
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, wherein the ambient light sensor can adjust the brightness of the display panel 1061 according to the brightness of ambient light, and the proximity sensor can turn off the display panel 1061 and/or the backlight when the mobile terminal 100 moves to the ear. As one of the motion sensors, the accelerometer sensor can detect the acceleration in all directions (generally three axes), and can detect the gravity and direction when stationary, and can be used for applications of recognizing the gesture of a mobile phone (such as horizontal and vertical screen switching, related games, magnetometer gesture calibration), vibration recognition related functions (such as pedometer and knocking), and the like; as for other sensors such as fingerprint sensors, pressure sensors, iris sensors, molecular sensors, gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc. that may also be configured in the mobile phone, the detailed description thereof will be omitted.
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 (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 to generate key signal inputs related to user settings and function control of the mobile terminal. In particular, 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, may collect touch operations thereon or thereabout by a user (e.g., operations of the user on the touch panel 1071 or thereabout by using any suitable object or accessory such as a finger, a stylus, etc.) 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 azimuth 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 detection device, converts it into touch point coordinates, and sends the touch point coordinates to the processor 110, and can receive and execute commands sent from the processor 110. Further, the touch panel 1071 may be implemented in various types such as resistive, capacitive, infrared, and 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, mouse, joystick, etc., as specifically not limited herein.
Further, the touch panel 1071 may overlay the display panel 1061, and when the touch panel 1071 detects a touch operation thereon or thereabout, the touch panel 1071 is transferred to the processor 110 to determine the type of touch event, and then the processor 110 provides a corresponding visual output on the display panel 1061 according to the type of touch event. Although in fig. 1, the touch panel 1071 and the display panel 1061 are two independent components for implementing the input and output functions of the mobile terminal, in some embodiments, the touch panel 1071 may be integrated with the display panel 1061 to implement the input and output functions of the mobile terminal, which is not limited herein.
The interface unit 108 serves as an interface through which at least one external device can be connected with the mobile terminal 100. For example, the external devices may include a wired or wireless headset port, an external power (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 an external device 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 an external device.
Memory 109 may be used to store software programs as well as various data. The memory 109 may mainly include a storage program area that may store an operating system, application programs required for at least one function (such as a sound playing function, an image playing function, etc.), and a storage data area; the storage data area may store data (such as audio data, phonebook, etc.) created according to the use of the handset, etc. In addition, 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 running 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 that primarily handles operating systems, user interfaces, applications, etc., with a modem processor that primarily 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 source 111 (e.g., a battery) for supplying power to the respective components, and preferably, the power source 111 may be logically connected to the processor 110 through a power management system, so as to perform functions of managing charging, discharging, and power consumption management through the power management system.
Although not shown in fig. 1, the mobile terminal 100 may further include a bluetooth module or the like, which is not described herein.
Based on the above mobile terminal hardware structure, various embodiments of the method of the present invention are provided.
First embodiment
In order to identify an application program that is actually in a background running state but is marked as a foreground running state, the embodiment provides a system scheduling optimization method, which includes: acquiring target running state information of a running target application program, and judging whether the target application program is in a foreground running state or not; if yes, judging whether the target running state information is true or not according to a preset identification rule; and if not, changing the running state in the target running state information.
Fig. 2 is a basic flowchart of a system scheduling optimization method provided in this embodiment, where the system scheduling optimization method includes:
s201, acquiring target running state information of a running target application program.
Information of the application program in the running state can be obtained from a running list of the system, and the running state of the application program can be identified from the running application program. Information of the application in the running state may also be obtained from other paths, which is not limited herein.
S202, judging whether the target application program is in a foreground running state or not.
After the target running state information of the running target application program is obtained in the step S201, the running state of the target application program, that is, whether the running state is in the foreground running or the background running, can be determined according to the target running state information.
And S203, when the target application program is in the foreground running state, judging whether the target running state information is real or not according to a preset identification rule.
When the target application program is judged to be in the background running state, the system scheduling optimization is not required to be executed on the target running program, and the target application program is run according to the current running rule.
When the target application program is judged to be in the foreground running state, whether the application is actually in the foreground running or the background running is marked as the foreground running can be determined according to a preset identification rule. The preset recognition rule is a judging method preset by the system and used for judging whether the application program is really in a foreground running state.
S204, changing the running state in the target running state information.
When the running state of the target application program in the foreground is judged and determined to be real-time, the system scheduling optimization is not required to be executed on the target running program, and the target application program is run according to the current running rule.
When the running state of the target application program in the foreground is judged to be unreal, namely the target application is actually in the background running, the running state of the target application program is modified into the background running state.
In other embodiments, the acquiring the target running state information of the running target application program further includes: judging whether the system scheduling optimization triggering condition is met, and starting to acquire the target running state information of the running target application program when the triggering condition is met.
In order to avoid frequent triggering of the system scheduling optimization method and influence on the operation efficiency, a system scheduling optimization triggering condition needs to be set, and the system scheduling optimization method is executed only when the triggering condition is triggered, wherein the triggering condition comprises, but is not limited to, setting to execute the system scheduling optimization method once every a period of time, or executing the system scheduling optimization method once when the system detects that the application program is switched, or executing the system scheduling optimization method once when the operation state of the application program is detected to be changed.
In other embodiments, obtaining target operating state information for a running target application includes: acquiring target application program information of the target application program, and determining the running state of the self mark of the target application program; acquiring the running state marked by the system on the target application program information; and determining the target running state information of the target application program according to the running state of the self mark and the running state of the system mark.
The method for determining the running state of a running application program comprises the following steps: and reading the running state marks of the application program and the running state marks of the application program by the system. Therefore, in order to more comprehensively understand the actual running state of the running application program, when determining the target running state information of the target application program, the target running state information needs to be comprehensively determined according to the running state of the self-mark and the running state of the system mark.
In other embodiments, when the running state marked by the target application program is a background running state, or when the running state marked by the system on the target application program information is a background running state, the target running state information of the target application program is a background running state; when the running state marked by the target application program is a background running state and the running state marked by the system on the target application program information is a foreground running state, the target running state information of the target application program is the foreground running state.
When the target application program marks the running state of the application program as background running, the system mark is not required to be determined any more, and the running state of the self mark of the application program determines the final running state of the application program in the current running rule. Because the system has the highest authority, the system can play a decisive role in judging the application program, and when the system marks the running state of the target application program as background running, the application program can only be in the background running state. Only when the target application program marks itself as a foreground running state and the system marks the target application program as a foreground running state, the application program is considered to be in the foreground running state. When it is to be noted, the method for determining the target running state of the target application program provided above is only effective for the current rule, and the corresponding method for determining the target running state of the target application program will also be changed correspondingly with the change of the scheduling rule, but as long as the purpose is still to determine the target running state of the target application program, the method is within the protection scope of the present invention.
In other embodiments, the identifying whether the target operating state information is real according to a preset identification rule includes: reading interface information of a foreground interface, and identifying an application program running in the foreground from the interface information; judging whether the target application is included or not from the identification result, and if yes, judging that the target running state information is true.
In order to determine whether an application program with a running state of foreground running is actually in foreground running, and considering popularization of a multi-window opening function along with a system, whether a target application program is actually in foreground running state is determined by acquiring a foreground display interface and identifying a method that the application program contained in the display interface is a relatively complete and comprehensive knowledge of the application program running in the foreground.
In other embodiments, the identifying whether the target operating state information is real according to a preset identification rule includes: and identifying the interface interaction result of the target application program, wherein the target running state information is true when the interface interaction exists.
Whether the running state of the application program is actually in the foreground running state is identified, and whether the application program is actually in the foreground running state can also be determined by identifying whether interface interaction exists between the application program and the application program, namely whether a user is interacting with the application program.
In other embodiments, the modifying the operating state in the target operating state information includes: and configuring an operation state field in the target operation state information of the target application program into a background operation state.
Determining the running state of an running application may be determined by identifying the contents in the running field in the running state information of the application, and thus the running state of the application may be changed by modifying the contents in the field.
In other embodiments, the target application is any running application, or all running applications.
In this embodiment, the target application may be designated as one or all of the applications that are running. Designating one for a program can reduce the consumption of system resources by optimizing, and designating all applications as applications can avoid missing applications.
This embodiment (advantageous effect).
The embodiment provides a system scheduling optimization method, which comprises the following steps: acquiring target running state information of a running target application program, and judging whether the target application program is in a foreground running state or not; if yes, judging whether the target running state information is true according to a preset recognition rule; and if not, changing the running state in the target running state information. The running state of the running application program is acquired, the application program in the foreground running state is determined, the authenticity of the running state is judged for the application program in the foreground running according to the preset identification rule, the judgment result is not real-time, the running state of the application program is changed, and the problem of system resource waste caused by the fact that the application program is actually in the background running but marked as the foreground running is avoided by the method of secondarily judging and forcedly changing the running state.
Second embodiment
The embodiment provides a detailed flow diagram of a system scheduling optimization method, and referring to fig. 3, the steps of the system scheduling optimization method include:
s301, judging whether a system scheduling optimization triggering condition is met. If not, the process proceeds to step S302, and if yes, the process proceeds to step S303.
The triggering condition is a system preset condition, including but not limited to a preset time interval triggering, a preset application program switching triggering, a preset application program running state changing triggering and the like.
And S302, when the triggering condition is not reached, the current running state is maintained.
And S303, when the trigger condition is reached, acquiring the target running state information of the running target application program.
Information of the application program in the running state can be obtained from a running list of the system, a target application program is determined from the information, and the running state information of the target application program is obtained.
S304, judging whether the target application program is in a foreground running state. If not, the process proceeds to step S305, and if yes, the process proceeds to step S306.
After the target running state information of the running target application program is obtained in step S303, the running state of the target application program, that is, whether the running state is in the foreground running or the background running, can be determined according to the target running state information.
And S305, when the target application program is in the background running state, maintaining the current running state.
And S306, when the target application program is in the foreground running state, judging whether the target running state information is real or not according to a preset recognition rule. If not, the flow proceeds to step S307, and if yes, the flow proceeds to step S308.
When the target application program is judged to be in the foreground running state, whether the application is actually in the foreground running or the background running is marked as the foreground running can be determined according to a preset identification rule. The method can determine whether the target application program is actually in the foreground operation by identifying whether the target application program is included in the display window of the display interface, and can determine whether the target application program is actually in the foreground operation by detecting whether the target application program has interface interaction operation.
S307, the running state of the application program is not real, and the running state in the target running state information is changed.
When the current state of the target application program is not in the foreground running state, the foreground running state of the target application program is forcedly changed into the background running state by changing the content in a field of the target application program for indicating the running state.
And S308, the running state of the application program is real-time, and the current running state is kept.
Third embodiment
The present embodiment also provides a terminal, as shown in fig. 4, which includes a processor 41, a memory 42, and a communication bus 43, wherein:
the communication bus 43 is used to enable connection communication between the processor 41 and the memory 42;
the processor 41 is configured to execute one or more programs stored in the memory 42 to implement the following steps:
in this embodiment, the processor 41 is further configured to execute one or more programs stored in the memory 42 to perform the steps of a system scheduling optimization method in the first embodiment to the second embodiment of the present invention.
The embodiment of the present invention also provides a computer readable storage medium storing one or more programs executable by one or more processors to perform the steps of a system scheduling optimization method in the first embodiment to the second embodiment of the present invention.
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 … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The foregoing embodiment numbers of the present invention are merely for the purpose of description, and do not represent the advantages or disadvantages of the embodiments.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) comprising instructions for causing a terminal (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to perform the method according to the embodiments of the present invention.
The embodiments of the present invention have been described above with reference to the accompanying drawings, but the present invention is not limited to the above-described embodiments, which are merely illustrative and not restrictive, and many forms may be made by those having ordinary skill in the art without departing from the spirit of the present invention and the scope of the claims, which are to be protected by the present invention.

Claims (10)

1. The system scheduling optimization method is characterized by comprising the following steps of:
acquiring target running state information of a running target application program, and judging whether the target application program is in a foreground running state or not; comprising the following steps: acquiring information of an application program in a running state from a running list of a system, identifying target running state information of the target application program from the running application program, and determining the running state of the target application program according to the target running state information;
if yes, judging whether the target running state information is true or not according to a preset identification rule; changing the running state in the target running state information in real time;
if not, the system scheduling optimization is not required to be executed on the target application program.
2. The system scheduling optimization method of claim 1, wherein the acquiring the target running state information of the running target application further comprises:
judging whether the system scheduling optimization triggering condition is met, and starting to acquire the target running state information of the running target application program when the triggering condition is met.
3. The system scheduling optimization method of claim 1, wherein obtaining the target running state information of the running target application program comprises:
acquiring target application program information of the target application program, and determining the running state of the self mark of the target application program;
acquiring the running state marked by the system on the target application program information;
and determining the target running state information of the target application program according to the running state of the self mark and the running state of the system mark.
4. The system scheduling optimization method of claim 3, wherein when the running state marked by the target application is a background running state, or when the running state marked by the system to the target application information is a background running state, the target running state information of the target application is a background running state;
when the running state marked by the target application program is a background running state and the running state marked by the system on the target application program information is a foreground running state, the target running state information of the target application program is the foreground running state.
5. The system scheduling optimization method of claim 1, wherein the identifying whether the target operation state information is real according to a preset identification rule comprises:
reading interface information of a foreground interface, and identifying an application program running in the foreground from the interface information;
judging whether the target application is included or not from the identification result, and if yes, judging that the target running state information is true.
6. The system scheduling optimization method of claim 1, wherein the identifying whether the target operation state information is real according to a preset identification rule comprises:
and identifying the interface interaction result of the target application program, wherein the target running state information is true when the interface interaction exists.
7. The system scheduling optimization method of claim 1, wherein said changing the operating state in the target operating state information comprises:
and configuring an operation state field in the target operation state information of the target application program into a background operation state.
8. The system scheduling optimization method of any one of claims 1-7, wherein the target application is any running application or all running applications.
9. A terminal, the terminal comprising: a processor, a memory, and a communication bus;
the communication bus is used for realizing connection communication between the processor and the memory;
the processor is configured to execute one or more programs stored in the memory to implement the steps of the system scheduling optimization method of any one of claims 1 to 8.
10. A computer readable storage medium storing one or more programs executable by one or more processors to implement the steps of the system scheduling optimization method of any one of claims 1-8.
CN202011355807.9A 2020-11-27 2020-11-27 System scheduling optimization method, terminal and computer readable storage medium Active CN112506629B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011355807.9A CN112506629B (en) 2020-11-27 2020-11-27 System scheduling optimization method, terminal and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011355807.9A CN112506629B (en) 2020-11-27 2020-11-27 System scheduling optimization method, terminal and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN112506629A CN112506629A (en) 2021-03-16
CN112506629B true CN112506629B (en) 2023-08-22

Family

ID=74966748

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011355807.9A Active CN112506629B (en) 2020-11-27 2020-11-27 System scheduling optimization method, terminal and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN112506629B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106662907A (en) * 2015-10-29 2017-05-10 华为技术有限公司 Terminal based wake-up lock control method, device and terminal
CN107436801A (en) * 2017-06-23 2017-12-05 努比亚技术有限公司 I/O resource regulating methods, terminal and computer-readable recording medium
CN107807847A (en) * 2016-09-09 2018-03-16 华为技术有限公司 The management method and terminal device of application process
CN107957906A (en) * 2017-12-20 2018-04-24 珠海全志科技股份有限公司 Application management method, computer installation, the computer-readable recording medium of terminal device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107580143B (en) * 2017-09-30 2019-03-01 维沃移动通信有限公司 A kind of display methods and mobile terminal

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106662907A (en) * 2015-10-29 2017-05-10 华为技术有限公司 Terminal based wake-up lock control method, device and terminal
CN107807847A (en) * 2016-09-09 2018-03-16 华为技术有限公司 The management method and terminal device of application process
CN107436801A (en) * 2017-06-23 2017-12-05 努比亚技术有限公司 I/O resource regulating methods, terminal and computer-readable recording medium
CN107957906A (en) * 2017-12-20 2018-04-24 珠海全志科技股份有限公司 Application management method, computer installation, the computer-readable recording medium of terminal device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
Android O 后台startService限制简析;看书的小蜗牛,;《https://www.jianshu.com/p/f2db0f58d47f》;20190604;1-12 *

Also Published As

Publication number Publication date
CN112506629A (en) 2021-03-16

Similar Documents

Publication Publication Date Title
CN110752980B (en) Message sending method and electronic equipment
EP3719612A1 (en) Processing method for reducing power consumption and mobile terminal
CN109379484B (en) Information processing method and terminal
CN110062105B (en) Interface display method and terminal equipment
CN108196947B (en) Application running state control method and mobile terminal
WO2019080775A1 (en) Notification message prompting method and mobile terminal
CN109085968B (en) Screen capturing method and terminal equipment
CN108322599B (en) Network access method and mobile terminal
CN108073458B (en) Memory recovery method, mobile terminal and computer-readable storage medium
CN107613095B (en) Incoming call processing method and mobile terminal
CN111163224B (en) Voice message playing method and electronic equipment
CN113163460A (en) Service processing method, terminal and network equipment
CN109062634B (en) Application starting method and mobile terminal
CN108958936B (en) Application program switching method, mobile terminal and computer readable storage medium
CN111158815B (en) Dynamic wallpaper blurring method, terminal and computer readable storage medium
CN109992192B (en) Interface display method and terminal equipment
CN110012151B (en) Information display method and terminal equipment
CN110597437A (en) Screen capturing method and terminal equipment
CN108089935B (en) Application program management method and mobile terminal
CN109947617B (en) Method, terminal and readable storage medium for monitoring display content of application interface
CN109743469B (en) VOLTE-based communication method and mobile terminal
CN109857305B (en) Input response method and mobile terminal
CN108170362B (en) Application running state control method and mobile terminal
CN107562305B (en) Method for setting dynamic icon, terminal and computer readable storage medium
CN111459323B (en) Control method, electronic device and 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
GR01 Patent grant
GR01 Patent grant