Summary of the invention
The objective of the invention is to propose a kind of method that instant message (Instant Message) filters that in the instant communicating system of dialogue-based startup agreement (SIP), increases, by in the instant communicating system of dialogue-based startup agreement (SIP), increasing an instant message filtering server, expanded the ability of user terminal and server of instant message, and by set up one the cover complete signaling process filtering server and original instant communicating system are connected, outside not changing real-time this characteristic of instant message, for instant communicating system increases new service, provide new function.According to this method, both improved the instant message reliability of service, also made things convenient for the use of user to immediate communication tool.
For achieving the above object, technical solution of the present invention provides the complete signaling process of a cover behind instant message filtering server of increase in the instant communicating system of dialogue-based startup agreement (SIP).This cover flow process comprises the steps:
One, recipient's user terminal need send (REGISTER) request of landing again and give the instant message filtering server of registering after logging on instant communicating system;
Two, the instant message filtering server accept recipient user land request after, (200, OK) signaling is given recipient's user terminal, and distributes a memory space for recipient user will to return an affirmation; Recipient's user terminal sends subscription (SUBSCRIBE) signaling that is used to subscribe to memory space state information on filtering server and gives filtering server after receiving the affirmation signaling;
Three, the transmit leg user carries out an operation that transfers immediate news by the transmit leg user terminal, and the transmit leg user terminal generates an instant message (INSTANT MESSAGE) signaling and sends to server of instant message;
Four, server of instant message is preserved the instant message of receiving temporarily, and sends an invitation (INVITE) request to recipient's user terminal, and how inquiry recipient user terminal handles the instant message that sends to him;
Five, after recipient's user terminal is received invitation (INVITE) request, request is given a response, then response is sent back to server of instant message by the strobe utility module in the inquiry terminal.Respond type and have three kinds: agree (200, OK), refusal (403, FORBIDDEN) and calling transfer (REFER);
If what six recipient's user terminals returned is that (200, OK), then server of instant message sends to recipient's user terminal with the instant message of preserving, and transmission flow finishes; If what receiving side terminal returned is that (403, FORBIDDEN), server of instant message then is transmitted to the transmit leg user terminal with this signaling, and transmission flow finishes; If that recipient's user terminal returns is (REFER), server of instant message will be according to the signaling format of calling transfer, finishes and divert the aim (instant message filtering server) sets up session.To send (INVITE) request of inviting to the destination instant message filtering server of calling transfer;
Seven, the instant message filtering server according to inviting the information of carrying in the request, is differentiated according to established rule after receiving the invitation that server of instant message sends over (INVITE) request.Two kinds of results will be arranged: the one, agree to receive this instant message; The one, reject this instant message; If agree to receive, just return (200, OK); If rejection, just return (403, FORBIDDEN);
Eight, server of instant message gives a response according to the signaling of receiving after receiving the signaling that filtering server returns.If agree to receive, then instant message is sent to filtering server; If rejection, then return (403, FORBIDDEN) give the transmit leg user terminal after, finish the instant message transmission flow;
Nine, the instant message filtering server is after receiving the instant message that server of instant message sends, instant message is saved on the filtering server, and send notice (NOTIFY) signaling to recipient's user terminal, the user is after receiving the notice that filtering server sends over, and the time of deciding in its sole discretion is read instant message from filtering server;
Ten, when recipient user want to read in preserve on the filtering server send to the instant message of oneself time, send one and be used to read on the filtering server and preserve subscription (SUBSCRIBE) request that sends to own instant message and give filtering server;
11, filtering server this that receive that recipient user sends be used to read in preserve subscription (SUBSCRIBE) request that sends to own instant message on the filtering server after, this user's of preserving instant message is sent to this recipient user;
12, recipient user is after receiving instant message, return a confirmation (200, OK) give filtering server; Filtering server receive the affirmation information that recipient user returns (200, OK) after, deletion is kept at the instant message of this recipient user on the server, the transmission flow of whole instant message finishes.
Described filtering method for instant message possesses following condition:
One, provide an instant message filtering server, a strobe utility module will be arranged on the filtering server, so that the instant message that receives can effectively be distinguished, this server also needs to have storage, forwarding capability;
Two, the function of expansion server of instant message makes server of instant message have the function of temporary transient preservation instant message and the essential information that can extract instant message, and it is included in the invitation request of transmission;
Three, the function of extending user terminal, on user terminal, add a strobe utility module, this strobe utility module is compared comparatively simple than the strobe utility module on the filtering server, only make user terminal make some preliminary judgement at the information of the description instant message that carries in the message request of receiving.
Described filtering method for instant message, in its described second step, filtering server is required to be the memory space that the user who logs on this server distributes an individual; And the subscription (SUBSCRIBE) that the user sends request, from that carries in this subscribe request and to, it all is this user's user name, the value that the expires of duration is subscribed in expression is infinitely great, illustrate that then this subscribe request is the state that the memory space of distributing to him is subscribed in requirement, if the memory space state changes, promptly there is instant message to be deposited into memory space, make the size of residual memory space that change take place, the instant message filtering server will send notice (NOTIFY) signaling and give user terminal.
Described filtering method for instant message, in described second step, recipient's user terminal need log on the instant message filtering server of recipient user's appointment after landing server of instant message again.
Described filtering method for instant message, in described second step, server of instant message will distribute a memory space for recipient user after agreeing that recipient user lands, be used for storing the instant message that sends to this recipient user.
Described filtering method for instant message, in described second step, recipient's user terminal is after landing the instant message filtering server, need to send a subscribe request that is used to subscribe to memory space state information on filtering server, subscribe to the state that the instant message filtering server-assignment is given this recipient user's memory space, once the state of memory space changes, recipient user will obtain notice.
Described filtering method for instant message, in its described the 4th step, the instant message signaling (MESSAGE) that the transmit leg user terminal sends has been carried transmit leg user's address, recipient user's address and instant message body.
Described filtering method for instant message, in described the 4th step, server of instant message is not directly it to be transmitted to recipient's user terminal after receiving the instant message signaling that the transmit leg user terminal sends; But it is preserved, send an invitation of having carried these some essential informations of instant message then and ask user terminal to the recipient.
Described filtering method for instant message, in its described the 5th step, in invitation (INVITE) message that server of instant message sends, carried the transmit leg station address, receive station address and describe the specifying information of instant message with some, as: the size of instant message body, content, form etc.
Described filtering method for instant message, in its described the 5th step, the transmit leg user terminal is according to the information of the description instant message that carries in invitation (INVITE) message of receiving, and the strobe utility module on the inquiry terminal is simply judged.If meet the reception requirement, then return and agree to receive; If the instant message that this instant message is unwilling to receive for the user then returns rejection; If the scarce capacity of user terminal is not enough to make judgement to receive the information of carrying in this instant message or invitation (INVITE) message at present, then the recipient is transferred on the instant message filtering server.
Described filtering method for instant message, it is described five, six, seven, eight, in the step, has adopted the method for calling transfer (REFER), and the recipient who has finished instant message transfers on the instant message filtering server from recipient's user terminal.
Described filtering method for instant message, in its described the 9th step, the essential information of the instant message that the invitation (INVITE) that the instant message filtering server sends according to server of instant message is carried in asking, the strobe utility module on the inquiry filtering server.If, then instant message is forwarded to recipient's user terminal for the user agrees to receive; If be that the user does not want to receive, then return rejection.
Described filtering method for instant message, in its described the 9th step, the instant message filtering server sends in notice (NOTIFY) signaling of user terminal, will carry some information of the instant message of describing storage.
Described filtering method for instant message, the calling transfer described in the 6th step is used for realizing instant message is sent to this step of instant message filtering server.
Described filtering method for instant message, in described the 7th, eight, nine steps, the judgement that filtering server is made according to strobe utility module on the filtering server is to the instant message that the receives control of classifying, for the user provides reliable instant messaging service.
Described filtering method for instant message, in its described the tenth step, the instant message filtering server is received subscription (SUBSCRIBE) request that the user sends, from that carries in this subscribe request and to, it all is this user's user name, and the expires of expression duration equals 0, and the expression customer requirements obtains the instant message in the memory space that is kept at him.
Described filtering method for instant message, in described the tenth step, user terminal can obtain the instant message that is kept on the filtering server by sending subscribe request to filtering server.
Described filtering method for instant message, in described the 11 step, instant message will send to recipient's user terminal from the instant message filtering server with the form of notice signaling.
The instant message filtering system of this dialogue-based startup agreement (SIP), by the strobe utility module on user terminal and the filtering server, realization is to the secondary filter of instant message, make at the extending user terminal capability, prevent because of the do not match instant message that causes of ability between the terminal and send the situation of failure, and when providing a believable network environment for the user, accomplished the number of times of effective minimizing instant message transmission, alleviated the burden of network, made the fast as far as possible acquisition of user send to his instant message simultaneously.
User terminal links to each other with server of instant message, constitutes an immediate news systems; And this immediate news systems links to each other with the instant message filtering server, can make the immediate news systems service for this reason of instant message filtering server.
Described instant message filtering system, its filtering services has user terminal and instant message filtering server to finish together.
The invention has the advantages that: adopt the ability that the instant message filtering of dialogue-based startup agreement of the present invention (SIP) can the extending user terminal, prevent the instant message that causes occurring because of the unmatched reason of ability between the user terminal and send the failure phenomenon, reduced the phenomenon of waste Internet resources; Simultaneously can also be for the user provide a kind of believable environment for use, help user filtering to fall some users and do not wish the instant message received.And the user can select whether use the instant message filtering server voluntarily, and uses which kind of instant message filtering server, can provide convenient service for the user.
Embodiment:
In order further to illustrate innovation part of the present invention, at first introduce basic concepts, on this basis, our ratio juris and specific embodiments are described.The instant message communication system of being discussed among the present invention is based on session initiation protocol (SIP), adopts session initiation protocol (SIP) to carry out the transmission of instant message.The particular content of instant message is converted into the file of XML form, and being placed in MESSAGE is to be implemented between user terminal and the server of instant message and to transmit in the SIP signaling of head.
The filtering method for instant message that the present invention introduced by the strobe utility module that loads, is realized the function that the instant message that the user receives is come in to filter on user terminal and filtering server.
The operation of related Session Initiation Protocol is as follows in this instant message filtering system:
REGISTER (registration): a kind of request mode in the Session Initiation Protocol is used to log on server;
INVITE (invitation): a kind of request mode in the Session Initiation Protocol, use and make a call;
200, a kind of response mode in the OK:SIP agreement is represented this request success;
ACK (affirmation): a kind of response mode of Session Initiation Protocol is used for INVITE is asked the checking of resulting response message;
403, FORBIDDEN (forbidding): a kind of response mode in the Session Initiation Protocol, the expression refusal is accepted this request
302, REDIRECT (being redirected): a kind of response mode in the Session Initiation Protocol, expression is redirected to the address of returning with this calling transfer;
SUBSCRIBE (subscription): a kind of request mode in the Session Initiation Protocol, be used for requiring the incident of being correlated with, normal and NOTIFY is used;
NOTIFY (notice): a kind of request mode in the Session Initiation Protocol is used for notifying dependent event;
Some network entities have been comprised in the instant message filtering system of dialogue-based startup agreement (SIP), comprising in logic module and module physically, these modules are responsible for the transmission of instant message and instant message are filtered, content for a better understanding of the present invention, be necessary to understand these modules, they are connected to each other according to the mode of accompanying drawing 1:
1) user terminal: all support the terminal of Session Initiation Protocol, can be computers, PDA, SIP phone etc.; The user can receive and transfer immediate news by user terminal, comprises two functional modules in the user terminal, and the one, user agent (UA), the one, strobe utility module.
2) server of instant message: the server that can store and transmit instant message, form by acting server and two modules of memory space.
3) instant message filtering server: the server that can filter, store, transmit to instant message, form by acting server, strobe utility module, memory space;
4) user agent (User Agent is called for short: UA): a user agent (UA) is the logic function module that can initiate with responds SIP request, and he comprises the application module of User Agent Client (User Agent Client is called for short: (UAC)) and subscriber proxy server end (User Agent Server is called for short (UAS)).UAC is a client application of initiating the SIP request, and UAS receives SIP requested service device end to use.
5) strobe utility module: the module how control handled instant message.
6) acting server (Proxy Server): an acting server (Proxy Server) is that server end can be initiated and the logic function module of responds SIP request.
7) memory space: the storage area that can be used for storing instant message
When the user uses the immediate news systems that support filters instant message, by these above network entities instant message is sent and filters, as shown in Figure 2, detailed process is as described below:
1) recipient user sends to the instant message filtering server of registering and lands (REGISTER) signaling, and request logs on this server.The instant message filtering server receive recipient user land request after, carry out subscriber authentication, be registered mistake as the user, then return 200, OK represents that the user lands success, and distributes a memory space for recipient user, shown in signaling among Fig. 21,2.
2) after recipient user lands successfully, send subscription (SUBSCRIBE) request, the state information of the memory space of booking reader on filtering server to filtering server.Filtering server returns 200, and OK gives user terminal, and expression is subscribed to successfully, shown in signaling among Fig. 23,4
3) the transmit leg user transfers immediate news by the transmit leg user terminal, the transmit leg user terminal generates an instant message (INSTANT MESSAGE) signaling and gives server of instant message, comprise transmitting terminal station address and receiving terminal station address in the signaling, and the instant message body, shown in signaling among Fig. 25.
4) after server of instant message is received the instant message signaling that the user sends, the instant message body is stored temporarily, and according to the receiving terminal station address that carries in the instant message signaling, send and invite (INVITE) signaling to give recipient's user terminal, invite some basic descriptors that carry in (INVITE) signaling instant message, shown in signaling among the figure 6.
5) after recipient's user terminal was received invitation (INVITE) request, the strobe utility module by on the inquiry terminal gave a response.If agree to send, then will return 200, OK; If forbid sending, then will return 403, FORBIDDEN; Be transmitted to the instant message filtering server as need, then can start the calling transfer pattern.If start the calling transfer pattern, user terminal can return one 200 earlier, OK, wait until again receive the affirmation signaling ACK that server of instant message returns after, send to server will carrying the REFER signaling that diverts the aim, as signaling among Fig. 27, shown in 8,9.
6) server of instant message is after receiving the REFER signaling, according to the signaling format of calling transfer, can return earlier (202, ACCEPT) represent to accept transfer request, send notice (NOTIFY) signaling then and give recipient's user terminal, inform that preparation sends request to diverting the aim.Recipient's user terminal return (200, OK), confirm to receive signaling, the recipient sends the BYE signaling simultaneously, discharges the resource that takies when session is set up between the two in the front, after server is received the BYE signaling, return (200, OK).At this moment, server of instant message is again to diverting the aim, and promptly the instant message filtering server sends and invites (INVITE) request, and this process is shown in signaling 10-15 among Fig. 2.
7) after filtering server was received and invited request, the strobe utility module on the inquiry server was made corresponding response then.If filtering server agree to receive this instant message, then return 200, OK gives server of instant message, disagrees with then to return that (403, FORBIDDEN), what signaling 16 was described among Fig. 2 is the situation that the instant message filtering server agrees to receive this instant message.
8) server of instant message receives 200, behind the OK, returns ACK and confirms, expression session is between the two set up; According to the form of calling transfer, server of instant message need send notice signaling (NOTIFY) and give the transmit leg user terminal, tell and divert the aim between session set up, the transmit leg user terminal will return 200, OK, the session teardown of setting up before between the two; At this moment, server of instant message could transfer immediate news to filtering server (INSTANT MESSAGE); After instant message transmitted and to finish, server of instant message sent the BYE signaling to filtering server, and session is removed in the expression request, filtering server return (200, OK), represent session teardown between the two; Instant message finishes from the process that server of instant message sends to the instant message filtering server; Shown in signaling 17-22 among Fig. 2.
9) after filtering server is received instant message, can send notice (NOTIFY) signaling and give recipient's user terminal, tell the user to have to send to his instant message to be kept on the filtering server; The user returns 200, OK after receiving notice (NOTIFY) signaling that filtering server sends.Inform that filtering server has received the notice signaling that sends; Shown in signaling among Fig. 2 23,24.
10) want when filtering server reads the instant message that sends to him as recipient user, send to one of filtering server by recipient's user terminal and be used to read in and preserve subscription (SUBSCRIBE) signaling that sends to own instant message on the filtering server; Shown in signaling among Fig. 2 25.
11) after filtering server is received subscription (SUBSCRIBE) signaling that recipient user sends again, this user's of storing on the server instant message is sent to recipient's user terminal in the mode of NOTIFY; Shown in signaling among Fig. 2 26.
12) recipient user is after receiving notice (NOTIFY) signaling that filtering server sends, return to filtering server 200, OK has represented to receive the signaling that server sends, and after filtering server was received and confirmed signaling, superincumbent recipient user's instant message was preserved in deletion; Shown in signaling among Fig. 2 27.