WO2022042451A1 - 一种电子邮件的同步方法及电子设备 - Google Patents

一种电子邮件的同步方法及电子设备 Download PDF

Info

Publication number
WO2022042451A1
WO2022042451A1 PCT/CN2021/113879 CN2021113879W WO2022042451A1 WO 2022042451 A1 WO2022042451 A1 WO 2022042451A1 CN 2021113879 W CN2021113879 W CN 2021113879W WO 2022042451 A1 WO2022042451 A1 WO 2022042451A1
Authority
WO
WIPO (PCT)
Prior art keywords
information
email
electronic device
request
server
Prior art date
Application number
PCT/CN2021/113879
Other languages
English (en)
French (fr)
Inventor
蒋国良
李辰淑
刘复成
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Priority to EP21860288.6A priority Critical patent/EP4191970A4/en
Priority to US18/042,551 priority patent/US12003475B2/en
Publication of WO2022042451A1 publication Critical patent/WO2022042451A1/zh

Links

Images

Classifications

    • 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
    • H04L51/00User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
    • H04L51/07User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail characterised by the inclusion of specific contents
    • H04L51/08Annexed information, e.g. attachments
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/10Office automation; Time management
    • G06Q10/107Computer-aided management of electronic mailing [e-mailing]
    • 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/04Real-time or near real-time messaging, e.g. instant messaging [IM]

