Disclosure of Invention
The invention mainly solves the technical problem of providing a background cleaning method and a mobile terminal, which can clean the background in time in a specific scene and avoid the interference of a background application program to a user.
In order to solve the above problems, the present invention adopts a technical solution that: a method for cleaning a background is provided, which comprises the following steps:
judging whether a preset schedule exists at present, and if so, reading the content of the schedule and analyzing to obtain the type of the schedule;
and judging whether an application program associated with the type of the schedule is running or not, and if so, ending the application program process.
Wherein the application setting method associated with the type of schedule includes:
associating the type of schedule with the application that needs cleaning;
and saving the type of the schedule and the corresponding relation between the schedule and the application program.
Wherein the determining whether an application associated with the type of schedule is running comprises:
judging whether the type of the schedule is the type of the stored schedule or not;
when the type of the schedule is the type of the stored schedule, whether an application program corresponding to the type of the schedule is running is continuously judged, and when the corresponding application program is running, the application program associated with the type of the schedule is judged to be running.
The type of the schedule is any one of office, meeting, going out and resting, and the application program is any one of games, audio and video players, social contact and chatting.
Wherein the method further comprises:
and judging whether the current schedule is finished or not, and recovering the finished application program process when the schedule is finished.
In order to solve the above problems, the present invention adopts another technical solution: there is provided a mobile terminal including:
the schedule analysis module is used for judging whether a preset schedule exists at present, and if so, reading the content of the schedule and analyzing to obtain the type of the schedule;
and the process management module is used for judging whether an application program associated with the type of the schedule is running or not, and if so, ending the application program process.
Wherein the terminal further comprises an association management module for setting an application associated with the type of schedule, comprising:
the association unit is used for associating the type of the schedule with the application program needing to be cleaned;
and the storage unit is used for storing the type of the schedule and the corresponding relation between the schedule and the application program.
Wherein the process management module further comprises:
a first judgment unit configured to judge whether the type of the schedule is a type of a stored schedule;
and a second judging unit, configured to, when the type of the schedule is a type of a stored schedule, continuously judge whether an application corresponding to the type of the schedule is running, and when the corresponding application is running, judge that there is an application associated with the type of the schedule that is running.
The type of the schedule obtained by the schedule analysis module is any one of office, meeting, going out and resting, and the application program ended by the schedule management module is any one of game, audio and video player, social contact and chat.
Wherein, the process management module further comprises:
and the third judging unit is used for judging whether the current schedule is finished or not, and restoring the finished application program process when the schedule is finished.
The invention has the beneficial effects that: by identifying the type of the current schedule, the background application program associated with the type of the schedule is cleaned in time, so that the interference to a user is avoided, and the power consumption is reduced.
Detailed Description
The present invention will be described in detail with reference to the accompanying drawings and specific embodiments.
Referring to fig. 1, fig. 1 is a schematic flow chart of an embodiment of a method for cleaning a background according to the present invention, the method includes:
s100: judging whether a preset schedule exists at present, if so, reading the content of the schedule, and analyzing to obtain the type of the schedule.
The mobile terminal reads a file for storing the schedule and judges whether the current time has a preset schedule, specifically, a user can set and store some important schedule in advance, for example, a schedule at 10-11 points on the day is set to be a meeting; and if a schedule is arranged for driving, traveling and the like at 2-3 pm, judging that the preset schedule exists if the preset time is reached, and judging that the preset schedule does not exist when the schedule is not preset by the user at the current time.
And when the preset schedule is judged to exist at the current time, reading the content of the schedule, extracting keywords in the content, and analyzing according to the keywords to obtain the type of the schedule. For example, when the content of the schedule is "join a certain meeting at a certain place", the type of the schedule is "meeting" according to the keyword "join" or "meeting" through analysis; and when the schedule content is 'driving to the park', analyzing to obtain that the type of the schedule is 'travel' according to the keyword 'driving'.
Specifically, step S100 can analyze that the type of the schedule is any one of office, meeting, travel, and rest according to the content of the schedule.
S200: and judging whether an application program associated with the type of the schedule is running or not, and if so, ending the application program process.
After the type of the schedule is analyzed in step S100, it is continuously determined whether there is an application program associated with the type of the schedule running, and if so, the application program process is ended, where the application program associated with the type of the schedule is preset by the user in this embodiment.
Referring to fig. 2, fig. 2 is a flow chart illustrating a method for setting an application program associated with the type of schedule according to the present invention, the method comprising:
s110: the type of schedule is associated with the application that needs to be cleaned.
The user associates the type of schedule with the application that needs cleaning in advance, for example, associates travel with applications such as social and chat, which may include chat software such as QQ, WeChat, and the like; the conference or the office is associated with the application programs such as games, audio and video players and the like, and the association between the type of the schedule and the application program needing to be cleaned is set by a user according to actual needs, without limitation.
Specifically, the application program is any one of games, audio and video players, social contact and chatting.
S120: and saving the type of the schedule and the corresponding relation between the schedule and the application program.
The type of the schedule and the correspondence with the application program may be saved in the form of a table.
It will be appreciated that in other embodiments, the type of schedule and the correspondence with the applications may be set by the system, not necessarily in advance by the user.
Referring to fig. 3, the step S200 of determining whether an application associated with the type of the schedule is running includes:
s210: determining whether the type of schedule is a type of saved schedule.
When the type of the schedule is analyzed in step S100, the type is compared with the type stored in step S120, and it is determined whether the type is the type of the schedule stored in step S120.
S220: when the type of the schedule is the type of the stored schedule, whether an application program corresponding to the type of the schedule is running is continuously judged, and when the corresponding application program is running, the application program associated with the type of the schedule is judged to be running.
When the type is determined to be the type saved in step S120 in step S210, the application program that needs to be cleaned and corresponds to the type is read, and whether the application program is running is determined, and when the application program is running, it is determined that there is an application program associated with the type of the schedule that is running.
When there is an application associated with the type of schedule that is running, then the process of the application is ended, otherwise no action is taken.
In other embodiments, step S200 is followed by: and judging whether the current schedule is finished or not, and recovering the finished application program process when the schedule is finished. Specifically, the end time corresponding to the schedule is read, whether the current time reaches the end time is judged, and when the end time reaches the end time, the current schedule is judged to be ended, and the ended application program process is recovered, so that a user can conveniently start the application program.
Referring to fig. 4, fig. 4 is a schematic structural diagram of a mobile terminal according to an embodiment of the present invention, where the mobile terminal includes:schedule analysis module 41,process management module 42.
And theschedule analysis module 41 is configured to determine whether a preset schedule exists currently, and if so, read the content of the schedule and analyze the content to obtain the type of the schedule.
Theschedule analysis module 41 reads a file storing a schedule, determines whether a preset schedule exists at the current time, reads the content of the schedule when the preset schedule exists, extracts the keywords of the content, and analyzes the type of the schedule according to the keywords, for example, when the content of the schedule is "join a certain meeting at a certain place", theschedule analysis module 41 analyzes the content of the schedule according to the keywords "join" and "meeting", and obtains the type of the schedule as "meeting".
Theschedule analysis module 41 can analyze the type of the schedule to be any one of office, meeting, travel and rest.
And theprocess management module 42 is used for judging whether an application program associated with the type of the schedule is running or not, and if so, ending the application program process.
Theprocess management module 42 determines whether an application associated with the type is running according to the schedule type analyzed by theschedule analysis module 41, and ends the program when the program is running.
The application program finished by theprocess management module 42 is any one of games, audio and video players, social contact and chatting.
The mobile terminal further comprises anassociation management module 43 for setting up an application associated with the type of schedule, including:
an associatingunit 431 for associating the type of schedule with the application that needs to be cleaned.
The associatingunit 431 associates the type of schedule with an application that needs to be cleaned in advance, for example, associates travel with an application of social interaction, chat, or the like, and associates a meeting or office with a game, audio-video player, or the like.
A savingunit 432, configured to save the type of the schedule and the corresponding relationship between the schedule and the application program.
Referring to fig. 4, theprocess management module 42 specifically includes:
afirst judging unit 421, configured to judge whether the type of the schedule is a type of a stored schedule.
When theschedule analysis module 41 obtains the type of the schedule by analysis, thefirst judgment unit 421 compares the type with the type stored in thestorage unit 432, and judges whether the type is the type of the schedule stored in thestorage unit 432.
A second determiningunit 422, configured to, when the type of the schedule is the type of the saved schedule, continue to determine whether an application corresponding to the type of the schedule is running, and when the corresponding application is running, determine that there is an application associated with the type of the schedule that is running.
When the first determiningunit 421 determines that the type of the schedule is the type stored in thestoring unit 432, the second determiningunit 422 reads the application program that needs to be cleaned and is corresponding to the type stored in thestoring unit 432, and determines whether the application program is running, and when the second determiningunit 422 determines that the application program associated with the type of the schedule is running, the application program is ended.
Meanwhile, in other embodiments, theprocess management module 42 further includes a third determiningunit 423 for determining whether the current schedule is finished, and when the schedule is finished, recovering the finished application process.
The third determiningunit 423 compares the current time with the ending time corresponding to the schedule, determines whether the schedule is ended, and when the schedule is ended, restores the ended application program, so that the user can start the application program conveniently.
Referring to fig. 5, fig. 5 is a schematic structural diagram of a mobile terminal according to another embodiment of the present invention. The terminal may perform the steps performed by the terminal in the above method. For related content, please refer to the detailed description of the above method, which is not repeated herein.
The terminal includes: areceiver 51, aprocessor 52, amemory 53, and atransmitter 54.
Thereceiver 51 is used to receive network data.
Thememory 53 is used for storing an operating system, instructions executed by theprocessor 52, received messages, and the like.
Thetransmitter 54 is used to transmit data.
Theprocessor 52 is configured to preset a corresponding relationship between a type of a stored schedule and an application program that needs to be cleaned, determine whether a preset schedule exists at a current time, read contents of the schedule when the preset schedule exists, analyze the type of the schedule, continuously determine whether an application program associated with the type of the schedule is running according to the type of the schedule, and end the application program process when the application program exists.
In other embodiments, theprocessor 52 is further configured to determine whether the current schedule is finished, and when the schedule is finished, resume the finished application process.
Theprocessor 52 can analyze that the type of the schedule is any one of office, meeting, going out and resting, and the application program capable of ending is any one of game, audio and video player, social contact and chat.
Different from the prior art, the method and the device can timely clean the background application program associated with the type of the schedule by identifying the type of the current schedule, reduce power consumption and avoid interference on users.
The above description is only an embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications made by equivalent structures or equivalent processes, or directly or indirectly applied to other related technical fields, which are made by the present specification and drawings, are included in the scope of the present invention.