CN110572311B - Mail downloading method and terminal - Google Patents

Mail downloading method and terminal Download PDF

Info

Publication number
CN110572311B
CN110572311B CN201910734400.8A CN201910734400A CN110572311B CN 110572311 B CN110572311 B CN 110572311B CN 201910734400 A CN201910734400 A CN 201910734400A CN 110572311 B CN110572311 B CN 110572311B
Authority
CN
China
Prior art keywords
mail
time
downloading
terminal
updating
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
CN201910734400.8A
Other languages
Chinese (zh)
Other versions
CN110572311A (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 CN201910734400.8A priority Critical patent/CN110572311B/en
Publication of CN110572311A publication Critical patent/CN110572311A/en
Application granted granted Critical
Publication of CN110572311B publication Critical patent/CN110572311B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/28Timers or timing mechanisms used in protocols

Abstract

The invention discloses a method and a terminal for downloading a mail, which are used for overcoming the defect of low speed of downloading the mail based on an IMAP protocol, improving the speed of downloading the mail and improving the experience of a user using a mailbox client. The method comprises the following steps: responding to the mail updating instruction, taking the current local time of the terminal as the starting time of the mail updating, and taking the local downloading time of the earliest mail in the current mail list as the finishing time of the mail updating, and determining a mail updating time period; acquiring the mail information in the updating time period from a server; and downloading the mail information in the updating time period according to the downloaded mail information in the current mail list.

Description

Mail downloading method and terminal
Technical Field
The invention relates to the technical field of computers, in particular to a method and a terminal for downloading mails.
Background
Currently, a mailbox client mainly uses an Internet Message Access Protocol (IMAP), and when a mail is downloaded through the IMAP, especially under the condition of a large number of mails, the mail downloading speed is easily caused, which is specifically a disadvantage as follows:
when a local mailbox acquires a mail information list in a mail updating time period, the mail updating end time is not the end time directly acquired from a server, but the mail updating end time calculated according to the time format of coordinated universal time UTC, such as the mail updating end time (UTC) = the mail updating end time (Chinese district server time) -8.
Therefore, when the user refreshes the mails, especially under the condition of a large number of the mails, the downloading speed of the new mails is low, and the user can load all the new mails after waiting for a long time, thereby seriously influencing the user experience.
Disclosure of Invention
The invention provides a method and a terminal for downloading a mail, which are used for overcoming the defect of low downloading speed when the mail is downloaded through an IMAP protocol, improving the speed of downloading the mail and improving the experience of a user using a mailbox client.
In a first aspect, the present invention provides a method for downloading an email, including:
responding to the mail updating instruction, taking the current local time of the terminal as the starting time of the mail updating, and taking the local downloading time of the earliest mail in the current mail list as the finishing time of the mail updating, and determining a mail updating time period;
acquiring the mail information in the updating time period from a server;
and downloading the mail information in the updating time period according to the downloaded mail information in the current mail list.
In the method for downloading the mails, when determining the end time of the mail update, a time zone factor is considered, the end time of the mail update is not calculated according to the time format of coordinated Universal Time Coordinated (UTC), but the local download time of the earliest mail in a current mail list acquired by a terminal from a server is taken as the end time of the mail update, so that the end time of the mail update in the embodiment is calculated according to the local time, because the start time of the mail update is calculated according to the local time of the current mail client, the mail download method provided by the application can acquire the more accurate end time of the mail update, thereby acquiring the more accurate mail update time period, avoiding the defect that the mail update time period is increased due to the time zone factor, and the mail information in the update time period acquired from the server avoids acquiring the downloaded mail information of a mailbox client, therefore, under the condition that the number of the mails needing to be updated is large, the downloading speed of the mails can be greatly improved, the long-time waiting of a user is avoided, and the use experience of the user is improved.
In an optional implementation manner, downloading the mail information in the update time period according to the downloaded mail information in the current mail list includes:
and simultaneously starting a plurality of threads in the thread pool, and individually downloading the mail information in the updating time period through each thread according to the downloaded mail information in the current mail list.
The method for starting the multithreading downloading overcomes the defect of one package of the existing downloading, and can further improve the speed of downloading the mail under the condition of abundant data transmission bandwidth.
In an optional implementation manner, downloading the mail information in the updated time period according to the downloaded mail information in the current mail list, further includes:
and responding to a specified mail downloading instruction, and starting an independent thread outside the thread pool to download the specified mail.
Furthermore, the method can ensure that the thread in the thread pool is not occupied, the independent thread is adopted to download the designated mail independently, the user can be ensured to download the designated mail independently in a targeted manner, and particularly in the process that the designated mail is waiting for downloading, the independent thread can be used to download the designated mail quickly by responding to the downloading instruction of the user to the designated mail, so that the waiting time of the user is avoided, and the use experience of the user can be improved.
In an optional embodiment, the method further comprises:
and after responding to the mail updating instruction, if the number of the mails in the current mail list exceeds a preset value, deleting the mails according to the sequence of the mail downloading time in the current mail list until the number of the mails does not exceed the preset value.
In the process of downloading the mail according to the IMAP protocol, header information of the mail in the update time period, such as a mail header, a sender and the like, is downloaded first, the flag bits of the mails in the current mail list, such as read or unread mails, important mails, replied mails, etc., when the flag bit is updated, whether the number of mails in the current mail list exceeds 500 is judged, if so, 500 is taken as a segment, the flag bit updating application is initiated to the server in segments, the initiated update flag bit application is time-consuming, about 0.5 seconds is needed for each time of initiating the application command, therefore, further, by the method, the mails can be automatically deleted, the number of the mails is ensured not to exceed the preset value, the application times of updating the zone bit are reduced to a certain extent, therefore, the time for initiating the updating of the zone bit is saved to a certain extent, and the speed of downloading the mail is improved to a certain extent.
In an optional implementation manner, after deleting the mails in sequence until the number of the mails does not exceed a preset value, the method further includes:
and responding to the instruction of viewing the mails, sending the number of the viewed mails and the local downloading time of the earliest mail in the current mail list to the server, and acquiring the number of mails before the local downloading time from the server.
The method can ensure that on the basis of an automatic mail deleting mechanism, even if a user wants to acquire mails of which the number exceeds that of the mails in the current mail list, the number of the mails to be checked and the starting time of checking can be still sent to the server, and the mails to be checked are acquired from the server and stored in the current mail list.
In a second aspect, the present invention provides a terminal for downloading a mail, the terminal comprising: a processor and a memory, wherein the memory stores program code that, when executed by the processor, causes the terminal to perform the following:
responding to the mail updating instruction, taking the current local time of the terminal as the starting time of the mail updating, and taking the local downloading time of the earliest mail in the current mail list as the finishing time of the mail updating, and determining a mail updating time period;
acquiring the mail information in the updating time period from a server;
and downloading the mail information in the updating time period according to the downloaded mail information in the current mail list.
In an alternative embodiment, the processor is specifically configured to:
and simultaneously starting a plurality of threads in the thread pool, and individually downloading the mail information in the updating time period through each thread according to the downloaded mail information in the current mail list.
In an optional implementation, the processor is specifically further configured to:
and responding to a specified mail downloading instruction, and starting an independent thread outside the thread pool to download the specified mail.
In an optional implementation, the processor is specifically further configured to:
and after responding to the mail updating instruction, if the number of the mails in the current mail list exceeds a preset value, deleting the mails according to the sequence of the mail downloading time in the current mail list until the number of the mails does not exceed the preset value.
In an optional implementation, the processor is specifically further configured to:
and responding to the instruction of viewing the mails, sending the number of the viewed mails and the local downloading time of the earliest mail in the current mail list to the server, and acquiring the number of mails before the local downloading time from the server.
In a third aspect, the present invention provides an apparatus for downloading a mail, the apparatus includes a mail updating unit, an acquiring mail unit, and a mail downloading unit, wherein:
the mail updating unit is used for responding to the mail updating instruction, taking the current local time of the terminal as the starting time of mail updating, taking the local downloading time of the earliest mail in the current mail list as the finishing time of mail updating and determining a mail updating time period;
an acquiring mail unit, configured to acquire mail information in the update time period from a server;
and the mail downloading unit is used for downloading the mail information in the updating time period according to the downloaded mail information in the current mail list.
In an optional implementation manner, the mail downloading unit is specifically configured to:
and simultaneously starting a plurality of threads in the thread pool, and individually downloading the mail information in the updating time period through each thread according to the downloaded mail information in the current mail list.
In an optional implementation manner, the mail downloading unit is specifically configured to:
and responding to a specified mail downloading instruction, and starting an independent thread outside the thread pool to download the specified mail.
In an optional implementation manner, the apparatus further includes a deletion unit specifically configured to:
and after responding to the mail updating instruction, if the number of the mails in the current mail list exceeds a preset value, deleting the mails according to the sequence of the mail downloading time in the current mail list until the number of the mails does not exceed the preset value.
In an optional implementation manner, the deleting unit is further specifically configured to:
and responding to the instruction of viewing the mails, sending the number of the viewed mails and the local downloading time of the earliest mail in the current mail list to the server, and acquiring the number of mails before the local downloading time from the server.
In a fourth aspect, the present invention provides a computer storage medium having stored thereon a computer program which, when executed by a processing unit, performs the steps of the method of the first aspect.
In addition, for technical effects brought by any one implementation manner of the second aspect to the fourth aspect, reference may be made to technical effects brought by different implementation manners of the first aspect, and details are not described here.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise.
Fig. 1A is a schematic diagram of a terminal including a mailbox client according to an embodiment of the present invention;
fig. 1B is a schematic diagram of a mailbox client according to an embodiment of the present invention;
FIG. 1C is a diagram illustrating a mail list according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of an inbox according to an embodiment of the present invention;
fig. 3 is a flowchart of a method for downloading an email according to an embodiment of the present invention;
FIG. 4A is a diagram illustrating an update instruction of a response mail according to an embodiment of the present invention;
FIG. 4B is a diagram illustrating an alternative response email update instruction according to an embodiment of the present invention;
FIG. 4C is a diagram illustrating an embodiment of obtaining more emails;
fig. 5 is a flowchart of determining that a terminal has not downloaded mail information according to an embodiment of the present invention;
FIG. 6 is a flowchart illustrating downloading an email via a thread pool according to an embodiment of the present invention;
FIG. 7 is a flowchart illustrating an exemplary method for downloading an email;
fig. 8 is a schematic diagram of a terminal for downloading an email according to an embodiment of the present invention;
fig. 9 is a schematic diagram of another terminal for downloading an email according to an embodiment of the present invention;
fig. 10 is a schematic diagram of a third email downloading terminal according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer, the present invention will be described in further detail with reference to the accompanying drawings, and it is apparent that the described embodiments are only a part of the embodiments of the present invention, not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Some of the words that appear in the text are explained below:
1. the term "terminal", or "terminal device", in the embodiment of the present invention, is a device located at the outermost periphery of a network in a computer network, and can access a wireless local area network WLAN to perform input of user information and output of processing results, and includes a desktop computer, a mobile phone, a notebook, a tablet computer, a POS machine, and a vehicle-mounted computer.
2. In the embodiment of the invention, the term "coordinated universal time UTC" is also called universal time, universal standard time and international coordinated time. The coordinated universal time is a time metering system which is based on the length of atomic hour and second and is as close to the universal time as possible in time. The set of time systems is used in many standards for the internet and world wide web, for example, the network time protocol is one way to coordinate the use of the world time in the internet. The time difference between UTC and time in china (including hong kong, australia, taiwan), mongolia, singapore, malaysia, philippines, western australia is +8, i.e., UTC + 8.
The execution main body of the invention is a terminal which comprises a mailbox client or other application programs capable of downloading the mail, and a user can acquire the mail through the mailbox client and perform corresponding operations on the mail, such as downloading, deleting and the like. As shown in fig. 1A, the terminal display page displays a mailbox client, and as shown in fig. 1B, the mailbox client includes a plurality of function options such as an inbox, a sent mail, a deleted mail, an important mail, a draft box, a recycle bin, a collected mail, and a collected contact, wherein as shown in fig. 1C, after the user clicks the inbox function, a mail list can be displayed, and downloaded mail information is displayed in the mail list.
The application scenario described in the embodiment of the present invention is for more clearly illustrating the technical solution of the embodiment of the present invention, and does not form a limitation on the technical solution provided in the embodiment of the present invention, and it can be known by a person skilled in the art that with the occurrence of a new application scenario, the technical solution provided in the embodiment of the present invention is also applicable to similar technical problems.
Currently, a mailbox client mainly uses an Internet Message Access Protocol (IMAP), where the IMAP is a Protocol for specifying how a personal computer accesses a mail server on the Internet to send and receive mails, and supports the mailbox client to Access and read mails on the server online or offline, and also can interactively operate mails on the server and provide a user-oriented mail download service. The user can decide whether to download, delete and retrieve a specific part of the mail by browsing the mail header information, and the user is provided with a function of selectively receiving the mail from the mail server.
The IMAP provides two-way communication between the mail on the server and the mailbox client, the operation of the mailbox client synchronously reacts to the server, the operation is carried out on the mail, and the mail on the server also performs corresponding action. For example, 3 mails in the mailbox are downloaded at the mailbox client, one of the three mails is marked as read, the other two mails are marked as deleted, and the operations are fed back to the server immediately.
The IMAP protocol supports an off-line mode and an on-line mode to transmit data, and in the on-line mode, a mail box client operates a mail on a server, so that the mail does not need to be downloaded to the local, and a user can browse the mail through the mail box client or the Wed on line; in the off-line mode, the mailbox client can continuously connect the server to download unread mails to the local disk.
As shown in fig. 2, a brief introduction is made to the flow of the mail downloading process by the existing IMAP protocol:
step 200, taking the current time as the starting time of the mail updating, and determining the ending time of the mail updating, wherein the current time is calculated according to the current local time, and the ending time is calculated according to the time format of UTC;
and if the end time of the mail updating of the account which is just created is the time obtained by subtracting 1 day from the current time, and if the account is not the account which is created for the first time, the end time of the mail updating is the UTC time of the earliest mail in the current mail list.
Step 201, acquiring mail list information from a server in a time period from the current time to the end of the mail updating, wherein each mail comprises identification information Remote access identifier (UID);
step 202, obtaining mail list information in a Local mail list, wherein each mail comprises identification information Local UID;
step 203, comparing whether the identification information Remote User Identifier (UID) is consistent with the identification information Local UID, if so, executing step 204, otherwise, executing step 205;
step 204, determining that the mail corresponding to the identification information is downloaded locally, and not executing the downloading of the mail;
step 205, judging whether the Local UID is null or not and whether the Remote UID is not null or not, if the Local UID is null and the Remote UID is not null, executing step 206, and if the Local UID is not null and the Remote UID is null, executing step 207;
step 206, determining that the mail corresponding to the identification information is not downloaded to the local, and adding the mail into a mail list which is not downloaded;
step 207, determining that the mail corresponding to the identification information is deleted at the server side, and deleting the mail locally;
step 208, downloading the mail header information in the undelivered mail list;
step 209, refreshing the zone bit of the mail in the local mail list;
the flag bits include, but are not limited to, read, unread, important mail, advertised mail, replied.
If the current local mail exceeds 500, taking 500 mails as a section, and sending a flag bit updating application to the server in a segmented manner; if the local mail is less than 500, initiating an application to the server through a command.
And step 210, downloading the mails in the undelivered mail list one by one in sequence.
Through the above simple introduction of the mail downloading process in the prior art, it can be seen that the following time-consuming operations are available in the mail downloading process:
when the local mailbox client side obtains the mail information list in the updated time period, the end time of the mail update is calculated according to the time format of UTC, and the start time of the mail update is calculated according to the current local time, for example, the SERVER timestamp (SERVER _ TIMESTAMP) of the last mail of the local mailbox client side is 2017-08-0607: 00:00, if the SERVER timestamp (SERVER _ TIMESTAMP) is 2017-08-0523: 00:00 after being converted into UTC time (time zone 8 hours is removed), the end date of the mail update is 2017-08-05, when a refreshing operation is initiated, all mails of 2017-08-05 are refreshed as new mails, the process of downloading the mails is a time-consuming operation, and the mail refreshing speed and the downloading speed are slow on a mailbox client side interface.
Aiming at the defects, the invention provides a mail downloading method, which can improve the speed of downloading the mail and improve the experience of a user in using a mailbox client.
Example 1
The following describes a method for downloading a mail according to the present invention by using a specific embodiment.
In order to improve the defect of slow downloading speed when the mails are downloaded through an IMAP protocol, the embodiment of the invention mainly optimizes the end time for determining the mail updating time, directly takes the time of the earliest mail in the current mail list as the end time of the mail updating, does not take the UTC time of the earliest mail in the current mail list as the end time of the mail updating, calculates the start time and the end time of the mail updating according to the local time, avoids the inaccuracy of the mail updating end time caused by a time zone, and can improve the mail downloading speed, particularly improve the use experience of a user when a large number of mails are downloaded.
As shown in fig. 3, the method for downloading an email provided in this embodiment includes the following specific implementation flows:
and step 300, responding to the mail updating instruction, taking the current local time of the terminal as the starting time of the mail updating, and taking the local downloading time of the earliest mail in the current mail list as the ending time of the mail updating, and determining the mail updating time period.
In this embodiment, determining that the mailbox client responds to the mail update instruction includes, but is not limited to, the following manners:
mode 1, when determining that a mailbox client is started, responding to a mail updating instruction; that is, the email update is started at the moment when the email client is started, as shown in fig. 4A, after the user clicks the email client, the email client is started and responds to the email update instruction.
Mode 2, when determining that the trigger updating instruction is received, responding to the mail updating instruction; specifically, the trigger update instruction may be determined to be received when the user clicks the refresh or load option of the mailbox client, as shown in fig. 4B, after the user clicks the refresh or load option of the mailbox client, the email update instruction is responded.
And 3, responding to the mail updating instruction when the set time is determined to be reached. The mailbox client automatically initiates the mail updating indication in the background every set time.
In this embodiment, the mailbox client determines that the start time and the end time of the email update are determined according to the local time, so as to notify the server of acquiring the email information in the time period, and specifically may determine the time period for email update in the following manner:
mode 1, if the account is a mailbox account which is just created, the start time of updating the mail is the current time, the end time of updating the mail is the time obtained by subtracting 1 day from the current time, that is, the end time of updating the mail = the local download time of the earliest mail in the current mail list = the current local time of the terminal-1 day, and the time period of updating the mail = the current local time of the terminal-the local download time of the earliest mail in the current mail list of the terminal =1 day, so if the account is a mailbox account which is just created, the mail information before one day is acquired from the server;
and 2, if the mail is not the newly created mailbox account, determining the mail updating time period by taking the current local time of the terminal as the starting time of the mail updating and taking the local downloading time of the earliest mail in the current mail list as the finishing time of the mail updating. And taking the current local time of the terminal as the start time of mail updating, and taking the server time of the last mail acquired by the terminal from the server, namely the local downloading time of the earliest mail in the current mail list, as the end time of mail updating, namely the time period of mail updating = the current local time of the terminal-the local downloading time of the earliest mail in the current mail list of the terminal.
If the current local time of the terminal (namely the current time of the local mailbox client) is 2019-7-2912: 00:00, the local downloading time of the earliest mail in the current mail list of the terminal, namely the server time of the last mail acquired from the server by the local mailbox client is 2019-7-297: 00:00, the time period for updating the mail is 2019-7-2907: 00: 00-12: 00:00, and all mail information in the time period is acquired from the server.
In the embodiment, when the time zone factor is considered and the UTC time is not used for calculation, the mail information which does not need to be updated is also prevented from being downloaded, and the speed of downloading the mail is increased.
For another time-consuming operation in the current mail downloading process, when the number of local mails is large, such as more than 1000, updating flag bit application is initiated to the server in segments, such as 500 mails are taken as one segment, but each time of initiating an application command requires about 0.5 second, when the number of local mails is far more than 1000, the application command is initiated for multiple times, and if N (N is a positive integer) times of application commands are initiated, N x 0.5 seconds are additionally required, so that the time consumption is long; to improve this time consuming operation, embodiments of the present invention provide the following:
as a possible implementation manner, after responding to the mail update instruction, if the number of mails in the current mail list exceeds the preset value, the embodiments of the present invention delete the mails according to the sequence of the mail download time in the current mail list until the number of mails does not exceed the preset value.
Optionally, the preset value is a value not greater than 1000, for example, the preset value =1000, if the number of the mails in the local mailbox client exceeds 1000, the mails are deleted according to the sequence of the download time until the number of the local mails is within 1000, so that the mail refreshing operation can be completed only by sending a command of refreshing the flag bit twice at most.
As an optional implementation manner, the emails are deleted until the number of the emails does not exceed the preset value, and the deletion may also be performed according to the priority, the importance degree, or the type of the email, for example, the emails with the type of the email being an advertisement type, the emails with the lowest priority of the emails, or the unimportant emails marked by the user may be preferentially deleted.
If the user needs to check the mails beyond the preset value, the embodiment also provides the following method for checking:
as a possible implementation manner, in response to the instruction of viewing the mails, the number of the viewed mails and the local download time of the earliest mail in the current mail list are sent to the server, and the number of the mails before the local download time are obtained from the server.
For example, the user needs to view the mails of other than the latest 1000 mails, as shown in fig. 4C, the user may trigger to acquire more mails from the server by clicking the "load more mail" button, and display the mails in the mail list of the local mailbox client; when the user refreshes the mails next time, the above mail deleting mode can be adopted to determine that the mails in the local mailbox client exceed 1000 packages, and the mails are deleted according to the sequence of the downloading time until the number of the local mails is within 1000 packages.
In the process of downloading the mail by the IMAP protocol at present, header information of the mail in an updating time period, such as a mail title, a sender and the like, is downloaded first, then flag bits of the mail in a current mail list, such as a read mail, an unread mail, an important mail, a reply and the like, are refreshed, when the flag bits are updated, whether the number of the mails in the current mail list exceeds 500 is judged, if so, the mails are divided into one segment by 500, the application for updating the flag bits is initiated to a server in a segmented manner, and the initiated application for updating the flag bits takes time, and each time of initiating an application command needs about 0.5 second.
Therefore, further, by the method, the mails can be automatically deleted, the number of the mails is guaranteed not to exceed the preset value, the time for initiating the application of the update flag bit for many times is saved by the method for deleting the mails in the embodiment when the number of the mails exceeds 1000 in the prior art, and particularly when the number of the mails exceeds 1000, the method in the embodiment is adopted, the number of times for applying the update flag bit is reduced to a certain extent, so that the time for initiating the update flag bit is saved to a certain extent, the time for updating the mails is saved, and the speed for downloading the mails is improved to a certain extent.
Step 301, obtaining the mail information in the updating time period from the server.
And according to the time period of updating the mail determined by the terminal, after all mail information in the time period of updating is obtained from the server, according to the downloaded mail information in the current mail list, the mail information which is not downloaded by the terminal is determined from the mail information obtained by the server.
Specifically, as shown in fig. 5, the mail information that has not been downloaded by the terminal may be determined by the following steps:
step 500, acquiring mail list information from a server within a time period from the current time to the end of the mail updating, wherein each mail comprises identification information Remote access identification (UID);
step 501, mail list information in a Local mail list is obtained, wherein each mail comprises identification information Local UID;
step 502, comparing whether the identification information Remote UID is consistent with the identification information Local UID, if so, executing step 503, otherwise, executing step 504;
step 503, determining that the mail corresponding to the identification information is downloaded locally, and not executing the downloading of the mail;
step 504, judging whether the Local UID is null or not and whether the Remote UID is not null or not, if the Local UID is null and the Remote UID is not null, executing step 505, and if the Local UID is not null and the Remote UID is null, executing step 506;
step 505, determining that the mail corresponding to the identification information is a mail which is not downloaded by the terminal;
step 506, if the mail corresponding to the identification information is determined to be deleted at the server side, the mail is locally deleted.
And 507, downloading the mail information in the updating time period according to the downloaded mail information in the current mail list.
Further, as a possible implementation manner, in the present embodiment, an asynchronous multithreading manner is adopted for the yet-to-be-downloaded mail, that is, multiple threads in a thread pool are simultaneously started, and mail information is separately downloaded through each thread according to the downloaded mail information in the current mail list, in the present embodiment, multiple threads are simultaneously started, each thread separately starts downloading of mail content, if a certain thread among the multiple threads finishes downloading, the thread starts new mail content to download, and the multiple threads simultaneously operate until all mail content is downloaded.
For example, the number of threads in the thread pool is 6, each thread separately starts downloading the mail content, for example, thread 1 is responsible for downloading the mail 1 content, thread 2 is responsible for downloading the mail 2 content, and in the case of abundant data transmission bandwidth, the downloading speed is 6 times that in the prior art.
By the method for starting the multithread downloading, a plurality of threads are started to independently download the mails of multiple packages, the defect of one package-to-one package downloading at present is overcome, and the speed of downloading the mails can be further improved under the condition of abundant data transmission bandwidth.
Furthermore, the embodiment provides a method for facilitating the user to preferentially download a specific mail, for example, when the mail content is downloaded in sequence after the mail header information has been downloaded, and the user is in a position to view a piece of mail content that has not been downloaded according to the downloaded mail header information, the method may be as follows:
and responding to a specified mail downloading instruction, and starting an independent thread outside the thread pool to download the specified mail.
And for the mails which are not downloaded, when the download instruction of the set mail is determined to be received, responding to a specified mail download instruction, and starting independent threads except the thread pool to download the set mail.
As an optional implementation manner, for a mail whose mail header information is downloaded and whose mail content has not been downloaded yet, determining, according to the mail header information, that a download instruction of the mail corresponding to the mail header information is received.
In this embodiment, the user may determine whether to download the mail starting independent thread according to the mail header information that has been downloaded, where the mail header information includes but is not limited to: mail title, sending user information, receiving user information, copying user information, secret sending user information and sending date.
On one hand, in the embodiment, a multithread simultaneous downloading starting mode can be adopted, and on the basis, an independent thread can be set and used for starting the independent thread to download the specified mail when a downloading instruction of the set mail is received, for example, when the downloading instruction of the specified mail by a user is received, so that the user can immediately check the mail content without waiting.
For example, there are 6 threads in the current thread pool that are respectively executing the downloading of the contents of the mails 1 to 6, but at this time, the user specifies to download the content of the 8 th mail, and when the user clicks the mail 8, the mailbox client will start an independent thread to download the mail 8 independently, which is not affected by the downloading progress of the 6 threads in the current thread pool.
Furthermore, the method can ensure that the thread in the thread pool is not occupied, the independent thread is adopted to download the designated mail independently, the user can be ensured to download the designated mail independently in a targeted manner, and particularly in the process that the designated mail is waiting for downloading, the independent thread can be used to download the designated mail quickly by responding to the downloading instruction of the user to the designated mail, so that the waiting time of the user is avoided, and the use experience of the user can be improved.
At present, the downloading of the mail content generally adopts a serial downloading mode, namely, the downloading of the next piece of content is started after the downloading of one piece of mail is finished, the speed is low, the efficiency is low, and particularly when the content of a single piece of mail is large, the downloading time is long, and the user experience is poor. The embodiment adopts the thread pool scheme, and greatly improves the efficiency of mail downloading by simultaneously starting downloading by using a plurality of mails.
As shown in fig. 6, the implementation manner of the thread pool in this embodiment is described in detail as follows:
step 600, sorting all mails of which the mail header information is downloaded in the mail list according to the sequence of time;
specifically, the mails in the mail list have corresponding identification IDs and download statuses in the database, including but not limited to: the downloaded mail header information, the downloaded all mail content, etc.
601, creating a thread pool with the maximum thread number of N, putting all mails with downloaded mail header information into the thread pool, and preferentially downloading the latest N mails according to the time sequence;
and N is a positive integer and can be adjusted according to the performance of a terminal system, wherein if the performance of the terminal is higher, the created N is larger, and if the performance of the terminal is lower, the created N is smaller.
Step 602, adding other mails of the thread pool except the N mails into a blocking queue for waiting to be downloaded;
the blocking queue adopts a list blocking queue mode according to time sequencing, so that all mails of which the mail header information is downloaded can be ensured to be sequentially started to download the idle thread pool.
And 603, when the thread pool automatically judges that an idle thread exists, selecting a task from the blocking queue and downloading the task through the idle thread.
In the downloading thread of each mail, if the downloading state of the current mail is 'the content of the downloaded mail', the current thread is finished, and the current thread is in an idle state at the moment.
The downloading of all the undelivered mails can be completed circularly through the steps.
The method can be used for preferentially downloading the mail by adopting a mode of starting an independent thread when the mail which a user wants to view preferentially is not downloaded in the thread pool.
Example 2
As shown in fig. 7, a detailed flow of mail downloading is described in this embodiment, a mail downloading process in this embodiment is based on an IMAP protocol, and time-consuming operations of different links in the IMAP protocol are improved, and a flow of mail downloading specifically is as follows:
step 700, responding to the mail updating instruction;
step 701, determining an email updating time period by taking the current local time of the terminal as the initial time of email updating and taking the local downloading time of the earliest email in the current email list as the finishing time of email updating;
and meanwhile, when the number of the mails in the current mail list is determined to exceed the preset value, deleting the mails according to the sequence of the mail downloading time in the current mail list until the number of the mails does not exceed the preset value.
Step 702, acquiring mail list information from a server within a time period from the current time to the end of the mail updating, wherein each mail comprises identification information Remote access identification (UID);
step 703, obtaining the mail list information in the Local mail list, wherein each mail includes the identification information Local UID;
step 704, comparing whether the identification information Remote User Identifier (UID) is consistent with the identification information Local UID, if so, executing step 705, otherwise, executing step 706;
step 705, determining that the mail corresponding to the identification information is downloaded locally, and not executing the downloading of the mail;
step 706, determining whether the Local UID is null and the Remote UID is not null, if the Local UID is null and the Remote UID is not null, executing step 707, if the Local UID is not null and the Remote UID is null, executing step 708;
step 707, determining that the mail corresponding to the identification information has not been downloaded to the local, and adding the mail to a list of mails which have not been downloaded;
step 708, if the mail corresponding to the identification information is determined to be deleted at the server side, the mail is deleted locally;
step 709, downloading the mail header information in the undeleted mail list;
step 710, refreshing the zone bit of the mail in the local current mail list;
the flag bits include, but are not limited to: read, unread, important mail, advertised mail, replied.
And 711, for the mails of which the mail contents are not downloaded, simultaneously starting a plurality of threads in the thread pool to download the mail information independently through each thread.
And 712, responding to the specified mail downloading instruction for the mail which has downloaded the mail header information but has not downloaded the mail content, and starting an independent thread outside the thread pool to download the specified mail.
Example 3
Based on the same inventive concept, the embodiment of the present invention further provides a terminal for downloading an email, and since the terminal is the terminal in the method in the embodiment of the present invention and the principle of the terminal to solve the problem is similar to the method, the implementation of the terminal may refer to the implementation of the method, and repeated details are not repeated.
As shown in fig. 8, the terminal comprises a processor 800 and a memory 801, wherein the memory 801 stores program codes, and when one or more computer programs stored in the memory 801 are executed by the processor 800, the terminal is caused to perform the following processes:
responding to the mail updating instruction, taking the current local time of the terminal as the starting time of the mail updating, and taking the local downloading time of the earliest mail in the current mail list as the finishing time of the mail updating, and determining a mail updating time period;
acquiring the mail information in the updating time period from a server;
and downloading the mail information in the updating time period according to the downloaded mail information in the current mail list.
As a possible implementation, the processor 800 is specifically configured to:
and simultaneously starting a plurality of threads in the thread pool, and individually downloading the mail information in the updating time period through each thread according to the downloaded mail information in the current mail list.
As a possible implementation manner, the processor 800 is specifically further configured to:
and responding to a specified mail downloading instruction, and starting an independent thread outside the thread pool to download the specified mail.
As a possible implementation manner, the processor 800 is specifically further configured to:
and after responding to the mail updating instruction, if the number of the mails in the current mail list exceeds a preset value, deleting the mails according to the sequence of the mail downloading time in the current mail list until the number of the mails does not exceed the preset value.
As a possible implementation manner, the processor 800 is specifically further configured to:
and responding to the instruction of viewing the mails, sending the number of the viewed mails and the local downloading time of the earliest mail in the current mail list to the server, and acquiring the number of mails before the local downloading time from the server.
Example 4
Based on the same inventive concept, another terminal for downloading the mail is also provided in the embodiment of the present invention, because the terminal is the terminal in the method in the embodiment of the present invention, and the principle of the terminal for solving the problem is similar to the method, the implementation of the terminal may refer to the implementation of the method, and repeated details are not repeated.
As shown in fig. 9, the terminal includes a mail updating unit 900, an acquiring mail unit 901, and a mail downloading unit 902, wherein:
a mail updating unit 900, configured to respond to a mail updating instruction, determine a mail updating time period by using the current local time of the terminal as the start time of the mail updating, and using the local download time of the earliest mail in the current mail list as the end time of the mail updating;
an acquiring mail unit 901, configured to acquire mail information in the update time period from a server;
mail downloading unit 902 downloads the mail information in the update time period according to the downloaded mail information in the current mail list.
As an optional implementation manner, the mail downloading unit 902 is further specifically configured to:
and simultaneously starting a plurality of threads in the thread pool, and individually downloading the mail information in the updating time period through each thread according to the downloaded mail information in the current mail list.
As an optional implementation manner, the mail downloading unit 902 is further specifically configured to:
and responding to a specified mail downloading instruction, and starting an independent thread outside the thread pool to download the specified mail.
As an optional implementation manner, the apparatus further includes a deletion unit specifically configured to:
and after responding to the mail updating instruction, if the number of the mails in the current mail list exceeds a preset value, deleting the mails according to the sequence of the mail downloading time in the current mail list until the number of the mails does not exceed the preset value.
As an optional implementation manner, the deleting unit is further specifically configured to:
and responding to the instruction of viewing the mails, sending the number of the viewed mails and the local downloading time of the earliest mail in the current mail list to the server, and acquiring the number of mails before the local downloading time from the server.
Based on the same inventive concept, the embodiment of the present invention further provides a third terminal for downloading an email, and since the terminal is the terminal in the method in the embodiment of the present invention and the principle of the device for solving the problem is similar to that of the method, the implementation of the device may refer to the implementation of the method, and repeated details are not repeated.
As shown in fig. 10, the terminal 1000 includes: a Radio Frequency (RF) circuit 1010, a power supply 1020, a processor 1030, a memory 1040, an input unit 1050, a display unit 1060, a camera 1070, a communication interface 1080, and a Wireless Fidelity (Wi-Fi) module 1090. Those skilled in the art will appreciate that the configuration of the terminal shown in fig. 10 is not intended to be limiting, and that the terminal provided by the embodiments of the present application may include more or less components than those shown, or some components may be combined, or a different arrangement of components may be provided.
The various components of terminal 1000 are described in detail below with reference to fig. 10:
the RF circuit 1010 may be used for receiving and transmitting data during a communication or conversation. Specifically, the RF circuit 1010 sends downlink data of the base station to the processor 1030 for processing; and in addition, sending the uplink data to be sent to the base station. In general, the RF circuit 1010 includes, but is not limited to, an antenna, at least one Amplifier, a transceiver, a coupler, a Low Noise Amplifier (LNA), a duplexer, and the like.
In addition, the RF circuit 1010 may also communicate with networks and other terminals through wireless communication. The wireless communication may use any communication standard or protocol, including but not limited to Global System for Mobile communication (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), email, Short Messaging Service (SMS), and the like.
The Wi-Fi technology belongs to a short-distance wireless transmission technology, and the terminal 1000 may connect to an Access Point (AP) through the Wi-Fi module 1090, thereby implementing Access to a data network. The Wi-Fi module 1090 can be used for receiving and transmitting data during communication.
The terminal 1000 can be physically connected to other terminals through the communication interface 1080. Optionally, the communication interface 1080 is connected to the communication interfaces of the other terminals through a cable, so as to implement data transmission between the terminal 1000 and the other terminals.
In the embodiment of the present application, the terminal 1000 can implement a communication service and send information to other contacts, so that the terminal 1000 needs to have a data transmission function, that is, the terminal 1000 needs to include a communication module inside. Although fig. 10 illustrates communication modules such as the RF circuit 1010, the Wi-Fi module 1090, and the communication interface 1080, it is to be understood that at least one of the above-described elements or other communication modules (e.g., a bluetooth module) for implementing communication may be present in the terminal 1000 for data transmission.
For example, when the terminal 1000 is a mobile phone, the terminal 1000 can include the RF circuit 1010 and can further include the Wi-Fi module 1090; when the terminal 1000 is a computer, the terminal 1000 can include the communication interface 1080 and can also include the Wi-Fi module 1090; when the terminal 1000 is a tablet computer, the terminal 1000 can include the Wi-Fi module.
The memory 1040 may be used to store software programs and modules. The processor 1030 executes various functional applications and data processing of the terminal 1000 by running the software programs and modules stored in the memory 1040, and when the processor 1030 executes the program codes in the memory 1040, part or all of the processes in embodiment 1 of the present invention may be implemented.
Alternatively, the memory 1040 may mainly include a program storage area and a data storage area. Wherein, the storage program area can store an operating system, various application programs such as a mail application program and the like; the storage data area may store data (such as various mail information) created according to the use of the terminal, and the like.
Further, the memory 1040 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
The input unit 1050 may be used to receive numeric or character information input by a user and generate key signal inputs related to user settings and function control of the terminal 1000.
Alternatively, the input unit 1050 may include a touch panel 1051 and other input terminals 1052.
The touch panel 1051, also called a touch screen, can collect touch operations of a user (for example, operations of a user on or near the touch panel 1051 by using any suitable object or accessory such as a finger or a stylus) and drive the corresponding connection device according to a preset program. Alternatively, the touch panel 1051 may include two portions, i.e., a touch detection device and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 1030, and can receive and execute commands sent by the processor 1030. In addition, the touch panel 1051 may be implemented by various types such as a resistive type, a capacitive type, an infrared ray, and a surface acoustic wave.
Optionally, the other input terminals 1052 may include, but are not limited to, one or more of a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like.
The display unit 1060 may be used to display information input by a user or information provided to the user and various menus of the terminal 1000. The display unit 1060 is a display system of the terminal 1000, and is used for presenting an interface and realizing human-computer interaction.
The display unit 1060 may include a display panel 1061. Alternatively, the Display panel 1061 may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like.
Further, the touch panel 1051 may cover the display panel 1061, and when the touch panel 1051 detects a touch operation on or near the touch panel 1051, the touch panel 1051 transmits the touch operation to the processor 1030 to determine the type of the touch event, and then the processor 1030 provides a corresponding visual output on the display panel 1061 according to the type of the touch event.
Although in FIG. 10, the touch panel 1051 and the display panel 1061 are shown as two separate components to implement the input and output functions of the terminal 1000, in some embodiments, the touch panel 1051 and the display panel 1061 can be integrated to implement the input and output functions of the terminal 1000.
The processor 1030 is a control center of the terminal 1000, connects various components using various interfaces and lines, and performs various functions of the terminal 1000 and processes data by operating or executing software programs and/or modules stored in the memory 1040 and calling data stored in the memory 1040, thereby implementing various services based on the terminal.
Optionally, the processor 1030 may include one or more processing units. Optionally, the processor 1030 may integrate an application processor and a modem processor, wherein the application processor mainly handles operating systems, user interfaces, application programs, and the like, and the modem processor mainly handles wireless communications. It is to be appreciated that the modem processor described above may not be integrated into the processor 1030.
The camera 1070 is configured to implement a shooting function of the terminal 1000, and shoot pictures or videos. The camera 1070 can also be used to implement a scanning function of the terminal 1000, and scan a scanned object (two-dimensional code/barcode).
The terminal 1000 can also include a power supply 1020 (e.g., a battery) for powering the various components. Optionally, the power supply 1020 may be logically connected to the processor 1030 through a power management system, so that the power management system implements functions of managing charging, discharging, power consumption, and the like.
It should be noted that, according to the embodiment of the present invention, processor 1030 may execute the following:
responding to the mail updating instruction, taking the current local time of the terminal as the starting time of the mail updating, and taking the local downloading time of the earliest mail in the current mail list as the finishing time of the mail updating, and determining a mail updating time period;
acquiring the mail information in the updating time period from a server;
and downloading the mail information in the updating time period according to the downloaded mail information in the current mail list.
As a possible implementation, the processor 1030 is specifically configured to:
and simultaneously starting a plurality of threads in the thread pool, and individually downloading the mail information in the updating time period through each thread according to the downloaded mail information in the current mail list.
As a possible implementation manner, the processor 1030 is specifically further configured to:
and responding to a specified mail downloading instruction, and starting an independent thread outside the thread pool to download the specified mail.
As a possible implementation manner, the processor 1030 is specifically further configured to:
and after responding to the mail updating instruction, if the number of the mails in the current mail list exceeds a preset value, deleting the mails according to the sequence of the mail downloading time in the current mail list until the number of the mails does not exceed the preset value.
As a possible implementation manner, the processor 1030 is specifically further configured to:
and responding to the instruction of viewing the mails, sending the number of the viewed mails and the local downloading time of the earliest mail in the current mail list to the server, and acquiring the number of mails before the local downloading time from the server.
An embodiment of the present invention further provides a computer-readable non-volatile storage medium, which includes program code, and when the program code runs on a computing terminal, the program code is configured to enable the computing terminal to execute the following steps:
responding to the mail updating instruction, taking the current local time of the terminal as the starting time of the mail updating, and taking the local downloading time of the earliest mail in the current mail list as the finishing time of the mail updating, and determining a mail updating time period;
acquiring the mail information in the updating time period from a server;
and downloading the mail information in the updating time period according to the downloaded mail information in the current mail list.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.

Claims (10)

1. A method for mail downloading, the method comprising:
responding to the mail updating instruction, taking the current local time of the terminal as the starting time of the mail updating, and taking the local downloading time of the earliest mail in the current mail list of the terminal as the finishing time of the mail updating, and determining a mail updating time period; if the mail account is the mail account just created by the terminal, the local download time of the earliest mail is the time obtained by subtracting 1 day from the current local time of the terminal, and if the mail account is not the mailbox account just created by the terminal, the local download time of the earliest mail in the current mail list is the server time of the last mail acquired by the terminal from the server;
acquiring the mail information in the updating time period from a server;
and downloading the mail information in the updating time period according to the downloaded mail information in the current mail list.
2. The method of claim 1, wherein downloading the mail information in the update time period according to the downloaded mail information in the current mail list comprises:
and simultaneously starting a plurality of threads in the thread pool, and individually downloading the mail information in the updating time period through each thread according to the downloaded mail information in the current mail list.
3. The method of claim 2, wherein downloading the mail information in the updated time period according to the downloaded mail information in the current mail list further comprises:
and responding to a specified mail downloading instruction, and starting an independent thread outside the thread pool to download the specified mail.
4. The method according to any one of claims 1 to 3, further comprising:
and after responding to the mail updating instruction, if the number of the mails in the current mail list exceeds a preset value, deleting the mails according to the sequence of the mail downloading time in the current mail list until the number of the mails does not exceed the preset value.
5. The method of claim 4, wherein after deleting the mails in sequence until the number of the mails does not exceed a preset value, further comprising:
and responding to the instruction of viewing the mails, sending the number of the viewed mails and the local downloading time of the earliest mail in the current mail list to the server, and acquiring the number of mails before the local downloading time from the server.
6. A terminal for mail download, the terminal comprising: a processor and a memory, wherein the memory stores program code that, when executed by the processor, causes the terminal to perform the following:
responding to the mail updating instruction, taking the current local time of the terminal as the starting time of the mail updating, and taking the local downloading time of the earliest mail in the current mail list of the terminal as the finishing time of the mail updating, and determining a mail updating time period; if the mail account is the mail account just created by the terminal, the local download time of the earliest mail is the time obtained by subtracting 1 day from the current local time of the terminal, and if the mail account is not the mailbox account just created by the terminal, the local download time of the earliest mail in the current mail list is the server time of the last mail acquired by the terminal from the server;
acquiring the mail information in the updating time period from a server;
and downloading the mail information in the updating time period according to the downloaded mail information in the current mail list.
7. The terminal of claim 6, wherein the processor is specifically configured to:
and simultaneously starting a plurality of threads in the thread pool, and individually downloading the mail information in the updating time period through each thread according to the downloaded mail information in the current mail list.
8. The terminal of claim 7, wherein the processor is further specifically configured to:
and responding to a specified mail downloading instruction, and starting an independent thread outside the thread pool to download the specified mail.
9. The terminal of any of claims 6 to 8, wherein the processor is further configured to:
and after responding to the mail updating instruction, if the number of the mails in the current mail list exceeds a preset value, deleting the mails according to the sequence of the mail downloading time in the current mail list until the number of the mails does not exceed the preset value.
10. The terminal of claim 9, wherein the processor is further specifically configured to:
and responding to the instruction of viewing the mails, sending the number of the viewed mails and the local downloading time of the earliest mail in the current mail list to the server, and acquiring the number of mails before the local downloading time from the server.
CN201910734400.8A 2019-08-09 2019-08-09 Mail downloading method and terminal Active CN110572311B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910734400.8A CN110572311B (en) 2019-08-09 2019-08-09 Mail downloading method and terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910734400.8A CN110572311B (en) 2019-08-09 2019-08-09 Mail downloading method and terminal

Publications (2)

Publication Number Publication Date
CN110572311A CN110572311A (en) 2019-12-13
CN110572311B true CN110572311B (en) 2022-01-11

Family

ID=68774973

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910734400.8A Active CN110572311B (en) 2019-08-09 2019-08-09 Mail downloading method and terminal

Country Status (1)

Country Link
CN (1) CN110572311B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114500444B (en) * 2022-03-18 2024-02-23 网易(杭州)网络有限公司 Mail data processing method and device and electronic equipment
CN117651033B (en) * 2024-01-30 2024-04-05 太平金融科技服务(上海)有限公司 Mail synchronization method and device, electronic equipment and storage medium

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3474761B2 (en) * 1998-02-27 2003-12-08 株式会社東芝 Mobile communication terminal
US7707142B1 (en) * 2004-03-31 2010-04-27 Google Inc. Methods and systems for performing an offline search
JP2014119928A (en) * 2012-12-14 2014-06-30 Canon Marketing Japan Inc Web mail server, method of controlling web mail server, program, and storage medium
CN104239587A (en) * 2014-10-17 2014-12-24 北京字节跳动网络技术有限公司 Method and device for refreshing news list
CN104579921A (en) * 2014-12-27 2015-04-29 宁波江东恒冠信息技术有限公司 E-mail loading method and device
CN105933381A (en) * 2016-04-01 2016-09-07 乐视控股(北京)有限公司 Method and device for receiving mail
CN105991404A (en) * 2015-02-10 2016-10-05 九玉(北京)科技有限公司 Mail synchronization method and apparatus thereof
CN106453060A (en) * 2016-11-24 2017-02-22 青岛海信移动通信技术股份有限公司 Mail synchronization method and terminal
CN106850980A (en) * 2017-01-19 2017-06-13 青岛海信移动通信技术股份有限公司 The method for cleaning and mobile terminal of Email attachment in a kind of mobile terminal
CN108830555A (en) * 2018-05-29 2018-11-16 平安科技(深圳)有限公司 Mail configuration method, device, computer equipment and storage medium

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080167012A1 (en) * 2007-01-07 2008-07-10 Gregory Novick Voicemail systems and methods
CN101309438A (en) * 2007-05-18 2008-11-19 希姆通信息技术(上海)有限公司 Method avoiding repeated downloading identical e-mail using pop3 post office protocol
JP2009163525A (en) * 2008-01-08 2009-07-23 Hitachi Ltd Method for transmitting e-mail
CN101686535A (en) * 2008-09-28 2010-03-31 联想(北京)有限公司 Mobile terminal and method for same to acquire new mails
CN102571990B (en) * 2012-03-16 2014-09-24 北京彩云荣光软件有限公司 E-mail synchronization method and system for mobile terminal
JP5629913B1 (en) * 2014-03-25 2014-11-26 山根 久典 Mail deletion server, mail deletion method, and mail deletion program
JP6515621B2 (en) * 2015-03-25 2019-05-22 富士通株式会社 Mail processing server, mail processing method, and mail processing program
CN105897560B (en) * 2016-05-25 2019-06-21 青岛海信移动通信技术股份有限公司 A kind of method and apparatus loading new mail in the mailbox client of mobile device

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3474761B2 (en) * 1998-02-27 2003-12-08 株式会社東芝 Mobile communication terminal
US7707142B1 (en) * 2004-03-31 2010-04-27 Google Inc. Methods and systems for performing an offline search
JP2014119928A (en) * 2012-12-14 2014-06-30 Canon Marketing Japan Inc Web mail server, method of controlling web mail server, program, and storage medium
CN104239587A (en) * 2014-10-17 2014-12-24 北京字节跳动网络技术有限公司 Method and device for refreshing news list
CN104579921A (en) * 2014-12-27 2015-04-29 宁波江东恒冠信息技术有限公司 E-mail loading method and device
CN105991404A (en) * 2015-02-10 2016-10-05 九玉(北京)科技有限公司 Mail synchronization method and apparatus thereof
CN105933381A (en) * 2016-04-01 2016-09-07 乐视控股(北京)有限公司 Method and device for receiving mail
CN106453060A (en) * 2016-11-24 2017-02-22 青岛海信移动通信技术股份有限公司 Mail synchronization method and terminal
CN106850980A (en) * 2017-01-19 2017-06-13 青岛海信移动通信技术股份有限公司 The method for cleaning and mobile terminal of Email attachment in a kind of mobile terminal
CN108830555A (en) * 2018-05-29 2018-11-16 平安科技(深圳)有限公司 Mail configuration method, device, computer equipment and storage medium

Also Published As

Publication number Publication date
CN110572311A (en) 2019-12-13

Similar Documents

Publication Publication Date Title
CN108021316B (en) Message display method and device
CN106792188B (en) Data processing method, device and system for live broadcast page and storage medium
US10623551B2 (en) Method and apparatus for processing contact information using a wireless terminal
CN106302094B (en) Message pushing method and device
CN105808044B (en) Information pushing method and device
CN109309696B (en) Folder transmission method, sender, receiver, and storage medium
CN111095221B (en) Method and terminal for refreshing display exception handling
CN110572311B (en) Mail downloading method and terminal
CN104021218A (en) Information display method and device
CN114461156A (en) Method for displaying advertisement by terminal, terminal and advertisement delivery system
US8775532B1 (en) Method and system for synchronizing messages across multiple digital message accounts
CN110768895A (en) Message prompting method and device, electronic equipment and storage medium
CN104951215A (en) Processing method and device for page operation
US10757060B2 (en) Message notification method and terminal
CN112087364B (en) Session list display method, device and storage medium
CN109428871B (en) Defense strategy determination method and device
CN106970859B (en) Method and device for backing up and recovering offline mail
CN105426190A (en) Data transmission method and device
CN106161188B (en) Message sending method, message display method and device
CN110347578B (en) Application testing method and device and storage medium
CN109739409B (en) Batch processing method and device and terminal equipment
CN109728918B (en) Virtual article transmission method, virtual article reception method, device, and storage medium
CN113268179B (en) Session message processing method, device, equipment and storage medium
CN109905445B (en) Instruction processing method and terminal
CN113852450A (en) Message push feedback method and device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP01 Change in the name or title of a patent holder
CP01 Change in the name or title of a patent holder

Address after: 266071 Shandong city of Qingdao province Jiangxi City Road No. 11

Patentee after: Qingdao Hisense Mobile Communication Technology Co.,Ltd.

Address before: 266071 Shandong city of Qingdao province Jiangxi City Road No. 11

Patentee before: HISENSE MOBILE COMMUNICATIONS TECHNOLOGY Co.,Ltd.