[go: up one dir, main page]

CN102611639B - System for sending instant message report in instant message system - Google Patents

System for sending instant message report in instant message system Download PDF

Info

Publication number
CN102611639B
CN102611639B CN201210004378.XA CN201210004378A CN102611639B CN 102611639 B CN102611639 B CN 102611639B CN 201210004378 A CN201210004378 A CN 201210004378A CN 102611639 B CN102611639 B CN 102611639B
Authority
CN
China
Prior art keywords
instant message
server
report
message
belonging
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201210004378.XA
Other languages
Chinese (zh)
Other versions
CN102611639A (en
Inventor
牟伦建
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
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 CN201210004378.XA priority Critical patent/CN102611639B/en
Publication of CN102611639A publication Critical patent/CN102611639A/en
Application granted granted Critical
Publication of CN102611639B publication Critical patent/CN102611639B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Mobile Radio Communication Systems (AREA)
  • Telephonic Communication Services (AREA)

Abstract

本发明公开了一种即时消息系统中发送即时消息报告的系统,适用于SIP/SIMPLE系统,该系统包括:接收端侧在判断出接收到的即时消息中包含即时消息报告请求后,将即时消息报告发送给发送端侧的客户端。本发明的技术方案在用户接收离线消息、用户在MSRP数据通道断开后阅读消息、IM服务器删除离线消息以及用户删除离线消息的情况下,实现了接收端侧向发送端发送即时消息报告,满足了发送端用户的需求,进而提高了SIP/SIMPLE系统的可服务性。

The invention discloses a system for sending an instant message report in an instant message system, which is applicable to a SIP/SIMPLE system. The report is sent to the client on the sender side. The technical scheme of the present invention realizes that the receiving end sends an instant message report to the sending end when the user receives the offline message, the user reads the message after the MSRP data channel is disconnected, the IM server deletes the offline message, and the user deletes the offline message, satisfying The requirements of the sending end user are met, and the serviceability of the SIP/SIMPLE system is improved.

Description

一种即时消息系统中发送即时消息报告的系统A system for sending instant message reports in an instant message system

技术领域 technical field

本发明涉及即时消息技术,特别涉及一种即时消息系统中发送即时消息报告的方法。The invention relates to instant message technology, in particular to a method for sending an instant message report in an instant message system.

背景技术 Background technique

即时消息(Instant Messaging,IM)业务属于一种基于呈现(Presence)的个人对个人、或者个人对群组的消息类的移动数据业务。The instant messaging (Instant Messaging, IM) service belongs to a mobile data service based on presence (Presence) person-to-person or person-to-group messaging.

开放移动联盟(Open Mobile Alliance,OMA)国际标准组织对于移动即时消息作了标准制定,在当前的标准规范版本中有两类即时消息系统:第一类是基于无线乡村(Wireless Village,WV)协议的即时消息系统,该系统基于超级文本传送协议/无线访问协议/短消息服务(Hyper Text TransportProtocol/Wireless Access Protocol/Short Messaging Service,HTTP/WAP/SMS)承载的协议,可以支持2.5G/3G网络;第二类是基于初始会话协议/初始会话协议即时消息和现场支持扩展(Session Initiated Protocol/SIP InstantMessage and Presence Leveraging Extensions,SIP/SIMPLE)协议的即时消息系统,该系统基于SIP/SIMPLE承载的协议,支持基于互联网协议(InternetProtocol,IP)多媒体子系统(IP Multimedia Subsystem,IMS)的IP网络。The Open Mobile Alliance (OMA) International Standards Organization has formulated standards for mobile instant messaging. There are two types of instant messaging systems in the current version of the standard specification: the first type is based on the Wireless Village (WV) protocol The instant messaging system based on Hyper Text Transport Protocol/Wireless Access Protocol/Short Message Service (Hyper Text Transport Protocol/Wireless Access Protocol/Short Messaging Service, HTTP/WAP/SMS) bearer protocol can support 2.5G/3G network The second type is an instant messaging system based on the ISP/ISP Instant Messaging and Field Support Extension (Session Initiated Protocol/SIP InstantMessage and Presence Leveraging Extensions, SIP/SIMPLE) protocol, the system is based on the protocol carried by SIP/SIMPLE , support IP network based on Internet Protocol (Internet Protocol, IP) Multimedia Subsystem (IP Multimedia Subsystem, IMS).

在现有SIP/SIMPLE系统中,接收端用户在线时,发送端用户通过IM系统可以发送即时消息,并请求接收端发送即时消息报告,接收端用户能及时获取和阅读该即时消息,从而能够回复即时消息报告。发送端通过回复的即时消息报告得知发送的即时消息是否成功递送到接收端,或者是否被接收端的用户阅读。In the existing SIP/SIMPLE system, when the receiving end user is online, the sending end user can send an instant message through the IM system, and request the receiving end to send an instant message report, and the receiving end user can obtain and read the instant message in time, so as to be able to reply Instant message report. The sending end knows whether the sent instant message is successfully delivered to the receiving end or whether it is read by the user of the receiving end through the reply instant message report.

然而,现有技术中,SIP/SIMPLE系统的接收端在有些情况下,无法向发送即时消息的用户发送成功递送报告、失败递送报告和阅读报告等即时消息报告,例如:发送端用户发送即时消息时,接收端用户处于离线状态,接收端用户上线后获取离线消息;接收端用户在消息会话中继协议(MessageSession Relay Protocol,MSRP)数据通道断开后阅读即时消息;IM服务器删除超时存储的离线消息;接收端用户不获取即时消息,而是直接从IM服务器删除即时消息。However, in the prior art, in some cases, the receiving end of the SIP/SIMPLE system cannot send instant message reports such as successful delivery report, failed delivery report and reading report to the user who sent the instant message, for example: the sending end user sends an instant message When the receiving end user is offline, the receiving end user obtains offline messages after going online; the receiving end user reads instant messages after the message session relay protocol (Message Session Relay Protocol, MSRP) data channel is disconnected; the IM server deletes the offline messages stored over time. message; the receiving end user does not obtain the instant message, but directly deletes the instant message from the IM server.

可见,现有技术不能在用户接收离线消息、用户在MSRP数据通道断开后阅读消息、IM服务器删除离线消息以及用户删除离线消息等情况下,实现SIP/SIMPLE系统中的接收端向发送端发送即时消息报告,从而使得发送端用户获取即时消息报告的需求不能得到满足,进而造成了SIP/SIMPLE系统的可服务性不高。It can be seen that the existing technology cannot realize that the receiving end in the SIP/SIMPLE system sends the message to the sending end when the user receives the offline message, the user reads the message after the MSRP data channel is disconnected, the IM server deletes the offline message, and the user deletes the offline message. The instant message report, so that the demand of the sending end user to obtain the instant message report cannot be satisfied, and then the serviceability of the SIP/SIMPLE system is not high.

发明内容 Contents of the invention

有鉴于此,本发明的主要目的在于提供一种即时消息系统中发送即时消息报告的方法,能够在各种情况下,实现接收端向发送端发送即时消息报告。In view of this, the main purpose of the present invention is to provide a method for sending an instant message report in an instant message system, which can realize sending an instant message report from a receiving end to a sending end under various circumstances.

根据上述发明目的,本发明提供了一种即时消息系统中发送即时消息报告的方法,适用于SIP/SIMPLE系统,该方法包括:接收端侧在判断出接收到的即时消息中包含发送即时消息报告的请求后,将即时消息报告发送给发送端侧的客户端。According to the purpose of the above invention, the present invention provides a method for sending an instant message report in an instant message system, which is applicable to a SIP/SIMPLE system. After the request, the instant message report is sent to the client at the sending end.

所述接收端侧将即时消息报告发送给发送端侧的客户端为:接收端侧将即时消息报告经由接收端和发送端所属的即时消息服务器,发送给发送端侧的客户端。The sending of the instant message report by the receiving end to the client of the sending end is: the sending of the instant message report by the receiving end to the client of the sending end via the instant message server to which the receiving end and the sending end belong.

所述接收端和发送端所属的即时消息服务器为两个不同的即时消息服务器。The instant message servers to which the receiving end and the sending end belong are two different instant message servers.

所述经由接收端和发送端所属的即时消息服务器,将即时消息报告发送给发送端侧的客户端的方法包括:The method for sending the instant message report to the client at the sending end side via the receiving end and the instant messaging server to which the sending end belongs includes:

A1、接收端向所述接收端所属的即时消息服务器发送即时消息报告;A1. The receiving end sends an instant message report to the instant message server to which the receiving end belongs;

A2、接收端所属的即时消息服务器向发送端所属的即时消息服务器发送即时消息报告;A2. The instant message server to which the receiving end belongs sends an instant message report to the instant message server to which the sending end belongs;

A3、发送端所属的即时消息服务器向发送端发送即时消息报告。A3. The instant message server to which the sending end belongs sends an instant message report to the sending end.

所述即时消息报告为成功递送报告;The instant message report is a successful delivery report;

在接收端侧进行判断之前进一步包括:发送端在接收端侧的客户端离线时,向接收端侧的客户端发送包括即时消息报告请求的即时消息,所述接收端所属的即时消息服务器存储所述即时消息;Before the receiving end side judges, it further includes: when the client at the receiving end side is offline, the sending end sends an instant message including an instant message report request to the client at the receiving end side, and the instant message server to which the receiving end belongs stores the information. instant message;

接收端侧的客户端上线后,从所述接收端所属的即时消息服务器中获取发送端发送的即时消息。After the client at the receiving end goes online, it obtains the instant message sent by the sending end from the instant message server to which the receiving end belongs.

如果接收端所属的即时消息服务器与发送端没有消息会话中继协议数据通道连接,所述步骤A1与A2之间进一步包括:接收端所属的即时消息服务器发起建立与发送端之间的所有消息会话中继协议数据通道;If there is no message session relay protocol data channel connection between the instant message server to which the receiving end belongs and the sending end, the steps A1 and A2 further include: the instant messaging server to which the receiving end belongs initiates the establishment of all message sessions with the sending end Relay protocol data channel;

所述发送成功递送报告的方法为:通过消息会话中继协议数据通道发送成功递送报告。The method for sending the successful delivery report is: sending the successful delivery report through the message session relay protocol data channel.

所述即时消息服务器存储所述即时消息为:即时消息服务器将即时消息存储在自身的离线消息存储单元内。The storage of the instant message by the instant message server is: the instant message server stores the instant message in its own offline message storage unit.

所述即时消息报告为阅读报告;The instant message report is a reading report;

在接收端侧进行判断之前进一步包括:接收端建立与接收端所属即时服务器之间的消息会话中继协议数据通道,通过消息会话中继协议数据通道获取发送端发送的包括即时消息报告请求的即时消息,并在消息会话中继协议数据通道断开后阅读所述即时消息。Before the judgment is made on the receiving end side, it further includes: the receiving end establishes a message session relay protocol data channel with the instant server to which the receiving end belongs, and obtains the instant message including the instant message report request sent by the sending end through the message session relay protocol data channel. message, and read said instant message after the message session relay protocol data channel is disconnected.

如果接收端所属的即时消息服务器与发送端之间没有消息会话中继协议数据通道连接,所述步骤A1之前进一步包括:接收端发起建立与发送端之间的所有消息会话中继协议数据通道;If there is no message session relay protocol data channel connection between the instant message server to which the receiving end belongs and the sending end, before the step A1 further includes: the receiving end initiates the establishment of all message session relay protocol data channels between the sending end;

所述发送阅读报告的方法为:通过消息会话中继协议数据通道发送阅读报告。The method for sending the reading report is: sending the reading report through the message session relay protocol data channel.

所述步骤A1为:接收端将即时消息报告经由所述接收端所属的SIP/IP核心网,发送给所述接收端所属的即时消息服务器;The step A1 is: the receiving end sends the instant message report to the instant message server to which the receiving end belongs via the SIP/IP core network to which the receiving end belongs;

所述步骤A2为:接收端所属的即时消息服务器将即时消息报告经由接收端所属的SIP/IP核心网和发送端所属的SIP/IP核心网,发送给发送端所属的即时消息服务器;The step A2 is: the instant message server belonging to the receiving end sends the instant message report to the instant messaging server belonging to the sending end via the SIP/IP core network belonging to the receiving end and the SIP/IP core network belonging to the sending end;

所述步骤A3为:发送端所属的即时消息服务器将即时消息报告经由发送端所属的SIP/IP核心网,发送给所述发送端。The step A3 is: the instant message server to which the sender belongs sends the instant message report to the sender via the SIP/IP core network to which the sender belongs.

所述经由接收端和发送端所属的即时消息服务器,将即时消息报告发送给发送端侧的客户端的方法包括:The method for sending the instant message report to the client at the sending end side via the receiving end and the instant messaging server to which the sending end belongs includes:

B1、接收端所属的即时消息服务器向发送端所属的即时消息服务器发送即时消息报告;B1. The instant message server to which the receiving end belongs sends an instant message report to the instant message server to which the sending end belongs;

B2、发送端所属的即时消息服务器向发送端发送即时消息报告。B2. The instant message server to which the sending end belongs sends an instant message report to the sending end.

所述即时消息报告为失败递送报告;The instant message report is a failed delivery report;

在接收端侧进行判断之前进一步包括:接收端所属的即时消息服务器或者所述接收端,删除所述即时消息服务器中存储的包括即时消息报告请求的即时消息。The method further includes: the instant message server to which the receiving end belongs or the receiving end deletes the instant message including the instant message report request stored in the instant message server before the judgment is made on the receiving end side.

如果接收端所属的即时消息服务器与发送端没有通过消息会话中继协议数据通道连接,所述步骤B1之前进一步包括:接收端所属的即时消息服务器发起建立与发送端之间的所有消息会话中继协议数据通道;If the instant message server to which the receiving end belongs is not connected to the sending end through the message session relay protocol data channel, before the step B1, it further includes: the instant messaging server to which the receiving end belongs initiates the establishment of all message session relays with the sending end protocol data channel;

所述发送失败递送报告的方法为:通过消息会话中继协议数据通道发送失败递送报告。The method for sending the delivery failure report is: sending the delivery failure report through a message session relay protocol data channel.

所述步骤B1为:接收端所属的即时消息服务器将即时消息报告经由接收端所属的SIP/IP核心网和发送端所属的SIP/IP核心网,发送给发送端所属的即时消息服务器;The step B1 is: the instant message server belonging to the receiving end sends the instant message report to the instant messaging server belonging to the sending end via the SIP/IP core network belonging to the receiving end and the SIP/IP core network belonging to the sending end;

所述步骤B2为:发送端所属的服务器将即时消息报告经由发送端所属的SIP/IP核心网,发送给所述发送端。The step B2 is: the server to which the sender belongs sends the instant message report to the sender via the SIP/IP core network to which the sender belongs.

所述接收端和发送端所属的即时消息服务器为同一个即时消息服务器。The instant message server to which the receiving end and the sending end belong is the same instant message server.

所述接收端侧将即时消息报告发送给发送端侧的客户端包括:The sending of the instant message report to the client at the sending end by the receiving end includes:

接收端建立与所述接收端所属即时消息服务器之间的消息会话中继协议数据通道,并通过消息会话中继协议数据通道向所述接收端所属的即时消息服务器发送即时消息报告;The receiving end establishes a message session relay protocol data channel with the instant message server to which the receiving end belongs, and sends an instant message report to the instant message server to which the receiving end belongs through the message session relay protocol data channel;

接收端所属的即时消息服务器建立与发送端之间的消息会话中继协议数据通道,并通过消息会话中继协议数据通道向发送端发送即时消息报告。The instant message server to which the receiving end belongs establishes a message session relay protocol data channel with the sending end, and sends an instant message report to the sending end through the message session relay protocol data channel.

所述接收端侧将即时消息报告发送给发送端侧的客户端为:接收端建立与发送端之间的消息会话中继协议数据通道,并通过消息会话中继协议数据通道向所述发送端发送即时消息报告。The receiving terminal side sends the instant message report to the client side of the transmitting terminal as follows: the receiving terminal establishes a message session relay protocol data channel with the transmitting terminal, and transmits the instant message report to the transmitting terminal through the message session relay protocol data channel Send an instant message report.

由上述技术方案可见,本发明的技术方案通过接收端侧在判断出接收到的即时消息中包含发送报告的请求后,将即时消息报告发送给发送端侧的客户端,从而在用户接收离线消息、用户在MSRP数据通道断开后阅读消息、IM服务器删除离线消息以及用户删除离线消息的情况下,实现了SIP/SIMPLE系统中的接收端侧向发送端用户发送即时消息报告,满足了发送端用户获取即时消息报告的需求,进而提高了SIP/SIMPLE系统的可服务性。It can be seen from the above technical solution that the technical solution of the present invention sends the instant message report to the client at the sending end side after the receiving end side determines that the received instant message contains a request to send a report, so that when the user receives the offline message , When the user reads the message after the MSRP data channel is disconnected, the IM server deletes the offline message, and the user deletes the offline message, the receiving end in the SIP/SIMPLE system sends an instant message report to the sending end user, which satisfies the requirements of the sending end. The user needs to obtain instant message reports, thereby improving the serviceability of the SIP/SIMPLE system.

附图说明 Description of drawings

图1为本发明中发送即时消息报告的示例性方法流程图;Fig. 1 is the exemplary method flowchart of sending instant message report among the present invention;

图2为SIP/SIMPLE系统的结构图;Fig. 2 is a structural diagram of the SIP/SIMPLE system;

图3为本发明实施例一中发送即时消息报告的方法流程图;FIG. 3 is a flowchart of a method for sending an instant message report in Embodiment 1 of the present invention;

图4为本发明实施例二中发送即时消息报告的方法流程图;FIG. 4 is a flowchart of a method for sending an instant message report in Embodiment 2 of the present invention;

图5为本发明实施例三中发送即时消息报告的方法流程图;FIG. 5 is a flowchart of a method for sending an instant message report in Embodiment 3 of the present invention;

图6为本发明实施例四中发送即时消息报告的方法流程图;FIG. 6 is a flowchart of a method for sending an instant message report in Embodiment 4 of the present invention;

图7为本发明实施例五中发送即时消息报告的方法流程图;FIG. 7 is a flowchart of a method for sending an instant message report in Embodiment 5 of the present invention;

图8为本发明实施例六中发送即时消息报告的方法流程图;FIG. 8 is a flowchart of a method for sending an instant message report in Embodiment 6 of the present invention;

图9为本发明实施例七中发送即时消息报告的方法流程图;FIG. 9 is a flowchart of a method for sending an instant message report in Embodiment 7 of the present invention;

图10为本发明实施例八中发送即时消息报告的方法流程图;FIG. 10 is a flowchart of a method for sending an instant message report in Embodiment 8 of the present invention;

图11为本发明实施例九中发送即时消息报告的方法流程图。FIG. 11 is a flowchart of a method for sending an instant message report in Embodiment 9 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 with reference to the accompanying drawings and examples.

本发明的基本思想为:接收端侧在判断出接收到的即时消息中包含即时消息报告请求后,将即时消息报告发送给发送端侧的客户端。The basic idea of the present invention is: the receiving end side sends the instant message report to the client side at the sending end side after judging that the received instant message contains an instant message report request.

图1为本发明中发送即时消息报告的示例性方法流程图。如图1所示,本发明发送即时消息报告的方法包括以下步骤:Fig. 1 is a flowchart of an exemplary method for sending an instant message report in the present invention. As shown in Figure 1, the method for sending instant message report of the present invention comprises the following steps:

步骤101,接收端侧判断接收到的即时消息中是否包含即时消息报告请求,如果是,则执行步骤102;Step 101, the receiving terminal side judges whether the received instant message contains an instant message report request, and if so, executes step 102;

步骤102,接收端侧判断出接收到的即时消息中包含即时消息报告请求后,将即时消息报告发送给发送端侧的客户端。Step 102, after the receiving end determines that the received instant message includes an instant message report request, it sends the instant message report to the client at the sending end.

图2为SIP/SIMPLE系统的结构图。如图2所示,以A和B两个网络为例,现有技术中实现IM业务的SIP/SIMPLE系统包括:属于网络A的IM服务器A 201、SIP/IP核心网A 202和n个客户端A 203,属于网络B的IM服务器B 204、SIP/IP核心网B 205和n个客户端B 206。Fig. 2 is a structural diagram of the SIP/SIMPLE system. As shown in Figure 2, taking two networks A and B as examples, the SIP/SIMPLE system for implementing IM services in the prior art includes: IM server A 201 belonging to network A, SIP/IP core network A 202 and n clients A terminal A 203, an IM server B 204 belonging to a network B, a SIP/IP core network B 205 and n clients B 206.

IM服务器A 201能够分别与客户端A 203和SIP/IP核心网A 202进行信息交互,在客户端A离线后存储其它客户端发送给客户端A的即时消息,并在存储该即时消息超时后删除该消息;IM服务器B 204能够分别与客户端B 206和SIP/IP核心网B 205进行信息交互,在客户端B 206离线后存储其它客户端发送给客户端B 206的即时消息,并在存储该即时消息超时后删除该消息。两个网络中的IM服务器A 201和IM服务器B 204能够进行信息交互,并均能够对多个接收用户或者预先定义的组群,实现即时消息的群发;SIP/IP核心网A 202与SIP/IP核心网B 205能够进行信息交互,SIP/IP核心网A 202与SIP/IP核心网B 205还能够分别与客户端A 203和IM服务器A 201、客户端B 206和IM服务器B 204进行信息交互。The IM server A 201 can carry out information interaction with the client A 203 and the SIP/IP core network A 202 respectively, store the instant messages sent by other clients to the client A after the client A goes offline, and store the instant messages after the timeout Delete this message; IM server B 204 can carry out information interaction with client B 206 and SIP/IP core network B 205 respectively, store the instant message sent to client B 206 by other clients after client B 206 goes offline, and in The message is deleted after the timeout of storing the instant message. The IM server A 201 and the IM server B 204 in the two networks can exchange information, and both can send instant messages to multiple receiving users or predefined groups; SIP/IP core network A 202 and SIP/IP IP core network B 205 can carry out information exchange, SIP/IP core network A 202 and SIP/IP core network B 205 can also carry out information with client A 203 and IM server A 201, client B 206 and IM server B 204 respectively interact.

下面,通过几个具体实施例,分别说明本发明通过MSRP数据通道和SIP/IP核心网发送即时消息报告的方法。Next, through several specific embodiments, the method for sending an instant message report through the MSRP data channel and the SIP/IP core network of the present invention will be described respectively.

实施例一Embodiment one

图3为本发明实施例一中发送即时消息报告的方法流程图。本实施例中,发送端和接收端所属的服务器分别为IM服务器A和IM服务器B;接收端的客户端B处于离线状态,但在上线之后能够接收离线消息;即时消息报告是通过MSRP数据通道发送的。如图3所示,本实施例中发送即时消息报告的方法包括以下步骤:FIG. 3 is a flowchart of a method for sending an instant message report in Embodiment 1 of the present invention. In this embodiment, the servers to which the sending end and the receiving end belong are IM server A and IM server B respectively; the client B of the receiving end is offline, but can receive offline messages after going online; the instant message report is sent through the MSRP data channel of. As shown in Figure 3, the method for sending an instant message report in this embodiment includes the following steps:

步骤301,用户A请求向用户B发送即时消息,客户端A根据用户A的请求,向IM服务器A发送基于初始会话协议的邀请(SIP INVITE)消息,建立与IM服务器A之间的MSRP数据通道,同样地,IM服务器A再和IM服务器B之间建立MSRP数据通道。Step 301, user A requests to send an instant message to user B, and client A sends an invitation (SIP INVITE) message based on the initial session protocol to IM server A according to the request of user A, and establishes an MSRP data channel with IM server A , and similarly, establish an MSRP data channel between IM server A and IM server B.

步骤302~步骤303,客户端A通过IM服务器A,将基于消息会话中继协议的发送(MSRP SEND)消息发送到IM服务器B。In steps 302 to 303, the client A sends the MSRP SEND message to the IM server B through the IM server A.

由于此时客户端B离线,因此IM服务器A发送的MSRP SEND消息属于离线消息。Since client B is offline at this time, the MSRP SEND message sent by IM server A is an offline message.

其中,MSRP SEND消息包括:消息的身份码(Message-ID),需要回复成功递送报告(Success-Report:yes);需要回复失败递送报告(Failure-Report:yes)等消息头和发送的消息等。Among them, the MSRP SEND message includes: the identity code (Message-ID) of the message, the successful delivery report (Success-Report: yes) that needs to be replied; the message header such as the failure delivery report (Failure-Report: yes) that needs to be replied and the sent message, etc. .

步骤304~步骤305,IM服务器B存储离线消息,并向IM服务器A回复MSRP 200“OK”消息,表示IM服务器B已收到了离线消息,IM服务器A将接收到的MSRP 200“OK”消息转发到客户端A。Step 304~Step 305, IM server B stores the offline message, and replies with MSRP 200 "OK" message to IM server A, indicating that IM server B has received the offline message, and IM server A forwards the received MSRP 200 "OK" message to client A.

其中,MSRP 200“OK”消息仅表示收到了离线消息,不表示离线消息已成功发送到作为目的客户端的客户端B。Among them, the MSRP 200 "OK" message only means that the offline message has been received, and does not mean that the offline message has been successfully sent to client B as the destination client.

IM服务器B包括在线消息存储单元和离线消息存储单元,本实施例中的离线消息是存储在离线消息存储单元中的。在线消息存储单元和离线消息存储单元可以构成一个IM服务器,也可以分别为两个服务器。The IM server B includes an online message storage unit and an offline message storage unit, and the offline messages in this embodiment are stored in the offline message storage unit. The online message storage unit and the offline message storage unit may constitute an IM server, or may be two servers respectively.

步骤306,客户端A通过向IM服务器A发送基于初始会话协议的再见(SIP BYE)消息,断开MSRP数据通道。Step 306, client A disconnects the MSRP data channel by sending a bye (SIP BYE) message based on the initial session protocol to IM server A.

客户端A断开MSRP数据通道的原因可以是:在等待一定时间没有收到即时消息报告,为了节省网络资源而断开MSRP数据通道。The reason why client A disconnects the MSRP data channel may be: the instant message report is not received after waiting for a certain period of time, and the MSRP data channel is disconnected in order to save network resources.

步骤307,用户B通过客户端B上线后,请求通过推(PUSH)方式从IM服务器B获取离线消息。Step 307, after the user B goes online through the client B, request to obtain the offline message from the IM server B by means of PUSH.

用户B也可以请求以拉(PULL)方式获取离线消息。User B may also request to obtain offline messages in a PULL manner.

步骤308,客户端B通过向IM服务器B发送SIP INVITE消息,与IM服务器B建立MSRP数据通道。In step 308, the client B establishes an MSRP data channel with the IM server B by sending a SIP INVITE message to the IM server B.

步骤309~步骤310,IM服务器B向客户端B发送包括给用户B的离线消息的MSRP SEND消息,客户端B收到离线消息后,向IM服务器B发送MSRP 200“OK”回复消息,表示离线消息已成功发送到目的客户端。In steps 309 to 310, IM server B sends an MSRP SEND message including an offline message to user B to client B. After receiving the offline message, client B sends an MSRP 200 "OK" reply message to IM server B, indicating offline The message was successfully sent to the destination client.

步骤311~步骤312,客户端B根据MSRP SEND消息的消息头中的成功递送报告请求,判断出接收到的离线消息需要向作为发送端的客户端A发送成功递送报告,因而通过没有断开的MSRP数据通道,将包括成功递送报告的基于消息会话中继协议的报告(MSRP REPORT)消息发送到IM服务器B,IM服务器B在接收到MSRP REPORT消息之后,向客户端B回应MSRP 200“OK”,表示收到MSRP REPORT消息。In steps 311 to 312, client B judges that the received offline message needs to send a successful delivery report to client A as the sender according to the successful delivery report request in the message header of the MSRP SEND message, and thus passes the undisconnected MSRP The data channel sends the report (MSRP REPORT) message based on the message session relay protocol including the successful delivery report to the IM server B, and the IM server B responds to the client B with MSRP 200 "OK" after receiving the MSRP REPORT message, Indicates that a MSRP REPORT message has been received.

MSRP REPORT消息中还包括:离线消息中的Message-ID和概要描述等信息。The MSRP REPORT message also includes information such as the Message-ID and summary description in the offline message.

步骤313,客户端B通过向IM服务器B发送SIP BYE消息来断开IM服务器B和客户端B的MSRP数据通道。Step 313, client B disconnects the MSRP data channel between IM server B and client B by sending a SIP BYE message to IM server B.

步骤314,IM服务器B发现MSRP数据通道已经断开后,通过向IM服务器A发送SIP INVITE消息,建立与IM服务器A之间的MSRP数据通道,同样地,IM服务器A和客户端A之间也建立MSRP数据通道。Step 314, after the IM server B finds that the MSRP data channel has been disconnected, it sets up the MSRP data channel with the IM server A by sending a SIP INVITE message to the IM server A, and similarly, between the IM server A and the client A. Create an MSRP data channel.

步骤315~步骤316,IM服务器B通过IM服务器A,向客户端A发送包括成功递送报告的MSRP REPORT消息。In steps 315 to 316, the IM server B sends the MSRP REPORT message including the successful delivery report to the client A through the IM server A.

步骤317~步骤318,客户端A在接收到MSRP REPORT消息中的成功递送报告后,通过IM服务器A向IM服务器B发送MSRP 200“OK”消息,表示成功收到MSRP REPORT消息。In steps 317 to 318, after receiving the successful delivery report in the MSRP REPORT message, client A sends an MSRP 200 "OK" message to IM server B through IM server A, indicating that the MSRP REPORT message has been successfully received.

步骤319,断开发送消息递送报告的MSRP数据通道。Step 319, disconnect the MSRP data channel for sending the message delivery report.

本实施例中,步骤311和步骤315~步骤316中发送的成功递送报告,也可以通过MSRP SEND消息来发送。此时,就需要用即时消息通用格式消息类型(MESSAGE/CPIM)内容类型(Content-type)来封装成功递送报告的内容类型:即时消息递送报告扩展标识语言(eXtensible Markup Language,XML)消息类型(message/imdn+xml);内容部属(Content-Disposition):通告(notification),并用XML的内容表示成功递送报告的相关信息,如收到消息的Message-ID,报告内容,时间,收到消息的概要描述等信息。In this embodiment, the successful delivery reports sent in step 311 and steps 315 to 316 may also be sent through MSRP SEND messages. At this point, it is necessary to encapsulate the content type of the successful delivery report with the general format message type (MESSAGE/CPIM) content type (Content-type) of the instant message: instant message delivery report eXtensible Markup Language (eXtensible Markup Language, XML) message type ( message/imdn+xml); content disposition (Content-Disposition): notification (notification), and use the content of XML to indicate the relevant information of the successful delivery report, such as the Message-ID of the received message, the content of the report, the time of the received message Summary description and other information.

本实施例中,如果客户端准备发送成功递送报告时,IM服务器B在发送完离线消息后就断开了MSRP数据通道,客户端B也可以通过基于初始会话协议的消息(SIP MESSAGE)发送递送成功报告,用MESSAGE/CPIM内容类型来封装递送报告的内容类型:message/imdn+xml;Content-Disposition:notification,并用XML的内容表示成功递送报告的相关信息,如收到消息的Message-ID,报告内容,时间,收到消息的概要描述等信息。此时,将步骤311改为:客户端B和客户端A及IM服务器B、IM服务器A之间建立MSRP数据通道,以便发送成功递送报告;将步骤312改为:客户端B通过IM服务器B,向IM服务器A发送包括成功递送报告的MSRP SEND消息。In this embodiment, if the client is ready to send a successful delivery report, the IM server B disconnects the MSRP data channel after sending the offline message, and the client B can also send the delivery through a message (SIP MESSAGE) based on the initial session protocol. For a successful report, use the MESSAGE/CPIM content type to encapsulate the content type of the delivery report: message/imdn+xml; Content-Disposition: notification, and use XML content to represent the relevant information of the successful delivery report, such as the Message-ID of the received message, Information such as report content, time, and a summary description of the received message. Now, change step 311 to: establish MSRP data channel between client B and client A, IM server B, and IM server A, so as to send a successful delivery report; change step 312 to: client B passes IM server B , sends an MSRP SEND message to IM server A including a successful delivery report.

本实施例通过SIP INVITE消息建立MSRP数据通道,也可以通过其他消息建立MSRP通道;本实施例通过SIP BYE消息断开MSRP数据通道,也可以通过其他消息断开MSRP通道。The present embodiment sets up the MSRP data channel by the SIP INVITE message, also can set up the MSRP channel by other messages; The present embodiment disconnects the MSRP data channel by the SIP BYE message, also can disconnect the MSRP channel by other messages.

本实施例也可以不通过IM服务器A来发送成功递送报告,可以直接建立IM服务器B与客户端A之间的MSRP数据通道,由IM服务器B将成功递送报告发送给客户端A,也可以建立客户端B与客户端A之间的MSRP数据通道,由客户端B直接将成功递送报告发送给客户端A。In this embodiment, the successful delivery report may not be sent through the IM server A, and the MSRP data channel between the IM server B and the client A may be directly established, and the IM server B sends the successful delivery report to the client A, or it may be established In the MSRP data channel between client B and client A, client B directly sends a successful delivery report to client A.

本实施例实现了成功递送报告的发送,也适用于其它类型的递送报告和阅读报告的发送。This embodiment realizes the sending of the successful delivery report, and is also applicable to the sending of other types of delivery reports and reading reports.

实施例二Embodiment two

实施例一中的成功递送报告是通过建立MSRP通道,并由MSRPREPORT消息来发送的;实际应用中,也可以不建立MSRP通道,并通过SIP MESSAGE消息发送,这就构成了本发明的实施例二。The successful delivery report in the first embodiment is sent by establishing the MSRP channel and sent by the MSRPREPORT message; in practical applications, the MSRP channel may not be established and sent by the SIP MESSAGE message, which constitutes the second embodiment of the present invention .

图4为本发明实施例二中发送即时消息报告的方法流程图。本实施例中,发送端和接收端所属的服务器分别为IM服务器A和IM服务器B,接收端的客户端B处于离线状态,但在上线之后能够接收离线消息,且通过SIP/IP核心网发送成功递送报告。如图4所示,本实施例中发送即时消息报告的方法包括以下步骤:FIG. 4 is a flowchart of a method for sending an instant message report in Embodiment 2 of the present invention. In this embodiment, the servers to which the sending end and the receiving end belong are IM server A and IM server B respectively, and the client B of the receiving end is offline, but can receive offline messages after going online, and the sending is successful through the SIP/IP core network Delivery report. As shown in Figure 4, the method for sending an instant message report in this embodiment includes the following steps:

步骤401~步骤413的操作过程与实施例一的步骤301~步骤313的操作过程相同。The operation process of step 401 to step 413 is the same as the operation process of step 301 to step 313 in the first embodiment.

步骤414~步骤416,IM服务器B发现MSRP数据通道已经断开后,依次通过SIP/IP核心网B和SIP/IP核心网A,向IM服务器A发送包括成功递送报告的SIP MESSAGE消息。In steps 414 to 416, after the IM server B finds that the MSRP data channel has been disconnected, it sends a SIP MESSAGE message including a successful delivery report to the IM server A through the SIP/IP core network B and the SIP/IP core network A in turn.

其中,递送报告的内容类型是通过MESSAGE/CPIM内容类型来进行封装的:message/imdn+xml;Content-Disposition:notification和XML的内容表示成功递送报告的相关信息,如收到消息的Message-ID,报告内容,时间,收到消息的概要描述等信息。Among them, the content type of the delivery report is encapsulated by the MESSAGE/CPIM content type: message/imdn+xml; Content-Disposition: the content of notification and XML indicates the relevant information of the successful delivery report, such as the Message-ID of the received message , report content, time, summary description of the received message and other information.

步骤417~步骤418,IM服务器A收到消息,通过消息头中的信息识别出SIP MESSAGE消息是发送给客户端A的,将SIP MESSAGE通过SIP/IP核心网A转发给客户端A。In steps 417 to 418, the IM server A receives the message, recognizes that the SIP MESSAGE message is sent to the client A through the information in the message header, and forwards the SIP MESSAGE to the client A through the SIP/IP core network A.

步骤419~步骤420,客户端A收到SIP MESSAGE消息中的递送成功报告后,通过SIP/IP核心网A向IM服务器A回复SIP 200“OK”消息,表示收到SIP MESSAGE消息。In steps 419 to 420, after client A receives the delivery success report in the SIP MESSAGE message, it replies a SIP 200 "OK" message to IM server A through the SIP/IP core network A, indicating that it has received the SIP MESSAGE message.

步骤421~步骤423,IM服务器A将SIP 200“OK”消息依次通过SIP/IP核心网A和SIP/IP核心网B发送给IM服务器B。From step 421 to step 423, IM server A sends the SIP 200 "OK" message to IM server B through SIP/IP core network A and SIP/IP core network B in sequence.

在步骤415~步骤423中,每次转发消息时,都可以先根据SIP MESSAGE消息或者SIP 200“OK”消息的消息头中的消息目的地信息,改变消息头中的路由相关信息,然后再进行转发。In steps 415 to 423, each time a message is forwarded, the route-related information in the message header can be changed according to the message destination information in the message header of the SIP MESSAGE message or the SIP 200 "OK" message, and then proceed Forward.

本实施例通过SIP INVITE消息建立MSRP数据通道,也可以通过其他消息建立MSRP通道;本实施例通过SIP BYE消息断开MSRP数据通道,也可以通过其他消息断开MSRP通道。The present embodiment sets up the MSRP data channel by the SIP INVITE message, and also can set up the MSRP channel by other messages; The present embodiment disconnects the MSRP data channel by the SIP BYE message, and can also disconnect the MSRP channel by other messages.

本实施例实现了成功递送报告的发送,也适用于其它类型的递送报告和阅读报告的发送。This embodiment realizes the sending of the successful delivery report, and is also applicable to the sending of other types of delivery reports and reading reports.

实施例三Embodiment Three

实施例一的方法同样适用于客户端B发送阅读报告,但当客户端B在接收到即时消息后没有立即阅读,而是在MSRP数据通道断开后才阅读,此时发送阅读报告的方法就构成了本发明的实施例三。The method in Embodiment 1 is also applicable to client B sending the reading report, but when client B does not read the instant message immediately after receiving the instant message, but reads it after the MSRP data channel is disconnected, the method of sending the reading report at this time is Constitute embodiment three of the present invention.

图5为本发明实施例三中发送即时消息报告的方法流程图。本实施例中,发送端和接收端所属的服务器分别为IM服务器A和IM服务器B,接收端的客户端B在MSRP数据通道断开之后阅读了客户端A发送的消息,通过MSRP数据通道来发送阅读报告。如图5所示,本实施例中发送即时消息报告的方法包括以下步骤:FIG. 5 is a flowchart of a method for sending an instant message report in Embodiment 3 of the present invention. In this embodiment, the servers to which the sending end and the receiving end belong are IM server A and IM server B respectively, and the client B at the receiving end reads the message sent by client A after the MSRP data channel is disconnected, and sends it through the MSRP data channel reading report. As shown in Figure 5, the method for sending an instant message report in this embodiment includes the following steps:

步骤501,用户A希望向用户B发送即时消息,由于消息超过SIP消息或客户端的限制,所以需要通过MSRP数据通道来发送,客户端A发送SIPINVITE消息与IM服务器A建立MSRP数据通道,同样地,IM服务器A和IM服务器B,IM服务器B和客户端B之间建立MSRP数据通道。In step 501, user A wishes to send an instant message to user B. Since the message exceeds the limit of SIP messages or clients, it needs to be sent through the MSRP data channel. Client A sends a SIP INVITE message to establish an MSRP data channel with IM server A. Similarly, An MSRP data channel is established between IM server A and IM server B, and between IM server B and client B.

本步骤中的SIP消息的限制为IM服务器不能发送大于1K字节的SIP消息,客户端的限制为客户端B不能接收大于1K字节的SIP消息。The limitation of the SIP message in this step is that the IM server cannot send SIP messages larger than 1K bytes, and the limitation of the client is that Client B cannot receive SIP messages larger than 1K bytes.

步骤502~步骤504,客户端A依次通过IM服务器A和IM服务器B,向客户端B发送MSRP SEND消息,包含Message-ID,部署报告类型为阅读报告(Disposition-Notification:read)等消息头和发送的消息等。In steps 502 to 504, client A sends MSRP SEND messages to client B through IM server A and IM server B in turn, including Message-ID, disposition report type is read report (Disposition-Notification: read) and other message headers and sent messages etc.

此时,由于作为接收端的客户端B在线,因此客户端A发送的MSRPSEND消息为在线消息。At this time, since client B as the receiving end is online, the MSRPSEND message sent by client A is an online message.

步骤505~步骤507,客户端B依次通过IM服务器B和IM服务器A,向客户端A回应MSRP 200“OK”消息,表示收到了消息,但不表示成功发送到目的端。From step 505 to step 507, client B responds to client A with an MSRP 200 "OK" message through IM server B and IM server A in turn, indicating that the message has been received, but it does not mean that it has been successfully sent to the destination.

步骤508,客户端B根据MSRP SEND消息的消息头中的信息,判断出接收到的消息需要向作为发送端的客户端A发送阅读报告,客户端B通过MSRP数据通道向客户端A报告成功收到消息,并通过项IM服务器B发送SIP BYE消息断开MSRP数据通道。Step 508, client B judges that the received message needs to send a reading report to client A as the sender according to the information in the message header of the MSRP SEND message, and client B reports successful receipt to client A through the MSRP data channel message, and send a SIP BYE message through item IM server B to disconnect the MSRP data channel.

其中,断开MSRP的原因可以为:客户端B等候一段时间没有消息发送,或者等待一定时间没有消息发送请求,为了节省网络资源而断开MSRP数据通道。Wherein, the reason for disconnecting MSRP may be: client B waits for a period of time without sending a message, or waits for a certain period of time without a message sending request, and disconnects the MSRP data channel in order to save network resources.

步骤509,用户B通过客户端B阅读收到的即时消息时,客户端B通过消息头中的信息判断出该消息中包括阅读报告请求。Step 509, when user B reads the received instant message through client B, client B judges that the message includes a reading report request according to the information in the message header.

步骤510,客户端B和客户端A及IM服务器B、IM服务器A之间建立MSRP数据通道,以便发送阅读报告。In step 510, an MSRP data channel is established between client B and client A, IM server B, and IM server A, so as to send reading reports.

步骤511~步骤513,客户端B依次通过IM服务器B和IM服务器A,向客户端A发送包括阅读报告的MSRP SEND消息。From step 511 to step 513, the client B sends the MSRP SEND message including the reading report to the client A through the IM server B and the IM server A in turn.

其中,递送报告的内容类型是通过MESSAGE/CPIM内容类型来进行封装的:message/imdn+xml;Content-Disposition:notification,并用XML的内容表示成功递送报告的相关信息,如收到消息的Message-ID,报告内容,时间,收到消息的概要描述等信息。Among them, the content type of the delivery report is encapsulated by the MESSAGE/CPIM content type: message/imdn+xml; Content-Disposition: notification, and the relevant information of the successful delivery report is represented by XML content, such as the Message- ID, report content, time, summary description of the received message and other information.

本步骤也可以通过MSRP REPORT消息来发送阅读报告。In this step, the reading report can also be sent through the MSRP REPORT message.

步骤514~步骤516,客户端A依次通过IM服务器A和IM服务器B,向客户端B回复MSRP 200“OK”消息,表示收到了MSRP SEND消息。From step 514 to step 516, client A returns MSRP 200 "OK" message to client B through IM server A and IM server B in turn, indicating that MSRP SEND message has been received.

步骤517,客户端A在一段时间没有消息发送,通过向IM服务器A发送SIP BYE消息,断开客户端A和客户端B之间的所有MSRP数据通道。Step 517, client A does not send a message for a period of time, and disconnects all MSRP data channels between client A and client B by sending a SIP BYE message to IM server A.

本实施例中所有消息都是通过客户端A、IM服务器A、IM服务器B以及客户端B之间的MSRP数据通道来发送和转发的。In this embodiment, all messages are sent and forwarded through the MSRP data channel among client A, IM server A, IM server B and client B.

本实施例通过SIP INVITE消息建立MSRP数据通道,也可以通过其他消息建立MSRP通道;本实施例通过SIP BYE消息断开MSRP数据通道,也可以通过其他消息断开MSRP通道。The present embodiment sets up the MSRP data channel by the SIP INVITE message, also can set up the MSRP channel by other messages; The present embodiment disconnects the MSRP data channel by the SIP BYE message, also can disconnect the MSRP channel by other messages.

本实施例中的方法适用于阅读在线消息后的阅读报告,也适用于阅读离线消息后的阅读报告。当本实施例的方法用与发送阅读离线消息后的阅读报告时,可以将步骤504~步骤507的操作过程替换为实施例一中步骤304~步骤310的操作过程,即用户获取离线消息的流程。The method in this embodiment is applicable to reading reports after reading online messages, and also applicable to reading reports after reading offline messages. When the method of this embodiment is used to send a reading report after reading offline messages, the operation process of steps 504 to 507 can be replaced with the operation process of steps 304 to 310 in the first embodiment, that is, the process for users to obtain offline messages .

本实施例也可以不通过IM服务器A和IM服务器B来发送阅读报告,可以建立IM服务器B与客户端A之间的MSRP数据通道,由IM服务器B将阅读报告发送给客户端A,也可以建立客户端B与客户端A之间的MSRP数据通道,由客户端B直接将阅读报告发送给客户端A。In this embodiment, the reading report may not be sent by the IM server A and the IM server B, the MSRP data channel between the IM server B and the client A may be established, and the reading report is sent to the client A by the IM server B, or Establish an MSRP data channel between client B and client A, and client B directly sends the reading report to client A.

实施例四Embodiment Four

实施例三中的阅读报告是通过MSRP REPORT消息来发送的,也可以通过SIP MESSAGE消息发送,这就构成了本发明的实施例四。The reading report in the third embodiment is sent by the MSRP REPORT message, and can also be sent by the SIP MESSAGE message, which constitutes the fourth embodiment of the present invention.

图6为本发明实施例四中发送即时消息报告的方法流程图。本实施例中,发送端和接收端所属的服务器分别为IM服务器A和IM服务器B,接收端的客户端B在MSRP数据通道断开之后阅读了客户端A发送的消息,通过SIP/IP核心网来发送阅读报告。如图6所示,本实施例中发送即时消息报告的方法包括以下步骤:FIG. 6 is a flowchart of a method for sending an instant message report in Embodiment 4 of the present invention. In this embodiment, the servers to which the sending end and the receiving end belong are respectively IM server A and IM server B, and the client B of the receiving end reads the message sent by the client A after the MSRP data channel is disconnected, and passes through the SIP/IP core network to send the reading report. As shown in Figure 6, the method for sending an instant message report in this embodiment includes the following steps:

步骤601~步骤609的操作过程与实施例三中步骤501~步骤509的操作过程相同。The operation process of step 601 to step 609 is the same as the operation process of step 501 to step 509 in the third embodiment.

步骤610,客户端B发现MSRP数据通道已经断开,通过SIP/IP核心网B向IM服务器B发送包括阅读报告的SIP MESSAGE消息。Step 610, the client B finds that the MSRP data channel has been disconnected, and sends a SIP MESSAGE message including the reading report to the IM server B through the SIP/IP core network B.

其中,阅读报告的内容类型是通过MESSAGE/CPIM内容类型来进行封装的:message/imdn+xml;Content-Disposition:notification,并用XML的内容表示阅读报告的相关信息,如收到消息的Message-ID,报告内容,时间,收到消息的概要描述等信息。Among them, the content type of the reading report is encapsulated by the content type of MESSAGE/CPIM: message/imdn+xml; Content-Disposition: notification, and the content of XML is used to represent the relevant information of the reading report, such as the Message-ID of the received message , report content, time, summary description of the received message and other information.

步骤611,SIP/IP核心网B根据SIP MESSAGE消息的消息头中的消息目的地信息,改变消息头中的路由相关信息后,再将SIP MESSAGE消息转发给IM服务器B。Step 611, the SIP/IP core network B forwards the SIP MESSAGE message to the IM server B after changing the routing-related information in the message header according to the message destination information in the message header of the SIP MESSAGE message.

步骤612~步骤614,IM服务器B依次通过SIP/IP核心网B和SIP/IP核心网A,将SIP MESSAGE消息转发给IM服务器A。In steps 612 to 614, the IM server B forwards the SIP MESSAGE message to the IM server A through the SIP/IP core network B and the SIP/IP core network A in turn.

步骤615~步骤616,IM服务器A收到消息,通过消息头识别出包括阅读报告的SIP MESSAGE消息是发送给客户端A的,将SIP MESSAGE通过SIP/IP核心网A转发给客户端A。In steps 615 to 616, the IM server A receives the message, recognizes through the message header that the SIP MESSAGE message including the reading report is sent to the client A, and forwards the SIP MESSAGE to the client A through the SIP/IP core network A.

步骤617~步骤618,客户端A收到阅读报告,通过SIP/IP核心网A向IM服务器A回复SIP 200“OK”,表示收到SIP MESSAGE消息。In steps 617 to 618, client A receives the reading report, and replies SIP 200 "OK" to IM server A through SIP/IP core network A, indicating that a SIP MESSAGE message has been received.

步骤619~步骤621,IM服务器A依次通过SIP/IP核心网A、SIP/IP核心网B,将SIP 200“OK”消息转发给IM服务器B。From step 619 to step 621, IM server A forwards the SIP 200 "OK" message to IM server B through SIP/IP core network A and SIP/IP core network B in turn.

步骤622~步骤623,IM服务器B收到消息,通过消息头识别出SIP 200“OK”消息是发送给客户端B的,将SIP 200“OK”通过SIP/IP核心网B转发给客户端B。Step 622 ~ Step 623, IM server B receives the message, recognizes that the SIP 200 "OK" message is sent to client B through the message header, and forwards the SIP 200 "OK" message to client B through SIP/IP core network B .

在步骤611~步骤623中,每次转发时,都可以先根据SIP MESSAGE消息或者SIP 200“OK”消息的消息头中的消息目的地信息,改变消息头中的路由相关信息,然后再进行转发。In steps 611 to 623, when forwarding each time, the route-related information in the message header can be changed according to the message destination information in the message header of the SIP MESSAGE message or the SIP 200 "OK" message, and then forwarded .

本实施例通过SIP INVITE消息建立MSRP数据通道,也可以通过其他消息建立MSRP通道;本实施例通过SIP BYE消息断开MSRP数据通道,也可以通过其他消息断开MSRP通道。The present embodiment sets up the MSRP data channel by the SIP INVITE message, also can set up the MSRP channel by other messages; The present embodiment disconnects the MSRP data channel by the SIP BYE message, also can disconnect the MSRP channel by other messages.

本实施例中的方法适用于阅读在线消息后的阅读报告,也适用于阅读离线消息后的阅读报告。当本实施例的方法用与发送阅读离线消息后的阅读报告时,可以将步骤604~步骤607的操作过程替换为实施例一中步骤304~步骤310的操作过程,即用户获取离线消息的流程。The method in this embodiment is applicable to reading reports after reading online messages, and also applicable to reading reports after reading offline messages. When the method of this embodiment is used to send a reading report after reading offline messages, the operation process of steps 604 to 607 can be replaced with the operation process of steps 304 to 310 in the first embodiment, that is, the process for users to obtain offline messages .

实施例五Embodiment five

客户端B在很长时间内没有获取存储在IM服务器B的离线消息后,此时IM服务器B会删除超时的离线消息,并通过MSRP通道发送失败递送报告的方法就构成了本发明的实施例五。After the client B does not obtain the offline message stored in the IM server B for a long time, the IM server B will delete the timed-out offline message at this time, and the method of sending a delivery failure report through the MSRP channel constitutes an embodiment of the present invention five.

图7为本发明实施例五中发送即时消息报告的方法流程图。本实施例中,发送端和接收端所属的服务器分别为IM服务器A和IM服务器B,客户端B处于离线状态,IM服务器B在存储离线消息超时后,通过MSRP数据通道来发送失败递送报告。如图7所示,本实施例中发送即时消息报告的方法包括以下步骤:FIG. 7 is a flowchart of a method for sending an instant message report in Embodiment 5 of the present invention. In this embodiment, the servers to which the sending end and the receiving end belong are IM server A and IM server B respectively, client B is offline, and IM server B sends a delivery failure report through the MSRP data channel after storing the offline message timeout. As shown in Figure 7, the method for sending an instant message report in this embodiment includes the following steps:

步骤701,IM服务器B保存用户B的离线消息超时,删除该离线消息,并根据消息的消息头中的信息发现该消息中包括失败递送报告请求。In step 701, the IM server B saves the offline message of user B for a timeout, deletes the offline message, and finds that the message includes a failed delivery report request according to the information in the message header of the message.

步骤702,IM服务器B发现MSRP数据通道已经断开,向IM服务器A发送SIP INVITE消息,建立与IM服务器A之间的MSRP数据通道,同样地,IM服务器A建立客户端A与其之间的MSRP数据通道。Step 702, IM server B finds that the MSRP data channel has been disconnected, sends a SIP INVITE message to IM server A, and establishes an MSRP data channel with IM server A, similarly, IM server A establishes MSRP between client A and it data channel.

步骤703~步骤704,IM服务器B通过IM服务器A发送包括失败递送报告的MSRP REPORT消息到客户端A。In steps 703 to 704, the IM server B sends the MSRP REPORT message including the delivery failure report to the client A through the IM server A.

其中,递送报告的内容类型是通过MESSAGE/CPIM内容类型来进行封装的:message/imdn+xml;Content-Disposition:notification,并用XML的内容表示成功递送报告的相关信息,如收到消息的Message-ID,报告内容,时间,收到消息的概要描述等信息。Among them, the content type of the delivery report is encapsulated by the MESSAGE/CPIM content type: message/imdn+xml; Content-Disposition: notification, and the relevant information of the successful delivery report is represented by XML content, such as the Message- ID, report content, time, summary description of the received message and other information.

本步骤也可以通过MSRP REPORT消息来发送阅读报告。In this step, the reading report can also be sent through the MSRP REPORT message.

步骤705~步骤706,客户端A通过IM服务器A向IM服务器B回复MSRP 200“OK”,表示成功收到MSRP REPORT消息。In steps 705 to 706, client A replies MSRP 200 "OK" to IM server B through IM server A, indicating that the MSRP REPORT message has been successfully received.

步骤707,IM服务器A断开MSRP数据通道。Step 707, IM server A disconnects the MSRP data channel.

本实施例中所有消息都是通过客户端A、IM服务器A以及IM服务器B之间的MSRP数据通道来发送和转发的。All messages in this embodiment are sent and forwarded through the MSRP data channel among the client A, IM server A and IM server B.

本实施例通过SIP INVITE消息建立MSRP数据通道,也可以通过其他消息建立MSRP通道;本实施例通过SIP BYE消息断开MSRP数据通道,也可以通过其他消息断开MSRP通道。The present embodiment sets up the MSRP data channel by the SIP INVITE message, also can set up the MSRP channel by other messages; The present embodiment disconnects the MSRP data channel by the SIP BYE message, also can disconnect the MSRP channel by other messages.

本实施例也可以不通过IM服务器A来发送失败递送报告,可以直接建立IM服务器B与客户端A之间的MSRP数据通道,由IM服务器B将失败递送报告发送给客户端A,也可以建立客户端B与客户端A之间的MSRP数据通道,由客户端B直接将失败递送报告发送给客户端A。In this embodiment, the delivery failure report may not be sent through the IM server A, but the MSRP data channel between the IM server B and the client A may be directly established, and the IM server B sends the delivery failure report to the client A, or an MSRP data channel may be established. In the MSRP data channel between client B and client A, client B directly sends a delivery failure report to client A.

本实施例发送失败递送报告的方法适用于IM服务器B删除了超时的离线信息,也适用于用户B通过客户端B不获取离线信息而是直接在IM服务器B删除离线信息的情况。The method for sending a delivery failure report in this embodiment is applicable to the case where the IM server B deletes the timed-out offline information, and is also applicable to the situation where the user B directly deletes the offline information on the IM server B without obtaining the offline information through the client B.

实施例六Embodiment six

客户端B在很长时间内没有获取存储在IM服务器B的离线消息后,此时IM服务器B会删除超时的离线消息,不建立MSRP数据通道,并发送失败递送报告的方法就构成了本发明的实施例六。After the client B does not obtain the offline message stored in the IM server B for a long time, the IM server B will delete the timed-out offline message at this time, do not establish an MSRP data channel, and send a delivery failure report, which constitutes the present invention Embodiment six.

图8为本发明实施例六中发送即时消息报告的方法流程图。本实施例中,发送端和接收端所属的服务器分别为IM服务器A和IM服务器B,客户端B处于离线状态,IM服务器B在存储离线消息超时后,通过SIP/IP核心网来发送失败递送报告。如图8所示,本实施例中发送即时消息报告的方法包括以下步骤:FIG. 8 is a flowchart of a method for sending an instant message report in Embodiment 6 of the present invention. In this embodiment, the servers to which the sending end and the receiving end belong are IM server A and IM server B respectively, client B is offline, and IM server B sends the failed delivery message through the SIP/IP core network after the timeout of storing the offline message Report. As shown in Figure 8, the method for sending an instant message report in this embodiment includes the following steps:

步骤801,IM服务器B保存用户B的离线消息超时,删除该离线消息,并根据消息的消息头中的信息发现该消息中包括失败递送报告请求。In step 801, the IM server B saves the offline message of user B for a timeout, deletes the offline message, and finds that the message includes a delivery failure report request according to the information in the message header of the message.

步骤802~步骤804,IM服务器B发现MSRP数据通道已经断开,依次通过SIP/IP核心网B、SIP/IP核心网A向IM服务器A发送包括失败递送报告的SIP MESSAGE消息。In steps 802 to 804, the IM server B finds that the MSRP data channel has been disconnected, and sends a SIP MESSAGE message including a delivery failure report to the IM server A through the SIP/IP core network B and the SIP/IP core network A in turn.

其中,递送报告的内容类型是通过MESSAGE/CPIM内容类型来进行封装的:message/imdn+xml;Content-Disposition:notification,并用XML的内容表示成功递送报告的相关信息,如收到消息的Message-ID,报告内容,时间,收到消息的概要描述等信息。Among them, the content type of the delivery report is encapsulated by the MESSAGE/CPIM content type: message/imdn+xml; Content-Disposition: notification, and the relevant information of the successful delivery report is represented by XML content, such as the Message- ID, report content, time, summary description of the received message and other information.

步骤805~步骤806,IM服务器A收到消息,通过消息头中的信息发现包括失败递送报告的SIP MESSAGE消息是发送给客户端A的,将SIPMESSAGE通过SIP/IP核心网A转发给客户端A。In steps 805 to 806, IM server A receives the message, finds that the SIP MESSAGE message including the failed delivery report is sent to client A through the information in the message header, and forwards the SIPMESSAGE to client A through SIP/IP core network A .

步骤807~步骤808,客户端A收到递送报告,并通过SIP/IP核心网A向IM服务器A回复SIP 200“OK”消息,表示收到SIP MESSAGE消息。In steps 807 to 808, client A receives the delivery report, and replies a SIP 200 "OK" message to IM server A through SIP/IP core network A, indicating receipt of the SIP MESSAGE message.

步骤809~步骤811,IM服务器A将SIP 200“OK”消息依次通过SIP/IP核心网A和SIP/IP核心网B发送给IM服务器B。From step 809 to step 811, IM server A sends the SIP 200 "OK" message to IM server B through SIP/IP core network A and SIP/IP core network B in sequence.

在步骤803~步骤811中,每次转发时,都可以先根据SIP MESSAGE消息或者SIP 200“OK”消息的消息头中的消息目的地信息,改变消息头中的路由相关信息,然后再进行转发。In steps 803 to 811, when forwarding each time, the route-related information in the message header can be changed according to the message destination information in the message header of the SIP MESSAGE message or the SIP 200 "OK" message, and then forwarded .

本实施例发送失败递送报告的方法适用于IM服务器B删除了超时的离线信息,也适用于用户B通过客户端B不获取离线信息而是直接删除离线信息的情况。The method for sending a delivery failure report in this embodiment is applicable to the case where the IM server B deletes the timed-out offline information, and is also applicable to the situation where the user B does not obtain the offline information through the client B but directly deletes the offline information.

上述实施例一至实施例六中,发送端和接收端所属的IM服务器均为不同的服务器,下面以发送端和接收端所属的IM服务器为同一个服务器为例,对本发明的技术方案进行详细说明。In the above-mentioned embodiments 1 to 6, the IM servers to which the sending end and the receiving end belong are all different servers. The following takes the IM server to which the sending end and the receiving end belong are the same server as an example to describe the technical solution of the present invention in detail .

实施例七Embodiment seven

实施例一中的即时消息和成功递送报告在属于一个相同IM服务器的客户端之间发送时,就构成了本发明的实施例七。When the instant message and the successful delivery report in the first embodiment are sent between clients belonging to the same IM server, it constitutes the seventh embodiment of the present invention.

图9为本发明实施例七中发送即时消息报告的方法流程图。本实施例中,发送端和接收端所属的服务器均为IM服务器,接收端的客户端B处于离线状态,但在上线之后能够接收离线消息,并通过MSRP数据通道来发送成功递送报告。如图9所示,本实施例中发送即时消息报告的方法包括以下步骤:FIG. 9 is a flowchart of a method for sending an instant message report in Embodiment 7 of the present invention. In this embodiment, the servers of the sending end and the receiving end are both IM servers, and the client B of the receiving end is offline, but can receive offline messages after going online, and send a successful delivery report through the MSRP data channel. As shown in Figure 9, the method for sending an instant message report in this embodiment includes the following steps:

步骤901,客户端A根据用户A的请求,发送SIP INVITE消息建立与IM服务器之间的MSRP数据通道。Step 901, client A sends a SIP INVITE message to establish an MSRP data channel with the IM server according to user A's request.

步骤902,客户端A通过MSRP通道向IM服务器发送MSRP SEND消息。Step 902, client A sends an MSRP SEND message to the IM server through the MSRP channel.

由于此时客户端B离线,因此客户端A发送的MSRP SEND消息属于离线消息。Since client B is offline at this time, the MSRP SEND message sent by client A is an offline message.

其中,MSRP SEND消息包括:Message-ID,Success-Report:yes;Failure-Report:yes等消息头和发送的消息等。Among them, the MSRP SEND message includes: Message-ID, Success-Report: yes; Failure-Report: yes and other message headers and sent messages.

步骤903,IM服务器存储离线消息,并向客户端A回复MSRP 200“OK”消息,表示IM服务器已收到了离线消息。Step 903, the IM server stores the offline message, and replies an MSRP 200 "OK" message to client A, indicating that the IM server has received the offline message.

其中,MSRP 200“OK”消息仅表示收到了离线消息,不表示离线消息已成功发送到作为目的客户端的客户端B。Among them, the MSRP 200 "OK" message only means that the offline message has been received, and does not mean that the offline message has been successfully sent to client B as the destination client.

IM服务器包括在线消息存储单元和离线消息存储单元,本实施例中的离线消息是存储在离线消息存储单元中的。在线消息存储单元和离线消息存储单元可以构成一个IM服务器,也可以分别为两个服务器。The IM server includes an online message storage unit and an offline message storage unit, and the offline messages in this embodiment are stored in the offline message storage unit. The online message storage unit and the offline message storage unit may constitute an IM server, or may be two servers respectively.

步骤904~步骤911的操作过程与实施例一中步骤306~步骤313的操作过程相同,将实施例一中步骤306~步骤313中的IM服务器B替换为IM服务器。The operation process of step 904 to step 911 is the same as the operation process of step 306 to step 313 in the first embodiment, and the IM server B in the step 306 to step 313 in the first embodiment is replaced with an IM server.

步骤912,IM服务器发现MSRP数据通道已经断开后,通过向客户端A发送SIP INVITE消息,建立IM服务器和客户端A之间的MSRP数据通道。Step 912, after the IM server finds that the MSRP data channel has been disconnected, it sends a SIP INVITE message to the client A to establish the MSRP data channel between the IM server and the client A.

步骤913,IM服务器通过MSRP数据通道,向客户端A发送包括成功递送报告的MSRP REPORT消息。Step 913, the IM server sends an MSRP REPORT message including a successful delivery report to client A through the MSRP data channel.

步骤914,客户端A向IM服务器发送MSRP 200“OK”消息,表示成功收到MSRP REPORT消息。In step 914, client A sends an MSRP 200 "OK" message to the IM server, indicating that the MSRP REPORT message has been successfully received.

步骤915,断开发送消息递送报告的MSRP数据通道。Step 915, disconnect the MSRP data channel for sending the message delivery report.

本实施例中,步骤909和步骤913中发送的成功递送报告,也可以通过MSRP SEND消息来发送。此时,就需要用MESSAGE/CPIM内容类型(content-type)来封装成功递送报告的内容类型:message/imdn+xml;Content-Disposition:notification,并用XML的内容表示成功递送报告的相关信息,如收到消息的Message-ID,报告内容,时间,收到消息的概要描述等信息。In this embodiment, the successful delivery report sent in step 909 and step 913 may also be sent through MSRP SEND message. At this time, it is necessary to use MESSAGE/CPIM content type (content-type) to encapsulate the content type of the successful delivery report: message/imdn+xml; Content-Disposition: notification, and use XML content to represent the relevant information of the successful delivery report, such as Information such as the Message-ID of the received message, report content, time, and a summary description of the received message.

本实施例中,如果客户端准备发送成功递送报告时,IM服务器B在发送完离线消息后就断开了MSRP数据通道,客户端B也可以选择通过用SIPMESSAGE发送递送成功报告,用MESSAGE/CPIM内容类型来封装递送报告的内容类型:message/imdn+xml;Content-Disposition:notification,并用XML的内容表示成功递送报告的相关信息,如收到消息的Message-ID,报告内容,时间,收到消息的概要描述等信息。此时,将步骤909改为:客户端B和客户端A及IM服务器之间通过互发SIP INVITE消息来建立MSRP数据通道,以便发送成功递送报告。In this embodiment, if the client is ready to send a successful delivery report, and the IM server B disconnects the MSRP data channel after sending the offline message, the client B can also choose to send the delivery success report with SIPMESSAGE, and use Content type to encapsulate the content type of the delivery report: message/imdn+xml; Content-Disposition: notification, and use XML content to represent the relevant information of the successful delivery report, such as the Message-ID of the received message, report content, time, received Information such as a summary description of the message. At this point, change step 909 to: client B, client A and the IM server send SIP INVITE messages to each other to establish an MSRP data channel, so as to send a successful delivery report.

本实施例通过SIP INVITE消息建立MSRP数据通道,也可以通过其他消息建立MSRP通道;本实施例通过SIP BYE消息断开MSRP数据通道,也可以通过其他消息断开MSRP通道。The present embodiment sets up the MSRP data channel by the SIP INVITE message, also can set up the MSRP channel by other messages; The present embodiment disconnects the MSRP data channel by the SIP BYE message, also can disconnect the MSRP channel by other messages.

本实施例中,成功递送报告可以通过IM服务器发送给客户端A,也可以建立客户端B与客户端A之间的MSRP数据通道,由客户端B直接将成功递送报告发送给客户端A。In this embodiment, the successful delivery report may be sent to client A through the IM server, or an MSRP data channel between client B and client A may be established, and client B directly sends the successful delivery report to client A.

本实施例实现了成功递送报告的发送,也适用于其它类型的递送报告和阅读报告的发送。This embodiment realizes the sending of the successful delivery report, and is also applicable to the sending of other types of delivery reports and reading reports.

实施例八Embodiment eight

实施例四中的即时消息和阅读报告在属于一个相同IM服务器的客户端之间发送时,就构成了本发明的实施例八。When the instant message and reading report in the fourth embodiment are sent between clients belonging to the same IM server, it constitutes the eighth embodiment of the present invention.

图10为本发明实施例八中发送即时消息报告的方法流程图。本实施例中,发送端和接收端所属的服务器均为IM服务器,接收端的客户端B在MSRP数据通道断开之后阅读了客户端A发送的消息,通过SIP/IP核心网来发送阅读报告。如图10所示,本实施例中发送即时消息报告的方法包括以下步骤:FIG. 10 is a flowchart of a method for sending an instant message report in Embodiment 8 of the present invention. In this embodiment, the servers belonging to the sending end and the receiving end are both IM servers, and the client B at the receiving end reads the message sent by the client A after the MSRP data channel is disconnected, and sends the reading report through the SIP/IP core network. As shown in Figure 10, the method for sending an instant message report in this embodiment includes the following steps:

步骤1001,用户A希望向用户B发送即时消息,由于消息超过SIP消息或客户端的限制,所以需要通过MSRP数据通道来发送,客户端A发送SIP INVITE消息与IM服务器建立MSRP数据通道,同样地,IM服务器和客户端B之间建立MSRP数据通道。Step 1001, user A wishes to send an instant message to user B. Since the message exceeds the limit of SIP messages or clients, it needs to be sent through the MSRP data channel. Client A sends a SIP INVITE message to establish an MSRP data channel with the IM server. Similarly, An MSRP data channel is established between the IM server and client B.

本步骤中的SIP消息的限制为IM服务器不能发送大于1K字节的SIP消息,客户端的限制为客户端B不能接收大于2K字节的SIP消息。The limitation of the SIP message in this step is that the IM server cannot send SIP messages larger than 1K bytes, and the limitation of the client is that Client B cannot receive SIP messages larger than 2K bytes.

步骤1002~步骤1003,客户端A通过IM服务器向客户端B发送MSRPSEND消息,包含Message-ID,Disposition-Notification:read等消息头和发送的消息等。In steps 1002 to 1003, client A sends an MSRPSEND message to client B through the IM server, including message headers such as Message-ID, Disposition-Notification: read and the sent message.

步骤1004~步骤1005,客户端B通过IM服务器向客户端A回应MSRP200“OK”消息,表示收到了消息,但不表示成功发送到目的端。In steps 1004 to 1005, client B responds to client A with an MSRP200 "OK" message through the IM server, indicating that the message has been received, but it does not mean that it has been successfully sent to the destination.

步骤1006,客户端B根据消息头中的阅读报告请求,判断出接收到的消息需要向作为发送端的客户端A发送阅读报告,客户端B通过MSRP数据通道向客户端A报告成功收到消息,并通过项IM服务器B发送SIP BYE消息断开MSRP数据通道。Step 1006, client B judges that the received message needs to send a reading report to client A as the sender according to the reading report request in the message header, and client B reports successful receipt of the message to client A through the MSRP data channel, And send a SIP BYE message through the IM server B to disconnect the MSRP data channel.

其中,断开MSRP的原因可以为:客户端B等候一段时间没有消息发送,或者等待一定时间没有消息发送请求,为了节省网络资源而断开MSRP数据通道。Wherein, the reason for disconnecting MSRP may be: client B waits for a period of time without sending a message, or waits for a certain period of time without a message sending request, and disconnects the MSRP data channel in order to save network resources.

步骤1007,用户B通过客户端B阅读收到的即时消息时,客户端B通过消息头中的信息判断出该消息有阅读报告请求。Step 1007, when user B reads the received instant message through client B, client B judges that the message has a reading report request based on the information in the message header.

步骤1008~步骤1009,客户端B发现MSRP数据通道已经断开,所以客户端B通过SIP/IP核心网向IM服务器发送包括阅读报告的SIP MESSAGE消息。In steps 1008 to 1009, the client B finds that the MSRP data channel has been disconnected, so the client B sends a SIP MESSAGE message including the reading report to the IM server through the SIP/IP core network.

其中,阅读报告的内容类型是通过MESSAGE/CPIM内容类型来进行封装的:message/imdn+xml;Content-Disposition:notification,并用XML的内容表示阅读报告的相关信息,如收到消息的Message-ID,报告内容,时间,收到消息的概要描述等信息。Among them, the content type of the reading report is encapsulated by the content type of MESSAGE/CPIM: message/imdn+xml; Content-Disposition: notification, and the content of XML is used to represent the relevant information of the reading report, such as the Message-ID of the received message , report content, time, summary description of the received message and other information.

步骤1010~步骤1011,IM服务器收到消息,通过消息头识别出包括阅读报告的SIP MESSAGE消息是发送给客户端A的,将SIP MESSAGE通过SIP/IP核心网转发给客户端A。Step 1010~step 1011, the IM server receives the message, recognizes that the SIP MESSAGE message including the reading report is sent to the client A through the message header, and forwards the SIP MESSAGE to the client A through the SIP/IP core network.

步骤1012~步骤1013,客户端A收到阅读报告,通过SIP/IP核心网向IM服务器回复SIP 200“OK”消息,表示收到SIP MESSAGE消息。In steps 1012 to 1013, client A receives the reading report, and replies a SIP 200 "OK" message to the IM server through the SIP/IP core network, indicating that the SIP MESSAGE message has been received.

步骤1014~步骤1015,IM服务器收到消息,通过消息头识别出SIP 200“OK”消息是发送给客户端B的,将SIP 200“OK”通过SIP/IP核心网转发给客户端B。Steps 1014 to 1015, the IM server receives the message, recognizes that the SIP 200 "OK" message is sent to client B through the message header, and forwards the SIP 200 "OK" to client B through the SIP/IP core network.

在步骤1008~步骤1015中,每次转发消息时,都可以先根据SIPMESSAGE消息或者SIP 200“OK”消息的消息头中的消息目的地信息,改变消息头中的路由相关信息,然后再进行转发。In steps 1008 to 1015, each time a message is forwarded, the route-related information in the message header can be changed according to the message destination information in the SIPMESSAGE message or the message header of the SIP 200 "OK" message, and then forwarded .

本实施例通过SIP INVITE消息建立MSRP数据通道,也可以通过其他消息建立MSRP通道;本实施例通过SIP BYE消息断开MSRP数据通道,也可以通过其他消息断开MSRP通道。The present embodiment sets up the MSRP data channel by the SIP INVITE message, also can set up the MSRP channel by other messages; The present embodiment disconnects the MSRP data channel by the SIP BYE message, also can disconnect the MSRP channel by other messages.

本实施例也可以通过MSRP数据通道来发送阅读报告。此时,发送阅读报告可以通过IM服务器,也可以建立客户端B与客户端A之间的MSRP数据通道,由客户端B直接将阅读报告发送给客户端A。In this embodiment, the reading report can also be sent through the MSRP data channel. At this time, the reading report can be sent through the IM server, or an MSRP data channel between the client B and the client A can be established, and the client B directly sends the reading report to the client A.

本实施例中的方法适用于阅读在线消息后的阅读报告,也适用于阅读离线消息后的阅读报告。当本实施例的方法用与发送阅读离线消息后的阅读报告时,可以将步骤1002~步骤1004的操作过程替换为实施例七中步骤904~步骤910的操作过程,即用户获取离线消息的流程。The method in this embodiment is applicable to reading reports after reading online messages, and also applicable to reading reports after reading offline messages. When the method of this embodiment is used to send a reading report after reading offline messages, the operation process of steps 1002 to 1004 can be replaced with the operation process of steps 904 to 910 in Embodiment 7, that is, the process for users to obtain offline messages .

实施例九Embodiment nine

实施例五中的即时消息和失败递送报告在属于一个相同IM服务器的客户端之间发送时,就构成了本发明的实施例九。When the instant message and delivery failure report in the fifth embodiment are sent between clients belonging to the same IM server, it constitutes the ninth embodiment of the present invention.

图11为本发明实施例九中发送即时消息报告的方法流程图。本实施例中,发送端和接收端所属的服务器均为IM服务器,客户端B处于离线状态,IM服务器在存储离线消息超时后,通过MSRP数据通道来发送失败递送报告。如图11所示,本实施例中发送即时消息报告的方法包括以下步骤:FIG. 11 is a flowchart of a method for sending an instant message report in Embodiment 9 of the present invention. In this embodiment, the servers belonging to the sending end and the receiving end are both IM servers, and the client B is in an offline state. After the timeout of storing offline messages, the IM server sends a delivery failure report through the MSRP data channel. As shown in Figure 11, the method for sending an instant message report in this embodiment includes the following steps:

步骤1101,IM服务器保存用户B的离线消息超时,删除该离线消息,并根据消息中的消息头中的信息发现该消息中包括失败递送报告请求。In step 1101, the IM server saves the offline message of user B for a timeout, deletes the offline message, and finds that the message includes a failed delivery report request according to the information in the message header of the message.

步骤1102,IM服务器发现MSRP数据通道已经断开,所以IM服务器向客户端A发送SIP INVITE消息,建立与客户端A之间的MSRP数据通道。Step 1102, the IM server finds that the MSRP data channel has been disconnected, so the IM server sends a SIP INVITE message to the client A to establish an MSRP data channel with the client A.

步骤1103,IM服务器发送包括失败递送报告的MSRP REPORT消息到客户端A。Step 1103, the IM server sends an MSRP REPORT message including a delivery failure report to client A.

其中,递送报告的内容类型是通过MESSAGE/CPIM内容类型来进行封装的:message/imdn+xml;Content-Disposition:notification,并用XML的内容表示成功递送报告的相关信息,如收到消息的Message-ID,报告内容,时间,收到消息的概要描述等信息。Among them, the content type of the delivery report is encapsulated by the MESSAGE/CPIM content type: message/imdn+xml; Content-Disposition: notification, and the relevant information of the successful delivery report is represented by XML content, such as the Message- ID, report content, time, summary description of the received message and other information.

本步骤也可以通过MSRP REPORT消息来发送阅读报告。In this step, the reading report can also be sent through the MSRP REPORT message.

步骤1104,客户端A向IM服务器回复MSRP 200“OK”消息,表示成功收到MSRP REPORT消息。Step 1104, client A replies MSRP 200 "OK" message to the IM server, indicating that the MSRP REPORT message has been successfully received.

步骤1105,IM服务器断开发送消息递送报告的MSRP数据通道。Step 1105, the IM server disconnects the MSRP data channel for sending the message delivery report.

本实施例通过SIP INVITE消息建立MSRP数据通道,也可以通过其他消息建立MSRP通道;本实施例通过SIP BYE消息断开MSRP数据通道,也可以通过其他消息断开MSRP通道。The present embodiment sets up the MSRP data channel by the SIP INVITE message, also can set up the MSRP channel by other messages; The present embodiment disconnects the MSRP data channel by the SIP BYE message, also can disconnect the MSRP channel by other messages.

本实施例中,失败递送报告可以通过IM服务器发送给客户端A,也可以建立客户端B与客户端A之间的MSRP数据通道,由客户端B直接将失败递送报告发送给客户端A。In this embodiment, the delivery failure report may be sent to client A through the IM server, or an MSRP data channel between client B and client A may be established, and client B directly sends the delivery failure report to client A.

本实施例发送失败递送报告的方法适用于IM服务器删除了超时的离线信息,也适用于用户B通过客户端B不获取离线信息而是直接在IM服务器删除离线信息的情况。The method for sending a delivery failure report in this embodiment is applicable to the case where the IM server deletes the timed-out offline information, and is also applicable to the situation where the user B does not obtain the offline information through the client B but directly deletes the offline information on the IM server.

本发明的实施例二、实施例四和实施例八中,MSRP数据通道可以在客户端B接收离线消息或者阅读离线消息之前断开,也可以在客户端B接收离线消息或者阅读离线消息之后断开,MSRP数据通道断开之后,发送即时消息报告的步骤可以改为通过SIP/IP核心网发送。In Embodiment 2, Embodiment 4 and Embodiment 8 of the present invention, the MSRP data channel can be disconnected before client B receives or reads offline messages, or after client B receives offline messages or reads offline messages. On, after the MSRP data channel is disconnected, the step of sending the instant message report can be changed to send through the SIP/IP core network.

以上所述仅为本发明的较佳实施例而已,并非用于限定本发明的保护范围。凡在本发明的精神和原则之内,所作的任何修改、等同替换以及改进等,均应包含在本发明的保护范围之内。The above descriptions are only preferred embodiments of the present invention, and are not intended to limit the protection scope of the present invention. Any modifications, equivalent replacements and improvements made within the spirit and principles of the present invention shall be included within the protection scope of the present invention.

Claims (10)

1. transfer immediate news in immediate news systems the system reported, is applicable to SIP/SIMPLE system, comprises: receiving terminal, the server of instant message belonging to described receiving terminal, transmitting terminal, the server of instant message belonging to described transmitting terminal;
Described receiving terminal, after in reception, side judges to comprise instant message report request in the instant message received, to transfer immediate news report to the server of instant message belonging to described receiving terminal;
Server of instant message belonging to described receiving terminal, for sending described instant message report to the server of instant message belonging to described transmitting terminal;
Server of instant message belonging to described transmitting terminal, for sending described instant message report to described transmitting terminal, described instant message report is Successful delivery report;
Described transmitting terminal, before carrying out described judgement in described reception side, when the client off-line of described reception side, the client to described reception side sends the instant message comprising instant message report request;
Server of instant message belonging to described receiving terminal, for storing described instant message, so that receive after the client of side reaches the standard grade, obtains the described instant message that described transmitting terminal sends from the server of instant message belonging to described receiving terminal.
2. the system as claimed in claim 1, it is characterized in that, server of instant message belonging to described receiving terminal is further used for, if the server of instant message belonging to described receiving terminal and do not have message session Relay Protocol Data expanding channels between described transmitting terminal, after described receiving terminal transfers immediate news report to the server of instant message belonging to described receiving terminal, and before the server of instant message belonging to described receiving terminal sends described instant message report to the server of instant message belonging to described transmitting terminal, initiate to set up all message session Relay Protocol Data passages between described transmitting terminal,
Server of instant message belonging to described transmitting terminal sends described instant message report to described transmitting terminal, described instant message report for Successful delivery report specifically comprise: the server of instant message belonging to described transmitting terminal by message session Relay Protocol Data passage send described Successful delivery report.
3. the system as claimed in claim 1, it is characterized in that, the server of instant message belonging to described receiving terminal stores described instant message and specifically comprises: described instant message is stored in the deferred information memory cell of self by the server of instant message belonging to described receiving terminal.
4. transfer immediate news in immediate news systems the system reported, is applicable to SIP/SIMPLE system, comprises: receiving terminal, the server of instant message belonging to described receiving terminal, transmitting terminal, the server of instant message belonging to described transmitting terminal;
Described receiving terminal, after in reception, side judges to comprise instant message report request in the instant message received, to transfer immediate news report to the server of instant message belonging to described receiving terminal;
Server of instant message belonging to described receiving terminal, for sending described instant message report to the server of instant message belonging to described transmitting terminal;
Server of instant message belonging to described transmitting terminal, for sending described instant message report to described transmitting terminal, described instant message report is reading report;
Described receiving terminal also for, before described judgement is carried out in described reception side, set up and message session Relay Protocol Data passage belonging to described receiving terminal between immediate service device, obtained the instant message comprising instant message report request of described transmitting terminal transmission by described message session Relay Protocol Data passage, and read described instant message after described message session Relay Protocol Data passage disconnects.
5. system as claimed in claim 4, it is characterized in that, described receiving terminal is further used for, if the server of instant message belonging to described receiving terminal and do not have described message session Relay Protocol Data passage between described transmitting terminal, before sending described instant message report to the server of instant message belonging to described receiving terminal, initiate to set up all message session Relay Protocol Data passages between described transmitting terminal;
Server of instant message belonging to described transmitting terminal sends described instant message report to described transmitting terminal, and described instant message report specifically comprises for reading report: the server of instant message belonging to described transmitting terminal sends described reading report by described message session Relay Protocol Data passage.
6. system as claimed in claim 4, it is characterized in that, described receiving terminal to the server of instant message belonging to described receiving terminal transfer immediate news report specifically comprise: by described instant message report via the SIP/IP core net belonging to described receiving terminal, send to the server of instant message belonging to described receiving terminal;
Server of instant message belonging to described receiving terminal sends described instant message report to the server of instant message belonging to described transmitting terminal and specifically comprises: by described instant message report via the SIP/IP core net belonging to described receiving terminal and the SIP/IP core net belonging to described transmitting terminal, send to the server of instant message belonging to described transmitting terminal;
Server of instant message belonging to described transmitting terminal sends described instant message report to described transmitting terminal and specifically comprises: by described instant message report via the SIP/IP core net belonging to transmitting terminal, send to described transmitting terminal.
7. transfer immediate news in immediate news systems the system reported, is applicable to SIP/SIMPLE system, comprises: receiving terminal, the server of instant message belonging to described receiving terminal, transmitting terminal, the server of instant message belonging to described transmitting terminal;
Server of instant message belonging to described receiving terminal, after in reception, side judges to comprise instant message report request in the instant message received, to transfer immediate news report to the server of instant message belonging to described transmitting terminal;
Server of instant message belonging to described transmitting terminal, for the report that transfers immediate news to described transmitting terminal, described instant message report is failed delivery report;
Server of instant message belonging to described receiving terminal or described receiving terminal are further used for, before described judgement is carried out in described reception side, delete the instant message comprising instant message report request stored in the server of instant message belonging to described receiving terminal.
8. system as claimed in claim 7, it is characterized in that, server of instant message belonging to described receiving terminal is further used for, if the server of instant message belonging to described receiving terminal and described transmitting terminal be not by described message session Relay Protocol Data expanding channels, then before the server of instant message belonging to described receiving terminal transfers immediate news report to the server of instant message belonging to described transmitting terminal, initiate to set up all message session Relay Protocol Data passages between described transmitting terminal;
Server of instant message belonging to described transmitting terminal to transfer immediate news report to described transmitting terminal, and described instant message report specifically comprises for failed delivery report: the server of instant message belonging to described transmitting terminal sends the report of described failed delivery by described message session Relay Protocol Data passage.
9. system as claimed in claim 7, it is characterized in that, server of instant message belonging to described receiving terminal to the server of instant message belonging to described transmitting terminal transfer immediate news report specifically comprise: by described instant message report via the SIP/IP core net belonging to described receiving terminal and the SIP/IP core net belonging to described transmitting terminal, send to the server of instant message belonging to described transmitting terminal;
Server of instant message belonging to described transmitting terminal to described transmitting terminal transfer immediate news report specifically comprise: by described instant message report via the SIP/IP core net belonging to described transmitting terminal, send to described transmitting terminal.
10. transfer immediate news in immediate news systems the system reported, is applicable to SIP/SIMPLE system, it is characterized in that, this system comprises: receiving terminal, server of instant message belonging to described receiving terminal, transmitting terminal, the server of instant message belonging to described transmitting terminal;
Described receiving terminal, for after reception side comprises instant message report request in the instant message judging to receive, set up and message session Relay Protocol Data passage belonging to described receiving terminal between server of instant message, and to be transferred immediate news report to the server of instant message belonging to described receiving terminal by described message session Relay Protocol Data passage;
Server of instant message belonging to described receiving terminal, for setting up the message session Relay Protocol Data passage between described transmitting terminal, and to be transferred immediate news report to described transmitting terminal by described message session Relay Protocol Data passage.
CN201210004378.XA 2006-07-21 2006-07-21 System for sending instant message report in instant message system Active CN102611639B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210004378.XA CN102611639B (en) 2006-07-21 2006-07-21 System for sending instant message report in instant message system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210004378.XA CN102611639B (en) 2006-07-21 2006-07-21 System for sending instant message report in instant message system

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
CN2006101036063A Division CN101110789B (en) 2006-07-21 2006-07-21 Method for sending instant message report in instant message system

Publications (2)

Publication Number Publication Date
CN102611639A CN102611639A (en) 2012-07-25
CN102611639B true CN102611639B (en) 2015-04-08

Family

ID=46528801

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210004378.XA Active CN102611639B (en) 2006-07-21 2006-07-21 System for sending instant message report in instant message system

Country Status (1)

Country Link
CN (1) CN102611639B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103051520B (en) * 2013-01-05 2015-11-25 小米科技有限责任公司 The method of synchronous offline session message and device in JICQ
CA2949397A1 (en) * 2014-05-18 2015-11-26 Kai ZHOU Performance testing system and method
CN105897550A (en) * 2015-12-23 2016-08-24 乐视致新电子科技(天津)有限公司 Off-line message pushing method and device
CN109286560B (en) * 2018-11-19 2021-03-19 北京达佳互联信息技术有限公司 Method and device for acquiring instant messaging message

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1750518A (en) * 2005-11-03 2006-03-22 中国移动通信集团公司 A method for realizing instant message communication
CN1777155A (en) * 2005-12-08 2006-05-24 中国科学院计算技术研究所 Instant Message Filtering Method in Instant Messaging System Based on Session Initiation Protocol
CN1794722A (en) * 2005-09-19 2006-06-28 华为技术有限公司 Method of transfering off-line message
CN1794723A (en) * 2005-10-11 2006-06-28 华为技术有限公司 Processing method of off-line message
CN1801814A (en) * 2005-10-11 2006-07-12 华为技术有限公司 Off-line message transmitting and receiving method

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040037406A1 (en) * 2002-08-26 2004-02-26 Christophe Gourraud Method and system for exchanging instant messages in a multi-party conference call

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1794722A (en) * 2005-09-19 2006-06-28 华为技术有限公司 Method of transfering off-line message
CN1794723A (en) * 2005-10-11 2006-06-28 华为技术有限公司 Processing method of off-line message
CN1801814A (en) * 2005-10-11 2006-07-12 华为技术有限公司 Off-line message transmitting and receiving method
CN1750518A (en) * 2005-11-03 2006-03-22 中国移动通信集团公司 A method for realizing instant message communication
CN1777155A (en) * 2005-12-08 2006-05-24 中国科学院计算技术研究所 Instant Message Filtering Method in Instant Messaging System Based on Session Initiation Protocol

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
OMA-IMPS-WV-CSP-V1_2-20050125-A;Open Mobile Alliance;《WV-042 Client-Server Protocol Session and Transactions》;20050125;第56-65页第9.1节 *

Also Published As

Publication number Publication date
CN102611639A (en) 2012-07-25

Similar Documents

Publication Publication Date Title
CN102395115B (en) For the method and system at amalgamation IP message business administrative messag thread
EP1929730B1 (en) Method and apparatus for instant messaging
US7904521B2 (en) Method for transferring chat messages by establishing chat room data transfer channel
KR100824043B1 (en) Method and system for instant message transmission in mobile communication terminal
CN101110789B (en) Method for sending instant message report in instant message system
EP1913743B1 (en) Group management method and system in interworking system of imps system and simple im system
US20070070988A1 (en) Method For Transmitting Deferred Messages
US9049165B2 (en) Method for delivering message based on CPM service and server thereof
CN101374118A (en) Method, system and device for message interconnection
CN102123133B (en) Method and the message system of message receipt is transmitted during the intercommunication of different messages business platform
EP2160051A1 (en) Methods and devices for messaging
CN102130845A (en) Sending method and processing system of return receipt report
CN100411394C (en) System and method for encapsulating and transmitting messages in message session relay protocol
JP2014523151A (en) Interface between RESTful web service and packet-switched network for text messaging
WO2008074235A1 (en) Interconnection methods and message interconnection gateways between message systems
CN1859380B (en) Method for obtaining off line message
CN102223293A (en) Routing method of information requests and processing system
CN101355533B (en) Communication interconnect method and apparatus
EP1493256A1 (en) Message header for messaging service
CN102611639B (en) System for sending instant message report in instant message system
CN102026112B (en) Method and system for sending converged IP messaging
KR20080034072A (en) Method of transmitting heterogeneous message using SIP-based transmission message and user device therefor
JP2011517796A (en) Multimedia message storage address transmission system and method
CN102404701B (en) E-mail pushing method, server and system
CN101925017A (en) A large message mode fusion IP message transmission method

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant