CN107329559B - Application program control method, device, terminal and storage medium - Google Patents

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

Info

Publication number
CN107329559B
CN107329559B CN201710524697.6A CN201710524697A CN107329559B CN 107329559 B CN107329559 B CN 107329559B CN 201710524697 A CN201710524697 A CN 201710524697A CN 107329559 B CN107329559 B CN 107329559B
Authority
CN
China
Prior art keywords
application program
application
data transmission
duration
time threshold
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
CN201710524697.6A
Other languages
Chinese (zh)
Other versions
CN107329559A (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.)
Yulong Computer Telecommunication Scientific Shenzhen Co Ltd
Original Assignee
Yulong Computer Telecommunication Scientific Shenzhen 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 Yulong Computer Telecommunication Scientific Shenzhen Co Ltd filed Critical Yulong Computer Telecommunication Scientific Shenzhen Co Ltd
Priority to CN201710524697.6A priority Critical patent/CN107329559B/en
Publication of CN107329559A publication Critical patent/CN107329559A/en
Application granted granted Critical
Publication of CN107329559B publication Critical patent/CN107329559B/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/3234Power saving characterised by the action undertaken
    • G06F1/329Power saving characterised by the action undertaken by task scheduling

Abstract

The invention discloses an application program control method, an application program control device, a terminal and a storage medium, wherein the method comprises the following steps: acquiring an application program running in a background currently; judging whether the application program is in a data transmission state; when the application program is not in a data transmission state, recording the duration of the application program which is not in the data transmission state; determining whether to shut down the application program and/or system services associated with the application program according to the duration. According to the scheme, the automatic control of the application program in the daily use process of the terminal is realized, compared with the prior art, the power consumption of the terminal can be reduced, the use time of a terminal battery is prolonged, whether the corresponding process is closed or not is determined according to the data transmission state and the duration of the data transmission state, the problem that the process in use of a user can be interrupted when related application programs are directly closed in a power saving mode in the prior art is solved, and the intelligence and the humanization of application program control are improved.

Description

