CN1956386A - Method for set-up blogger and immediate communication of the blogger based on reciprocity mode - Google Patents

Method for set-up blogger and immediate communication of the blogger based on reciprocity mode Download PDF

Info

Publication number
CN1956386A
CN1956386A CN 200510100837 CN200510100837A CN1956386A CN 1956386 A CN1956386 A CN 1956386A CN 200510100837 CN200510100837 CN 200510100837 CN 200510100837 A CN200510100837 A CN 200510100837A CN 1956386 A CN1956386 A CN 1956386A
Authority
CN
China
Prior art keywords
discussion group
packet
group
discussion
client
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN 200510100837
Other languages
Chinese (zh)
Other versions
CN100505629C (en
Inventor
李斌
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CNB2005101008374A priority Critical patent/CN100505629C/en
Publication of CN1956386A publication Critical patent/CN1956386A/en
Application granted granted Critical
Publication of CN100505629C publication Critical patent/CN100505629C/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Information Transfer Between Computers (AREA)

Abstract

This invention relates to a method for setting up blogger groups based on the peer-to-peer mode including: A, a customer end of a creator gets the basic information of the blogger group including: an exclusive ID of the blogger group, list of members of the group and user ID of the creator, B, combining the basic information of the group in a data packet, the message kind of which is that for setting up the blogger group, C, traversing the list of the blogger group members to get their related address information one by one to be taken as the parameters to generate SK interface to send the data packet for setting up blogger group, D, when the customer end of the members receives the data packet successfully, a blogger group entry is generated and displayed then to be fed back to the customer end of the successful sending, E, the customer end of the blogger group sets up the group successfully.

Description

Set up the method for discussion group and this discussion group's instant messaging based on ad-hoc mode
Technical field
The present invention relates to technical field of telecommunications, particularly relate to a kind of method of setting up the instant messaging of discussion group and this discussion group based on ad-hoc mode.
Background technology
Network instant communication service (IM, Instant Messenger) is a kind of communication service based on the Internet, JICQ has obtained using widely and approving on the internet, JICQ is applied to enterprises, formation is based upon the service mode on the network instant communication service technology, is the development trend of network instant communication service.
Along with the net networks development, the network instant communication instrument is accepted by most netizen, carry out daily exchanges and communication, but the chat mode development between the user does not still have too big variation so far, the user only needs the exchange way of individual to the individual, simultaneously also need and to discuss to certain topic with a plurality of people, therefore the form that the many people's dialogues of group or this class of discussion group occurred, the appearance of group and the many people of this class of discussion group dialogic operation greatly facilitates the exchanges and communication between a plurality of users, make user's interchange scope also become more extensive, simultaneously can get access to valuable information by IM software there from a plurality of users in daily life, improve the ability that tackles problems on one's own.
But, the foundation of discussion group all is to be control centre with the server at present, promptly in server, set up the data list structure of discussion group, information such as the title of the unique ID of each discussion group of preservation, discussion group, the member of discussion group tabulation in this data in server storehouse.The described flow chart of setting up the method for discussion group in server sees Fig. 1 for details, and its method comprises:
Step L1: the user sets up the porch in discussion group and wishes to set up discussion group and the member of discussion group tabulation; The founder selects to wish that the member who adds discussion group adds in the member of the discussion group tabulation;
Step L2: founder's user ID and member's tabulation are combined in the protocol data bag, and port according to a preconcerted arrangement generates sockets interface described protocol data bag is sent in the server;
Step L3: described server is decrypted or parse operation the packet that receives, and writes database according to the agreement section that is resolved to, founder's user ID and member's data list, and the unique ID of described discussion group is set;
Step L4: after writing the database success, send the establishment success protocol command that has discussion group's unique ID to the founder; Described founder writes the discussion group's unique ID that receives in the local memory module.
After discussion group sets up successfully, be responsible for all essential informations (unique ID, discussion group's title, the discussion group that mainly comprises founder's user ID, discussion group added member's tabulation) in the maintenance and management discussion group by server, and link up for the message between the member of discussion group, implementation procedure is: at first certain member of discussion group sends certain message to server, and the content of described message comprises: the font format of sender of the message's user ID, message content, message, the unique ID of discussion group etc.; When server received the message of described discussion group, Zu unique ID was searched the user ID of member's tabulation of this discussion group, i.e. Subscriber Number in the data in server storehouse through discussion; Travel through the tabulation of described user ID then, tabulate described forwards in the corresponding member of discussion group according to this; After the member of discussion group receives message, this is resolved and show.In this process, multinomial works of treatment such as in fact server has been finished and searched, traveled through, forwarding have strengthened the pressure of server greatly.
Therefore, along with the number of users and the increase gradually of setting up discussion group's quantity, will cause the huge storage pressure to discussion group's server, discussion group's server must guarantee that enough memory spaces preserve and manage the data list structure of each discussion group in instant communication process; And the message between the member of discussion group also is to be transmitted accordingly according to member's tabulation by discussion group's server when transmitting, and can increase the concurrent processing pressure of discussion group's server, thus the operation cost when increasing discussion group's server exploitation.
Summary of the invention
The technical problem that the present invention solves provides a kind of method of setting up discussion group and this discussion group's instant messaging based on ad-hoc mode.This scheme is set up to solve server in the present technology, when management and deletion discussion group and cause the increasing problem of server stores and concurrent processing ability, the operation cost when also reducing simultaneously discussion group's server exploitation.
For addressing the above problem, the invention provides and a kind ofly set up the method for discussion group based on ad-hoc mode, comprise step:
A, founder's client are obtained the essential information of discussion group, and described essential information comprises: discussion group's unique identification, the member of discussion group tabulation and founder's user ID;
B, the essential information of described discussion group is combined in the packet, described data packet message type is to set up the type of message of discussion group;
C, the traversal member of discussion group tabulation are obtained the corresponding address information of the member of discussion group one by one, and it are generated sockets interface as parameter, send the described packet of setting up discussion group;
D, when the member's of discussion group client successfully receives the packet of client discussion group, generate and show discussion group's clauses and subclauses in the member's of discussion group client, and send successfully to founder's client feedback;
E, the member's of discussion group client is set up discussion group's success.
Founder's client is obtained and is comprised in the described steps A::
21) founder's client receives the user and creates discussion group's request, obtains discussion group's information about firms;
22) described discussion group information about firms is joined in the member of the discussion group tabulation;
23) utilize the global unique identification symbol generating function of application programming interfaces to generate described discussion group unique identification.
Founder's client is obtained also and is comprised in the described steps A: the title that described discussion group is set.
Also comprise among the described step B: described packet cipher mode is by appointment encrypted.
Traversal comprises among the described step C: travel through the described member of discussion group tabulation, obtain the user ID that each discusses the member;
Obtain among the described step C and comprise: inquire about local storage file according to described user ID;
Generate among the described step C and comprise: utilize the application interface function of the relevant sockets interface of bottom, with described address information as parameter.
Described step C also comprises: utilize event call-back mechanism to wait for the answer that group member message is discussed.
Between step C and step D, also comprise: judge by event call-back mechanism whether the packet of discussion group is set up in described transmission overtime, if it is overtime, at the appointed time described packet is resend by timer is set,, then abandon if in official hour, do not send successfully.
The specific implementation process of described step D is:
D1, asynchronous when receiving packet at the sockets interface of agreement as the user judges that whether described packet is the active data bag, if not, then continues asynchronous wait packet; If protocol format by appointment parses the type of message in the described packet;
D2, if the type of message that described type of message is a discussion group to be set up, the unique identification and the member of the discussion group tabulation that then obtain to set up discussion group by the resolution data bag;
D3, inquire about whether there is this discussion group in the local storage file,, then upgrade the former member of the discussion group tabulation in the local storage file if exist according to the unique identification of described discussion group; Otherwise, in local storage file, set up the unique identification of described discussion group, the data structure of the member of discussion group tabulation;
D4, generation discussion group clauses and subclauses, and notify founder's client discussion group to send successfully.
Judge by the mode of deciphering or parsing whether described packet is the active data bag, and its detailed process is among the described step D1:
Client is decrypted described packet, if can successfully decipher, then described packet is an effective data packets; Perhaps
Client is resolved data to be decrypted bag protocol format by appointment, if can successfully resolve, then described packet is an effective data packets.
Also obtain the title of discussion group by resolving described packet among the described step D2.
Described method also comprises: utilize local storage file to preserve the data structure of the successful discussion group of described foundation, and the data structure of described discussion group comprises discussion group's unique identification, discussion group's title, founder's user ID and the adding member's of discussion group the member of discussion group tabulation.
In addition, the present invention also provides a kind of instant communicating method of the discussion group based on ad-hoc mode, and described method comprises step:
A, session initiator obtain the unique identification of discussion group;
B, according to the unique identification of the described discussion group inquiry member of discussion group tabulation;
The member's of discussion group user ID is obtained in C, the described member of discussion group of traversal tabulation, and to address information that should user ID, and generate sockets interface;
D, be provided with that to send the data packet message type be discussion group's message, and with unique identification, Member Users's sign of itself and described discussion group, wish that the message content that sends and sender's user ID form by appointment package, and send by sockets interface;
E, corresponding member's client receive packet in the asynchronous wait of the sockets interface of agreement, and the packet mode by appointment that receives are resolved;
F, judge whether described sender's user ID is present in the pairing discussion group of unique identification of described discussion group, if this message is presented at the client of discussion group.
Compared with prior art, the present invention has following beneficial effect: the present invention will change a kind of processing mode by client control discussion group into by the mode of server controls discussion group in the prior art, promptly based on the discussion group of ad-hoc mode.The technic relization scheme that the present invention proposes based on the discussion group of ad-hoc mode, do not influencing under the situation that the user uses discussion group custom, significantly reduced the pressure of the aspects such as memory space, concurrent processing and load of server, utilize the discussion group of this ad-hoc mode, the foundation that no longer needs server to participate in discussion and organize, management, forwards, operational processes such as deletion, all finish whole process by client, can save the cost of developing expense like this, adapt to the demand that the user increases gradually to discussion group.
Description of drawings
Fig. 1 is prior art is set up the method for discussion group in server a flow chart;
Fig. 2 the present invention is based on the flow chart that ad-hoc mode founder client is set up the method for discussion group;
Fig. 3 is based on the flow chart of method of the member's of ad-hoc mode discussion group client process discussion group;
Fig. 4 is the flow chart of method of instant messaging that the present invention is based on the discussion group of ad-hoc mode.
Embodiment
Core of the present invention is as certain member of discussion group (founder) when wishing initiation session, the founder sets up discussion group, and the data structure of wishing to add the member of discussion group tabulation, by setting up the operation interface of discussion group, the title of newly-built discussion group can be set, and will join in the member of the discussion group tabulation, and generate discussion group's unique identification by the group membership; Secondly, with the operation that packages of member's tabulation of described discussion group unique identification, discussion group's title, discussion group and founder's user ID form by appointment, and described packet is set to set up the packet of discussion group; Once more, by traveling through the user ID of each member of discussion group in the described member of the discussion group tabulation, inquire about the address information (being dynamic IP addressing and port) that local storage file obtains the described member of discussion group according to user ID, and utilize described IP address and port for parameter generates the sockets interface that sends message, send the described packet of setting up discussion group; At last, if setting up discussion group's packet sends successfully, then search the next member of discussion group in this discussion group, carry out above-mentioned identical step, until all members of discussion group have been searched, the panel administrative unit then will generate corresponding discussion group clauses and subclauses, so that later administering and maintaining discussion group, store the essential information of this discussion group simultaneously by local storage file, and feed back the successful notice of transmission to described founder.
And when client receives the described packet of setting up discussion group, judge earlier active data bag when described packet whether, if, then parse the type of message of described data packet by the protocol format of agreement, even described data packet message type is for setting up the data packet message type, and parse described discussion group unique identification, discussion group's title and the member of discussion group tabulation, and inquire about whether there is this discussion group in the local storage file according to discussion group's unique identification, if exist, then upgrade described discussion group, otherwise, set up described discussion group unique identification, discussion group's title and the member of the discussion group essential information of discussion group such as tabulate, and preserve.
The present invention just changes the processing mode of controlling the discussion group of foundation by server in the prior art into a kind of processing mode of the discussion group that is set up by client oneself control.At present the technic relization scheme of discussion group is to be control centre with the server, is responsible for the instant messaging between foundation, deletion, management and this group member of discussion group by server.But, increase gradually along with the quantity of the discussion group of number of users and foundation, no matter from memory space, concurrent processing and load aspect have all caused the immense pressure to server, therefore, the present invention proposes a kind of technic relization scheme of the establishment discussion group based on ad-hoc mode, in this scheme by the foundation of the responsible discussion group of each client equity, control, operations such as management and deletion discussion group, and, aforesaid operations does not pass through server, that is to say that this scheme all has been distributed to client to original each pressure to server, can greatly satisfy the requirement of user to the Requirement Increases of discussion group, and the present invention is the same with original interface operation interface to user's the form of expression, just inner processing procedure is optimized accordingly, thereby for the user, will can not cause any impact, simultaneously reduce development cost again, adapted to the demand that the user increases discussion group greatly.
Below in conjunction with accompanying drawing, the present invention is described further.
The technic relization scheme of the discussion group based on ad-hoc mode of the present invention, mainly comprise two parts content, a part is based on the process that ad-hoc mode is set up discussion group, and the described process of setting up discussion group comprises that again founder's client sets up the process of discussion group and the process of setting up discussion group of the member of discussion group client.Another part is based on the instant messaging process of the discussion group of ad-hoc mode.Respectively it is described in detail below.
See also Fig. 2, be the flow chart of setting up the method for discussion group based on the ad-hoc mode founder of the present invention.Described method comprises step:
Step S10: founder's client is obtained the essential information of discussion group, and described essential information comprises: discussion group's unique identification, the member of discussion group tabulation and founder's user ID;
Step S11: the essential information of described discussion group is combined in the packet, and described data packet message type is to set up the type of message of discussion group;
Step S12: the traversal member of discussion group tabulation, obtain the corresponding address information of the member of discussion group one by one, and it is generated sockets interface as parameter, send the described packet of setting up discussion group;
Step S13: when the member's of discussion group client successfully receives the packet of client discussion group, generate and show discussion group's clauses and subclauses in the member's of discussion group client, and send successfully to founder's client feedback;
Step S14: the member's of discussion group client is set up discussion group's success.
When certain user wishes to set up discussion group, in the time of can carrying out with multi-conference, earlier the discussion group by IM software sets up inlet and accesses operation interface, and the user sets up the operation interface of discussion group by operation, sets up the data structure that the user wishes to add member's list initialization of discussion group simultaneously; The user can constantly add the newcomer in the member of the discussion group tabulation by operation interface, also the title of newly setting up discussion group can be set simultaneously.The described title of discussion group that is provided with is just in order to allow other members better distinguish this discussion group, if the unique ID of discussion group only is set for discussion group, some the time user can not well distinguish, therefore, the title that discussion group is set not is necessary, but,, should preferentially use if the title of discussion group is set.
The user will wish that by interface operation the member of discussion group who adds fills in the data structure of the member of discussion group tabulation of described foundation.And global unique identification symbol (GUID, Global UniqueIdentifier) generating function of utilizing Windows bottom layer application program interface (API, Application Program Interface) generates the unique ID of discussion group.The unique identification of discussion group of the present invention is different with the uniquely identified generative process of discussion group of the prior art: the generative process of described prior art is: in server owing to adopt Database Systems, therefore the ID of discussion group is the major key of tables of data in the database, is to generate automatically according to the data item that has had automatically in the database.Such as, the discussion group's unique identification in discussion group's tables of data 100 row have been arranged, when the user applied for creating a discussion group unique identification again again now, then described Database Systems can be returned discussion group's unique ID after successfully writing tables of data be 101.And discussion group of the present invention uniquely identified generative process does not have the support of database, therefore adopts the bottom layer application program interface api function CreateGUID of Windows to generate.The described uniquely identified purpose that generates discussion group is to make things convenient for the user to manage discussion group in the storage of this locality, also can avoid out the not unique situation of the ID of discussion group simultaneously.
Founder's client is with the essential information of discussion group, be these fields such as user ID of member's tabulation of unique ID, discussion group's title, discussion group of discussion group and founder by the format combination of agreement in the protocol data bag, wherein, the protocol format of described agreement is in advance by recipient and the common agreement of transmit leg, that is to say, described protocol format is the group packet format of packet just, and the general data bag comprises packet header, inclusion and bag tail.Comprise in the described packet header: some protocol commands number, subcommand number or the like; Described inclusion comprises: the content of described packet, such as, tabulate or the like if comprised unique ID, type of message, the member of discussion group of discussion group in the packet of the present invention; Described bag tail comprises: some packet end marks or the like.And this data packet message type is set is to set up the type of message of discussion group, and utilizes the cryptographic algorithm of agreement that packet is encrypted.In fact, cryptographic algorithm of the present invention is just maintained secrecy to the data that sent, and mainly is the fail safe of considering the packet sent, packet is not encrypted directly to send yet to be fine in this process.Therefore described cryptographic algorithm is common cryptographic algorithm, and this is known technology for the person of ordinary skill of the art, here repeats no more.
The data structure of the member of the discussion group tabulation that traversal is filled, obtain each member's of discussion group Uin number, it is user ID, inquire about local storage file according to described user ID, obtain in the local storage file address information that should the member of discussion group, described address information comprises: dynamic IP addressing and PORT port.Wherein, the mode of described traversal has two kinds: a kind of is to adopt the mode of traversal one by one, promptly search a member's of discussion group user ID earlier, after obtaining its corresponding address information, search the next member of discussion group again, after obtaining its corresponding address information, continue to search the next member of discussion group, all searched until all members of discussion group; Another kind is the user ID of searching all members of discussion group earlier, obtains the member's of this discussion group address information more respectively according to user ID.But the realization principle of the two is basic identical, and it realizes that principle is next for the technology people of ability, all is known timely, therefore here repeats no more.And described local storage file comprises basic document information that should the user, such as the member's of discussion group title, contact method, age or the like; Dynamic data information is such as state, IP address and PORT port or the like.In this this locality storage file, be that keyword is organized, therefore can find by user ID with the user label.And with the IP address that obtained and PORT as parameter by the relevant socket api function CreateSocket generation sockets interface of Windows bottom, and send the described protocol data bag of setting up discussion group through encrypting, utilize event call-back mechanism to wait for member's return messages simultaneously.So-called event call-back mechanism refers to after transmit leg sent certain incident to certain recipient, transmit leg does not need to wait for synchronously returning of recipient, but proceeding other work of treatment, the recipient can initiatively call the callback interface of transmit leg, to the transmit leg return messages.Utilize the asynchronous process that event call-back mechanism can realization event, thereby improve treatment effeciency.Wherein, the content of the described member of discussion group return messages is exactly a notification message that successfully receives founder's packet, and this message is can feed back after the member of discussion group has successfully resolved packet.
In addition, whether the protocol data bag of setting up discussion group that can also judge described transmission by event call-back mechanism is overtime, if it is overtime, then can start timer, in the time of setting (such as being set to 4 minutes), packet is resend, also do not send successfully as crossing in the time of setting, then abandon sending.If set up that the protocol data bag of discussion group sends successfully or in the time of setting, send successfully, then extract the next member of discussion group, repeat to travel through the data structure of the member of the discussion group tabulation that has added the member of discussion group, finish up to this discussion group's list traversal.
When the member's of discussion group client successfully receives the packet of discussion group, generate clauses and subclauses Item that should discussion group by the panel administration module, and be presented on the host display, utilize dialog box to point out this founder user simultaneously, discussion group has set up success, and utilize data structure that local memory module preserves this discussion group in this locality, so that follow-up management and maintenance.Described local memory module can be stored a variety of data structures, such as: the data structure of discussion group, the data structure of group, good friend's data structure, stranger's data structure and data structure of Message Record or the like, this this locality memory module mainly is responsible for the preservation with local storage file, operations such as extraction and modification.But data structure of the present invention mainly is exactly the data structure of discussion group, comprising: the unique ID of discussion group, discussion group's title, founder's user ID, the member of discussion group tabulation etc.
Also please refer to Fig. 3, be the flow chart of the method for the client process discussion group based on the member of ad-hoc mode discussion group of the present invention, described method comprises:
Step N10: asynchronous when receiving packet as the user at the sockets interface of agreement, judge whether described packet is the active data bag, if not, then continues asynchronous wait packet (step N11), finish; If protocol format by appointment parses the type of message step (N12) in the described packet;
Step N13: judge whether described type of message is the type of message that discussion group sets up, if, the unique identification and the member of the discussion group tabulation (step N14) that then obtain to set up discussion group by the resolution data bag; Otherwise, then handle accordingly by the type of described message, finish (N15);
Step N16: inquire about whether there is this discussion group in the local storage file according to the unique identification of described discussion group,, then upgrade the former member of the discussion group tabulation (N17) in the local storage file if exist; Otherwise, in local storage file, set up the unique identification of described discussion group, the data structure (N18) of the member of discussion group tabulation;
Step N19: generate discussion group's clauses and subclauses, and notify founder discussion group to send successfully.
The arrival of user's asynchronous wait packet on the sockets interface of the reception message of agreement.When client receives packet, the packet decipherment algorithm by appointment that receives is decrypted handles and the parse operation of packet.Judge then whether described packet is the active data bag, and its deterministic process is: at first,, can think that then described packet is effective if can be decrypted to described packet; Secondly, be that decrypted data bag protocol format is by appointment resolved, if the packet header of described packet, inclusion and bag tail can successfully be resolved, then described packet is the active data bag, otherwise, illustrate that then described packet is the packet of forging.For invalid data packets, directly abandon, and continue in the sockets interface that receives message, to carry out asynchronous wait.
Wherein, for the active data bag, then protocol format parses the field of the type of message in this packet by appointment, and judges whether the field of this type of message is to set up discussion group's type of message, if not, then the processing function according to original type of message carries out follow-up processing operation.Type such as described message is system message, group's message, good friend's message, notice message or the like; If discussion group set up type of message, then parse founder's user ID of unique ID, discussion group's title, the member of discussion group tabulation and the discussion group of creating discussion group by packet.And the discussion group's unique ID inquiry local file memory module that parses according to described packet, judge whether this discussion group exists, if this discussion group exists, then extract all relevant informations of original discussion group by the local file memory module, described relevant information comprises the title of discussion group, member's tabulation of discussion group and founder's user ID of discussion group, each field of utilizing packet to parse is replaced to upgrade and is handled; Otherwise, if this discussion group does not exist, then set up discussion group, the content of wherein said discussion group comprises: the data structure of fields such as discussion group's unique ID, discussion group's title and the member of discussion group tabulation, newsgroup creation person user ID, and the filling that utilizes the corresponding data field that parses to carry out data structure is handled.
At last, utilize the data structure of the newly-built discussion group of local text storage module to preserve, so that the follow-up operations such as maintenance and management of user to this discussion group, utilize the panel administration module to upgrade processing simultaneously according to current discussion group's information, for the discussion group that has originally existed, upgrade panel and the member of discussion group tabulation as required; If do not exist originally, then regenerate the corresponding panel clauses and subclauses Item of discussion group, and the new discussion group of prompting user sets up successfully.
In addition, founder of the present invention can also increase or delete the member of discussion group, and the process that described newsgroup creation person increases with the deletion member of discussion group is: the founder the unique ID of the member's of this discussion group user ID and discussion group be combined to increase or the packet of discussion group's type of message of the deletion member of discussion group in, carrying out message according to the member of discussion group tabulation sends, other members of discussion group receive this message packets, parse the member's of discussion group who needs increase or deletion user ID, utilize local memory module updating local file storage and panel then.
After discussion group has been discussed, the founder makes up discussion group's unique ID in packet, tabulate according to the member of discussion group, transmission has the packet of discussion group's type of message of dismissing discussion group, when other members receive this packet, parse the type of message in this packet, delete the clauses and subclauses ITEM of this discussion group according to the data structure in discussion group's unique ID deletion local file storage and by panel module, thereby the dismission process after the discussion of realization discussion group finishes,
As all members of the founder of discussion group and discussion group all after the local file storage in the form of expression that has had discussion group on the main panel and discussion group.Just can utilize the discussion group of this foundation to carry out instant messaging between many people, the instant communicating method of wherein said discussion group based on ad-hoc mode, flow chart promptly sees Fig. 4 for details, and described method comprises:
Step H10: the session initiator obtains the unique identification of discussion group;
Step H11: according to the unique identification inquiry member of the discussion group tabulation of described discussion group;
Step H12: travel through the described member of discussion group tabulation, obtain the member's of discussion group user ID, and to address information that should user ID, and generate sockets interface;
Step H13: being provided with and sending the data packet message type is discussion group's message, and with unique identification, Member Users's sign of itself and described discussion group, wish that the message content that sends and sender's user ID form by appointment package, and send by sockets interface;
Step H14: corresponding member's client receives packet in the asynchronous wait of the sockets interface of agreement, and the packet mode by appointment that receives is resolved;
Step H15: whether the user ID of judging described sender is present in the pairing discussion group of unique identification of described discussion group, if this message is presented at the client (H16) of discussion group.
When certain member of discussion group wishes initiation session, this client is obtained the unique ID that the user wishes to launch the discussion group of session, utilize local file memory module inquiry to obtain should all members' tabulations of discussion group by this unique ID, and during the member of discussion group that all members join (comprising the member that initiation session is discussed) foundation tabulated.The client software traversal adds the member's of discussion group the member of discussion group tabulation, extract the described member's of discussion group user ID UIN, by this user ID UIN, inquire about in the local memory module dynamic subscriber IP address and PORT port that should user ID UIN, and be that parameter generates UDP and sends sockets interface described IP address and PORT port.
It is the type of message of setting up discussion group that the founder is provided with message type field, the unique ID of discussion group, the member's of discussion group user ID UIN, wish the message content of transmission, and founder or sender's user ID UIN, protocol format group bag by appointment such as type of message is in packet, and cryptographic algorithm is by appointment carried out encryption, and the data encrypted bag sent by sockets interface, the corresponding member of discussion group client receives packet in the asynchronous wait of the sockets interface of agreement, and the packet algorithm by appointment that receives is decrypted, and protocol format by appointment carries out the parsing of packet; Judge whether described packet is the active data bag, if not, this packet then directly abandoned; If, then extract message type field in this packet according to protocol format, and judge, if described type of message right and wrong discussion group message, then handle according to original type of message, and if set up discussion group's type of message, then utilize the founder parse or sender's user ID UIN and discussion group's unique ID, inquiry local file storage module, whether the user ID UIN that judges described founder or sender is the member of discussion group, if not the member of discussion group, then directly abandon this discussion group's message; If founder or sender are present in this user's the discussion group of discussion group's unique ID correspondence, message call display module then, and utilize discussion group's module to access discussion group's display module, this message is presented in the IM chat window of discussion group.Founder or sender ergodic theory group membership tabulation again then, and repeat above-mentioned implementation procedure, finish up to all member of discussion group traversals.
This shows, adopt the method for the invention, when in the member of discussion group, carrying out multi-conference, utilize the traversal member of discussion group tabulation, have the packet of setting up discussion group's type of message, and each member in this discussion group is carried out point-to-point data transmission by transmission, no longer carry out operational processes by server, promptly set up, operational processes such as management, forwards and deletion, thereby saved development cost greatly, adapted to the demand that the user increases gradually to discussion group greatly.
The above only is a preferred implementation of the present invention; should be pointed out that for those skilled in the art, under the prerequisite that does not break away from the principle of the invention; can also make some improvements and modifications, these improvements and modifications also should be considered as protection scope of the present invention.

Claims (12)

1, a kind ofly set up the method for discussion group, it is characterized in that, comprising based on ad-hoc mode:
A, founder's client are obtained the essential information of discussion group, and described essential information comprises: discussion group's unique identification, the member of discussion group tabulation and founder's user ID;
B, the essential information of described discussion group is combined in the packet, described data packet message type is to set up the type of message of discussion group;
C, the traversal member of discussion group tabulation are obtained the corresponding address information of the member of discussion group one by one, and it are generated sockets interface as parameter, send the described packet of setting up discussion group;
D, when the member's of discussion group client successfully receives the packet of client discussion group, generate and show discussion group's clauses and subclauses in the member's of discussion group client, and send successfully to founder's client feedback;
E, the member's of discussion group client is set up discussion group's success.
2, set up the method for discussion group according to claim 1 is described based on ad-hoc mode, it is characterized in that founder's client is obtained and comprised in the described steps A::
21) founder's client receives the user and creates discussion group's request, obtains discussion group's information about firms;
22) described discussion group information about firms is joined in the member of the discussion group tabulation;
23) utilize the global unique identification symbol generating function of application programming interfaces to generate described discussion group unique identification.
3, set up the method for discussion group according to claim 2 is described based on ad-hoc mode, it is characterized in that founder's client is obtained also and comprised in the described steps A: the title that described discussion group is set.
4, set up the method for discussion group according to claim 1 is described based on ad-hoc mode, it is characterized in that, also comprise among the step B: described packet cipher mode is by appointment encrypted.
5, set up the method for discussion group according to claim 1 is described based on ad-hoc mode, it is characterized in that,
Traversal comprises among the described step C: travel through the described member of discussion group tabulation, obtain the user ID that each discusses the member;
Obtain among the described step C and comprise: inquire about local storage file according to described user ID;
Generate among the described step C and comprise: utilize the application interface function of the relevant sockets interface of bottom, with described address information as parameter.
6, set up the method for discussion group according to claim 5 is described based on ad-hoc mode, it is characterized in that described step C also comprises: utilize event call-back mechanism to wait for the answer that group member message is discussed.
7, according to the described method of setting up discussion group based on ad-hoc mode of claim 6, it is characterized in that, between step C and step D, comprise: judge by event call-back mechanism whether the packet of discussion group is set up in described transmission overtime, if it is overtime, by being set, timer at the appointed time described packet is resend, if in official hour, do not send successfully, then abandon.
8, set up the method for discussion group according to claim 1 is described based on ad-hoc mode, it is characterized in that the specific implementation process of described step D is:
D1, asynchronous when receiving packet at the sockets interface of agreement as the user judges that whether described packet is the active data bag, if not, then continues asynchronous wait packet; If protocol format by appointment parses the type of message in the described packet;
D2, if the type of message that described type of message is a discussion group to be set up, the unique identification and the member of the discussion group tabulation that then obtain to set up discussion group by the resolution data bag;
D3, inquire about whether there is this discussion group in the local storage file,, then upgrade the former member of the discussion group tabulation in the local storage file if exist according to the unique identification of described discussion group; Otherwise, in local storage file, set up the unique identification of described discussion group, the data structure of the member of discussion group tabulation;
D4, generation discussion group clauses and subclauses, and notify founder's client discussion group to send successfully.
9, the method for the described according to Claim 8 Member Users of discussion group end is characterized in that, judges by the mode of deciphering or parsing whether described packet is the active data bag, and its detailed process is among the described step D1:
Client is decrypted described packet, if can successfully decipher, then described packet is an effective data packets; Perhaps
Client is resolved data to be decrypted bag protocol format by appointment, if can successfully resolve, then described packet is an effective data packets.
10, the method for the described according to Claim 8 Member Users of discussion group end is characterized in that, also obtains the title of discussion group by resolving described packet among the step D2.
11, according to the described method of setting up discussion group based on ad-hoc mode of claim 1, it is characterized in that, described method also comprises: utilize local storage file to preserve the data structure of the successful discussion group of described foundation, and the data structure of described discussion group comprises discussion group's unique identification, discussion group's title, founder's user ID and the adding member's of discussion group the member of discussion group tabulation.
12, a kind of instant communicating method of the discussion group based on ad-hoc mode is characterized in that, comprising:
A, session initiator obtain the unique identification of discussion group;
B, according to the unique identification of the described discussion group inquiry member of discussion group tabulation;
The member's of discussion group user ID is obtained in C, the described member of discussion group of traversal tabulation, and to address information that should user ID, and generate sockets interface;
D, be provided with that to send the data packet message type be discussion group's message, and with unique identification, Member Users's sign of itself and described discussion group, wish that the message content that sends and sender's user ID form by appointment package, and send by sockets interface;
E, corresponding member's client receive packet in the asynchronous wait of the sockets interface of agreement, and the packet mode by appointment that receives are resolved;
F, judge whether described sender's user ID is present in the pairing discussion group of unique identification of described discussion group, if this message is presented at the client of discussion group.
CNB2005101008374A 2005-10-26 2005-10-26 Method for set-up blogger and immediate communication of the blogger based on reciprocity mode Active CN100505629C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB2005101008374A CN100505629C (en) 2005-10-26 2005-10-26 Method for set-up blogger and immediate communication of the blogger based on reciprocity mode

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB2005101008374A CN100505629C (en) 2005-10-26 2005-10-26 Method for set-up blogger and immediate communication of the blogger based on reciprocity mode

