Summary of the invention
The invention provides a kind of multi-level groups control method based on instant messaging, to solve the technical problem that existing instant messaging cannot meet statistical management between multi-layer tissue and information interchange.
The technical solution used in the present invention is as follows:
Based on a multi-level groups control method for instant messaging, comprising:
The solicited message of the establishment group group that server receives client sends or groups of individuals also sets up server side group relation information unit according to solicited message, and the relation that server side group relation information unit adds generation step by step according to created groups of individuals, group group forms multi-level groups; Or
The multi-level groups request to create that server receives client sends also sets up server side group relation information unit according to multi-level groups request to create; Server sends the message of response multi-level groups request to create to client, so that client arranges the group members key element of multi-level groups; The group members key element of the multi-level groups that server receives client is arranged, configuration server side group relation information unit, to generate multi-level groups;
Wherein, groups of individuals refers to and adds by individuality the group formed, group group refers to and adds by groups of individuals or group group the group formed, multi-level groups adds by groups of individuals, group group the tree-like institutional framework formed step by step, the group group being positioned at most top layer in multi-level groups is root node group, and the groups of individuals being positioned at the bottom is leaf group.
Further, server side group relation information unit comprises the multi-level groups attribute of a relation table of group members attribute of a relation for storing and upgrade multi-level groups; Multi-level groups attribute of a relation table refers to that group members attribute of a relation includes but not limited to the group node identification code of this member in the tree-like institutional framework of multi-level groups, group node number of levels, group's father node identification code, group's father node number of levels, group's root node identification code, group's root node number of levels into the tree structure relation table that multi-level groups is set up.
Further, the groups of individuals that server receives client sends adds arbitrary group group and comprises:
Judge that whether the root node group of groups of individuals is same with the root node faciation of the group group that will add, if then prompting haves no right to add, if not, then groups of individuals is added this group group, and increase at server side group relation information unit the group relation attribute that groups of individuals associates with this group group newly.
Further, the group group that server receives client sends adds arbitrary group group and comprises:
The group group that server receives client sends adds the request of arbitrary group group, judge whether to add according to the logical relation between the group group proposing to join request and the group group be added into, then prompting haves no right to add if not, if, then be added into group group by applying for that the group group that adds adds, and increase this group group and the group relation attribute being added into group group and associating newly at server side group relation information unit; Wherein, logical relation judges whether there is identical root node group based on the group group proposing to join request and subgroup thereof with the group group be added into and subgroup thereof.
Further, the multi-level groups control method that the present invention is based on instant messaging also comprises:
Server sends the group members attribute of a relation of multi-level groups to client, with at client configuration client-side group relation information unit.
Further, the multi-level groups control method that the present invention is based on instant messaging also comprises:
The information sending request of server receives client, and information is transmitted to the multi-level groups of specifying knit in target group.
Further, the multi-level groups control method that the present invention is based on instant messaging also comprises:
Server, according to group's ranking request of client, is found out specified scope, is specified all groups of level, and carry out rank in server side group relation information unit.
According to a further aspect in the invention, a kind of multi-level groups control method based on instant messaging is also provided, comprises:
Client sends the solicited message of establishment group group or groups of individuals to server, create successful information according to the group group of server feedback or groups of individuals and set up client-side group relation information unit, and send request that the groups of individuals, the group group that create add step by step to server to form multi-level groups; Or
Client sends multi-level groups request to create and sets up client-side group relation information unit to server and according to the information of server feedback; Client arranges the group members key element of multi-level groups at client side group information unit, and by client side group information unit Packet Generation to server, with configuration server side group relation information unit;
Wherein, groups of individuals refers to and adds by individuality the group formed, group group refers to and adds by groups of individuals or group group the group formed, multi-level groups is added the tree-like institutional framework formed step by step by groups of individuals, group group, the group group being positioned at most top layer in multi-level groups is root node group, and the groups of individuals being positioned at the bottom is leaf group.
Further, client creates multi-level groups and knits tree structure UI interface, for showing institutional framework and the member of multi-level groups.
Further, the multi-level groups control method that the present invention is based on instant messaging also comprises: created multi-level groups is added other group group by client, specifically comprises:
The information of asking the multi-level groups created to add other group group is issued server by client, the information that whether can add of reception server feedback, and according to the operation whether information and executing adds.
Further, the multi-level groups control method that the present invention is based on instant messaging also comprises: the step of the groups of individuals of specifying in multi-level groups and/or group's pocket transmission message, specifically comprises:
Knit in tree structure UI interface in multi-level groups and select to need the target group of transmission message and input message to send request with information generated, information sending request is sent to server.
Further, the multi-level groups control method that the present invention is based on instant messaging also comprises: carry out group's rank to multi-level groups, specifically comprise:
Knit in tree structure UI interface in multi-level groups and select to carry out the scope of group's rank and level and generate group's ranking request, belonging to sending, group's ranking request is to server;
Group's ranking result of reception server feedback.
The present invention has following beneficial effect:
The multi-level groups control method based on instant messaging of the embodiment of the present invention, owing to constructing the multi-level groups for online exchange between a client and a server, information exchanging and sharing between the group members achieving multi-level groups, thus provide great convenience for the information interchange between multi-layer tissue or group and statistical management, be with a wide range of applications.
Except object described above, feature and advantage, the present invention also has other object, feature and advantage.Below with reference to figure, the present invention is further detailed explanation.
Embodiment
Below in conjunction with accompanying drawing, embodiments of the invention are described in detail, but the multitude of different ways that the present invention can be defined by the claims and cover is implemented.
Embodiment one
The embodiment of the present invention one provides a kind of multi-level groups control method based on instant messaging, creates multi-level groups, with reference to Fig. 1, specifically comprise for the client and server in instant messaging:
Step 101, client sends the solicited message of establishment group group or groups of individuals to server.
Alternatively, after user logs in immediate communication tool by client, send the solicited message of establishment group group or groups of individuals to server, such as, interface is provided with group creates column arranging of client, comprise group group and groups of individuals request to create, user by selecting respective selection, transmission request information is to server.The present embodiment client refers to possess communication function intelligent mobile terminal, includes but not limited to mobile phone, IPAD etc.
Step 102, the solicited message of the establishment group group that server sends according to client or groups of individuals, sets up server end group relation information unit.
Alternatively, server sets up server end group relation information unit according to this solicited message, and this solicited message is checked and approved, in server end group relation information unit, store the relevant information of created groups of individuals or group group after approval, include but not limited to: group's title, group identification, group relation attribute.And server side also generates groups of individuals or group group creates successful message.
Step 103, server sends group group or groups of individuals creates successful message to client.
Step 104, client creates successful message according to group group or groups of individuals, sets up client-side group relation information unit.
As a kind of preferred mode, client-side group relation information unit includes but not limited to: group's title, group identification, group relation attribute.
Step 105, client transmission groups of individuals adds group group or group group adds the request of group group to server.
In the present embodiment, groups of individuals refers to and adds by individuality the group formed, described group group refers to and adds by groups of individuals or group group the group formed, described multi-level groups adds by groups of individuals, group group the tree-like institutional framework formed step by step, the group group being positioned at most top layer in described multi-level groups is root node group, and the groups of individuals being positioned at the bottom is leaf group.Client joins request information to server to generate multi-level groups by transmission.
Step 106, the information that joins request that server sends according to client forms multi-level groups.
As a kind of preferred mode, server judges the information of joining request that client sends, and adds the relation of generation by groups of individuals, group group step by step, is configured the group relation attribute in server end group relation information unit, to form multi-level groups.With reference to Fig. 2, the groups of individuals that this level Four multi-level groups comprises the group group as root node that is positioned at top layer and the one-level group group set up step by step, secondary group group, three grades of group groups and is subordinated under three grades of group groups.
The present embodiment multi-level groups comprises at least one group group, and group group refers to and adds by groups of individuals or groups of individuals and the group group that formed step by step the group formed, and groups of individuals refers to and adds by individuality the group formed.Such as, the present embodiment multi-level groups only can comprise a group group, comprises multiple groups of individuals under this group group, and this class formation is the simplest multi-level groups, i.e. a class group group.Certainly, a multiple class group group can also be merged and form the group group of secondary structure, namely as there being a multiple class group group below the group group of root node, the like, what the present embodiment multi-level groups can meet multi-layer institutional framework sets up requirement.
As a kind of preferred mode, server side group relation information unit comprises the multi-level groups attribute of a relation table of group relation attribute for storing and upgrade multi-level groups; Multi-level groups attribute of a relation table refers to that group relation attribute includes but not limited to the group node identification code of this group in the tree-like institutional framework of multi-level groups, group node number of levels, group's attribute, group's father node identification code, group's father node number of levels, group's root node identification code, group's root node number of levels into the tree structure relation table that multi-level groups is set up.
Fig. 3 illustrates three kinds of identification codes that group node comprises, and wherein, ID own is group node identification code, refers to this crowd of ID itself; Father ID is group father node identification code, refers to the ID of the group group correspondence of this group of last layer levels; Root ID is group root node identification code, refers to the ID of the root node group of the multi-level groups at this group of places.The relationship field of group members is exemplified below:
As a kind of preferred mode, the authority of member in this group can also be set in server side group relation information unit, be keeper as arranged certain member, the operations such as the interpolation of member in group, deletion can be exercised.
Step 107, server sends the group relation attribute of multi-level groups to client.
Step 108, client is according to the group relation attribute configuration client-side group relation information unit received.
As one preferably mode, client creates multi-level groups and knits tree structure UI interface, for showing institutional framework and the member of multi-level groups.Adopt tree structure UI interface to show the institutional framework of multi-level groups and member, friendly interface is directly perceived, is convenient to user operation.
In the present embodiment, alternatively, user can knit middle groups of individuals of specifying or group's pocket transmission message through client to multi-level groups.As one preferably mode, after user logs in client, knit in tree structure UI interface in the multi-level groups of client and select to need the target group of transmission message and input message to send request with information generated, this information sending request is sent to server, the information sending request of server receives client, and information is transmitted to the multi-level groups of specifying knit in target group.Such as, with reference to Fig. 4, A2 group group needs to send message to affiliated subgroup A21, then only need select the subgroup A21 sent, input message is also selected to send, and according to the relation of upper level group and lower level group, message sends to crowd A211 and A212, if select all subgroups of A2, then message sends to: A211, A212, A221, A222.Otherwise the information that A211, A212, A221, A222 add up respectively, through A21, A22 group group, then can be passed to A group group through A2 group group.
Alternatively, the present embodiment multi-level groups, server, according to group's ranking request of client, is found out specified scope, is specified all groups of level, and carry out rank in server side group relation information unit.As one preferably mode, user knits in tree structure UI interface in the multi-level groups of client and selects to carry out the scope of group's rank and level and generate group's ranking request, send group's ranking request to server, server is according to group's ranking request of client, the all groups finding out specified scope, specify level are knitted in attribute of a relation table in multi-level groups, and carry out rank, group's ranking result is sent to client.Thus achieve fast, carry out the function of group's rank online, meet the actual demand of group event, and can be widely used in group's rank of other multi-layer tissues.
Adopt the immediate communication tool of the present embodiment multi-level groups structure, belong to multiple users of hierarchy tissue by after its place groups of individuals information upload, then achieve the Real-time Collection of total group to each user profile of multistage tissue, and statistics can be come downwards to each groups of individuals through group group step by step, thus achieve the object of adding up team's achievement quickly.Such as, it is applied to agonistic group rank, achievement or the performance appraisal statistics of all departments employee in group company can also be applied to, or the object statistics etc. in the fields such as logistic storage, generally speaking, the multi-level groups control method based on instant messaging of the present embodiment, the information interchange between multi-layer organization and management can be widely used in, so that each individual information (school grade, the sales achievement of employee, the goods reserve message in chain business shop as student) etc. under statistics multi-layer organization.
The application of the instant communication method of the present embodiment application multi-level groups is now described for the information management in certain chain business shop:
With reference to Fig. 5, the present embodiment multi-level groups comprises the national group representing national general headquarters, the group group representing each provincial point of sale is set under it, such as, Hunan group, Hubei group, Guangdong group, Guangxi group ..., Changsha group, Changde group, Yueyang group, Xiang Tan group, Zhuzhou group are set under the group of Hunan ..., in the group of Changsha, add each individuality representing each point of sale, such as, new Kai Pu shop, May I Square shop, ten thousand Jia Li Lu Dian, shop, automobile western station ...The shopkeeper of each point of sale logs in the multi-level groups of the present embodiment by immediate communication tool, and upload sale and/or the inventory information on the same day, then national group is according to the sales information of each point of sale received and/or inventory information, each province, the sales information in each city and/or inventory information can be counted, thus the stock's allocation processing realized nearby and the data analysis etc. to each regional markets situation, traditional goods statistics and allotment then need through mail or liaison mode operation, both not convenient, real-time is also affected, and statistics is easily made mistakes.The present embodiment achieves the convenient transmission of information between multi-layer tissue by the multi-level groups be located in immediate communication tool and effectively adds up.Be only citing herein, it will be understood by those skilled in the art that the present embodiment can process information interchange and the management of all kinds of multi-level organizational structure based on the multi-level groups control method of instant messaging, be with a wide range of applications.
As one preferably mode, the groups of individuals that server receives client sends adds arbitrary group group and comprises:
Judge whether be group group by the group members added in the multi-level groups of groups of individuals, then prompting haves no right to add if not;
Judge that whether the root node of groups of individuals is identical with the root node of the group group that will add, if then prompting haves no right to add, if not, then groups of individuals is added this group group, and the group relation attribute that newly-increased groups of individuals associates with this group group.
As one preferably mode, with reference to Fig. 6, add group group B to illustrate that groups of individuals adds the flow process of multi-level groups for groups of individuals A:
Step 601, client sends the application that A group adds B group;
Step 602, judges whether B group is group group, if then perform step 603, otherwise performs step 604;
As one preferably mode, server end judges whether it is group group according to group's determined property of B group, and judged result is fed back to client, for next step operation of client executing.
As one preferably mode, server transfers group's attribute data of B group from server side group relation information unit, and is fed back to client, judges whether B group is group group by client according to the data received, and then performs next step operation.
Step 603, judges that whether the root node of A group added colony is identical with the root node of B group, if then perform step 604, then performs step 605 if not;
As one preferably mode, server passes through the root node attribute of A group and the root node attribute of B group of the storage of querying server side group relation information element memory, if there is identical root node group, deposit and illustrate that A group had added this multi-level groups, in order to avoid A group repeats to add, then stop adding process.
Step 604, prompting haves no right to add;
This step for the condition of adding be not inconsistent time, client generate have no right to add be prompted to user.
Step 605, newly-increased group relation;
Server increases setting to the attribute of A group in server side group relation information unit, be specially: newly-increased group relation comprises in the group relation attribute of A group: the group ID adding B group in the father ID of A group, will in the root ID being arranged on A group, add the root ID of B group.
Step 606, A group is added B group by server;
A group is successfully added B group by server, thus has expanded the group members of multi-level groups, and will add successful information feed back to client, thus increases A group as group members in the multi-level groups list of client.
As one preferably mode, the group group that the present embodiment server receives client sends adds a certain group group and comprises:
Other group group that server receives client sends adds the request of arbitrary group group, judge whether to add according to the logical relation between the group group proposing to join request and the group group be added into, then prompting haves no right to add if not, if, then group group is added multi-level groups, and increase at server side group relation information unit the group relation attribute that this group group associates with multi-level groups newly; Wherein, logical relation judges whether there is identical root node group based on the group group proposing to join request and subgroup thereof with the group group be added into and subgroup thereof.
As one preferably mode, with reference to Fig. 7, add group group B in multi-level groups to illustrate that group group adds the flow process of group group for group group A:
Step 701, client sends the application that A group adds B group;
Step 702, judges whether B group is group group, if then perform step 603, otherwise performs step 604;
As one preferably mode, server end judges whether it is group group according to group's determined property of B group, and judged result is fed back to client, for next step operation of client executing.
As one preferably mode, server transfers group's attribute data of B group from server side group relation information unit, and is fed back to client, judges whether B group is group group by client according to the data received, and then performs next step operation.
Step 703, the relation that to judge whether exist with the root ID of B group in A group and subgroup thereof be root node, if then perform step 705, then performs step 704 if not;
As one preferably mode, server is by the A group of querying server side group relation information element memory storage and the root node attribute of subgroup and the root node attribute of B group, if there is identical root node group, deposit and illustrate that A group or its subgroup had added this multi-level groups, in order to avoid repeating to add, then stop adding process.
Step 704, the relation that to judge whether exist with the root ID of A group in B group and subgroup thereof be root node, if then perform step 705, then performs step 706 if not;
As one preferably mode, server is by the B group of querying server side group relation information element memory storage and the root node attribute of subgroup and the root node attribute of A group, if there is identical root node, deposit and illustrate that B group or its subgroup had added the multi-level groups at A group or A group place, in order to avoid repeating to add formation loop, then stop adding process.
Step 705, prompting haves no right to add;
This step for the condition of adding be not inconsistent time, client generate have no right to add be prompted to user.
Step 706, newly-increased group relation;
Server increases setting to the attribute of A group in server side group relation information unit, be specially: in the group relation attribute of A group, newly-increased group relation comprises: the group ID adding B group in the father ID of A group, in the root ID of A group and subgroup thereof, add the root ID of B group, the groupGrade of B group is that the groupGrade of A group adds 1 and the groupGrade extending all father nodes of B group adds 1 successively.
Step 707, A group is added B group by server;
A group is successfully added B group by server, thus has expanded the group members of multi-level groups, and will add successful information feed back to client, thus increases A group as group members in the multi-level groups list of client.
Embodiment two
The embodiment of the present invention two provides a kind of multi-level groups control method based on instant messaging.
With reference to Fig. 8, embodiment two, based on the multi-level groups control method of instant messaging, comprising:
Step 801, the multi-level groups request to create that server receives client sends also sets up server side group relation information unit according to multi-level groups request to create;
As a kind of preferred mode, server in the present embodiment is Cloud Server, this Cloud Server is in the part referring to fictionalize multiple similar separate server on one group of cluster server, in cluster, each separate server is provided with the mirror image of a Cloud Server, thus substantially increase the security and stability of virtual server, so that client-access and transmission data.
As a kind of preferred mode, set up server side group relation information unit in the present embodiment and comprise according to multi-level groups request to create at the memory space of server end setting for storing multi-level groups relation information table.Wherein, the group of establishment requirement and multi-level groups that multi-level groups request to create comprises multi-level groups illustrates, such as, set up level Four multi-level groups, this multi-level groups is for adding up the average achievement etc. of each region group adding flat support, preferably, multi-level groups request to create can also comprise group title, group mark etc.This request of server parses, and the level number obtaining multi-level groups, such as, be four, and set up the storage organization of corresponding level.
As one preferred embodiment, the present embodiment multi-level groups relation information table is set up by tree structure relation.With reference to Fig. 2, the groups of individuals that this level Four multi-level groups comprises the group group as root node that is positioned at top layer and the one-level group group set up step by step, secondary group group, three grades of group groups and is subordinated under three grades of group groups.
The present embodiment multi-level groups comprises at least one group group, and group group refers to and adds by groups of individuals or groups of individuals and the group group that formed step by step the group formed, and groups of individuals refers to and adds by individuality the group formed.Such as, the present embodiment multi-level groups only can comprise a group group, comprises multiple groups of individuals under this group group, and this class formation is the simplest multi-level groups, i.e. a class group group.Certainly, a multiple class group group can also be merged and form the group group of secondary structure, namely have a multiple class group group as below the group group of root node under it, the like, what the present embodiment multi-level groups can meet multi-layer institutional framework sets up requirement.
Step 802, server sends the message of response multi-level groups request to create to client, so that client arranges the group members key element of multi-level groups;
As a kind of preferred mode, the group members key element of multi-level groups comprises: the group node identification code of this member in multi-level groups relation information table, group node number of levels, group's attribute, group's father node identification code, group's father node number of levels, group's root node identification code, group's root node number of levels.Fig. 3 illustrates three kinds of identification codes that group node comprises, and wherein, ID own is group node identification code, refers to this crowd of ID itself; Father ID is group father node identification code, refers to the ID of the group group correspondence of this group of last layer levels; Root ID is group root node identification code, refers to the ID of the root node group of the multi-level groups at this group of places.The relationship field of group members is exemplified below:
As a kind of preferred mode, the authority of member in this group can also be set in group's attribute, be keeper as arranged certain member, the operations such as the interpolation of member in group, deletion can be exercised.
As a kind of preferred mode, the group members key element that client arranges multi-level groups comprises:
The form input unit of tree structure is created to input the group members element information of each level group in client main panel, or the logical relation by tree structure in client main panel jumps out input frame successively, to receive the group members element information of each level group of user's input.
Step 803, the group members key element of the multi-level groups that server receives client is arranged, configuration server side group relation information unit, to generate multi-level groups;
The packet of the group members key element of the multi-level groups that client is arranged in server receiving step 802, packet is decrypted and dissection process, obtain the group group of corresponding each level and the group members element information of groups of individuals, and by information configuration to server side group relation information unit, to generate multi-level groups.
Server sends multi-level groups to client and arranges successful message, and client receives after multi-level groups arranges successful message, and the content write local file system of the group members key element of multi-level groups client arranged manages.As a kind of preferred mode, client utilizes group management module by the group members key element of the multi-level groups of client-side write local file system, and shows the group information of multi-level groups.
The present embodiment is owing to constructing the multi-level groups for online exchange between a client and a server, achieve the information exchanging and sharing in multi-level groups between group members, thus provide great convenience for the information online exchange between multi-layer tissue or group and statistical management, be with a wide range of applications.
As one preferably mode, the group group being positioned at top layer in multi-level groups is root node group, and be positioned at the group group of the bottom for end segment point group, groups of individuals is leaf group.When information of carrying out in multi-level groups is transmitted, information in root node group or high-level group group comes downwards to groups of individuals through group group step by step successively, and the information in groups of individuals or low-level group group goes upward to high-level group group or root node group through group group step by step successively.
Embodiment two is with the difference of embodiment one, the generation of multi-level groups sends multi-level groups request to create to server to create server side group relation information unit at server side by customer side, and the message of this multi-level groups request to create of response that client sends according to server arranges the group members key element of multi-level groups, thus form multi-level groups.In embodiment one, remaining rate-determining steps and method all can be applicable in embodiment two, namely the groups of individuals in embodiment two adds group group, group group adds group group, the transmission of multi-level groups internal information, multi-level groups carry out group's rank etc. all with reference to embodiment one in knitting, at this, repeat no more.
The multi-level groups control method based on instant messaging of the embodiment of the present invention, owing to constructing the multi-level groups for online exchange between a client and a server, achieve the information exchanging and sharing between multi-level groups, thus provide great convenience for the information online exchange between multi-layer tissue or group and statistical management, be with a wide range of applications.
It should be noted that, can perform in the computer system of such as one group of computer executable instructions in the step shown in the flow chart of accompanying drawing, and, although show logical order in flow charts, but in some cases, can be different from the step shown or described by order execution herein.
The foregoing is only the preferred embodiments of the present invention, be not limited to the present invention, for a person skilled in the art, the present invention can have various modifications and variations.Within the spirit and principles in the present invention all, any amendment done, equivalent replacement, improvement etc., all should be included within protection scope of the present invention.