Background technology
At present main real-time communication service market, the whole world mainly contain " AIM Instant Messenger ", ICQ, the Microsoft of AOL " MSN Messenger ", Yahoo " Yahoo Instant Messenger " and in the China's Mainland very popular " QQ "; Each is managed by different dealers; All adopt the exclusive private communications protocol that belongs to (proprietary); On function, do not have very big difference; And on market each have their own support person, but can only on identical realtime communication system, just can carry out communication between the confirmable user of being, can't intercommunication between the different system.Such influence causes the user when selecting realtime communication system; Can not only terminate in individual's hobby and custom; And must consider other same friend who uses realtime communication system, household, colleague's etc. selection; Therefore perhaps you have been noted that some people can install the above realtime communication system of many covers on same the computer, with convenient be scattered in the friend who uses different realtime communication systems everywhere and get in touch with.
The real-time communication service technology mainly comprises real-time message (instant messaging) and presence information (presence) technology.Know by " real-time message " and the literal of " presence information "; The main characteristic of real-time communication service is to know who is just online; Then can transmit real-time message talks with it; Or in whose just busy or meeting, you possibly just must select other communication way, for example transmit news in brief or Email etc.The another one characteristic is the transmission tool real-time of message, and being different from the past, message system (as Email, news in brief, multimedia message etc.) adopts the mechanism of transmitting then that stores earlier.
SIMPLE WG (SIP for Instant Messaging and Presence Leveraging ExtensionsWorkgroup;) be found in for the year ends 2000; Selected SIP is the basic communications protocol of real-time message and presence information, discusses then and works out relevant SIP standard and extend.SIP is directed into real-time message and the presence information system is a very natural thing, and this is because due to the nature of SIP.SIP is the communications protocol that IETF (InternetEngineering Task Force) formulates a kind of transmission signal (signal); Mainly in order to consult, to manage and to stop media dialog stroke (media session); This kind media dialog stroke is to transmit communications protocol by specific data to accomplish, for example RTP (Real-time Transport Protocol).
Generally speaking, SIP is used for setting up voice call, but does not have the foundation that regulation SIP can only be used for voice call in the standard, and it does not rely on specific bottom medium, perhaps talks with the kind of stroke.Therefore when message also at last during a kind of medium, use SIP with regard to more naturally only.And SIP is in the world of network communication, the communications protocol that has been widely used at last, and it has possessed the function of registration (registration) and authentication (authentication).
Open session initial protocol (SIP) is a kind of standard agreement, through the extension protocol SIMPLE of SIP, though can realize communicating terminal between the exchange of real-time message, still can't realize the group chatting of real-time message.That is SIMPLE can't realize the real-time message exchange in the group.
Summary of the invention
The present invention is in order to solve the above-mentioned technical problem that exists in the background technology, and a kind of real-time information exchange method and system are provided.
Technical solution of the present invention is: the invention provides a kind of real-time information exchange method, its special character is: this method may further comprise the steps:
1) registration first member and second member on server;
2) first member passes on first invitation request that comprises session initiation protocol through this server and gives second member, and good friend's inventory of first member comprises second member;
3) after second member receives this first invitation request, form interim group with first member, member's tabulation of this interim group comprises first member and second member, and member's tabulation is stored in respectively among first member and second member;
4) form interim group after, pass on message through server between first member and second member.
Above-mentioned real-time information exchange method is further comprising the steps of:
5) registration the 3rd member on server;
6) add the 3rd member in interim group;
7) state first member, second member and the 3rd member and pass on message through server each other.
Above-mentioned steps 6) concrete implementation is following:
6.1.1) first member passes on second invitation request through server and give the 3rd member, the reference point of second invitation request comprises second member;
6.1.2) after the 3rd member receives second invitation request, according to the reference point of second invitation request, pass on one the 3rd invitation request through server and give second member;
6.1.3) second member receives the 3rd invitation request.
Above-mentioned steps 6) concrete implementation is following:
6.2.1) second member passes on the submission of session initiation protocol through server asks to first member, the invitation target of this submission request is the 3rd member;
6.2.2) after first member receives this submission request, submit the invitation target of request to according to this, pass on second invitation request through this server and give the 3rd member, this second member of the reference point of this second invitation request;
6.2.3) after the 3rd member receives second invitation request, according to the reference point of second invitation request, pass on the 3rd invitation request through server and give second member;
6.2.4) second member receives the 3rd invitation request.
Above-mentioned steps 7) concrete implementation is following:
7.1) first member passes on first message and second message respectively through server and give second member and the 3rd member;
7.2) second member receives first message;
7.3) the 3rd member receives second message.
Above-mentioned real-time information exchange method also comprises step:
8) member withdraws from interim group in the interim group.
Above-mentioned steps 8) concrete implementation is following:
8.1) first member passes on first of session initiation protocol respectively through server and leave notice and second and leave notice and give second member and the 3rd member;
8.2) second member and the 3rd member receive first respectively and leave notice and second and leave notice;
8.3) after second member and the 3rd member accomplished response, first member accomplished and withdraws from interim group.
A kind of real-time message switching system of realizing above-mentioned real-time information exchange method, its special character is: this switching system comprises: server; First member, first member links to each other with server, and on server, registers; First member sees first invitation request of session initiation protocol off to server; Second member, second member links to each other with server, and on server, registers, and second member is present in good friend's inventory of first member; Second member forms interim group with first member after receiving this first invitation request via server; Member's tabulation of said interim group comprises first member and second member, and this member's tabulation is stored in first member and second member respectively; After interim group forms, pass on message between first member and second member through server.
Above-mentioned this switching system also comprises the 3rd member; The 3rd member links to each other with server, on server, registers, and adds in the interim group; First member, second member and the 3rd member pass on message through server each other.
Above-mentioned first member passes on first message and second message respectively through server and gives second member and the 3rd member; Second member receives first message; The 3rd member receives second message.
The present invention can instruct based on SIP, accomplishes the function that interim group sets up and the member adds (or deletion), just can reach group's communication switching function then.Therefore, extend, just be not limited to man-to-man communication switching based on the communication switching of SIP, and can expand to the communication switching in the interim group via improvement of the present invention.And; Server a usefulness as transfer instructions, request and message; State between the member is not learnt (that is, do not need to subscribe to server group's state of group) through server, and arbitrary member only need learn other member condition through the response that " MESSAGE " instructs.In addition, member's tabulation is stored in each member, if there is the member to add (or withdrawing from), other all members all can receive invitation (or notice), can upgrade member's tabulation of all members then.In other words, the present invention can reach the function of meeting talk and group chatting, lets based on the application of SIP more extensive.
Embodiment
Referring to Fig. 1, real-time message switching system 3 of the present invention comprises server 30, first member 32 and second member 34.First member 32 and second member 34 all are linked to server 30, and registration on server 30.
Before intrasystem communication switching begins, must set up interim group and add the member, just can carry out follow-up group member communication switching.Yet the foundation of interim group, member's adding and withdrawing from of member all have different flow processs.Following explanation will be divided into four blocks and describe its flow process respectively:
A, set up interim group;
B, adding member (inviting) by crowd master;
C, adding member (other main member of non-crowd invites);
D, member withdraw from interim group.
A, set up interim group:
The person of foundation is through inviting the member to add the mode of talks, setting up interim group.And the person of foundation uses " INVITE " request of session initial protocol to add a member who is present in good friend's inventory.After the person of foundation accomplished the program of inviting the member, interim group set up and accomplishes.The person of foundation is usually located at first cis-position of the member tabulation of this interim group, therefore be that the crowd of this interim group is main, and then the crowd is main adds fashionablely the invitation newcomer, have critical role.
Inviting second member with first member is example to form interim group, and good friend's inventory of first member comprises second member.
Referring to Fig. 2, need registration first member 32 and second member 34 earlier on the server 30, just can carry out subsequent step.At first, execution in step S10, first member 32 see invitation (INVITE) request of session initiation protocol (SIP) off, and the target of sending of this invitation request comprises second member 34.Then, execution in step S12, server 30 send target according to this and pass on this invitation request to second member 34.
Second member 34 receives this invitation request, and after accomplishing response, just can form an interim group with first member 32.Wherein, the member of this interim group tabulation comprises first member 32 and second member 34, and this member's tabulation is stored in first member 32 and second member 34 respectively.
B, adding member (inviting) by crowd master:
After interim group sets up; If the main desire of crowd is invited the newcomer; Then initiate member needs to use in " INVITE " request and the interim group all members except the person of foundation to carry out media channel and bearing capacity is consulted, that is shake hands (handshaking).
Inviting the 3rd member with first member is example, and first member is that the crowd of interim group is main, and this good friend's inventory of first member comprises the 3rd member.
Referring to Fig. 3; Execution in step S20 at first, first member 32 see first invitation request off and give server 30, and this first invitation request comprises sends target and with reference to (X-referto) value; The target of sending of first invitation request of this embodiment is the 3rd member 36, and reference point is second member 34.
Then, execution in step S22, server 30 passes on this first invitation request to the 3rd member 36 according to the target of sending of this first invitation request.
Then, execution in step S24 after the 3rd member 36 receives this first invitation request, sees second invitation request off according to this reference point and give server 30, and the target of sending of this second invitation request is second member 34.
At last, execution in step S26, server 30 be according to the target of sending of this second invitation request, passes on this second invitation request to give this second member 34.
Second member 34 receives second invitation request, and after accomplishing response, the 3rd member 36 has added this interim group, has also accomplished the program that the main newcomer of invitation of crowd adds.
C, adding member (other main member of non-crowd invites):
If other main member's desire of non-crowd invites the newcomer to add group in the group, the member's data that then need submit to desire to invite give the crowd main, must invite the newcomer through crowd master.After crowd master received submission information, invitation flow process afterwards was as the main flow process of inviting the newcomer of above-mentioned crowd.
Inviting the 3rd member to add group with second member's desire is example, and second member is not the crowd master of interim group, and this good friend's inventory of this second member comprises the 3rd member.
Referring to Fig. 4, at first, execution in step S30, second member 34 see one off and submit to (REFER) request to give server 30, and this submission request comprises one and submits target to, and the submission target of this embodiment is the 3rd member 36.
Then, execution in step S32 after server 30 receives and submits request to, must pass on this submission request to crowd main (first member 32).
Then, execution in step S34, crowd main (first member 32) submit target to according to this after receiving this submission request, see first invitation request off and give server 30.Wherein, this first invitation request comprises and sends a target and a reference point.The target of sending of this first invitation request is the 3rd member 36, and reference point is second member 34.
Then, execution in step S36, server pass on this first invitation request to the 3rd member 36 according to the target of sending of this first invitation request.
Then, execution in step S37 after the 3rd member 36 receives this first invitation request, according to this reference point of this first invitation request, sees second invitation request off and gives server 30, and the target of sending of this second invitation request is second member 34.
At last, execution in step S38, server 30 pass on this second invitation request to second member 34 according to the target of sending of this second invitation request.
Second member 34 receives second invitation request, and after accomplishing response, the 3rd member 36 has added this interim group, has also accomplished the program that the main member of non-crowd invites the newcomer to add.
D, member withdraw from interim group:
If the member desires to withdraw from interim group, then need send one to leave notice to each remaining member in this interim group, let other all members can upgrade own member's tabulation of being deposited.
Referring to Fig. 5, desiring to withdraw from this interim group with first member is that example describes.At first, execution in step S40, first member 32 transmits first of SIP and leaves (BYE) notice to server 30.Wherein, this first leave notice the target of sending be second member 34.
Then, execution in step S42, server 30 according to this first leave notice the target of sending, pass on that this first leaves notice and give second member 34.
Then, execution in step S44, first member 32 transmits second and leaves notice to server 30.Wherein, this second leave notice the target of sending be the 3rd member 36.
At last, execution in step S46, server 30 according to this second leave notice the target of sending, pass on that this second leaves notice and give the 3rd member 36.
First leave notice and this second and leave notice when second member 34 and the 3rd member 36 all receive this, and after accomplishing response, first member 32 accomplishes the program that withdraws from interim group.
What need remark additionally is that after first member 32 withdrawed from group, if second member 34 is second cis-position of member's tabulation of group, then second member 34 became the crowd master of this group.If second member 34 will withdraw from this group, likewise second member needs to pass on through server 30 one the 3rd to leave notice (not illustrating) to the 3rd member 36; After notice was left in the 3rd member 36 receptions the 3rd, second member 34 accomplished the group's program that withdraws from.
So far, the present invention can reach the foundation of interim group based on SIP, has also reached member's interpolation and deletion, has therefore also just accomplished the necessary environment of group's communication switching.
Referring to Fig. 6, with the complete communication switching process real-time information exchange method that is elaborated.At first, execution in step S50, first member 32 see one first message and one second message simultaneously off and give server 30.Owing to be group chatting; The chat content that each member receives is the same (being similar to broadcast message); Therefore the chat content of first message and second message is identical, but the target of sending of first message is that the target of sending of second member, 34, the second messages is the 3rd member 36.
Then, execution in step S52, server 30 are according to the target of sending of sending the target and second message of first message, and first message of passing on is given second member 34, and second message of passing on is given the 3rd member 36.When second member 34 and the 3rd member 36 respond respectively accomplish after, accomplished a communication switching of group chatting.
In addition, exchange the transmission of accomplishing message language through SIMPLE " MESSAGE " instruction between group member.The member of all supports " MESSAGE " instruction also can support pure words (plain text) form, CPIM (Common Presence and Instant Messaging) form or the message of HTML (HyperTextMarkup Language) form.Member in the group need not subscribe to group and learn group's state, can instruct resulting response according to " MESSAGE " because send message person, obtains the delivery status of message, and then obtains member's current state.If first member just at typing character, can notify other member current state about first member through " MESSAGE " instruction, for example: " first member typewrites ".