CN110187753B - Application program control method, device, terminal and computer readable storage medium - Google Patents

Application program control method, device, terminal and computer readable storage medium Download PDF

Info

Publication number
CN110187753B
CN110187753B CN201910448906.2A CN201910448906A CN110187753B CN 110187753 B CN110187753 B CN 110187753B CN 201910448906 A CN201910448906 A CN 201910448906A CN 110187753 B CN110187753 B CN 110187753B
Authority
CN
China
Prior art keywords
application program
state
target application
target
running
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
CN201910448906.2A
Other languages
Chinese (zh)
Other versions
CN110187753A (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.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp 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 Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201910448906.2A priority Critical patent/CN110187753B/en
Publication of CN110187753A publication Critical patent/CN110187753A/en
Application granted granted Critical
Publication of CN110187753B publication Critical patent/CN110187753B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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/3206Monitoring of events, devices or parameters that trigger a change in power modality
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)
  • Telephone Function (AREA)

Abstract

The application relates to the technical field of terminals, and discloses an application program control method, which comprises the following steps: acquiring the running state of a target application program and a running parameter value in the running state; inquiring a preset state and threshold mapping table to obtain a target threshold corresponding to the running state of the target application program; adjusting the target application upon detecting that the operating parameter value reaches the target threshold. The application also discloses an application program control device, a terminal and a computer readable storage medium. According to the method and the device, the target threshold corresponding to the running state is determined according to the running state of the target application program, and when the running parameter of the target application program exceeds the target threshold, the endurance time of the terminal battery is prolonged by adjusting the target application program.

Description

