WO2007076674A1 - A method for filtering the instant message and a server thereof - Google Patents

A method for filtering the instant message and a server thereof Download PDF

Info

Publication number
WO2007076674A1
WO2007076674A1 PCT/CN2006/002898 CN2006002898W WO2007076674A1 WO 2007076674 A1 WO2007076674 A1 WO 2007076674A1 CN 2006002898 W CN2006002898 W CN 2006002898W WO 2007076674 A1 WO2007076674 A1 WO 2007076674A1
Authority
WO
WIPO (PCT)
Prior art keywords
message
server
client
filtering
chat room
Prior art date
Application number
PCT/CN2006/002898
Other languages
French (fr)
Chinese (zh)
Inventor
Jue Wang
Lunjian Mu
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.
Publication of WO2007076674A1 publication Critical patent/WO2007076674A1/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L51/00User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
    • H04L51/04Real-time or near real-time messaging, e.g. instant messaging [IM]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L51/00User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
    • H04L51/21Monitoring or handling of messages
    • H04L51/212Monitoring or handling of messages using filtering or selective blocking

Definitions

  • the present invention relates to the field of network communications, and in particular, to a message filtering method and server in an instant message chat room system. Background of the invention
  • Chat is one of the main activities in the process of people using modern communication and Internet access.
  • the main tools of chatting have changed from the initial chat room and forum to the instant messaging represented by MSN and QQ.
  • Most people just use their live chat software MSN or QQ whenever they go online. According to statistics, so far, more than 100 million people around the world use instant messaging software to communicate online.
  • the first category is the Wireless Village (WV)-based instant messaging system based on Hypertext Transport Protocol/Wireless Access Protocol/Short Message System (HTTP/WAP).
  • /SMS Hypertext Transport Protocol/Wireless Access Protocol/Short Message System
  • /SMS can support 2.5G/3G network
  • the second type is based on initial session protocol/instant messaging and online state utilization extension (Session Initiated Protocol I SIP Instant Message and Presence Leveraging Extensions, SIP/SIPLE)
  • the instant messaging system based on the SIP/SIMPLE bearer protocol, supports an IP Multimedia Subsystem (IMS) based IP network.
  • IMS IP Multimedia Subsystem
  • instant messaging services provide users with low-cost, high-efficiency and convenient transmission, but also have many negative effects.
  • the biggest problem is spam instant messaging.
  • These spam instant messages such as low-level fun and commercial-purpose instant messaging, enable users. Do not bother, even the use of instant messaging for reactionary propaganda, violations of social morality and national laws.
  • user A chats in the chat room system, but there is always user B sending harassment information to the chat room, so that user A has to think that the method does not receive the chat message from the harassed user B in the chat room.
  • User A can set the content of User B to be filtered out, so that he will not see the chat message from B, that is, implement "message filtering".
  • the SIP/SIMPLE instant messaging (IM) standard has block technology, and the blocklist technology enables the user to set and configure in the server. Manage your own blocking list (similar to blacklisting), the server controls the users in the list to not interact with the user for instant messaging.
  • this setting technique is generally a kind of business setting made by the user. Relatively "static”, and whether or not it is added to the chat room system, it cannot be set after the user joins the chat room, and the user cannot shield himself at any time during the chat process. Like the chat user; at the same time, its setting range is very narrow, can only be shielded for users, message size, message type and so on.
  • the invention provides an instant message filtering method and a server, which are based on SIMPLE mobile instant messaging (IM), using an initial session protocol (SIP), for instant application of a chat room, and temporary setting during chat, so that the user can filter unnecessary at any time. information.
  • SIMPLE mobile instant messaging IM
  • SIP initial session protocol
  • the server receives the instant message filtering condition message sent by the client;
  • the server parses the message and performs validity check. If the check passes, the server saves the instant message filtering condition; the server filters the subsequent instant message according to the instant message filtering condition.
  • the server eliminates the message filtering conditions set by the client.
  • the filtering, by the server, the subsequent instant message according to the filtering condition includes the following steps:
  • the server reads the instant message filtering condition
  • the server determines, according to the instant message filtering condition, whether the subsequent instant message needs to be distributed to the client.
  • the server controls the IM server for the chat room, and the method for the client to send an instant message filtering condition message to the server includes the following steps:
  • the client sends a message filtering condition message during the process of sending the instant message by using the chat room, and the filtering condition message is first sent to the home IM server;
  • the client home IM server forwards the filter condition message to the chat room control IM server;
  • the chat server After the chat server receives the filter condition message, the IM server returns a response to the home IM server, indicating that it has been received; the home IM server forwards the response to the client, indicating that it has received.
  • the server controls the IM server for the chat room, and the method for the client to send an instant message filtering condition message to the server includes the following steps:
  • the client sends a message filtering condition during the process of sending the instant message by using the chat room, and the filtering condition message is sent to the chat room control IM server;
  • the IM server After receiving the filter condition message, the IM server responds to the client, indicating that it has received it.
  • the server is a home IM server, and the method for the client to send an instant message filtering condition message to the server includes the following steps: the client sends a message filtering condition message during the sending of the instant message by using the chat room, the filtering condition message Send to the home IM server;
  • the home IM server After receiving the filter condition message, the home IM server sends a response message to the client, indicating that the message is received.
  • the operation of the server further includes the following steps:
  • the home IM server saves the message filter condition to the local server, or saves the message filter condition to the IM XDMS through the XCAP standard protocol interface.
  • the sending message filtering condition is to send a message through MSRP SEND; or sending a message through SIP MESSAGE; or sending a message through SIP PUBLISH.
  • the method also includes the following steps:
  • the method further includes the following steps: the client sends a clear filter condition message, and the server clears the previously saved message filtering condition of the client after receiving the message.
  • the filtering condition is to receive the client source, or send the client source, or the client message size, or the message format, or the message content, or the message type.
  • the chat room system is a SIP/SIMPLE instant messaging system.
  • An instant messaging server comprising: means for receiving an instant message filter condition message sent by the client in the activated chat room;
  • a module for parsing the message and performing validity check, if the check passes, the U saves the instant message filter condition; and the module for filtering the subsequent instant message according to the instant message filter condition.
  • the server is a chat room control IM server or a home IM server.
  • the present invention can support the SIP/SIMPLE instant message (IM) user to join the chat room, and can implement the function of filtering certain messages in the chat room, for proposing a filtering request.
  • the client implements message filtering, which is transparent to the sender of the filtered message, thus enhancing the function of instant messaging in the chat room system, so that the user gets a better experience.
  • FIG. 2 is a flow chart of message filtering of a user during a chat in the first embodiment
  • FIG. 3 is a flow chart of message filtering of a user during a chat in the second embodiment
  • FIG. 5 is a flow chart of message filtering of a user during a chat in the fourth embodiment
  • Embodiment 6 is a flow chart of message filtering of a user during a chat process in Embodiment 5;
  • FIG. 7 is a flow chart of message filtering of a user during a chat in the sixth embodiment.
  • the present invention is an instant messaging service in a chat room system carried out on a mobile communication network or an Internet network, wherein the mobile network includes existing mobile communication networks such as 2G, 2.5G, 3G and Multimedia Subsystem (IMS). More specifically, the present invention is an instant messaging (IM) service system based on a SIP/SIMPLE-based chat room system, using an initial session protocol (SIP) for temporary setting of chats for an instant messaging application of a chat room system. .
  • SIP initial session protocol
  • SIP/IP core which is a core network part of the 3GPP and 3GPP2 defined multimedia subsystem (IMS), such as a call session.
  • IMS multimedia subsystem
  • CSCF Call Session Control Function
  • IP network IP network
  • Controlling lM Function ServerX has been established and activated according to the Call Session Control Function (CSCF) or IP network of the Multimedia Subsystem (IMS) according to the well-known standard SIP protocol.
  • CSCF Call Session Control Function
  • IMS Multimedia Subsystem
  • chat message transmission channel established by the well-known Message Seesion Relay Protocol may have two optional chat channel establishment methods:
  • Method 1 The client (Client) and its participating participant IM server establish a direct MSRP channel, the client-participating participant IM server and the chat room control IM server (The Controlling IM Server, also called the chat room server or the control IM server, establishes a direct MSRP channel, as shown in Figure 2 of the first embodiment.
  • the Controlling IM Server also called the chat room server or the control IM server, establishes a direct MSRP channel, as shown in Figure 2 of the first embodiment.
  • the client (Client) and the chat room control M server establish a direct MSRP channel (Channel), which does not pass through the participating party IM server (Participating IM Server), as shown in Figure 3 of the second embodiment.
  • a chat room can be established according to a well-known technology, and the client and the chat room in the chat room can control the IM server either on the same home network or not on the same home network, or have other Networking method.
  • the instant message filtering condition in various embodiments of the present invention may be temporarily set during the chat process, and ends when the chat ends; of course, the user may also be allowed to pre-set the message filtering criteria before the chat, and the criterion may be for all
  • the chat room is applicable, including the storage of message filtering criteria, the process of the chat room controlling the IM server to obtain the message filtering criteria, and the optional bearer protocol for obtaining.
  • ClientA indicates that the client A has joined the SIMPLE instant messaging (IM) chat room system
  • ClientB indicates the client where User B has joined the SIMPLE instant messaging (IM) chat room system
  • ClientC indicates the client where user C has joined the SIMPLE instant messaging (IM) chat room system
  • ServerX represents the S PLE instant messaging (IM) server where the chat room system is located.
  • ServerX is a Controlling IM Function Server, that is, a chat room control M server, also called a chat room server or a control IM server;
  • ServerA indicates the SIMPLE instant message (IM) server to which ClientA belongs. Because ServerX is the chat room where the chat room is located, the server is controlled. In this case, ServerA is a multi-party instant messaging function server (Participating IM Function Sever), that is, the home participant IM server of ClientA. , also called ClientA home server;
  • Participating IM Function Sever Participating IM Function Sever
  • ServerB represents the SIMPLE instant messaging (IM) server to which ClientB and ClientC belong.
  • ServerX controls the IM server for the chat room where the chat room is located
  • ServerB is a Multi-party Instant Messaging Function Server (Participating IM Function Server), namely ClientB and ClientC.
  • the affiliation participant IM server also called ClientB, ClientC home server; SIP/IP COREA> SIP/IP COREB respectively represent the initial conference protocol (SIP) core network where ClientA, ClientB, and ClientC are located.
  • SIP/IP COREA> SIP/IP COREB respectively represent the initial conference protocol (SIP) core network where ClientA, ClientB, and ClientC are located.
  • the message is multiplexed with an existing Message Session Relay Protocol (MSRP) message transmission channel; at the same time, the client (Client) message is controlled to the chat room via the Home Participant IM Server ServerA.
  • Server ServerX Controlling IM Server ServerX
  • the instant message filtering method in this embodiment includes the following steps:
  • User A Client ClientA can temporarily set the message filtering condition during the chat process: Block all messages from User B client ClientB and send it to the chat room to control the IM server.
  • ClientA sends a message filtering condition through MSRP SEND.
  • the filter condition message is first sent to the home participant's IM server ServerA in the message header of the MSRP SEND message.
  • Contains Content-type for example Content-Type is application/vnd.im.msrp ten xml.
  • the XML format content is defined in the message body of the MSRP SEND message to carry the message filtering criteria information.
  • the MSRP SEND message includes two parts: a message header and a message body:
  • the main domain of the message header is content_type, the other is the same as the existing technology, such as to-path, from-path, messagelD, etc., for example -
  • the body of the message mainly carries the specific message delivery content. This article refers to the filtering criteria.
  • the XML format (Schema) can define bearer message filtering criteria information, for example:
  • Client A belonging to ClientA IM Server ServerA forwards this MSRP SEND request to ServerX.
  • ServerX After receiving the MSRP SEND request, ServerX returns an MSRP 200 OK response to ServerA, indicating that it has received it;
  • ServerA forwards this 200 OK response to ClientA, indicating that it has been received.
  • ServerX parses the message content in MSRP SEND and verifies its validity, such as whether the filter condition is too long, and whether the value definition in the filter condition is valid.
  • the receiver parses the contents of the MSRP SEND. As long as the XML format is defined, both the sender and the receiver can recognize in the same sense.
  • the chat room controls the IM server to save these message filtering criteria; otherwise, it returns the client error code response and ends.
  • ServerX saves the message filtering condition sent by ClientA to the local, and the message filtering condition is: Block all messages from user B;
  • the message filtering condition is saved to the local database.
  • ClientA after ClientA first sets and sends the filtering condition successfully, it can also send a new filtering condition setting message again.
  • SererX directly overwrites the previous filtering condition and saves it as a new one.
  • the filtering conditions so the server is simple to handle, lighter in load and more efficient.
  • ClientA can also choose to clear the filtering condition. For example, it can set the filtering condition to be empty, or it can define the operation of clearing the filtering condition in the XML message body of MSRP SEND. At this time, ServerX removes the previously saved client. Message filter condition record.
  • ClientB sends a chat message, and its processing process is:
  • Clients belonging to ClientB IM server ServerB forwards this MSRP SEND message request to ServerX;
  • ServerX After receiving the MSRP SEND message request, ServerX returns an MSRP 200 OK response to ServerB, indicating that it has received it;
  • ServerB forwards this 200 OK response to ClientB, indicating that it has received it;
  • ServerX needs to read the locally saved message filtering conditions
  • the chat room controls the message filtering conditions read by the IM server to filter and process the ClientB chat message to determine whether it needs to be distributed to all current users in the chat room.
  • ServerX After reading the locally saved message filtering condition, ServerX determines whether it is necessary to distribute the chat message from user B to each user who has joined the chat room. In this example, ServerX determines that it does not need to be distributed to User A and can be distributed to User C.
  • ServerX forwards the MSRP SEND message from ClientB to the ServerB to which ClientC belongs, and the chat message sent by User B in the MSRP SEND message body;
  • ServerB forwards the MSRP SEND request to ClientC;
  • ClientC After receiving the above MSRP SEND request, ClientC returns an MSRP 200 OK response to ServerB, indicating that it has received;
  • ServerB forwards this MSRP 200 OK response to ServerX, indicating that it has received it;
  • the chat room controls the IM server ServerX to eliminate all filter conditions of ClientA.
  • the filtering condition in this embodiment is applicable only to the current chat. After the user client ClientA exits the chat room or the chat room is closed, the chat room controls the IM server ServerX to clear the message filtering condition.
  • Embodiment 2 is a diagrammatic representation of Embodiment 1:
  • the message multiplexes an existing message session relay protocol (MSRP) message transmission channel; at the same time, the client (Client) message directly has a direct message session relay protocol with the chat room control IM server ( MSRP) Message transmission channel.
  • MSRP chat room control IM server
  • ClientA and the chat room control IM server ServerX have established a direct MSRP chat message transmission channel without going through the participant's IM server ServerA (Participating IM ServerA).
  • the instant message filtering method in this embodiment includes the following steps:
  • User A Client ClientA can temporarily set the message filtering condition during the chat process: Mask all messages from User B client ClientB and send them to the chat room to control the IM server.
  • ClientA needs to send a message filtering condition through MSRP SEND, and includes a Content-type in the message header of the MSRP SEND message, for example, Content-Type is application/vnd.im. .msrp+xml o
  • Content-Type is application/vnd.im. .msrp+xml o
  • the XML format content is defined in the message body of the MSRP SEND message to carry message filtering criteria information.
  • the filtering condition of the sending message in this embodiment is basically the same as that in the first embodiment. The only difference is that the to-path and the from-path in the MSRP SEND are different, and this is already existing when the MSRP data channel is established during the chat. There are technologies.
  • ServerX After receiving the MSRP SEND request, ServerX returns an MSRP 200 OK response to ClientA, indicating that it has received it;
  • ServerX parses the message content in MSRP SEND and verifies its validity, such as whether the filter condition is too long, and whether the value definition in the filter condition is valid.
  • the chat room controls the IM server to save these message filtering criteria; otherwise, it returns the client side error code response and ends.
  • ServerX saves the message filtering condition sent by ClientA to the local, and the message filtering condition is: Block all messages from user B;
  • the chat room controls the IM server to read all the locally saved message filtering criteria
  • ClientB sends MSRP SEND to ServerX, and the MSRP SEND message body is a chat message sent by user B;
  • ServerX After receiving the above MSRP SEND message request, ServerX returns an MSRP 200 OK response to ClientB, indicating that it has received it;
  • Chat Room Control The message filtering condition read by the IM server ServerX is used to filter and process the ClientB chat message to determine whether it needs to be distributed to all current users in the chat room.
  • ServerX After reading the locally saved message filtering conditions, ServerX determines whether it is necessary to distribute the chat message from User B to each user who has joined the chat room. In this embodiment, ServerX determines that it does not need to be distributed to User A and can be distributed to User C.
  • ServerX sends an MSRP SEND message to ClientC, and the chat message sent by User B in the MSRP SEND message body;
  • ClientC After receiving the above MSRP SEND request, ClientC returns an MSRP 200 OK response to ServerX, indicating that it has been received;
  • Steps 254-6 Since ServerX judges that it is not necessary to distribute User B's message to User A, Steps 254-6 will be ignored. ServerX is not executed.
  • chat room controls the IM server ServerX to eliminate all filter conditions of ClientA.
  • the third embodiment of the present invention has clients ClientA, ClientB, and ClientC in the established chat room, and a filter condition is set to block all messages of the user, and is not sent to the client client B of the user B.
  • the message is multiplexed with an existing Message Session Relay Protocol (MSRP) message transmission channel; at the same time, the client (Client) message is controlled to the chat room via the Home Participant IM Server ServerA.
  • Server ServerX Controlling IM Server ServerX
  • the client client A of the user A sets the filtering condition as: masks all the chat messages sent by the client A, and does not send the client client B to the user B, that is, the user B cannot see the user. A chat message.
  • the process of setting the filter condition by the client ClientA is the same as that of the first embodiment.
  • chat room controls the IM server to read all the message filtering criteria stored locally;
  • ClientA sends the MSRP SEND to the serverA to which it belongs, and the MSRP SEND message body is the chat message sent by user A;
  • ServerA forwards this MSRP SEND request to ServerX;
  • ServerX After receiving the above MSRP SEND request, ServerX returns an MSRP 200 OK response to ServerA, indicating that it has been received;
  • ServerA forwards the 200 OK response to ClientA, indicating that it has received it;
  • the chat room controls the message filtering conditions read by the IM server to filter and process the ClientA chat message to determine whether it needs to be distributed to all current users in the chat room.
  • ServerX needs to read the locally saved message filtering criteria to determine whether it is necessary to distribute the chat message from User A to each user who has joined the chat room. In this example, ServerX determines that it does not need to be distributed to User B and can be distributed to User C.
  • ServerX forwards the MSRP SEND to the ServerB to which the ClientC belongs, and the chat message sent by the user B in the MSRP SEND message body;
  • ServerB forwards the MSRP SEND request described in step 322 to ClientC;
  • ClientC After receiving the above MSRP SEND request, ClientC returns an MSRP 200 OK response to ServerB, indicating that it has received;
  • ServerB forwards this MSRP 200 OK response to ServerX, indicating that it has received it;
  • the clients clientA, ClientB, and ClientC are established in the chat room that has been established, and the same as the second embodiment.
  • Filtering conditions Filter all messages from the client ClientB.
  • SIP MESSAGE is used as the bearer message.
  • the instant message filtering method in this embodiment includes the following steps:
  • User A client ClientA can temporarily set the message filtering condition during the chat process: Block all messages from User B client ClientB and send it to the chat room to control the IM server.
  • ClientA wants to filter certain messages, it sends a message filtering condition through SIP MESSAGE, and first sends it to the SIP/IP Core.
  • the Request-URI contains the URI address of the chat room control IM server
  • the Accept-Coiitact header contains the feature-tag signature code, such as '+g.oma.im.filter.', which is the SIP MESSAGE.
  • a unique identifier for the message type indicating a message that is a message filtering condition for the IM service.
  • the message body of the SIP MESSAGE message carries the content of the message filtering criteria.
  • the Content-type field contains the content type, such as application/conference-filter+xml;
  • the content of the message filtering criteria in the message body of the SIP MESSAGE message is similar to the above MSRP SEND.
  • SIP/IP CoreA forwards this SIP MESSAGE to the IM server ServerA to which ClientA belongs;
  • ServerA finds that it is not the local server according to the destination address in the SIP MESSAGE, but is the address of another SIP domain, and then forwards the SIP MESSAGE to the SIP/IP CoreA;
  • SIP/IP CoreA finds that the SIP domain is not a SIP/IP CoreB domain, and then forwards the SIP MESSAGE message to the SIP/IP CoreB;
  • SIP/EP CoreB judges that it is a message to ServerX, and then forwards this SIP MESSAGE message to ServerX;
  • ServerX After receiving the SIP MESSAGE, ServerX replies to the SIP/IP CoreB with a SIP 200 OK, indicating that the message is received;
  • SIP/IP CoreB forwards the 200 OK response message to SIP/IP CoreA;
  • the SIP/IP CoreA forwards the 200 OK response message to the ServerA for processing;
  • ServerA finds that it needs to reply to ClientA, and forwards the 200 OK response message to SIP/IP CoreA; 4110) SIP/IP CoreA forwards the 200 OK response message to ClientA;
  • ServerX parses the content of the SIP MESSAGE message and verifies its validity, such as whether the filter condition is too long, and the filter condition Whether the value definition in is valid;
  • the chat room controls the IM server ServerX to save these message filtering criteria; otherwise, it returns the client error code response and ends.
  • ServerX saves the message filtering condition sent by ClientA to the local, and the message filtering condition is: Block all messages from user B;
  • Embodiment 5 is a diagrammatic representation of Embodiment 5:
  • client clients ClientA, ClientB, and ClientC are established in the chat room that has been established, and a filtering condition is established: All messages of the filtering are sent to user B.
  • SIP PUBLISH is used as a bearer message.
  • the instant message filtering method in this embodiment includes the following steps:
  • User A client ClientA can temporarily set the message filtering condition during the chat process: Filter all users A client ClientA all messages are sent to the user B client ClientB, that is, the filtering condition is the message sent by the user A client ClientA. Only sent to the user B client ClientB, and the filter condition is sent to the chat room control IM server.
  • ClientA needs to send a message filtering condition through SIP PUBLISH to the SIP/IP CoreA if it wants to filter certain messages.
  • the Request-URI is the URI address of ClientA;
  • the Accept-Contact header contains the feature-tag signature, such as '+g.oma.im.filter.', which is one of the SIP PUBLISH message types.
  • a unique identifier that represents a message that is a message filter condition for an IM service.
  • the destination address of SIP PUBLISH is the chat server control IM server address;
  • Content-type is defined as the filter rule type, for example application/chat-filter-settings+xmlo
  • the content of the message filtering criterion is carried in the XML MIME message body of the SIP PUBLISH, and is defined in the same manner as the MSRP SEND in the first embodiment.
  • SIP/IP CoreA forwards this SIP PUBLISH to the IM server ServerA to which ClientA belongs;
  • ServerA finds that it is not the local server according to the destination address in SIP PUBLISH, but is the address of another SIP domain, and then forwards the SIP PUBLISH to SIP/IP CoreA;
  • the SEP PUBLISH message is forwarded to the SIP/IP CoreB;
  • SIP/IP CoreB determines that it is a message to ServerX, and then forwards the SIP PUBLISH message to ServerX;
  • ServerX After receiving the SIP PUBLISH, ServerX replies to the SIP/IP CoreB with a SIP 200 OK, indicating that the message is received;
  • SIP/IP CoreB forwards the 200 OK response message to SIP/IP CoreA;
  • SIP/IP CoreA forwards the 200 OK response message to ServerA for processing
  • ServerA finds that it needs to reply to ClientA, and forwards the 200 OK response message to SIP/IP CoreA; 5110) SIP/IP CoreA forwards the 200 OK response message to ClientA;
  • the message filtering condition is not that the chat server controls the IM server ServerX to perform the message filtering function, but the participating IM server to which each chat user belongs to perform the message filtering function.
  • the message filtering condition is: Block all messages from User B client ClientB
  • the client ClientA, ClientB, ClientC and the chat room control IM server ServerX establish a chat message transmission channel in a manner according to the well-known message session relay protocol (MSRP), that is, the client establishes a direct connection with the home IM server thereof.
  • MSRP message session relay protocol
  • the MSRP channel, the client home IM server and the chat room control IM server ServerX send a direct MSRP channel.
  • the embodiment is not applicable.
  • SIP PUBLISH is used as a bearer message.
  • the instant message filtering method in this embodiment includes the following steps:
  • User A client ClientA can temporarily set the message filtering condition during the chat process: Block all messages from User B client ClientB, and send the filtering conditions to the instant messaging server ServerA to which client ClientA belongs.
  • step 611 In the same manner as step 511 in the fifth embodiment, if ClientA wants to implement filtering of certain messages during the chat process, the message filtering condition is sent by SIP PUBLISH, but the destination address of the PUBLISH is the IM of the client ClientA. Server ServerA address.
  • Step 512) in the same manner as in the fifth embodiment, the SIP/IP CoreA forwards the SIP PUBLISH to the IM server ServerA to which the ClientA belongs;
  • ServerA After receiving the SIP PUBLISH, ServerA needs to reply to ClientA, and sends a 200 OK response message to SIP/IP CoreA, indicating that the message is received.
  • ServerA parses the message content in SIP PUBLISH and verifies its validity, such as whether the process condition is too long, and whether the value definition in the filter condition is valid;
  • the home IM server ServerA saves the message filtering conditions, and continues the following steps;
  • the home M server ServerA saves the message filtering condition sent by the client A to the local server, or stores the message filtering rule to the IM XDMS to which the client A belongs through the XCAP standard protocol interface.
  • the message filtering condition is: Block all the client B from the user B client Message.
  • the home server ServerA can save the message filtering condition to the local server ServerA, or save the message filtering rule to the client A by using the XML Policy Access Protocol (XCAP) standard protocol interface.
  • XCAP XML Policy Access Protocol
  • IM XDMS is a storage entity defined in the XCAP standard specification for storing data related to instant messaging services, which exists in XML format.
  • the home IM server ServerA reads the local security All message filtering criteria stored;
  • User B's client ClientB sends an MSRP SEND message to its home IM server ServerB, and the MSRP SEND message body is a chat message sent by user B;
  • the client server that the ClientB is aggravated forwards the MSRP SEND message to the chat room control IM server ServerX; 643) After receiving the MSRP SEND message, the serverX returns an MSRP 200 OK response to the ServerB, indicating that it has been received;
  • ServerB forwards this 200 OK response to ClientB, indicating that it has received it;
  • ServerX distributes this chat message to all users in the chat room, including user A, and distributes it to ClientA's home IM server ServerA before ServerX distributes it to client A's client ClientA;
  • the MSRP SEND message body includes the chat message sent by user B.
  • ServerX can also distribute this message to other users, which is not relevant to the present invention and therefore will not be described again.
  • ServerX itself does not determine the message filtering rule, that is, does not perform message filtering itself, and still distributes the chat message to each user as normal.
  • ServerX can also use the local message filtering condition to filter the message and then send it to ServerA.
  • the server A After receiving the MSRP SEND message, the server A returns an MSRP 200 OK message to the server X, indicating that it has been received. After receiving the message, the server A can obtain the user from which the chat message is sent from the MSRP SEND message. chatroom.
  • Ownership IM server ServerA reads the locally saved message filtering condition, and determines whether the chat message needs to be forwarded to the user client that belongs to the current chat room;
  • ServerA reads the message filtering condition, and determines whether the chat message needs to be forwarded to the user client that is in the current chat room that is owned by the server and is in the present embodiment.
  • ClientA is the client to which ServerA belongs.
  • ServerA reads the message filtering condition, and if it is saved in the local server, it reads from the local server; if it is saved on the IM XDMS, it reads the message filtering condition from the IM XDMS through the XCAP standard protocol interface.
  • ServerA determines that it does not need to forward user B's message to client A's client clientA, the subsequent steps 66-67 are no longer executed, that is, the MSRP SEND message is not forwarded to ClientA, and ClientA performs the received message response.
  • the message filtering condition is to use SIP PUBLISH as the bearer message, or SIP MESSAGE.
  • the filtering criterion is only applicable to the current chat.
  • the home IM server message filtering condition is different according to the storage rule of the filtering rule. If it is saved on the local server, the attribution is The server uses the internal protocol to clear the local storage filter conditions; if it is saved on the IM XDMS, it is cleared by the standard XCAP protocol interface.
  • the filtering condition on the IM XDMS; or, whether it is stored locally or on the IM XDMS, the message filtering condition record is not removed, but it is marked as "invalid", indicating that the chat room is invalid for the next restart.
  • the task of filtering the instant message is distributed by the home IM server, which can effectively reduce the burden of the chat room controlling the IM server, enable the chat room to control the running resources of the IM server to be better applied, and speed up the instant message in the chat room. Control processing in the IM server.
  • the message filtering method of the invention has a larger range of message filtering conditions, which can be according to the recipient user, according to the message size, according to the message content format (eg JPEG, txt, etc.), according to the message content type (eg text, audio, video, etc.);
  • the message size e.g JPEG, txt, etc.
  • the message content type eg text, audio, video, etc.
  • chat users From the perspective of the user's actual use requirements, "users temporarily set message filtering criteria during the chat process” is simpler and more practical than “user pre-set message filtering criteria before chatting.” Users can block themselves at any time during the chat process. Chat users who don't like it, and such chat users are often not known in advance before chatting.