Application program control method, device, terminal and storage medium
Technical Field
The present invention relates to the field of communications technologies, and in particular, to an application control method, an application control device, a terminal, and a storage medium.
Background
The mobile terminal is usually equipped with a battery, and due to the limited capacity of the battery, most of the current mobile terminal batteries can only support the mobile terminal to operate for about one day, and if the mobile terminal is frequently operated, the power can be lost even for less than half a day.
To address this problem, the existing solutions are: the power management application or some housekeeping applications are installed in the mobile terminal to reduce the power consumption of the mobile terminal, and the working principle is that when the battery capacity is smaller than a preset threshold value, a user is prompted to enter a power saving mode. However, the power saving mode of this mode is to directly close the relevant application processes, including the processes being used by the user, such as closing wifi, bluetooth, mobile network, and the like, and obviously, the processing mode of this mode is fairly arbitrary, which may interrupt the ongoing processes of the user, and bring about bad experience.
Therefore, how to reduce the power consumption of the mobile terminal and prolong the service life of the battery in the using process becomes a technical problem to be solved urgently.
Disclosure of Invention
In view of this, embodiments of the present invention provide an application control method, an application control apparatus, a terminal, and a storage medium, so as to solve the problems of large power consumption and weak battery in the terminal operation process in the prior art.
The invention provides an application program control method, which is applied to a terminal such as a mobile phone, a tablet computer and the like, and comprises the following steps: acquiring an application program running in a background currently; judging whether the application program is in a data transmission state; when the application program is not in a data transmission state, recording the duration of the application program which is not in the data transmission state; determining whether to shut down the application program and/or system services associated with the application program according to the duration.
By implementing the method described in the first aspect, applications running in the background of the terminal are detected in real time, and whether the applications are in a data transmission state is determined, if the data transmission state indicates that the user is performing data transmission in the background through the applications, such as a music application downloading an audio file, etc., in order to avoid data loss or corruption of the user, the applications can be kept running in the background, if the applications running in the background are not in the data transmission state, i.e. there is no data activity, the applications do not need to be used currently, if the applications are allowed to run in the background for a long time, not only a large amount of memory is occupied, but also the power consumption of the terminal is increased, the duration of the state that the applications have no data activity is recorded at this time, and whether the applications and/or system services associated with the applications are turned off is determined according to the duration, therefore, automatic control of the application program in the daily use process of the terminal is realized, compared with the prior art, the power consumption of the terminal can be reduced, the use time of a terminal battery is prolonged, whether the corresponding process is closed or not is determined through the data transmission state and the duration of the data transmission state, the problem that the process used by a user can be interrupted when related application programs are directly closed in a power saving mode in the prior art is avoided, and the intelligence and humanization of application program control are improved.
With reference to the first aspect of the present invention, in a first implementation manner of the first aspect of the present invention, the determining whether to close the application and/or the system service associated with the application according to the duration includes: judging whether the duration reaches a first time threshold value; closing system services associated with the application when the duration reaches the first time threshold.
By executing the steps, a threshold value of duration time of a no-data activity state is set for the system service associated with the application program, namely a first time threshold value, if the duration time that the application program running in the background is not in a data transmission state reaches the first time threshold value, the system service associated with the application program is firstly closed, so that the system service associated with the application program can be prevented from occupying a running memory and consuming energy, the application program is not directly closed, a user only needs to restart the associated system service when the user reuses the application program for data transmission, and high energy consumption caused by restarting the application program in a short time after directly closing the application program is avoided.
With reference to the first aspect of the present invention, in a second implementation manner of the first aspect of the present invention, the determining whether to close the application and/or the system service associated with the application according to the duration further includes: determining whether the duration reaches a second time threshold, wherein the second time threshold is greater than the first time threshold; closing the application when the duration reaches the second time threshold.
By executing the above steps, a threshold, that is, a second time threshold, is set for the duration of the data activity free state of the application, where the second time threshold is greater than the first time threshold, and a specific time value may be preset by a user as needed, that is, after the system service associated with the application is closed, if the application still has no data transmission activity and the duration of the state reaches the second time threshold, it indicates that the user has not used the application for a long period of time, and may be that the user has finished using and forgets to turn off the application, and if the application continues to run in the background, a large amount of running memory and a large amount of electric energy are occupied, the application is turned off, so as to save running space and battery power consumption, thereby prolonging the battery use time.
With reference to the second implementation manner of the first aspect of the present invention, in the third implementation manner of the first aspect of the present invention, after the closing the system service associated with the application program, the method further includes: and when the duration time does not reach the second time threshold, starting the system service of the current data transmission request.
By executing the steps, after the application program continues not to transmit data within the first time threshold and the related system service is closed, if the duration of the no-data activity state does not reach the second time threshold, that is, the application program has the data transmission request again during the period, the system service corresponding to the data transmission request is started.
Furthermore, a second aspect of the present invention provides an application control apparatus for a terminal, such as a mobile phone, a tablet computer, or the like, the application control apparatus including a module or a unit for executing the application control method according to the first aspect or any one of the first aspects.
For example, the apparatus comprises: the acquisition module is used for acquiring the application program running in the current background; the judging module is used for judging whether the application program is in a data transmission state; the recording module is used for recording the duration time of the application program which is not in the data transmission state when the application program is not in the data transmission state; a determination module to determine whether to close the application and/or system services associated with the application based on the duration.
By implementing the application program control device, the application programs running in the background of the terminal are detected in real time, whether the application programs are in a data transmission state or not is judged, if the application programs are in the data transmission state, the data transmission is carried out by a user in the background through the application programs, such as audio files are being downloaded by music applications, and the like, in order to avoid the data loss or damage of the user, the application programs can be kept running in the background continuously, if the application programs running in the background are not in the data transmission state, namely no data activity exists, the application programs do not need to be used currently, if the application programs are allowed to run in the background for a long time, not only a large amount of memory is occupied, but also the energy consumption of the terminal is increased, the duration of the state that the application programs do not have data activity is recorded at the moment, and whether the application programs and/or system services related to the application programs, therefore, automatic control of the application program in the daily use process of the terminal is realized, compared with the prior art, the power consumption of the terminal can be reduced, the use time of a terminal battery is prolonged, whether the corresponding process is closed or not is determined through the data transmission state and the duration of the data transmission state, the problem that the process used by a user can be interrupted when related application programs are directly closed in a power saving mode in the prior art is avoided, and the intelligence and humanization of application program control are improved.
With reference to the second aspect of the present invention, in a first embodiment of the second aspect of the present invention, the determining module includes: the first judgment unit is used for judging whether the duration reaches a first time threshold value or not; a first closing unit, configured to close the system service associated with the application program when the duration reaches the first time threshold.
By implementing the application program control device, a threshold value of duration time of a no-data activity state is set for the system service associated with the application program, namely a first time threshold value, if the duration time of the application program which runs in a background and is not in a data transmission state reaches the first time threshold value, the system service associated with the application program is firstly closed, so that the system service associated with the application program can be prevented from occupying a running memory and consuming energy, the application program is not directly closed, a user only needs to restart the associated system service when the user reuses the application program for data transmission, and high energy consumption caused by restarting the application program in a short time after directly closing the application program is avoided.
With reference to the first embodiment of the second aspect of the present invention, in the second embodiment of the second aspect of the present invention, the determining module further includes: a second determining unit, configured to determine whether the duration reaches a second time threshold, where the second time threshold is greater than the first time threshold; a second closing unit, configured to close the application program when the duration reaches the second time threshold.
Through the application program control device, a threshold value, namely a second time threshold value, is set for the duration of a no-data-activity state of an application program, where the second time threshold value is greater than the first time threshold value, and a specific time value may be preset by a user according to needs, that is, after a system service associated with the application program is closed, if the application program still has no data transmission activity and the duration of the state reaches the second time threshold value, it indicates that the user has not used the application program for a long period of time, and possibly the user has used the application program and forgets to turn off the application program after the application program is used, and if the application program continues to run in a background, a large amount of running memory and a large amount of electric energy are occupied, the application program is turned off, so that running space and battery power consumption are saved, and.
With reference to the second aspect of the present invention, in a third embodiment of the second aspect of the present invention, the apparatus further includes: and the starting module is used for starting the system service of the current data transmission request when the duration time does not reach the second time threshold value after the system service related to the application program is closed.
By implementing the application program control device, after the application program continues not to transmit data within the first time threshold and closes the related system service, if the duration of the no-data activity state does not reach the second time threshold, that is, the application program has a data transmission request again during the period, the system service corresponding to the data transmission request is started.
The modules or units comprised by the application control device are not limited to the above-mentioned naming.
These aspects of the present application will be more readily apparent from the following description of the embodiments.
A third aspect of the present invention provides a terminal comprising at least one processor and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executable by the at least one processor to cause the at least one processor to perform the application control method of the second aspect of the present invention or any embodiment thereof.
A fourth aspect of the present invention provides a computer-readable storage medium storing computer instructions for causing a computer to perform the application control method according to the first aspect of the present invention or any embodiment of the first aspect of the present invention.
Drawings
The features and advantages of the present invention will be more clearly understood by reference to the accompanying drawings, which are illustrative and not to be construed as limiting the invention in any way, and in which:
fig. 1 shows a structure of a cellular phone in an embodiment of the present invention;
FIG. 2 shows a flow diagram of an application control method according to an embodiment of the invention;
FIG. 3 is a schematic diagram of an application control apparatus according to an embodiment of the present invention;
FIG. 4 is a schematic diagram showing another structure of an application control apparatus according to an embodiment of the present invention;
fig. 5 shows a schematic structural diagram of a terminal according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Fig. 1 is a schematic diagram of an application scenario of an embodiment of the present invention. The mobile terminal is a mobile device such as a mobile phone or a tablet computer, the mobile terminal takes a mobile phone as an example, a partial structural block diagram of the mobile phone is shown in fig. 1, and the mobile phone includes a radio frequency circuit 110, a memory 120, an input unit 130, a display unit 140, a sensor 150, an audio circuit 160, a wireless module 170, a processor 180, a power supply 190, and the like. Those skilled in the art will appreciate that the handset configuration shown in fig. 1 is not intended to be limiting and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
Wherein the RF circuit 110 is used for receiving and transmitting signals during the transmission and reception of information or a call. The memory 120 is used to store software programs and modules, and the processor 180 executes various functional applications and data processing of the mobile phone by operating the software programs and modules stored in the memory 120. The input unit 130 is used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the cellular phone. The input unit 130 may include a touch panel 131 and other input devices 132. Other input devices 132 may include, but are not limited to, one or more of a physical keyboard, function keys, a mouse, and a joystick. The display unit 140 is used to display information input by the user or information provided to the user and various menus of the mobile phone. The display unit 140 may include a display panel 141. The touch panel 131 can cover the display panel 141, and when the touch panel 131 detects a touch operation on or near the touch panel 131, the touch operation is transmitted to the processor 180 to determine the type of the touch event, and then the processor 180 provides a corresponding visual output on the display panel 141 according to the type of the touch event.
The handset may also include at least one sensor 150, such as a light sensor, motion sensor, and other sensors. The light sensor may include an ambient light sensor for adjusting the brightness of the display panel 141 according to the brightness of ambient light, and a proximity sensor for turning off the display panel 141 and/or the backlight when the mobile phone is moved to the ear. The light sensor in this embodiment may be disposed on the front and back of the mobile phone, and is used to detect a shielding area when the user holds the mobile phone. The mobile phone can further comprise a pressure sensor which is arranged on the front side or the back side shell of the mobile phone and used for obtaining a shielding area when a user holds the mobile phone in a pressure detection mode. In addition, the mobile phone can be also provided with other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer and an infrared sensor, which are not described in detail.
Audio circuitry 160, speaker 161, microphone 162 may provide an audio interface between the user and the handset. The wireless module 170 may be a WIFI module, which provides a wireless internet access service to the user.
The processor 180 is a control center of the mobile phone, connects various parts of the entire mobile phone by using various interfaces and lines, and performs various functions of the mobile phone and processes data by operating or executing software programs and/or modules stored in the memory 120 and calling data stored in the memory 120, thereby integrally monitoring the mobile phone. Optionally, processor 180 may include one or more processing units. In addition, the mobile phone further comprises a power supply 190 for supplying power to each component, and the power supply 190 is logically connected with the processor 180 through a power management system, so that functions of charging, discharging, power consumption management and the like are managed through the power management system.
Although not shown, the mobile phone may further include a camera, a bluetooth module, etc., which are not described herein.
Referring to fig. 2, an application control method provided in an embodiment of the present invention is applied to a terminal, such as a mobile phone and a tablet computer, and the method includes:
s21: acquiring an application program running in the current background, namely detecting the application program running in the background of the terminal and the associated system service thereof in real time, if the application program is running in the background: QQ, WeChat, camera, radio, video, reading software and the like, and application programs running on the foreground of the terminal are not processed in order to avoid influencing the use of users.
S22: and judging whether the application program is in a data transmission state. That is, it is determined whether the applications running in the background acquired in step S21 are in the data transfer state, if the data transfer state indicates that the user is performing data transfer in the background through the application, such as the music application is downloading (caching) an audio file, and in order to avoid data loss or damage to the user, the application may be kept running in the background, otherwise, the process proceeds to step S23.
S23: when the application program is not in a data transmission state, recording the duration of the application program which is not in the data transmission state; if the application program running in the background is not in the data transmission state, that is, no data activity exists, it indicates that the user does not need to use the application program currently, and if the application program runs in the background for a long time, not only a large amount of memory is occupied, but also the energy consumption of the terminal is increased, so that the duration of the state that the application program has no data activity is recorded.
S24: determining whether to shut down the application program and/or system services associated with the application program according to the duration. Application-associated system services herein include, but are not limited to: the GPS service, the Bluetooth service, the network service and the like determine whether to close the application program and/or the system service related to the application program according to the duration of the application program in the data-free active state recorded in the step S23, so that the automatic control of the application program in the daily use process of the terminal is realized.
Alternatively, step S24 may include: judging whether the duration reaches a first time threshold value; closing system services associated with the application when the duration reaches the first time threshold. Specifically, a threshold value of duration time of a no-data activity state is set for a system service associated with an application program, that is, a first time threshold value, and if the duration time of a data transmission state of an application program not running in a background reaches the first time threshold value, the system service associated with the application program is firstly closed, for example, WIFI is in an open state but is not connected to an application program for a long time, and then WIFI can be closed to achieve the purpose of reducing power consumption.
Alternatively, step S24 may include: determining whether the duration reaches a second time threshold, wherein the second time threshold is greater than the first time threshold; closing the application when the duration reaches the second time threshold. Specifically, a threshold, that is, a second time threshold, is set for the duration of a no-data-activity state of an application, where the second time threshold is greater than the first time threshold, and a specific time value may be preset by a user as needed, that is, after system services associated with the application are turned off, if the application still has no data transmission activity and the duration of the state reaches the second time threshold, for example, if the camera application is continuously hung in the background for a long time, it indicates that the user does not use the application for a long time, and it is possible that the user has finished using and forgets to turn off the application, and if the application continues to run in the background, a large amount of running memory and a large amount of power are consumed, the camera process may be killed, so as to save running space and battery power consumption, thereby prolonging the battery usage time.
In an actual application scene, for example, a user is watching a video currently, a video application is in foreground operation for a long time, application programs such as reading software, news software and microblogs are in background, the application programs running in the background are associated with some system services which can be closed, if the application programs do not carry out data transmission, the system services which are not needed to be used, such as gps and bluetooth, can be firstly closed, and after a period of time, if the user still does not use the application programs running in the background, the background programs are closed, so that power consumption caused by background operation of the processes is reduced, and the service duration of the mobile terminal is prolonged.
Optionally, after the closing of the system service associated with the application program, the method further includes: and when the duration time does not reach the second time threshold, starting the system service of the current data transmission request. Specifically, after the application continues not to perform data transmission within the first time threshold and the related system service is closed, if the duration of the data activity free state does not reach the second time threshold, that is, the application has a data transmission request again during this period, the system service corresponding to the data transmission request is started.
The application control method provided in this embodiment detects, in real time, application programs running in the background of the terminal, and determines whether the application programs are in a data transmission state, if the application programs are in the data transmission state, which indicates that a user is performing data transmission in the background through the application programs, such as a music application is downloading audio files, and the like, to avoid data loss or damage of the user, the application programs can be kept running in the background continuously, if the application programs running in the background are not in the data transmission state, that is, there is no data activity, it indicates that the user does not need to use the application programs currently, if the application programs are allowed to run in the background for a long time, not only a large amount of memory is occupied, but also power consumption of the terminal is increased, at this time, the duration of the state that the application programs do not have data activity is recorded, and whether to close the application programs and/or system services associated with the application, therefore, automatic control of the application program in the daily use process of the terminal is realized, compared with the prior art, the power consumption of the terminal can be reduced, the use time of a terminal battery is prolonged, whether the corresponding process is closed or not is determined through the data transmission state and the duration of the data transmission state, the problem that the process used by a user can be interrupted when related application programs are directly closed in a power saving mode in the prior art is avoided, and the intelligence and humanization of application program control are improved.
Referring to fig. 3, a schematic structural diagram of an application control apparatus according to an embodiment of the present invention is shown, which is used for a terminal, such as a mobile phone, a tablet computer, and the like, and includes:
an obtaining module 31, configured to obtain an application program running in a background currently; see step S21 in the above embodiment for details.
A judging module 32, configured to judge whether the application program is in a data transmission state; see step S22 in the above embodiment for details.
A recording module 33, configured to record, when the application program is not in the data transmission state, a duration that the application program is not in the data transmission state; see step S23 in the above embodiment for details.
A determining module 34, configured to determine whether to close the application and/or a system service associated with the application according to the duration. See step S24 in the above embodiment for details.
Optionally, in some embodiments of the present invention, as shown in fig. 4, the determining module 34 includes: a first determining unit 341, configured to determine whether the duration reaches a first time threshold; a first closing unit 342, configured to close the system service associated with the application program when the duration reaches the first time threshold. For details, see the relevant detailed description in the above embodiments.
Optionally, in some embodiments of the present invention, as shown in fig. 4, the determining module 34 further includes: a second determining unit 343, configured to determine whether the duration reaches a second time threshold, where the second time threshold is greater than the first time threshold; a second closing unit 344, configured to close the application program when the duration reaches the second time threshold. For details, see the relevant detailed description in the above embodiments.
Optionally, in some embodiments of the present invention, as shown in fig. 4, further includes: the starting module 35 is configured to, after the system service associated with the application program is closed, start the system service of the current data transmission request when the duration does not reach the second time threshold. For details, see the relevant detailed description in the above embodiments.
The application program control device detects the application programs running in the background of the terminal in real time, judges whether the application programs are in a data transmission state, if the application programs are in the data transmission state, the user is performing data transmission in the background through the application programs, such as audio files are being downloaded by music applications, and the like, in order to avoid data loss or damage of the user, the application programs can be kept running in the background continuously, if the application programs running in the background are not in the data transmission state, namely no data activity exists, the application programs do not need to be used by the user currently, if the application programs are allowed to run in the background for a long time, not only a large amount of memory is occupied, but also the energy consumption of the terminal is increased, at the moment, the duration of the state that the application programs do not have data activity is recorded, and whether the application programs and/or system services related to the application programs are closed or not is determined, therefore, automatic control of the application program in the daily use process of the terminal is realized, compared with the prior art, the power consumption of the terminal can be reduced, the use time of a terminal battery is prolonged, whether the corresponding process is closed or not is determined through the data transmission state and the duration of the data transmission state, the problem that the process used by a user can be interrupted when related application programs are directly closed in a power saving mode in the prior art is avoided, and the intelligence and humanization of application program control are improved.
An embodiment of the present invention further provides a terminal, including: any of the above embodiments of the application control device.
A terminal of the present invention is described below by taking a smart phone as an example.
As shown in fig. 5, correspondingly, a terminal provided in the embodiment of the present invention includes: at least one processor 51 and a memory 52, for example, a processor in fig. 5, the processor 51 and the memory 52 are connected by a bus 50, the memory 52 stores instructions executable by the at least one processor 51, and the instructions are executed by the at least one processor 51 to cause the at least one processor to perform the following method:
acquiring an application program running in a background currently;
judging whether the application program is in a data transmission state;
when the application program is not in a data transmission state, recording the duration of the application program which is not in the data transmission state;
determining whether to shut down the application program and/or system services associated with the application program according to the duration.
Optionally, in some embodiments of the present invention, the determining whether to close the application and/or the system service associated with the application according to the duration includes: judging whether the duration reaches a first time threshold value; closing system services associated with the application when the duration reaches the first time threshold.
Optionally, in some embodiments of the present invention, the determining whether to close the application and/or the system service associated with the application according to the duration further includes: determining whether the duration reaches a second time threshold, wherein the second time threshold is greater than the first time threshold; closing the application when the duration reaches the second time threshold.
Optionally, in some embodiments of the present invention, after the closing the system service associated with the application program, the at least one processor may further perform: and when the duration time does not reach the second time threshold, starting the system service of the current data transmission request.
The related description may be understood by referring to the related description and effect corresponding to the step in fig. 2, and will not be described in detail herein.
The terminal provided in the foregoing embodiment detects, in real time, applications running in the background of the terminal, and determines whether the applications are in a data transmission state, if the applications are in the data transmission state, which indicates that a user is performing data transmission in the background through the applications, such as a music application downloading an audio file, and the like, to avoid data loss or corruption of the user, the application may be kept running in the background, if the applications running in the background are not in the data transmission state, that is, there is no data activity, the applications do not need to be used currently by the user, if the applications are allowed to run in the background for a long time, not only a large amount of memory is occupied, but also power consumption of the terminal is increased, at this time, the duration of the state that the applications do not have data activity is recorded, and whether to shut down the applications and/or system services associated with the applications is determined according to the duration, therefore, automatic control of the application program in the daily use process of the terminal is realized, compared with the prior art, the power consumption of the terminal can be reduced, the use time of a terminal battery is prolonged, whether the corresponding process is closed or not is determined through the data transmission state and the duration of the data transmission state, the problem that the process used by a user can be interrupted when related application programs are directly closed in a power saving mode in the prior art is avoided, and the intelligence and humanization of application program control are improved.
The embodiment of the invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions can execute all or part of the processes in the method of the embodiment. The storage medium may be a magnetic Disk, an optical Disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a Flash Memory (Flash Memory), a Hard Disk (Hard Disk Drive, abbreviated as HDD) or a Solid State Drive (SSD), etc.; the storage medium may also comprise a combination of memories of the kind described above.
Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the invention, and such modifications and variations fall within the scope defined by the appended claims.

Claims (6)

1. An application control method, comprising:
acquiring an application program running in a background currently;
judging whether the application program is in a data transmission state;
when the application program is not in a data transmission state, recording the duration of the application program which is not in the data transmission state;
determining whether to shut down the application and system services associated with the application based on the duration, comprising:
judging whether the duration reaches a first time threshold value;
closing system services associated with the application when the duration reaches the first time threshold;
determining whether the duration reaches a second time threshold, wherein the second time threshold is greater than the first time threshold;
closing the application when the duration reaches the second time threshold.
2. The method for controlling application programs according to claim 1, further comprising, after the closing of the system service associated with the application program:
and when the duration time does not reach the second time threshold, starting the system service of the current data transmission request.
3. An application control apparatus, comprising:
the acquisition module is used for acquiring the application program running in the current background;
the judging module is used for judging whether the application program is in a data transmission state;
the recording module is used for recording the duration time of the application program which is not in the data transmission state when the application program is not in the data transmission state;
a determination module to determine whether to shut down the application and system services associated with the application based on the duration, the determination module comprising:
the first judgment unit is used for judging whether the duration reaches a first time threshold value or not;
a first closing unit, configured to close a system service associated with the application program when the duration reaches the first time threshold;
the determining module further comprises:
a second determining unit, configured to determine whether the duration reaches a second time threshold, where the second time threshold is greater than the first time threshold;
a second closing unit, configured to close the application program when the duration reaches the second time threshold.
4. The application control device according to claim 3, further comprising:
and the starting module is used for starting the system service of the current data transmission request when the duration time does not reach the second time threshold value after the system service related to the application program is closed.
5. A terminal comprising at least one processor and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to cause the at least one processor to perform the application control method of claim 1 or 2.
6. A computer-readable storage medium storing computer instructions for causing a computer to execute the application control method of claim 1 or 2.
CN201710524697.6A 2017-06-30 2017-06-30 Application program control method, device, terminal and storage medium Active CN107329559B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710524697.6A CN107329559B (en) 2017-06-30 2017-06-30 Application program control method, device, terminal and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710524697.6A CN107329559B (en) 2017-06-30 2017-06-30 Application program control method, device, terminal and storage medium

Publications (2)

Publication Number Publication Date
CN107329559A CN107329559A (en) 2017-11-07
CN107329559B true CN107329559B (en) 2021-04-16

Family

ID=60197580

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710524697.6A Active CN107329559B (en) 2017-06-30 2017-06-30 Application program control method, device, terminal and storage medium

Country Status (1)

Country Link
CN (1) CN107329559B (en)

Families Citing this family (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107831886B (en) * 2017-11-21 2020-06-26 Oppo广东移动通信有限公司 Control method and device for associated starting application, storage medium and intelligent terminal
CN110032431A (en) * 2018-01-12 2019-07-19 广东欧珀移动通信有限公司 Application processing method and device, electronic equipment, computer readable storage medium
CN108924290B (en) * 2018-06-12 2020-01-14 Oppo广东移动通信有限公司 Camera control method and device, mobile terminal and computer readable medium
CN109144728B (en) 2018-08-22 2020-11-06 Oppo广东移动通信有限公司 Occupancy control method and device for camera application
CN109511139B (en) * 2018-12-19 2023-01-03 Oppo广东移动通信有限公司 WIFI control method and device, mobile device and computer-readable storage medium
CN110187753B (en) * 2019-05-27 2021-09-07 Oppo广东移动通信有限公司 Application program control method, device, terminal and computer readable storage medium
CN110602359B (en) * 2019-09-02 2022-01-18 Oppo广东移动通信有限公司 Image processing method, image processor, photographing device and electronic equipment
CN112558745A (en) * 2019-09-24 2021-03-26 中兴通讯股份有限公司 Method and device for freezing control of terminal application program, terminal and storage medium
EP3876383A1 (en) 2020-03-02 2021-09-08 Nokia Technologies Oy Data communications
CN112181515A (en) * 2020-09-18 2021-01-05 Oppo(重庆)智能科技有限公司 Application program control method, device, terminal and storage medium
CN112272398B (en) * 2020-11-13 2024-01-19 Oppo广东移动通信有限公司 Data transmission method and device, electronic equipment and storage medium
CN112947739A (en) * 2021-03-09 2021-06-11 北京小米移动软件有限公司 Terminal application program management method and device, terminal and storage medium
CN113781703A (en) * 2021-09-01 2021-12-10 深兰科技(上海)有限公司 Control method, device, medium and equipment for vending equipment
CN116501162B (en) * 2023-04-23 2023-11-24 深圳中柏科技有限公司 Method and device for automatically adjusting power consumption of intelligent notebook computer and electronic equipment

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9603094B2 (en) * 2013-06-09 2017-03-21 Apple Inc. Non-waking push notifications
CN103365399B (en) * 2013-06-26 2017-02-08 贝壳网际(北京)安全技术有限公司 Control method and device for application object of mobile terminal
CN103412636A (en) * 2013-08-05 2013-11-27 Tcl通讯(宁波)有限公司 Power saving system and power saving method of intelligent terminal
WO2016165078A1 (en) * 2015-04-14 2016-10-20 华为技术有限公司 Method and terminal for controlling application
US10114449B2 (en) * 2015-11-23 2018-10-30 International Business Machines Corporation Predicting voltage guardband and operating at a safe limit
CN105892613A (en) * 2015-12-04 2016-08-24 乐视移动智能信息技术(北京)有限公司 Method and apparatus for clearing background applications
CN106200872A (en) * 2016-06-30 2016-12-07 维沃移动通信有限公司 A kind of terminal and the management method of power consumption thereof
CN106125899A (en) * 2016-07-01 2016-11-16 北京金山安全软件有限公司 Method and device for stopping process and mobile terminal
CN106502369A (en) * 2016-10-28 2017-03-15 青岛海信电器股份有限公司 Power consumption management method and equipment
CN106648032B (en) * 2016-12-30 2018-09-04 维沃移动通信有限公司 A kind of control method and mobile terminal of the application program of running background

Also Published As

Publication number Publication date
CN107329559A (en) 2017-11-07

Similar Documents

Publication Publication Date Title
CN107329559B (en) Application program control method, device, terminal and storage medium
US11416061B2 (en) Terminal control method and apparatus, and terminal
CN111343682B (en) Network switching method, device, storage medium and terminal
CN111158455A (en) Power consumption control method and device, storage medium and terminal
US11381100B2 (en) Method for controlling multi-mode charging, mobile terminal, and storage medium
CN112424725A (en) Application program control method and electronic equipment
CN110912574B (en) SIM card detection method, device, storage medium and terminal
CN106532876B (en) Power supply control method and device and computer equipment
CN108111683B (en) Mobile terminal, control method and device of working mode of mobile terminal, and storage medium
CN111538391A (en) Temperature control method and device, storage medium and terminal
CN112542867B (en) Mobile terminal power supply control method and device, terminal equipment and storage medium
CN112997132A (en) Application freezing method and device and electronic equipment
CN110471622B (en) SD card data writing method and device, storage medium and terminal
CN115543500A (en) Window processing method and electronic equipment
CN112448419A (en) Mobile terminal charging state switching method and device
CN111343325B (en) Port detection method and device, mobile terminal and storage medium
CN111987764B (en) Discharge control method and device, storage medium and mobile terminal
CN108521676B (en) Network back connection method and device
CN112449410A (en) Communication terminal working state switching method and device
CN112531835A (en) Charging method and device of mobile terminal, storage medium and mobile terminal
CN111459528A (en) Frequency band upgrading method, system, storage medium and mobile terminal
CN112486414A (en) Data processing method and device, storage medium and mobile terminal
CN112558749A (en) Power supply control method and device, storage medium and mobile terminal
CN113131549A (en) Charging control method and related equipment
CN110708746A (en) Communication control method, communication control device, storage medium and mobile terminal

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