Application program control method, device, terminal and computer readable storage medium
Technical Field
The present application relates to the field of terminal technologies, and in particular, to an application control method, an application control device, a terminal, and a computer-readable storage medium.
Background
With the continuous development of mobile communication and electronic technology, terminals are becoming indispensable tools in people's lives. Under the premise that the battery performance of the terminal is not changed, the terminal is usually set in a power saving mode, and the brightness of a display screen of the terminal is reduced to prolong the endurance time of the terminal.
Disclosure of Invention
The application mainly aims to provide an application program control method, an application program control device, a terminal and a computer readable storage medium, and aims to solve the technical problem that the battery endurance time of the terminal cannot be prolonged according to the actual use condition of each application program at present.
In order to achieve the above object, the present application provides an application control method, including the steps of:
acquiring the running state of a target application program and a running parameter value in the running state;
inquiring a preset state and threshold mapping table to obtain a target threshold corresponding to the running state of the target application program;
adjusting the target application upon detecting that the operating parameter value reaches the target threshold.
Optionally, the step of adjusting the target application when it is detected that the running parameter value reaches the target threshold includes:
when the running parameter value is detected to reach the target threshold value, if the running state is a foreground state, judging whether an operation instruction for the target application program is received within a first preset time period in the past;
and if the operation instruction of the target application program is not received within the first preset time in the past, switching the target application program from a foreground state to a background state.
Optionally, after the step of switching the target application program from the foreground state to the background state if the operation instruction for the target application program is not received within the first preset time period in the past, the method includes:
when the target application program is detected to be switched to a background state, acquiring an operation parameter value corresponding to the background state;
inquiring the mapping table of the preset state and the threshold value to obtain a target threshold value corresponding to the background state of the target application program;
and closing the target application program when the running parameter value is detected to reach the target threshold value corresponding to the background state.
Optionally, the step of switching the target application program from a foreground state to a background state if the operation instruction for the target application program is not received within a first preset time period in the past, includes:
if the operation instruction of the target application program is not received within the first preset time in the past, outputting state switching prompt information;
and receiving a state switching instruction input based on the state switching prompt information, executing the state switching instruction, and switching the target application program from a foreground state to a background state.
Optionally, after the step of determining whether an operation instruction for the target application program is received within a first preset time period in the past if the operation state is a foreground state when it is detected that the operation parameter value reaches the target threshold value, the method includes:
if the operation instruction of the target application program is received within the past first preset time, reducing the volume of the target application program, reducing the display brightness of the target application program, reducing the resolution of the target application program and/or reducing the contrast of the target application program.
Optionally, the step of adjusting the target application when it is detected that the running parameter value reaches the target threshold includes:
when the running parameter value is detected to reach the target threshold value, if the running state is a background state, judging whether the target application program has a task in execution;
and if the target application program does not have the task in execution, closing the target application program.
Optionally, after the step of determining whether the target application program has a task in execution if the running state is a background state when it is detected that the running parameter value reaches the target threshold, the method includes:
and if the target application program has the task in execution, closing the task in execution of the target application program.
Optionally, the step of obtaining the running state of the target application program and the running parameter value in the running state includes:
acquiring the running state of a target application program, and judging whether the target application program has the operation authority;
and if the operation authority of the target application program is possessed, acquiring an operation parameter value of the target application program in the operation state.
Optionally, before the step of obtaining the operating state of the target application program and the operating parameter value in the operating state, the method includes:
acquiring residual electric quantity;
and if the residual electric quantity is less than the preset electric quantity, executing the step of acquiring the running state of the target application program and the running parameter value in the running state.
Optionally, before the step of obtaining the operating state of the target application program and the operating parameter value in the operating state, the method includes:
acquiring the power consumption rate within the second preset time in the past;
and if the power consumption rate is greater than the preset power consumption rate, executing the step of acquiring the running state of the target application program and the running parameter value in the running state.
Optionally, after the step of adjusting the running state of the application program when it is detected that the running parameter value reaches the target threshold, the method includes:
if the adjusted target application program is in a closed state, updating the running parameter value of the target application program when the target application program is detected to be started;
and if the adjusted target application program is not in a closed state, updating the running state of the target application program.
In order to achieve the above object, the present application also provides an application control device including:
the state parameter acquisition module is used for acquiring the running state of the target application program and the running parameter value in the running state;
the threshold query module is used for querying a preset state and threshold mapping table and acquiring a target threshold corresponding to the running state of the target application program;
and the detection adjusting module is used for adjusting the target application program when the operation parameter value is detected to reach the target threshold value.
Optionally, the detection adjustment module includes:
the first judgment submodule is used for judging whether an operation instruction for the target application program is received within a first preset time in the past or not if the operation state is a foreground state when the operation parameter value is detected to reach the target threshold value;
and the first adjusting submodule is used for switching the target application program from a foreground state to a background state if the operating instruction of the target application program is not received within a first preset time length in the past.
Optionally, the detection adjustment module includes:
the detection acquisition submodule is used for acquiring an operation parameter value corresponding to a background state when the target application program is detected to be switched to the background state;
the threshold query submodule is used for querying the preset state and threshold mapping table and acquiring a target threshold corresponding to the background state of the target application program;
and the detection closing submodule is used for closing the target application program when the running parameter value is detected to reach the target threshold value corresponding to the background state.
Optionally, the first adjusting submodule includes:
the prompt output unit is used for outputting state switching prompt information if the operation instruction of the target application program is not received within the past first preset time length;
and the receiving switching unit is used for receiving a state switching instruction input based on the state switching prompt information, executing the state switching instruction and switching the target application program from a foreground state to a background state.
Optionally, the detection adjustment module includes:
and the second adjusting submodule is used for reducing the volume of the target application program, reducing the display brightness of the target application program, reducing the resolution of the target application program and/or reducing the contrast of the target application program if the operation instruction of the target application program is received within the past first preset time.
Optionally, the detection adjusting module includes:
the second judgment submodule is used for judging whether the target application program has a task in execution or not if the running state is a background state when the running parameter value is detected to reach the target threshold value;
and the program closing submodule is used for closing the target application program if the target application program does not have the task in execution.
Optionally, the detection adjusting module includes:
and the task closing submodule is used for closing the task executed by the target application program if the target application program has the task in execution.
In addition, in order to achieve the purpose, the application also provides a terminal;
the terminal includes: a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein:
the computer program realizes the steps of the application control method as described above when executed by the processor.
In addition, to achieve the above object, the present application also provides a computer storage medium;
the computer storage medium has stored thereon a computer program which, when executed by a processor, implements the steps of the application control method as described above.
In the method, the device, the terminal and the computer-readable storage medium for controlling the application program, in the embodiment, the running state of the target application program and the running parameter value in the running state are acquired; inquiring a preset state and threshold mapping table to obtain a target threshold corresponding to the running state of the target application program; adjusting the target application upon detecting that the operating parameter value reaches the target threshold. In the embodiment, the state and threshold mapping table is preset in the terminal, the terminal selects the corresponding target threshold according to the running state of the application program, and the target application program is adjusted when the target application program reaches the target threshold.
Drawings
Fig. 1 is a schematic hardware structure diagram of a terminal implementing various embodiments of the present application;
FIG. 2 is a flowchart illustrating a first embodiment of an application control method according to the present application;
fig. 3 is a functional block diagram of an embodiment of an application control device according to the present application.
The implementation, functional features and advantages of the objectives of the present application will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
As shown in fig. 1, fig. 1 is a schematic device structure diagram of a hardware operating environment according to an embodiment of the present application.
The present embodiment provides a terminal, also called an application control device, where the terminal may be formed by a separate application control device, or may be formed by combining other devices with the application control device. For example, the terminal described in the present application may include devices 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, and a wearable device.
As shown in fig. 1, the application control device may include: a processor 1001, such as a CPU, a network interface 1004, a user interface 1003, a memory 1005, a communication bus 1002. Wherein a communication bus 1002 is used to enable connective communication between these components. The user interface 1003 may include a Display screen (Display), an input unit such as a Keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface). The memory 1005 may be a high-speed RAM memory or a non-volatile memory (e.g., a magnetic disk memory). The memory 1005 may alternatively be a storage device separate from the processor 1001.
Those skilled in the art will appreciate that the configuration of the apparatus shown in fig. 1 is not intended to be limiting of the apparatus and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
As shown in fig. 1, a memory 1005, which is a kind of computer storage medium, may include therein an operating system, a network communication module, a user interface module, and an application program controlling the corresponding computer programs.
In the device shown in fig. 1, the network interface 1004 is mainly used for connecting to a backend server and performing data communication with the backend server; the user interface 1003 is mainly used for connecting a client (user side) and performing data communication with the client; and the processor 1001 may be used to call an application stored in the memory 1005 to control a corresponding computer program and perform operations in the application control method described below.
The specific embodiment of the terminal and the specific embodiment of the computer-readable storage medium of the present application are substantially the same as the embodiments of the application control method described below, and are not described herein again.
Based on the above terminal hardware structure, embodiments of the application program control method of the present application are provided.
Referring to fig. 2, a first embodiment of the present application provides an application control method including:
step S10, acquiring the running state of the target application program and the running parameter value in the running state.
In this embodiment, the terminal receives an application control instruction, where a trigger mode of the application control instruction is not limited, that is, the application control instruction may be actively triggered by a user; or the terminal can be automatically triggered when detecting that the preset application program control condition is met.
When the terminal receives an application program control instruction, the terminal acquires the running state of a target application program, wherein the number of the target application programs is not particularly limited and can be one or more; after the terminal acquires the running state of the target application program, the terminal acquires a corresponding running parameter value in the running state of the target application program; the operating parameter values include: run time, rate of power consumption, amount of network resource consumption and CPU occupancy (Central Processing Unit/Processor).
Further, step S10 in this embodiment includes:
the method comprises the steps that a terminal obtains the running state of a target application program and judges whether the terminal has the operation authority of the target application program; and if the operation authority of the target application program is possessed, acquiring an operation parameter value of the target application program in the operation state.
In addition, in the embodiment, a part of special application programs, such as software such as WeChat and mailbox, are considered, and a user needs to receive information in real time, so that the control and adjustment of the application programs are not needed, and the battery endurance time of the terminal and the user requirements are considered.
Step S20, querying a preset state and threshold mapping table, and obtaining a target threshold corresponding to the running state of the target application program.
Presetting a state and threshold mapping table in the terminal, wherein thresholds (called as adjusting critical parameter values) of various application programs in different running states are preset in the preset state and threshold mapping table; thresholds include, but are not limited to: the standard running time, the standard power consumption rate, the standard power consumption, the standard network resource consumption and the standard CPU occupancy rate, and the threshold value can be actively set by a user, namely, the user sets corresponding threshold values for different running states of the installed application program in the terminal; the preset state and threshold mapping table is shown in table 1:
Figure BDA0002074272600000071
Figure BDA0002074272600000081
TABLE 1
In addition, the threshold may also be set by the terminal itself, that is, the terminal automatically sets the threshold of the application program in combination with the remaining battery capacity, the power consumption rate of the battery, the specific use condition of the application program (for example, the running frequency and the average running time length of the application program), or other factors, specifically, the threshold in the preset state and threshold mapping table is related to the remaining terminal capacity, as shown in table 2 below:
Figure BDA0002074272600000082
TABLE 2
The terminal queries the preset state and threshold mapping table to obtain a target threshold corresponding to the running state of the target application, for example, the preset state and threshold mapping table shown in the terminal query table 2, and obtains the target threshold of the target application a, that is, the running state of the target application a is foreground running, the remaining battery capacity of the terminal is 50%, and the target threshold of the application a obtained by the terminal is standard running time 1.5 hours or standard power consumption 200 mA.
And step S30, when the operation parameter value reaches the target threshold value, adjusting the target application program.
And the terminal compares the operation parameter value of the target application program with the target threshold value, and when the operation parameter value of the target application program exceeds the target threshold value, the terminal adjusts the target application program.
In this embodiment, the operation parameter and the target threshold are the same dimensional parameter, and the operation parameter value corresponds to the target threshold, for example, if the operation parameter value is an operation time, the target threshold is a standard time; if the operation parameter value is the power consumption rate, the target threshold value is the standard power consumption rate; if the operation parameter value is power consumption in the operation process, the target threshold value is standard power consumption; and if the operation parameter value is the program CPU occupancy rate, the target threshold value is the standard CPU occupancy rate.
It is understood that in the present embodiment, one or more of the operation parameter values may exceed the corresponding target threshold, that is, the operation time of the application exceeds the standard operation time of the application, or the power consumption of the application exceeds the standard power consumption of the application; it may also be that the runtime of the application exceeds the standard runtime of the application and that the power consumption of the application exceeds the standard power consumption of the application.
In this embodiment, the adjusting the target application program by the terminal includes: the terminal adjusts the application program in the foreground state into the background state; or the terminal adjusts the application program in the background state into a closed state; or the terminal reduces the display brightness of the target application program in the foreground state, and then closes part of background execution tasks of the application program in the background state, and the like, so that the power consumption of the terminal is reduced by reducing the resource consumption of the application program in the running state.
In this embodiment, the terminal adjusts the target application program according to the running state of the target application program, so that the normal operation of the user on the target application program is not affected, and the endurance time of the terminal battery can be prolonged.
It can be understood that: after the terminal finishes adjusting the application program, the terminal updates an operation parameter value of the application program, specifically:
step a1, if the adjusted target application program is in a closed state, when the target application program is detected to be started, updating the running parameter value of the target application program;
step a2, if the adjusted target application program is not in the closed state, updating the running state of the target application program.
The terminal acquires the current state of the adjusted target application program, judges whether the adjusted target application program is in a closed state or not, and resets the running parameter value of the target application program to zero when the adjusted target application program is in the closed state; when detecting that the target application program is restarted, the terminal updates the running parameter value of the target application program; and when the adjusted target application program is not in a closed state, the terminal resets the running parameter value of the target application program to zero and carries out statistics again. In the embodiment, the terminal updates the running parameter value of the target application program in real time so as to ensure the real-time performance of the control of the application program.
Further, a second embodiment of the application control method of the present application is proposed on the basis of the first embodiment.
The present embodiment is a refinement of step S20 in the first embodiment, and a specific implementation manner of the target application program for adjusting the foreground state by the terminal is provided in the present embodiment, and includes:
step S21, when it is detected that the running parameter value reaches the target threshold, if the running state is the foreground state, determining whether an operation instruction for the target application program is received within a first preset time period in the past.
The method comprises the steps that a terminal detects that an operation parameter value reaches a target threshold value, the terminal determines that a target application program is in a foreground state, and the terminal judges whether an operation instruction for the target application program is received within first preset time (the first preset time refers to preset detection time, and the first preset time can be flexibly set according to specific conditions, such as 2 minutes); executing corresponding adjustment operation according to whether an operation instruction of the target application program is received, specifically:
step S22, if the operation instruction for the target application program is received within the past first preset time period, decreasing the volume of the target application program, decreasing the display brightness of the target application program, decreasing the resolution of the target application program, and/or decreasing the contrast of the target application program.
If the operation instruction of the target application program is received within the first preset time period in the past, the terminal outputs an adjustment prompt, the terminal receives a confirmation instruction input by a user based on the adjustment prompt, and the terminal reduces the volume of the target application program, reduces the display brightness of the target application program, reduces the resolution of the target application program and/or reduces the contrast of the target application program so as to reduce the power consumption of the target application program.
It is understood that, in this embodiment, the terminal may further adjust other parameters in the running process of the target application, for example, or limit the function of the target application, so as to prolong the endurance time of the terminal battery by reducing the power consumption of the target application.
After step S21, the method further includes:
step S23, if the operation instruction for the target application program is not received within the past first preset duration, switching the target application program from the foreground state to the background state.
Specifically, step S23 includes:
b1, if the operation instruction of the target application program is not received within the past first preset time, outputting a state switching prompt message;
and b2, receiving a state switching instruction input based on the state switching prompt information, executing the state switching instruction, and switching the target application program from a foreground state to a background state.
In the embodiment, if the operation instruction of the target application program is not received within the past first preset time, the terminal outputs the state switching prompt message; the terminal receives a state switching instruction input by a user based on the state switching prompt information, executes the state switching instruction, and switches the target application program from a foreground state to a background state so as to reduce the power consumption of the target application program and prolong the endurance time of a terminal battery.
Further, a third embodiment of the application control method of the present application is proposed on the basis of the above-described embodiments.
The present embodiment is a step after step S23 of the second embodiment, and a specific implementation manner after the terminal adjusts the target application program in the foreground state to the background state is provided in the present embodiment, and includes:
step c1, when detecting that the target application program is switched to a background state, acquiring an operation parameter value corresponding to the background state;
step c2, querying the preset state and threshold mapping table, and acquiring a target threshold corresponding to the background state of the target application program;
and c3, when the running parameter value reaches the target threshold value corresponding to the background state, closing the target application program.
The terminal switches the target application program to a background state, and updates an operation parameter value corresponding to the background state of the target application program; for example, when the running time of the xxx video software in the foreground state exceeds the standard running time by 2 hours, the terminal adjusts the xxx video software to the background state, returns the running time of the xxx video software in the foreground state to zero, and then starts to count the running time of the xxx video software in the background state. And the terminal acquires an operation parameter value corresponding to the background state of the target application program.
The terminal queries a preset state and threshold mapping table (the preset state and threshold mapping table in this embodiment is the same as that in the first embodiment, and details are not described in this embodiment), and the terminal acquires a target threshold corresponding to a background state of a target application; when detecting that the running parameter value reaches a target threshold value corresponding to the background state, the terminal closes the target application program, and in this embodiment, the terminal closes the target application program adjusted from the foreground state to the background state, so as to reduce the power consumption of the target application program and prolong the endurance time of a terminal battery; meanwhile, after the terminal adjusts the application program in the foreground state to the background state, the terminal updates the running parameter value corresponding to the application program so as to ensure the real-time performance of the terminal in controlling the target application program.
Further, a fourth embodiment of the application control method of the present application is proposed on the basis of the above-described embodiments.
The present embodiment is a refinement of step S20 in the first embodiment, and a specific implementation manner of the target application program for adjusting the background state by the terminal is provided in the present embodiment, and includes:
step S24, when it is detected that the running parameter value reaches the target threshold, if the running state is a background state, determining whether the target application program has a task in execution.
The terminal detects that the running parameter value reaches a target threshold value, the terminal determines that the target application program is in a background state, and the terminal judges whether the target application program in the background state has a task in execution or not, namely, the terminal acquires each thread corresponding to the background process of the target application program, and when the background process contains a thread task, the terminal determines that the application program has the task in execution, otherwise.
Step S25, if the target application program does not have a task in execution, closing the target application program.
When the terminal determines that the target application program does not have the task in execution, the terminal outputs a program closing prompt, and when the terminal receives a confirmation instruction input by a user based on the program closing prompt, the terminal closes the application program; if the terminal receives that the user selects to cancel based on the closing program prompt, the terminal does not close the application program; in addition, the terminal does not receive a confirmation instruction input by the user based on the close program prompt within the preset time period, and the terminal repeatedly outputs the close program prompt until the user confirms/cancels or the prompt times exceed the preset times and automatically closes.
Step S26, if the target application program has a task in execution, closing the task in execution of the target application program.
The method comprises the steps that a terminal determines that an application program has a background executive task, outputs a task closing prompt, closes the background executive task of the application program when the terminal receives a confirmation instruction input by a user based on the task closing prompt, keeps the application program running in the background, such as a xxx video program, and closes a background cache task, but the running state of the xxx video program is still in the background state; if the terminal receives that the user selects to cancel based on the task closing prompt, the terminal does not adjust the application program; in addition, when the terminal does not receive a confirmation instruction or a cancellation instruction input by the user based on the task closing prompt within a preset time period, the terminal repeatedly outputs the task closing prompt until the user confirms/cancels or the prompt times exceed the preset times and automatically closes.
In the embodiment, the terminal adjusts the application program in the background state, so that the power consumption of the terminal battery caused by long-time background running of the application program is effectively prevented, and the endurance time of the terminal battery is effectively prolonged.
Further, a fifth embodiment of the application control method of the present application is proposed on the basis of the above-described embodiments.
This embodiment is a step before step S10 in the first embodiment, and an application control method in the fifth embodiment of the present application includes:
step S40, acquiring power information of the terminal, where the power information includes a remaining power or a power consumption of a preset duration.
The terminal obtains power information, where the power information includes a remaining power or a past second preset time (the past second preset time is a preset unit time, and the past preset time may be flexibly set according to a specific scenario, for example, the past preset time is set to a power consumption rate within 10 minutes before the current time with the current time as a node), and when the remaining power is less than the preset power (the preset power is set according to a specific situation, for example, the preset power is set to 70% of the total power of the terminal) or the power consumption rate is greater than the preset power consumption rate (the preset power consumption rate is a preset power consumption rate, and the preset power consumption rate may be flexibly set according to a specific scenario, for example, the preset power consumption rate is set to 1% of the total battery consumption per 10 minutes), the terminal performs step S10 in the first embodiment to obtain the running state of the target application, and an operating parameter value in the operating state.
In the embodiment, only when the condition that the residual electric quantity of the terminal is insufficient or the power consumption rate of the terminal is high is met, the target application program of the terminal is controlled, the phenomenon that the terminal is too late is avoided, and the battery endurance time of the terminal and the user requirement are effectively considered.
In addition, referring to fig. 3, an embodiment of the present application further provides an application control apparatus, including:
a state parameter obtaining module 10, configured to obtain an operation state of a target application program and an operation parameter value in the operation state;
a threshold query module 20, configured to query a preset state and threshold mapping table, and obtain a target threshold corresponding to the operating state of the target application program;
a detection adjusting module 30, configured to adjust the target application program when it is detected that the running parameter value reaches the target threshold.
In one embodiment, the detection adjustment module 30 includes:
the first judgment submodule is used for judging whether an operation instruction for the target application program is received within a first preset time in the past or not if the operation state is a foreground state when the operation parameter value is detected to reach the target threshold value;
and the first adjusting submodule is used for switching the target application program from a foreground state to a background state if the operating instruction of the target application program is not received within a first preset time length in the past.
In one embodiment, the detection adjustment module 30 includes:
the detection acquisition submodule is used for acquiring an operation parameter value corresponding to a background state when the target application program is detected to be switched to the background state;
the threshold query submodule is used for querying the preset state and threshold mapping table and acquiring a target threshold corresponding to the background state of the target application program;
and the detection closing submodule is used for closing the target application program when the running parameter value is detected to reach the target threshold value corresponding to the background state.
In one embodiment, the first adjusting submodule includes:
the prompt output unit is used for outputting state switching prompt information if the operation instruction of the target application program is not received within the past first preset time length;
and the receiving switching unit is used for receiving a state switching instruction input based on the state switching prompt information, executing the state switching instruction and switching the target application program from a foreground state to a background state.
In one embodiment, the detection adjustment module 30 includes:
and the second adjusting submodule is used for reducing the volume of the target application program, reducing the display brightness of the target application program, reducing the resolution of the target application program and/or reducing the contrast of the target application program if the operation instruction of the target application program is received within the past first preset time.
In one embodiment, the detection adjustment module 30 includes:
the second judgment submodule is used for judging whether the target application program has a task in execution or not if the running state is a background state when the running parameter value is detected to reach the target threshold value;
and the program closing submodule is used for closing the target application program if the target application program does not have the task in execution.
In one embodiment, the detection adjustment module 30 includes:
and the task closing submodule is used for closing the task executed by the target application program if the target application program has the task in execution.
The specific embodiment of the application control apparatus of the present application is substantially the same as the embodiments of the application control method described above, and 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 system 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 system. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The above-mentioned serial numbers of the embodiments of the present application are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present application may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) as described above and includes instructions for enabling a terminal device (e.g., 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 application.
The above description is only a preferred embodiment of the present application, and not intended to limit the scope of the present application, and all modifications of equivalent structures and equivalent processes, which are made by the contents of the specification and the drawings of the present application, or which are directly or indirectly applied to other related technical fields, are included in the scope of the present application.

Claims (15)

1. An application control method, characterized by comprising the steps of:
acquiring the power consumption rate within the second preset time in the past;
if the power consumption rate is greater than a preset power consumption rate, acquiring the running state of the target application program and the running parameter value in the running state;
inquiring a preset state and threshold mapping table, and acquiring a target threshold corresponding to the running state of the target application program, wherein the preset state and threshold mapping table presets target thresholds of the application programs in different running states, and the target thresholds include: standard running time, standard power consumption rate, standard power consumption, standard network resource consumption and standard CPU occupancy rate;
when the running parameter value is detected to reach the target threshold value, if the running state is a foreground state, judging whether an operation instruction for the target application program is received within a first preset time period in the past;
if the operation instruction of the target application program is not received within a first preset time length in the past, switching the target application program from a foreground state to a background state; if an operation instruction for the target application program is received within the past first preset time, reducing the volume of the target application program, reducing the display brightness of the target application program, reducing the resolution of the target application program and/or reducing the contrast of the target application program;
wherein, the operating parameter value reaching the target threshold value means that a plurality of operating parameter values reach corresponding target threshold values.
2. The method for controlling an application program according to claim 1, wherein the step of switching the target application program from a foreground state to a background state after the step of switching the target application program from the foreground state to the background state if the operation instruction for the target application program is not received within a first preset time period in the past comprises:
when the target application program is detected to be switched to a background state, acquiring an operation parameter value corresponding to the background state;
inquiring the mapping table of the preset state and the threshold value to obtain a target threshold value corresponding to the background state of the target application program;
and closing the target application program when the running parameter value is detected to reach the target threshold value corresponding to the background state.
3. The method for controlling an application program according to claim 1, wherein the step of switching the target application program from a foreground state to a background state if the operation instruction for the target application program is not received within a first preset time period in the past, comprises:
if the operation instruction of the target application program is not received within the first preset time in the past, outputting state switching prompt information;
and receiving a state switching instruction input based on the state switching prompt information, executing the state switching instruction, and switching the target application program from a foreground state to a background state.
4. The application control method according to claim 1, further comprising:
when the running parameter value is detected to reach the target threshold value, if the running state is a background state, judging whether the target application program has a task in execution;
and if the target application program does not have the task in execution, closing the target application program.
5. The method for controlling an application program according to claim 4, wherein after the step of determining whether the target application program has a task in execution if the running status is a background status when it is detected that the running parameter value reaches the target threshold value, the method comprises:
and if the target application program has the task in execution, closing the task in execution of the target application program.
6. The application control method according to claim 1, wherein the step of obtaining the operating state of the target application and the operating parameter value in the operating state comprises:
acquiring the running state of a target application program, and judging whether the target application program has the operation authority;
and if the operation authority of the target application program is possessed, acquiring an operation parameter value of the target application program in the operation state.
7. The application control method of claim 1, wherein the step of obtaining the operating state of the target application and the operating parameter value in the operating state is preceded by:
acquiring residual electric quantity;
and if the residual electric quantity is less than the preset electric quantity, executing the step of acquiring the running state of the target application program and the running parameter value in the running state.
8. The application control method according to any one of claims 1 to 7, wherein the step of adjusting the running state of the application upon detecting that the running parameter value reaches the target threshold value, is followed by:
if the adjusted target application program is in a closed state, updating the running parameter value of the target application program when the target application program is detected to be started;
and if the adjusted target application program is not in a closed state, updating the running state of the target application program.
9. An application control apparatus, comprising:
the state parameter acquiring module is used for acquiring the power consumption rate within the second preset time in the past, and acquiring the running state of the target application program and the running parameter value in the running state if the power consumption rate is greater than the preset power consumption rate;
a threshold query module, configured to query a preset state and threshold mapping table, and obtain a target threshold corresponding to the operating state of the target application program, where the preset state and threshold mapping table preset target thresholds of different operating states of each application program, and the target thresholds include: standard running time, standard power consumption rate, standard power consumption, standard network resource consumption and standard CPU occupation;
the first judgment submodule is used for judging whether an operation instruction for the target application program is received within a first preset time in the past or not if the operation state is a foreground state when the operation parameter value is detected to reach the target threshold value;
the first adjusting submodule is used for switching the target application program from a foreground state to a background state if an operating instruction of the target application program is not received within a first preset time length in the past;
a second adjusting submodule, configured to reduce a volume of the target application program, reduce a display brightness of the target application program, reduce a resolution of the target application program, and/or reduce a contrast of the target application program if an operation instruction for the target application program is received within the past first preset time period;
wherein, the operating parameter value reaching the target threshold value means that a plurality of operating parameter values reach corresponding target threshold values.
10. The application control device of claim 9, wherein the detection adjustment module comprises:
the detection acquisition submodule is used for acquiring an operation parameter value corresponding to a background state when the target application program is detected to be switched to the background state;
the threshold query submodule is used for querying the preset state and threshold mapping table and acquiring a target threshold corresponding to the background state of the target application program;
and the detection closing submodule is used for closing the target application program when the running parameter value is detected to reach the target threshold value corresponding to the background state.
11. The application control device of claim 9, wherein the first adjustment submodule comprises:
the prompt output unit is used for outputting state switching prompt information if the operation instruction of the target application program is not received within the past first preset time length;
and the receiving switching unit is used for receiving a state switching instruction input based on the state switching prompt information, executing the state switching instruction and switching the target application program from a foreground state to a background state.
12. The application control device of claim 9, wherein the detection adjustment module comprises:
the second judgment submodule is used for judging whether the target application program has a task in execution or not if the running state is a background state when the running parameter value is detected to reach the target threshold value;
and the program closing submodule is used for closing the target application program if the target application program does not have the task in execution.
13. The application control device of claim 12, wherein the detection adjustment module comprises:
and the task closing submodule is used for closing the task executed by the target application program if the target application program has the task in execution.
14. A terminal, characterized in that the terminal comprises: a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein:
the computer program implementing the steps of the application control method according to any one of claims 1 to 8 when executed by the processor.
15. A computer-readable storage medium, characterized in that a computer program is stored on the computer-readable storage medium, which computer program, when being executed by a processor, carries out the steps of the application control method according to any one of claims 1 to 8.
CN201910448906.2A 2019-05-27 2019-05-27 Application program control method, device, terminal and computer readable storage medium Active CN110187753B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910448906.2A CN110187753B (en) 2019-05-27 2019-05-27 Application program control method, device, terminal and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910448906.2A CN110187753B (en) 2019-05-27 2019-05-27 Application program control method, device, terminal and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN110187753A CN110187753A (en) 2019-08-30
CN110187753B true CN110187753B (en) 2021-09-07

Family

ID=67718067

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910448906.2A Active CN110187753B (en) 2019-05-27 2019-05-27 Application program control method, device, terminal and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN110187753B (en)

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110708747A (en) * 2019-09-18 2020-01-17 Tcl移动通信科技(宁波)有限公司 Data transmission rate adjusting method, system, storage medium and mobile terminal
CN110647366B (en) * 2019-09-19 2023-08-22 Oppo广东移动通信有限公司 Method, device, terminal and storage medium for processing blocking
CN110659136B (en) * 2019-09-19 2022-07-15 Oppo广东移动通信有限公司 Method, device, terminal and storage medium for limiting frame rate
CN110891304B (en) * 2019-11-29 2023-07-28 浙江如新智能科技有限公司 gPS power consumption control method for mobile terminal
CN111867024A (en) * 2020-06-28 2020-10-30 维沃移动通信有限公司 Electronic equipment control method and device and electronic equipment
CN112035249B (en) * 2020-08-24 2023-06-13 茂佳科技(广东)有限公司 Application program network duty ratio adjusting method, device and storage medium
CN112131001B (en) * 2020-09-23 2022-10-18 山石网科通信技术股份有限公司 Sandbox-based resource processing method and device, storage medium and processor
CN112799495A (en) * 2021-01-21 2021-05-14 惠州Tcl移动通信有限公司 Power consumption mode setting method, terminal device and computer readable storage medium
CN116339833A (en) * 2021-12-15 2023-06-27 中兴通讯股份有限公司 Communication transmission control method and device, electronic equipment and storage medium
CN115453895A (en) * 2022-08-17 2022-12-09 青岛海尔科技有限公司 Terminal control method, terminal control device, storage medium and electronic device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104239195A (en) * 2014-09-17 2014-12-24 可牛网络技术(北京)有限公司 Method for processing power consumption of electronic equipment, and electronic equipment
CN105676987A (en) * 2014-11-19 2016-06-15 中兴通讯股份有限公司 Method for shutting down background application of mobile terminal, device and mobile terminal
CN105676993A (en) * 2015-12-29 2016-06-15 北京金山安全软件有限公司 Method and device for saving electric quantity and electronic equipment
CN106774806A (en) * 2016-12-18 2017-05-31 滁州昭阳电信通讯设备科技有限公司 The method and mobile terminal of a kind of power saving
CN107329559A (en) * 2017-06-30 2017-11-07 宇龙计算机通信科技(深圳)有限公司 A kind of application control method, device, terminal and storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103412636A (en) * 2013-08-05 2013-11-27 Tcl通讯(宁波)有限公司 Power saving system and power saving method of intelligent terminal

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104239195A (en) * 2014-09-17 2014-12-24 可牛网络技术(北京)有限公司 Method for processing power consumption of electronic equipment, and electronic equipment
CN105676987A (en) * 2014-11-19 2016-06-15 中兴通讯股份有限公司 Method for shutting down background application of mobile terminal, device and mobile terminal
CN105676993A (en) * 2015-12-29 2016-06-15 北京金山安全软件有限公司 Method and device for saving electric quantity and electronic equipment
CN106774806A (en) * 2016-12-18 2017-05-31 滁州昭阳电信通讯设备科技有限公司 The method and mobile terminal of a kind of power saving
CN107329559A (en) * 2017-06-30 2017-11-07 宇龙计算机通信科技(深圳)有限公司 A kind of application control method, device, terminal and storage medium

Also Published As

Publication number Publication date
CN110187753A (en) 2019-08-30

Similar Documents

Publication Publication Date Title
CN110187753B (en) Application program control method, device, terminal and computer readable storage medium
CN107277902B (en) Terminal power consumption control method, mobile terminal and computer readable storage medium
CN107995286B (en) Automatic service starting and stopping method based on dubbo platform, server and storage medium
CN104219653A (en) Method and device for controlling double-card Internet access
CN110300067B (en) Queue adjusting method, device, equipment and computer readable storage medium
US11096177B2 (en) Operation mode switching method and user equipment
CN110703944B (en) Touch data processing method and device, terminal and storage medium
CN111240864A (en) Asynchronous task processing method, device, equipment and computer readable storage medium
KR20130022488A (en) Apparatus and method for controlling polling
CN103888934A (en) Mobile terminal buffer memory management apparatus and management method
CN111538678A (en) Data buffering method, device and computer readable storage medium
CN112083988A (en) Screen refresh rate control method, mobile terminal and computer readable storage medium
CN112997471B (en) Audio channel switching method and device, readable storage medium and electronic equipment
CN113316227B (en) Network searching method, terminal and storage medium
KR20160018030A (en) Method and apparatus for executing software in a electronic device
CN109059219B (en) Control method of WIFI module of air conditioner, air conditioner and storage medium
CN114466365A (en) Spectrum resource acquisition method, spectrum resource acquisition device and computer readable storage medium
CN108736082B (en) Method, device, equipment and storage medium for improving endurance capacity of terminal battery
CN108053804B (en) Configuration method and device for power supply current of display terminal and readable storage medium
CN110737320B (en) Power consumption detection method and device, electronic equipment and storage medium
US20100251251A1 (en) Apparatus and method for cpu load control in multitasking environment
CN113220106A (en) Power saving control method and power saving control device
CN113093897A (en) Power consumption management method, terminal device and readable storage medium
CN112559063A (en) CPU switching method and device, intelligent terminal and storage medium
CN110784885A (en) Power consumption adjusting method and device of communication network 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
GR01 Patent grant
GR01 Patent grant