A kind of management method and device inquiring about mail
Technical field
The present invention relates to communication technical field, particularly a kind of management method and device inquiring about mail.
Background technology
Along with the development of the communication technology and mobile terminal, increasing people uses mobile terminal receive anywhere or anytime and handle postal matter, and improves the operating efficiency of mobile office.
At present, when the screen of mobile terminal is closed, the query time interval that mobile terminal is arranged according to user, periodically wake the operating system of mobile terminal up, then transmission inquiry request is inquired about mail server to mail server and whether is received new mail, if receive new mail, then from mail server, obtain new mail immediately, and the indicating device opened on mobile terminal receives new mail to point out user.
Realizing in process of the present invention, inventor finds that prior art at least exists following problem:
When the screen of mobile terminal is closed, periodically wake the operating system of mobile terminal up and inquire about new mail, the power consumption of mobile terminal can be made to become large, reduce the stand-by time of mobile terminal.
Summary of the invention
In order to solve the problem of prior art, embodiments provide a kind of management method and the device of inquiring about mail.Described technical scheme is as follows:
First aspect, a kind of management method of inquiring about mail that the embodiment of the present invention provides comprises:
When the screen of mobile terminal is closed, inquire about in mail server whether have not by the new mail of described acquisition for mobile terminal according to the first preset time period;
After the screen of described mobile terminal is closed, and inquire in described mail server when having not by the new mail of described acquisition for mobile terminal first, stop continuing inquiring about in described mail server whether have not by the new mail of described acquisition for mobile terminal according to described first preset time period.
In the first possible implementation of first aspect, described inquiring first in described mail server has not by after the new mail of described acquisition for mobile terminal, and described method also comprises:
Open the Indication message for pointing out user to receive new mail.
In conjunction with the first possible implementation of first aspect, in the implementation that the second is possible, described unlatching, for the Indication message of pointing out user to receive new mail, specifically comprises:
Obtain from described mail server not by the new mail of described acquisition for mobile terminal in the described mail server inquired first, and open the Indication message for pointing out user to receive new mail.
In the third possible implementation of first aspect, whether described stopping continues to inquire about in described mail server have not by after the new mail of described acquisition for mobile terminal according to described first preset time period, and described method also comprises:
When the screen opening of described mobile terminal, inquire about in described mail server and whether have not by the new mail of described acquisition for mobile terminal, if had, then obtain from described mail server not by the new mail of described acquisition for mobile terminal.
In the 4th kind of possible implementation of first aspect, described method also comprises:
When the screen opening of described mobile terminal, inquire about described mail server whether have not by the new mail of described acquisition for mobile terminal according to the second preset time period;
When inquire in described mail server have not by the new mail of described acquisition for mobile terminal time, stop continuing to inquire about described mail server whether have not by the new mail of described acquisition for mobile terminal according to described second preset time period, and obtain described new mail from described mail server after waiting for the 3rd Preset Time;
When getting described new mail, inquiring about described mail server whether have not by the new mail of described acquisition for mobile terminal according to described second preset time period.
Second aspect, a kind of management devices inquiring about mail that the embodiment of the present invention provides comprises:
Whether the first enquiry module, for when the screen of mobile terminal is closed, inquire about in mail server have not by the new mail of described acquisition for mobile terminal according to the first preset time period;
Second enquiry module, for after the screen of described mobile terminal is closed, and inquire in described mail server when having not by the new mail of described acquisition for mobile terminal first, stop continuing inquiring about in described mail server whether have not by the new mail of described acquisition for mobile terminal according to described first preset time period.
In the first possible implementation of second aspect, described device also comprises:
Opening module, for opening the Indication message for pointing out user to receive new mail.
In conjunction with the first possible implementation of second aspect, described opening module specifically for obtaining from described mail server not by the new mail of described acquisition for mobile terminal in the described mail server that inquires first, and opens the Indication message for pointing out user to receive new mail.
In the third possible implementation of second aspect, described device also comprises:
First acquisition module, for when the screen opening of described mobile terminal, inquire about in described mail server and whether have not by the new mail of described acquisition for mobile terminal, if had, then obtain from described mail server not by the new mail of described acquisition for mobile terminal.
In the 4th kind of possible implementation of second aspect, described device also comprises:
Whether the 3rd enquiry module, for when the screen opening of described mobile terminal, inquire about described mail server have not by the new mail of described acquisition for mobile terminal according to the second preset time period;
Second acquisition module, for when inquire in described mail server have not by the new mail of described acquisition for mobile terminal time, stop continuing to inquire about described mail server whether have not by the new mail of described acquisition for mobile terminal according to described second preset time period, and obtain described new mail from described mail server after waiting for the 3rd Preset Time;
Whether the 4th enquiry module, for when getting described new mail, inquiring about described mail server have not by the new mail of described acquisition for mobile terminal according to described second preset time period
The beneficial effect that the technical scheme that the embodiment of the present invention provides is brought is:
By when the screen of mobile terminal is closed, after inquiring new mail first, stop continuing inquiry new mail, decrease the number of times of wake operation system, reduce power consumption and improve time of mobile terminal standby.
Accompanying drawing explanation
In order to be illustrated more clearly in the technical scheme in the embodiment of the present invention, below the accompanying drawing used required in describing embodiment is briefly described, apparently, accompanying drawing in the following describes is only some embodiments of the present invention, for those of ordinary skill in the art, under the prerequisite not paying creative work, other accompanying drawing can also be obtained according to these accompanying drawings.
Fig. 1 is the management method flow chart of the inquiry mail that the embodiment of the present invention one provides;
Fig. 2 is the management method flow chart of the inquiry mail that the embodiment of the present invention two provides;
Fig. 3 is the management devices structural representation of the inquiry mail that the embodiment of the present invention three provides;
Fig. 4 is the management devices structural representation of the inquiry mail that the embodiment of the present invention four provides.
Embodiment
For making the object, technical solutions and advantages of the present invention clearly, below in conjunction with accompanying drawing, embodiment of the present invention is described further in detail.
Embodiment one
Embodiments provide a kind of management method of inquiring about mail, see Fig. 1, method flow comprises:
101: when the screen of mobile terminal is closed, inquire about in mail server whether have not by the new mail of described acquisition for mobile terminal according to the first preset time period;
102: after the screen of described mobile terminal is closed, and inquire in described mail server when having not by the new mail of described acquisition for mobile terminal first, stop continuing inquiring about in described mail server whether have not by the new mail of described acquisition for mobile terminal according to described first preset time period.
By when the screen of mobile terminal is closed, after inquiring new mail first, stop continuing inquiry new mail, decrease the number of times of wake operation system, reduce power consumption and improve time of mobile terminal standby.
Embodiment two
Embodiments provide a kind of management method of inquiring about mail, see Fig. 2, method flow comprises:
201: when the screen of mobile terminal is closed, inquire about in mail server whether have not by the new mail of described acquisition for mobile terminal according to the first preset time period.
Wake the operating system of mobile terminal up according to the first preset time period, send Ping order as the request inquiring about new mail to mail server, inquire about mail server and whether receive new mail.Wherein inquire about the user name and password of in the request of new mail, carrying subscriber mailbox account.
202: after the screen of described mobile terminal is closed, and inquire in described mail server when having not by the new mail of described acquisition for mobile terminal first, stop continuing inquiring about in described mail server whether have not by the new mail of described acquisition for mobile terminal according to described first preset time period.
Preferably, when inquiring in mail server the new mail having mobile terminal not get first under mobile terminal closedown screen state, inquire new mail by indicating device reminding user, now can obtain the mail arrived at screen closedown inquiry under condition, now perform step 203; Can inquire new mail by indicating device reminding user, but mobile terminal does not now carry out the step obtaining new mail, after standby communication terminal opens screen, perform the step 204 obtaining mail yet.
203: open the Indication message for pointing out user to receive new mail.
Concrete, when inquiring the new mail that mobile terminal do not get in step 202., obtain from described mail server not by the new mail of described acquisition for mobile terminal in the described mail server inquired first, and open the Indication message for pointing out user to receive new mail.Wherein Indication message can be: by lighting the mode reminding user of the indicator light on mobile terminal, can also for being sent the mode reminding user of the tinkle of bells by the loud speaker of mobile terminal.
Further, inquiring in mail server the new mail having and be not moved terminal and obtain, after have received new mail in the mail account of i.e. user, carry out the process obtaining mail: the mail synchronization thread to the operating system of mobile terminal sends the notice of synchronous mail, mail synchronization thread sets up the synchronized links with mail server according to notice, and send the request obtaining mail to mail server according to synchronized links, be received in the new mail inquired first after closing screen.Now new mail can be an envelope also can be many envelopes, owing to being inquire about new mail according to the first preset time period, likely can receiving and seal mail more in the first Preset Time therefore experienced between twice inquiry new mail.
After obtaining mail, after disconnecting the synchronized links with mail server, until user operation mobile terminal carries out unblock unlatching screen consult mail, mobile terminal no longer carries out the process of the inquiry of mail and the synchronous acquisition of mail in this stage.
204: when the screen opening of described mobile terminal, inquire about in described mail server and whether have not by the new mail of described acquisition for mobile terminal, if had, then obtain from described mail server not by the new mail of described acquisition for mobile terminal.
Changing at user operation mobile terminal state opens before screen carries out consulting mail, the mail applications of mobile terminal with regard to no longer carrying out any operation (wherein operation comprises the request sending inquiry new mail and the request sending synchronous mail), therefore can not increase any power consumption after receiving new mail first.When mail consulted by user's operating mobile terminal unlatching screen, then carry out other new mails that networking obtains disconnection mail synchronization connection rear arrival mail server, the power consumption of receiving emails of now networking just belongs to the power consumption after opening screen.
205: when the screen opening of described mobile terminal, inquire about described mail server whether have not by the new mail of described acquisition for mobile terminal according to the second preset time period.
This step can in step 204 mobile terminal by screen close be converted to screen opening after the step of carrying out, also can be the mail reception process of carry out of mobile terminal when normal running screen starts, this sequential relationship not limited at this.
Whether during the unlatching screen state of mobile terminal, regularly send Ping order as the request inquiring about new mail to mail server according to the second Preset Time, inquiring about mail server has new mail.
206: when inquire in described mail server have not by the new mail of described acquisition for mobile terminal time, stop continuing to inquire about described mail server whether have not by the new mail of described acquisition for mobile terminal according to described second preset time period, and obtain described new mail from described mail server after waiting for the 3rd Preset Time.
When inquiring new mail, be not that real-time carrying out is collected, the process of synchronous mail is carried out with mail server again after waiting for the 3rd Preset Time, mail synchronization thread to operating system sends the notice of synchronous mail, mail synchronization thread carries out the process of synchronous mail according to notice, send the request of synchronous mail to mail server, obtain new mail.The regularity that focuses in this stage mails, and compared to the strategy collected in real time, neither affects Consumer's Experience and can reduce power consumption again.
207: when getting described new mail, inquire about described mail server whether have not by the new mail of described acquisition for mobile terminal according to described second preset time period.
Such as, user configures mailbox and arranges mail and collects interval, and as 10 minutes collect once, namely the first Preset Time and the second Preset Time are 10 minutes.Be example by average every 5 minutes mail servers receive an envelope mail, user opens screen and consults current paid-in mail, then closes screen and enters holding state.After 10 minutes, mail server side has two envelope new mails to wait to collect, and at this moment mobile terminal carries out networking synchronously collect according to the second Preset Time of acquiescence, lights indicator light and notifies that user has new mail, now disconnect the connection of mail server after getting the mail.If user again lights screen and consults mail after 30 minutes, at this moment user can see the two envelope mails collected for first 10 minutes, the gap utilizing user to consult to have got the mail, and 4 envelope mails of latter 20 minutes arrival mail servers are collected in networking.
The embodiment of the present invention is by when the screen of mobile terminal is closed, inquiring new mail first and after obtaining this new mail, stop continuing inquiry new mail, and again carry out the inquiry of new mail and the process of acquisition when the screen opening of mobile terminal, decrease the number of times of wake operation system, reduce power consumption and improve time of mobile terminal standby; During screen opening for mobile terminal, after inquiring new mail, do not obtain this new mail immediately, just obtain new mail to mail server after waiting for Preset Time, further reduce power consumption.
Embodiment three
Embodiments provide a kind of management devices inquiring about mail, see Fig. 3, described device comprises:
Whether the first enquiry module 301, for when the screen of mobile terminal is closed, inquire about in mail server have not by the new mail of described acquisition for mobile terminal according to the first preset time period;
Second enquiry module 302, for after the screen of described mobile terminal is closed, and inquire in described mail server when having not by the new mail of described acquisition for mobile terminal first, stop continuing inquiring about in described mail server whether have not by the new mail of described acquisition for mobile terminal according to described first preset time period.
Wherein, described device also comprises in a specific embodiment:
Opening module 303, for opening the Indication message for pointing out user to receive new mail.
Wherein, described opening module 303 specifically for obtaining from described mail server not by the new mail of described acquisition for mobile terminal in the described mail server that inquires first, and opens the Indication message for pointing out user to receive new mail.
Wherein, described device also comprises:
First acquisition module 304, for when the screen opening of described mobile terminal, inquire about in described mail server and whether have not by the new mail of described acquisition for mobile terminal, if had, then obtain from described mail server not by the new mail of described acquisition for mobile terminal.
Whether the 3rd enquiry module 305, for when the screen opening of described mobile terminal, inquire about described mail server have not by the new mail of described acquisition for mobile terminal according to the second preset time period.
Second acquisition module 306, for when inquire in described mail server have not by the new mail of described acquisition for mobile terminal time, stop continuing to inquire about described mail server whether have not by the new mail of described acquisition for mobile terminal according to described second preset time period, and obtain described new mail from described mail server after waiting for the 3rd Preset Time.
Whether the 4th enquiry module 307, for when getting described new mail, inquiring about described mail server have not by the new mail of described acquisition for mobile terminal according to described second preset time period.
The embodiment of the present invention is by when the screen of mobile terminal is closed, inquiring new mail first and after obtaining this new mail, stop continuing inquiry new mail, and again carry out the inquiry of new mail and the process of acquisition when the screen opening of mobile terminal, decrease the number of times of wake operation system, reduce power consumption and improve time of mobile terminal standby; During screen opening for mobile terminal, after inquiring new mail, do not obtain this new mail immediately, just obtain new mail to mail server after waiting for Preset Time, further reduce power consumption.
Embodiment four
Embodiments provide a kind of management devices inquiring about mail, see Fig. 4, described device comprises:
Memory 401 and at least one processor 402, described processor 402 is configured to perform following operation:
When the screen of mobile terminal is closed, inquire about in mail server whether have not by the new mail of described acquisition for mobile terminal according to the first preset time period;
After the screen of described mobile terminal is closed, and inquire in described mail server when having not by the new mail of described acquisition for mobile terminal first, stop continuing inquiring about in described mail server whether have not by the new mail of described acquisition for mobile terminal according to described first preset time period.
Wherein, described inquiring first in described mail server has not by after the new mail of described acquisition for mobile terminal, and described method also comprises:
Open the Indication message for pointing out user to receive new mail.
Wherein, described unlatching, for the Indication message of pointing out user to receive new mail, specifically comprises:
Obtain from described mail server not by the new mail of described acquisition for mobile terminal in the described mail server inquired first, and open the Indication message for pointing out user to receive new mail.
Wherein, whether described stopping continues to inquire about in described mail server have not by after the new mail of described acquisition for mobile terminal according to described first preset time period, and described method also comprises:
When the screen opening of described mobile terminal, inquire about in described mail server and whether have not by the new mail of described acquisition for mobile terminal, if had, then obtain from described mail server not by the new mail of described acquisition for mobile terminal.
Wherein, described method also comprises:
When the screen opening of described mobile terminal, inquire about described mail server whether have not by the new mail of described acquisition for mobile terminal according to the second preset time period;
When inquire in described mail server have not by the new mail of described acquisition for mobile terminal time, stop continuing to inquire about described mail server whether have not by the new mail of described acquisition for mobile terminal according to described second preset time period, and obtain described new mail from described mail server after waiting for the 3rd Preset Time;
When getting described new mail, inquiring about described mail server whether have not by the new mail of described acquisition for mobile terminal according to described second preset time period.
The embodiment of the present invention is by when the screen of mobile terminal is closed, inquiring new mail first and after obtaining this new mail, stop continuing inquiry new mail, and again carry out the inquiry of new mail and the process of acquisition when the screen opening of mobile terminal, decrease the number of times of wake operation system, reduce power consumption and improve time of mobile terminal standby; During screen opening for mobile terminal, after inquiring new mail, do not obtain this new mail immediately, just obtain new mail to mail server after waiting for Preset Time, further reduce power consumption.
The invention described above embodiment sequence number, just to describing, does not represent the quality of embodiment.
One of ordinary skill in the art will appreciate that all or part of step realizing above-described embodiment can have been come by hardware, the hardware that also can carry out instruction relevant by program completes, described program can be stored in a kind of computer-readable recording medium, the above-mentioned storage medium mentioned can be read-only memory, disk or CD etc.
The foregoing is only preferred embodiment of the present invention, not in order to limit the present invention, within the spirit and principles in the present invention all, any amendment done, equivalent replacement, improvement etc., all should be included within protection scope of the present invention.