[go: up one dir, main page]

CN101163114A - Method, system and device for notifying mobile mail state - Google Patents

Method, system and device for notifying mobile mail state Download PDF

Info

Publication number
CN101163114A
CN101163114A CNA2006101407947A CN200610140794A CN101163114A CN 101163114 A CN101163114 A CN 101163114A CN A2006101407947 A CNA2006101407947 A CN A2006101407947A CN 200610140794 A CN200610140794 A CN 200610140794A CN 101163114 A CN101163114 A CN 101163114A
Authority
CN
China
Prior art keywords
mail
notification
mobile
status
client
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CNA2006101407947A
Other languages
Chinese (zh)
Inventor
吴凌燕
梁刚
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CNA2006101407947A priority Critical patent/CN101163114A/en
Publication of CN101163114A publication Critical patent/CN101163114A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Information Transfer Between Computers (AREA)

Abstract

The invention discloses a method, which can inform of the state of a mobile mail. The invention comprises following steps: a mobile mail client end establishes a connection with a mail server. When the event that the states of a mail in an unselected mail file changing is detected, the mail server produces a notification, which comprises the event that the state of the mail changing. And the notification is sent to the mobile mail client end by the mail server. The invention also discloses a mobile mail state notification system, the mail server and the mobile mail client end. With the technical proposal of the invention, the user can get all the detection and notification about the states of the mails in needed simultaneous mail file without establishing a dialogue with every mail. The mobile mail client end can update the state of the mail according to the notification, so the invention can improve the simultaneous efficiencies of the mobile mail client end and the mail server, reduce the operations of the user and improve the experiences of the user.

Description

通知移动邮件状态的方法、系统和装置 Method, system and device for notifying mobile mail status

技术领域 technical field

本发明涉及移动通信网络技术领域,特别是指一种通知移动邮件状态的方法、一种通知移动邮件状态的系统、一种邮件服务器和一种移动邮件客户端。The invention relates to the technical field of mobile communication networks, in particular to a method for notifying the state of mobile mail, a system for notifying the state of mobile mail, a mail server and a mobile mail client.

背景技术 Background technique

随着移动通信技术的发展,因特网(Internet)应用被扩展到移动应用领域。电子邮件在因特网应用中占有重要的地位,移动邮件业务是对传统互联网电子邮件的扩展,支持利用移动终端设备编辑和收发电子邮件,并可以与因特网的电子邮件业务进行无缝融合。With the development of mobile communication technology, Internet (Internet) applications are extended to the field of mobile applications. E-mail plays an important role in Internet applications. The mobile e-mail service is an extension of traditional Internet e-mail. It supports editing and sending and receiving e-mails using mobile terminal equipment, and can seamlessly integrate with Internet e-mail services.

为实现邮件服务器与移动邮件客户端的同步,当邮件服务器中用户邮箱中发生了如新邮件到达、邮件状态改变等邮件事件后,邮件服务器将邮件事件通知给移动邮件客户端。通知方式有两种:带内通知和带外通知。当移动邮件客户端与邮件服务器之间没有连接时,可以采用如短信通知等的带外通知方式;当移动邮件客户端与邮件服务器之间建立连接时,可以采用带内通知方式,该方式可以通过邮件服务器提供的主动响应(unsolicitd response)将邮件事件直接推送给移动邮件客户端。In order to realize the synchronization between the mail server and the mobile mail client, when mail events such as new mail arrival and mail status change occur in the user mailbox in the mail server, the mail server will notify the mobile mail client of the mail event. There are two notification methods: in-band notification and out-of-band notification. When there is no connection between the mobile mail client and the mail server, an out-of-band notification method such as SMS notification can be used; when a connection is established between the mobile mail client and the mail server, the in-band notification method can be used. Push email events directly to mobile email clients through the unsolicited response provided by the email server.

在带内通知方式中,移动邮件客户端与邮件服务器建立连接并选中一个邮件夹进行操作后,邮件服务器检测当前选中的邮件夹中的新邮件事件和邮件状态变化事件,并检测未选中的邮件夹中的新邮件事件,如检测到上述邮件事件,则根据因特网消息访问协议(IMAP)通过IMAP响应将检测到的邮件事件通知给移动邮件客户端。移动邮件客户端接收到邮件事件后,执行相应操作,如下载新邮件,更新对应的邮件状态等,实现邮件同步。In the in-band notification method, after the mobile mail client establishes a connection with the mail server and selects a mail folder for operation, the mail server detects new mail events and mail state change events in the currently selected mail folder, and detects unselected mail If the above-mentioned mail event is detected, the detected mail event will be notified to the mobile mail client through the IMAP response according to the Internet Message Access Protocol (IMAP). After the mobile email client receives the email event, it performs corresponding operations, such as downloading new emails, updating the corresponding email status, etc., to realize email synchronization.

在上述带内通知方式中,不能够实现未选中邮件夹中邮件状态变化事件的检测和通知,影响了移动邮件客户端与邮件服务器同步的效果。In the above-mentioned in-band notification method, detection and notification of mail status change events in unselected mail folders cannot be realized, which affects the effect of synchronization between the mobile mail client and the mail server.

发明内容 Contents of the invention

有鉴于此,本发明的主要目的在于提供一种通知移动邮件状态的方法、一种通知移动邮件状态的系统、一种邮件服务器和一种移动邮件客户端,能够提高带内通知的效果。In view of this, the main purpose of the present invention is to provide a method for notifying the state of mobile mail, a system for notifying the state of mobile mail, a mail server and a mobile mail client, which can improve the effect of in-band notification.

为实现上述目的的第一个方面,本发明提供了一种通知移动邮件状态的方法,该方法包括:In order to achieve the first aspect of the above object, the present invention provides a method for notifying the state of mobile mail, the method includes:

移动邮件客户端与邮件服务器建立连接,邮件服务器检测到未选中邮件夹中的邮件状态变化事件后,产生包括该邮件状态变化事件的通知,并将该通知发送到移动邮件客户端。The mobile mail client establishes a connection with the mail server, and after the mail server detects the mail state change event in the unselected mail folder, it generates a notification including the mail state change event, and sends the notification to the mobile mail client.

较佳地,该方法进一步包括:Preferably, the method further comprises:

所述移动邮件客户端接收到所述通知后,根据通知中的事件更新自身中对应邮件的状态。After receiving the notification, the mobile email client updates the state of the corresponding email in itself according to the event in the notification.

较佳地,所述通知中包括:邮件夹名称、邮件标识和邮件状态。Preferably, the notification includes: mail folder name, mail identifier and mail status.

所述通知可以为状态响应。The notification may be a status response.

所述通知也可以为获取响应。The notification can also be a get response.

所述通知中可以包括同一邮件夹中的一个或多个邮件状态变化事件,则所述邮件标识和邮件状态对应包括一组或多组。The notification may include one or more mail state change events in the same mail folder, and the mail identifier and mail state correspondingly include one or more groups.

较佳地,所述移动邮件客户端根据通知中的事件更新自身中对应邮件的状态包括:Preferably, the mobile email client updating the state of the corresponding email in itself according to the event in the notification includes:

移动邮件客户端根据通知中的邮件夹名称和邮件标识定位到自身中存储的邮件,并将该邮件的状态更新为所述通知中包括的邮件状态。The mobile mail client locates the mail stored in itself according to the mail folder name and mail identifier in the notification, and updates the status of the mail to the mail status included in the notification.

为实现上述目的的第二个方面,本发明提供了一种通知移动邮件状态的系统,包括:邮件服务器和移动邮件客户端;In order to achieve the second aspect of the above object, the present invention provides a system for notifying the state of mobile mail, including: a mail server and a mobile mail client;

邮件服务器用于与所述邮件客户端建立连接,并检测未选中邮件夹中的邮件状态变化事件,产生包括检测到的所述邮件状态变化事件的通知,以及将该通知发送给所述移动邮件客户端;The mail server is used to establish a connection with the mail client, and detect the mail state change event in the unselected mail folder, generate a notification including the detected mail state change event, and send the notification to the mobile mail client;

移动邮件客户端用于与所述邮件服务器建立连接,接收来自邮件服务器的包括未选中邮件夹中邮件变化事件的通知,或进一步根据该通知中的事件更新自身中对应邮件的状态。The mobile mail client is used to establish a connection with the mail server, receive a notification from the mail server including the change event of the mail in the unselected mail folder, or further update the state of the corresponding mail in itself according to the event in the notification.

为实现上述目的的第三个方面,本发明提供了一种邮件服务器,包括:邮件存储库、通知产生模块和通知发送模块;In order to achieve the third aspect of the above object, the present invention provides a mail server, including: a mail storage library, a notification generating module and a notification sending module;

邮件存储库用于存储用户邮件;The mail repository is used to store user mail;

通知产生模块用于检测未选中邮件夹中的邮件状态变化事件,产生包括检测到的所述邮件状态变化事件的通知,以及将该通知发送给通知发送模块;The notification generation module is used to detect the mail state change event in the unselected mail folder, generate a notification including the detected mail state change event, and send the notification to the notification sending module;

通知发送模块用于将来自通知产生模块的通知发送到移动邮件客户端。The notification sending module is used for sending the notification from the notification generating module to the mobile mail client.

为实现上述目的的第四个方面,本发明提供了一种移动邮件客户端,包括:通知解析模块和邮件存储库;In order to achieve the fourth aspect of the above object, the present invention provides a mobile mail client, including: a notification parsing module and a mail storage;

通知解析模块用于接收来自邮件服务器的包括未选中邮件夹中邮件状态变化事件的通知,根据该通知更新邮件存储库中对应邮件的状态;The notification parsing module is used to receive the notification from the mail server including the status change event of the mail in the unselected mail folder, and update the status of the corresponding mail in the mail repository according to the notification;

邮件存储库用于存储用户的邮件。Mail stores are used to store users' mail.

由上述方案可以看出,本发明中,移动邮件客户端在与邮件服务器建立连接,邮件服务器检测到未选中邮件夹中的邮件状态变化事件后,产生包括该邮件状态变化事件的通知,并将该通知发送到移动邮件客户端,从而提高了带内通知的效果;As can be seen from the foregoing scheme, in the present invention, the mobile mail client establishes a connection with the mail server, and after the mail server detects the mail state change event in the unselected mail folder, it generates a notification including the mail state change event, and sends The notification is sent to the mobile mail client, which improves the effectiveness of in-band notifications;

并且,由于本发明中,无需用户与每个邮件夹建立会话即可实现所有需要同步的邮件夹中邮件状态变化事件的检测和通知,减少了用户的操作量,节约了用户的时间和精力,提高了用户体验;And, since in the present invention, the detection and notification of the mail state change event in all the mail folders that need to be synchronized can be realized without the need for the user to establish a session with each mail folder, the user's operation load is reduced, and the user's time and energy are saved. Improved user experience;

此外,本发明中通过移动邮件客户端根据接收的上述通知更新对应邮件的状态,提高了移动邮件客户端与邮件服务器的同步效果。In addition, in the present invention, the mobile mail client updates the state of the corresponding mail according to the received notification, thereby improving the synchronization effect between the mobile mail client and the mail server.

附图说明 Description of drawings

图1为本发明通知移动邮件状态的系统组成示意图;Fig. 1 is a schematic diagram of the composition of the system for notifying the state of mobile mail in the present invention;