Publications (2)

Publication Number Publication Date
CN1956386A true CN1956386A (en) 2007-05-02
CN100505629C CN100505629C (en) 2009-06-24

Family

ID=38063502

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB2005101008374A Active CN100505629C (en) 2005-10-26 2005-10-26 Method for set-up blogger and immediate communication of the blogger based on reciprocity mode

Country Status (1)

Country Link
CN (1) CN100505629C (en)

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2008151529A1 (en) * 2007-06-13 2008-12-18 Tencent Technology (Shenzhen) Company Limited Method and system for transmitting customized instant communication message
CN102523179A (en) * 2011-12-31 2012-06-27 重庆新媒农信科技有限公司 Topic group service realization method based on instant messaging
CN102624650A (en) * 2012-04-16 2012-08-01 腾讯科技(深圳)有限公司 Discussion group creating method, and communication method, server and system based on discussion group
CN103391205A (en) * 2012-05-08 2013-11-13 阿里巴巴集团控股有限公司 Sending method of group communication information, client sides and ground server
CN103428070A (en) * 2012-05-17 2013-12-04 阿里巴巴集团控股有限公司 Instant group messaging method, session management server and client side
CN106789134A (en) * 2017-03-30 2017-05-31 北京小米移动软件有限公司 Communication group determines method and device
CN106972940A (en) * 2017-03-31 2017-07-21 北京三快在线科技有限公司 Group communication method, device and electronic equipment
CN107046496A (en) * 2016-02-05 2017-08-15 李盈 A kind of based role carries out method, server and the system of instant session
CN107645442A (en) * 2017-09-27 2018-01-30 青岛数与信息科技有限公司 The means of communication based on instant communication client Virtual group
US10079787B2 (en) 2014-03-20 2018-09-18 Xiaomi Inc. Method and apparatus for creating group and exiting group
CN108650168A (en) * 2018-04-09 2018-10-12 网易(杭州)网络有限公司 Member data acquisition methods and device, storage medium, the processor of multi-conference
CN109167668A (en) * 2018-07-25 2019-01-08 深圳市梦网科技发展有限公司 The notice device and terminal device of a kind of notification method of message, message
CN111862708A (en) * 2020-07-09 2020-10-30 国网天津市电力公司 Regulation and control training simulation method suitable for simultaneous examination of multiple persons

Cited By (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2008151529A1 (en) * 2007-06-13 2008-12-18 Tencent Technology (Shenzhen) Company Limited Method and system for transmitting customized instant communication message
CN102523179A (en) * 2011-12-31 2012-06-27 重庆新媒农信科技有限公司 Topic group service realization method based on instant messaging
CN102523179B (en) * 2011-12-31 2014-10-22 重庆新媒农信科技有限公司 Topic group service realization method based on instant messaging
CN102624650A (en) * 2012-04-16 2012-08-01 腾讯科技(深圳)有限公司 Discussion group creating method, and communication method, server and system based on discussion group
CN103391205A (en) * 2012-05-08 2013-11-13 阿里巴巴集团控股有限公司 Sending method of group communication information, client sides and ground server
CN103391205B (en) * 2012-05-08 2017-06-06 阿里巴巴集团控股有限公司 The sending method of group communication information, client
CN103428070A (en) * 2012-05-17 2013-12-04 阿里巴巴集团控股有限公司 Instant group messaging method, session management server and client side
CN103428070B (en) * 2012-05-17 2016-08-03 阿里巴巴集团控股有限公司 instant group communication method, session management server and client
US10079787B2 (en) 2014-03-20 2018-09-18 Xiaomi Inc. Method and apparatus for creating group and exiting group
CN107046496A (en) * 2016-02-05 2017-08-15 李盈 A kind of based role carries out method, server and the system of instant session
CN107046496B (en) * 2016-02-05 2020-02-14 李盈 Method, server and system for carrying out instant conversation based on role
CN106789134A (en) * 2017-03-30 2017-05-31 北京小米移动软件有限公司 Communication group determines method and device
CN106789134B (en) * 2017-03-30 2020-07-03 北京小米移动软件有限公司 Communication group determination method and device
CN106972940A (en) * 2017-03-31 2017-07-21 北京三快在线科技有限公司 Group communication method, device and electronic equipment
CN106972940B (en) * 2017-03-31 2019-05-07 北京三快在线科技有限公司 Group communication method, device and electronic equipment
CN107645442A (en) * 2017-09-27 2018-01-30 青岛数与信息科技有限公司 The means of communication based on instant communication client Virtual group
CN108650168A (en) * 2018-04-09 2018-10-12 网易(杭州)网络有限公司 Member data acquisition methods and device, storage medium, the processor of multi-conference
CN108650168B (en) * 2018-04-09 2021-02-19 网易(杭州)网络有限公司 Method and device for acquiring member data of multi-person session, storage medium and processor
CN109167668A (en) * 2018-07-25 2019-01-08 深圳市梦网科技发展有限公司 The notice device and terminal device of a kind of notification method of message, message
CN111862708A (en) * 2020-07-09 2020-10-30 国网天津市电力公司 Regulation and control training simulation method suitable for simultaneous examination of multiple persons

Also Published As

Publication number Publication date
CN100505629C (en) 2009-06-24

Similar Documents

Publication Publication Date Title
CN1956386A (en) Method for set-up blogger and immediate communication of the blogger based on reciprocity mode
WO2012097655A1 (en) Group implementation method, system and client
CN1878073A (en) Method for implementing virtual discuss group in group communication system
CN1514611A (en) Method and equipment used for anonymous group information transfer in distribustion type information transfer system
KR20190114023A (en) Device identifier dependent operation processing of packet based data communication
CN101079849A (en) Method and system for sending offline messages in instant communication system
CN1249586A (en) Method and device for establishing safety connection on single data channel
CN101075991A (en) Method for realizing multiple subjects discussing group and receiving message, customer end and server
CN101056188A (en) Method and system for pushing the history records to the specified members in the discussion group
CN1941748A (en) Group message transmitting method, transmitting end and system
CN1943131A (en) Method, system and apparatus for messaging between wireless mobile terminals and networked computers
CN101047511A (en) File transmission method and system
CN1682209A (en) Voice and text group chat techniques for wireless mobile terminals
CN1794722A (en) Method of transfering off-line message
CN1992625A (en) Method for processing muti-topic discussion group information flow based on instant communication
CN1905466A (en) Cluster communication system and method for establishing discussing cluster
CN101076025A (en) Method and system for realizing on-line game invitation
CN1960521A (en) Method and system of increasing system capacity of multimedia message service
CN101047605A (en) Remote control method and system
CN1968110A (en) Method for establishing online enterprise and joining online enterprise quickly
CN1976322A (en) Method and system for realizing multimedia immediate communicating and control flow
WO2012171404A1 (en) Method, device and system for sharing microblog message
CN1885861A (en) Method for searching instantaneous communication user in LAN
CN1929454A (en) Display method for instant message in instant communication
CN101047522A (en) Method for automatic adding member and its system

Legal Events

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