Detailed Description
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, 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 flowchart illustrating a background program control method of a mobile terminal according to an embodiment of the present invention. As shown in fig. 1, the method for controlling a background program of a mobile terminal in an embodiment of the present invention may include:
and step S101, monitoring and acquiring the behavior of the application program calling the timer service.
And step S102, displaying the behavior of the application program for calling the timer service.
Step S103, acquiring command information input by a user.
Step S104, judging whether the command information input by the user is consistent with preset judgment information or sub-information of the preset judgment information, and if so, executing step S105; if not, go to step S106.
Step S105, executing an instruction matched with the preset determination information or the sub-information of the preset determination information to continue, suspend or terminate the behavior of the application program calling the timer service.
Step S106, prompting the user to: if the input is invalid, please re-input.
In specific implementation, a behavior of an application program calling a timer service is obtained firstly; displaying any application program with the current service behavior of calling the timer to a user, selecting the application program to be operated after the user checks the application program, and inputting command information; judging whether the command information input by the user is consistent with preset judgment information or sub-information of the preset judgment information; if the judgment information is consistent with the preset judgment information, executing an instruction matched with the preset judgment information or the sub information of the preset judgment information; if not, prompting the user: if the input is invalid, please re-input.
In this embodiment of the present invention, the instruction matched with the preset determination information may be: continuing the act of allowing the application to invoke the timer service, aborting the act of invoking the timer service by the application, and terminating the act of invoking the timer service by the application. The instruction matched with the sub information of the preset judgment information may be: continuing to allow the application program to call the behavior of the timer service within a certain time period, and automatically forbidding the application program to call the behavior of the timer service when the certain time period is over; the instruction matched with the sub-information of the preset judgment information may also be: and stopping the behavior of calling the timer service by the application program within a certain time period, and automatically starting the behavior of calling the timer service by the application program after the time period is ended.
By the embodiment of the invention, the user can check the application program for calling the timer service at the background at any time, and autonomously determine whether to continue to allow or not according to personal needs, and suspend or terminate the application program for calling the timer service, so that the user can effectively control the action of calling the timer service by the application program, and the electric quantity is effectively saved.
Fig. 2 is a flowchart illustrating a background program control method of a mobile terminal according to another embodiment of the present invention. As shown in fig. 2, the method for controlling a background program of a mobile terminal according to an embodiment of the present invention may include:
step S201, setting preset judgment information, and an instruction matching the preset judgment information.
Step S202, setting the sub information of the preset judgment information and an instruction matched with the sub information of the preset judgment information.
Step S203, receiving the request of the user for viewing the service behavior of the application program calling timer.
Step S204, determining that the behavior of the application program calling the timer service exists.
And step S205, displaying the behavior of the application program calling the timer service.
In step S206, command information input by the user is acquired.
Step S207, judging whether the command information input by the user is consistent with preset judgment information or sub-information of the preset judgment information, if not, executing step S208; if yes, go to step S209.
Step S208, prompting the user to: if the input is invalid, please re-input.
Step S209, executing an instruction matched with the preset determination information or the sub-information of the preset determination information to continue, suspend or terminate the behavior of the application program calling the timer service.
In the specific implementation, a user firstly sets preset judgment information and an instruction matched with the preset judgment information; setting sub information of the preset judgment information and an instruction matched with the sub information of the preset judgment information; receiving a request of a user for viewing the application program to call the timer service; determining that there is a behavior of an application program calling a timer service; displaying the behavior of the application program calling the timer service to a user; acquiring command information input by a user and judging whether the command information is consistent with preset judgment information or sub-information of the preset judgment information, if not, prompting the user: if the input is invalid, please re-input; and if the judgment information is consistent with the preset judgment information, executing an instruction matched with the preset judgment information or the sub information of the preset judgment information.
In the embodiment of the invention, a user can freely set the preset judgment information, the preset sub-information of the judgment information and the command instruction matched with the preset judgment information and the preset sub-information of the judgment information according to the requirement. The user may input command information through a keyboard, voice, etc., and the preset determination information and the sub-information of the preset determination information may be text information or voice information. The instruction matched with the preset determination information may be: continuing the act of allowing the application to invoke the timer service, aborting the act of invoking the timer service by the application, and terminating the act of invoking the timer service by the application. The instruction matched with the sub information of the preset judgment information may be: continuing to allow the application program to call the behavior of the timer service within a certain time period, and automatically forbidding the application program to call the behavior of the timer service when the certain time period is over; the instruction matched with the sub-information of the preset judgment information may also be: and stopping the behavior of calling the timer service by the application program within a certain time period, and automatically starting the behavior of calling the timer service by the application program after the time period is ended.
Through the embodiment of the invention, a user can freely set the preset judgment information, the preset sub-information of the judgment information and the command instruction matched with the preset judgment information and the preset sub-information of the judgment information according to the requirement; the mode of the user for inputting the command can also be keyboard input, voice input and the like; the electric quantity is effectively saved, and meanwhile, the user experience is improved.
Fig. 3 is a schematic structural diagram of a mobile terminal according to an embodiment of the present invention. As shown in fig. 3, the mobile terminal in the embodiment of the present invention may include: a monitoring module 11, a user interface module 12, a decision module 13 and an execution module 14.
And the monitoring module 11 is used for monitoring and acquiring whether the application program has the action of calling the timer service.
And the user interface module 12 is configured to display an application program list of the timer service invoking behavior at the current time according to the monitoring result of the monitoring module 11, and receive command information of the user.
A determining module 13, configured to determine whether the command information of the user received by the user interface module 12 is consistent with preset determining information or sub-information of the preset determining information.
And the execution module 14 is configured to execute an instruction matched with the preset judgment information or the sub-information of the preset judgment information after the judgment module 13 judges that the command information of the user is consistent with the preset judgment information or the sub-information of the preset judgment information, so as to continue, suspend or terminate the behavior of the application program calling the timer service.
In a specific implementation, the monitoring module 11 of the embodiment of the present invention monitors network traffic occupied by all the application programs in the background, and when the network traffic occupied by the application programs in the background exceeds a certain threshold, it determines that the application programs have a behavior of calling a timer service.
As can be seen from the above, in the embodiment of the present invention, the user can obtain the list of the application programs currently calling the timer service at any time through the monitoring module 11 and the user interface module 12, and input the command information. By the judging module 13 and the executing module 14 autonomously controlling whether to continue allowing, suspending or terminating the application program calling the timer service, the mobile terminal in the embodiment of the invention can effectively control the action of the application program calling the timer service, thereby effectively saving electric quantity.
Referring to fig. 4 and 5, fig. 4 is a schematic structural composition diagram of another embodiment of the mobile terminal of the present invention, and fig. 5 is a schematic diagram of a memory module of an embodiment of the mobile terminal of the present invention.
As shown in fig. 4, the mobile terminal in the embodiment of the present invention may include:
and the monitoring module 21 is used for monitoring and acquiring whether the application program has the action of calling the timer service.
A determination module 22 for determining that there is an application invoking the timer service behavior.
And the user interface module 23 is configured to display an application program list of the timer service invoking behavior at the current time according to the confirmation result of the confirmation module 22, and receive command information of the user.
The storage module 24 is configured to store the preset determination information and the sub-information of the preset determination information, and an instruction matching the preset determination information and the sub-information of the preset determination information.
A determining module 25, configured to determine whether the command information of the user received by the user interface module 23 is consistent with the preset determining information or the sub-information of the preset determining information in the storage module 25.
And the execution module 26, after the determination module 25 determines that the command information of the user is consistent with the preset determination information or the sub-information of the preset determination information, is configured to execute an instruction matched with the preset determination information or the sub-information of the preset determination information, so as to continue, suspend or terminate the behavior of the application program calling the timer service.
As shown in fig. 5, the storage module 24 may include: a first preset information storage unit 241 for storing the preset determination information; a second preset information storage unit 242, configured to store sub information of the preset determination information; an instruction storage unit 243, configured to store an instruction that matches the preset determination information or the sub information of the preset determination information.
In a specific implementation, the preset determination information stored in the first preset information storage unit 241 may include: information of an action allowing the application to invoke a timer service; information to suspend the behavior of the application to invoke timer services; information terminating the behavior of the application program invoking the timer service. The sub information of the preset determination information stored in the second preset information storage unit 242 may include: time length information that allows the application to invoke the behavior of a timer service; time length information of an action of the application program calling a timer service is suspended. The instructions stored in the instruction storage unit 243 may include: continuing to allow the application to invoke a timer service; a length of time that continues to allow the application to invoke a timer service; suspending the application from invoking a timer service; suspending a length of time that the application calls a timer service; the application is completely terminated from invoking the timer service.
In a specific implementation, the user interface module 23 may include a keyboard, a touch screen, and a voice transceiving mobile terminal. The preset judgment information stored in the first preset information storage unit 241 and the sub-information of the preset judgment information stored in the second preset information storage unit 242 may be text information or voice information.
In a specific implementation, the first preset information storage unit 241 and the second preset information storage unit 242 may be one information storage unit.
Through the embodiment of the invention, a user can freely set the preset judgment information and the preset sub-information of the judgment information as required, and command instructions matched with the preset judgment information and the preset sub-information of the judgment information to the storage module 24; the mode of the user interface module 23 for receiving the user input command can also be keyboard input, voice input and the like; the electric quantity is effectively saved, and meanwhile, the user experience is improved.
The sequence of the steps of the method of the embodiment of the invention can be adjusted according to actual needs. The modules of the mobile terminal of the embodiment of the invention can be integrated and further divided according to actual needs. The mobile terminal of the embodiment of the invention can be a mobile phone, a computer, a portable device and the like.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like.
While the invention has been described with reference to a preferred embodiment, it will be understood by those skilled in the art that various changes in form and detail may be made therein without departing from the spirit and scope of the invention.