Abstract

A method for filtering the instant message and a server thereof include: in the chat room wherein the instant message chat room system has been created and activated, a client sends the message of the instant message filtering condition to the server; after receiving the message of the instant message filtering condition, the server analyzes the message and authenticates the validity; if the authentication is passed, the server stores the instant message filtering condition and filters the following instant message according to the instant message filtering condition; otherwise, the client error code response is returned and the process is ended. It is for instant application of the chat room, and the user could momentarily filter the message which is not needed by the temporary setting when the user is chatting.

Description

一种即时消息过滤方法和服务器  Instant message filtering method and server
技术领域 Technical field
本发明涉及网络通信领域, 特别是涉及一种即时消息聊天室系统中消息过滤方法和服务器。 发明背景  The present invention relates to the field of network communications, and in particular, to a message filtering method and server in an instant message chat room system. Background of the invention
聊天是人们在使用现代通信和上网过程中的主要活动之一, 聊天的主要工具已经从初期的聊天 室、论坛变为以 MSN、 QQ为代表的即时通讯。大部分人只要上网就会开着自己的即时聊天软件 MSN 或 QQ。 据统计, 迄今为止, 全球约有一亿多人使用即时通讯软件在网上交流。  Chat is one of the main activities in the process of people using modern communication and Internet access. The main tools of chatting have changed from the initial chat room and forum to the instant messaging represented by MSN and QQ. Most people just use their live chat software MSN or QQ whenever they go online. According to statistics, so far, more than 100 million people around the world use instant messaging software to communicate online.
在当前的标准规范版本中有两类即时消息系统。 第一类是基于无线乡村协议 (Wireless Village, WV) 的即时消息系统, 其基于超文本传送协议 /无线访问协议 /短消息系统 ( Hyper Text Transport Protocol /Wireless Access Protocol / Short Message System, HTTP/WAP/SMS)承载的协议, 可以支持 2.5G/3G网络, 第二类是基于初始会话协议 /即时消息传递和在线状态利用扩展 (Session Initiated Protocol I SIP Instant Message and Presence Leveraging Extensions , SIP/SIPLE)协议的即时消息系统, 其基于 SIP/SIMPLE承载的协议, 支持基于 IP多媒体子系统 (IP Multimedia Subsystem, IMS) 的 IP网 络。  There are two types of instant messaging systems in the current standard specification version. The first category is the Wireless Village (WV)-based instant messaging system based on Hypertext Transport Protocol/Wireless Access Protocol/Short Message System (HTTP/WAP). /SMS) bearer protocol, can support 2.5G/3G network, and the second type is based on initial session protocol/instant messaging and online state utilization extension (Session Initiated Protocol I SIP Instant Message and Presence Leveraging Extensions, SIP/SIPLE) The instant messaging system, based on the SIP/SIMPLE bearer protocol, supports an IP Multimedia Subsystem (IMS) based IP network.
但是, 即时消息服务在给用户提供低成本高效率的便捷传输的同时,也产生了很多负面的影响, 最大的问题是垃圾即时消息,这些垃圾即时消息如低级趣味和商业目的的即时消息使用户不厌其烦, 甚至出现利用即时消息进行反动宣传, 违反社会公德和国家法律的行为。  However, instant messaging services provide users with low-cost, high-efficiency and convenient transmission, but also have many negative effects. The biggest problem is spam instant messaging. These spam instant messages, such as low-level fun and commercial-purpose instant messaging, enable users. Do not bother, even the use of instant messaging for reactionary propaganda, violations of social morality and national laws.
例如用户 A在聊天室系统中聊天, 但在该聊天室中总是有用户 B向其发送骚扰信息, 这样, 用户 A就得想方法不在此聊天室中接收来自于该骚扰用户 B的聊天消息, 则用户 A可以设置过滤掉用户 B 的消.息, 这样他将不会看到来自 B的聊天消息, 也即实现 "消息过滤"。  For example, user A chats in the chat room system, but there is always user B sending harassment information to the chat room, so that user A has to think that the method does not receive the chat message from the harassed user B in the chat room. , User A can set the content of User B to be filtered out, so that he will not see the chat message from B, that is, implement "message filtering".
现有的基于无线乡村协议的 IMPS (Instant Messaging and Presence Service, 即时消息和存在业务) 系统、 SIP/SIMPLE即时消息 (IM) 标准中, 有 block技术, 其中 blocklist技术可以使用户在服务器中 设置并管理自己的阻塞列表(类似黑名单的意思), 服务器控制该列表中的用户不能和该用户进行即 时消息交互。  In the existing IMPS (Instant Messaging and Presence Service) system based on the wireless rural protocol, the SIP/SIMPLE instant messaging (IM) standard has block technology, and the blocklist technology enables the user to set and configure in the server. Manage your own blocking list (similar to blacklisting), the server controls the users in the list to not interact with the user for instant messaging.
但是这种设置技术一般是用户所做的一种业务设置,相对"静态",和是否加入聊天室系统无关, 其无法在用户加入聊天室后进行设置, 用户在聊天过程中无法随时屏蔽自己不喜欢的聊天用户; 同 时, 其设置的范围很窄, 只能针对用户、 消息大小、 消息类型等预先设置而进行屏蔽。  However, this setting technique is generally a kind of business setting made by the user. Relatively "static", and whether or not it is added to the chat room system, it cannot be set after the user joins the chat room, and the user cannot shield himself at any time during the chat process. Like the chat user; at the same time, its setting range is very narrow, can only be shielded for users, message size, message type and so on.
现有互联网领域中公开了一些消息过滤技术。例如美国专利申请 20040019645, 但是, 该发明主 要由客户端应用程序来执行即时消息过滤操作, 承载协议为简单对象访问协议 (SOAP), 而且, 该 技术不适用于针对聊天室的即时应用、 临时设置的应用场景。  Some message filtering techniques are disclosed in the existing Internet domain. For example, U.S. Patent Application No. 20040019645, however, the invention mainly performs an instant message filtering operation by a client application, the bearer protocol is Simple Object Access Protocol (SOAP), and the technology is not applicable to instant applications, temporary settings for chat rooms. Application scenario.
发明内容 Summary of the invention
本发明提供一种即时消息过滤方法和服务器, 其基于 SIMPLE移动即时消息(IM), 釆用初始会 话协议 (SIP), 针对聊天室即时应用、 聊天时临时设置, 使用户可以随时过滤不需要的信息。  The invention provides an instant message filtering method and a server, which are based on SIMPLE mobile instant messaging (IM), using an initial session protocol (SIP), for instant application of a chat room, and temporary setting during chat, so that the user can filter unnecessary at any time. information.
本发明是通过以下技术方案实现的- 一种即时消息过滤方法, 包括下列步骤: The present invention is achieved by the following technical solutions - An instant message filtering method includes the following steps:
在激活的聊天室中, 服务器接收到客户端发送的即时消息过滤条件消息;  In the activated chat room, the server receives the instant message filtering condition message sent by the client;
服务器解析所述消息, 并进行有效性校验, 如果校验通过, 则服务器保存即时消息过滤条件; 踉务器根据所述即时消息过滤条件过滤后续的即时消息。  The server parses the message and performs validity check. If the check passes, the server saves the instant message filtering condition; the server filters the subsequent instant message according to the instant message filtering condition.
还包括下列步骤:  It also includes the following steps:
当客户端退出即时消息聊天室系统, 或者该聊天室关闭时, 服务器消除客户端所设置的消息过 滤条件。  When the client exits the instant messaging room system, or the chat room is closed, the server eliminates the message filtering conditions set by the client.
所述服务器根据过滤条件过滤后续的即时消息包括下列步骤:  The filtering, by the server, the subsequent instant message according to the filtering condition includes the following steps:
当有后续的即时消息发送至所述的聊天室时, 服务器读取即时消息过滤条件;  When a subsequent instant message is sent to the chat room, the server reads the instant message filtering condition;
服务器根据即时消息过滤条件判断是否需要分发该后续的即时消息给客户端。  The server determines, according to the instant message filtering condition, whether the subsequent instant message needs to be distributed to the client.
所述服务器为聊天室控制 IM服务器, 所述客户端向服务器发送即时消息过滤条件消息的方法 包括下列步骤:  The server controls the IM server for the chat room, and the method for the client to send an instant message filtering condition message to the server includes the following steps:
客户端在使用所述聊天室发送即时消息过程中, 发送消息过滤条件消息, 该过滤条件消息首先 发送给归属 IM服务器;  The client sends a message filtering condition message during the process of sending the instant message by using the chat room, and the filtering condition message is first sent to the home IM server;
客户端归属 IM服务器转发该过滤条件消息到聊天室控制 IM服务器;  The client home IM server forwards the filter condition message to the chat room control IM server;
聊天室控制 IM服务器收到该过滤条件消息后, 回响应给归属 IM服务器, 表示已经收到; 归属 IM服务器转发此响应给客户端, 表示已经收到。  After the chat server receives the filter condition message, the IM server returns a response to the home IM server, indicating that it has been received; the home IM server forwards the response to the client, indicating that it has received.
所述服务器为聊天室控制 IM服务器, 所述客户端向服务器发送即时消息过滤条件消息的方法 包括下列步骤:  The server controls the IM server for the chat room, and the method for the client to send an instant message filtering condition message to the server includes the following steps:
客户端在使用所述聊天室发送即时消息过程中, 发送消息过滤条件, 该过滤条件消息发送给聊 天室控制 IM服务器;  The client sends a message filtering condition during the process of sending the instant message by using the chat room, and the filtering condition message is sent to the chat room control IM server;
聊天室控制 IM服务器收到该过滤条件消息后, 回响应给客户端, 表示已经收到。  Chat Room Control After receiving the filter condition message, the IM server responds to the client, indicating that it has received it.
所述服务器为归属 IM服务器, 所述客户端向服务器发送即时消息过滤条件消息的方法包括下 列步骤- 客户端在使用所述聊天室发送即时消息过程中, 发送消息过滤条件消息, 该过滤条件消息发送 给归属 IM服务器;  The server is a home IM server, and the method for the client to send an instant message filtering condition message to the server includes the following steps: the client sends a message filtering condition message during the sending of the instant message by using the chat room, the filtering condition message Send to the home IM server;
归属 IM服务器收到过滤条件消息后, 发送响应消息给客户端, 表示收到此消息。  After receiving the filter condition message, the home IM server sends a response message to the client, indicating that the message is received.
所述服务器的操作进一步包括下列步骤:  The operation of the server further includes the following steps:
归属 IM服务器将消息过滤条件保存到本地服务器, 或者通过 XCAP标准协议接口将消息 滤 条件保存到 IM XDMS。  The home IM server saves the message filter condition to the local server, or saves the message filter condition to the IM XDMS through the XCAP standard protocol interface.
所述发送消息过滤条件是通过 MSRP SEND发送消息; 或者是通过 SIP MESSAGE发送消息; 或者通过 SIP PUBLISH发送消息。  The sending message filtering condition is to send a message through MSRP SEND; or sending a message through SIP MESSAGE; or sending a message through SIP PUBLISH.
所述方法还包括下列步骤:  The method also includes the following steps:
客户端设置并发送过滤条件成功后, 再次发送新的过滤条件设置消息, 服务器直接覆盖以前的 过滤条件, 保存为新的过滤条件。 所述方法还包括下列步骤- 客户端发送清除过滤条件消息, 服务器收到消息后清除以往保存的该用户端的消息过滤条件。 所述过滤条件为接收客户端来源, 或者发送客户端来源, 或者客户端消息大小, 或者消息格式, 或者消息内容, 或者消息类型。 After the client sets and sends the filter condition successfully, it sends a new filter condition setting message again, and the server directly overwrites the previous filter condition and saves it as a new filter condition. The method further includes the following steps: the client sends a clear filter condition message, and the server clears the previously saved message filtering condition of the client after receiving the message. The filtering condition is to receive the client source, or send the client source, or the client message size, or the message format, or the message content, or the message type.
所述聊天室系统为 SIP/SIMPLE即时消息系统。  The chat room system is a SIP/SIMPLE instant messaging system.
—种即时消息服务器, 包括- 用于在激活的聊天室中接收客户端发送的即时消息过滤条件消息的模块;  An instant messaging server, comprising: means for receiving an instant message filter condition message sent by the client in the activated chat room;
用于解析所述消息, 并进行有效性校验, 如果校验通过, 贝 U保存即时消息过滤条件的模块; 用于根据该即时消息过滤条件过滤后续的即时消息的模块。  A module for parsing the message and performing validity check, if the check passes, the U saves the instant message filter condition; and the module for filtering the subsequent instant message according to the instant message filter condition.
所述服务器为聊天室控制 IM服务器或归属 IM服务器。  The server is a chat room control IM server or a home IM server.
由上述本发明提供的技术方案可以看出, 本发明能够支持 SIP/SIMPLE即时消息(IM)用户加入 聊天室后, 能够实现对聊天室中的某些消息进行过滤的功能, 对于提出过滤请求的客户端来说实现 了消息过滤, 对于被过滤的消息的消息发送者来说是透明的, 因此增强了聊天室系统中即时消息的 功能, 使用户得到更好的体验。  It can be seen from the technical solution provided by the present invention that the present invention can support the SIP/SIMPLE instant message (IM) user to join the chat room, and can implement the function of filtering certain messages in the chat room, for proposing a filtering request. The client implements message filtering, which is transparent to the sender of the filtered message, thus enhancing the function of instant messaging in the chat room system, so that the user gets a better experience.
附图简要说明 BRIEF DESCRIPTION OF THE DRAWINGS
图 1为本发明的即时消息过滤方法流程图;  1 is a flowchart of an instant message filtering method according to the present invention;
图 2为实施例一中用户在聊天过程中的消息过滤流程图;  2 is a flow chart of message filtering of a user during a chat in the first embodiment;
图 3为实施例二中用户在聊天过程中的消息过滤流程图;  3 is a flow chart of message filtering of a user during a chat in the second embodiment;
图 4为实施例三中用户在聊天过程中的消息过滤流程图;  4 is a flow chart of message filtering of a user during a chat in the third embodiment;
图 5为实施例四中用户在聊天过程中的消息过滤流程图;  5 is a flow chart of message filtering of a user during a chat in the fourth embodiment;
图 6为实施例五中用户在聊天过程中的消息过滤流程图;  6 is a flow chart of message filtering of a user during a chat process in Embodiment 5;
图 7为实施例六中用户在聊天过程中的消息过滤流程图。  FIG. 7 is a flow chart of message filtering of a user during a chat in the sixth embodiment.
实施本发明的方式 Mode for carrying out the invention
下面结合附图 1~7进一步详细说明本发明的即时消息过滤方法。  The instant message filtering method of the present invention will be further described in detail below with reference to FIGS. 1-7.
本发明是在移动通信网络、 Internet网络上开展的聊天室系统中的即时消息业务, 其中移动网络 包括现有的 2G、 2.5G、 3G以及多媒体子系统(IMS)等移动通信网络。 更具体地说, 本发明是基于 SIP/SIMPLE 的聊天室系统中的即时消息 (IM)业务系统, 釆用初始会话协议 (SIP), 针对聊天室 系统的即时消息应用, 进行聊天时的临时设置。  The present invention is an instant messaging service in a chat room system carried out on a mobile communication network or an Internet network, wherein the mobile network includes existing mobile communication networks such as 2G, 2.5G, 3G and Multimedia Subsystem (IMS). More specifically, the present invention is an instant messaging (IM) service system based on a SIP/SIMPLE-based chat room system, using an initial session protocol (SIP) for temporary setting of chats for an instant messaging application of a chat room system. .
其中, 本具体实施方式中各实施例以 SIP/IP核心(Core)而进行描述, 其中 SIP/IP核心(Core) 是属于 3GPP和 3GPP2定义多媒体子系统(IMS)的核心网部分, 如呼叫会话控制功能(Call Session Control Function, CSCF) 或者 IP网络。  The embodiments in this embodiment are described by a SIP/IP core (Core), which is a core network part of the 3GPP and 3GPP2 defined multimedia subsystem (IMS), such as a call session. Call Session Control Function (CSCF) or IP network.
在以下各个实施例中, 控制即时消息功能服务器 (Controling lM Function) ServerX上已经根据 多媒体子系统(IMS)的呼叫会话控制功能(CSCF)或者 IP网络按照公知标准 SIP协议建立并激活 —个聊天室系统; 多个客户端 ClientA、 ClientB、 ClientC已经加入聊天室建立即时消息会话。  In the following embodiments, the Controlling lM Function ServerX has been established and activated according to the Call Session Control Function (CSCF) or IP network of the Multimedia Subsystem (IMS) according to the well-known standard SIP protocol. System; multiple clients ClientA, ClientB, and ClientC have joined the chat room to establish an instant messaging session.
客户端 ClientA、 ClientB、 ClientC和聊天室控制 IM服务器 ServerX建立的即时消息会话通道为 按公知的消息会话中继协议 (Message Seesion Relay Protocol, MSRP) 建立的聊天消息传输通道, 其可能有两种可选的聊天通道建立方式: Clients ClientA, ClientB, ClientC, and chat room control IM server ServerX establish an instant messaging session channel. The chat message transmission channel established by the well-known Message Seesion Relay Protocol (MSRP) may have two optional chat channel establishment methods:
方式一: 客户端 (Client) 和其归属的参与方 IM服务器 (Participating IM Server) 建立直接的 MSRP通道 (Channel), 客户端归属的参与方 IM服务器(Participating IM Server)和聊天室控制 IM 服务器(Controlling IM Server, 也叫聊天室服务器或者控制 IM服务器)建立直接的 MSRP通道 (Channel), 如实施例一中图 2所示。  Method 1: The client (Client) and its participating participant IM server establish a direct MSRP channel, the client-participating participant IM server and the chat room control IM server ( The Controlling IM Server, also called the chat room server or the control IM server, establishes a direct MSRP channel, as shown in Figure 2 of the first embodiment.
方式二, 客户端 (Client) 和聊天室控制 M服务器建立直接的 MSRP通道(Channel), 不经过 其归厲的参与方 IM服务器 (Participating IM Server), 如实施例二中图 3所示。  In the second embodiment, the client (Client) and the chat room control M server establish a direct MSRP channel (Channel), which does not pass through the participating party IM server (Participating IM Server), as shown in Figure 3 of the second embodiment.
在建立聊天室的过程中, 可以按照公知的技术建立起聊天室, 聊天室中的客户端和聊天室控制 IM服务器既可以在同一个归属网络, 也可以不在同一个归属网络, 也可以有其它的组网方式。  In the process of establishing a chat room, a chat room can be established according to a well-known technology, and the client and the chat room in the chat room can control the IM server either on the same home network or not on the same home network, or have other Networking method.
本发明的各个实施例中的即时消息过滤条件可以是在聊天过程中临时设置, 随着聊天结束而结 束; 当然, 也可以允许用户在聊天之前预先设置消息过滤准则, 且该准则可以对所有的聊天室适用, 包括消息过滤准则的存储、 聊天室控制 IM服务器获取消息过滤准则的流程、 用于获取的可选承载 协议等方面。  The instant message filtering condition in various embodiments of the present invention may be temporarily set during the chat process, and ends when the chat ends; of course, the user may also be allowed to pre-set the message filtering criteria before the chat, and the criterion may be for all The chat room is applicable, including the storage of message filtering criteria, the process of the chat room controlling the IM server to obtain the message filtering criteria, and the optional bearer protocol for obtaining.
在各实施例中, 各实体的含义如下:.  In various embodiments, the meaning of each entity is as follows:
ClientA表示已经加入 SIMPLE即时消息 (IM) 聊天室系统的用户 A所在的客户端;  ClientA indicates that the client A has joined the SIMPLE instant messaging (IM) chat room system;
ClientB表示已经加入 SIMPLE即时消息 (IM) 聊天室系统的用户 B所在的客户端;  ClientB indicates the client where User B has joined the SIMPLE instant messaging (IM) chat room system;
ClientC表示已经加入 SIMPLE即时消息 (IM) 聊天室系统的用户 C所在的客户端;  ClientC indicates the client where user C has joined the SIMPLE instant messaging (IM) chat room system;
ServerX表示聊天室系统所在的 S PLE 即时消息 (IM) 服务器, 此时 ServerX为控制即时消 息功能服务器 (Controlling IM Function Server), 即聊天室控制 M服务器, 也叫聊天室服务器或者 控制 IM服务器;  ServerX represents the S PLE instant messaging (IM) server where the chat room system is located. At this time, ServerX is a Controlling IM Function Server, that is, a chat room control M server, also called a chat room server or a control IM server;
ServerA表示 ClientA所归属的 SIMPLE即时消息(IM)服务器, 由于 ServerX为聊天室所在聊 天室控制 IM服务器, 此时 ServerA是多方即时消息功能服务器 (Participating IM Function Sever), 即 ClientA的归属参与方 IM服务器, 也叫 ClientA归属服务器;  ServerA indicates the SIMPLE instant message (IM) server to which ClientA belongs. Because ServerX is the chat room where the chat room is located, the server is controlled. In this case, ServerA is a multi-party instant messaging function server (Participating IM Function Sever), that is, the home participant IM server of ClientA. , also called ClientA home server;
ServerB表示 ClientB、 ClientC所归属的 SIMPLE即时消息 (IM) 服务器, 同样, 由于 ServerX 为聊天室所在聊天室控制 IM服务器, 此时 ServerB是多方即时消息功能服务器 (Participating IM Function Server),即 ClientB和 ClientC的归属参与方 IM服务器,也叫 ClientB、 ClientC归属服务器; SIP/IP COREA> SIP/IP COREB分别表示 ClientA、 ClientB、 ClientC所在的初始会 i舌协议(SIP) 核心网络。 - 实施例一:  ServerB represents the SIMPLE instant messaging (IM) server to which ClientB and ClientC belong. Similarly, because ServerX controls the IM server for the chat room where the chat room is located, ServerB is a Multi-party Instant Messaging Function Server (Participating IM Function Server), namely ClientB and ClientC. The affiliation participant IM server, also called ClientB, ClientC home server; SIP/IP COREA> SIP/IP COREB respectively represent the initial conference protocol (SIP) core network where ClientA, ClientB, and ClientC are located. - Example 1:
本实施例在已经建立的聊天室中有客户端 ClientA、 ClientB, ClientC, 建立一个过滤条件为过滤 所有来自客户端 ClientB的消息。  In this embodiment, in the chat room that has been established, there are clients ClientA, ClientB, and ClientC, and a filtering condition is established to filter all messages from the client ClientB.
在本实施例中,消息复用现有的消息会话中继协议 (MSRP)消息传输通道;同时,客户端(Client) 消息经由归属参与方 IM服务器(Participating IM Server) ServerA再到聊天室控制 IM服务器 ServerX ( Controlling IM Server ServerX ) 如图 1、 2所示, 本实施例中的即时消息过滤方法包括下列步骤: In this embodiment, the message is multiplexed with an existing Message Session Relay Protocol (MSRP) message transmission channel; at the same time, the client (Client) message is controlled to the chat room via the Home Participant IM Server ServerA. Server ServerX (Controlling IM Server ServerX) As shown in FIG. 1 and FIG. 2, the instant message filtering method in this embodiment includes the following steps:
II ) 用户 A客户端 ClientA在聊天过程中, 可以临时设置消息过滤条件: 屏蔽所有来自用户 B 客户端 ClientB的消息, 并发送到聊天室控制 IM服务器。  II) User A Client ClientA can temporarily set the message filtering condition during the chat process: Block all messages from User B client ClientB and send it to the chat room to control the IM server.
III ) ClientA在聊天过程中, 若希望实现某些消息的过滤, 则通过 MSRP SEND发送消息过滤 条件, 该过滤条件消息首先发送给归属的参与方 IM服务器 ServerA, 在该 MSRP SEND消息的消息 头中包含 Content-type, 例如 Content-Type为 application/vnd.im.msrp十 xml。 MSRP SEND消息的消息 体中定义 XML格式内容来承载消息过滤准则信息。  III) During the chat process, ClientA sends a message filtering condition through MSRP SEND. The filter condition message is first sent to the home participant's IM server ServerA in the message header of the MSRP SEND message. Contains Content-type, for example Content-Type is application/vnd.im.msrp ten xml. The XML format content is defined in the message body of the MSRP SEND message to carry the message filtering criteria information.
MSRP SEND消息包括消息头和消息体两部分:  The MSRP SEND message includes two parts: a message header and a message body:
消息头的主要域就是 content— type, 其他的同现有技术相同, 例如 to— path、 from -path, messagelD等等, 例如- The main domain of the message header is content_type, the other is the same as the existing technology, such as to-path, from-path, messagelD, etc., for example -
MSRP dkei38sd SEND MSRP dkei38sd SEND
To-Path: msrp://user2.imserver.com:7777/iau39;tcp  To-Path: msrp://user2.imserver.com:7777/iau39;tcp
From- Path: msrp://imserver.com:8888/9di4ea;tcp  From- Path: msrp://imserver.com:8888/9di4ea;tcp
Message-ID: 123  Message-ID: 123
Content-Type: application/vnd.im.msrp+xml  Content-Type: application/vnd.im.msrp+xml
消息体部分主要来承载具体的消息发送内容, 本文指的是过滤准则。所述 XML格式(Schema) 可以定义承载消息过滤准则信息, 例如:  The body of the message mainly carries the specific message delivery content. This article refers to the filtering criteria. The XML format (Schema) can define bearer message filtering criteria information, for example:
<?xml version="1.0" encoding="UTF-8"?>  <?xml version="1.0" encoding="UTF-8"?>
<xs:schema  <xs:schema
targetNamespace="urn:oma:params:xml:ns:im:chatmessage- filter"  targetNamespace="urn:oma:params:xml:ns:im:chatmessage- filter"
xmlns:xs="http://www.w3.org/2001/XMLSchema"  Xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns="urn:oma:params:xml:ns:im: chatmessage-filter "  Xmlns="urn:oma:params:xml:ns:im: chatmessage-filter "
elementFormDefault="qualified"  elementFormDefault="qualified"
attributeFormDefault=Munqualified"> attributeFormDefault= M unqualified">
<xs:element name="chatmessage-filter "> <xs:element name="chatmessage-filter ">
<xs:complexType>  <xs:complexType>
<xs:sequence>  <xs:sequence>
<xs:element name="msgfilter-t pe" minOccurs=" 1">  <xs:element name="msgfilter-t pe" minOccurs=" 1">
<xs:simpleType>  <xs:simpleType>
<xs:restriction base="xs:string">  <xs:restriction base="xs:string">
<xs:enumeration value="request >  <xs:enumeration value="request >
<xs:enumeration value="response"/>  <xs:enumeration value="response"/>
</xs:restriction>  </xs:restriction>
</xs:simpleType>  </xs:simpleType>
</xs:element>  </xs:element>
<xs:element name="msgfilter" minOccurs="l" maxOccurs="unboundedn> <xs:element name="msgfilter"minOccurs="l"maxOccurs="unbounded n >
<xs:complexType> <xs:sequence> <xs:complexType> <xs:sequence>
<xs:element name="filtered-user" type="xs:string" rainOccurs="l" />  <xs:element name="filtered-user" type="xs:string" rainOccurs="l" />
<xs:element name="filtered-duration" type="xs: positivelnteger" minOccurs="0" />  <xs:element name="filtered-duration" type="xs: positivelnteger" minOccurs="0" />
</xs:sequence> </xs:sequence>
<xs:attribute name="id" type="xs:string" use="required"/>  <xs:attribute name="id" type="xs:string" use="required"/>
</xs:complexType>  </xs:complexType>
</xs:elemen1  </xs:elemen1
<xs:sequence>  <xs:sequence>
<xs: coraplexType>  <xs: coraplexType>
<xs:element>  <xs:element>
112) ClientA归属的参与方 IM服务器 ServerA转发此 MSRP SEND请求到 ServerX。  112) Client A belonging to ClientA IM Server ServerA forwards this MSRP SEND request to ServerX.
转发是现有的 SIP技术, 只是将 MSRP SEND消息的消息头中作一些转换。  Forwarding is an existing SIP technology that simply converts the headers of MSRP SEND messages.
113) ServerX收到 MSRP SEND请求后, 回 MSRP 200 OK响应给 ServerA, 表示已经收到; 113) After receiving the MSRP SEND request, ServerX returns an MSRP 200 OK response to ServerA, indicating that it has received it;
114) ServerA转发此 200 OK响应给 ClientA, 表示已经收到。 114) ServerA forwards this 200 OK response to ClientA, indicating that it has been received.
12) 聊天室控制 IM服务器 ServerX接收到过滤条件消息后, 进行有效性校验。  12) Chat Room Control After the IM server ServerX receives the filter condition message, it performs validity check.
ServerX解析 MSRP SEND中的消息内容, 校验其有效性, 例如过滤条件是否超长、过滤条件中 的值定义是否有效;  ServerX parses the message content in MSRP SEND and verifies its validity, such as whether the filter condition is too long, and whether the value definition in the filter condition is valid.
接收方解析 MSRP SEND的内容, 只要定义了 XML格式, 发送方和接收方就都能够按照相同 的意义识别。  The receiver parses the contents of the MSRP SEND. As long as the XML format is defined, both the sender and the receiver can recognize in the same sense.
13 )若校验通过, 则聊天室控制 IM服务器保存这些消息过滤准则; 否则返回 client端错误码响 应, 结束。  13) If the verification passes, the chat room controls the IM server to save these message filtering criteria; otherwise, it returns the client error code response and ends.
131 ) 如果校验不通过, 则返回客户端 ClientA错误响应; 否则继续。  131) If the verification fails, the client ClientA error response is returned; otherwise, it continues.
132) ServerX保存 ClientA发送过来的消息过滤条件到本地, 消息过滤条件为: 屏蔽所有来自 用户 B的消息;  132) ServerX saves the message filtering condition sent by ClientA to the local, and the message filtering condition is: Block all messages from user B;
较佳地, 消息过滤条件保存到本地数据库。  Preferably, the message filtering condition is saved to the local database.
进一步地, ClientA首次设置并发送过滤条件成功后, 也可以再次发送新的过滤条件设置消息, 考虑到聊天室控制 M服务器的效率问题, 较佳地, SererX直接覆盖以前的过滤条件, 保存为新的 过滤条件, 这样服务器处理简单, 负载轻, 效率更高。  Further, after ClientA first sets and sends the filtering condition successfully, it can also send a new filtering condition setting message again. Considering the efficiency of the chat room controlling the M server, preferably, SererX directly overwrites the previous filtering condition and saves it as a new one. The filtering conditions, so the server is simple to handle, lighter in load and more efficient.
另外, ClientA 也可以选择清除过滤条件, 例如可以是设置过滤条件为空的方式, 也可以是在 MSRP SEND的 XML消息体中定义清除过滤条件的操作, 这时 ServerX淸除以往保存的该用户端的 消息过滤条件记录。  In addition, ClientA can also choose to clear the filtering condition. For example, it can set the filtering condition to be empty, or it can define the operation of clearing the filtering condition in the XML message body of MSRP SEND. At this time, ServerX removes the previously saved client. Message filter condition record.
消除过滤条件的操作如前述的 XML格式(Schema),具体应用时可以将其中的所有字段取值初 始化即可表示清除过滤条件。  The operation of eliminating the filter condition is as described in the XML format (Schema). In the specific application, all the fields in the field can be initialized to indicate the clear filter condition.
14) 当有后续的 ClientB的聊天消息发送聊天室控制 IM服务器时, 聊天室控制 IM服务器读取 本地保存的所有的消息过滤准则; 141 ) ClientB发送 MSRP SEND到其归属的参与方 IM服务器 ServerB, MSRP SEND消息体中 为用户 B发出的聊天消息: 14) When there is a subsequent chat message of ClientB to send the chat room control IM server, the chat room controls the IM server to read all the message filtering criteria stored locally; 141) ClientB sends MSRP SEND to its own participating party IM server ServerB, and the MSRP SEND message body is a chat message sent by user B:
例如, ClientB发送聊天消息, 其处理过程为:  For example, ClientB sends a chat message, and its processing process is:
MSRP d93kswow SEND  MSRP d93kswow SEND
To-Path: msrp:〃 user2.imserver.com: 11 ll/iau39;tcp  To-Path: msrp:〃 user2.imserver.com: 11 ll/iau39;tcp
From-Path: msrp://imserver.com:2222/9di4ea;tcp  From-Path: msrp://imserver.com:2222/9di4ea;tcp
Message-ID: 12339sdqwer  Message-ID: 12339sdqwer
Content-Type: text/plain  Content-Type: text/plain
Hello!  Hello!
142) ClientB归属的参与方 IM服务器 ServerB转发此 MSRP SEND消息请求到 ServerX; 142) Clients belonging to ClientB IM server ServerB forwards this MSRP SEND message request to ServerX;
143 ) ServerX收到上述的 MSRP SEND消息请求后, 回 MSRP 200 OK响应给 ServerB, 表示已 经收到; 143) After receiving the MSRP SEND message request, ServerX returns an MSRP 200 OK response to ServerB, indicating that it has received it;
144) ServerB转发此 200 OK响应给 ClientB, 表示已经收到;  144) ServerB forwards this 200 OK response to ClientB, indicating that it has received it;
145) ServerX需要读取本地保存的消息过滤条件;  145) ServerX needs to read the locally saved message filtering conditions;
15)聊天室控制 IM服务器读取的消息过滤条件来过滤处理 ClientB聊天消息, 判断是否需要分 发给聊天室中的当前所有用户。  15) The chat room controls the message filtering conditions read by the IM server to filter and process the ClientB chat message to determine whether it needs to be distributed to all current users in the chat room.
151 ) ServerX读取本地保存的消息过滤条件后, 判断是否需要分发来自用户 B的聊天消息到各 个已加入聊天室的用户。 在本例中, ServerX判断出不需要分发给用户 A, 可以分发给用户 C。  151) After reading the locally saved message filtering condition, ServerX determines whether it is necessary to distribute the chat message from user B to each user who has joined the chat room. In this example, ServerX determines that it does not need to be distributed to User A and can be distributed to User C.
152) ServerX转发来自 ClientB的 MSRP SEND消息到 ClientC归属的 ServerB, MSRP SEND消 息体中为用户 B发出的聊天消息;  152) ServerX forwards the MSRP SEND message from ClientB to the ServerB to which ClientC belongs, and the chat message sent by User B in the MSRP SEND message body;
153 ) ServerB转发 MSRP SEND请求给 ClientC;  153) ServerB forwards the MSRP SEND request to ClientC;
154) ClientC收到上述的 MSRP SEND请求后, 回 MSRP 200 OK响应给 ServerB, 表示已经收 到;  154) After receiving the above MSRP SEND request, ClientC returns an MSRP 200 OK response to ServerB, indicating that it has received;
155) ServerB转发此 MSRP 200 OK响应给 ServerX, 表示已经收到;  155) ServerB forwards this MSRP 200 OK response to ServerX, indicating that it has received it;
156-9)由于 ServerX判断不需要分发用户 B的消息到用户 A, 因此步骤 156— 159都将被忽略, 即 ServerX不再执行分发消息到用户 A。  156-9) Since ServerX determines that it is not necessary to distribute User B's message to User A, steps 156-159 will be ignored, ie ServerX will no longer perform the distribution message to User A.
16) 当 ClientA退出聊天室或者聊天室系统关闭该聊天室后, 聊天室控制 IM服务器 ServerX消 除 ClientA的所有过滤条件。  16) When ClientA exits the chat room or the chat room system closes the chat room, the chat room controls the IM server ServerX to eliminate all filter conditions of ClientA.
进一步地,本实施例中的过滤条件只对本次聊天适用, 当用户客户端 ClientA退出聊天室或者聊 天室关闭之后, 聊天室控制 IM服务器 ServerX清除消息过滤条件。  Further, the filtering condition in this embodiment is applicable only to the current chat. After the user client ClientA exits the chat room or the chat room is closed, the chat room controls the IM server ServerX to clear the message filtering condition.
实施例二:  Embodiment 2:
本实施例在已经建立的聊天室中有客户端 ClientA、 ClientB, ClientC, 建立一个过滤条件为过滤 所有来自客户端 ClientB的消息。  In this embodiment, in the chat room that has been established, there are clients ClientA, ClientB, and ClientC, and a filtering condition is established to filter all messages from the client ClientB.
在本实施例中,消息复用现有的消息会话中继协议(MSRP)消息传输通道;同时,客户端(Client) 消息直接和聊天室控制 IM服务器之间具有直接的消息会话中继协议 (MSRP) 消息传输通道。 如图 3所示, ClientA和聊天室控制 IM服务器 ServerX已经建立了直接的 MSRP聊天消息传输 通道, 而不经过 ClientA归属的参与方 IM服务器 ServerA (Participating IM ServerA) o In this embodiment, the message multiplexes an existing message session relay protocol (MSRP) message transmission channel; at the same time, the client (Client) message directly has a direct message session relay protocol with the chat room control IM server ( MSRP) Message transmission channel. As shown in Figure 3, ClientA and the chat room control IM server ServerX have established a direct MSRP chat message transmission channel without going through the participant's IM server ServerA (Participating IM ServerA).
如图 1、 3所示, 本实施例中的即时消息过滤方法包括下列步骤:  As shown in FIG. 1 and FIG. 3, the instant message filtering method in this embodiment includes the following steps:
21 ) 用户 A客户端 ClientA在聊天过程中, 可以临时设置消息过滤条件: 屛蔽所有来自用户 B 客户端 ClientB的消息, 并发送到聊天室控制 IM服务器。  21) User A Client ClientA can temporarily set the message filtering condition during the chat process: Mask all messages from User B client ClientB and send them to the chat room to control the IM server.
211 ) ClientA在聊天过程中, 若希望实现某些消息的过滤, 则通过 MSRP SEND发送消息过滤 条件, 在该 MSRP SEND 消息的消息头中包含 Content-type, 例如 Content-Type 为 application/vnd.im.msrp+xml o MSRP SEND消息的消息体中定义 XML格式内容来承载消息过滤准则 信息。  211) During the chat process, ClientA needs to send a message filtering condition through MSRP SEND, and includes a Content-type in the message header of the MSRP SEND message, for example, Content-Type is application/vnd.im. .msrp+xml o The XML format content is defined in the message body of the MSRP SEND message to carry message filtering criteria information.
本实施例中的发送消息过滤条件与实施例一基本相同, 唯一不同的是 MSRP SEND中的 to- path 和 from-path有所区别, 而这是在聊天时建立 MSRP数据通道时已经具备的现有技术。  The filtering condition of the sending message in this embodiment is basically the same as that in the first embodiment. The only difference is that the to-path and the from-path in the MSRP SEND are different, and this is already existing when the MSRP data channel is established during the chat. There are technologies.
212) ServerX收到 MSRP SEND请求后, 回 MSRP 200 OK响应给 ClientA, 表示已经收到; 212) After receiving the MSRP SEND request, ServerX returns an MSRP 200 OK response to ClientA, indicating that it has received it;
22) 聊天室控制 IM服务器 ServerX接收到过滤条件消息后, 进行有效性校验。 22) Chat Room Control After the IM server ServerX receives the filter condition message, it performs validity check.
ServerX解析 MSRP SEND中的消息内容, 校验其有效性, 例如过滤条件是否超长、过滤条件中 的值定义是否有效;  ServerX parses the message content in MSRP SEND and verifies its validity, such as whether the filter condition is too long, and whether the value definition in the filter condition is valid.
23 )若校验通过, 则聊天室控制 IM服务器保存这些消息过滤准则; 否则返回 Client端错误码响 应, 结束。  23) If the check passes, the chat room controls the IM server to save these message filtering criteria; otherwise, it returns the client side error code response and ends.
231 ) 如果校验不通过, 则返回客户端 ClientA错误响应; 否则继续。  231) If the verification fails, the client ClientA error response is returned; otherwise, it continues.
232) ServerX保存 ClientA发送过来的消息过滤条件到本地, 消息过滤条件为: 屏蔽所有来自 用户 B的消息;  232) ServerX saves the message filtering condition sent by ClientA to the local, and the message filtering condition is: Block all messages from user B;
24) 当有后续的 ClientB的聊天消息发送聊天室控制 IM服务器时, 聊天室控制 IM服务器读取 本地保存的所有的消息过滤准则;  24) When there is a subsequent ClientB chat message to send the chat room control IM server, the chat room controls the IM server to read all the locally saved message filtering criteria;
241 ) ClientB发送 MSRP SEND到 ServerX, MSRP SEND消息体中为用户 B发出的聊天消息; 241) ClientB sends MSRP SEND to ServerX, and the MSRP SEND message body is a chat message sent by user B;
242) ServerX收到上述的 MSRP SEND消息请求后, 回 MSRP 200 OK响应给 ClientB , 表示已 经收到; 242) After receiving the above MSRP SEND message request, ServerX returns an MSRP 200 OK response to ClientB, indicating that it has received it;
243 ) ServerX需要读取本地保存的消息过滤条件。  243) ServerX needs to read locally saved message filters.
25)聊天室控制 IM服务器 ServerX读取的消息过滤条件来过滤处理 ClientB聊天消息,判断是 否需要分发给聊天室中的当前所有用户。  25) Chat Room Control The message filtering condition read by the IM server ServerX is used to filter and process the ClientB chat message to determine whether it needs to be distributed to all current users in the chat room.
251 ) ServerX读取本地保存的消息过滤条件后, 判断是否需要分发来自用户 B的聊天消息到各 个已加入聊天室的用户。 在本实施例中, ServerX判断出不需要分发给用户 A, 可以分发给用户 C。  251) After reading the locally saved message filtering conditions, ServerX determines whether it is necessary to distribute the chat message from User B to each user who has joined the chat room. In this embodiment, ServerX determines that it does not need to be distributed to User A and can be distributed to User C.
252) ServerX发送 MSRP SEND消息到 ClientC, MSRP SEND消息体中为用户 B发出的聊天消 息;  252) ServerX sends an MSRP SEND message to ClientC, and the chat message sent by User B in the MSRP SEND message body;
253 ) ClientC收到上述的 MSRP SEND请求后, 回 MSRP 200 OK响应给 ServerX, 表示已经收 到;  253) After receiving the above MSRP SEND request, ClientC returns an MSRP 200 OK response to ServerX, indicating that it has been received;
254-6) 由于 ServerX判断不需要分发用户 B的消息到用户 A, 因此步骤 254— 6都将被忽略, ServerX不被执行。 254-6) Since ServerX judges that it is not necessary to distribute User B's message to User A, Steps 254-6 will be ignored. ServerX is not executed.
26) 当 ClientA退出聊天室或者聊天室系统关闭该聊天室后, 聊天室控制 IM服务器 ServerX消 除 ClientA的所有过滤条件。  26) When ClientA exits the chat room or the chat room system closes the chat room, the chat room controls the IM server ServerX to eliminate all filter conditions of ClientA.
实施例三- 本实施例在已经建立的聊天室中有客户端 ClientA、 ClientB、 ClientC, 建立一个过滤条件为屏蔽 自己所有的消息, 不再发送给用户 B的客户端 ClientB。  The third embodiment of the present invention has clients ClientA, ClientB, and ClientC in the established chat room, and a filter condition is set to block all messages of the user, and is not sent to the client client B of the user B.
在本实施例中,消息复用现有的消息会话中继协议 (MSRP)消息传输通道;同时,客户端(Client) 消息经由归属参与方 IM服务器(Participating IM Server) ServerA再到聊天室控制 IM服务器 ServerX (Controlling IM Server ServerX)  In this embodiment, the message is multiplexed with an existing Message Session Relay Protocol (MSRP) message transmission channel; at the same time, the client (Client) message is controlled to the chat room via the Home Participant IM Server ServerA. Server ServerX (Controlling IM Server ServerX)
如图 1、 4所示, 本实施例中用户 A的客户端 ClientA设置过滤条件为: 屏蔽所有自己发出的聊 天消息, 不再发送给用户 B的客户端 ClientB, 也就是用户 B看不到用户 A的聊天消息。  As shown in FIG. 1 and FIG. 4, in the embodiment, the client client A of the user A sets the filtering condition as: masks all the chat messages sent by the client A, and does not send the client client B to the user B, that is, the user B cannot see the user. A chat message.
客户端 ClientA设置该过滤条件的过程与实施例一相同。  The process of setting the filter condition by the client ClientA is the same as that of the first embodiment.
下面说明用户 A开始发送聊天消息, ServerX执行消息过滤的过程- The following describes the process in which user A starts sending chat messages and ServerX performs message filtering.
3D 当有后续的 ClientB的聊天消息发送聊天室控制 IM服务器时, 聊天室控制 IM服务器读取 本地保存的所有的消息过滤准则; 3D When there is a subsequent chat message of ClientB to send the chat room control IM server, the chat room controls the IM server to read all the message filtering criteria stored locally;
311 ) ClientA发送 MSRP SEND到其归属的 ServerA, MSRP SEND消息体中为用户 A发出的聊 天消息;  311) ClientA sends the MSRP SEND to the serverA to which it belongs, and the MSRP SEND message body is the chat message sent by user A;
312) ServerA转发此 MSRP SEND请求到 ServerX;  312) ServerA forwards this MSRP SEND request to ServerX;
313 ) ServerX收到上述的 MSRP SEND请求后, 回 MSRP 200 OK响应给 ServerA, 表示已经收 到;  313) After receiving the above MSRP SEND request, ServerX returns an MSRP 200 OK response to ServerA, indicating that it has been received;
314) ServerA转发此 200 OK响应给 ClientA, 表示已经收到;  314) ServerA forwards the 200 OK response to ClientA, indicating that it has received it;
32)聊天室控制 IM服务器读取的消息过滤条件来过滤处理 ClientA聊天消息, 判断是否需要分 发给聊天室中的当前所有用户。  32) The chat room controls the message filtering conditions read by the IM server to filter and process the ClientA chat message to determine whether it needs to be distributed to all current users in the chat room.
321 ) ServerX需要读取本地保存的消息过滤准则, 判断是否需要分发来自用户 A的聊天消息到 各个已加入聊天室的用户。 在本例中, ServerX判断出不需要分发给用户 B, 可以分发给用户 C。  321) ServerX needs to read the locally saved message filtering criteria to determine whether it is necessary to distribute the chat message from User A to each user who has joined the chat room. In this example, ServerX determines that it does not need to be distributed to User B and can be distributed to User C.
322) ServerX转发 MSRP SEND到 ClientC归属的 ServerB, MSRP SEND消息体中为用户 B发出 的聊天消息;  322) ServerX forwards the MSRP SEND to the ServerB to which the ClientC belongs, and the chat message sent by the user B in the MSRP SEND message body;
323 ) ServerB转发步骤 322所述的 MSRP SEND请求给 ClientC;  323) ServerB forwards the MSRP SEND request described in step 322 to ClientC;
324) ClientC收到上述的 MSRP SEND请求后, 回 MSRP 200 OK响应给 ServerB, 表示已经收 到;  324) After receiving the above MSRP SEND request, ClientC returns an MSRP 200 OK response to ServerB, indicating that it has received;
325 ) ServerB转发此 MSRP 200 OK响应给 ServerX, 表示已经收到;  325) ServerB forwards this MSRP 200 OK response to ServerX, indicating that it has received it;
326-329) 由于 ServerX判断不需要分发用户 A的消息到用户 B, 因此步骤 326—329都将被忽 略, 不被执行。  326-329) Since ServerX determines that it is not necessary to distribute User A's message to User B, steps 326-329 will be ignored and will not be executed.
33 ) 当 ClientA退出聊天室或者聊天室系统关闭该聊天室后, 聊天室控制 IM服务器 ServerX消 除 ClientA的所有过滤条件。 实施例四: 33) When ClientA exits the chat room or the chat room system closes the chat room, the chat room controls the IM server ServerX to eliminate all filter conditions of ClientA. Embodiment 4:
本实施例在已经建立的聊天室中有客户端 ClientA、 ClientB、 ClientC, 建立一个与实施例二相同 过滤条件: 过滤所有来自客户端 ClientB的消息。  In this embodiment, the clients clientA, ClientB, and ClientC are established in the chat room that has been established, and the same as the second embodiment. Filtering conditions: Filter all messages from the client ClientB.
在本实施例中, 使用 SIP MESSAGE作为承载消息。  In this embodiment, SIP MESSAGE is used as the bearer message.
如图 1、 5所示, 本实施例中的即时消息过滤方法包括下列步骤:  As shown in FIG. 1 and FIG. 5, the instant message filtering method in this embodiment includes the following steps:
41 ) 用户 A客户端 ClientA在聊天过程中, 可以临时设置消息过滤条件: 屏蔽所有来自用户 B 客户端 ClientB的消息, 并发送到聊天室控制 IM服务器。  41) User A client ClientA can temporarily set the message filtering condition during the chat process: Block all messages from User B client ClientB and send it to the chat room to control the IM server.
411 ) ClientA在聊天过程中, 若希望实现某些消息的过滤, 则通过 SIP MESSAGE发送消息过 滤条件, 首先发送到 SIP/IP Core。 SIP MESSAGE消息的消息头中, Request-URI包含聊天室控制 IM 服务器的 URI地址, Accept-Coiitact头中包含 feature-tag特征码, 例如' +g.oma.im.filter.', 就是本 SIP MESSAGE消息类型的一个唯一标识, 表示是 IM业务的消息过滤条件的一个消息。 SIP MESSAGE 消息的消息体中携带了消息过滤准则的内容。  411) During the chat process, if ClientA wants to filter certain messages, it sends a message filtering condition through SIP MESSAGE, and first sends it to the SIP/IP Core. In the message header of the SIP MESSAGE message, the Request-URI contains the URI address of the chat room control IM server, and the Accept-Coiitact header contains the feature-tag signature code, such as '+g.oma.im.filter.', which is the SIP MESSAGE. A unique identifier for the message type, indicating a message that is a message filtering condition for the IM service. The message body of the SIP MESSAGE message carries the content of the message filtering criteria.
Content-type域包含了内容类型, 例如 application/conference-filter+xml;  The Content-type field contains the content type, such as application/conference-filter+xml;
MESSAGE sip:confl@imserverl.com SIP/2.0  MESSAGE sip:confl@imserverl.com SIP/2.0
Max-Forwards: 70  Max-Forwards: 70
From: sip:userA@SIMPLE.com; tag=49583  From: sip:userA@SIMPLE.com; tag=49583
To: sip:confl@imserverl.com  To: sip:confl@imserverl.com
Call-ID: d432fa84b4c76e66710  Call-ID: d432fa84b4c76e66710
CSeq: 1 MESSAGE  CSeq: 1 MESSAGE
Accept-Contact: '+g.oma.im.filter. '  Accept-Contact: '+g.oma.im.filter. '
Content-Type: application/conference-filter+xml  Content-Type: application/conference-filter+xml
SIP MESSAGE消息的消息体中以 XML格式携带了消息过滤准则的内容其与上述 MSRP SEND 类似。  The content of the message filtering criteria in the message body of the SIP MESSAGE message is similar to the above MSRP SEND.
412) SIP/IP CoreA转发此 SIP MESSAGE到 ClientA归属的 IM服务器 ServerA;  412) SIP/IP CoreA forwards this SIP MESSAGE to the IM server ServerA to which ClientA belongs;
413 ) ServerA根据 SIP MESSAGE中的目的地址发现不是本服务器, 是另一个 SIP域的地址, 则转发此 SIP MESSAGE给 SIP/IP CoreA;  413) ServerA finds that it is not the local server according to the destination address in the SIP MESSAGE, but is the address of another SIP domain, and then forwards the SIP MESSAGE to the SIP/IP CoreA;
414 ) SIP/IP CoreA发现不是本 SIP域是 SIP/IP CoreB域的,则转发此 SIP MESSAGE消息给 SIP/IP CoreB;  414) SIP/IP CoreA finds that the SIP domain is not a SIP/IP CoreB domain, and then forwards the SIP MESSAGE message to the SIP/IP CoreB;
415) SIP/EP CoreB判断是给 ServerX的消息, 则转发此 SIP MESSAGE消息给 ServerX;  415) SIP/EP CoreB judges that it is a message to ServerX, and then forwards this SIP MESSAGE message to ServerX;
416) ServerX收到 SIP MESSAGE后, 给 SIP/IP CoreB回复 SIP 200 OK, 表示收到此消息; 416) After receiving the SIP MESSAGE, ServerX replies to the SIP/IP CoreB with a SIP 200 OK, indicating that the message is received;
417) SIP/IP CoreB将此 200 OK响应消息转发给 SIP/IP CoreA; 417) SIP/IP CoreB forwards the 200 OK response message to SIP/IP CoreA;
418) SIP/IP CoreA将此 200 OK响应消息转发给 ServerA处理;  418) The SIP/IP CoreA forwards the 200 OK response message to the ServerA for processing;
419) ServerA发现是需要给 ClientA回复的响应,则将此 200 OK响应消息转发给 SIP/IP CoreA; 4110) SIP/IP CoreA将此 200 OK响应消息转发给 ClientA;  419) ServerA finds that it needs to reply to ClientA, and forwards the 200 OK response message to SIP/IP CoreA; 4110) SIP/IP CoreA forwards the 200 OK response message to ClientA;
42) 聊天室控制 IM服务器 ServerX接收到过滤条件消息后, 进行有效性校验。  42) Chat Room Control After the IM server ServerX receives the filter condition message, it performs validity check.
ServerX解析 SIP MESSAGE消息内容, 校验其有效性, 例如是否过滤条件是否超长、 过滤条件 中的值定义是否有效; ServerX parses the content of the SIP MESSAGE message and verifies its validity, such as whether the filter condition is too long, and the filter condition Whether the value definition in is valid;
43 )若校验通过, 则聊天室控制 IM服务器 ServerX保存这些消息过滤准则; 否则返回 Client 端错误码响应, 结束。  43) If the verification passes, the chat room controls the IM server ServerX to save these message filtering criteria; otherwise, it returns the client error code response and ends.
431 )如果校验不通过, 则返回客户端 ClientA错误响应; 否则继续。  431) If the verification fails, the client ClientA error response is returned; otherwise, it continues.
432) ServerX保存 ClientA发送过来的消息过滤条件到本地, 消息过滤条件为: 屏蔽所有来自 用户 B的消息;  432) ServerX saves the message filtering condition sent by ClientA to the local, and the message filtering condition is: Block all messages from user B;
后续的步骤与实施例三的步骤 31〜33相同, 本实施例中不再详细描述。  The subsequent steps are the same as steps 31 to 33 of the third embodiment, and will not be described in detail in this embodiment.
实施例五:  Embodiment 5:
本实施例在已经建立的聊天室中有客户端 ClientA、 ClientB、 ClientC, 建立一个过滤条件: 过滤 所有自己的消息被发送给用户 B。  In this embodiment, client clients ClientA, ClientB, and ClientC are established in the chat room that has been established, and a filtering condition is established: All messages of the filtering are sent to user B.
在本实施例中, 使用 SIP PUBLISH作为承载消息。  In this embodiment, SIP PUBLISH is used as a bearer message.
如图 1、 6所示, 本实施例中的即时消息过滤方法包括下列步骤- As shown in FIG. 1 and FIG. 6, the instant message filtering method in this embodiment includes the following steps:
51 ) 用户 A客户端 ClientA在聊天过程中, 可以临时设置消息过滤条件: 过滤所有用户 A客户 端 ClientA所有消息被发送给用户 B客户端 ClientB, 即过滤条件为用户 A客户端 ClientA发送的消 息, 只发送给用户 B客户端 ClientB, 并将过滤条件发送到聊天室控制 IM服务器。 51) User A client ClientA can temporarily set the message filtering condition during the chat process: Filter all users A client ClientA all messages are sent to the user B client ClientB, that is, the filtering condition is the message sent by the user A client ClientA. Only sent to the user B client ClientB, and the filter condition is sent to the chat room control IM server.
511 ) ClientA在聊天过程中, 若希望实现某些消息的过滤, 则通过 SIP PUBLISH发送消息过滤 条件, 首先发送到 SIP/IP CoreA。 SIP PUBLISH消息的消息头中, Request-URI为 ClientA的 URI地 址; Accept-Contact头中包含 feature-tag特征码, 例如' +g.oma.im.filter.', 就是本 SIP PUBLISH消息 类型的一个唯一标识, 表示是 IM业务的消息过滤条件的一个消息。 SIP PUBLISH的目的地址为聊 天室控制 IM服务器地址; Content-type定义 为 过 滤 规 则 类 型 , 例 如 application/chat-filter-settings+xmlo  511) During the chat process, ClientA needs to send a message filtering condition through SIP PUBLISH to the SIP/IP CoreA if it wants to filter certain messages. In the message header of the SIP PUBLISH message, the Request-URI is the URI address of ClientA; the Accept-Contact header contains the feature-tag signature, such as '+g.oma.im.filter.', which is one of the SIP PUBLISH message types. A unique identifier that represents a message that is a message filter condition for an IM service. The destination address of SIP PUBLISH is the chat server control IM server address; Content-type is defined as the filter rule type, for example application/chat-filter-settings+xmlo
SIP PUBLISH的 XML MIME消息体中携带了消息过滤准则的内容, 其定义方式与实施例一中 的所述 MSRP SEND类似。  The content of the message filtering criterion is carried in the XML MIME message body of the SIP PUBLISH, and is defined in the same manner as the MSRP SEND in the first embodiment.
512) SIP/IP CoreA转发此 SIP PUBLISH到 ClientA归属的 IM服务器 ServerA;  512) SIP/IP CoreA forwards this SIP PUBLISH to the IM server ServerA to which ClientA belongs;
513) ServerA根据 SIP PUBLISH中的目的地址发现不是本服务器, 是另一个 SIP域的地址, 则 转发此 SIP PUBLISH给 SIP/IP CoreA;  513) ServerA finds that it is not the local server according to the destination address in SIP PUBLISH, but is the address of another SIP domain, and then forwards the SIP PUBLISH to SIP/IP CoreA;
514) SIP/IP CoreA发现不是本 SIP域, 而是 SIP/IP CoreB域的, 则转发此 SEP PUBLISH消息给 SIP/IP CoreB;  514) If the SIP/IP CoreA discovery is not the SIP domain, but the SIP/IP CoreB domain, the SEP PUBLISH message is forwarded to the SIP/IP CoreB;
515) SIP/IP CoreB判断是给 ServerX的消息, 则转发此 SIP PUBLISH消息给 ServerX;  515) SIP/IP CoreB determines that it is a message to ServerX, and then forwards the SIP PUBLISH message to ServerX;
516) ServerX收到 SIP PUBLISH后, 给 SIP/IP CoreB回复 SIP 200 OK, 表示收到此消息; 516) After receiving the SIP PUBLISH, ServerX replies to the SIP/IP CoreB with a SIP 200 OK, indicating that the message is received;
517) SIP/IP CoreB将此 200 OK响应消息转发给 SIP/IP CoreA; 517) SIP/IP CoreB forwards the 200 OK response message to SIP/IP CoreA;
518) SIP/IP CoreA将此 200 OK响应消息转发给 ServerA处理;  518) SIP/IP CoreA forwards the 200 OK response message to ServerA for processing;
519) ServerA发现是需要给 ClientA回复的响应,则将此 200 OK响应消息转发给 SIP/IP CoreA; 5110) SIP/IP CoreA将此 200 OK响应消息转发给 ClientA;  519) ServerA finds that it needs to reply to ClientA, and forwards the 200 OK response message to SIP/IP CoreA; 5110) SIP/IP CoreA forwards the 200 OK response message to ClientA;
后续的步骤与实施例五的步骤 42后续的步骤相同, 本实施例中不再详细描述。 实施例六- 在本实施例中, 消息过滤条件不是由聊天室控制 IM服务器 ServerX来执行消息过滤功能,而是 由各个聊天用户所归属的参与 IM服务器来分别执行消息过滤功能。 消息过滤条件是: 屏蔽所有来 自用户 B客户端 ClientB的消息 The subsequent steps are the same as the subsequent steps of step 42 of the fifth embodiment, and are not described in detail in this embodiment. Embodiment 6 - In this embodiment, the message filtering condition is not that the chat server controls the IM server ServerX to perform the message filtering function, but the participating IM server to which each chat user belongs to perform the message filtering function. The message filtering condition is: Block all messages from User B client ClientB
在这种情况下, 客户端 ClientA、 ClientB, ClientC和聊天室控制 IM服务器 ServerX以方式一按 公知的消息会话中继协议(MSRP)建立聊天消息传输通道, 即客户端和其归属 IM服务器建立直接 的 MSRP通道, 客户端归属 IM服务器和聊天室控制 IM服务器 ServerX发建立直接的 MSRP通道。  In this case, the client ClientA, ClientB, ClientC and the chat room control IM server ServerX establish a chat message transmission channel in a manner according to the well-known message session relay protocol (MSRP), that is, the client establishes a direct connection with the home IM server thereof. The MSRP channel, the client home IM server and the chat room control IM server ServerX send a direct MSRP channel.
对方式二, 即客户端和聊天室控制 IM服务器建立直接的 MSRP通道, 不经过其归属的参与方 IM服务器的情况, 本实施例并不适用。  In the second mode, that is, the case where the client and the chat room control the IM server establish a direct MSRP channel without going through the participating party IM server, the embodiment is not applicable.
在本实施例中, 使用 SIP PUBLISH作为承载消息。  In this embodiment, SIP PUBLISH is used as a bearer message.
如图 1、 7所示, 本实施例中的即时消息过滤方法包括下列步骤:  As shown in FIG. 1 and 7, the instant message filtering method in this embodiment includes the following steps:
61 ) 用户 A客户端 ClientA在聊天过程中, 可以临时设置消息过滤条件: 屏蔽所有来自用户 B 客户端 ClientB的消息, 并将过滤条件发送到客户端 ClientA归属的即时消息服务器 ServerA。  61) User A client ClientA can temporarily set the message filtering condition during the chat process: Block all messages from User B client ClientB, and send the filtering conditions to the instant messaging server ServerA to which client ClientA belongs.
611 )同实施例五中的步骤 511 )—样, ClientA在聊天过程中若希望实现某些消息的过滤, 则通 过 SIP PUBLISH来发送消息过滤条件,只是 PUBLISH的目的地址为客户端 ClientA归属的 IM服务 器 ServerA的地址。  611) In the same manner as step 511 in the fifth embodiment, if ClientA wants to implement filtering of certain messages during the chat process, the message filtering condition is sent by SIP PUBLISH, but the destination address of the PUBLISH is the IM of the client ClientA. Server ServerA address.
612) 同实施例五中的步骤 512)—样, SIP/IP CoreA转发此 SIP PUBLISH到 ClientA归属的 IM 服务器 ServerA;  612) Step 512) in the same manner as in the fifth embodiment, the SIP/IP CoreA forwards the SIP PUBLISH to the IM server ServerA to which the ClientA belongs;
613 ) ServerA收到 SIP PUBLISH后, 需要给 ClientA回复的响应, 则发送 200 OK响应消息给 SIP/IP CoreA, 表示收到此消息。  613) After receiving the SIP PUBLISH, ServerA needs to reply to ClientA, and sends a 200 OK response message to SIP/IP CoreA, indicating that the message is received.
62) 归属 IM服务器 ServerA收到过滤条件消息后, 进行有效性校验。  62) Home IM server After ServerA receives the filter condition message, it performs validity check.
ServerA解析 SIP PUBLISH中的消息内容, 校验其有效性, 例如是否过程条件超长、 过滤条件 中的值定义是否有效;  ServerA parses the message content in SIP PUBLISH and verifies its validity, such as whether the process condition is too long, and whether the value definition in the filter condition is valid;
63)若校验不通过, 则返回 ClientA错误码响应, 然后结束; 否则归属 IM服务器 ServerA保存 这些消息过滤条件, 继续下面的步骤;  63) If the verification fails, the clientA error code response is returned, and then the end; otherwise, the home IM server ServerA saves the message filtering conditions, and continues the following steps;
631 ) 如果校验不通过, 则返回客户端 ClientA错误响应, 然后结束; 否则继续;  631) If the verification fails, return the client ClientA error response, and then end; otherwise continue;
632) 归属 M服务器 ServerA保存 ClientA发送过来的消息过滤条件到本地服务器, 或者通过 XCAP标准协议接口将消息过滤规则存储到 ClientA所属的 IM XDMS, 消息过滤条件为: 屏蔽所有 来自用户 B客户端 ClientB的消息。  632) The home M server ServerA saves the message filtering condition sent by the client A to the local server, or stores the message filtering rule to the IM XDMS to which the client A belongs through the XCAP standard protocol interface. The message filtering condition is: Block all the client B from the user B client Message.
归属服务器 ServerA在通过有效性校验后, 既可以将消息过滤条件保存到本地服务器 ServerA, 也可以通过会议策略修改访问控制协议(XML Configuration Access Protocol, XCAP)标准协议接口 将消息过滤规则存储到 ClientA所属的 IM XDMS。  After the validity of the validity check, the home server ServerA can save the message filtering condition to the local server ServerA, or save the message filtering rule to the client A by using the XML Policy Access Protocol (XCAP) standard protocol interface. The IM XDMS to which it belongs.
IM XDMS是 XCAP标准规范中定义的一个存储实体, 用于存储和即时消息业务相关的数据, 其以 XML格式存在。  IM XDMS is a storage entity defined in the XCAP standard specification for storing data related to instant messaging services, which exists in XML format.
64)当有后续的聊天消息发送给用户 A客户端 ClientA时, 归属 IM服务器 ServerA读取本地保 存的所有的消息过滤准则; 64) When a subsequent chat message is sent to the user A client ClientA, the home IM server ServerA reads the local security All message filtering criteria stored;
641 )用户 B的客户端 ClientB发送 MSRP SEND消息到其归属 IM服务器 ServerB, MSRP SEND 消息体中为用户 B发出的聊天消息;  641) User B's client ClientB sends an MSRP SEND message to its home IM server ServerB, and the MSRP SEND message body is a chat message sent by user B;
642) ClientB归屈的 IM服务器转发此 MSRP SEND消息到聊天室控制 IM服务器 ServerX; 643 ) ServerX收到所述的 MSRP SEND消息后, 回 MSRP 200 OK响应给 ServerB, 表示已经收 到;  642) The client server that the ClientB is aggravated forwards the MSRP SEND message to the chat room control IM server ServerX; 643) After receiving the MSRP SEND message, the serverX returns an MSRP 200 OK response to the ServerB, indicating that it has been received;
644) ServerB转发此 200 OK响应给 ClientB, 表示已经收到;  644) ServerB forwards this 200 OK response to ClientB, indicating that it has received it;
645) ServerX分发此聊天消息到聊天室中的所有用户, 包括用户 A, 在 ServerX分发到用户 A 的客户端 ClientA之前, 首先分发到 ClientA的归属 IM服务器 ServerA;  645) ServerX distributes this chat message to all users in the chat room, including user A, and distributes it to ClientA's home IM server ServerA before ServerX distributes it to client A's client ClientA;
ServerX转发来自 ClientB的 MSRP SEND消息到 ClientA归属 IM服务器 ServerA, MSRP SEND 消息体中包括用户 B发出的聊天消息。  ServerX forwards the MSRP SEND message from ClientB to ClientA to the IM server. The MSRP SEND message body includes the chat message sent by user B.
ServerX还可以分发该消息到其它用户, 其与本发明无关, 因此不再赘述。  ServerX can also distribute this message to other users, which is not relevant to the present invention and therefore will not be described again.
其中, 在本实施例中, ServerX本身不判断消息过滤规则, 即本身不进行消息过滤, 仍然按正常 情况下一样分发聊天消息到各用户。但本领域技术人员可以理解, ServerX也可以进行采用本地消息 过滤条件, 对消息进行过滤后再下发给 ServerA。  In this embodiment, ServerX itself does not determine the message filtering rule, that is, does not perform message filtering itself, and still distributes the chat message to each user as normal. However, those skilled in the art can understand that ServerX can also use the local message filtering condition to filter the message and then send it to ServerA.
646 ) ServerA收到所述 MSRP SEND消息后, 回 MSRP 200 OK消息给 ServerX, 表示已收到; ServerA收到消息后,从所述 MSRP SEND消息中可以获取此聊天消息发自哪个用户,属于哪个 聊天室。  646) After receiving the MSRP SEND message, the server A returns an MSRP 200 OK message to the server X, indicating that it has been received. After receiving the message, the server A can obtain the user from which the chat message is sent from the MSRP SEND message. chatroom.
65)归属 IM服务器 ServerA读取本地保存的消息过滤条件, 判断是否需要将该聊天消息转发给 其归属的且处于当前聊天室中的用户客户端;  65) Ownership IM server ServerA reads the locally saved message filtering condition, and determines whether the chat message needs to be forwarded to the user client that belongs to the current chat room;
ServerA读取消息过滤条件,根据此消息目的地址判断是否需要将该聊天消息转发给 ServerA归 属的且处天当前聊天室中的用户客户端, 在本实施例中, ClientA是 ServerA归属的客户端, 且处于 当前聊天室中, 根据步骤 63 ) 所保存的消息过滤条件, 判断不需要分发该消息给用户 A 客户端 ClientA, 因为用户 A已经设置了需要过滤用户 B的消息。  ServerA reads the message filtering condition, and determines whether the chat message needs to be forwarded to the user client that is in the current chat room that is owned by the server and is in the present embodiment. In this embodiment, ClientA is the client to which ServerA belongs. And in the current chat room, according to the message filtering condition saved in step 63), it is determined that the message need not be distributed to the user A client ClientA, because the user A has set a message that needs to filter the user B.
ServerA读取消息过滤条件, 如果是保存在本地服务器时, 则从本地服务器读取; 如果是保存 在 IM XDMS上, 则通过 XCAP标准协议接口从 IM XDMS中读取消息过滤条件。  ServerA reads the message filtering condition, and if it is saved in the local server, it reads from the local server; if it is saved on the IM XDMS, it reads the message filtering condition from the IM XDMS through the XCAP standard protocol interface.
ServerA读取消息过滤条件, 并进行判断是现有公知技术, 本发明中不再赘述。  It is a well-known technique for the server A to read the message filtering condition and perform the judgment, which will not be described in detail in the present invention.
66) 由于 ServerA判断不需要转发用户 B的消息到用户 A的客户端 ClientA, 因此后面的步骤 66-67不再执行, 即不再转发 MSRP SEND消息到 ClientA, 并由 ClientA执行收到消息响应。  66) Because ServerA determines that it does not need to forward user B's message to client A's client clientA, the subsequent steps 66-67 are no longer executed, that is, the MSRP SEND message is not forwarded to ClientA, and ClientA performs the received message response.
在本实施例中, 消息过滤条件是使用 SIP PUBLISH作为承载消息, 也可以使用 SIP MESSAGE, In this embodiment, the message filtering condition is to use SIP PUBLISH as the bearer message, or SIP MESSAGE.
MSRP SEND等其他消息来承载消息过滤条件, 其方法与本发明实施例四、 三类似, 本发明不再重 复描述。 Other messages, such as MSRP SEND, are used to carry the message filtering conditions. The method is similar to the fourth and third embodiments of the present invention, and the present invention is not repeatedly described.
进一步地, 过滤准则只对本次聊天适用, 当用户退出聊天室或者聊天室关闭后, 归属的 IM服 务器消息过滤条件, 其根据过滤规则的存储地不同, 如果是保存在本地服务器上, 则归属服务器用 内部协议清除本地存储的过滤条件; 如果是保存在 IM XDMS上, 则用标准的 XCAP协议接口清除 IM XDMS上的过滤条件; 或者是, 不管其保存在本地还是 IM XDMS上, 都不淸除消息过滤条件记 录, 但是标识其为 "无效", 说明对下一次重新启动时聊天室无效。 Further, the filtering criterion is only applicable to the current chat. When the user exits the chat room or the chat room is closed, the home IM server message filtering condition is different according to the storage rule of the filtering rule. If it is saved on the local server, the attribution is The server uses the internal protocol to clear the local storage filter conditions; if it is saved on the IM XDMS, it is cleared by the standard XCAP protocol interface. The filtering condition on the IM XDMS; or, whether it is stored locally or on the IM XDMS, the message filtering condition record is not removed, but it is marked as "invalid", indicating that the chat room is invalid for the next restart.
本实施例中由归属 IM服务器来分摊过滤即时消息的任务,其能够有效减轻聊天室控制 IM服务 器的负担, 使聊天室控制 IM服务器的运行资源能够得到更好的应用, 加快即时消息在聊天室控制 IM服务器中的处理。  In this embodiment, the task of filtering the instant message is distributed by the home IM server, which can effectively reduce the burden of the chat room controlling the IM server, enable the chat room to control the running resources of the IM server to be better applied, and speed up the instant message in the chat room. Control processing in the IM server.
本发明的消息过滤方法, 消息过滤条件范围更大, 可以按接收者用户、 按消息大小、 按消息内 容格式 (例如 JPEG、 txt等)、 按消息内容类型 (例如文本、 音频、 视频等);  The message filtering method of the invention has a larger range of message filtering conditions, which can be according to the recipient user, according to the message size, according to the message content format (eg JPEG, txt, etc.), according to the message content type (eg text, audio, video, etc.);
从用户实际使用需求来看, "用户在聊天过程中临时设置消息过滤准则"相对于 "用户在聊天之 前预设置消息过滤准则"来说, 更简单实用, 用户在聊天过程中可以随时屏蔽掉自己不喜欢的聊天 用户, 而这样的聊天用户往往是在聊天之前无法预先得知的。  From the perspective of the user's actual use requirements, "users temporarily set message filtering criteria during the chat process" is simpler and more practical than "user pre-set message filtering criteria before chatting." Users can block themselves at any time during the chat process. Chat users who don't like it, and such chat users are often not known in advance before chatting.
本发明的各个实施例只是为了使本领域普通技术人员理解本发明, 而对本发明所进行的详细描 述, 但可以想到, 在不脱离本发明的权利要求所涵盖的范围内还可以做出其它的变化和修改, 这些 变化和修改均在本发明的保护范围内。  The various embodiments of the present invention are intended to be illustrative of the invention, and the invention may be described in detail. Variations and modifications, such variations and modifications are within the scope of the invention.

