Summary of the invention
In view of this, the application provides a kind of application control method and device.
Particularly, the application is achieved by the following technical solution:
A kind of application management method, described method comprises:
Monitor the application program of running background;
Judge whether described application program meets the closedown condition preset;
If described application program meets described default closedown condition, then close described application program.
Further, describedly judge that whether described application program meets the closedown condition preset and comprise:
Judge whether described application program does not receive the information of service end transmission within the time of presetting.
Further, described method also comprises:
After the described application program of closedown, the service end according to the authentication information of user in described application program and described application program connects;
Based on described connection, receive the information that service end sends to described application program.
Further, described method also comprises:
Generate user's prompting according to described information, select whether check described information for user.
Further, described method also comprises:
After the information inspection instruction receiving user, disconnect described connection and call described application program, described information is given to described application program.
A kind of application program management device, described device comprises:
Monitoring unit, monitors the application program of running background;
Judging unit, judges whether described application program meets the closedown condition preset;
Closing unit, when described application program meets described default closedown condition, closes described application program.
Further, described judging unit, specifically judges whether described application program does not receive the information of service end transmission within the time of presetting.
Further, described device also comprises:
Set up unit, after the described application program of closedown, the service end according to the authentication information of user in described application program and described application program connects;
Receiving element, based on described connection, receives the information that service end sends to described application program.
Further, described device also comprises:
Generation unit, generates user's prompting according to described information, chooses whether check described information for user.
Further, described device also comprises:
Call unit, after the information inspection instruction receiving user, disconnects described connection and calls described application program, described information is given to described application program.
Described as can be seen from above, the application program of the application's monitor terminal running background, when described application program does not receive the information of service end transmission within the time of presetting, by closing described application program, to reduce the occupancy of terminal CPU and internal memory, free system resources.Meanwhile, after the described application program of closedown, the application acts on behalf of described application program and service end connects, when service end sends information, can receive in time and be prompted to user, not reduce the experience of user.
Embodiment
Here will be described exemplary embodiment in detail, its sample table shows in the accompanying drawings.When description below relates to accompanying drawing, unless otherwise indicated, the same numbers in different accompanying drawing represents same or analogous key element.Embodiment described in following exemplary embodiment does not represent all embodiments consistent with the application.On the contrary, they only with as in appended claims describe in detail, the example of apparatus and method that some aspects of the application are consistent.
Only for describing the object of specific embodiment at term used in this application, and not intended to be limiting the application." one ", " described " and " being somebody's turn to do " of the singulative used in the application and appended claims is also intended to comprise most form, unless context clearly represents other implications.It is also understood that term "and/or" used herein refer to and comprise one or more project of listing be associated any or all may combine.
Term first, second, third, etc. may be adopted although should be appreciated that to describe various information in the application, these information should not be limited to these terms.These terms are only used for the information of same type to be distinguished from each other out.Such as, when not departing from the application's scope, the first information also can be called as the second information, and similarly, the second information also can be called as the first information.Depend on linguistic context, word as used in this " if " can be construed as into " ... time " or " when ... time " or " in response to determining ".
For the problems referred to above, the application provides a kind of application program management scheme.
Please refer to Fig. 1, the application provides a kind of application management method, is applied in terminal, said method comprising the steps of:
Step 101, monitors the application program of running background.
Step 102, judges whether described application program meets the closedown condition preset.
Step 103, if described application program meets described default closedown condition, then closes described application program.
Described as can be seen from above, the application pre-sets the closedown condition of application program, then by the application program of monitor terminal running background, when application program meets described closedown condition, close described application program, thus reduce the occupancy of terminal CPU and internal memory in time, free system resources.
The specific implementation of the application is described in detail below in conjunction with embodiment.
Please refer to Fig. 2, the schematic flow sheet of application management method in a kind of embodiment of the application, described method is applied in terminal, described terminal includes but not limited to: smart mobile phone, PDA (PersonalDigitalAssistant, palm PC) etc. the equipment of various application program can be installed, described application management method can comprise the following steps:
Step 201, monitors the application program of running background.
Terminal can run multiple application program usually simultaneously, wherein, represent the application program that the application program run on a display screen is terminal front stage operation, do not represent the application program that the application program run on a display screen is terminal running background.For android system, the application program of front stage operation can be switched to running background by choosing homepage button by user.
The application program of running background still maintains the connection of itself and service end, and can receive the information that service end sends, such as: chat messages, pushed information etc.When the application program of running background receives the information of service end transmission, user can be prompted in time.
In this step, each application program of monitor terminal running background can be carried out by default hook program or SDK (SoftwareDevelopmentKit, SDK (Software Development Kit)).
Step 202, judges whether described application program meets the closedown condition preset, if so, then performs step 203, if not, then continues to perform step 202.
Described default closedown condition can be arranged by developer, such as: can be the time that described application program is switched to backstage by described closedown condition setting, such as: 3 minutes, namely judge whether the time that described application program is switched to backstage arrives 3 minutes in this step.The application does not do particular restriction to this.
In a kind of preferred embodiment of the application, can be in default time, do not receive the information that service end sends by described closedown condition setting.Namely judge whether described application program does not receive the information of service end transmission within the time of presetting in this step.The described default time can be arranged by developer, also can be arranged according to the needs of oneself by user.In practical implementations, can by starting the control that timer realizes Preset Time.Such as: after certain application program is switched to backstage by foreground, start timer and start countdown, judge whether described application program receives the information of service end transmission before described timer expiry.
If described application program does not receive the information that service end sends within the time of presetting, then perform step 203 and close described application program.If described application program have received the information that service end sends within the time of presetting, be understandable that, although described application program is at running background, but still have alternately with service end, now can not close described application program, described application program make described application program can safeguard the connection with its service end, so that can be prompted to user in time when receiving the information that service end sends.
Step 203, closes described application program.
Based on above-mentioned steps 202, if described application program meets described default closedown condition, then close described application program.Particularly, the process that can use by terminating described application program realizes closing described application program.
Be still in default time, do not receive the information that service end sends for described closedown condition, if described application program does not receive the information that service end sends within the time of presetting, then terminate the process that described application program uses, the occupancy of terminal CPU and internal memory is reduced, free system resources with this.
Step 204, the service end according to the authentication information of user in described application program and described application program connects.
Based on above-mentioned steps 203, after terminating the process that described application program uses, the connection of described application program and its service end will be caused to disconnect, now, if described service end sends information to described application program, such as: chat messages, described application program cannot receive, and then cannot be prompted to user.So, in a kind of preferred embodiment of the application, after the described application program of closedown, be described application programming Proxy Signature Scheme, to replace described application program and its service end to connect, and receive based on described connection the information that service end sends to described application program.
In this step, after closing described application program, can come to connect with the service end of described application program by obtaining the authentication information of user in described application program.Described authentication information comprises: the information such as user login name, login password.Particularly, after the mandate obtaining user, the service end address etc. of the authentication information of user in described application program, described application program can be got, can connect with service end based on described service end address, such as: TCP (TransmissionControlProtocol, transmission control protocol) connects, and then sends to service end to verify the authentication information of described user, in verification by rear, can realize acting on behalf of described application program and its service end connects.This process services end cannot perception, for service end, can think that described application program is connected with it establishes.When service end has the information sending to described application program, the connection can set up based on this step sends described information.
Step 205, based on described connection, receives the information that service end sends to described application program.
Step 206, generates user's prompting according to described information, selects whether check described information for user.
Particularly, in this step, if the described information received can be resolved, then user's prompting will be generated after described information analysis.Such as: known described application program and mutual the used message format of service end, according to described message format, the clear content of the information that service end sends can be parsed, then generate user's prompting according to the clear content of described information.For example, the information that the service end parsing certain instant messaging application program according to described message format sends is chat messages from good friend A: good morning, then in this step, please refer to Fig. 3, directly can point out: " message from good friend A: good morning ", further, the icon of this instant messaging application program can be preserved in advance, described icon is represented, with the source allowing user clearly know this message while generation user prompting.
If the described information received can not be resolved, please refer to Fig. 4, directly can point out the information receiving certain application program.
It should be noted that, those skilled in the art are according to correlation technique, and while the described user's prompting of generation, can also export the tinkle of bells or vibrations accordingly, the application does not repeat them here.
After generation user prompting, if user selects to check described information, then perform step 207.If user does not select to check described information, then continue to safeguard that set up with the service end of described application program described is connected.
Step 207, after the information inspection instruction receiving user, disconnects described connection and calls described application program, described information is given to described application program.
Based on abovementioned steps 206, after generation user prompting, if receive the information inspection instruction of user, such as: user clicks described user and points out and check button in interface, then in this step, disconnect set up with service end described and be connected, and call described application program, described information is turned a described application program, such user just can check described information in described application program.
Described as can be seen from above, the application program of the application's monitor terminal running background, when described application program does not receive the information of service end transmission within the time of presetting, by closing described application program, to reduce the occupancy of terminal CPU and internal memory, free system resources.Meanwhile, after the described application program of closedown, the application acts on behalf of described application program and service end connects, when service end sends information, can receive in time and be prompted to user, not reduce the experience of user.
Corresponding with the embodiment of the application's application management method, present invention also provides a kind of embodiment of application program management device, described application of installation is in terminal.Device described in the application can pass through software simulating, also can be realized by the mode of hardware or software and hardware combining.For software simulating, the application's application program management device, as the device on a logical meaning, is by the processor of its place equipment, computer program instructions corresponding in nonvolatile memory read operation in internal memory and formed.
Please refer to Fig. 5 and Fig. 6, the application provides a kind of application program management device 500, and described device 500 includes: monitoring unit 501, judging unit 502, closing unit 503, set up unit 504, receiving element 505, generation unit 506 and call unit 507.
Described monitoring unit 501, monitors the application program of running background.
Described judging unit 502, judges whether described application program meets the closedown condition preset.
Described closing unit 503, when described application program meets described default closedown condition, closes described application program.
Further, described judging unit 502, specifically judges whether described application program does not receive the information of service end transmission within the time of presetting.
Describedly set up unit 504, after the described application program of closedown, the service end according to the authentication information of user in described application program and described application program connects.
Described receiving element 505, based on described connection, receives the information that service end sends to described application program.
Described generation unit 506, generates user's prompting according to described information, chooses whether check described information for user.
Described call unit 507, after the information inspection instruction receiving user, disconnects described connection and calls described application program, described information is given to described application program.
Described as can be seen from above, the application program of the application's monitor terminal running background, when described application program does not receive the information of service end transmission within the time of presetting, by closing described application program, to reduce the occupancy of terminal CPU and internal memory, free system resources.Meanwhile, after the described application program of closedown, the application acts on behalf of described application program and service end connects, when service end sends information, can receive in time and be prompted to user, not reduce the experience of user.
In said apparatus, the implementation procedure of the function and efficacy of unit specifically refers to the implementation procedure of corresponding step in said method, does not repeat them here.
The foregoing is only the preferred embodiment of the application, not in order to limit the application, within all spirit in the application and principle, any amendment made, equivalent replacements, improvement etc., all should be included within scope that the application protects.