图2为本发明通知移动邮件状态的方法总体流程图;Fig. 2 is the overall flow chart of the method for notifying the status of mobile mail in the present invention;

图3为本发明方法应用在IMAP协议中实现移动邮件客户端与服务器端同步的流程图;Fig. 3 is the flow chart that the inventive method is applied in the IMAP protocol and realizes the synchronization of the mobile mail client and the server;

图4为本发明方法中移动邮件客户端的一种处理流程图;Fig. 4 is a kind of processing flowchart of mobile mail client in the method of the present invention;

图5为本发明方法中移动邮件客户端的另一种处理流程图;Fig. 5 is another kind of processing flowchart of mobile mail client in the method of the present invention;

图6为本发明方法具体示例的流程图。Fig. 6 is a flowchart of a specific example of the method of the present invention.

具体实施方式 Detailed ways

为使本发明的目的、技术方案和优点更加清楚,下面结合附图对本发明作进一步的详细描述。In order to make the object, technical solution and advantages of the present invention clearer, the present invention will be further described in detail below in conjunction with the accompanying drawings.

本发明的主要思想是,移动邮件客户端与邮件服务器建立连接,邮件服务器检测到未选中邮件夹中的邮件状态变化事件后,产生包括该邮件状态变化事件的通知,并将该通知发送到移动邮件客户端,从而实现邮件服务器采用带内通知方式将未选中邮件夹中邮件状态变化事件通知给移动邮件客户端。The main idea of the present invention is that the mobile mail client establishes a connection with the mail server, and after the mail server detects the mail state change event in the unselected mail folder, it generates a notification including the mail state change event, and sends the notification to the mobile mail server. The mail client, so that the mail server notifies the mobile mail client of the mail status change event in the unselected mail folder by using an in-band notification method.

本发明中的未选中邮件夹为,没有通过打开文件夹命令(SELECT),或以只读方式打开文件夹命令(EXAMINE)方式打开的文件夹。The unselected mail folder in the present invention is a folder that is not opened by an open folder command (SELECT) or a read-only mode to open a folder command (EXAMINE).

本发明通知移动邮件状态的系统组成如图1所示,包括邮件服务器和移动邮件客户端。The composition of the system for notifying the state of mobile mail in the present invention is shown in FIG. 1 , including a mail server and a mobile mail client.

邮件服务器用于与移动邮件客户端建立连接,在移动邮件客户端访问邮件夹后,检测未选中邮件夹中的邮件状态变化事件,并根据检测到的邮件状态变化事件,生成包括该邮件状态变化事件的通知,发送给移动邮件客户端。此外,邮件服务器还可以检测移动邮件客户端选中的邮件夹和未选中邮件夹的新邮件事件,以及选中邮件夹中的邮件状态变化事件,并根据检测到的这些事件生成包括这些事件的通知发送到移动邮件客户端。这里的通知可以是状态响应(STATUS response)或获取响应(FETCH reponse)。The mail server is used to establish a connection with the mobile mail client. After the mobile mail client accesses the mail folder, it detects the mail status change event in the unselected mail folder, and generates a mail status change event based on the detected mail status change event. Notification of the event, sent to the mobile mail client. In addition, the mail server can also detect new mail events of selected mail folders and unselected mail folders of the mobile mail client, and mail state change events in the selected mail folders, and generate notifications including these events according to the detected events to a mobile mail client. The notification here can be a status response (STATUS response) or a get response (FETCH response).

移动邮件客户端用于与邮件服务器建立连接,接收来自邮件服务器的包括未选中邮件夹中邮件状态变化事件的通知,读取其中的事件,并根据读取的事件更新对应邮件的状态。此外,移动邮件客户端还接收来自邮件服务器的包括其他事件的通知,如包括新邮件事件或已选中邮件夹中邮件的状态变化事件,并根据该通知中的事件更新对应的邮件夹或邮件。The mobile mail client is used to establish a connection with the mail server, receive notifications from the mail server including mail state change events in unselected mail folders, read the events therein, and update the state of the corresponding mail according to the read events. In addition, the mobile mail client also receives notifications including other events from the mail server, such as new mail events or status change events of mails in selected mail folders, and updates corresponding mail folders or mails according to the events in the notification.

具体地,从图1中可以看出,上述邮件服务器中包括:邮件存储库、通知产生模块和通知发送模块。其中:Specifically, it can be seen from FIG. 1 that the above-mentioned mail server includes: a mail repository, a notification generating module and a notification sending module. in:

邮件存储库用于存储用户邮件,其中包括若干个邮件夹,移动邮件客户端与邮件服务器建立连接后,选择其中的一个邮件夹进行操作,该邮件夹处于选中状态,其他邮件夹处于未选中状态。The mail repository is used to store user mail, including several mail folders. After the mobile mail client establishes a connection with the mail server, select one of the mail folders to operate. This mail folder is selected, and other mail folders are unselected. .

通知产生模块用于检测发生的邮件事件,包括选中邮件夹和未选中邮件夹的新邮件事件、选中邮件夹和未选中邮件夹的邮件状态变化事件,并根据检测到的事件生成包括该事件的通知,并将该通知传送给通知发送模块。具体地,本发明中,通知产生模块检测到未选中邮件夹中的邮件状态变化事件后,在状态响应或获取响应中设置邮件夹名称、发生状态变化邮件的邮件标识和变化后的邮件状态,并将状态响应或获取响应传送给通知发送模块。The notification generation module is used to detect the mail event that takes place, including the new mail event of the selected mail folder and the unselected mail folder, the mail status change event of the selected mail folder and the unselected mail folder, and generates a message including the event according to the detected event notification, and transmit the notification to the notification sending module. Specifically, in the present invention, after the notification generation module detects the mail state change event in the unselected mail folder, it sets the name of the mail folder, the mail identifier of the mail with a state change, and the changed mail state in the status response or acquisition response, And transmit the status response or the acquisition response to the notification sending module.

