CN105897560B - A kind of method and apparatus loading new mail in the mailbox client of mobile device - Google Patents

A kind of method and apparatus loading new mail in the mailbox client of mobile device Download PDF

Info

Publication number
CN105897560B
CN105897560B CN201610355285.XA CN201610355285A CN105897560B CN 105897560 B CN105897560 B CN 105897560B CN 201610355285 A CN201610355285 A CN 201610355285A CN 105897560 B CN105897560 B CN 105897560B
Authority
CN
China
Prior art keywords
mail
mailbox
client
identifier
server
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201610355285.XA
Other languages
Chinese (zh)
Other versions
CN105897560A (en
Inventor
宋亮
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hisense Mobile Communications Technology Co Ltd
Original Assignee
Hisense Mobile Communications Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hisense Mobile Communications Technology Co Ltd filed Critical Hisense Mobile Communications Technology Co Ltd
Priority to CN201610355285.XA priority Critical patent/CN105897560B/en
Publication of CN105897560A publication Critical patent/CN105897560A/en
Application granted granted Critical
Publication of CN105897560B publication Critical patent/CN105897560B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L51/00User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
    • H04L51/42Mailbox-related aspects, e.g. synchronisation of mailboxes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L51/00User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
    • H04L51/21Monitoring or handling of messages
    • H04L51/224Monitoring or handling of messages providing notification on incoming messages, e.g. pushed notifications of received messages

Abstract

The method and apparatus that the embodiment of the invention provides a kind of to load new mail in the mailbox client of mobile device, this method comprises: obtaining the first total quantity of the first mail in mailbox server in mailbox client;When first total quantity is more than preset amount threshold, first object quantity is determined;From the first mail of the mailbox server, newest first object mail is downloaded according to the first object quantity.Compared to traditional loading method, the quantity of mail traversal is reduced to first object quantity from amount threshold, greatly reduces the quantity of mail traversal, and then improve the loading velocity of Mail Clients load new mail, the load time is reduced, also, reduces the consuming of flow.

Description

A kind of method and apparatus loading new mail in the mailbox client of mobile device
Technical field
The present invention relates to the technical fields of communication, load newly in the mailbox client of mobile device more particularly to a kind of The method of mail and a kind of device that new mail is loaded in the mailbox client of mobile device.
Background technique
With the development of science and technology, the mobile devices such as mobile phone, tablet computer are in the work of people, study, daily exchange Etc. various aspects utilization rate it is also higher and higher.
Demands, the user such as handled official business, learnt for convenience, exchanged often install Mail Clients in a mobile device, It is communicated with other users.
When number of mail is more in mailbox server, the loading velocity that Mail Clients loads new mail is slow, causes to add It is long to carry the time, also, it is more to expend flow.
Summary of the invention
In view of the above problems, cause the load time is long, expends flow to ask slowly to solve the loading velocity of above-mentioned new mail Topic, the embodiment of the present invention propose a kind of method that new mail is loaded in the mailbox client of mobile device and corresponding one kind The device of new mail is loaded in the mailbox client of mobile device.
To solve the above-mentioned problems, the embodiment of the invention discloses a kind of loads newly in the mailbox client of mobile device The method of mail, comprising:
The first total quantity of the first mail in mailbox server is obtained in mailbox client;
When first total quantity is more than preset amount threshold, first object quantity is determined;
From the first mail of the mailbox server, newest first object postal is downloaded according to the first object quantity Part.
Preferably, described the step of the first total quantity of the first mail in mailbox server is obtained in mailbox client, wraps It includes:
Detect the version information of operating system and the email protocol of application locating for mailbox client;
When the version information is specified version and the email protocol is specified agreement, mailbox clothes are obtained First total quantity of the first mail in business device.
Preferably, the step of determining first object quantity includes:
The second total quantity for inquiring the second mail in the mailbox client, as first object quantity.
Preferably, it in first mail from the mailbox server, is downloaded according to the first object quantity newest First object mail the step of include:
To the second mail in the mailbox client and newest, the described first object quantity in the mailbox server First object mail matched;
When second mail is matched with the first object mail, retain described second in the mailbox client Mail;
When second mail and the first object mail mismatch, described the is downloaded from the mailbox server One targeted mails delete second mail in the mailbox client.
Preferably, second mail in the mailbox client with it is newest, described in the mailbox server The step of first object mail of first object quantity is matched include:
The first identifier of newest first object mail is requested from the mailbox server according to the first object quantity Symbol;
Inquire the second identifier symbol of the second mail in the mailbox client;
Second identifier symbol is matched with first identifier symbol.
Preferably, described when second mail is matched with the first object mail, in the mailbox client The step of retaining second mail include:
When second identifier symbol is identical as the first identifier symbol, retain described second in the mailbox client Corresponding second mail of identifier;
It is described when second mail and the first object mail mismatch, described in mailbox server downloading First object mail, the step of deleting second mail in the mailbox client include:
When second identifier symbol and not identical first identifier symbol, from mailbox server downloading described first Corresponding first mail of identifier deletes the second identifier in the mailbox client and accords with corresponding second mail.
Preferably, in first mail from the mailbox server, most according to first object quantity downloading After the step of new first object mail, the method also includes:
When receiving the load request for first mail, the second destination number is determined;
From the first mail of the mailbox server, it is located at current second mail according to second destination number downloading The second targeted mails before.
Preferably, in first mail from the mailbox server, it is located at according to second destination number downloading The step of the second targeted mails before current second mail includes:
The first identifier of newest second targeted mails is requested from the mailbox server according to second destination number Symbol, second targeted mails are located at before current second mail;
The first identifier is downloaded from the mailbox server accords with corresponding second targeted mails.
Preferably, further includes:
When the total quantity of the mail is less than preset amount threshold, from the mailbox server downloading with it is described Unmatched first mail of second mail in mailbox client.
Preferably, described from downloading in the mailbox server and the second mail in the mailbox client unmatched the The step of one mail includes:
The first identifier of all first mails is requested to accord with from the mailbox server;
Inquire the second identifier symbol of all second mails in the mailbox client;
It searches and accords with unmatched first identifier symbol with the second identifier;
The first identifier is downloaded from the mailbox server accords with corresponding first mail.
The embodiment of the invention also discloses a kind of in the mailbox client of mobile device loads the device of new mail, packet It includes:
Server mail quantity obtains module, for obtaining the of the first mail in mailbox server in mailbox client One total quantity;
First object quantity determining module, for determining the when first total quantity is more than preset amount threshold One destination number;
First object mail download module, for from the first mail of the mailbox server, according to first mesh It marks quantity and downloads newest first object mail.
Preferably, the server mail quantity acquisition module includes:
Mail box environment detection sub-module, for detecting the version information of operating system locating for mailbox client and the electricity of application Sub- mail protocol;
First total quantity acquisition submodule, for being specified version and the email protocol in the version information When for specified agreement, the first total quantity of the first mail in mailbox server is obtained.
Preferably, the first object quantity determining module includes:
Second total quantity inquires submodule, for inquiring the second total quantity of the second mail in the mailbox client, makees For first object quantity.
Preferably, the first object mail download module includes:
Mail matched sub-block, for in the mailbox client the second mail with it is newest in the mailbox server , the first object mail of the first object quantity matched;
Mail retains submodule, is used for when second mail is matched with the first object mail, in the mailbox Retain second mail in client;
Mail downloads submodule, is used for when second mail and the first object mail mismatch, from the postal The first object mail is downloaded in case server;
Mail deletes submodule, is used for when second mail and the first object mail mismatch, in the postal Second mail is deleted in case client.
Preferably, the mail matched sub-block includes:
Identifier request unit, for requesting newest first from the mailbox server according to the first object quantity The first identifier of targeted mails accords with;
Identifier query unit, the second identifier for inquiring the second mail in the mailbox client accord with;
Identifier match unit, for being matched to second identifier symbol with first identifier symbol.
Preferably, the mail reservation submodule includes:
Identifier mail stick unit is used for when second identifier symbol is identical as the first identifier symbol, described Retain the second identifier in mailbox client and accords with corresponding second mail;
Preferably, the mail downloading submodule includes:
Identifier mail download unit is used in second identifier symbol and not identical first identifier symbol, from institute It states mailbox server and downloads corresponding first mail of the first identifier symbol,
Preferably, the mail deletion submodule includes:
Identifier mail deletes submodule, is used in second identifier symbol and not identical first identifier symbol, The second identifier is deleted in the mailbox client accords with corresponding second mail.
Preferably, further includes:
Difference mail download module, for when the total quantity of the mail is less than preset amount threshold, from described Downloading and unmatched first mail of the second mail in the mailbox client in mailbox server.
Preferably, the second targeted mails download module includes:
Second identifier symbol request submodule, it is newest for being requested according to second destination number from the mailbox server The second targeted mails first identifier symbol, second targeted mails are located at before current second mail;
Targeted mails download submodule, for downloading the first identifier symbol corresponding second from the mailbox server Targeted mails.
In one embodiment of the invention, the difference mail download module 406 may include following submodule:
All identifier request units, for requesting the first identifier of all first mails to accord with from the mailbox server;
All identifier query units, the second identifier for inquiring all second mails in the mailbox client accord with;
Identifier searching unit accords with unmatched first identifier symbol with the second identifier for searching;
Server mail download unit, for downloading the first identifier symbol corresponding first from the mailbox server Mail.
The embodiment of the present invention includes following advantages:
The embodiment of the present invention obtains the first total quantity of the first mail in mailbox server in mailbox client, if first Total quantity is more than preset amount threshold, indicates that the quantity of mail in mailbox server is more, then can determine first object number Amount, and from the first mail of mailbox server, newest first object mail is downloaded according to the first object quantity, compared to biography The quantity of the loading method of system, mail traversal is reduced to first object quantity from amount threshold, greatly reduces mail traversal Quantity, and then the loading velocity of Mail Clients load new mail is improved, the load time is reduced, also, reduce the consumption of flow Take.
Detailed description of the invention
Fig. 1 is a kind of step of embodiment of the method 1 that new mail is loaded in the mailbox client of mobile device of the invention Rapid flow chart;
Fig. 2 is a kind of step of embodiment of the method 2 that new mail is loaded in the mailbox client of mobile device of the invention Rapid flow chart;
Fig. 3 is a kind of knot of Installation practice 1 that new mail is loaded in the mailbox client of mobile device of the invention Structure block diagram;
Fig. 4 is a kind of knot of Installation practice 2 that new mail is loaded in the mailbox client of mobile device of the invention Structure block diagram.
Specific embodiment
In order to make the foregoing objectives, features and advantages of the present invention clearer and more comprehensible, with reference to the accompanying drawing and specific real Applying mode, the present invention is described in further detail.
Referring to Fig.1, it is real to show a kind of method that new mail is loaded in the mailbox client of mobile device of the invention The step flow chart for applying example 1, can specifically include following steps:
Step 101, the first total quantity of the first mail in mailbox server is obtained in mailbox client;
In the concrete realization, the embodiment of the present invention can be applied in a mobile device, for example, mobile phone, tablet computer, individual Digital assistants, wearable device (such as glasses, wrist-watch) etc..
The operating system of these mobile devices may include Android (Android), IOS, Windows Phone, Windows Etc..
The operation of mailbox client can be usually supported in these operating systems, the mailbox client and mailbox server into Row connection, to receive, send mail.
It should be noted that these mailbox clients can be the client of system intialization, it is also possible to third-party visitor Family end, the embodiments of the present invention are not limited thereto.
When receiving the load request of mail, the first total quantity of the first mail in available mailbox server.
It, can be with when the user clicks when the control for example, user can receive the control of mail and load mail by clicking Trigger the load request of mail.
In another example mailbox client can be with the load request of automatic trigger mail when starting mailbox client.
In another example such as 15 minutes, mailbox client can be asked with the load of automatic trigger mail at interval of the regular hour It asks.
In one embodiment of the invention, step 101 may include following sub-step:
Sub-step S11 detects the version information of operating system and the email protocol of application locating for mailbox client;
Sub-step S12, when the version information is specified version and the email protocol is specified agreement, Obtain the first total quantity of the first mail in mailbox server.
In practical applications, in the operating system of certain versions, using the mailbox client of certain email protocols, if The mail of mailbox server is more than certain amount, then traverses all mails, compared one by one with the mail of mailbox client local It is right, to determine whether needing to load new mail.
For example, in Android5.0 and the above version, as Android5.0, Android5.1, Android6.0, Android7.0 etc., Mail Clients application POP3 (Post Office Protocol-Version 3, post office protocol version 3), (mailbox server can be requested to send back to the statistics about mailbox, such as by " STAT " instruction executed in POP3 agreement Mail sum and total bytes), the total quantity of mail under inbox Foder (file) is obtained from mailbox server end messagtCount。
If the inbox on mail server is more than 5000 envelope mails, in traditional loading method, mailbox client is needed UID (a kind of identifier, each mark of session of all mails are traversed by sending " UIDL id " instruction to server Symbol all will be unique), it obtains and is compared one by one after responding with the UID of the mail in the inbox in mailbox client, such as Fruit does not have locally, then is loaded, if local have, ignores the mail.
The process for obtaining mail UID from mailbox server by " UIDL id " instruction, is all in mailbox server Mail all traverses one by one, to execute more than 5000 times, and number of computations is more, this is that process time-consuming is more, it is more to expend flow.
Wherein, POP3 agreement is to be suitable for C/S (Client/Server Structs, client-server structure) to tie The email protocol of the offline models of structure supports " offline " mail treatment, and detailed process is: Email is sent to mailbox On server, mailbox client connects server, and downloads all Emails that do not read.
This offline access mode is a kind of storage forwarding service, and mail is sent in terminal from mail server side.One Denier mail is sent in terminal, and the mail on mail server will be deleted.
But current POP3 mail server " can only download mail, server end is not deleted " greatly, that is, change Into POP3 agreement.
Certainly, aforesaid operations system and email protocol are intended only as example, in other operating systems and electronics postal In part agreement, it is also possible to there is a problem of it is same, for example, SMTP (Simple Mail Transfer Protocol, simple postal Part transport protocol), IMAP4 (Internet Message Access Protocol 4, interactive data Message Access Protocol Four versions), etc..
Step 102, when first total quantity is more than preset amount threshold, first object quantity is determined;
It, can be new using the loading method load of the embodiment of the present invention if the first total quantity is more than preset amount threshold Mail.
In this loading method, the first object quantity Visible Limit of load can be determined.
In the concrete realization, the second total quantity that the second mail in mailbox client can be inquired, as first object number Amount.
In the manner, the second mail of the second total quantity has been downloaded in mailbox client, it can be with second total quantity The load of new mail is carried out, constant, the raising user experience of number of mail in mailbox client is kept.
For POP3 agreement, the second total quantity can be the postal of visible (or the downloading) of Inbox in mailbox client Number of packages amount.
Certainly, above-mentioned first object quantity is intended only as example, in implementing the embodiments of the present invention, can be according to practical feelings Other first object quantity are arranged in condition, for example, specifying some quantity (such as 10,20) as first object quantity, the present invention is real It is without restriction to this to apply example.In addition, those skilled in the art can also be according to practical need other than above-mentioned first object quantity Other first object quantity are used, the embodiment of the present invention is also without restriction to this.
Step 103, from the first mail of the mailbox server, according to first object quantity downloading newest the One targeted mails.
In the concrete realization, mailbox client can be from the first mail of mailbox server, according to first object quantity Download the first object mail of newest (i.e. receiving time is nearest).
It should be noted that first object mail is for loading new mail, it is still mailbox server First mail of middle storage.
For example, it is assumed that first object quantity is 10, then newest 10 envelope mail can be downloaded from server.
In one embodiment of the invention, step 103 may include following sub-step:
Sub-step S21, in the mailbox client the second mail and the mailbox server in newest, described the The first object mail of one destination number is matched;
In the concrete realization, newest first object mail can be requested from mailbox server according to first object quantity First identifier symbol inquires the second identifier symbol of the second mail in mailbox client;
Second identifier symbol is matched with first identifier symbol.
It furthermore, can be newest by " UIDL id " instruction request if mailbox client application POP3 agreement The first identifier of first object mail accords with.
Wherein, initial value the Start=messagtCount-Visible Limit+1, stop value End=of id messagtCount。
MessagtCount is first object quantity, Visible Limit is first object quantity.
For example, it is assumed that having 5015 envelope mails in mailbox server, then can request id is the mark of the mail of 5006-5015 Know symbol.
It should be noted that first identifier symbol and second identifier symbol are for mailbox server and mailbox client , it is still identifier, such as UID.
Sub-step S22 is protected in the mailbox client when second mail is matched with the first object mail Stay second mail;
If the second mail is matched with first object mail, then it represents that be stored with newest, first object in mailbox client The first object mail of quantity retains second mail, does not download from mailbox server.
In the concrete realization, when second identifier symbol is identical with first identifier symbol, indicate that the second identifier accords with corresponding the The first object mail matching corresponding with first identifier symbol of two mails, can retain second identifier symbol pair in mailbox client The second mail answered.
Sub-step S23, when second mail and first object mail mismatch, from the mailbox server It downloads the first object mail, delete second mail in the mailbox client.
If the second mail and first object mail mismatch, there are two kinds of situations:
A kind of situation is that the second mail identical with first object mail is not present, i.e., does not store in mailbox client Newest, first object quantity mail, can download the first object mail from mailbox server.
Furthermore, it if mailbox client application POP3 agreement, can be instructed, be returned by joining by RETR [Msg#] The full content of the mail of number mark.
In such situation, when second identifier symbol and not identical first identifier symbol, indicate that second identifier symbol is corresponding Second mail first object mail corresponding with first identifier symbol mismatches, and first identifier symbol can be downloaded from mailbox server Corresponding first mail.
Another situation is that there is no first object mail identical with the second mail of mailbox client, such situation Under, i.e. high second mail of mailbox client storage is not the mail of newest first object quantity, can delete second postal Part.
In such situation, when second identifier symbol and not identical first identifier symbol, indicate that second identifier symbol is corresponding Second mail first object mail corresponding with first identifier symbol mismatches, and second mark can be deleted in mailbox client Know and accords with corresponding second mail.
The embodiment of the present invention obtains the first total quantity of the first mail in mailbox server in mailbox client, if first Total quantity is more than preset amount threshold, indicates that the quantity of mail in mailbox server is more, then can determine first object number Amount, and from the first mail of mailbox server, newest first object mail is downloaded according to the first object quantity, compared to biography The quantity of the loading method of system, mail traversal is reduced to first object quantity from amount threshold, greatly reduces mail traversal Quantity, and then the loading velocity of Mail Clients load new mail is improved, the load time is reduced, also, reduce the consumption of flow Take.
Embodiment in order to enable those skilled in the art to better understand the present invention illustrates this hair below by way of specific example The loading method of new mail in bright embodiment.
Assuming that the inbox at mailbox server end has 5015 the first mails of envelope, in the operating system of Android5.0, postal Case client application POP3 agreement has 10 the second mails of envelope in the inbox of mailbox client, and id is 5001~5010, i.e., and 5001~5010 envelope mails.
When loading new mail, mailbox server end knows the of inbox in mailbox server end by " STAT " instruction First total quantity of one mail is 5015.
With the second quantity 10 of the second mail of inbox in mailbox client for first object quantity, then first object postal Part is that 5006-5015 seals mail.
Mailbox client requests 5006-5015 envelope first from mailbox server by executing 10 times " UIDL id " instructions The first identifier of mail accords with UID.
These first identifiers accord with UID and are compared with the second identifier of the second mail of mailbox client local symbol UID.
Id is that the UID of the mail of 5006-5010 is identical, then retains corresponding second postal of these UID in mailbox client Part.
Id is that the UID of the mail of 5001-5005,5011-5015 is not identical, then deletes id in mailbox client and be Corresponding second mail of 5001-5005 (UID mark), id is downloaded from mailbox server by RETR [Msg#] instruction is Corresponding first mail of 5011-5015 (UID mark).
5000 envelope mails are had more than in mailbox server, using the loading method of the embodiment of the present invention, can be mentioned significantly The speed of height load new mail, loaded the average time of 25 envelope new mails within 1 minute.
In a test experiments:
Network environment: the wireless network that average network speed is 56KB/s;
Mailbox: third-party mailbox client is tested, has 5506 envelope mails, POP3 agreement in mailbox server.
Test equipment: the mobile device A based on Android5.0 version:
Cpu frequency: 1.4GHz;
CPU core calculation: eight cores;
Memory ram capacity: 2GB;
Test result: loading new mail using the loading method of the embodiment of the present invention in customer end A 1, about 5 minutes time-consuming;
New mail is loaded using traditional loading method in customer end A 2, it is about 15 minutes time-consuming;
Environment is tested in identical network environment, the mobile device B based on Android5.0 version:
Cpu frequency: 2.2GHz;
CPU core calculation: eight cores;
Memory ram capacity: 3GB;
Test result: loading new mail using traditional loading method, about 30 minutes time-consuming.
Referring to Fig. 2, it is real to show a kind of method that new mail is loaded in the mailbox client of mobile device of the invention The step flow chart for applying example 2, can specifically include following steps:
Step 201, the first total quantity of the first mail in mailbox server is obtained in mailbox client;
Step 202, when first total quantity is more than preset amount threshold, first object quantity is determined;
Step 203, from the first mail of the mailbox server, according to first object quantity downloading newest the One targeted mails;
Step 204, when receiving the load request for first mail, the second destination number is determined;
Step 205, from the first mail of the mailbox server, it is located at according to second destination number downloading current The second targeted mails before second mail;
In embodiments of the present invention, if user wants to show the mail before newest mail, mailbox client can be passed through The modes such as " load the is more " control provided send load request to mailbox server, load more mails.
Wherein, the second mail currently downloaded in mailbox client, may include the first object mail first downloaded, It may include the second targeted mails formerly downloaded, i.e. user may trigger the operation of the more mails of repeated loading.
When loading more mails, the second destination number of load can be determined.
Under normal circumstances, it is possible to specify some quantity (such as 10,20) is used as the second destination number.
Certainly, above-mentioned second destination number is intended only as example, in implementing the embodiments of the present invention, can be according to practical feelings Other the second destination numbers are arranged in condition, for example, the second total quantity of the second mail in mailbox client can be inquired, as second Destination number, etc., the embodiments of the present invention are not limited thereto.
It should be noted that the second targeted mails are for loading more mails, it is still mailbox clothes The first mail stored in business device.
Second targeted mails are located at before current second mail, refer to the receiving time of the second targeted mails than current second The receiving time of mail is small, sorts before its position.
Certainly, the receiving time of the second targeted mails and current second mail is usually continuous, continual.
In the concrete realization, it is accorded with due to the first mail with first identifier, it can be according to the second destination number from postal Case server requests the first identifier of newest second targeted mails to accord with, and it is corresponding that first identifier symbol is downloaded from mailbox server Second targeted mails.
For example, it is assumed that the inbox at mailbox server end has 5015 the first mails of envelope, in the operating system of Android5.0 In, mailbox client application POP3 agreement has 10 the second mails of envelope in the inbox of mailbox client, and id is 5001~ 5010, i.e. the 5001st~5010 envelope mail.
The loading method of mailbox client through the embodiment of the present invention is loaded with the 5006th~5015 envelope mail.
If user clicks " load is more " control, specifying the second destination number is 15, then can pass through 15 " UIDL Id " instruction accords with UID, i.e. the 4991st~5005 envelope postal from the first identifier of the mailbox server request id mail for being 4991~5005 The first identifier of part accords with UID.
Since mailbox client locally will not generally be stored with the corresponding mail of these first identifiers symbol UID, it can be with The comparison carried out with the second identifier of the second mail of mailbox client local symbol UID is omitted, is directly referred to by RETR [Msg#] Enabling and downloading id from mailbox server is corresponding first mail of 4991~5005 (UID marks).
It is of course also possible to use the second identifier of these first identifiers symbol UID and the second mail of mailbox client local Symbol UID is compared, then it is that 4991~5005 (UID marks) are right that id is downloaded from mailbox server by RETR [Msg#] instruction The first mail answered, the embodiments of the present invention are not limited thereto.
Step 206, when the total quantity of the mail is less than preset amount threshold, under in the mailbox server It carries and unmatched first mail of the second mail in the mailbox client.
If the total quantity of mail is less than preset amount threshold, negligible amounts, can download mailbox client is not had The first mail so that the mail synchronization of mailbox client and mailbox server.
Since the first mail is accorded with first identifier symbol, the second mail with second identifier, it can be from mailbox service Device requests the first identifier of all first mails to accord with, and inquires the second identifier symbol of all second mails in mailbox client.
It searches and accords with unmatched first identifier symbol with second identifier, it is corresponding that first identifier symbol is downloaded from mailbox server First mail.
It should be noted that for simple description, therefore, it is stated as a series of action groups for embodiment of the method It closes, but those skilled in the art should understand that, embodiment of that present invention are not limited by the describe sequence of actions, because according to According to the embodiment of the present invention, some steps may be performed in other sequences or simultaneously.Secondly, those skilled in the art also should Know, the embodiments described in the specification are all preferred embodiments, and the related movement not necessarily present invention is implemented Necessary to example.
Referring to Fig. 3, it is real to show a kind of device that new mail is loaded in the mailbox client of mobile device of the invention The structural block diagram for applying example 1, can specifically include following module:
Server mail quantity obtains module 301, for obtaining the first mail in mailbox server in mailbox client The first total quantity;
First object quantity determining module 302, for determining when first total quantity is more than preset amount threshold First object quantity;
First object mail download module 303, for from the first mail of the mailbox server, according to described first Destination number downloads newest first object mail.
In one embodiment of the invention, it may include following submodule that the server mail quantity, which obtains module 301, Block:
Mail box environment detection sub-module, for detecting the version information of operating system locating for mailbox client and the electricity of application Sub- mail protocol;
First total quantity acquisition submodule, for being specified version and the email protocol in the version information When for specified agreement, the first total quantity of the first mail in mailbox server is obtained.
In one embodiment of the invention, the first object quantity determining module 302 may include following submodule:
Second total quantity inquires submodule, for inquiring the second total quantity of the second mail in the mailbox client, makees For first object quantity.
In one embodiment of the invention, the first object mail download module 303 may include following submodule:
Mail matched sub-block, for in the mailbox client the second mail with it is newest in the mailbox server , the first object mail of the first object quantity matched;
Mail retains submodule, is used for when second mail is matched with the first object mail, in the mailbox Retain second mail in client;
Mail downloads submodule, is used for when second mail and the first object mail mismatch, from the postal The first object mail is downloaded in case server;
Mail deletes submodule, is used for when second mail and the first object mail mismatch, in the postal Second mail is deleted in case client.
In one embodiment of the invention, the mail matched sub-block may include such as lower unit:
Identifier request unit, for requesting newest first from the mailbox server according to the first object quantity The first identifier of targeted mails accords with;
Identifier query unit, the second identifier for inquiring the second mail in the mailbox client accord with;
Identifier match unit, for being matched to second identifier symbol with first identifier symbol.
In one embodiment of the invention, it may include such as lower unit that the mail, which retains submodule:
Identifier mail stick unit is used for when second identifier symbol is identical as the first identifier symbol, described Retain the second identifier in mailbox client and accords with corresponding second mail;
In one embodiment of the invention, the mail downloading submodule may include such as lower unit:
Identifier mail download unit is used in second identifier symbol and not identical first identifier symbol, from institute It states mailbox server and downloads corresponding first mail of the first identifier symbol,
In one embodiment of the invention, it may include such as lower unit that the mail, which deletes submodule:
Identifier mail deletes submodule, is used in second identifier symbol and not identical first identifier symbol, The second identifier is deleted in the mailbox client accords with corresponding second mail.
Referring to Fig. 4, it is real to show a kind of device that new mail is loaded in the mailbox client of mobile device of the invention The structural block diagram for applying example 2, can specifically include following module:
Server mail quantity obtains module 401, for obtaining the first mail in mailbox server in mailbox client The first total quantity;
First object quantity determining module 402, for determining when first total quantity is more than preset amount threshold First object quantity;
First object mail download module 403, for from the first mail of the mailbox server, according to described first Destination number downloads newest first object mail;
Second destination number determining module 404, for determining when receiving the load request for first mail Second destination number;
Second targeted mails download module 405, for from the first mail of the mailbox server, according to described second Destination number downloading is located at the second targeted mails before current second mail;
Difference mail download module 406, for when the total quantity of the mail is less than preset amount threshold, from institute State downloading and unmatched first mail of the second mail in the mailbox client in mailbox server.
In one embodiment of the invention, the second targeted mails download module 405 may include following submodule:
Second identifier symbol request submodule, it is newest for being requested according to second destination number from the mailbox server The second targeted mails first identifier symbol, second targeted mails are located at before current second mail;
Targeted mails download submodule, for downloading the first identifier symbol corresponding second from the mailbox server Targeted mails.
In one embodiment of the invention, the difference mail download module 406 may include following submodule:
All identifier request units, for requesting the first identifier of all first mails to accord with from the mailbox server;
All identifier query units, the second identifier for inquiring all second mails in the mailbox client accord with;
Identifier searching unit accords with unmatched first identifier symbol with the second identifier for searching;
Server mail download unit, for downloading the first identifier symbol corresponding first from the mailbox server Mail.
For device embodiment, since it is basically similar to the method embodiment, related so being described relatively simple Place illustrates referring to the part of embodiment of the method.
All the embodiments in this specification are described in a progressive manner, the highlights of each of the examples are with The difference of other embodiments, the same or similar parts between the embodiments can be referred to each other.
It should be understood by those skilled in the art that, the embodiment of the embodiment of the present invention can provide as method, apparatus or calculate Machine program product.Therefore, the embodiment of the present invention can be used complete hardware embodiment, complete software embodiment or combine software and The form of the embodiment of hardware aspect.Moreover, the embodiment of the present invention can be used one or more wherein include computer can With in the computer-usable storage medium (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.) of program code The form of the computer program product of implementation.
The embodiment of the present invention be referring to according to the method for the embodiment of the present invention, terminal device (system) and computer program The flowchart and/or the block diagram of product describes.It should be understood that flowchart and/or the block diagram can be realized by computer program instructions In each flow and/or block and flowchart and/or the block diagram in process and/or box combination.It can provide these Computer program instructions are set to general purpose computer, special purpose computer, Embedded Processor or other programmable data processing terminals Standby processor is to generate a machine, so that being held by the processor of computer or other programmable data processing terminal devices Capable instruction generates for realizing in one or more flows of the flowchart and/or one or more blocks of the block diagram The device of specified function.
These computer program instructions, which may also be stored in, is able to guide computer or other programmable data processing terminal devices In computer-readable memory operate in a specific manner, so that instruction stored in the computer readable memory generates packet The manufacture of command device is included, which realizes in one side of one or more flows of the flowchart and/or block diagram The function of being specified in frame or multiple boxes.
These computer program instructions can also be loaded into computer or other programmable data processing terminal devices, so that Series of operation steps are executed on computer or other programmable terminal equipments to generate computer implemented processing, thus The instruction executed on computer or other programmable terminal equipments is provided for realizing in one or more flows of the flowchart And/or in one or more blocks of the block diagram specify function the step of.
Although the preferred embodiment of the embodiment of the present invention has been described, once a person skilled in the art knows bases This creative concept, then additional changes and modifications can be made to these embodiments.So the following claims are intended to be interpreted as Including preferred embodiment and fall into all change and modification of range of embodiment of the invention.
Finally, it is to be noted that, herein, relational terms such as first and second and the like be used merely to by One entity or operation are distinguished with another entity or operation, without necessarily requiring or implying these entities or operation Between there are any actual relationship or orders.Moreover, the terms "include", "comprise" or its any other variant meaning Covering non-exclusive inclusion, so that process, method, article or terminal device including a series of elements not only wrap Those elements are included, but also including other elements that are not explicitly listed, or further includes for this process, method, article Or the element that terminal device is intrinsic.In the absence of more restrictions, being wanted by what sentence "including a ..." limited Element, it is not excluded that there is also other identical elements in process, method, article or the terminal device for including the element.
Above to a kind of method and one for loading new mail in the mailbox client of mobile device provided by the present invention Kind loads the device of new mail in the mailbox client of mobile device, is described in detail, used herein specifically a Principle and implementation of the present invention are described for example, and it is of the invention that the above embodiments are only used to help understand Method and its core concept;At the same time, for those skilled in the art, according to the thought of the present invention, in specific embodiment party There will be changes in formula and application range, in conclusion the contents of this specification are not to be construed as limiting the invention.

Claims (10)

1. a kind of method for loading new mail in the mailbox client of mobile device characterized by comprising
The first total quantity of the first mail in mailbox server is obtained in mailbox client;
When first total quantity is more than preset amount threshold, first object quantity is determined;
From the first mail of the mailbox server, newest first object mail is downloaded according to the first object quantity;
Described the step of the first total quantity of the first mail in mailbox server is obtained in mailbox client includes: detection mailbox The version information of operating system locating for client and the email protocol of application;When the version information be specified version and When the email protocol is specified agreement, the first total quantity of the first mail in mailbox server is obtained.
2. the method according to claim 1, wherein the step of determining first object quantity, includes:
The second total quantity for inquiring the second mail in the mailbox client, as first object quantity.
3. method according to claim 1 or 2, which is characterized in that in first mail from the mailbox server, Include: according to the step of first object quantity downloading newest first object mail
To the of the second mail in the mailbox client and newest, the described first object quantity in the mailbox server One targeted mails are matched;
When second mail is matched with the first object mail, second postal is retained in the mailbox client Part;
When second mail and the first object mail mismatch, first mesh is downloaded from the mailbox server Mark mail deletes second mail in the mailbox client.
4. according to the method described in claim 3, it is characterized in that, second mail and institute in the mailbox client It states the step of the first object mail of newest, the described first object quantity in mailbox server is matched and includes:
The first identifier of newest first object mail is requested to accord with from the mailbox server according to the first object quantity;
Inquire the second identifier symbol of the second mail in the mailbox client;
Second identifier symbol is matched with first identifier symbol.
5. according to the method described in claim 4, it is characterized in that,
It is described when second mail is matched with the first object mail, retain described second in the mailbox client The step of mail includes:
When second identifier symbol is identical as the first identifier symbol, retain the second identifier in the mailbox client Accord with corresponding second mail;
It is described when second mail and the first object mail mismatch, from mailbox server downloading described first Targeted mails, the step of deleting second mail in the mailbox client include:
When second identifier symbol and not identical first identifier symbol, the first identifier is downloaded from the mailbox server Corresponding first mail is accorded with, the second identifier is deleted in the mailbox client and accords with corresponding second mail.
6. method described according to claim 1 or 2 or 4 or 5, which is characterized in that described from the of the mailbox server In one mail, after the step of first object quantity downloading newest first object mail, the method also includes:
When receiving the load request for first mail, the second destination number is determined;
From the first mail of the mailbox server, it is located at before current second mail according to second destination number downloading The second targeted mails.
7. according to the method described in claim 6, it is characterized in that, being pressed in first mail from the mailbox server According to second destination number downloading be located at current second mail before the second targeted mails the step of include:
The first identifier of newest second targeted mails is requested to accord with from the mailbox server according to second destination number, institute The second targeted mails are stated to be located at before current second mail;
The first identifier is downloaded from the mailbox server accords with corresponding second targeted mails.
8. method described according to claim 1 or 2 or 4 or 5 or 7, which is characterized in that further include:
When the total quantity of the mail is less than preset amount threshold, downloading and the mailbox from the mailbox server Unmatched first mail of second mail in client.
9. according to the method described in claim 8, it is characterized in that, the downloading from the mailbox server and the mailbox The step of the second mail unmatched first mail, includes: in client
The first identifier of all first mails is requested to accord with from the mailbox server;
Inquire the second identifier symbol of all second mails in the mailbox client;
It searches and accords with unmatched first identifier symbol with the second identifier;
The first identifier is downloaded from the mailbox server accords with corresponding first mail.
10. a kind of device for loading new mail in the mailbox client of mobile device characterized by comprising
Server mail quantity obtains module, and first for obtaining the first mail in mailbox server in mailbox client is total Quantity;
First object quantity determining module, for determining the first mesh when first total quantity is more than preset amount threshold Mark quantity;
First object mail download module, for from the first mail of the mailbox server, according to the first object number Amount downloads newest first object mail;
Mail box environment detection sub-module, for detecting the version information of operating system locating for mailbox client and the electronics postal of application Part agreement;
First total quantity acquisition submodule, for being specified version in the version information and the email protocol is finger When fixed agreement, the first total quantity of the first mail in mailbox server is obtained.
CN201610355285.XA 2016-05-25 2016-05-25 A kind of method and apparatus loading new mail in the mailbox client of mobile device Active CN105897560B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610355285.XA CN105897560B (en) 2016-05-25 2016-05-25 A kind of method and apparatus loading new mail in the mailbox client of mobile device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610355285.XA CN105897560B (en) 2016-05-25 2016-05-25 A kind of method and apparatus loading new mail in the mailbox client of mobile device

Publications (2)

Publication Number Publication Date
CN105897560A CN105897560A (en) 2016-08-24
CN105897560B true CN105897560B (en) 2019-06-21

Family

ID=56717092

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610355285.XA Active CN105897560B (en) 2016-05-25 2016-05-25 A kind of method and apparatus loading new mail in the mailbox client of mobile device

Country Status (1)

Country Link
CN (1) CN105897560B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110572311B (en) * 2019-08-09 2022-01-11 青岛海信移动通信技术股份有限公司 Mail downloading method and terminal
CN114500439A (en) * 2022-01-20 2022-05-13 统信软件技术有限公司 Mail downloading method, device, computing equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1674027A (en) * 2005-05-17 2005-09-28 北京立通无限科技有限公司 Fast checking and realizing method for obtaining new mail
CN1801205A (en) * 2006-01-11 2006-07-12 上海晨兴电子科技有限公司 Paging receiving and displaying method for Emails
CN102098633A (en) * 2011-02-14 2011-06-15 华为终端有限公司 E-mail downloading method and mobile terminal

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7711794B2 (en) * 2005-02-01 2010-05-04 International Business Machines Corporation Adjusting timing between automatic, non-user-initiated pollings of server to download data therefrom
US7805489B2 (en) * 2006-06-27 2010-09-28 Research In Motion Limited Electronic mail communications system with client email internet service provider (ISP) polling application and related methods

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1674027A (en) * 2005-05-17 2005-09-28 北京立通无限科技有限公司 Fast checking and realizing method for obtaining new mail
CN1801205A (en) * 2006-01-11 2006-07-12 上海晨兴电子科技有限公司 Paging receiving and displaying method for Emails
CN102098633A (en) * 2011-02-14 2011-06-15 华为终端有限公司 E-mail downloading method and mobile terminal

Also Published As

Publication number Publication date
CN105897560A (en) 2016-08-24

Similar Documents

Publication Publication Date Title
CN112866111B (en) Method and device for managing flow table
CN106302445B (en) Method and apparatus for handling request
CN111917687B (en) Method and device for circularly pushing reminding message
RU2004104197A (en) METHOD, DEVICE AND USER INTERFACE FOR MANAGING ELECTRONIC MESSAGES AND WARNING MESSAGES
CN107196848B (en) Information push method and device
CN108810047B (en) Method and device for determining information push accuracy rate and server
CN107613040A (en) A kind of method and apparatus of domain name system DNS server lookup
CN107438084A (en) Multi-client data synchronization method and apparatus
CN109194565A (en) A kind of message read states reminding method and device
CN110648089A (en) Method and device for determining delivery timeliness of articles
CN105897560B (en) A kind of method and apparatus loading new mail in the mailbox client of mobile device
CN106790454A (en) Deferred information method for pushing and device
CN104135429A (en) A method and a device for pushing information
CN107704357B (en) Log generation method and device
CN106888264B (en) A kind of method for interchanging data and device
CN105100002A (en) Attribute operation method and device
CN110858332B (en) Order production method and device
CN108234277A (en) A kind of mail transmission, the method and device of editor
CN110324384B (en) Data pushing method and device
CN108985805B (en) Method and device for selectively executing push task
CN109597912A (en) Method for handling picture
CN104601452B (en) A kind of method and device for configuring post time
CN110557351B (en) Method and apparatus for generating information
CN109413212A (en) Method and apparatus for handling request
CN109614603A (en) Method and apparatus for generating information

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant