Summary of the invention
In order to solve the problem of prior art, the embodiment of the present invention provides a kind of management method and device of inquiring about mail.Described technical scheme is as follows:
A kind of management method of inquiring about mail that first aspect, the embodiment of the present invention provide comprises:
When the screen of mobile terminal is closed, according to whether having not by the new mail of described acquisition for mobile terminal in the first preset time period ground inquiry mail server;
After the screen of described mobile terminal is closed, and inquire first when having not by the new mail of described acquisition for mobile terminal in described mail server, stop continuing according to whether having not by the new mail of described acquisition for mobile terminal in described the first described mail server of preset time period ground inquiry.
In the possible implementation of the first of first aspect, described inquiring first has in described mail server not by after the new mail of described acquisition for mobile terminal, and described method also comprises:
Open and be used for the Indication message that the prompting user receives new mail.
In conjunction with the possible implementation of the first of first aspect, in the possible implementation of the second, described unlatching is used for the Indication message that the prompting user receives new mail, specifically comprises:
Obtain from described mail server in the described mail server that inquires first not by the new mail of described acquisition for mobile terminal, and open and be used for the Indication message that the prompting user receives new mail.
In the third possible implementation of first aspect, describedly stop continuing according to whether having not by after the new mail of described acquisition for mobile terminal in described the first described mail server of preset time period ground inquiry, described method also comprises:
When the screen opening of described mobile terminal, whether in described mail server have not by the new mail of described acquisition for mobile terminal, if having, obtain from described mail server not by the new mail of described acquisition for mobile terminal if inquiring about.
In the 4th kind of possible implementation of first aspect, described method also comprises:
When the screen opening of described mobile terminal, whether have not by the new mail of described acquisition for mobile terminal according to the second described mail server of preset time period ground inquiry;
When having not by the new mail of described acquisition for mobile terminal in inquiring described mail server, stop continuing whether having not by the new mail of described acquisition for mobile terminal according to described the second described mail server of preset time period ground inquiry, and obtain described new mail from described mail server after waiting for the 3rd Preset Time;
When getting described new mail, whether have not by the new mail of described acquisition for mobile terminal according to described the second described mail server of preset time period ground inquiry.
A kind of management devices of inquiring about mail that second aspect, the embodiment of the present invention provide comprises:
Whether the first enquiry module is used for when the screen of mobile terminal is closed, according to having not by the new mail of described acquisition for mobile terminal in the first preset time period ground inquiry mail server;
The second enquiry module, be used for after the screen of described mobile terminal is closed, and inquire first when having not by the new mail of described acquisition for mobile terminal in described mail server, stop continuing according to whether having not by the new mail of described acquisition for mobile terminal in described the first described mail server of preset time period ground inquiry.
In the possible implementation of the first of second aspect, described device also comprises:
Opening module is used for opening the Indication message of receiving new mail for the prompting user.
In conjunction with the possible implementation of the first of second aspect, described opening module specifically is used for obtaining the described mail server that inquires first not by the new mail of described acquisition for mobile terminal from described mail server, and opens and be used for the Indication message that the prompting user receives new mail.
In the third possible implementation of second aspect, described device also comprises:
The first acquisition module, when being used for the screen opening when described mobile terminal, whether in described mail server have not by the new mail of described acquisition for mobile terminal, if having, obtain from described mail server not by the new mail of described acquisition for mobile terminal if inquiring about.
In the 4th kind of possible implementation of second aspect, described device also comprises:
Whether the 3rd inquiry module is used for when the screen opening of described mobile terminal, have not by the new mail of described acquisition for mobile terminal according to the second described mail server of preset time period ground inquiry;
The second acquisition module, be used for when inquiring described mail server and have not by the new mail of described acquisition for mobile terminal, stop continuing whether having not by the new mail of described acquisition for mobile terminal according to described the second described mail server of preset time period ground inquiry, and obtain described new mail from described mail server after waiting for the 3rd Preset Time;
Whether the 4th enquiry module is used for when getting described new mail, have not by the new mail of described acquisition for mobile terminal according to described the second described mail server of preset time period ground inquiry
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 the inquiry new mail, reduced the number of times of wake operation system, the time of having reduced power consumption and having improved mobile terminal standby.
Embodiment
For making the purpose, technical solutions and advantages of the present invention clearer, embodiment of the present invention is described further in detail below in conjunction with accompanying drawing.
Embodiment one
The embodiment of the present invention provides a kind of management method of inquiring about mail, and referring to Fig. 1, method flow comprises:
101: when the screen of mobile terminal is closed, according to whether having not by the new mail of described acquisition for mobile terminal in the first preset time period ground inquiry mail server;
102: after the screen of described mobile terminal is closed, and inquire first when having not by the new mail of described acquisition for mobile terminal in described mail server, stop continuing according to whether having not by the new mail of described acquisition for mobile terminal in described the first described mail server of preset time period ground inquiry.
By when the screen of mobile terminal is closed, after inquiring new mail first, stop continuing the inquiry new mail, reduced the number of times of wake operation system, the time of having reduced power consumption and having improved mobile terminal standby.
Embodiment two
The embodiment of the present invention provides a kind of management method of inquiring about mail, and referring to Fig. 2, method flow comprises:
201: when the screen of mobile terminal is closed, according to whether having not by the new mail of described acquisition for mobile terminal in the first preset time period ground inquiry mail server.
According to the first preset time period wake the operating system of mobile terminal up, send Ping order as the request of inquiry new mail to mail server, inquire about mail server and whether receive new mail.Wherein inquire about the user name and the password that carry the subscriber mailbox account in the request of new mail.
202: after the screen of described mobile terminal is closed, and inquire first when having not by the new mail of described acquisition for mobile terminal in described mail server, stop continuing according to whether having not by the new mail of described acquisition for mobile terminal in described the first described mail server of preset time period ground inquiry.
Preferably, close when the new mail that mobile terminal do not get is arranged in inquiring mail server first under screen state at mobile terminal, inquired new mail by the indicating device reminding user, can obtain at screen and close the mail that inquiry under condition arrives this moment, at this moment execution in step 203; Can inquire new mail by the indicating device reminding user, but mobile terminal does not obtain the step of new mail this moment yet, after standby communication terminal is opened screen, carry out the step 204 of obtaining mail.
203: open the Indication message of receiving new mail for the prompting user.
Concrete, when inquiring the new mail that mobile terminal do not get in step 202, obtain from described mail server in the described mail server that inquires first not by the new mail of described acquisition for mobile terminal, and open and be used for the Indication message that the prompting user receives new mail.Wherein Indication message can for: by lighting the mode reminding user of the indicator light on mobile terminal, can also send for the loud speaker by mobile terminal the mode reminding user of the tinkle of bells.
Further, the new mail that has the terminal of not being moved to obtain in inquiring mail server, be after having received new mail in user's mail account, obtain the process of mail: the notice that sends synchronous mail to the mail synchronizing thread of the operating system of mobile terminal, the mail synchronizing thread is according to the synchronize connection of notice foundation with mail server, and send the request of obtaining mail to mail server according to synchronous connection, be received in and close the new mail that inquires first after screen.This moment, new mail can be that an envelope can be also many envelopes, owing to being according to the first preset time period ground inquiry new mail, might receive many envelope mails in the first Preset Time that therefore experiences between twice inquiry new mail.
After obtaining mail, disconnect and the synchronizeing after connection of mail server, consult mail until user's operating mobile terminal carries out release unlatching screen, mobile terminal no longer carries out the inquiry of mail and the process of synchronously obtaining of mail in this stage.
204: when the screen opening of described mobile terminal, whether in described mail server have not by the new mail of described acquisition for mobile terminal, if having, obtain from described mail server not by the new mail of described acquisition for mobile terminal if inquiring about.
Change at user's operating mobile terminal state and open before screen consults mail, the mail applications of mobile terminal with regard to no longer carrying out any operation (wherein operating the request that comprises transmission inquiry new mail and the request that sends synchronous mail), therefore can not increase any power consumption after receiving new mail first.When user's operating mobile terminal unlatching screen is consulted mail, then network and obtain other new mails that disconnect the synchronously rear arrival of connection of mail mail server, the power consumption of the receiving emails of networking this moment just belongs to the power consumption after the unlatching screen.
205: when the screen opening of described mobile terminal, whether have not by the new mail of described acquisition for mobile terminal according to the second described mail server of preset time period ground inquiry.
This step can being closed by screen of mobile terminal be converted to the step of carrying out after screen opening in step 204, can be also the mail reception process of carry out of mobile terminal when the normal running screen begins, this sequential relationship is not limited at this.
Whether during the unlatching screen state of mobile terminal, regularly send Ping order as the request of inquiry new mail to mail server according to the second Preset Time, inquiring about mail server has new mail.
206: when having not by the new mail of described acquisition for mobile terminal in inquiring described mail server, stop continuing whether having not by the new mail of described acquisition for mobile terminal according to described the second described mail server of preset time period ground inquiry, and obtain described new mail from described mail server after waiting for the 3rd Preset Time.
When inquiring new mail, be not real-time collecting, wait for the process of mail of synchronizeing with mail server again after the 3rd Preset Time, send the notice of synchronous mail to the mail synchronizing thread of operating system, the mail synchronizing 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 of collecting in real time, neither affects user's experience and can reduce power consumption again.
207: when getting described new mail, whether have not by the new mail of described acquisition for mobile terminal according to described the second described mail server of preset time period ground inquiry.
For example, the user configures mailbox and mail is set and collects the interval, collects once as 10 minutes, and namely the first Preset Time and the second Preset Time are 10 minutes.Receive that by average every 5 minutes mail servers an envelope mail is example, the 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 is networked according to the second Preset Time of acquiescence and synchronously collected, and lights indicator light after getting the mail and notifies the user that new mail is arranged, and disconnects the connection of mail server this moment.If after 30 minutes, the user again lights screen and consults mail, at this moment the user can see the two envelope mails of collecting in front 10 minutes, the gap that utilizes the user to consult to have got the mail, and 4 envelope mails of rear 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, after inquiring first new mail and obtaining this new mail, stop continuing the inquiry new mail, and again carry out the inquiry of new mail and the process of obtaining when the screen opening of mobile terminal, reduced the number of times of wake operation system, the time of having reduced power consumption and having improved mobile terminal standby; During for the screen opening of mobile terminal, after inquiring new mail, do not obtain immediately this new mail, just obtain new mail to mail server after waiting for Preset Time, further reduced power consumption.
Embodiment three
The embodiment of the present invention provides a kind of management devices of inquiring about mail, and referring to Fig. 3, described device comprises:
Whether the first enquiry module 301 is used for when the screen of mobile terminal is closed, according to having not by the new mail of described acquisition for mobile terminal in the first preset time period ground inquiry mail server;
The second enquiry module 302, be used for after the screen of described mobile terminal is closed, and inquire first when having not by the new mail of described acquisition for mobile terminal in described mail server, stop continuing according to whether having not by the new mail of described acquisition for mobile terminal in described the first described mail server of preset time period ground inquiry.
Wherein, also comprise at device described in embodiment:
Opening module 303 is used for opening the Indication message of receiving new mail for the prompting user.
Wherein, described opening module 303 is concrete to be used for obtaining the described mail server that inquires first not by the new mail of described acquisition for mobile terminal from described mail server, and opens and be used for the Indication message that the prompting user receives new mail.
Wherein, described device also comprises:
The first acquisition module 304, when being used for the screen opening when described mobile terminal, whether in described mail server have not by the new mail of described acquisition for mobile terminal, if having, obtain from described mail server not by the new mail of described acquisition for mobile terminal if inquiring about.
Whether the 3rd inquiry module 305 is used for when the screen opening of described mobile terminal, have not by the new mail of described acquisition for mobile terminal according to the second described mail server of preset time period ground inquiry.
The second acquisition module 306, be used for when inquiring described mail server and have not by the new mail of described acquisition for mobile terminal, stop continuing whether having not by the new mail of described acquisition for mobile terminal according to described the second described mail server of preset time period ground inquiry, and obtain described new mail from described mail server after waiting for the 3rd Preset Time.
Whether the 4th enquiry module 307 is used for when getting described new mail, have not by the new mail of described acquisition for mobile terminal according to described the second described mail server of preset time period ground inquiry.
The embodiment of the present invention is by when the screen of mobile terminal is closed, after inquiring first new mail and obtaining this new mail, stop continuing the inquiry new mail, and again carry out the inquiry of new mail and the process of obtaining when the screen opening of mobile terminal, reduced the number of times of wake operation system, the time of having reduced power consumption and having improved mobile terminal standby; During for the screen opening of mobile terminal, after inquiring new mail, do not obtain immediately this new mail, just obtain new mail to mail server after waiting for Preset Time, further reduced power consumption.
Embodiment four
The embodiment of the present invention provides a kind of management devices of inquiring about mail, and referring to Fig. 4, described device comprises:
Memory 401 and at least one processor 402, described processor 402 is configured to carry out the following operation that Shows Picture:
When the screen of mobile terminal is closed, according to whether having not by the new mail of described acquisition for mobile terminal in the first preset time period ground inquiry mail server;
After the screen of described mobile terminal is closed, and inquire first when having not by the new mail of described acquisition for mobile terminal in described mail server, stop continuing according to whether having not by the new mail of described acquisition for mobile terminal in described the first described mail server of preset time period ground inquiry.
Wherein, described inquiring first has in described mail server not by after the new mail of described acquisition for mobile terminal, and described method also comprises:
Open and be used for the Indication message that the prompting user receives new mail.
Wherein, described unlatching is used for the Indication message that the prompting user receives new mail, specifically comprises:
Obtain from described mail server in the described mail server that inquires first not by the new mail of described acquisition for mobile terminal, and open and be used for the Indication message that the prompting user receives new mail.
Whether wherein, describedly stop continuing according to having not by after the new mail of described acquisition for mobile terminal in described the first described mail server of preset time period ground inquiry, described method also comprises:
When the screen opening of described mobile terminal, whether in described mail server have not by the new mail of described acquisition for mobile terminal, if having, obtain from described mail server not by the new mail of described acquisition for mobile terminal if inquiring about.
Wherein, described method also comprises:
When the screen opening of described mobile terminal, whether have not by the new mail of described acquisition for mobile terminal according to the second described mail server of preset time period ground inquiry;
When having not by the new mail of described acquisition for mobile terminal in inquiring described mail server, stop continuing whether having not by the new mail of described acquisition for mobile terminal according to described the second described mail server of preset time period ground inquiry, and obtain described new mail from described mail server after waiting for the 3rd Preset Time;
When getting described new mail, whether have not by the new mail of described acquisition for mobile terminal according to described the second described mail server of preset time period ground inquiry.
The embodiment of the present invention is by when the screen of mobile terminal is closed, after inquiring first new mail and obtaining this new mail, stop continuing the inquiry new mail, and again carry out the inquiry of new mail and the process of obtaining when the screen opening of mobile terminal, reduced the number of times of wake operation system, the time of having reduced power consumption and having improved mobile terminal standby; During for the screen opening of mobile terminal, after inquiring new mail, do not obtain immediately this new mail, just obtain new mail to mail server after waiting for Preset Time, further reduced power consumption.
The invention described above embodiment sequence number does not represent the quality of embodiment just to description.
One of ordinary skill in the art will appreciate that all or part of step that realizes above-described embodiment can complete by hardware, also can come the relevant hardware of instruction to complete by program, described program can be stored in a kind of computer-readable recording medium, the above-mentioned storage medium of mentioning can be read-only memory, disk or CD etc.
The above is only preferred embodiment of the present invention, and is in order to limit the present invention, within the spirit and principles in the present invention not all, any modification of doing, is equal to replacement, improvement etc., within all should being included in protection scope of the present invention.