Summary of the invention
The invention provides the method and apparatus that a kind of group member information upgrades, in order to solve in prior art because information about firms is asynchronous, cause the problem of message distribution failure.
According to one aspect of the present invention, a kind of method providing group member information to upgrade, is applied in group host side, comprises:
After group host creates group's resource, the host to each group member sends the group creating notice carrying group information, carries out group information storage to make the host of each group member;
When group member is after corresponding host side is deleted, group host receives the renewal group resource request message of host's transmission of deleting group member, and is deleted from group by the group member deleted in host side according to this request message.
Alternatively, the method for the invention also comprises:
When described group host receives the request upgrading group member, host to the group member of the host of the group member newly added and rejecting sends group member updating message, carries out group information storage, the group information of this group stored deletes by the host of group member of rejecting to make the host of the group member newly added.
Alternatively, the method for the invention also comprises:
When described group host receives the request of deleting group, delete group's resource, and send group's deletion notice to the host of each group member, to make the host of each group member, the group information of this group stored is deleted.
According to another aspect of the present invention, a kind of group member information's update method is also provided, is applied in member host side, comprises:
The host of group member receives the group creating notice of group host transmission, stores after extracting group information in described establishment notice;
The host of group member is after deleting certain group member, according to the group information stored, the group host of all groups to the group member including deletion sends and upgrades group's resource request message, is deleted by the group member deleted in member host side to make corresponding group host from group.
Alternatively, the method for the invention also comprises:
The group information of this group stored, after notice is deleted by the group receiving group host transmission, is deleted by the host of described group member.
Alternatively, the method for the invention also comprises:
The host of described group member is after the updating message receiving the group member that group host sends, if updating message instruction removing members, the group information deletion that this group host then stored this locality is corresponding, if updating message instruction increases member, then store after extracting group information in described group member updating message.
According to the 3rd aspect of the present invention, a kind of group host is also provided, comprises:
Group creating module, for creating group's resource, and sending to the host of each group member the group creating notice carrying group information, carrying out group information storage to make the host of each group member;
Group management module, for when group member is after corresponding host side is deleted, receives the renewal group resource request message of host's transmission of deleting group member, and is deleted from group by the group member deleted in host side according to this request message.
Alternatively, in group host of the present invention, described group management module, also for when receiving the request upgrading group member, host to the group member of the host of the group member newly added and rejecting sends group member updating message, carries out group information storage, the group information of this group stored deletes by the host of group member of rejecting to make the host of the group member newly added; And when receiving the request of deleting group, delete group's resource, and send group's deletion notice to the host of each group member, to make the host of each group member, the group information of this group stored is deleted.
According to the 4th aspect of the present invention, a kind of member host is also provided, comprises:
Information management module, for when receiving the group creating notice that group host sends, stores after extracting group information in described establishment notice;
Member management module, for by certain group member this side delete after, according to the group information stored, the group host of all groups to the group member including deletion sends and upgrades group's resource request message, is deleted by the group member deleted in member host side to make corresponding group host from group.
Alternatively, in member host of the present invention, described information management module, also for after receiving group's deletion notice of group host transmission, deletes the group information of this group stored; And after the updating message receiving the group member that group host sends, if updating message instruction removing members, the group information deletion that this group host then stored this locality is corresponding, if updating message instruction increases member, then store after extracting group information in described group member updating message.
Beneficial effect of the present invention is as follows:
The method of the invention and device, when creating group's resource, according to information about firms, send request to member host, to inform that on this member host, certain member resource has added certain group.Like this, after member resource is deleted, member host can notify that this resource of group's resource belonging to member resource is deleted, reaches the effect of synchronizing information, avoids the invalid operation to group's resource of removing members resource, saves Internet resources.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, be clearly and completely described the technical scheme in the embodiment of the present invention, obviously, described embodiment is only the present invention's part embodiment, instead of whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art, not making the every other embodiment obtained under creative work prerequisite, belong to the scope of protection of the invention.
Embodiment one
The embodiment of the present invention provides a kind of group member information's update method, is applied in group host side, as shown in Figure 1, specifically comprises the steps:
Step S101, after group host creates group's resource, the host to each group member sends the group creating notice carrying group information, carries out group information storage to make the host of each group member;
Step S102, when group member is after corresponding host side is deleted, group host receives the renewal group resource request message of host's transmission of deleting group member, and is deleted from group by the group member deleted in host side according to this request message.
Group information is just notified the host of each member by method described in the present embodiment when creating group's resource, when certain member host by member host side delete after, the group host belonging to removing members can be found in time by group information, to notify that group host carries out group member renewal, make information about firms reach synchronous, avoid the problem due to the asynchronous message distribution failure that may cause.
Set forth based on above-mentioned principle, provide several concrete and preferred implementation below, in order to refinement and the function optimizing the method for the invention, to make the enforcement of the present invention program more convenient, accurately.It should be noted that, when not conflicting, following feature can combination in any mutually.
In the embodiment of the present invention, when group host receives the request upgrading group member, carry out following update process: the host to the group member of the host of the group member newly added and rejecting sends group member updating message, carry out group information storage to make the host of the group member newly added, the group information of this group stored deletes by the host of group member of rejecting.
Further, in the embodiment of the present invention, when group host receives the request of deleting group, be handled as follows: delete group's resource, and send group's deletion notice to the host of each group member, to make the host of each group member, the group information of this group stored is deleted.Visible, the present invention, when deleting group, notifies member host in time, deletes corresponding group information, Free up Memory resource to make member host.
Embodiment two
The embodiment of the present invention provides a kind of group member information's update method, is applied in member host side, as shown in Figure 2, specifically comprises the steps:
Step S201, the host of group member receives the group creating notice of group host transmission, stores after extracting group information in described establishment notice;
Step S202, the host of group member is after deleting certain group member, according to the group information stored, the group host of all groups to the group member including deletion sends and upgrades group's resource request message, is deleted by the group member deleted in member host side to make corresponding group host from group.
Visible, when certain member is after member host side is deleted, member host can send to all groups comprising this member and delete notice, to reach the object of synchronizing information.
Set forth based on above-mentioned principle, provide several concrete and preferred implementation below, in order to refinement and the function optimizing the method for the invention, to make the enforcement of the present invention program more convenient, accurately.It should be noted that, when not conflicting, following feature can combination in any mutually.
In the embodiment of the present invention, when the host of group member is after notice is deleted by the group receiving group host transmission, the group information of this group stored is deleted, to discharge memory space.
Further, in the embodiment of the present invention, when the host of group member is after the updating message receiving the group member that group host sends, if updating message instruction removing members, the group information deletion that this group host then stored this locality is corresponding, if updating message instruction increases member, then store after extracting group information in described group member updating message.
Provide the several application example of the present invention according to Fig. 3 ~ Fig. 7 below, and combine the description to application example, provide ins and outs of the present invention further, the specific implementation process of the method provided of the present invention can be described better.
Application example one:
This application example provides a kind of group creating method, as shown in Figure 3, comprises the steps:
Step S301, initiator AE or CSE send the request of establishment group resource, and destination address is set to the URI of group host CSE, and carries member list information.
Step S302, group host creates group's resource for initiator.
Step S303, group host is according to member list information, and the host to each member initiates the information of increase group to the request in group information, carries the information of group, as the URI of group's resource in request.
Step S304, after member host receives request, extracts the information of group, and is stored in the group information list in group attribute.
Concrete, member host, after the information extracting group, judges whether this locality establishes group attribute, if created, then directly exists in the group information list in this group attribute; If no, then create group attribute, the information of the group of extraction is existed in the group information list in this attribute.
Step S305, member host returns response to group host.
Step S306, group host returns response to initiator.
Visible, in this application example, after group host establishment group resource, according to member list information, the host to member sends the relevant information of this group, as the URI of group's resource, receives the relevant information of group to make member host and stores.
Application example two:
On the basis of scheme described in application example one, this application example provides a kind of group member update method, as shown in Figure 4, comprises the steps:
Step S401, initiator AE or CSE send the request of renewal group resource, and destination address is set to the URI of group's resource, and carries the member list information that will upgrade.
Step S402, group host upgrades group's resource.
Step S403, the member that group host changes before and after obtaining and upgrading, as deleted or newly-increased member, and sends update request to the host of the member of change.The information of group is carried, as the URI of group's resource in request.
Step S404, for the renewal of removing members, after corresponding member host receives update request, the corresponding group information stored this locality is deleted.
Step S405, for the renewal of adding members, after corresponding member host receives update request, stores the relevant information of this group of carrying in request.
Step S406, corresponding member host returns and upgrades response to group host.
Step S407, group host returns and upgrades response to initiator.
Application example three
On the basis of scheme described in application example one, this application example provides a kind of group delet method, as shown in Figure 5, comprises the steps:
Step S501, initiator AE or CSE send the request of deletion group resource, and destination address is set to the URI of group's resource.
Step S502, group host deletes group's resource.
Step S503, group host, according to member list information, sends group to each member host and deletes notice, carry the relevant information of deleting group, as the URI of group's resource in notice.
Step S504, member host deletes the relevant information of this group stored after receiving and deleting notice.
Step S505, member host returns response to group host.
Step S506, group host returns response to initiator.
Application example four
On the basis of scheme described in application example one, this application example provides a kind of information about firms synchronous method, and in the method, the member A supposing on member host CSE1 is the member of the group on group host CSE1 and group host CSE2; Member B on member host CSE2 is the member of the group on group host CSE1 and group host CSE3.
As shown in Figure 6, described method comprises the steps:
Step S601, initiator AE or CSE send the request of removing members A, B, and destination address establishes virtual subnet resources member point of departure, and the destination address namely representing this request is the member of group.
Step S602, group host CSE1 distribute removing members request to member host CSE1, member host CSE2.
Step S603, member host CSE1, member host CSE2 delete corresponding member.
Step S604, member host CSE1, according to the group information organized in group attribute in information list, send update request to group host CSE1 and group host CSE2; Member host CSE2, according to the group information in set of properties information list, sends update request to group host CSE1 and group host CSE3.That is, member host CSE sends update request to the host of all groups belonging to removing members.
After step S605, group host CSE1, group host CSE2 and group host CSE3 receive update request, from the information about firms list of group's resource, delete corresponding information about firms.
Application example five
On the basis of scheme described in application example one, this application example provides a kind of information about firms synchronous method, and as shown in Figure 7, described method comprises the steps:
Step S701, initiator AE or CSE send the request of removing members to member host CSE.
Step S702, member host CSE delete corresponding member.
Step S703, member host CSE are according to the group information in group information list, and the host (as group host CSE1, group host CSE2) to all groups belonging to removing members sends update request.
Step S704, after group host CSE1, CSE2 receive update request, deletes corresponding information about firms from the information about firms list of group's resource.
Embodiment three
The embodiment of the present invention provides a kind of group host, as shown in Figure 8, specifically comprises:
Group creating module 810, for creating group's resource, and sending to the host of each group member the group creating notice carrying group information, carrying out group information storage to make the host of each group member;
Group management module 820, for when group member is after corresponding host side is deleted, receive the renewal group resource request message of host's transmission of deleting group member, and according to this request message, the group member deleted in host side is deleted from group.
Based on said structure framework and enforcement principle, provide several concrete and preferred implementation under the above constitution below, in order to refinement and the function optimizing group host of the present invention, to make the enforcement of the present invention program more convenient, accurately.Be specifically related to following content:
In the embodiment of the present invention, group management module 820, also for when receiving the request upgrading group member, host to the group member of the host of the group member newly added and rejecting sends group member updating message, carries out group information storage, the group information of this group stored deletes by the host of group member of rejecting to make the host of the group member newly added;
In the embodiment of the present invention, group management module 820, also for when receiving the request of deleting group, deletes group's resource, and send group's deletion notice to the host of each group member, to make the host of each group member, the group information of this group stored is deleted.
Group information is just notified the host of each member by group host described in the present embodiment when creating group's resource, when certain member host by member host side delete after, the group host belonging to removing members can be found in time by group information, to notify that group host carries out group member renewal, make information about firms reach synchronous, avoid the problem due to the asynchronous message distribution failure that may cause.
Embodiment four
The embodiment of the present invention provides a kind of member host, as shown in Figure 9, specifically comprises:
Information management module 910, for when receiving the group creating notice that group host sends, stores after extracting group information in described establishment notice;
Member management module 920, for by certain group member this side delete after, according to the group information stored, the group host of all groups to the group member including deletion sends and upgrades group's resource request message, is deleted by the group member deleted in member host side to make corresponding group host from group.
Based on said structure framework and enforcement principle, provide several concrete and preferred implementation under the above constitution below, in order to refinement and the function optimizing group host of the present invention, to make the enforcement of the present invention program more convenient, accurately.Be specifically related to following content:
In the embodiment of the present invention, information management module 910, also for after receiving group's deletion notice of group host transmission, deletes the group information of this group stored.
In the embodiment of the present invention, information management module 910, also for after the updating message receiving the group member that group host sends, if updating message instruction removing members, the group information deletion that this group host then stored this locality is corresponding, if updating message instruction increases member, then store after extracting group information in described group member updating message.Visible, the present invention, when deleting group, notifies member host in time, deletes corresponding group information, Free up Memory resource to make member host.
Obviously, those skilled in the art can carry out various change and modification to the present invention and not depart from the spirit and scope of the present invention.Like this, if these amendments of the present invention and modification belong within the scope of the claims in the present invention and equivalent technologies thereof, then the present invention is also intended to comprise these change and modification.