Claims

权利要求 Rights request
1. 一种即时消息过滤方法, 其特征在于, 包括下列步骤- 在激活的聊天室中, 服务器接收到客户端发送的即时消息过滤条件消息;  An instant message filtering method, comprising the steps of: in an activated chat room, the server receives an instant message filtering condition message sent by the client;
服务器解析所述消息, 并进行有效性校验, 如果校验通过, 则服务器保存即时消息过滤条件; 服务器根据所述即时消息过滤条件过滤后续的即时消息。  The server parses the message and performs validity check. If the check passes, the server saves the instant message filtering condition; the server filters the subsequent instant message according to the instant message filtering condition.
2. 根据权利要求 1所述的即时消息过滤方法, 其特征在于, 还包括下列步骤:  2. The instant message filtering method according to claim 1, further comprising the following steps:
当客户端退出即时消息聊天室系统, 或者该聊夭室关闭时, 服务器消除客户端所设置的消息过 滤条件。  When the client exits the instant messaging room system, or the chat room is closed, the server eliminates the message filtering conditions set by the client.
3. 根据权利要求 1所述的即时消息过滤方法, 其特征在于, 所述服务器根据过滤条件过滤后续 的即时消息包括下列步骤:  The instant message filtering method according to claim 1, wherein the filtering, by the server, the subsequent instant message according to the filtering condition comprises the following steps:
当有后续的即时消息发送至所述的聊天室时, 服务器读取即时消息过滤条件;  When a subsequent instant message is sent to the chat room, the server reads the instant message filtering condition;
服务器根据即时消息过滤条件判断是否需要分发该后续的即时消息给客户端。  The server determines, according to the instant message filtering condition, whether the subsequent instant message needs to be distributed to the client.
4. 根据权利要求 1所述的即时消息过滤方法, 其特征在于, 所述服务器为聊天室控制 IM服务 器, 所述客户端向服务器发送即时消息过滤条件消息的方法包括下列步骤:  The instant message filtering method according to claim 1, wherein the server is a chat room control IM server, and the method for the client to send an instant message filtering condition message to the server includes the following steps:
客户端在使用所述聊天室发送即时消息过程中, 发送消息过滤条件消息, 该过滤条件消息首先 发送给归属 IM服务器; '  The client sends a message filtering condition message during the process of sending the instant message by using the chat room, and the filtering condition message is first sent to the home IM server;
客户端归属 IM服务器转发该过滤条件消息到聊天室控制 IM服务器;  The client home IM server forwards the filter condition message to the chat room control IM server;
聊天室控制 IM服务器收到该过滤条件消息后, 回响应给归属 IM服务器, 表示已经收到; 归属 IM服务器转发此响应给客户端, 表示已经收到。  After the chat server receives the filter condition message, the IM server returns a response to the home IM server, indicating that it has been received; the home IM server forwards the response to the client, indicating that it has received.
5. 根据权利要求 1所述的即时消息过滤方法, 其特征在于, 所述服务器为聊天室控制 IM服务 器, 所述客户端向服务器发送即时消息过滤条件消息的方法包括下列步骤:  The instant message filtering method according to claim 1, wherein the server is a chat room control IM server, and the method for the client to send an instant message filtering condition message to the server comprises the following steps:
客户端在使用所述聊天室发送即时消息过程中, 发送消息过滤条件, 该过滤条件消息发送给聊 天室控制 IM服务器;  The client sends a message filtering condition during the process of sending the instant message by using the chat room, and the filtering condition message is sent to the chat room control IM server;
聊天室控制 IM服务器收到该过滤条件消息后, 回响应给客户端, 表示已经收到。  Chat Room Control After receiving the filter condition message, the IM server responds to the client, indicating that it has received it.
6. 根据权利要求 1所述的即时消息过滤方法, 其特征在于, 所述服务器为归属 IM服务器, 所 述客户端向服务器发送即时消息过滤条件消息的方法包括下列步骤:  The method for filtering an instant message according to claim 1, wherein the server is a home IM server, and the method for the client to send an instant message filtering condition message to the server includes the following steps:
客户端在使用所述聊天室发送即时消息过程中, 发送消息过滤条件消息, 该过滤条件消息发送 给归属 IM服务器;  The client sends a message filtering condition message during the process of sending the instant message by using the chat room, and the filtering condition message is sent to the home IM server;
归属 IM服务器收到过滤条件消息后, 发送响应消息给客户端, 表示收到此消息。  After receiving the filter condition message, the home IM server sends a response message to the client, indicating that the message is received.
7. 根据权利要求 6所述的即时消息过滤方法, 其特征在于, 所述服务器的操作进一步包括下列 步骤:  The instant message filtering method according to claim 6, wherein the operation of the server further comprises the following steps:
归属 IM服务器将消息过滤条件保存到本地服务器, 或者通过 XCAP标准协议接口将消息过滤 条件保存到 IM XDMS。  The home IM server saves the message filter condition to the local server or saves the message filter condition to the IM XDMS through the XCAP standard protocol interface.
8. 根据权利要求 4~7任一项所述的即时消息过滤方法, 其特征在于, 所述发送消息过滤条件是 通过 MSRP SEND发送消息; 或者是通过 SIP MESSAGE发送消息; 或者通过 SIP PUBLISH发送消 ' 息。 The instant message filtering method according to any one of claims 4 to 7, wherein the sending message filtering condition is to send a message by using MSRP SEND; or sending a message by using SIP MESSAGE; or sending by SIP PUBLISH ' Interest.
9. 根据权利耍求 8所述的即时消息过滤方法, 其特征在于, 所述方法还包括下列步骤: 客户端设!:并发送过滤条件成功后, 再次发送新的过滤条件设置消息, 服务器直接覆盖以前的 过滤条件, 保存为新的过滤条件。  9. The instant message filtering method according to claim 8, wherein the method further comprises the following steps: client setting! : After sending the filter condition successfully, the new filter condition setting message is sent again, and the server directly overwrites the previous filter condition and saves it as a new filter condition.
10. 根据权利要求 8所述的即时消息过滤方法, 其特征在于, 所述方法还包括下列步骤: ' 客户端发送清除过滤条件消息, 服务器收到消息后清除以往保存的该用户端的消息过滤条件。 The method for filtering an instant message according to claim 8, wherein the method further comprises the following steps: 'The client sends a clear filter condition message, and the server clears the previously saved message filtering condition of the client after receiving the message. .
11. 根据权利要求 1或 2所述的即时消息过滤方法, 其特征在于, 所述过滤条件为接收客户端 来源, 或者发送客户端来源, 或者客户端消息大小, 或者消息格式, 或者消息内容, 或者消息类型。 The instant message filtering method according to claim 1 or 2, wherein the filtering condition is a receiving client source, or sending a client source, or a client message size, or a message format, or a message content. Or message type.
12.根据权利要求 1或 2所述的即时消息过滤方法,其特征在于,所述聊天室系统为 SIP/SIMPLE 即时消息系统。  The instant message filtering method according to claim 1 or 2, wherein the chat room system is a SIP/SIMPLE instant messaging system.
13. 一种即时消息服务器, 其特征在于, 包括- 用于在激活的聊天室中接收客户端发送的即时消息过滤条件消息的模块;  13. An instant messaging server, comprising: means for receiving an instant message filter condition message sent by a client in an activated chat room;
用于解析所述消息, 并进行有效性校验, 如果校验通过, 则保存即时消息过滤条件的模块; 用于根据该即时消息过滤条件过滤后续的即时消息的模块。  A module for parsing the message and performing validity check, if the check passes, saving the instant message filter condition; and a module for filtering the subsequent instant message according to the instant message filter condition.
14. 如权利要求 13所述的服务器,其特征在于,所述服务器为聊天室控制 IM服务器或归属 IM 服务器。  14. The server of claim 13, wherein the server is a chat room control IM server or a home IM server.
PCT/CN2006/002898 2006-01-05 2006-10-30 A method for filtering the instant message and a server thereof WO2007076674A1 (en)

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
CN200610000443 2006-01-05
CN200610000443.6 2006-01-05
CN200610080280.7 2006-05-12
CNA2006100802807A CN1997009A (en) 2006-01-05 2006-05-12 A filtering method for instant message