通知发送模块用于根据来自通知产生模块的通知,如状态响应或获取响应,并将该通知发送到移动邮件客户端。The notification sending module is used for sending the notification to the mobile mail client according to the notification from the notification generating module, such as status response or acquisition response.

具体地,从图1中可以看出,上述移动邮件客户端中包括:通知解析模块和邮件存储库。其中:Specifically, it can be seen from FIG. 1 that the mobile email client includes: a notification parsing module and an email storage library. in:

通知解析模块用于接收来自邮件服务器的通知,并根据该通知定位到移动邮件客户端的邮件存储库中对应的邮件夹或邮件,进行邮件夹或邮件状态的更新,从而使移动邮件客户端中的邮件与邮件服务器中的邮件同步。具体地,当该通知为状态响应时,通知解析模块接收到包括邮件夹名称、邮件标识和邮件状态的状态响应后,根据邮件夹名称和邮件标识定位到移动邮件客户端的邮件存储库中的对应邮件,并根据状态响应中的邮件状态更新该邮件的状态;当该通知为获取响应时,如果通知解析模块接收到的获取响应包括邮件夹名称、邮件标识和邮件状态,则根据邮件夹名称和邮件标识定位到移动邮件客户端的邮件存储库中的对应邮件,并将该邮件的状态更新为获取响应中的邮件状态,如果通知解析模块接收到的获取响应不包括邮件夹名称,则按现有技术进行处理。The notification parsing module is used to receive notifications from the mail server, and locate corresponding mail folders or mails in the mail repository of the mobile mail client according to the notification, and update the status of the mail folders or mails, so that the mobile mail client Mail is synchronized with mail in the mail server. Specifically, when the notification is a status response, after receiving the status response including the name of the mail folder, the mail ID and the status of the mail, the notification parsing module locates the corresponding email address in the mail repository of the mobile mail client according to the mail folder name and the mail ID. mail, and update the status of the mail according to the status of the mail in the status response; when the notification is a get response, if the get response received by the notification parsing module includes the mail folder name, mail identifier and mail status, then according to the mail folder name and The email identifier locates the corresponding email in the email repository of the mobile email client, and updates the status of the email to the email status in the acquisition response. If the acquisition response received by the notification parsing module does not include the email folder name, then the technology is processed.

邮件存储库用于存储用户的本地邮件,这里用户的本地邮件为邮件服务器的邮件存储库中通过过滤规则过滤后的邮件。另外,本发明中所涉及的未选中邮件夹及选中邮件夹中的邮件,均指经过过滤规则过滤后的邮件。The mail repository is used to store the user's local mail, where the user's local mail is the mail filtered by the filtering rules in the mail repository of the mail server. In addition, the mails in the unselected mail folder and the selected mail folder referred to in the present invention all refer to mails filtered by filtering rules.

本发明通知移动邮件状态的方法总体流程如图2所示,包括如下步骤:The overall flow of the method for notifying the state of the mobile mail in the present invention is shown in Figure 2, including the following steps:

步骤201、移动邮件客户端与邮件服务器建立连接;Step 201, the mobile mail client establishes a connection with the mail server;

步骤202、邮件服务器检测到未选中邮件夹中的邮件状态变化事件后,产生包括该事件的通知,并将该通知发送到移动邮件客户端。Step 202: After the mail server detects the mail status change event in the unselected mail folder, it generates a notification including the event, and sends the notification to the mobile mail client.

上述通知可以是状态响应,也可以是获取响应。The notification above can be a status response or a get response.

现有的状态响应承载未选中邮件夹的相关信息,包括邮件夹名称和状态信息,其中状态信息中具体可以包括数据项:MESSAGE邮件夹中的邮件总数、RECENT邮件夹中的标示为\RECENT的邮件数、UIDNEXT可以分配给新邮件的下一个唯一标识符(UID)、UIDVALIDITY邮件夹的UID有效性标志、UNSEEN邮件夹中被标志为\UNSEEN的邮件数。The existing status response carries relevant information about the unselected mail folder, including the name of the mail folder and status information. The status information can specifically include data items: the total number of mails in the MESSAGE mail folder, the number of messages marked as \RECENT in the RECENT mail folder Number of messages, UIDNEXT The next unique identifier (UID) that can be assigned to a new message, the UID validity flag of the UIDVALIDITY mail folder, and the number of mail marked as \UNSEEN in the UNSEEN mail folder.

因此,本发明中采用状态响应承载未选中邮件夹的邮件状态变化事件时,需要对状态信息所包括的数据项进行扩展,增加可选数据项:UID邮件标识,和FLAGS邮件状态。其中,邮件标识为发生状态改变的邮件在未选中邮件夹内的唯一标识,邮件状态可以是\unseen、\seen、\delete、\Flagged等,分别表示邮件状态由seen变为unseen、由unseen变为seen、邮件被标记为delete、邮件被标记为flagged(表明邮件重要)等。Therefore, in the present invention, when the state response is used to carry the mail state change event of the unselected mail folder, the data items included in the state information need to be expanded to add optional data items: UID mail identification, and FLAGS mail state. Among them, the mail ID is the unique identification of the mail whose state has changed in the unselected mail folder, and the mail status can be \unseen, \seen, \delete, \Flagged, etc., respectively indicating that the mail status changes from seen to unseen, from unseen to It is seen, the mail is marked as delete, the mail is marked as flagged (indicating that the mail is important), etc.

例如:未选中邮件夹B中邮件标识为43的邮件状态由\unseen变为\seen且标记为\Flagged,承载该邮件状态变化事件的状态响应为:For example: the status of the mail with the ID of 43 in the unselected mail folder B changes from \unseen to \seen and is marked as \Flagged, and the status response carrying the status change event of the mail is:

S:*STATUS FolderB(UID 43FLAGS(\seen\Flagged))S: *STATUS FolderB(UID 43FLAGS(\seen\Flagged))

而现有的获取响应承载选中邮件夹的相关信息,故其中不包括邮件夹名称信息。为使获取响应承载未选中邮件夹中邮件状态变化事件,本发明在获取响应中增加邮件夹名称信息,以指明发生邮件状态变化事件的邮件夹,扩展后的获取响应的格式为:However, the existing acquisition response carries information about the selected mail folder, so the name information of the mail folder is not included. In order to make the acquisition response carry the mail state change event in the unselected mail folder, the present invention adds mail folder name information in the acquisition response to indicate the mail folder where the mail state change event occurs. The format of the expanded acquisition response is:

FETCH FolderName(message data)FETCH FolderName(message data)

其中,邮件夹名称(FolderName)可以是必选的也可以是可选的。如果为必选的,则相应获取命令(FETCH Command)也带有FolderName;如果为可选的,则无FolderName时默认为当前选中的邮件夹。另外,在通过获取响应发送未选中邮件夹中的邮件状态变化事件时,信息数据(messagedata)中包括UID和FLAGS数据项。Wherein, the mail folder name (FolderName) may be mandatory or optional. If it is mandatory, the corresponding fetch command (FETCH Command) also has FolderName; if it is optional, if there is no FolderName, it defaults to the currently selected mail folder. In addition, when the state change event of the mail in the unselected mail folder is sent by obtaining the response, the UID and FLAGS data items are included in the message data (messagedata).

例如:未选中邮件夹B中UID为43的邮件由\unseen变为\seen且标记为\Flagged,承载该邮件状态变化事件的获取响应为:For example: the mail with UID 43 in the unselected mail folder B changes from \unseen to \seen and is marked as \Flagged, and the response to get the state change event of this mail is:

S:*FETCH FolderB(UID 43FLAGS(\seen\Flagged))S: *FETCH FolderB(UID 43FLAGS(\seen\Flagged))

而选中邮件夹A中UID为23的邮件被标记为删除,FolderName为必选项时,承载该邮件状态变化事件的获取响应为:And the mail with UID 23 in mail folder A is marked as deleted, and when FolderName is a mandatory option, the response to obtain the state change event of the mail is as follows:

S:*FETCH FolderA(UID 23FLAGS(\deleted))S: *FETCH FolderA(UID 23FLAGS(\deleted))

FolderName为可选项时,承载该邮件状态变化事件的获取响应为:When FolderName is optional, the response to get the email status change event is:

S:*FETCH(UID 23FLAGS(\deleted))S: *FETCH(UID 23FLAGS(\deleted))

本发明方法应用在IMAP协议中,实现移动邮件客户端与服务器端同步的流程如图3所示,其中,移动邮件客户端与邮件服务器建立连接并进行邮件处理时,包括如下步骤:The method of the present invention is applied in the IMAP protocol, and the process of realizing the synchronization of the mobile mail client and the server is as shown in Figure 3, wherein, when the mobile mail client establishes a connection with the mail server and performs mail processing, the following steps are included:

步骤301、移动邮件客户端向邮件服务器发送空闲命令(A005 IDLE),表明移动邮件客户端以后时间内可以接收主动响应(unsolicited response)。本步骤以及后续的步骤306和步骤307中所涉及的命令均为IMAP协议中的标准命令,这里不再详述。Step 301, the mobile mail client sends an idle command (A005 IDLE) to the mail server, indicating that the mobile mail client can receive an unsolicited response (unsolicited response) in the future. The commands involved in this step and subsequent steps 306 and 307 are all standard commands in the IMAP protocol, and will not be described in detail here.

步骤302、邮件服务器中的通知产生模块检测未选中邮件夹中的邮件状态变化事件,并在检测到未选中邮件夹中的邮件状态变化事件后,产生相应的主动响应,该响应中携带邮件夹名称、邮件的UID和发生的事件,即邮件当前的状态,并发送给通知发送模块。Step 302, the notification generation module in the mail server detects the mail state change event in the unselected mail folder, and after detecting the mail state change event in the unselected mail folder, generates a corresponding active response, which carries the mail folder The name, the UID of the mail, and the event that occurs, that is, the current state of the mail, are sent to the notification sending module.

步骤303、通知发送模块向移动邮件客户端发送携带该事件的主动响应。Step 303, the notification sending module sends an active response carrying the event to the mobile mail client.

步骤304、移动邮件客户端的通知解析模块收到主动响应后解析出响应类型、定位到指定的邮件并进行状态同步。Step 304: After receiving the active response, the notification parsing module of the mobile email client parses out the response type, locates the specified email, and performs state synchronization.

如图4所示,当主动响应为状态响应时,步骤304具体包括:在步骤401,移动邮件客户端的通知解析模块收到该状态响应后,判断出不是当前正在操作的邮件夹中的邮件状态变化事件;则在步骤402,根据邮件夹名称和邮件的UID定位到邮件存储库中对应的邮件;然后在步骤403,根据状态响应中携带的邮件状态数据项更新对应邮件的状态。As shown in Figure 4, when the active response is a status response, step 304 specifically includes: in step 401, after the notification parsing module of the mobile mail client receives the status response, it is judged that it is not the status of the mail in the currently operating mail folder change event; then in step 402, locate the corresponding mail in the mail repository according to the mail folder name and the UID of the mail; then in step 403, update the status of the corresponding mail according to the mail status data item carried in the status response.

当主动响应为获取响应时,如果获取响应中的邮件夹名称为可选项,则如图5所示,步骤304具体包括:在步骤501,移动邮件客户端的通知解析模块收到获取响应后,判断是否包括邮件夹名称,如果判断出没有包括邮件夹名称,则确定出该获取响应携带的是选中邮件夹中的邮件相关事件,执行现有的处理流程;如果判断出包括邮件夹名称,则在步骤502,根据邮件夹名称和邮件UID定位到邮件存储库中对应的邮件,然后在步骤503,根据获取响应中携带的邮件状态数据项更新对应邮件的状态。When the active response is an acquisition response, if the mail folder name in the acquisition response is optional, then as shown in Figure 5, step 304 specifically includes: in step 501, after the notification analysis module of the mobile mail client receives the acquisition response, it determines Whether to include the name of the mail folder, if it is judged that the name of the mail folder is not included, it is determined that the acquisition response carries the mail-related event in the selected mail folder, and the existing processing flow is executed; if it is judged that the name of the mail folder is included, then in Step 502, locate the corresponding mail in the mail storage according to the mail folder name and mail UID, and then in step 503, update the status of the corresponding mail according to the mail status data item carried in the acquisition response.

如果获取响应中的邮件夹名称为必选项,则移动邮件客户端的通知解析模块收到获取响应后,直接根据邮件夹名称和邮件UID定位到邮件存储库中对应的邮件,然后根据获取响应中携带的邮件状态数据项更新对应邮件的状态。If the email folder name in the response is required, the notification parsing module of the mobile email client will locate the corresponding email in the email repository directly according to the email folder name and email UID after receiving the response, and then according to the information carried in the response The mail status data item of the update corresponding mail status.

另外,在图4和图5的流程中,通知解析模块根据状态响应或获取响应中的邮件夹名称和邮件UID定位邮件存储库中的邮件时,如果邮件存储库中不存在对应的邮件夹,则可以根据用户设置丢弃该响应,或创建对应的邮件夹并下载邮件;如果邮件存储库中不存在对应的邮件,则可以根据用户设置丢弃该响应,或下载该邮件。In addition, in the processes of Fig. 4 and Fig. 5, when the notification analysis module locates the mail in the mail store according to the mail folder name and mail UID in the status response or the acquisition response, if there is no corresponding mail folder in the mail store, Then the response can be discarded according to the user settings, or a corresponding mail folder can be created and the mail can be downloaded; if the corresponding mail does not exist in the mail store, the response can be discarded according to the user settings, or the mail can be downloaded.

步骤305、邮件服务器中的通知检测模块检测其他的事件,并在检测到事件后通过主动响应向移动邮件客户端推送发生的事件。Step 305, the notification detection module in the mail server detects other events, and pushes the occurred event to the mobile mail client through active response after detecting the event.

这里,如果邮件服务器还除了步骤302中的邮件状态变化事件外,还检测到了其他的事件,如其他的未选中邮件夹或已选中邮件夹中的邮件状态变化事件,或未选中邮件夹或已选中邮件夹中的新邮件事件等,均产生对应的主动响应,并将发生的事件推送到移动邮件客户端。本步骤与上述步骤302至步骤304之间无一定的先后顺序关系,具体实现过程中可能先执行本步骤而后执行步骤302、步骤303或步骤304,也可能先执行步骤302或步骤303或步骤304,而再执行本步骤。Here, if the mail server also detects other events in addition to the mail state change event in step 302, such as other unselected mail folders or mail state change events in selected mail folders, or unselected mail folders or selected mail folders Select new mail events in the mail folder, etc., to generate corresponding active responses, and push the events to the mobile mail client. There is no certain order relationship between this step and the above steps 302 to 304. In the specific implementation process, this step may be executed first and then step 302, step 303 or step 304, or step 302 or step 303 or step 304 may be executed first , and then perform this step.

步骤306、移动邮件客户端向邮件服务器发送完成(DONE)命令,以结束空闲(IDLE)状态。Step 306, the mobile mail client sends a DONE command to the mail server to end the idle (IDLE) state.

步骤307、邮件服务器收到DONE命令后,回复IDLE响应(A005OKIDLE teminated),此后邮件服务器不再向移动邮件客户端发送主动响应。Step 307, after receiving the DONE command, the mail server replies with an IDLE response (A005OKIDLE teminated), after which the mail server no longer sends an active response to the mobile mail client.

以下再通过一个具体示例说明上述流程,假设邮件服务器邮件存储库存储的用户邮件夹包括:邮件夹A、邮件夹B、邮件夹C......,其中邮件夹B自上次同步后发生的事件为:UID为41的邮件状态由\seen变为\unseen,如有些用户会将还没处理完的邮件重新设置为\unseen状态,以提醒自己该邮件还需要处理;UID为43的邮件的状态由\unseen变为\seen且标记为\Flagged;UID为56的邮件被标为\delete。Let’s use a specific example to illustrate the above process, assuming that the user mail folders stored in the mail server mail repository include: mail folder A, mail folder B, mail folder C..., where mail folder B has been synchronized since the last time The events that occurred are: the status of the email with UID 41 changed from \seen to \unseen, for example, some users will reset the unprocessed email to the \unseen status to remind themselves that the email still needs to be processed; the email with UID 43 The status of the message changes from \unseen to \seen and is marked as \Flagged; the message with UID 56 is marked as \delete.

本示例中,如图6所示,用户通过移动邮件客户端与邮件服务器建立连接并选中邮件夹A进行操作,并在移动邮件客户端向邮件服务器发送A005IDLE命令后,邮件服务器将邮件夹B发生的邮件状态变化事件通知给移动邮件客户端,通过向移动邮件客户端发送以下状态响应实现:In this example, as shown in Figure 6, the user establishes a connection with the mail server through the mobile mail client and selects mail folder A for operation, and after the mobile mail client sends the A005IDLE command to the mail server, the mail server will send mail folder B to Notify the mobile email client of the email status change event, by sending the following status response to the mobile email client:

S:*STATUS FolderB(UID 41FLAGS(\unseen))S: *STATUS FolderB(UID 41FLAGS(\unseen))

S:*STATUS FolderB(UID 43FLAGS(\seen\Flagged))S: *STATUS FolderB(UID 43FLAGS(\seen\Flagged))

S:*STATUS FolderB(UID 56FLAGS(\delete))S: *STATUS FolderB(UID 56FLAGS(\delete))

当然,也可以通过一个状态响应实现上述三个状态响应的功能,则该状态响应为:Of course, the functions of the above three status responses can also be realized through a status response, then the status response is:

S:*STATUS FolderB((UID 41 FLAGS(\unseen)),(UID 43 FLAGS(\seen\Flagged)),(UID 56 FLAGS(\delete)))S: *STATUS FolderB((UID 41 FLAGS(\unseen)), (UID 43 FLAGS(\seen\Flagged)), (UID 56 FLAGS(\delete)))

此后,移动邮件客户端收到上述状态响应后,按照状态响应中携带的信息分别将本地邮件夹B中UID为41、43、56的邮件置为相应的状态。Thereafter, after receiving the above status response, the mobile mail client sets the mails with UIDs 41, 43, and 56 in the local mail folder B to the corresponding status according to the information carried in the status response.

再假设,上述移动邮件客户端正在访问邮件夹A中的邮件,此时另一客户端读取了邮件夹C中的UID为36的邮件并使其状态变为\seen,则邮件服务器将该事件通过如下状态响应推送给上述移动邮件客户端:Assume again that the above-mentioned mobile mail client is accessing the mail in mail folder A. At this time, another client reads the mail with UID 36 in mail folder C and makes its status change to \seen, then the mail server will send the The event is pushed to the above mobile email client through the following status response:

S:*STATUS FolderC(UID 36 FLAGS(\Seen))S: *STATUS FolderC(UID 36 FLAGS(\Seen))

移动邮件客户端接收到该状态响应后,根据邮件夹名称和UID定位到邮件存储库中邮件夹C中UID为36的邮件,并将该邮件的状态设置为\seen。After receiving the status response, the mobile mail client locates the mail with UID 36 in mail folder C in the mail storage according to the mail folder name and UID, and sets the status of the mail as \seen.

此后,在移动邮件客户端向邮件服务器发送DONE命令,并由邮件服务器回复A005OK IDLE terminated命令后结束该流程。Thereafter, the mobile mail client sends a DONE command to the mail server, and the mail server replies with an A005OK IDLE terminated command to end the process.

以上是对本发明具体实施例的说明,在具体的实施过程中可对本发明的方法进行适当的改进,以适应具体情况的具体需要。因此可以理解,根据本发明的具体实施方式只是起示范作用,并不用以限制本发明的保护范围。The above is the description of the specific embodiments of the present invention, and the method of the present invention can be appropriately improved during the specific implementation process to meet the specific needs of specific situations. Therefore, it can be understood that the specific implementation manners according to the present invention are only exemplary, and are not intended to limit the protection scope of the present invention.

Claims (10)

1.一种通知移动邮件状态的方法,其特征在于,该方法包括:1. A method for notifying mobile mail status, characterized in that the method comprises: 移动邮件客户端与邮件服务器建立连接,邮件服务器检测到未选中邮件夹中的邮件状态变化事件后,产生包括该邮件状态变化事件的通知,并将该通知发送到移动邮件客户端。The mobile mail client establishes a connection with the mail server, and after the mail server detects the mail state change event in the unselected mail folder, it generates a notification including the mail state change event, and sends the notification to the mobile mail client. 2.根据权利要求1所述的方法,其特征在于,该方法进一步包括:2. The method according to claim 1, characterized in that the method further comprises: 所述移动邮件客户端接收到所述通知后,根据通知中的事件更新自身中对应邮件的状态。After receiving the notification, the mobile email client updates the state of the corresponding email in itself according to the event in the notification. 3.根据权利要求1或2所述的方法,其特征在于,所述通知中包括:邮件夹名称、邮件标识和邮件状态。3. The method according to claim 1 or 2, wherein the notification includes: mail folder name, mail identifier and mail status. 4.根据权利要求3所述的方法,其特征在于,所述通知为状态响应。4. The method according to claim 3, wherein the notification is a status response. 5.根据权利要求3所述的方法,其特征在于,所述通知为获取响应。5. The method according to claim 3, wherein the notification is an acquisition response. 6.根据权利要求3所述的方法,其特征在于,所述通知中包括同一邮件夹中的一个或多个邮件状态变化事件,则所述邮件标识和邮件状态对应包括一组或多组。6. The method according to claim 3, wherein the notification includes one or more mail status change events in the same mail folder, and the mail identifier and mail status include one or more groups correspondingly. 7.根据权利要求3所述的方法,其特征在于,所述移动邮件客户端根据通知中的事件更新自身中对应邮件的状态包括:7. The method according to claim 3, wherein the updating of the status of the corresponding mail in the mobile mail client according to the event in the notification comprises: 移动邮件客户端根据通知中的邮件夹名称和邮件标识定位到自身中存储的邮件,并将该邮件的状态更新为所述通知中包括的邮件状态。The mobile mail client locates the mail stored in itself according to the mail folder name and mail identifier in the notification, and updates the status of the mail to the mail status included in the notification. 8.一种通知移动邮件状态的系统,其特征在于,该系统包括:邮件服务器和移动邮件客户端;8. A system for notifying mobile mail status, characterized in that the system includes: mail server and mobile mail client; 邮件服务器用于与所述邮件客户端建立连接,并检测未选中邮件夹中的邮件状态变化事件,产生包括检测到的所述邮件状态变化事件的通知,以及将该通知发送给所述移动邮件客户端;The mail server is used to establish a connection with the mail client, and detect the mail state change event in the unselected mail folder, generate a notification including the detected mail state change event, and send the notification to the mobile mail client; 移动邮件客户端用于与所述邮件服务器建立连接,接收来自邮件服务器的包括未选中邮件夹中邮件变化事件的通知,或进一步根据该通知中的事件更新自身中对应邮件的状态。The mobile mail client is used to establish a connection with the mail server, receive a notification from the mail server including the change event of the mail in the unselected mail folder, or further update the state of the corresponding mail in itself according to the event in the notification. 9.一种邮件服务器,其特征在于,该邮件服务器中包括:邮件存储库、通知产生模块和通知发送模块;9. A mail server, characterized in that, the mail server includes: a mail repository, a notification generating module and a notification sending module; 邮件存储库用于存储用户邮件;The mail repository is used to store user mail; 通知产生模块用于检测未选中邮件夹中的邮件状态变化事件,产生包括检测到的所述邮件状态变化事件的通知,以及将该通知发送给通知发送模块;The notification generation module is used to detect the mail state change event in the unselected mail folder, generate a notification including the detected mail state change event, and send the notification to the notification sending module; 通知发送模块用于将来自通知产生模块的通知发送到移动邮件客户端。The notification sending module is used for sending the notification from the notification generating module to the mobile mail client. 10.一种移动邮件客户端,其特征在于,该移动邮件客户端中包括:通知解析模块和邮件存储库;10. A mobile mail client, characterized in that the mobile mail client includes: a notification parsing module and a mail repository; 通知解析模块用于接收来自邮件服务器的包括未选中邮件夹中邮件状态变化事件的通知,根据该通知更新邮件存储库中对应邮件的状态;The notification parsing module is used to receive the notification from the mail server including the status change event of the mail in the unselected mail folder, and update the status of the corresponding mail in the mail repository according to the notification; 邮件存储库用于存储用户的邮件。Mail stores are used to store users' mail.
CNA2006101407947A 2006-10-10 2006-10-10 Method, system and device for notifying mobile mail state Pending CN101163114A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNA2006101407947A CN101163114A (en) 2006-10-10 2006-10-10 Method, system and device for notifying mobile mail state

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNA2006101407947A CN101163114A (en) 2006-10-10 2006-10-10 Method, system and device for notifying mobile mail state

Publications (1)

Publication Number Publication Date
CN101163114A true CN101163114A (en) 2008-04-16

Family

ID=39297943

Family Applications (1)

Application Number Title Priority Date Filing Date
CNA2006101407947A Pending CN101163114A (en) 2006-10-10 2006-10-10 Method, system and device for notifying mobile mail state

Country Status (1)

Country Link
CN (1) CN101163114A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101895841A (en) * 2010-07-30 2010-11-24 宇龙计算机通信科技(深圳)有限公司 Management method of terminal email accounts and mobile terminal
CN102413436A (en) * 2011-09-14 2012-04-11 华为技术有限公司 Information transmission method and system and browser on mobile terminal

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101895841A (en) * 2010-07-30 2010-11-24 宇龙计算机通信科技(深圳)有限公司 Management method of terminal email accounts and mobile terminal
CN101895841B (en) * 2010-07-30 2013-07-31 宇龙计算机通信科技(深圳)有限公司 Management method of terminal email accounts and mobile terminal
CN102413436A (en) * 2011-09-14 2012-04-11 华为技术有限公司 Information transmission method and system and browser on mobile terminal
WO2012163197A1 (en) * 2011-09-14 2012-12-06 华为技术有限公司 Method and system for information transfer, and browser of mobile terminal
CN102413436B (en) * 2011-09-14 2016-03-09 华为技术有限公司 Information transferring method and system
US9300717B2 (en) 2011-09-14 2016-03-29 Huawei Technologies Co., Ltd. Information transmission method and system, and browser on mobile terminal

Similar Documents

Publication Publication Date Title
US6779022B1 (en) Server that obtains information from multiple sources, filters using client identities, and dispatches to both hardwired and wireless clients
US8849322B2 (en) Systems and methods for sharing threaded conversations on mobile communications devices
EP1482748A2 (en) Inbox caching of messages on a mobile terminal
US20070283039A1 (en) Mail application with integrated text messaging functionality
US9037114B2 (en) SMS message notification arrangement
US20080294729A1 (en) Email object for open mobile alliance data synchronization usage
CA2544717C (en) Storing, sending and receiving text message threads on a wireless communication device
CN103731334B (en) Message status methods of exhibiting and device
KR20200141545A (en) Apparatus and method for maintaining a message thread with opt-in permanence for entries
IL180566A (en) Electronic messaging system and method
WO2008019558A1 (en) Message conversion device, system and conversion method
US8886234B2 (en) Techniques for unified messaging
US20110060801A1 (en) Automatic integration of a mail server with internet server (is)
WO2009089707A1 (en) Information displaying method and user terminal thereof
US7450932B2 (en) Apparatus and method for forwarding e-mail
CN102307159B (en) Method and apparatus for efficient management and resending of transmitted message
CN101202760B (en) Remote control operation
EP2448226A1 (en) Mobile phone messages processing method and mobile phone
US7826406B2 (en) Storing, sending and receiving text message threads on a wireless communication device
JP2009169866A (en) E-mail client, control method therefor, and computer program
EP2707995B1 (en) Method and system for managing voice mails in a universal plug and play network environment
CN102421073A (en) Method and device for processing short messages
CN101163114A (en) Method, system and device for notifying mobile mail state
US10341274B2 (en) Systems methods and computer-readable storage media for messaging and presence modification
CN103312585A (en) Processing method and system of spam message

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C12 Rejection of a patent application after its publication
RJ01 Rejection of invention patent application after publication

Open date: 20080416