Definitions

  • the present application relates to the technical field of emails, and in particular, to an email synchronization method and electronic device.
  • email is an important tool in work
  • users can log in on the email client of any electronic device.
  • the email client of the electronic device synchronizes the email under the account from the server. In this way, the email client of the electronic device can obtain the emails under the account, and display the emails under the account to the user, so that the user can check each email through the email client.
  • the process that the email client of the electronic device synchronizes the email under a certain account from the server includes: the email client obtains the email identifier of the email to be synchronized under the account from the server; and then requests the server for the email identifier of the email identifier.
  • the indicated email the email indicated by the mail ID can then be received from the server.
  • the email to be synchronized may include the email body and additional information, and the additional information includes embedded resources and/or attachments.
  • the user In view of the failure to download the additional information of the email, the user needs to log in the account in the email client again to download the above email again, which increases the complexity of email synchronization and the traffic consumption.
  • the present application provides an email synchronization method and electronic device, which can reduce the complexity and traffic consumption of email synchronization.
  • the present application provides an email synchronization method, the method is applied to an electronic device installed with a mail client, the method includes: the electronic device obtains the email identifier of the email to be synchronized by the email client; A first request including an email identifier; receiving a first response from the server, extracting email and structure information from the first response; determining the object identifier of each object in the message body according to the structure information; if the first object in the message body If the information download fails, send a second request to the server; receive a second response from the server, and extract the information of the first object from the second response.
  • the first request is used for requesting to obtain the structure information of the email and the message body of the email
  • the structure information is used to represent the data structure of the message body of the email.
  • the objects in the message body include: the mail body of the e-mail, or the mail body of the e-mail and the additional information of the e-mail. This additional information includes embedded resources and/or attachments.
  • the second request includes the email identifier and the object identifier of the first object, and the second request is used to request to obtain information of the first object.
  • the electronic device may send a first request to the server to request the server to obtain the email indicated by the email identifier and the structure information of the message body of the email. After sending the first request, the electronic device may receive a first response from the server, where the first response includes the email and the structure information of the message body of the email. In this way, the electronic device can not only obtain the entire e-mail, that is, download all the information of the e-mail at one time, but also obtain the structure information of the message body of the e-mail.
  • the electronic device can determine the object identifier of each object in the message body according to the structure information. In this way, when the information of the first object in the message body of the e-mail fails to be downloaded, the electronic device can use the object identifier of the first object to send a second request for the information of the first object to the server, so as to send a second request to the server.
  • the server requests to obtain the information of the first object.
  • the above solution can solve the problem that when the electronic device fails to download part of the information because the electronic device downloads all the information of the email at one time, the part of the information cannot be downloaded again.
  • the electronic device can download the information of the first object again by using the object identifier of the first object that fails to download.
  • the adoption of this solution can reduce the complexity of synchronizing emails by electronic devices.
  • the electronic device only re-downloads the information of the first object that fails to download, which reduces the traffic consumption of email synchronization compared to re-downloading the entire email.
  • the electronic device sends a second request to the server, including: if the information download of the first object fails, the electronic device sends a first prompt message ; In response to the first operation input by the user, send a second request to the server.
  • the first prompt information is used to indicate that the information download of the first object fails, and the first prompt information is also used to request the user to confirm whether to download the information of the first object again.
  • the first operation is used to instruct the electronic device to download the information of the first object again.
  • the electronic device determines that the information download of the first object in the message body of the e-mail fails, it can first issue a first prompt message to inform the user that the information download of the first object has failed, so that the user can choose whether to re-download the information. Download the information of the first object.
  • the electronic device sends a second request to the server for requesting to obtain the information of the first object. In this way, the information of the first object that fails to be downloaded can be re-downloaded according to the actual needs of the user and only for the emails that the user needs. traffic consumption.
  • the method further includes: if the information of the first object is extracted from the second response If the information fails, the electronic device sends second prompt information; in response to the second operation input by the user, re-sends a third request to the server; receives a third response from the server, and extracts the information of the first object from the third response.
  • the second prompt information is used to indicate that the information download of the first object fails, and the second prompt information is also used to request the user to confirm whether to download the information of the first object again.
  • the second operation is used to instruct the electronic device to re-download the information of the first object, and the third request is used to request to obtain the information of the first object.
  • a second prompt message is sent.
  • the second prompt message not only informs the user that the download of the information of the first object fails, but also requests the user to confirm whether to re-download the information of the first object, that is, to provide the user with an entry for continuing to download the information of the first object again.
  • the user can manually control to continue to re-download the information of the first object, or can also control to continue to re-download the information of the first object under appropriate conditions such as a stable communication network.
  • the structure information is used to represent the data structure of the message body of the email, and the data structure is used to represent the sequence of each object in the message body.
  • the electronic device determining the object identifier of each object in the message body according to the structure information includes: the electronic device determining the object identifier of each object in the message body according to the order of each object in the message body.
  • This design method provides a specific implementation manner in which the electronic device determines the object identifier of each object in the message body according to the structure information.
  • the present application also provides an electronic device, the electronic device is installed with a mail client, and the electronic device includes: an information processing module for acquiring the mail identifier of the email to be synchronized by the mail client; a sending module, for sending a first request including an email identifier to the server; a receiving module for receiving a first response from the server; an information processing module for extracting email and structure information from the first response; determining according to the structure information
  • the object identifier of each object in the message body; the sending module is also used to send a second request to the server if the information download of the first object in the message body fails; the receiving module is also used to receive the second response from the server; the information
  • the processing module is further configured to extract the information of the first object from the second response.
  • the first request is used for requesting to obtain the structure information of the email and the message body of the email, and the structure information is used to represent the data structure of the message body of the email.
  • the objects in the message body include: the mail body of the e-mail, or the mail body of the e-mail and the additional information of the e-mail; the additional information includes embedded resources and/or attachments.
  • the second request includes the email identifier and the object identifier of the first object, and the second request is used to request to obtain information of the first object.
  • the information processing module is further configured to send a first prompt message if the information download of the first object fails; the sending module is specifically configured to respond to the first operation input by the user, send the first prompt message to the server Second request.
  • the first prompt information is used to indicate that the information download of the first object fails, and the first prompt information is also used to request the user to confirm whether to download the information of the first object again.
  • the first operation is used to instruct the electronic device to download the information of the first object again.
  • the information processing module is further configured to issue a second prompt message if the extraction of the information of the first object from the second response fails; the sending module is further configured to respond to the second operation input by the user , re-send the third request to the server; the receiving module is further configured to receive the third response from the server; the information processing module is further configured to extract the information of the first object from the third response.
  • the second prompt information is used to indicate that the information download of the first object fails, and the second prompt information is also used to request the user to confirm whether to re-download the information of the first object; the second operation is used to instruct the electronic device to re-download the information of the first object.
  • information, and the third request is used to request to obtain the information of the first object.
  • the structure information is used to represent the data structure of the message body of the email, and the data structure is used to represent the sequence of each object in the message body.
  • the information processing module is specifically configured to determine the object identifier of each object in the message body according to the sequence of each object in the message body.
  • the present application also provides an electronic device, the electronic device comprising: a processor and a memory for storing instructions executable by the processor; wherein the processor is configured to execute the instructions to implement the first aspect and its A synchronization method for emails in any possible implementation manner.
  • the present application also provides a computer-readable storage medium, where computer instructions are stored on the computer-readable storage medium, and when the computer instructions are executed on the electronic device, the electronic device is made to perform the first aspect and any one thereof.
  • a possible implementation of an email synchronization method is possible implementation of an email synchronization method.
  • the present application also provides a computer program product, comprising one or more instructions, the one or more instructions can be executed on an electronic device, so that the electronic device executes the first aspect and any possible implementation thereof The way email is synced.
  • FIG. 1 is a schematic diagram of an implementation environment involved in an email synchronization method provided by an embodiment of the present application
  • FIG. 2 is a schematic diagram of a hardware structure of an electronic device provided by an embodiment of the present application.
  • FIG. 3 is a schematic diagram of the composition of a multipurpose Internet Mail Extensions (Multipurpose Internet Mail Extensions, MIME) mail provided by the embodiment of the present application;
  • MIME Multipurpose Internet Mail Extensions
  • Fig. 4 is the flow chart of the synchronization method of the electronic mail that conventional technology adopts
  • Fig. 5 is the content schematic diagram of the email after adopting conventional technology to synchronize email
  • FIG. 6 is a flowchart 1 of a method for synchronizing emails according to an embodiment of the present application
  • FIG. 7 is a second flow chart of a method for synchronizing emails according to an embodiment of the present application.
  • 8A is a schematic diagram of the content of an email after re-downloading an attachment provided by an embodiment of the present application
  • FIG. 8B is a schematic diagram 1 of the content of an email with an attachment download failure provided by an embodiment of the present application.
  • FIG. 8C is a second schematic diagram of the content of an email with an attachment download failure provided by an embodiment of the present application.
  • FIG. 9 is a third flowchart of a method for synchronizing emails according to an embodiment of the present application.
  • FIG. 10 is a fourth flowchart of a method for synchronizing emails according to an embodiment of the present application.
  • 11 is a flowchart five of a method for synchronizing emails according to an embodiment of the present application.
  • FIG. 12 is a schematic structural diagram 1 of an electronic device according to an embodiment of the present application.
  • FIG. 13 is a second schematic structural diagram of an electronic device according to an embodiment of the present application.
  • first and second etc. described in the embodiments of the present application are used to distinguish different objects, or used to distinguish different processing of the same object, but are not used to describe a specific order of the objects.
  • the first request and the second request are different requests.
  • FIG. 1 shows a schematic diagram of an implementation environment involved in an email synchronization method provided by an embodiment of the present application.
  • the implementation environment may include a server 101 and a plurality of electronic devices, for example, an electronic device 102 and an electronic device 103 .
  • the server 101 may provide an application service for a certain e-mail box.
  • the server 101 can transmit emails through a wired network or a wireless network, and any electronic device (eg, the electronic device 102 or the electronic device 103 ) using the electronic mailbox.
  • FIG. 1 the numbers of electronic devices and servers in FIG. 1 are only illustrative. According to actual needs, there can be any number of electronic devices and servers.
  • the electronic device 102 is installed with a mail client of an electronic mailbox.
  • the email client of the electronic device 102 can send emails to the email addresses of other accounts through the server 101 , and can also receive emails from other accounts through the server 101 when the user is logged into the account.
  • the emails sent and received by the email addresses of each account are stored in the server 101 .
  • the user can synchronize the email under the account from the server 101 , that is, download the email under the account from the server 101 .
  • the email synchronization method provided by the embodiments of the present application can be applied to electronic devices.
  • the executive body of the email synchronization method may also be an email synchronization device.
  • the e-mail synchronization device may be a central processing unit (Central Processing Unit, CPU) in the above-mentioned electronic device; or, a control module in the above-mentioned electronic device for executing an e-mail synchronization method.
  • CPU Central Processing Unit
  • the electronic device in the embodiment of the present application may be a mobile phone, a tablet computer, a desktop computer, a laptop computer, a handheld computer, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook etc.
  • the embodiments of the present application do not specifically limit the specific form of the electronic device.
  • the electronic device 200 may include: a processor 210, an external memory interface 220, an internal memory 221, a universal serial bus (USB) interface 230, a charging management module 240, a power management module 241, a battery 242, Antenna 1, Antenna 2, Mobile Communication Module 250, Wireless Communication Module 260, Audio Module 270, Speaker 270A, Receiver 270B, Microphone 270C, Headphone Interface 270D, Sensor Module 280, Key 290, Motor 291, Indicator 292, Camera 1-N 293, display screen 294 (such as touch screen), and subscriber identification module (subscriber identification module, SIM) card interface 1-N 295 and so on.
  • a processor 210 an external memory interface 220, an internal memory 221, a universal serial bus (USB) interface 230, a charging management module 240, a power management module 241, a battery 242, Antenna 1, Antenna 2, Mobile Communication Module 250, Wireless Communication Module 260, Audio Module 270, Speaker 270A, Receiver 270B, Micro
  • the aforementioned sensor module 280 may include sensors such as pressure sensors, gyroscope sensors, air pressure sensors, magnetic sensors, acceleration sensors, distance sensors, proximity light sensors, fingerprint sensors, temperature sensors, touch sensors, ambient light sensors, and bone conduction sensors.
  • sensors such as pressure sensors, gyroscope sensors, air pressure sensors, magnetic sensors, acceleration sensors, distance sensors, proximity light sensors, fingerprint sensors, temperature sensors, touch sensors, ambient light sensors, and bone conduction sensors.
  • the structure illustrated in this embodiment does not constitute a specific limitation on the electronic device 200 .
  • the electronic device 200 may include more or fewer components than shown, or combine some components, or separate some components, or different component arrangements.
  • the illustrated components may be implemented in hardware, software, or a combination of software and hardware.
  • the processor 210 may include one or more processing units, for example, the processor 210 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), a controller, a memory , video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural-network processing unit (neural-network processing unit, NPU), etc. Wherein, different processing units may be independent devices, or may be integrated in one or more processors.
  • application processor application processor, AP
  • modem processor graphics processor
  • GPU graphics processor
  • controller a controller
  • video codec digital signal processor
  • DSP digital signal processor
  • baseband processor baseband processor
  • neural-network processing unit neural-network processing unit
  • the controller may be the nerve center and command center of the electronic device 200 .
  • the controller can generate an operation control signal according to the instruction operation code and timing signal, and complete the control of fetching and executing instructions.
  • a memory may also be provided in the processor 210 for storing instructions and data.
  • the memory in processor 210 is cache memory.
  • the memory may hold instructions or data that have just been used or recycled by the processor 210 . If processor 210 needs to use the instruction or data again, it can be called directly from the memory. Repeated accesses are avoided, and the waiting time of the processor 210 is reduced, thereby improving the efficiency of the system.
  • the processor 210 may include one or more interfaces. It can be understood that the interface connection relationship between the modules illustrated in this embodiment is only a schematic illustration, and does not constitute a structural limitation of the electronic device 200 . In other embodiments, the electronic device 200 may also adopt different interface connection manners in the foregoing embodiments, or a combination of multiple interface connection manners.
  • the charging management module 240 is configured to receive charging input (charging input of a wired charger and/or wireless charging input) from the charger, and charge the battery 242 .
  • the charger may be a wireless charger or a wired charger. While the charging management module 240 charges the battery 242 , the power management module 241 can also supply power to the electronic device.
  • the power management module 241 is used to connect the battery 242 , the charging management module 240 and the processor 210 .
  • the power management module 241 receives input from the battery 242 and/or the charging management module 240, and supplies power to the processor 210, the internal memory 221, the external memory, the display screen 294, the camera 293, and the wireless communication module 260.
  • the power management module 241 may also be provided in the processor 210 .
  • the power management module 241 and the charging management module 240 may also be provided in the same device.
  • the wireless communication function of the electronic device 200 may be implemented by the antenna 1, the antenna 2, the mobile communication module 250, the wireless communication module 260, the modulation and demodulation processor, the baseband processor, and the like.
  • Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals.
  • the antenna 1 of the electronic device 200 is coupled with the mobile communication module 250, and the antenna 2 is coupled with the wireless communication module 260, so that the electronic device 200 can communicate with the network and other devices through wireless communication technology.
  • the wireless communication technology may include global navigation satellite system (Global Navigation Satellite System, GNSS), wireless local area networks (wireless local area networks, WLAN) (such as Wi-Fi network) technology and the like.
  • the GNSS may include global positioning system (global positioning system, GPS), global navigation satellite system (global navigation satellite system, GLONASS), Beidou navigation satellite system (beidou navigation satellite system, BDS), quasi-zenith satellite system (quasi -zenith satellite system, QZSS) and/or satellite based augmentation systems (SBAS), etc.
  • the electronic device 200 may acquire the real-time location information of the electronic device 200 through positioning technologies such as GPS, BDS, or SBAS.
  • the mobile communication module 250 may provide a wireless communication solution including 2G/3G/4G/5G, etc. applied on the electronic device 200 .
  • the electronic device 200 may send an email to the server through the mobile communication module 250 .
  • the wireless communication module 260 can provide applications on the electronic device 200 including WLAN (such as Wi-Fi network), Bluetooth (bluetooth, BT), GNSS, Near Field Communication (NFC), infrared (Infrared, IR), Solutions for wireless communication such as frequency modulation (FM).
  • WLAN such as Wi-Fi network
  • Bluetooth bluetooth, BT
  • GNSS Near Field Communication
  • NFC Near Field Communication
  • IR Infrared
  • Solutions for wireless communication such as frequency modulation (FM).
  • FM frequency modulation
  • the electronic device 200 may acquire real-time location information of the electronic device 200 through the GNSS positioning technology.
  • the electronic device 200 implements a display function through a GPU, a display screen 294, an application processor, and the like.
  • the electronic device 200 can realize the shooting function through the ISP, the camera 293, the video codec, the GPU, the display screen 294 and the application processor.
  • the external memory interface 220 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 200.
  • Internal memory 221 may be used to store computer executable program code, which includes instructions.
  • the processor 210 executes various functional applications and data processing of the electronic device 200 by executing the instructions stored in the internal memory 221 .
  • the electronic device 200 may implement audio functions through an audio module 270, a speaker 270A, a receiver 270B, a microphone 270C, an earphone interface 270D, and an application processor.
  • the e-mail box may be an e-mail box using the Internet Mail Access Protocol (IMAP).
  • IMAP protocol is an email protocol defined by the Transmission Control Protocol/Internet Protocol (TCP/IP) protocol.
  • TCP/IP Transmission Control Protocol/Internet Protocol
  • the mail client of the e-mail can realize the synchronization of e-mails from the server through the IMAP protocol.
  • the email may be a MIME email, that is, an email that conforms to the MIME specification.
  • MIME is an email technical specification widely used at present, which provides a method for attaching a variety of different encoded files to emails, so that the emails can carry pictures, Binary files such as sound and video.
  • MIME messages can contain a plain text body, a plain text body and a hypertext body, or a plain text body, a hypertext body, inline resources, and attachments.
  • the embedded resources are specific to MIME emails, and are used to store some pictures, animations, sounds, and even CSS styles and script segments associated with the body of the email.
  • hyperlinks are used to link to embedded resources.
  • Embedded resources are accessed when browsing the content of the email.
  • the MIME mail is composed of two parts: a message header (also called a mail header) and a message body (also called a mail body).
  • the message header of the MIME email may contain important information such as sender, recipient, subject, time, MIME version, and type of email content.
  • the message body of the MIME mail contains the content of the email (may be referred to as mail content for short), and the mail content can be composed of one or more objects (MimeBodyPart), each of which also includes a message header and a message body. As shown in FIG.
  • the message body of the MIME email includes information of at least four objects, namely the email body, the embedded resource, the first attachment and the second attachment.
  • the message body of the MIME email specifically includes: the message header and message body of the email body, the message header and message body of the embedded resource, the message header and message body of the first attachment, and the message header and message body of the second attachment.
  • the process of synchronizing emails under a certain account by the email client of the electronic device from the server includes: the email client obtains the email identifier of the email to be synchronized under the account from the server; and then requests the server for the email identifier indicated by the email identifier. Then, the entire email indicated by the mail identifier from the server, that is, the email to be synchronized, can be received.
  • the email to be synchronized is mainly divided into two parts: the message header and the message body, and the message body of the email is divided into one or more objects; for example, the multiple objects may include the email body and additional information, and the additional information includes embedded resources and/or accessories.
  • the server sends all the information of the email indicated by the email identifier as a whole (ie, the entire email) to the email client of the electronic device.
  • all information of the email can be downloaded at one time, including the email body and additional information.
  • the email body of the email is successfully downloaded, but the additional information of the email fails to be downloaded. Since the entire email obtained by the mail client refers to all the information of the email, by using all the information of the email, it is impossible to individually request the server for additional information that fails to download.
  • the user can only re-login the account on the mail client to re-download the entire email, which increases the complexity and traffic consumption of email synchronization.
  • the download of the additional information of the email may fail, so the success rate of email synchronization is low.
  • the electronic device can periodically obtain the email client to be synchronized from the server.
  • the mail ID of the email After each time the electronic device acquires the email identifier of the email to be synchronized, it synchronizes all the information of the email indicated by the email identifier from the server.
  • the process of synchronizing emails between the electronic device and the server using the above solution includes S401-S409.
  • the electronic device acquires the email identifier of the email to be synchronized.
  • the email identifiers of the emails to be synchronized may include the email identifiers of one or more emails.
  • the electronic device executes S402-S409 with respect to the mail identification of each email.
  • the electronic device sends a request for the entire email including the email identifier to the server.
  • the request for the entire email is used to request to obtain the entire email indicated by the email identifier.
  • the request for the entire email may be generated based on a fetch instruction, where the fetch instruction is an instruction used by the IMAP protocol and applied to receiving emails on the server.
  • the format of the request for the entire email may be: UID FETCH MESSAGE-ID(UID BODY[]).
  • the unique identifier for the message (The unique identifier for the message, UID) is a fixed character, used to indicate a number that uniquely identifies the mail, that is, used to indicate the mail ID.
  • MESSAGE-ID is the message ID.
  • BODY[] represents the acquisition of the entire email, that is, all the information of the email, including the message header of the email and the message body of the email.
  • the server receives the request for the entire email.
  • the server In response to the request for the entire email, the server sends a response including the entire email to the electronic device.
  • the electronic device receives the response including the entire email, and extracts the email indicated by the email identifier from the response including the entire email.
  • the electronic device extracts the message header of the e-mail and the message body of the e-mail from the response (reponse) including the entire e-mail; then sequentially obtains the information of each object from the message body of the e-mail, and judges each Whether the information of the object is downloaded successfully. If it is determined that the information download of the first object in the message body of the email fails, S406 is executed. If the electronic device determines that the download of the information of the first object in the message body of the email is successful, the information of the first object is saved in the database.
  • the first object is any object in the message body of the email.
  • the information of the first object is successfully downloaded in the embodiment of the present application may refer to that the acquired information of the first object is complete.
  • the information of the first object fails to be downloaded in the embodiment of the present application may refer to that the acquired information of the first object is incomplete.
  • the electronic device can judge whether the information of each object is downloaded successfully according to the obtained file size of the information of each object; or, according to whether the obtained information of each object includes an identifier indicating that the download is successful , to determine whether the information of each object is downloaded successfully.
  • This embodiment of the present application does not limit the specific implementation of determining whether the information of each object is successfully downloaded.
  • the server receives the request for the entire email.
  • the server In response to the request for the entire email, the server sends a response indicating that the download is complete to the electronic device.
  • the electronic device receives a response indicating that the download is complete, and saves the information of the first object in the database.
  • the electronic device receives the response indicating that the download is complete, and saves the information of the first object acquired in S405 into the database.
  • the information of the first object obtained in S405 is incomplete.
  • the electronic device may execute the above S401, S402, S405, S406, and S409 through an email client.
  • the electronic device displays the email content of the email in response to an operation of viewing the email input by the user.
  • the mail content of the e-mail includes information of all objects in the message body of the e-mail. If the information of an object in the message body of the email fails to be downloaded, the email client of the electronic device cannot open the information of the object, and the file size of the object may be 0 bytes (0B), or the object is equal to the file size of the portion of the object that has been successfully downloaded. For example, if the information of an attachment fails to be downloaded, the mail client of the electronic device cannot open the information of the attachment.
  • the electronic device displays the email content of the email in response to an operation of viewing the email input by the user.
  • the mail content of the email may include message headers, mail body and multiple attachments.
  • the electronic device is a mobile terminal using an Android (Android) operating system, the information download of an attachment in the email fails.
  • the electronic device displays the recipient, sender and subject in the message header of the email, and also displays the names and file sizes of multiple attachments, specifically including: the name of the first attachment 51 is "user_uuid.
  • the 2nd attachment 52 has the name “1” and the file size is 8B
  • the 3rd attachment 53 has the name “1.db” and the file size is 8B
  • the 4th attachment 54 has the name "1.db”
  • the name is "1.txt” and the file size is 0B
  • the 5th attachment 55 is named “1.xml” and the file size is 8B. It can be known that the download of the information of the 4th attachment in the email failed.
  • the electronic device uses the email identifier of the email to be synchronized to send a request for the entire email to the server, so as to request the server to obtain the information indicated by the email identifier. the entire email. Since only the information of each object can be extracted from the message body of the entire email, there is no information required for downloading each object. Then, if the information of any object in the message body of the entire email fails to be downloaded, the request for the entire email can only be sent to the server due to lack of information required for downloading the object.
  • the server Since the server has already responded to the request for the entire email once, when the server receives the request for the entire email again, it sends a response indicating that the download is complete to the electronic device. In the response sent by the electronic device from the server indicating that the download is complete, the information of the object cannot be obtained.
  • the user can only re-login the account on the mail client to use the above-mentioned mail identifier to request the server again to obtain the entire email indicated by the mail identifier (including the above-mentioned information of the object that failed to download), so that This increases the complexity and traffic consumption of email synchronization; and, when downloading the entire email again, there is a possibility that the information of the object may fail to be downloaded, so the success rate of email synchronization is low.
  • an embodiment of the present application proposes an email synchronization method, which can improve the success rate of email synchronization and reduce the complexity and traffic consumption of email synchronization.
  • FIG. 6 is a flowchart of an email synchronization method provided by an embodiment of the present application, and the method is applied to an electronic device installed with an email client. As shown in FIG. 6, the method may include S601-S606.
  • the electronic device acquires the email identifier of the email to be synchronized by the email client.
  • the electronic device can automatically send a request to the server to query the email identifier of the email to be synchronized; then, receive the email identifier of the email to be synchronized from the server;
  • the synchronized emails may be emails received by the account within a preset duration; the preset duration refers to a period of time before the current moment, for example, one day, one week, one month, and so on.
  • the electronic device may send a request for querying the email identifier of the email to be synchronized to the server according to a preset synchronization period; and then receive the email from the server of the email to be synchronized.
  • identification wherein, the email to be synchronized can be an email received by the account in a preset synchronization period before the current moment and adjacent to the current moment; the preset synchronization period can be one day, one week, one month and so on.
  • the user account may be an IMAP account.
  • the mail identifications of the emails to be synchronized may include the mail identifications of one or more emails.
  • the electronic device uses the mail identifier of each email to synchronize the email from the server, that is, executes S602-S606 for each email.
  • the electronic device sends a first request including an email identifier to the server; the first request is used to request to obtain email and email message body structure information, where the structure information is used to represent the data structure of the email message body.
  • the structure information is used to represent the data structure of the message body of the email, and the data structure is used to represent the sequence of each object in the message body of the email.
  • the objects in the message body of the e-mail include: the mail body of the e-mail, or the mail body of the e-mail and the additional information of the e-mail; the additional information includes embedded resources and/or attachments.
  • the first request may include not only an email identifier, but also a first parameter required for requesting an email (that is, a first parameter required for requesting an entire email), and a first parameter required for requesting an email.
  • the second parameter required for the structure information of the message body of the email is not only an email identifier, but also a first parameter required for requesting an email (that is, a first parameter required for requesting an entire email), and a first parameter required for requesting an email.
  • the first request may be generated based on the fetch instruction; the first parameter in the first request is BODY, and the first request The second parameter in is BODYSTRUCTURE.
  • the format of the first request may be: UID FETCH MESSAGE-ID(UID BODYSTRUCTURE BODY PEEK[]).
  • the electronic device receives the first response from the server, and extracts the email and structure information from the first response.
  • the server receives the first request and responds, generates a first response including the email and the structure information, and sends the first response to the electronic device.
  • the electronic device receives the first response from the server; and extracts the email and structure information from the first response.
  • the electronic device determines the object identifier of each object in the message body according to the structure information.
  • the electronic device determines the object identifier of each object in the message body of the email according to the sequence of each object in the message body of the email.
  • the object identifiers of different objects in the message body of the email are different.
  • the objects in the message body of the email may include the email body, embedded resources, and one or more attachments.
  • the order of each object in the message body of the email may be: email body, embedded resource, first attachment, second attachment, and so on.
  • the object identifier of each object can be set in the manner of incrementing 1 from 1 according to the sequence of each object in the message body of the email. For example, the object ID of the email body is 1, the object ID of the embedded resource is 2, the object ID of the first attachment is 3, the object ID of the second attachment is 4, and so on.
  • a certain object in the MIME email may be a combined object (ie, a MimeMultipart object) composed of multiple objects.
  • the electronic device identifies each object in the combined object based on the object identifier of the combined object and according to the sequence of each object in the combined object.
  • the message body of a MIME email includes: a combined object and attachments including the email body and embedded resources; the object identifier of the combined object can be 1, the object identifier of the email body in the combined object is 1.1, and the internal object identifier in the combined object can be 1.1.
  • the object ID of the embedded resource is 1.2, and the object ID of the attachment is 2.
  • the message body of the e-mail may include a single-layer nested composite object (that is, any object in the message body of the e-mail is a composite object), and may also include a multi-level nested composite object (that is, a composite object Any one of the objects is a composite object).
  • Object identification for any of the multi-level nested composite objects is more complex, eg, 2.1.1.
  • the electronic device sends a second request to the server; the second request includes the email identifier and the object identifier of the first object, and the second request is used to request to obtain the information of the first object .
  • the first object is any object in the message body of the email.
  • the electronic device sequentially acquires the information of each object from the message body of the email, and determines whether the information of each object is downloaded successfully. If it is determined that the information download of the first object fails, the electronic device sends a first request to download the information of the first object again. If it is determined that the download of the information of the first object is successful, the electronic device saves the information of the first object locally or in a database.
  • the second request may be generated based on the fetch instruction; the format of the second request may be: UID FETCH MESSAGE-ID(UID BODY PEEK[partID]).
  • the partID is the object identifier of the first object.
  • the electronic device receives the second response from the server, and extracts the information of the first object from the second response.
  • the server receives the second request and responds, and obtains the object identifier partID of the first object from the second request; then, according to the object identifier partID of the first object, determines the information of the first object, and generates a file including the information of the first object. the second response; and then send the second response to the electronic device.
  • the electronic device receives the second response, extracts the information of the first object from the second response, and completes downloading the information of the first object again.
  • the server may include the information that the object identifiers of each object correspond to each object, and the information of the corresponding first object may be determined by using the object identifier partID of the first object.
  • the object identifier of each object in the server is the same as the object identifier of each object determined by the electronic device.
  • the electronic device may send a first request to the server to request the server to obtain the email indicated by the email identifier and the structure information of the message body of the email. After sending the first request, the electronic device may receive a first response from the server, where the first response includes the email and the structure information of the message body of the email. In this way, the electronic device can not only obtain the entire e-mail, that is, download all the information of the e-mail at one time, but also obtain the structure information of the message body of the e-mail.
  • the electronic device can determine the object identifier of each object in the message body according to the structure information. In this way, when the information of the first object in the message body of the e-mail fails to be downloaded, the electronic device can use the object identifier of the first object to send a second request for the information of the first object to the server, so as to send a second request to the server.
  • the server requests to obtain the information of the first object.
  • the above solution can solve the problem that when the electronic device fails to download part of the information because the electronic device downloads all the information of the email at one time, the part of the information cannot be downloaded again.
  • the electronic device can download the information of the first object again by using the object identifier of the first object that fails to download.
  • the adoption of this solution can reduce the complexity of synchronizing emails by electronic devices.
  • the electronic device only re-downloads the information of the first object that fails to download, which reduces the traffic consumption of email synchronization compared to re-downloading the entire email.
  • the electronic device determines that the download of the information of the first object in the message body of the email fails, it can directly send a second request to the server to request the server to obtain the information of the first object. Then, the electronic device can extract the information of the first object from the second response returned by the server.
  • the electronic device determines that the information download of the fourth attachment 54 in the message body of the e-mail fails, it directly sends an object identifier including the fourth attachment 54 to the server.
  • the second request is to request the server to obtain the information of the fourth attachment 54 .
  • the electronic device can successfully extract the information of the fourth attachment 54 from the returned second response, and save it.
  • the electronic device responds to the operation of viewing the email input by the user, it displays the email content of the email, including the information of the fourth attachment 54 that has been successfully downloaded. As shown in FIG.
  • the electronic device can automatically re-download the information of the fourth attachment 54; and, if the information of the fourth attachment 54 is successfully extracted from the second response, it can be directly displayed
  • the file size of the fourth attachment 54 with complete information is 45B. In this way, without the user's perception, the information of the fourth attachment 54 is re-downloaded, and the successfully downloaded fourth attachment 54 is displayed to the user, and the user's use experience is better.
  • the electronic device determines that the information download of the first object fails, it sends a request for the entire email to the server again; then, the server responds to the request for the entire email again and sends the request to the electronic device. A response indicating that the download is complete. In this way, the electronic device cannot obtain the information of the first object from the response indicating the completion of the download, and cannot automatically re-download the information of the first object.
  • the electronic device sends a second request to the server by using the object identifier of the first object that failed to download; then, the server usually returns the first object to the electronic device in response to the second request. Information.
  • the electronic device can automatically re-download the information of the first object.
  • the electronic device sends a request for the entire email to the server again.
  • the information of the first object can be automatically re-downloaded, and the success rate of email synchronization is improved.
  • S605 may include S605a-S605b.
  • the first prompt information is used to indicate that the information download of the first object fails, and the first prompt information is also used to request the user to confirm whether to download the information of the first object again.
  • the first prompt information may be a control indicating that the download of the information of the first object fails and has a function of re-downloading the information of the first object. If the information download of the first object fails, the electronic device displays the control. If the user triggers the control, the electronic device determines that the user wants to re-download the information of the first object; if the user does not trigger the control, the electronic device determines that the user does not need to re-download the information of the first object.
  • the first prompt information may be voice or text
  • the voice or text includes at least one of the following content: content indicating that the information of the first object failed to be downloaded, content requesting the user to confirm whether to download the information of the first object again, Indicates the content of the redownload option.
  • the re-download option has the function of re-downloading the information of the first object.
  • the electronic device sends a second request to the server in response to the first operation input by the user; the first operation is used to instruct the electronic device to download the information of the first object again.
  • the electronic device receives the first operation input by the user and responds by sending the above-mentioned second request to the server.
  • the electronic device determines that the first operation is received.
  • the electronic device determines that the first operation is received.
  • the electronic device determines that the download of the information of the fourth attachment in the message body of the e-mail fails, it sends a first prompt message. Then, the electronic device displays the email content of the email and the first prompt information in response to the operation of viewing the email input by the user. As shown in FIG. 8B , the electronic device displays the recipient, sender, subject, and names and file sizes of multiple attachments in the email, and also displays first prompt information 81 corresponding to the fourth attachment. It can be seen from FIG. 8B that the file size of the fourth attachment 54 is 0B, which indicates that the information download of the fourth attachment 54 fails.
  • the first prompt information 81 is a control named "redownload"; the first prompt information 81 is used to indicate that the information download of the fourth attachment 54 fails, and is also used to request the user to confirm whether to re-download the fourth attachment 54 Information. If the user clicks on the control, the electronic device determines that the first operation input by the user is received, and determines that the user wants to download the information of the fourth attachment 54 again. If the user does not click on the control, the electronic device determines that the user does not need to download the information of the fourth attachment 54 again. Furthermore, if the electronic device receives and responds to the first operation input by the user, it sends a second request to the server; the first operation is used to instruct the electronic device to download the information of the fourth attachment 54 again. If the electronic device successfully extracts the information of the fourth attachment from the second response sent by the server, save the information of the successfully extracted fourth attachment, and update the page to show the user the file size of the fourth attachment with complete information is 45B, as shown in Figure 8A.
  • a first prompt message 82 is sent. Then, in response to an operation input by the user to view the email, the electronic device displays the email content of the email and the first prompt information 82 .
  • the first prompt message 82 includes “please confirm whether to download the attachment 54 again”, an option 821 for confirmation, and an option 822 for canceling. If the user clicks the confirmed option 821, the electronic device determines that the first operation input by the user is received, and determines that the user wants to download the information of the fourth attachment 54 again.
  • the electronic device determines that the user does not need to download the information of the fourth attachment 54 again. Furthermore, if the electronic device receives and responds to the first operation input by the user, it sends a second request to the server; the first operation is used to instruct the electronic device to download the information of the fourth attachment 54 again. If the electronic device successfully extracts the information of the fourth attachment from the second response sent by the server, save the information of the successfully extracted fourth attachment, and update the page to show the user the file size of the fourth attachment with complete information is 45B, as shown in Figure 8A.
  • the electronic device determines that the information download of the first object in the message body of the email fails, it can first issue a first prompt message to inform the user that the information download of the first object has failed, so that the user can choose whether to download it again. Information of the first object.
  • the electronic device sends a second request to the server for requesting to obtain the information of the first object. In this way, the information of the first object that fails to be downloaded can be re-downloaded according to the actual needs of the user and only for the emails that the user needs. traffic consumption.
  • the email synchronization method may further include S901-S903.
  • the electronic device sends a second prompt message.
  • the second prompt information is used to indicate that the information download of the first object fails, and the second prompt information is also used to request the user to confirm whether to download the information of the first object again.
  • the second prompt information may be made to the above-mentioned detailed description of the first prompt information, which is not repeated in this embodiment of the present application.
  • the second prompt information and the first prompt information may be the same or different.
  • the electronic device resends a third request to the server in response to the second operation input by the user; the second operation is used to instruct the electronic device to re-download the information of the first object, and the third request is used to request to obtain the information of the first object.
  • the electronic device receives the third response from the server, and extracts the information of the first object from the third response.
  • the electronic device extracts the information of the first object from the third response, if it is determined that the downloading of the information of the first object fails, it may continue to execute S901-S903. If the electronic device determines that the download of the information of the first object is successful, it will not send out the second prompt information, and can send out the prompt information of the successful download.
  • a second prompt message is sent.
  • the second prompt message not only informs the user that the download of the information of the first object fails, but also requests the user to confirm whether to re-download the information of the first object, that is, to provide the user with an entry for continuing to re-download the information of the first object.
  • the user can manually control to continue to re-download the information of the first object, or can also control to continue to re-download the information of the first object under appropriate conditions such as a stable communication network.
  • the electronic device after determining that the information of the first object has failed to be downloaded, the electronic device re-downloads the information of the first object, and determines whether the information of the first object is successfully downloaded. If the download of the information of the first object fails, a second prompt message is sent; if the download of the information of the first object is successful, the information of the first object is saved in the database. After sending the second prompt information, the electronic device continues to download the information of the first object again if it receives the second operation input by the user. Specifically, referring to FIG. 10 , the electronic device executes the email synchronization method provided by the embodiment of the present application, including S1001-S1012.
  • the electronic device obtains the mail identifier of the email to be synchronized of the mail client.
  • the electronic device sends a first request including an email identifier to the server; the first request is used for requesting to acquire the email and the structure information of the message body of the email.
  • the structure information is used to represent the data structure of the message body of the email.
  • the electronic device receives the first response from the server, and extracts the email and structure information from the first response.
  • the electronic device determines the object identifier of each object in the message body according to the structure information.
  • the electronic device sequentially determines whether the information of each object in the message body of the email is successfully downloaded.
  • the electronic device sequentially acquires the information of each object from the message body of the email, and determines whether the information of each object is downloaded successfully. If it is determined that the information download of the first object fails, the electronic device executes S1006. If it is determined that the information of the first object is downloaded successfully, the electronic device executes S1012.
  • the electronic device sends a second request to the server; the second request includes an email identifier and an object identifier of the first object, and the second request is used to request to obtain information of the first object.
  • the first object is any object in the message body of the email.
  • the electronic device receives the second response from the server, and extracts the information of the first object from the second response.
  • the electronic device determines whether the information of the first object is successfully extracted from the second response.
  • S1009 is executed. If the electronic device determines that the extraction of the information of the first object from the second response is successful (that is, the download of the information of the first object is successful), S1012 is executed.
  • the electronic device sends out second prompt information.
  • the electronic device resends a third request to the server in response to the second operation input by the user; the second operation is used to instruct the electronic device to re-download the information of the first object, and the third request is used to request to obtain the information of the first object.
  • the electronic device receives the third response from the server, and extracts the information of the first object from the third response.
  • the electronic device saves the information of the first object into a database.
  • the electronic device may send a first request to the server to request the server to obtain the email indicated by the email identifier and the structure information of the message body of the email. After sending the first request, the electronic device may receive a first response from the server, where the first response includes the email and the structure information of the message body of the email. In this way, the electronic device can not only obtain the entire e-mail, that is, download all the information of the e-mail at one time, but also obtain the structure information of the message body of the e-mail.
  • the electronic device can determine the object identifier of each object in the message body of the email according to the structure information of the message body of the email. Further, if it is determined that the download of the information of the first object in the message body of the email fails, the electronic device can use the object identifier of the first object to re-download the information of the first object multiple times until the first object's information is downloaded again. Information downloaded successfully. Compared with the method of re-logging in the account to re-download the entire email, the method provided by the present application reduces the complexity and traffic consumption of email synchronization.
  • the electronic device and the server execute the email synchronization method provided by the embodiment of the present application, which specifically includes S1101-S1118.
  • the electronic device sends a request for querying the email to be synchronized to the server.
  • the electronic device may send a request for querying the email to be synchronized to the server when the user logs into the account of the email client for the first time; or, according to a preset synchronization period, send a request for querying the email identifier of the email to be synchronized to the server.
  • the server receives a request for querying the email to be synchronized.
  • the server In response to the request for querying the email to be synchronized, the server sends the email identifier of the email to be synchronized to the electronic device.
  • the server takes the email received by the account within the preset duration as the email identifier of the email to be synchronized, and sends it to the electronic device according to the preset duration;
  • the preset synchronization period is to use the email received by the account in a preset synchronization period before the current moment and adjacent to the current moment as the email identifier of the email to be synchronized, and send it to the electronic device .
  • the preset duration and the preset synchronization period reference may be made to the detailed description of the preset duration and the preset synchronization period in S601.
  • the electronic device receives the email identifier of the email to be synchronized.
  • the email identifiers of the emails to be synchronized may include the email identifiers of one or more emails.
  • the electronic device uses the mail identifier of each email to synchronize the email from the server, that is, executes S1105-S1118 for each email.
  • the electronic device sends a first request including an email identifier to the server; the first request is used for requesting to acquire the email and the structure information of the message body of the email.
  • the structure information is used to represent the data structure of the message body of the email.
  • the server receives the first request.
  • the server In response to the first request, the server sends a first response to the electronic device.
  • the server In response to the first request, the server generates a first response including the email and the structure information of the message body of the email; and then sends the first response to the electronic device.
  • the electronic device receives the first response, and extracts the email and structure information from the first response.
  • the electronic device determines the object identifier of each object in the message body of the email according to the structure information.
  • the electronic device sends a second request to the server; the second request includes the email identifier and the object identifier of the first object, and the second request is used to request to obtain the first object. object information.
  • the first object is any object in the message body of the email.
  • the server receives the second request.
  • the server In response to the second request, the server sends a second response to the electronic device.
  • the server In response to the second request, the server generates a second response including information of the first object; and then sends the second response to the electronic device.
  • the electronic device receives the second response, and extracts the information of the first object from the second response.
  • the electronic device If it fails to extract the information of the first object from the second response, the electronic device sends a second prompt message.
  • the electronic device resends a third request to the server in response to the second operation input by the user; the second operation is used to instruct the electronic device to re-download the information of the first object, and the third request is used to request to obtain the information of the first object.
  • the server receives the third request.
  • the server In response to the third request, the server sends a third response to the electronic device.
  • the electronic device receives the third response, and extracts the information of the first object from the third response.
  • the above method can be implemented by an email synchronization device.
  • the synchronization device for e-mail includes corresponding hardware structures and/or software modules for executing each function.
  • the embodiments of the present application can be implemented in hardware or a combination of hardware and computer software. Whether a function is performed by hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Experts may use different methods for each specific application to implement the described functions, but such implementation should not be considered beyond the scope of the embodiments of the present application.
  • each functional module can be divided corresponding to each function, or two or more functions can be integrated into one processing module. middle.
  • the above-mentioned integrated modules can be implemented in the form of hardware, and can also be implemented in the form of software function modules. It should be noted that, the division of modules in the embodiments of the present application is schematic, and is only a logical function division, and there may be other division manners in actual implementation.
  • FIG. 12 shows a possible schematic structural diagram of the electronic device involved in the above embodiment.
  • the electronic device 1200 is installed with a mail client, and the electronic device 1200 includes : information processing module 1201 , sending module 1202 and receiving module 1203 .
  • the information processing module 1201 is used to obtain the mail identifier of the email to be synchronized by the mail client; the sending module 1202 is used to send the first request including the mail identifier to the server; the receiving module 1203 is used to receive the first response from the server ; The information processing module 1201 is also used for extracting email and structure information from the first response; according to the structure information, the object identifier of each object in the message body is determined; the sending module 1202 is also used if the first object in the message body If the information download fails, send a second request to the server; the receiving module 1203 is further configured to receive the second response from the server; the information processing module 1201 is further configured to extract the information of the first object from the second response.
  • the first request is used for requesting to obtain the structure information of the email and the message body of the email, and the structure information is used to represent the data structure of the message body of the email.
  • the objects in the message body include: the mail body of the e-mail, or the mail body of the e-mail and the additional information of the e-mail; the additional information includes embedded resources and/or attachments.
  • the second request includes the email identifier and the object identifier of the first object, and the second request is used to request to obtain information of the first object.
  • the information processing module 1201 is further configured to send a first prompt message if the information download of the first object fails; the sending module 1202 is specifically configured to respond to the first operation input by the user and send a message to the server Send a second request.
  • the first prompt information is used to indicate that the information download of the first object fails, and the first prompt information is also used to request the user to confirm whether to download the information of the first object again.
  • the first operation is used to instruct the electronic device to download the information of the first object again.
  • the information processing module 1201 is further configured to issue a second prompt message if the extraction of the information of the first object from the second response fails; the sending module 1202 is further configured to respond to the first object input by the user The second operation is to re-send the third request to the server; the receiving module 1203 is further configured to receive the third response; the information processing module 1201 is further configured to extract the information of the first object from the third response.
  • the second prompt information is used to indicate that the information download of the first object fails, and the second prompt information is also used to request the user to confirm whether to re-download the information of the first object; the second operation is used to instruct the electronic device to re-download the information of the first object.
  • information, and the third request is used to request to obtain the information of the first object.
  • the structure information is used to represent the data structure of the message body of the email, and the data structure is used to represent the sequence of each object in the message body.
  • the information processing module 1201 is specifically used by the electronic device to determine the object identifier of each object in the message body according to the order of each object in the message body.
  • FIG. 13 shows another possible schematic structural diagram of the electronic device involved in the above embodiment.
  • the electronic device 1300 includes: a processing module 1301 , a storage module 1302 and a communication module 1303 .
  • the processing module 1301 is used to control and manage the electronic device 1300 .
  • the storage module 1302 is used to store program codes and data of the electronic device 1300 .
  • the communication module 1303 is used to communicate with other devices. For example, the communication module 1303 is used to receive or send data to other devices.
  • the processing module 1301 may be a processor or a controller, for example, a CPU, a general-purpose processor, a DSP, an ASIC, an FPGA, or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It may implement or execute the various exemplary logical blocks, modules and circuits described in connection with this disclosure.
  • the processor may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, and the like.
  • the communication module 1303 may be a transceiver, a transceiver circuit, a communication interface, or the like.
  • the storage module 1302 may be a memory. The processor, communication interface and memory described above may be coupled together by a bus.
  • Embodiments of the present application further provide a computer-readable storage medium, where the computer-readable storage medium includes computer instructions, and when the computer instructions are executed on the electronic device, the electronic device is made to perform each function or step in the above method embodiments .
  • the computer-readable storage medium may be Read-Only Memory (ROM), Random Access Memory (RAM), Compact Disc Read-Only Memory (CD-ROM), Tape, floppy disk, and optical data storage devices, etc.
  • Embodiments of the present application further provide a computer program product, which when the computer program product runs on the above electronic device, enables the above electronic device to perform each function or step in the above method embodiments.
  • the disclosed apparatus and method may be implemented in other manners.
  • the apparatus embodiments described above are only illustrative.
  • the division of modules or units is only a logical function division. In actual implementation, there may be other division methods.
  • multiple units or components may be combined or May be integrated into another device, or some features may be omitted, or not implemented.
  • the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or units, and may be in electrical, mechanical or other forms.
  • Units described as separate components may or may not be physically separated, and components shown as units may be one physical unit or multiple physical units, that is, may be located in one place, or may be distributed in multiple different places. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution in this embodiment.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit.
  • the above-mentioned integrated units may be implemented in the form of hardware, or may be implemented in the form of software functional units.
  • the integrated unit if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a readable storage medium.
  • a readable storage medium including several instructions to make a device (may be a single chip microcomputer, a chip, etc.) or a processor (processor) to execute all or part of the steps of the methods described in the various embodiments of the present application.
  • the aforementioned storage medium includes: a U disk, a removable hard disk, a ROM, a RAM, a magnetic disk, or an optical disk and other mediums that can store program codes.

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Human Resources & Organizations (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Strategic Management (AREA)
  • Marketing (AREA)
  • Data Mining & Analysis (AREA)
  • Economics (AREA)
  • Computer Hardware Design (AREA)
  • Operations Research (AREA)
  • Quality & Reliability (AREA)
  • Tourism & Hospitality (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Information Transfer Between Computers (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

本申请实施例提供一种电子邮件的同步方法及电子设备,涉及电子邮件技术领域,可以降低电子邮件同步的复杂度和流量消耗量。该方法应用于安装有邮件客户端的电子设备,该方法包括:电子设备获取邮件客户端待同步的电子邮件的邮件标识;向服务器发送包括邮件标识的第一请求,第一请求用于请求获取电子邮件和电子邮件的消息体的结构信息;接收来自服务器的第一响应,从第一响应中提取电子邮件和结构信息;根据结构信息,确定消息体中各个对象的对象标识;若消息体中的第一对象的信息下载失败,向服务器发送第二请求;第二请求包括邮件标识和第一对象的对象标识;接收来自服务器的第二响应,从第二响应中提取第一对象的信息。

Description

一种电子邮件的同步方法及电子设备
本申请要求于2020年08月25日提交中国专利局、申请号为202010865744.5、申请名称为“一种电子邮件的同步方法及电子设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及电子邮件技术领域,尤其涉及一种电子邮件的同步方法及电子设备。
背景技术
目前,越来越多的用户需要在不同的电子设备(例如,移动终端,台式计算机)进行办公,而电子邮件作为工作中的一个重要工具,用户可以在任意一个电子设备的邮件客户端上登录账号,则该电子设备的邮件客户端从服务器同步该账号下的电子邮件。如此,该电子设备的邮件客户端便可以得到该账号下的电子邮件,并向用户展示该账号下的电子邮件,以使得用户通过邮件客户端可以查看各个电子邮件。
具体地,电子设备的邮件客户端从服务器同步某个账号下的电子邮件的过程包括:邮件客户端从服务器获取该账号下的待同步的电子邮件的邮件标识;再向服务器请求该邮件标识所指示的电子邮件;然后,可以接收来自服务器的该邮件标识所指示的电子邮件。其中,待同步的电子邮件可以包括邮件正文和附加信息,附加信息包括内嵌资源和/或附件。
采用上述方案同步电子邮件,可以同时下载电子邮件的所有信息,即同时下载电子邮件的邮件正文和附加信息。在这种情况下,可能会存在电子邮件的邮件正文下载成功,而电子邮件的附加信息下载失败的问题。目前,如果电子邮件的附加信息下载失败,只能通过重新在邮件客户端登录上述账号,采用从服务器同步该账号下的电子邮件的方式再次下载上述电子邮件。
针对电子邮件的附加信息下载失败的问题,需要用户重新在邮件客户端登录账号,以再次下载上述电子邮件,这样就增加了电子邮件同步的复杂度和流量消耗量。
发明内容
本申请提供一种电子邮件的同步方法及电子设备,可以降低电子邮件同步的复杂度和流量消耗量。
为实现上述技术目的,本申请采用如下技术方案:
第一方面,本申请提供了一种电子邮件的同步方法,该方法应用于安装有邮件客户端的电子设备,该方法包括:电子设备获取邮件客户端待同步的电子邮件的邮件标识;向服务器发送包括邮件标识的第一请求;接收来自服务器的第一响应,从第一响应中提取电子邮件和结构信息;根据结构信息,确定消息体中各个对象的对象标识;若消息体中的第一对象的信息下载失败,向服务器发送第二请求;接收来自服务器的第二响应,从第二响应中提取第一对象的信息。
其中,第一请求用于请求获取电子邮件和电子邮件的消息体的结构信息,结构信息用于表征电子邮件的消息体的数据结构。消息体中的对象包括:电子邮件的邮件正 文,或者电子邮件的邮件正文和电子邮件的附加信息。该附加信息包括内嵌资源和/或附件。第二请求包括邮件标识和第一对象的对象标识,第二请求用于请求获取第一对象的信息。
上述方法中,电子设备可以向服务器发送第一请求,以向服务器请求获取邮件标识所指示的电子邮件、以及该电子邮件的消息体的结构信息。电子设备发送该第一请求后,可以接收来自服务器的第一响应,该第一响应中包括该电子邮件和该电子邮件的消息体的结构信息。如此,电子设备不仅可以获取到整封电子邮件,即一次性下载该电子邮件的所有信息;还可以得到电子邮件的消息体的结构信息。
如此,电子设备便可以根据该结构信息,确定消息体中各个对象的对象标识。这样,当该电子邮件的消息体中的第一对象的信息下载失败时,电子设备便可以利用该第一对象的对象标识,向服务器发送请求该第一对象的信息的第二请求,以向服务器请求获取该第一对象的信息。
采用上述方案,可以解决由于电子设备一次性下载该电子邮件的所有信息,而导致电子设备的部分信息下载失败时,无法重新下载该部分信息的问题。采用本申请的方法,电子设备可以利用下载失败的第一对象的对象标识,重新下载该第一对象的信息。相较于常规技术中,重新登录账号以重新同步电子邮件的方法,采用本方案可以降低电子设备同步电子邮件的复杂度。其次,电子设备只对下载失败的第一对象的信息进行重新下载,相较于重新下载整封电子邮件,降低了电子邮件同步的流量消耗量。
在一种可能的实施方式中,上述若消息体中的第一对象的信息下载失败,电子设备向服务器发送第二请求,包括:若第一对象的信息下载失败,电子设备发出第一提示信息;响应于用户输入的第一操作,向服务器发送第二请求。其中,第一提示信息用于指示第一对象的信息下载失败,第一提示信息还用于请求用户确认是否重新下载第一对象的信息。第一操作用于指示电子设备重新下载第一对象的信息。
在该设计方式中,若电子设备确定电子邮件的消息体中的第一对象的信息下载失败,可以先发出第一提示信息,以告知用户该第一对象的信息下载失败,使用户选择是否重新下载第一对象的信息。在用户选择重新下载第一对象的信息的情况下,电子设备再向服务器发送用于请求获取第一对象的信息的第二请求。如此,可以按照用户实际需求,只针对用户需要的电子邮件,对下载失败的第一对象的信息进行重新下载,相较于重新下载所有待同步的电子邮件的所有信息,降低了电子邮件同步的流量消耗量。
另一种可能的实施方式中,在上述电子设备接收来自服务器的第二响应,从第二响应中提取第一对象的信息之后,该方法还包括:若从第二响应中提取第一对象的信息失败,电子设备发出第二提示信息;响应于用户输入的第二操作,重新向服务器发送第三请求;接收来自服务器的第三响应,从第三响应中提取第一对象的信息。其中,第二提示信息用于指示第一对象的信息下载失败,第二提示信息还用于请求用户确认是否重新下载第一对象的信息。第二操作用于指示电子设备重新下载第一对象的信息,第三请求用于请求获取第一对象的信息。
在该设计方式中,电子设备在自动重新下载该第一对象的信息之后,如果该第一对象的信息再次下载失败,发出第二提示信息。该第二提示信息除了告知用户第一对 象的信息下载失败,还请求用户确认是否重新下载第一对象的信息,即向用户提供继续重新下载第一对象的信息的入口。进而,用户可以手动控制继续重新下载该第一对象的信息,或者,还可以在通信网络稳定等合适情况下控制继续重新下载该第一对象的信息。相较于重新登录账号以重新同步电子邮件的方法,降低了电子邮件同步的复杂度,并提高了电子邮件同步的成功率。
另一种可能的实施方式中,结构信息用于表征电子邮件的消息体的数据结构,数据结构用于表征各个对象在消息体中的先后顺序。上述电子设备根据结构信息,确定消息体中各个对象的对象标识,包括:电子设备根据各个对象在消息体中的先后顺序,确定消息体中各个对象的对象标识。
该设计方式提供了电子设备根据结构信息确定消息体中各个对象的对象标识的一种具体实施方式。
第二方面,本申请还提供了一种电子设备,该电子设备安装有邮件客户端,该电子设备包括:信息处理模块,用于获取邮件客户端待同步的电子邮件的邮件标识;发送模块,用于向服务器发送包括邮件标识的第一请求;接收模块,用于接收来自服务器的第一响应;信息处理模块,还用于从第一响应中提取电子邮件和结构信息;根据结构信息,确定消息体中各个对象的对象标识;发送模块,还用于若消息体中的第一对象的信息下载失败,向服务器发送第二请求;接收模块,还用于接收来自服务器的第二响应;信息处理模块,还用于从第二响应中提取第一对象的信息。其中,第一请求用于请求获取电子邮件和电子邮件的消息体的结构信息,结构信息用于表征电子邮件的消息体的数据结构。消息体中的对象包括:电子邮件的邮件正文,或者电子邮件的邮件正文和电子邮件的附加信息;附加信息包括内嵌资源和/或附件。第二请求包括邮件标识和第一对象的对象标识,第二请求用于请求获取第一对象的信息。
在一种可能的实施方式中,信息处理模块,还用于若第一对象的信息下载失败,发出第一提示信息;发送模块,具体用于响应于用户输入的第一操作,向服务器发送第二请求。其中,第一提示信息用于指示第一对象的信息下载失败,第一提示信息还用于请求用户确认是否重新下载第一对象的信息。第一操作用于指示电子设备重新下载第一对象的信息。
另一种可能的实施方式中,信息处理模块,还用于若从第二响应中提取第一对象的信息失败,发出第二提示信息;发送模块,还用于响应于用户输入的第二操作,重新向服务器发送第三请求;接收模块,还用于接收来自服务器的第三响应;信息处理模块,还用于从第三响应中提取第一对象的信息。其中,第二提示信息用于指示第一对象的信息下载失败,第二提示信息还用于请求用户确认是否重新下载第一对象的信息;第二操作用于指示电子设备重新下载第一对象的信息,第三请求用于请求获取第一对象的信息。
另一种可能的实施方式中,结构信息用于表征电子邮件的消息体的数据结构,数据结构用于表征各个对象在消息体中的先后顺序。信息处理模块,具体用于根据各个对象在消息体中的先后顺序,确定消息体中各个对象的对象标识。
第三方面,本申请还提供了一种电子设备,电子设备包括:处理器和用于存储处理器可执行指令的存储器;其中,处理器被配置为执行指令,以实现如第一方面及其 任一种可能的实施方式的电子邮件的同步方法。
第四方面,本申请还提供了一种计算机可读存储介质,计算机可读存储介质上存储有计算机指令,当计算机指令在电子设备上运行时,使得电子设备执行如第一方面及其任一种可能的实施方式的电子邮件的同步方法。
第五方面,本申请还提供一种计算机程序产品,包括一条或多条指令,该一条或多条指令可以在电子设备上运行,使得电子设备执行如第一方面及其任一种可能的实施方式的电子邮件的同步方法。
本申请实施例第二方面及其任一种可能的设计方式,以及第三方面、第四方面和第五方面所带来的技术效果可参见上述第一方面中不同设计方式所带来的技术效果,此处不再赘述。
附图说明
图1为本申请实施例提供的一种电子邮件的同步方法所涉及的实施环境示意图;
图2为本申请实施例提供的一种电子设备的硬件结构示意图;
图3为本申请实施例提供的一种多用途互联网邮件扩展(Multipurpose Internet Mail Extensions,MIME)邮件的组成示意图;
图4为常规技术所采用的电子邮件的同步方法的流程图;
图5为采用常规技术同步电子邮件后的电子邮件的内容示意图;
图6为本申请实施例提供的一种电子邮件的同步方法的流程图一;
图7为本申请实施例提供的一种电子邮件的同步方法的流程图二;
图8A为本申请实施例提供的一种重新下载附件后的电子邮件的内容示意图;
图8B为本申请实施例提供的一种附件下载失败的电子邮件的内容示意图一;
图8C为本申请实施例提供的一种附件下载失败的电子邮件的内容示意图二;
图9为本申请实施例提供的一种电子邮件的同步方法的流程图三;
图10为本申请实施例提供的一种电子邮件的同步方法的流程图四;
图11为本申请实施例提供的一种电子邮件的同步方法的流程图五;
图12为本申请实施例提供的一种电子设备的结构示意图一;
图13为本申请实施例提供的一种电子设备的结构示意图二。
具体实施方式
本申请实施例中所述的“第一”和“第二”等是用于区别不同的对象,或者用于区别对同一对象的不同处理,而不是用于描述对象的特定顺序。例如,第一请求和第二请求是不同的请求。
本申请实施例提供一种电子邮件的同步方法,下面将结合附图对本申请实施例的实施方式进行详细描述。
请参考图1,其示出本申请实施例提供的一种电子邮件的同步方法所涉及的实施环境示意图。如图1所示,该实施环境可以包括服务器101和多个电子设备,例如,电子设备102,电子设备103。其中,服务器101可以为某一个电子邮箱提供应用服务。服务器101可以通过有线网络或无线网络,和任一个使用该电子邮箱的电子设备(如,电子设备102或电子设备103)传输电子邮件。
需要说明的是,图1中的电子设备和服务器的数目仅仅是示意性的。根据实际需 要,可以具有任意数目的电子设备和服务器。
具体地,以电子设备102为例,电子设备102安装有电子邮箱的邮件客户端。电子设备102的邮件客户端在用户登录账号的状态下,可以通过服务器101向其他账号的电子邮箱发送电子邮件,也可以通过服务器101接收来自其他账号的电子邮件。每个账号的电子邮箱发送的电子邮件和接收的电子邮件,都保存在服务器101中。如此,用户在任一个电子设备的邮箱客户端上登录账号后,可以从服务器101上同步该账号下的电子邮件,即从服务器101上下载该账号下的电子邮件。
需要说明的是,本申请实施例提供的电子邮件的同步方法可以应用于电子设备。该电子邮件的同步方法的执行主体还可以为电子邮件的同步装置。该电子邮件的同步装置可以为上述电子设备中的中央处理器(Central Processing Unit,CPU);或者,上述电子设备中的用于执行电子邮件的同步方法的控制模块。
需要说明的是,本申请实施例中的电子设备可以是手机、平板电脑、桌面型计算机、膝上型计算机、手持计算机、笔记本电脑、超级移动个人计算机(ultra-mobile personal computer,UMPC)、上网本等,本申请实施例对该电子设备的具体形态不作特殊限制。
下面以任一个安装有邮件客户端的电子设备是手机为例,介绍电子设备的硬件结构。如图2所示,电子设备200可以包括:处理器210,外部存储器接口220,内部存储器221,通用串行总线(universal serial bus,USB)接口230,充电管理模块240,电源管理模块241,电池242,天线1,天线2,移动通信模块250,无线通信模块260,音频模块270,扬声器270A,受话器270B,麦克风270C,耳机接口270D,传感器模块280,按键290,马达291,指示器292,摄像头1-N 293,显示屏294(如触摸屏),以及用户标识模块(subscriber identification module,SIM)卡接口1-N 295等。
其中,上述传感器模块280可以包括压力传感器,陀螺仪传感器,气压传感器,磁传感器,加速度传感器,距离传感器,接近光传感器,指纹传感器,温度传感器,触摸传感器,环境光传感器和骨传导传感器等传感器。
可以理解的是,本实施例示意的结构并不构成对电子设备200的具体限定。在另一些实施例中,电子设备200可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。
处理器210可以包括一个或多个处理单元,例如:处理器210可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processing unit,GPU),控制器,存储器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。
控制器可以是电子设备200的神经中枢和指挥中心。控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。
处理器210中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器210中的存储器为高速缓冲存储器。该存储器可以保存处理器210刚用过或循环使用的指令或数据。如果处理器210需要再次使用该指令或数据,可从所述存储器中直 接调用。避免了重复存取,减少了处理器210的等待时间,因而提高了系统的效率。
在一些实施例中,处理器210可以包括一个或多个接口。可以理解的是,本实施例示意的各模块间的接口连接关系,只是示意性说明,并不构成对电子设备200的结构限定。在另一些实施例中,电子设备200也可以采用上述实施例中不同的接口连接方式,或多种接口连接方式的组合。
充电管理模块240用于从充电器接收充电输入(有线充电器的充电输入和/或无线充电输入),为电池242充电。其中,充电器可以是无线充电器,也可以是有线充电器。充电管理模块240为电池242充电的同时,还可以通过电源管理模块241为电子设备供电。
电源管理模块241用于连接电池242,充电管理模块240与处理器210。电源管理模块241接收电池242和/或充电管理模块240的输入,为处理器210,内部存储器221,外部存储器,显示屏294,摄像头293,和无线通信模块260等供电。在一些实施例中,电源管理模块241也可以设置于处理器210中。在另一些实施例中,电源管理模块241和充电管理模块240也可以设置于同一个器件中。
电子设备200的无线通信功能可以通过天线1,天线2,移动通信模块250,无线通信模块260,调制解调处理器以及基带处理器等实现。天线1和天线2用于发射和接收电磁波信号。在一些实施例中,电子设备200的天线1和移动通信模块250耦合,天线2和无线通信模块260耦合,使得电子设备200可以通过无线通信技术与网络以及其他设备通信。所述无线通信技术可以包括全球导航卫星系统(Global Navigation Satellite System,GNSS),无线局域网(wireless local area networks,WLAN)(如Wi-Fi网络)技术等。所述GNSS可以包括全球卫星定位系统(global positioning system,GPS),全球导航卫星系统(global navigation satellite system,GLONASS),北斗卫星导航系统(beidou navigation satellite system,BDS),准天顶卫星系统(quasi-zenith satellite system,QZSS)和/或星基增强系统(satellite based augmentation systems,SBAS)等。示例性的,电子设备200可以通过GPS、BDS或者SBAS等定位技术,获取电子设备200的实时位置信息。
移动通信模块250可以提供应用在电子设备200上的包括2G/3G/4G/5G等无线通信的解决方案。例如,电子设备200可以通过移动通信模块250向服务器发送电子邮件。
无线通信模块260可以提供应用在电子设备200上的包括WLAN(如Wi-Fi网络),蓝牙(bluetooth,BT),GNSS,近场通信(Near Field Communication,NFC)、红外(Infrared,IR)、调频(frequency modulation,FM)等无线通信的解决方案。例如,电子设备200可以通过GNSS定位技术,获取电子设备200的实时位置信息。
电子设备200通过GPU,显示屏294,以及应用处理器等实现显示功能。电子设备200可以通过ISP,摄像头293,视频编解码器,GPU,显示屏294以及应用处理器等实现拍摄功能。外部存储器接口220可以用于连接外部存储卡,例如Micro SD卡,实现扩展电子设备200的存储能力。内部存储器221可以用于存储计算机可执行程序代码,所述可执行程序代码包括指令。处理器210通过运行存储在内部存储器221的指令,从而执行电子设备200的各种功能应用以及数据处理。电子设备200可以通过 音频模块270,扬声器270A,受话器270B,麦克风270C,耳机接口270D,以及应用处理器等实现音频功能。
本申请实施例中,电子邮箱可以为使用交互邮件访问协议(Internet Mail Access Protocol,IMAP)的电子邮箱。IMAP协议是一种由传输控制协议/网际协议(Transmission Control Protocol/Internet Protocol,TCP/IP)协议定义的电子邮件协议。电子邮箱的邮件客户端通过IMAP协议可以实现从服务器上同步电子邮件。
本申请实施例中,电子邮件可以为MIME邮件,即符合MIME规范的电子邮件。其中,MIME是当前广泛应用的一种电子邮件技术规范,其提供了一种可以在电子邮件中附加多种不同编码文件的方法,使电子邮件除了包含一般的纯文本以外,还可携带图片、声音和视频等二进制文件。MIME邮件可以包含纯文本正文,也可以包含纯文本正文和超文本正文,或者包含纯文本正文、超文本正文、内嵌资源和附件。
其中,内嵌资源是MIME邮件特有的,用于存放一些与邮件正文关联的图片、动画、声音甚至CSS样式和脚本的段。通常在MIME邮件的超文本正文内,使用超级链接与内嵌资源相联系。内嵌资源是在浏览邮件内容时就要访问的。
示例性地,参见图3所示的一种MIME邮件(MIMEMessage)的组成示意图,MIME邮件由消息头(也可以称为邮件头)和消息体(也可以称为邮件体)两大部分组成。其中,MIME邮件的消息头可以包含发件人、收件人、主题、时间、MIME版本、邮件内容的类型等重要信息。MIME邮件的消息体包含电子邮件的内容(可以简称为邮件内容),邮件内容可以由一个或多个对象(MimeBodyPart)组成,每个对象也包含消息头和消息体两部分。如图3所示,该MIME邮件的消息体至少包括4个对象的信息,分别是邮件正文、内嵌资源、第一个附件和第二个附件。该MIME邮件的消息体具体包括:邮件正文的消息头和消息体,内嵌资源的消息头和消息体,第一个附件的消息头和消息体,第二个附件的消息头和消息体。
目前,电子设备的邮件客户端从服务器同步某个账号下的电子邮件的过程包括:邮件客户端从服务器获取该账号下的待同步的电子邮件的邮件标识;再向服务器请求该邮件标识所指示的整封电子邮件;然后,可以接收来自服务器的该邮件标识所指示的整封电子邮件,即待同步的电子邮件。其中,待同步的电子邮件主要分为消息头和消息体两部分,电子邮件的消息体分为一个或多个对象;例如,多个对象可以包括邮件正文和附加信息,附加信息包括内嵌资源和/或附件。
采用上述方案同步电子邮件,服务器将该邮件标识所指示的电子邮件的所有信息作为一个整体(即整封电子邮件),发送给电子设备的邮件客户端。邮件客户端下载该整封电子邮件,就可以一次性下载电子邮件的所有信息,包括电子邮件的邮件正文和附加信息。在下载整封电子邮件的情况下,可能会存在电子邮件的邮件正文下载成功,而电子邮件的附加信息下载失败的问题。由于邮件客户端下载得到的整封电子邮件是指电子邮件的所有信息,利用电子邮件的所有信息,无法向服务器单独请求下载失败的附加信息。因此,只能由用户重新在邮件客户端上登录账号,以重新下载该整封电子邮件,这样就增加了电子邮件同步的复杂度和流量消耗量。并且,再次下载上述电子邮件时,还存在电子邮件的附加信息下载失败的可能,则电子邮件同步的成功率较低。
示例性地,以采用IMAP协议同步电子邮件的邮件客户端和服务器为例,电子设备在用户登录邮件客户端的账号(如,IMAP账号)后,可以周期性地从服务器获取该邮件客户端的待同步的电子邮件的邮件标识。电子设备每次获取待同步的电子邮件的邮件标识之后,从服务器上同步该邮件标识所指示的电子邮件的所有信息。具体地,如图4所示,电子设备和服务器采用上述方案同步电子邮件的过程,包括S401-S409。
S401、电子设备获取待同步的电子邮件的邮件标识。
其中,待同步的电子邮件的邮件标识可以包括一个或多个电子邮件的邮件标识。电子设备针对每一个电子邮件的邮件标识,执行S402-S409。
S402、电子设备向服务器发送包括邮件标识的、针对整封电子邮件的请求。
其中,该针对整封电子邮件的请求用于请求获取该邮件标识所指示的整封电子邮件。
其中,该针对整封电子邮件的请求可以是基于fetch指令生成的,fetch指令是IMAP协议使用的应用于接收服务器上的电子邮件的指令。
示例性地,该针对整封电子邮件的请求的格式可以为:UID FETCH MESSAGE-ID(UID BODY[])。其中,邮件唯一标识符(The unique identifier for the message,UID)是一个固定字符,用于指示唯一标识邮件的一个号码,即用于指示邮件标识。MESSAGE-ID为邮件标识。BODY[]表征获取整封电子邮件,即电子邮件的所有信息,包括电子邮件的消息头和电子邮件的消息体。
S403、服务器接收针对整封电子邮件的请求。
S404、服务器响应于针对整封电子邮件的请求,向电子设备发送包括整封电子邮件的响应。
S405、电子设备接收包括整封电子邮件的响应,从包括整封电子邮件的响应中提取邮件标识所指示的电子邮件。
电子设备从包括整封电子邮件的响应(reponse)中,提取该电子邮件的消息头和该电子邮件的消息体;再依次从该电子邮件的消息体中获取各个对象的信息,并判断每个对象的信息是否下载成功。若确定电子邮件的消息体中的第一对象的信息下载失败,执行S406。若电子设备确定电子邮件的消息体中的第一对象的信息下载成功,将第一对象的信息保存至数据库中。
其中,第一对象为电子邮件的消息体中的任意一个对象。
需要说明的是,本申请实施例中的“第一对象的信息下载成功”可以是指获取到的第一对象的信息是完整的。相应地,本申请实施例中的“第一对象的信息下载失败”可以是指获取到的第一对象的信息不完整。
需要说明的是,电子设备可以根据获取到的每个对象的信息的文件大小,判断每个对象的信息是否下载成功;或者,根据获取到的每个对象的信息是否包括表示下载成功的标识符,判断每个对象的信息是否下载成功。本申请实施例对判断每个对象的信息是否下载成功的具体实施方式不作限制。
S406、若确定第一对象的信息下载失败,电子设备向服务器发送上述针对整封电子邮件的请求。
S407、服务器接收针对整封电子邮件的请求。
S408、服务器响应于针对整封电子邮件的请求,向电子设备发送指示下载完成的响应。
S409、电子设备接收指示下载完成的响应,并将第一对象的信息保存至数据库中。
电子设备接收该指示下载完成的响应,并将S405中获取到的第一对象的信息保存至数据库中。S405中获取到的第一对象的信息是不完整的。
需要说明的是,电子设备可以通过邮件客户端执行上述S401、S402、S405、S406、S409。
进一步地,电子设备得到任一个待同步的电子邮件之后,响应于用户输入的查看该电子邮件的操作,展示该电子邮件的邮件内容。该电子邮件的邮件内容包括电子邮件的消息体中的所有对象的信息。若该电子邮件的消息体中的某个对象的信息下载失败,则电子设备的邮件客户端无法打开该对象的信息,并且,该对象的文件大小可以为0字节(0B),或者该对象的文件大小等于该对象中已经成功下载的部分的文件大小。例如,一个附件的信息下载失败,电子设备的邮件客户端无法打开该附件的信息。
示例性地,电子设备得到某个待同步的电子邮件之后,响应于用户输入的查看该电子邮件的操作,展示该电子邮件的邮件内容。该电子邮件的邮件内容可以包括消息头、邮件正文和多个附件。假设电子设备为采用Android(安卓)操作系统的移动终端、该电子邮件中的一个附件的信息下载失败。参见图5,电子设备展示电子邮件的消息头中的收件人、发件人和主题等,还展示多个附件的名称和文件大小,具体包括:第1个附件51的名称为“user_uuid.txt”和文件大小为36B,第2个附件52的名称为“1”和文件大小为8B,第3个附件53的名称为“1.db”和文件大小为8B,第4个附件54的名称为“1.txt”和文件大小为0B,第5个附件55的名称为“1.xml”和文件大小为8B。可以知道,电子邮件中的第4个附件的信息下载失败。
可以理解的是,电子设备采用上述方案同步电子邮件的过程中,电子设备利用待同步的电子邮件的邮件标识,向服务器发送针对整封电子邮件的请求,以向服务器请求获取该邮件标识所指示的整封电子邮件。由于从该整封电子邮件的消息体中只能提取出各个对象的信息,没有下载各个对象所需的信息。那么,如果该整封电子邮件的消息体中任意一个对象的信息下载失败,就会因为缺少下载该对象所需的信息,只能再向服务器发送该针对整封电子邮件的请求。由于服务器对该针对整封电子邮件的请求已经响应过一次,则服务器再次接收到该针对整封电子邮件的请求时,就向电子设备发送指示下载完成的响应。电子设备从服务器发送的指示下载完成的响应中,无法得到该对象的信息。此时,只能由用户在邮件客户端上重新登录账号,以利用上述邮件标识,再次向服务器请求获取该邮件标识所指示的整封电子邮件(包括了上述下载失败的对象的信息),这样就增加了电子邮件同步的复杂度和流量消耗量;并且,再次下载整封电子邮件时,还存在该对象的信息下载失败的可能,则电子邮件同步的成功率较低。
对此,本申请实施例提出一种电子邮件的同步方法,可以提高电子邮件同步的成功率,并降低电子邮件同步的复杂度和流量消耗量。
需要说明的是,以下实施例中的方法均可以在具有上述硬件结构的电子设备200中实现。
请参考图6,为本申请实施例提供的一种电子邮件的同步方法的流程图,该方法应用于安装有邮件客户端的电子设备。如图6所示,该方法可以包括S601-S606。
S601、电子设备获取邮件客户端待同步的电子邮件的邮件标识。
电子设备可以在用户首次登录邮件客户端的账号的情况下,自动向服务器发送查询待同步的电子邮件的邮件标识的请求;然后,接收来自服务器的待同步的电子邮件的邮件标识;其中,该待同步的电子邮件可以是在预设时长内该账号接收到的电子邮件;预设时长是指当前时刻之前的一段时间,例如,一天,一周,一个月等等。
或者,电子设备可以在邮件客户端处于账号登录的情况下,按照预设同步周期,向服务器发送查询待同步的电子邮件的邮件标识的请求;然后,接收来自服务器的待同步的电子邮件的邮件标识;其中,该待同步的电子邮件可以是在当前时刻之前的、且与当前时刻相邻的一个预设同步周期内该账号接收到的电子邮件;预设同步周期可以为一天,一周,一个月等等。
其中,用户账号可以为IMAP账号。待同步的电子邮件的邮件标识可以包括一个或多个电子邮件的邮件标识。电子设备利用每一个电子邮件的邮件标识从服务器上同步该电子邮件,即针对每一个电子邮件执行S602-S606。
S602、电子设备向服务器发送包括邮件标识的第一请求;第一请求用于请求获取电子邮件和电子邮件的消息体的结构信息,结构信息用于表征电子邮件的消息体的数据结构。
其中,结构信息用于表征电子邮件的消息体的数据结构,数据结构用于表征电子邮件的消息体中的各个对象在消息体中的先后顺序。电子邮件的消息体中的对象包括:电子邮件的邮件正文,或者电子邮件的邮件正文和电子邮件的附加信息;附加信息包括内嵌资源和/或附件。
本申请实施例中,第一请求不仅可以包括邮件标识,还可以包括用于请求电子邮件所需的第一参数(即用于请求整封电子邮件所需的第一参数)、以及用于请求电子邮件的消息体的结构信息所需的第二参数。
示例性地,若电子设备上的邮件客户端采用IMAP协议从服务器上同步电子邮件,该第一请求可以是基于fetch指令生成的;该第一请求中的第一参数为BODY,该第一请求中的第二参数为BODYSTRUCTURE。该第一请求的格式可以为:UID FETCH MESSAGE-ID(UID BODYSTRUCTURE BODY PEEK[])。
S603、电子设备接收来自服务器的第一响应,从第一响应中提取电子邮件和结构信息。
服务器接收该第一请求并响应,生成包括该电子邮件和该结构信息的第一响应,并向电子设备发送该第一响应。电子设备从服务器接收该第一响应;再从该第一响应中提取电子邮件和结构信息。
S604、电子设备根据结构信息,确定消息体中各个对象的对象标识。
电子设备根据电子邮件的消息体中的各个对象在消息体中的先后顺序,确定电子邮件的消息体中各个对象的对象标识。其中,电子邮件的消息体中不同对象的对象标识不同。
本申请实施例中,电子邮件的消息体中的对象可以包括邮件正文、内嵌资源、一 个或多个附件。电子邮件的消息体中的各个对象的先后顺序可以为:邮件正文、内嵌资源、第1个附件、第2个附件等等。电子邮件可以按照各个对象在电子邮件的消息体中的先后顺序,从1开始以自增1的方式,设置各个对象的对象标识。例如,邮件正文的对象标识为1,内嵌资源的对象标识为2,第1个附件的对象标识为3,第2个附件的对象标识为4等等。
示例性地,针对MIME邮件,MIME邮件中的某一个对象可能为由多个对象组合而成的组合对象(即MimeMultipart对象)。电子设备针对组合对象中的各个对象,在组合对象的对象标识的基础上,按照组合对象中的各个对象的先后顺序,设备组合对象中的各个对象的标识。例如,MIME邮件的消息体包括:包括邮件正文和内嵌资源的一个组合对象、附件;该组合对象的对象标识可以为1,组合对象中的邮件正文的对象标识为1.1,组合对象中的内嵌资源的对象标识为1.2,附件的对象标识为2。
需要说明的是,电子邮件的消息体可以包括单层嵌套的组合对象(即电子邮件的消息体中的任一个对象为组合对象),还可以包括多层嵌套的组合对象(即组合对象中的任一个对象为组合对象)。对于多层嵌套的组合对象中的任一个对象的对象标识更复杂,例如,2.1.1。
S605、若消息体中的第一对象的信息下载失败,电子设备向服务器发送第二请求;第二请求包括邮件标识和第一对象的对象标识,第二请求用于请求获取第一对象的信息。
其中,第一对象为电子邮件的消息体中的任意一个对象。
本申请实施例中,电子设备依次从该电子邮件的消息体中获取各个对象的信息,并判断每个对象的信息是否下载成功。若确定第一对象的信息下载失败,电子设备发送第一请求,以重新下载第一对象的信息。若确定第一对象的信息下载成功,电子设备将第一对象的信息保存至本地或数据库中。
示例性地,若电子设备上的邮件客户端采用IMAP协议从服务器上同步电子邮件,该第二请求可以是基于fetch指令生成的;该第二请求的格式可以为:UID FETCH MESSAGE-ID(UID BODY PEEK[partID])。其中,partID为第一对象的对象标识。
S606、电子设备接收来自服务器的第二响应,从第二响应中提取第一对象的信息。
服务器接收该第二请求并响应,从第二请求中获取第一对象的对象标识partID;然后,根据第一对象的对象标识partID,确定第一对象的信息,并生成包括第一对象的信息的第二响应;再向电子设备发送该第二响应。电子设备接收该第二响应,并从第二响应中提取第一对象的信息,完成了重新下载该第一对象的信息。
其中,服务器可以包括各个对象的对象标识对应各个对象的的信息,则可以利用第一对象的对象标识partID确定出对应的第一对象的信息。服务器中的各个对象的对象标识和电子设备确定出的各个对象的对象标识相同。
可以理解的是,电子设备可以向服务器发送第一请求,以向服务器请求获取邮件标识所指示的电子邮件、以及该电子邮件的消息体的结构信息。电子设备发送该第一请求后,可以接收来自服务器的第一响应,该第一响应中包括该电子邮件和该电子邮件的消息体的结构信息。如此,电子设备不仅可以获取到整封电子邮件,即一次性下载该电子邮件的所有信息;还可以得到电子邮件的消息体的结构信息。
如此,电子设备便可以根据该结构信息,确定消息体中各个对象的对象标识。这样,当该电子邮件的消息体中的第一对象的信息下载失败时,电子设备便可以利用该第一对象的对象标识,向服务器发送请求该第一对象的信息的第二请求,以向服务器请求获取该第一对象的信息。
采用上述方案,可以解决由于电子设备一次性下载该电子邮件的所有信息,而导致电子设备的部分信息下载失败时,无法重新下载该部分信息的问题。采用本申请的方法,电子设备可以利用下载失败的第一对象的对象标识,重新下载该第一对象的信息。相较于常规技术中,重新登录账号以重新同步电子邮件的方法,采用本方案可以降低电子设备同步电子邮件的复杂度。其次,电子设备只对下载失败的第一对象的信息进行重新下载,相较于重新下载整封电子邮件,降低了电子邮件同步的流量消耗量。
本申请实施例中,若电子设备确定电子邮件的消息体中的第一对象的信息下载失败,可以直接向服务器发送第二请求,以向服务器请求获取第一对象的信息。然后,电子设备可以从服务器返回的第二响应中提取出第一对象的信息。
示例性地,以图5中的电子邮件为例,若电子设备确定该电子邮件的消息体中的第4个附件54的信息下载失败,直接向服务器发送包括第4个附件54的对象标识的第二请求,以向服务器请求获取第4个附件54的信息。电子设备可以从返回的第二响应中成功提取出第4个附件54的信息,并保存。然后,若电子设备响应于用户输入的查看该电子邮件的操作,展示该电子邮件的邮件内容,包括下载成功的第4个附件54的信息。如图8A所示,采用本申请提供的电子邮件同步方法,电子设备能够自动重新下载第4个附件54的信息;并且,若从第二响应中成功提取第4个附件54的信息,直接展示信息完整的第4个附件54的文件大小为45B。如此,在用户无感知的情况下,重新下载第4个附件54的信息,并向用户展示下载成功的第4个附件54,用户的使用体验较好。
可以理解的是,常规技术中,电子设备确定第一对象的信息下载失败时向服务器再次发送针对整封电子邮件的请求;然后,服务器再次响应于针对整封电子邮件的请求,向电子设备发送指示下载完成的响应。如此,电子设备从指示下载完成的响应中无法得到该第一对象的信息,则不能自动重新下载第一对象的信息。本申请提供的电子邮件同步方法中,电子设备利用下载失败的第一对象的对象标识,向服务器发送第二请求;然后,服务器响应于该第二请求,通常会向电子设备返回该第一对象的信息。如此,采用本申请的方法,电子设备可以自动重新下载该第一对象的信息。相较于常规技术中,电子设备向服务器再次发送针对整封电子邮件的请求,采用本申请的方法,能够自动重新下载第一对象的信息,提高了电子邮件同步的成功率。
本申请实施例中,若电子设备确定电子邮件的消息体中的第一对象的信息下载失败,可以先不向服务器发送第二请求,而是先告知用户,以使得用户选择是否重新下载第一对象的信息。在用户选择重新下载第一对象的信息的情况下,电子设备可以向服务器发送第二请求。具体地,参见图7,S605可以包括S605a-S605b。
S605a、若第一对象的信息下载失败,电子设备发出第一提示信息。
其中,第一提示信息用于指示第一对象的信息下载失败,第一提示信息还用于请求用户确认是否重新下载第一对象的信息。
示例性地,第一提示信息可以为表示第一对象的信息下载失败的、且具有重新下载第一对象的信息的功能的控件。若第一对象的信息下载失败,电子设备显示该控件。若用户触发该控件,则电子设备确定用户要重新下载第一对象的信息;若用户未触发该控件,则电子设备确定用户不需要重新下载第一对象的信息。
示例性地,第一提示信息可以为语音或文本,该语音或文本包括以下至少一项内容:提示第一对象的信息下载失败的内容、请求用户确认是否重新下载第一对象的信息的内容、指示重新下载选项的内容。该重新下载选项具有重新下载第一对象的信息的功能。
S605b、电子设备响应于用户输入的第一操作,向服务器发送第二请求;第一操作用于指示电子设备重新下载第一对象的信息。
电子设备接收到用户输入的第一操作并响应,向服务器发送上述第二请求。
需要说明的是,S605b中所述的第二请求的详细描述,可以参考上述实施例对S605中所述的第二请求的介绍,本申请实施例这里不予赘述。
示例性地,若第一提示信息为上述控件,且用户触发该控件,则电子设备确定接收到该第一操作。
示例性地,若第一提示信息为上述语音或上述文本,上述语音或上述文本包括指示重新下载选项的内容,且用户选中该重新下载选项,则电子设备确定接收到该第一操作。
示例性地,以图5中的电子邮件为例,若电子设备确定该电子邮件的消息体中的第4个附件的信息下载失败,发出第一提示信息。然后,电子设备响应于用户输入的查看该电子邮件的操作,展示该电子邮件的邮件内容、以及第一提示信息。如图8B所示,电子设备展示电子邮件中的收件人、发件人、主题、以及多个附件的名称和文件大小,还展示第4个附件对应的第一提示信息81。从图8B中可以看出,第4个附件54的文件大小为0B,表示第4个附件54的信息下载失败。该第一提示信息81为一个名称为“重新下载”的控件;该第一提示信息81用于指示第4个附件54的信息下载失败,还用于请求用户确认是否重新下载第4个附件54的信息。若用户点击该控件,则电子设备确定接收到用户输入的第一操作,并确定用户要重新下载第4个附件54的信息。若用户不点击该控件,则电子设备确定用户不需要重新下载第4个附件54的信息。进而,若电子设备接收到用户输入的第一操作并响应,向服务器发送第二请求;第一操作用于指示电子设备重新下载第4个附件54的信息。若电子设备从服务器发送的第二响应中成功提取出第4个附件的信息,保存该提取成功的第4个附件的信息,并更新页面,向用户展示信息完整的第4个附件的文件大小为45B,如图8A所示。
示例性地,继续以图5中的电子邮件为例,如图8C所示,若电子设备确定该电子邮件的消息体中的第4个附件的信息下载失败,发出第一提示信息82。然后,电子设备响应于用户输入的查看该电子邮件的操作,展示该电子邮件的邮件内容、以及第一提示信息82。该第一提示信息82包括“请确认是否重新下载附件54的信息”、确认的选项821、以及取消的选项822。若用户点击该确认的选项821,则电子设备确定接收到用户输入的第一操作,并确定用户要重新下载第4个附件54的信息。若用户点击该取消的选项822,则电子设备确定用户不需要重新下载第4个附件54的信息。进而, 若电子设备接收到用户输入的第一操作并响应,向服务器发送第二请求;第一操作用于指示电子设备重新下载第4个附件54的信息。若电子设备从服务器发送的第二响应中成功提取出第4个附件的信息,保存该提取成功的第4个附件的信息,并更新页面,向用户展示信息完整的第4个附件的文件大小为45B,如图8A所示。
可以理解的是,若电子设备确定电子邮件的消息体中的第一对象的信息下载失败,可以先发出第一提示信息,以告知用户该第一对象的信息下载失败,使用户选择是否重新下载第一对象的信息。在用户选择重新下载第一对象的信息的情况下,电子设备再向服务器发送用于请求获取第一对象的信息的第二请求。如此,可以按照用户实际需求,只针对用户需要的电子邮件,对下载失败的第一对象的信息进行重新下载,相较于重新下载所有待同步的电子邮件的所有信息,降低了电子邮件同步的流量消耗量。
本申请实施例中,电子设备在利用第二请求自动重新下载第一对象的信息之后,若第一对象的信息再次下载失败,可以告知用户,以使得用户选择是否继续重新下载第一对象的信息。具体地,参见图9,在S606之后,电子邮件的同步方法还可以包括S901-S903。
S901、若从第二响应中提取第一对象的信息失败,电子设备发出第二提示信息。
其中,第二提示信息用于指示第一对象的信息下载失败,第二提示信息还用于请求用户确认是否重新下载第一对象的信息。
需要说明的是,第二提示信息的详细描述,可以参见上述第一提示信息的详细描述,本申请实施例这里不予赘述。第二提示信息和第一提示信息可以相同,也可以不相同。
S902、电子设备响应于用户输入的第二操作,重新向服务器发送第三请求;第二操作用于指示电子设备重新下载第一对象的信息,第三请求用于请求获取第一对象的信息。
需要说明的是,S902中所述的第三请求的详细描述,可以参考上述实施例对S605中所述的第二请求的介绍,本申请实施例这里不予赘述。
S903、电子设备接收来自服务器的第三响应,从第三响应中提取第一对象的信息。
进一步地,电子设备从第三响应中提取出第一对象的信息后,若确定第一对象的信息下载失败,可以继续执行S901-S903。若电子设备确定第一对象的信息下载成功,则不再发出第二提示信息,可以发出下载成功的提示信息。
需要说明的是,S902中所述的第三响应的详细描述,可以参考上述实施例对S606中所述的第二响应的介绍;S903的详细描述,可以参考上述S606的具体描述,本申请实施例这里均不予赘述。
可以理解的是,电子设备在自动重新下载该第一对象的信息之后,如果该第一对象的信息再次下载失败,发出第二提示信息。该第二提示信息除了告知用户第一对象的信息下载失败,还请求用户确认是否重新下载第一对象的信息,即向用户提供继续重新下载第一对象的信息的入口。进而,用户可以手动控制继续重新下载该第一对象的信息,或者,还可以在通信网络稳定等合适情况下控制继续重新下载该第一对象的信息。相较于重新登录账号以重新同步电子邮件的方法,降低了电子邮件同步的复杂度,并提高了电子邮件同步的成功率。
本申请实施例中,电子设备确定第一对象的信息下载失败后,重新下载第一对象的信息,并判断第一对象的信息是否下载成功。若第一对象的信息下载失败,则发出第二提示信息;若第一对象的信息下载成功,则将第一对象的信息保存至数据库中。电子设备在发出第二提示信息后,若接收到用户输入的第二操作,继续重新下载第一对象的信息。具体地,参见图10,电子设备执行本申请实施例提供的电子邮件的同步方法,包括S1001-S1012。
S1001、电子设备获取邮件客户端的待同步的电子邮件的邮件标识。
S1002、电子设备向服务器发送包括邮件标识的第一请求;第一请求用于请求获取电子邮件和电子邮件的消息体的结构信息。
其中,结构信息用于表征电子邮件的消息体的数据结构。
S1003、电子设备接收来自服务器的第一响应,从第一响应中提取电子邮件和结构信息。
S1004、电子设备根据结构信息,确定消息体中各个对象的对象标识。
需要说明的是,S1001-S1004的具体过程,可以参见上述S601-S604的详细描述,本申请实施例这里不予赘述。
S1005、电子设备依次判断该电子邮件的消息体中的各个对象的信息是否下载成功。
电子设备依次从该电子邮件的消息体中获取各个对象的信息,并判断每个对象的信息是否下载成功。若确定第一对象的信息下载失败,电子设备执行S1006。若确定第一对象的信息下载成功,电子设备执行S1012。
S1006、电子设备向服务器发送第二请求;第二请求包括邮件标识和第一对象的对象标识,第二请求用于请求获取第一对象的信息。
其中,第一对象为电子邮件的消息体中的任意一个对象。
S1007、电子设备接收来自服务器的第二响应,从第二响应中提取第一对象的信息。
需要说明的是,S1006-S1007的具体过程,可以参见上述S605-S606的详细描述,本申请实施例这里不予赘述。
S1008、电子设备判断从第二响应中提取第一对象的信息是否成功。
若电子设备确定从第二响应中提取第一对象的信息失败(即第一对象的信息下载失败),执行S1009。若电子设备确定从第二响应中提取第一对象的信息成功(即第一对象的信息下载成功),并执行S1012。
S1009、电子设备发出第二提示信息。
S1010、电子设备响应于用户输入的第二操作,重新向服务器发送第三请求;第二操作用于指示电子设备重新下载第一对象的信息,第三请求用于请求获取第一对象的信息。
S1011、电子设备接收来自服务器的第三响应,从第三响应中提取第一对象的信息。
需要说明的是,S1009-S1011的具体过程,可以参见上述S901-S903的详细描述,本申请实施例这里不予赘述。
S1012、电子设备将第一对象的信息保存至数据库中。
可以理解的是,电子设备可以向服务器发送第一请求,以向服务器请求获取邮件标识所指示的电子邮件、以及该电子邮件的消息体的结构信息。电子设备发送该第一 请求后,可以接收来自服务器的第一响应,该第一响应中包括该电子邮件和该电子邮件的消息体的结构信息。如此,电子设备不仅可以获取到整封电子邮件,即一次性下载该电子邮件的所有信息;还可以得到电子邮件的消息体的结构信息。
如此,电子设备便可以根据该电子邮件的消息体的结构信息,确定出该电子邮件的消息体中各个对象的对象标识。进而,如果确定该电子邮件的消息体中的第一对象的信息下载失败,电子设备便可以利用该第一对象的对象标识,多次重新下载该第一对象的信息,直至该第一对象的信息下载成功。本申请提供的方法,相较于重新登录账号以重新下载整封电子邮件的方法,降低了电子邮件同步的复杂度和流量消耗量。
本申请实施例中,参见图11,电子设备和服务器执行本申请实施例提供的电子邮件的同步方法,具体包括S1101-S1118。
S1101、电子设备向服务器发送查询待同步的电子邮件的请求。
电子设备可以在用户首次登录邮件客户端的账号的情况下,向服务器发送查询待同步的电子邮件的请求;或者,按照预设同步周期,向服务器发送查询待同步的电子邮件的邮件标识的请求。
S1102、服务器接收查询待同步的电子邮件的请求。
S1103、服务器响应于查询待同步的电子邮件的请求,向电子设备发送待同步的电子邮件的邮件标识。
服务器响应于查询待同步的电子邮件的请求,按照预设时长,将预设时长内该账号接收到的电子邮件作为待同步的电子邮件的邮件标识,并将其发送给电子设备;或者,按照预设同步周期,将在当前时刻之前的、且与当前时刻相邻的一个预设同步周期内该账号接收到的电子邮件,作为待同步的电子邮件的邮件标识,并将其发送给电子设备。其中,预设时长和预设同步周期,可参见上述S601中预设时长和预设同步周期的详细描述。
S1104、电子设备接收待同步的电子邮件的邮件标识。
其中,待同步的电子邮件的邮件标识可以包括一个或多个电子邮件的邮件标识。电子设备利用每一个电子邮件的邮件标识从服务器上同步该电子邮件,即针对每一个电子邮件执行S1105-S1118。
S1105、电子设备向服务器发送包括邮件标识的第一请求;第一请求用于请求获取电子邮件和电子邮件的消息体的结构信息。
其中,结构信息用于表征电子邮件的消息体的数据结构。
S1106、服务器接收第一请求。
S1107、服务器响应于第一请求,向电子设备发送第一响应。
服务器响应于第一请求,生成包括电子邮件和电子邮件的消息体的结构信息的第一响应;然后向电子设备发送第一响应。
S1108、电子设备接收第一响应,从第一响应中提取电子邮件和结构信息。
S1109、电子设备根据结构信息,确定电子邮件的消息体中各个对象的对象标识。
S1110、若电子邮件的消息体中的第一对象的信息下载失败,电子设备向服务器发送第二请求;第二请求包括邮件标识和第一对象的对象标识,第二请求用于请求获取第一对象的信息。
其中,第一对象为电子邮件的消息体中的任意一个对象。
S1111、服务器接收第二请求。
S1112、服务器响应于第二请求,向电子设备发送第二响应。
服务器响应于第二请求,生成包括第一对象的信息的第二响应;然后向电子设备发送第二响应。
S1113、电子设备接收第二响应,从第二响应中提取第一对象的信息。
S1114、若从第二响应中提取第一对象的信息失败,电子设备发出第二提示信息。
S1115、电子设备响应于用户输入的第二操作,重新向服务器发送第三请求;第二操作用于指示电子设备重新下载第一对象的信息,第三请求用于请求获取第一对象的信息。
S1116、服务器接收第三请求。
S1117、服务器响应于第三请求,向电子设备发送第三响应。
S1118、电子设备接收第三响应,从第三响应中提取第一对象的信息。
可以理解的是,上述方法可以由电子邮件的同步装置实现。电子邮件的同步装置为了实现上述功能,其包含了执行各个功能相应的硬件结构和/或软件模块。本领域技术人员应该很容易意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,本申请实施例能够以硬件或硬件和计算机软件的结合形式来实现。某个功能究竟以硬件还是计算机软件驱动硬件的方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请实施例的范围。
本申请实施例可以根据上述方法示例对上述电子邮件的同步装置等进行功能模块的划分,例如,可以对应各个功能划分各个功能模块,也可以将两个或两个以上的功能集成在一个处理模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。需要说明的是,本申请实施例中对模块的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。
在采用对应各个功能划分各个功能模块的情况下,图12示出了上述实施例中所涉及的电子设备的一种可能的结构示意图,该电子设备1200安装有邮件客户端,该电子设备1200包括:信息处理模块1201、发送模块1202和接收模块1203。信息处理模块1201,用于获取邮件客户端待同步的电子邮件的邮件标识;发送模块1202,用于向服务器发送包括邮件标识的第一请求;接收模块1203,用于接收来自服务器的第一响应;信息处理模块1201,还用于从第一响应中提取电子邮件和结构信息;根据结构信息,确定消息体中各个对象的对象标识;发送模块1202,还用于若消息体中的第一对象的信息下载失败,向服务器发送第二请求;接收模块1203,还用于接收来自服务器的第二响应;信息处理模块1201,还用于从第二响应中提取第一对象的信息。
其中,第一请求用于请求获取电子邮件和电子邮件的消息体的结构信息,结构信息用于表征电子邮件的消息体的数据结构。消息体中的对象包括:电子邮件的邮件正文,或者电子邮件的邮件正文和电子邮件的附加信息;附加信息包括内嵌资源和/或附件。第二请求包括邮件标识和第一对象的对象标识,第二请求用于请求获取第一对象的信息。
在一种可能的实施方式中,信息处理模块1201,还用于若第一对象的信息下载失败,发出第一提示信息;发送模块1202,具体用于响应于用户输入的第一操作,向服务器发送第二请求。其中,第一提示信息用于指示第一对象的信息下载失败,第一提示信息还用于请求用户确认是否重新下载第一对象的信息。第一操作用于指示电子设备重新下载第一对象的信息。
另一种可能的实施方式中,信息处理模块1201,还用于若从第二响应中提取第一对象的信息失败,发出第二提示信息;发送模块1202,还用于响应于用户输入的第二操作,重新向服务器发送第三请求;接收模块1203,还用于接收第三响应;信息处理模块1201,还用于从第三响应中提取第一对象的信息。其中,第二提示信息用于指示第一对象的信息下载失败,第二提示信息还用于请求用户确认是否重新下载第一对象的信息;第二操作用于指示电子设备重新下载第一对象的信息,第三请求用于请求获取第一对象的信息。
另一种可能的实施方式中,结构信息用于表征电子邮件的消息体的数据结构,数据结构用于表征各个对象在消息体中的先后顺序。信息处理模块1201,具体用于电子设备根据各个对象在消息体中的先后顺序,确定消息体中各个对象的对象标识。
在采用集成的单元的情况下,上述发送模块1202和接收模块1203可以由电子设备1200的通信模块中实现。图13示出了上述实施例中所涉及的电子设备的另一种可能的结构示意图。该电子设备1300包括:处理模块1301、存储模块1302和通信模块1303。
该处理模块1301用于对电子设备1300进行控制管理。该存储模块1302,用于保存电子设备1300的程序代码和数据。通信模块1303用于与其他设备通信。如通信模块1303用于接收或者向其他设备发送的数据。
其中,处理模块1301可以是处理器或控制器,例如可以是CPU,通用处理器,DSP,ASIC,FPGA或者其他可编程逻辑器件、晶体管逻辑器件、硬件部件或者其任意组合。其可以实现或执行结合本申请公开内容所描述的各种示例性的逻辑方框,模块和电路。所述处理器也可以是实现计算功能的组合,例如包含一个或多个微处理器组合,DSP和微处理器的组合等等。通信模块1303可以是收发器、收发电路或通信接口等。存储模块1302可以是存储器。上述处理器、通信接口和存储器可以通过总线耦合在一起。
本申请实施例还提供一种计算机可读存储介质,该计算机可读存储介质包括计算机指令,当计算机指令在上述电子设备上运行时,使得上述电子设备执行上述方法实施例中的各个功能或者步骤。例如,该计算机可读存储介质可以是只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、只读光盘(Compact Disc Read-Only Memory,CD-ROM)、磁带、软盘和光数据存储设备等。
本申请实施例还提供一种计算机程序产品,当计算机程序产品在上述电子设备上运行时,使得上述电子设备执行上述方法实施例中的各个功能或者步骤。
通过以上实施方式的描述,所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而 将上述功能分配由不同的功能模块完成,即将装置的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。
在本申请所提供的几个实施例中,应该理解到,所揭露的装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,模块或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个装置,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是一个物理单元或多个物理单元,即可以位于一个地方,或者也可以分布到多个不同地方。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个可读取存储介质中。基于这样的理解,本申请实施例的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该软件产品存储在一个存储介质中,包括若干指令用以使得一个设备(可以是单片机,芯片等)或处理器(processor)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、ROM、RAM、磁碟或者光盘等各种可以存储程序代码的介质。
以上内容,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何在本申请揭露的技术范围内的变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。

Claims (10)

  1. 一种电子邮件的同步方法,其特征在于,应用于安装有邮件客户端的电子设备,所述方法包括:
    所述电子设备获取所述邮件客户端待同步的电子邮件的邮件标识;
    所述电子设备向服务器发送包括所述邮件标识的第一请求;所述第一请求用于请求获取所述电子邮件和所述电子邮件的消息体的结构信息,所述结构信息用于表征所述电子邮件的消息体的数据结构;
    所述电子设备接收来自所述服务器的第一响应,从所述第一响应中提取所述电子邮件和所述结构信息;
    所述电子设备根据所述结构信息,确定所述消息体中各个对象的对象标识;其中,所述消息体中的对象包括:所述电子邮件的邮件正文,或者所述电子邮件的邮件正文和所述电子邮件的附加信息;所述附加信息包括内嵌资源和/或附件;
    若所述消息体中的第一对象的信息下载失败,所述电子设备向所述服务器发送第二请求;所述第二请求包括所述邮件标识和所述第一对象的对象标识,所述第二请求用于请求获取所述第一对象的信息;
    所述电子设备接收来自所述服务器的第二响应,从所述第二响应中提取所述第一对象的信息。
  2. 根据权利要求1所述的方法,其特征在于,所述若所述消息体中的第一对象的信息下载失败,所述电子设备向所述服务器发送第二请求,包括:
    若所述第一对象的信息下载失败,所述电子设备发出第一提示信息;所述第一提示信息用于指示所述第一对象的信息下载失败,所述第一提示信息还用于请求用户确认是否重新下载所述第一对象的信息;
    所述电子设备响应于用户输入的第一操作,向所述服务器发送所述第二请求;所述第一操作用于指示所述电子设备重新下载所述第一对象的信息。
  3. 根据权利要求1所述的方法,其特征在于,在所述电子设备接收来自所述服务器的第二响应,从所述第二响应中提取所述第一对象的信息之后,所述方法还包括:
    若从所述第二响应中提取所述第一对象的信息失败,所述电子设备发出第二提示信息;所述第二提示信息用于指示所述第一对象的信息下载失败,所述第二提示信息还用于请求用户确认是否重新下载所述第一对象的信息;
    所述电子设备响应于用户输入的第二操作,重新向所述服务器发送第三请求;所述第二操作用于指示所述电子设备重新下载所述第一对象的信息,所述第三请求用于请求获取所述第一对象的信息;
    所述电子设备接收来自所述服务器的第三响应,从所述第三响应中提取所述第一对象的信息。
  4. 根据权利要求1-3中任一项所述的方法,其特征在于,所述结构信息用于表征所述电子邮件的消息体的数据结构,所述数据结构用于表征所述各个对象在所述消息体中的先后顺序;
    所述电子设备根据所述结构信息,确定所述消息体中各个对象的对象标识,包括:
    所述电子设备根据所述各个对象在所述消息体中的先后顺序,确定所述消息体中 各个对象的对象标识。
  5. 一种电子设备,其特征在于,所述电子设备安装有邮件客户端,所述电子设备包括:
    信息处理模块,用于获取所述邮件客户端待同步的电子邮件的邮件标识;
    发送模块,用于向服务器发送包括所述邮件标识的第一请求;所述第一请求用于请求获取所述电子邮件和所述电子邮件的消息体的结构信息,所述结构信息用于表征所述电子邮件的消息体的数据结构;
    接收模块,用于接收来自所述服务器的第一响应;
    所述信息处理模块,还用于从所述第一响应中提取所述电子邮件和所述结构信息;根据所述结构信息,确定所述消息体中各个对象的对象标识;其中,所述消息体中的对象包括:所述电子邮件的邮件正文,或者所述电子邮件的邮件正文和所述电子邮件的附加信息;所述附加信息包括内嵌资源和/或附件;
    所述发送模块,还用于若所述消息体中的第一对象的信息下载失败,向所述服务器发送第二请求;所述第二请求包括所述邮件标识和所述第一对象的对象标识,所述第二请求用于请求获取所述第一对象的信息;
    所述接收模块,还用于接收来自所述服务器的第二响应;
    所述信息处理模块,还用于从所述第二响应中提取所述第一对象的信息。
  6. 根据权利要求5所述的电子设备,其特征在于,
    所述信息处理模块,还用于若所述第一对象的信息下载失败,发出第一提示信息;所述第一提示信息用于指示所述第一对象的信息下载失败,所述第一提示信息还用于请求用户确认是否重新下载所述第一对象的信息;
    所述发送模块,具体用于响应于用户输入的第一操作,向所述服务器发送所述第二请求;所述第一操作用于指示所述电子设备重新下载所述第一对象的信息。
  7. 根据权利要求5所述的电子设备,其特征在于,
    所述信息处理模块,还用于若从所述第二响应中提取所述第一对象的信息失败,发出第二提示信息;
    所述发送模块,还用于响应于用户输入的第二操作,重新向所述服务器发送第三请求;
    所述接收模块,还用于接收来自所述服务器的第三响应;
    所述信息处理模块,还用于从所述第三响应中提取所述第一对象的信息;
    其中,所述第二提示信息用于指示所述第一对象的信息下载失败,所述第二提示信息还用于请求用户确认是否重新下载所述第一对象的信息;所述第二操作用于指示所述电子设备重新下载所述第一对象的信息,所述第三请求用于请求获取所述第一对象的信息。
  8. 根据权利要求5-7中任一项所述的电子设备,其特征在于,所述结构信息用于表征所述电子邮件的消息体的数据结构,所述数据结构用于表征所述各个对象在所述消息体中的先后顺序;
    所述信息处理模块,具体用于根据所述各个对象在所述消息体中的先后顺序,确定所述消息体中各个对象的对象标识。
  9. 一种电子设备,其特征在于,包括:处理器和用于存储所述处理器可执行指令的存储器;
    其中,所述处理器被配置为执行所述指令,使得所述电子设备执行如权利要求1-4中任一项所述的电子邮件的同步方法。
  10. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质上存储有计算机指令,当所述计算机指令在电子设备上运行时,使得所述电子设备执行实现如权利要求1-4中任一项所述的电子邮件的同步方法。
PCT/CN2021/113879 2020-08-25 2021-08-20 一种电子邮件的同步方法及电子设备 WO2022042451A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
EP21860288.6A EP4191970A4 (en) 2020-08-25 2021-08-20 METHOD FOR SYNCHRONIZING ELECTRONIC MAIL AND ELECTRONIC DEVICE
US18/042,551 US12003475B2 (en) 2020-08-25 2021-08-20 Email synchronization method and electronic device

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010865744.5A CN114124925B (zh) 2020-08-25 2020-08-25 一种电子邮件的同步方法及电子设备
CN202010865744.5 2020-08-25

Publications (1)

Publication Number Publication Date
WO2022042451A1 true WO2022042451A1 (zh) 2022-03-03

Family

ID=80352624

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/113879 WO2022042451A1 (zh) 2020-08-25 2021-08-20 一种电子邮件的同步方法及电子设备

Country Status (4)

Country Link
US (1) US12003475B2 (zh)
EP (1) EP4191970A4 (zh)
CN (1) CN114124925B (zh)
WO (1) WO2022042451A1 (zh)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114500444B (zh) * 2022-03-18 2024-02-23 网易(杭州)网络有限公司 邮件数据处理方法、装置及电子设备
CN115378904B (zh) * 2022-10-26 2023-03-10 泰豪信息技术有限公司 一种邮件回执发送方法、系统、存储介质及设备

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1518304A (zh) * 2003-01-03 2004-08-04 在服务器和用户之间形成数据流的方法
CN1522013A (zh) * 2003-01-03 2004-08-18 用于服务器和客户机间改进的同步的系统和方法
CN101098313A (zh) * 2006-06-30 2008-01-02 华为技术有限公司 一种邮件转发方法及系统
CN101106537A (zh) * 2006-07-14 2008-01-16 华为技术有限公司 一种选择性下载电子邮件的方法
CN101989335A (zh) * 2009-07-31 2011-03-23 国际商业机器公司 电子邮件附件的处理方法和系统
CN103200022A (zh) * 2012-01-09 2013-07-10 华为终端有限公司 一种数据下载异常处理方法、设备及系统
CN104182416A (zh) * 2013-05-27 2014-12-03 鸿富锦精密工业(深圳)有限公司 文件下载系统及方法
CN106549984A (zh) * 2015-09-16 2017-03-29 阿里巴巴集团控股有限公司 一种业务处理方法和装置

Family Cites Families (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6052735A (en) * 1997-10-24 2000-04-18 Microsoft Corporation Electronic mail object synchronization between a desktop computer and mobile device
US7290034B2 (en) * 2003-09-18 2007-10-30 Vulcan Portals Inc. Method and system for polling a server for new emails, downloading the new emails in a background process, and caching the downloaded emails for access by an email application of an electronic device, such as a portable computer
US7536440B2 (en) * 2003-09-18 2009-05-19 Vulcan Portals Inc. Method and system for email synchronization for an electronic device
US20060047756A1 (en) * 2004-06-16 2006-03-02 Jussi Piispanen Method and apparatus for indicating truncated email information in email synchronization
US20070094334A1 (en) * 2005-10-21 2007-04-26 Microsoft Corporation Service/client synchronization
CN101009667A (zh) * 2006-01-28 2007-08-01 朗迅科技公司 电子邮件附件可选择的下载
CN100450108C (zh) 2006-03-23 2009-01-07 华为技术有限公司 一种采用数据同步处理电子邮件的系统、装置及方法
CN101272354B (zh) * 2007-03-20 2012-05-02 重庆优腾信息技术有限公司 一种文件传输方法、装置和系统
US9166941B2 (en) * 2007-04-24 2015-10-20 Microsoft Technology Licensing, Llc Synchronizing email messages between external and local email servers and/or a wireless device
US20090228716A1 (en) * 2008-02-08 2009-09-10 Pado Metawsre Ab Method and system for distributed coordination of access to digital files
US9998434B2 (en) * 2015-01-26 2018-06-12 Listat Ltd. Secure dynamic communication network and protocol
CN104601724B (zh) * 2015-02-03 2018-01-23 北京金和软件股份有限公司 上传和下载文件的方法及系统
US10277549B2 (en) * 2015-06-04 2019-04-30 Apple Inc. Prioritized email synchronization with server
US10033702B2 (en) * 2015-08-05 2018-07-24 Intralinks, Inc. Systems and methods of secure data exchange
CN105898717A (zh) * 2015-10-27 2016-08-24 乐视致新电子科技(天津)有限公司 移动终端的邮件附件的下载方法
US10966104B2 (en) * 2017-05-17 2021-03-30 Huawei Technologies Co., Ltd. Email synchronization method and device
WO2019071617A1 (zh) * 2017-10-09 2019-04-18 华为技术有限公司 一种电子邮件的同步方法及终端
CN108418746B (zh) * 2018-02-13 2020-06-12 论客科技(广州)有限公司 一种邮件同步方法、装置与计算机可读存储介质

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1518304A (zh) * 2003-01-03 2004-08-04 在服务器和用户之间形成数据流的方法
CN1522013A (zh) * 2003-01-03 2004-08-18 用于服务器和客户机间改进的同步的系统和方法
US20120209928A1 (en) * 2003-01-03 2012-08-16 Microsoft Corporation System and method for improved synchronization between a server and a client
CN101098313A (zh) * 2006-06-30 2008-01-02 华为技术有限公司 一种邮件转发方法及系统
CN101106537A (zh) * 2006-07-14 2008-01-16 华为技术有限公司 一种选择性下载电子邮件的方法
CN101989335A (zh) * 2009-07-31 2011-03-23 国际商业机器公司 电子邮件附件的处理方法和系统
CN103200022A (zh) * 2012-01-09 2013-07-10 华为终端有限公司 一种数据下载异常处理方法、设备及系统
CN104182416A (zh) * 2013-05-27 2014-12-03 鸿富锦精密工业(深圳)有限公司 文件下载系统及方法
CN106549984A (zh) * 2015-09-16 2017-03-29 阿里巴巴集团控股有限公司 一种业务处理方法和装置

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP4191970A4

Also Published As

Publication number Publication date
US20230344793A1 (en) 2023-10-26
EP4191970A1 (en) 2023-06-07
EP4191970A4 (en) 2024-01-24
CN114124925B (zh) 2023-05-12
US12003475B2 (en) 2024-06-04
CN114124925A (zh) 2022-03-01

Similar Documents

Publication Publication Date Title
WO2022042451A1 (zh) 一种电子邮件的同步方法及电子设备
CN105991354B (zh) 用于发送集成消息的方法和装置
US7779077B2 (en) File transmission method in instant messaging service and mobile communications terminal for supporting the same
JP4438981B2 (ja) ネットワーク上でドキュメントインクルージョンオペレーションを実行するための方法、システムおよびコンピュータ可読記録媒体
EP2873204B1 (en) Method and system for delivering reminder information
US20110231478A1 (en) System, Server, and Mobile Device for Content Provider Website Interaction and Method Therefore
EP3188437B1 (en) Method and system for implementing information sharing
JP4546801B2 (ja) 同期通知をクライアント装置に提供する方法
KR20160045635A (ko) 통신용 논리 채널을 이용한 전자 장치
WO2008040224A1 (fr) Procédé, système et appareil de synchronisation de données
KR101595762B1 (ko) 휴대 단말기의 원격 제어 방법 및 이를 위한 시스템
US20070168535A1 (en) System and method for data communication between devices
US20090030917A1 (en) Multimedia messaging service-based database synchronization
WO2017092594A1 (zh) 一种信息处理方法及装置
WO2013070811A1 (en) Geo-fence based on geo-tagged media
CA2782462C (en) Reliable delivery of content to a push-state aware client device
US20120014321A1 (en) Messaging activity feed
JP2013504806A (ja) ファイルディレクトリに基づいたファイルの転送のための方法、装置、およびシステム
KR20150084284A (ko) 전자 장치의 상태 메시지 서비스 제공 방법 및 그 전자 장치
TW201104484A (en) System and method for converting cross-platform information
CN101917473A (zh) 基于地图的通话信息管理系统及方法
CN103944806A (zh) 一种基于微信平台的数据传输方法和系统
KR20110074244A (ko) 통신 시스템에서 인스턴트 메시징 클라이언트 간 데이터 동기화 장치 및 방법
CN114202332A (zh) 一种数字货币钱包管理方法、装置和系统
WO2013026371A1 (zh) 消息展示方法、系统、终端和服务器

Legal Events

Date Code Title Description
ENP Entry into the national phase

Ref document number: 2021860288

Country of ref document: EP

Effective date: 20230302

NENP Non-entry into the national phase

Ref country code: DE

121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21860288

Country of ref document: EP

Kind code of ref document: A1