Publications (1)

Publication Number Publication Date
WO2007076674A1 true WO2007076674A1 (en) 2007-07-12

Family

ID=38227905

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2006/002898 WO2007076674A1 (en) 2006-01-05 2006-10-30 A method for filtering the instant message and a server thereof

Country Status (2)

Country Link
CN (1) CN1997009A (en)
WO (1) WO2007076674A1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105141502A (en) * 2015-08-12 2015-12-09 深圳前海珩昌科技有限公司 Method and device for managing instant communication process
CN106331872A (en) * 2016-08-26 2017-01-11 微梦创科网络科技(中国)有限公司 Message screening method and device in live broadcast interaction process
CN110300049A (en) * 2018-03-23 2019-10-01 阿里巴巴集团控股有限公司 A kind of message screening method, equipment and system based on instant messaging

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101114980B (en) * 2007-09-12 2010-06-09 腾讯科技(深圳)有限公司 Method and system for establishing instant communication relation
CN101136837A (en) 2007-09-21 2008-03-05 华为技术有限公司 Push-delivery message control method, device and system
CN101227427B (en) * 2007-12-27 2010-11-10 腾讯科技(深圳)有限公司 Method and system for information interaction
CN101547166A (en) * 2008-03-28 2009-09-30 华为技术有限公司 Method, device and system for filtering messages
CN103297434A (en) * 2013-06-03 2013-09-11 腾讯科技(深圳)有限公司 Method for processing data, user sides, server and system
CN106571994B (en) * 2015-10-09 2020-08-21 腾讯科技(深圳)有限公司 Instant messaging method and device and computing equipment
CN105376141A (en) * 2015-11-24 2016-03-02 阿里巴巴集团控股有限公司 Instant communication message processing method and device
CN111862708B (en) * 2020-07-09 2022-04-19 国网天津市电力公司 Regulation and control training simulation method suitable for simultaneous examination of multiple persons
CN111818091B (en) * 2020-08-07 2022-10-25 重庆虚拟实境科技有限公司 Multi-person voice interaction system and method

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6480885B1 (en) * 1998-09-15 2002-11-12 Michael Olivier Dynamically matching users for group communications based on a threshold degree of matching of sender and recipient predetermined acceptance criteria
US20050080864A1 (en) * 2003-10-14 2005-04-14 Daniell W. Todd Processing rules for digital messages
WO2005121992A2 (en) * 2004-06-04 2005-12-22 Matsushita Electric Industrial Co. Ltd. System for synthesizing instant message and presence attributes from polled, queried and event information sources

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6480885B1 (en) * 1998-09-15 2002-11-12 Michael Olivier Dynamically matching users for group communications based on a threshold degree of matching of sender and recipient predetermined acceptance criteria
US20050080864A1 (en) * 2003-10-14 2005-04-14 Daniell W. Todd Processing rules for digital messages
WO2005121992A2 (en) * 2004-06-04 2005-12-22 Matsushita Electric Industrial Co. Ltd. System for synthesizing instant message and presence attributes from polled, queried and event information sources

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105141502A (en) * 2015-08-12 2015-12-09 深圳前海珩昌科技有限公司 Method and device for managing instant communication process
CN106331872A (en) * 2016-08-26 2017-01-11 微梦创科网络科技(中国)有限公司 Message screening method and device in live broadcast interaction process
CN110300049A (en) * 2018-03-23 2019-10-01 阿里巴巴集团控股有限公司 A kind of message screening method, equipment and system based on instant messaging

Also Published As

Publication number Publication date
CN1997009A (en) 2007-07-11

Similar Documents

Publication Publication Date Title
WO2007076674A1 (en) A method for filtering the instant message and a server thereof
US8433752B2 (en) Notification of a blocked user entering or participating in a multi-user chat session
US20080270553A1 (en) Method and System for Instant Notification of Communication Block Information
CN101212719B (en) Method and system for implementing converged message service in radio communication network
KR101524313B1 (en) METHOD FOR A REQUEST AND RESPONSE OF AN INSTANT MESSAGE DISPOSITION NOTIFICATION IN A CONVERGED-IP message SERVICE AND SYSTEM THEREOF
KR101635906B1 (en) Method for providing the communication history
WO2007071145A1 (en) Method for realizing group-sending message service, device and system for the same
EP2033457B1 (en) Group advertisement method in a SIP based message service
WO2007016851A1 (en) A method for establishing the chat room data transmission channel to realize the chat message transmission
WO2008131628A1 (en) Method and messaging system for managing media contents in uniform storage
US20050044159A1 (en) Messaging system
JP2007208987A (en) Method and system for distributing contents to plural users
JP2010509835A (en) Method and system for managing message threads in an integrated IP messaging service
US8014775B2 (en) Method and system for implementing messaging services and a message application server
WO2008043261A1 (en) Convergent message system
WO2007009369A1 (en) Method and system by which instant message user can use instant message system chat room to which user unbelongs
US20080091781A1 (en) Group communication
EP2560329B1 (en) Method and processing system for routing a message request
WO2018006808A1 (en) Multimedia message forwarding method and system
WO2008074235A1 (en) Interconnection methods and message interconnection gateways between message systems
US20120166562A1 (en) System and method for routing session initiation protocol conversation
WO2013152702A1 (en) Voice message sending method and system, and converged message server and client
WO2009012724A1 (en) A method and device for communication interconnection
KR101061302B1 (en) Communication delivery report providing method, communication delivery report transmitting and receiving device, signaling message generating and receiving module, communication delivery report transmitting and receiving system
TW200844767A (en) Pulling information from information sources via refer requests

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application
NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 06805103

Country of ref document: EP

Kind code of ref document: A1