Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
As shown in fig. 1, a flowchart of an execution method for deleting a group member resource according to an embodiment of the present invention is shown, where the method includes:
101. receiving a deletion request for the group member resource sent by an initiator;
102. distributing the deletion request to the member according to the universal identifier URI of the group member resource and receiving the response of the member;
103. deleting the group resource or updating the group resource, and sending a response to the initiator.
Preferably, the deleting the group resource and sending a response to the initiator may specifically include: deleting the group resources, aggregating the responses of the members, then sending the responses to the initiator, and carrying information indicating that the group resources are deleted; or deleting the group resources, aggregating the responses of the members, then sending the responses to the initiator, and sending a notification message, wherein the notification message is used for notifying the initiator that the group resources are deleted; the updating the group resource and sending a response to the initiator specifically includes: deleting the content in the member list memberList, aggregating the responses of the members, then sending the responses to the initiator, and carrying the information indicating that the memberList is deleted; or, clearing the content in the memberList, aggregating the responses of the members, and then sending the response to the initiator, and carrying the information indicating that the memberList is cleared; or, when receiving the response of partial members, deleting the URI of the member feeding back the response from the memberList, aggregating the response of the member, and then sending the response to the initiator, wherein the response carries the information of the memberList.
Preferably, after distributing the deletion request to the member according to the universal identifier URI of the group member resource, the method may further include marking an existing member list memberList as an old member list memberList, and creating a new member list memberList.
Preferably, after receiving the response of the member, the updating the group resource may specifically include: and extracting the URI of the member resource with the fed-back response from the old member list membersList, updating the URI, storing the URI into the new member list membersList, and taking the new member list membersList as the currently used membersList.
Preferably, before deleting the group resource or updating the group resource, the method may further include: aggregating the responses of the members and sending to the initiator; receiving a request for deleting the group resources or updating the group resources sent by the initiator; the sending the response to the initiator specifically includes: sending a response to the initiator to the request sent by the initiator to delete a group resource or update a group resource.
Corresponding to the above method embodiment, as shown in fig. 2, a schematic structural diagram of an apparatus for executing a delete operation on a group member resource according to an embodiment of the present invention is shown, where the apparatus includes:
a first receiving unit 21, configured to receive a deletion request for the group member resource sent by an initiator;
a first communication unit 22, configured to distribute the deletion request to the member according to the universal identifier URI of the group member resource and receive a response from the member;
the first processing unit 23 is configured to delete a group resource or update a group resource, and send a response to the initiator.
Preferably, as shown in fig. 3, which is a schematic structural diagram of a first processing unit according to an embodiment of the present invention, the first processing unit 23 may include: a first processing module 231, configured to delete the group resource, aggregate the responses of the members, and then send the response to the initiator, where the response carries information indicating that the group resource is deleted; or, the second processing module 232 is configured to delete a group resource, aggregate responses of the members, send the response to the initiator, and send a notification message, where the notification message is used to notify the initiator that the group resource is deleted; or, the third processing module 233 is configured to delete content in the member list memberList, aggregate responses of the members, and then send the response to the initiator, where the response carries information indicating that the memberList is deleted; or, the fourth processing module 234 is configured to clear the content in the memberList, aggregate the responses of the members, and then send the response to the initiator, and carry information indicating that the memberList is cleared; or, the fifth processing module 235, configured to delete only the URIs of the members feeding back the response from the memberList when receiving the responses of some members, aggregate the responses of the members, and then send the response to the initiator, where the response carries information of the memberList.
Preferably, the apparatus may further include: the first creating unit 24 is configured to mark the existing member list memberships as an old member list and create a new member list memberships after the first communicating unit 22 distributes the deletion request to the members according to the universal identifiers URI of the group member resources.
Preferably, after receiving the response of the member, the first processing unit 23 may be further configured to update the group resource specifically including: and extracting the URI of the group member resource with the fed-back response from the old member list membersList, updating the URI, storing the URI into the new member list membersList, and taking the new member list membersList as the currently used membersList.
Preferably, the first communication unit 22 may be further configured to, before the group resource is deleted or updated, aggregate the responses of the members and send the aggregated responses to the initiator; receiving a request for deleting the group resources or updating the group resources sent by the initiator; the sending the response to the initiator specifically includes: sending a response to the initiator to the request sent by the initiator to delete a group resource or update a group resource.
As shown in fig. 4, a flowchart of another method for executing a delete operation on a group member resource according to an embodiment of the present invention is shown, where the method includes:
401. receiving a deletion request for the group member resource sent by an initiator;
402. modifying the delete request;
403. distributing a modified deletion request to a member according to the universal identifier URI of the group member resource and receiving the response of the member;
404. aggregating the responses of the members and sending to the initiator.
Preferably, the modifying the deletion request may specifically include: changing the deletion request into an update request, wherein the update request is to clear the content of the group member resource or delete all sub-resources of the group member resource; or, changing the deletion request, and adding an indication in the deletion request, where the indication is used to indicate that a member clears the content of a group member resource or deletes all sub-resources of the group member resource.
Corresponding to the above method embodiment, as shown in fig. 5, is a schematic structural diagram of another apparatus for executing a delete operation on a group member resource according to an embodiment of the present invention, where the apparatus includes:
a second receiving unit 51, configured to receive a deletion request for the group member resource sent by an initiator;
a second processing unit 52 for modifying the deletion request;
a second communication unit 53, configured to distribute a modified deletion request to a member according to the universal identifier URI of the group member resource and receive a response from the member; aggregating the responses of the members and sending to the initiator.
Preferably, the second processing unit 52 may be specifically configured to: changing the deletion request into an update request, wherein the update request is to clear the content of the group member resource or delete all sub-resources of the group member resource; or, changing the deletion request, and adding an indication in the deletion request, where the indication is used to indicate that a member clears the content of a group member resource or deletes all sub-resources of the group member resource.
As shown in fig. 6, a flowchart of a method for executing a delete operation on a group member resource according to another embodiment of the present invention is shown, where the method includes:
601. sending a request for deleting the group member resources to the group control general service entity;
602. receiving an aggregation response fed back by the group control universal service entity;
603. sending a request for deleting the group resources or updating the group resources to the group control universal service entity.
Corresponding to the above method embodiment, as shown in fig. 7, is a schematic structural diagram of an initiator apparatus according to an embodiment of the present invention, where the initiator apparatus includes:
a third sending unit 71, configured to send a request for deleting a group member resource to the group control universal service entity;
a third receiving unit 72, configured to receive an aggregation response fed back by the group control universal service entity;
the third sending unit 71 is further configured to send a request for deleting a group resource or updating a group resource to the group control universal service entity.
The technical scheme has the following beneficial effects: after deleting the group resource, updating the member URI in the memberList or deleting the group; or changing the update operation to the operation of deleting the group resources, so that the invalid operation to the group resources of the deleted members can be avoided, and the network resources are saved.
The above technical solutions of the embodiments of the present invention are described in detail below with reference to application examples:
the application example of the invention mainly solves the problem how to execute the operation when the Group Hosting CSE receives the deletion operation of the URI with the address of < fanOutPoint >, so as to avoid the resources pointed by the URI in the memberList from existing any more.
As shown in fig. 8, a flowchart of an execution method for deleting a group member resource by a first application instance of the present invention includes:
801. the initiator sends a delete request to the Group Hosting CSE with the to attribute being the URI of the virtual resource < fanOutPoint >.
802. The Group Hosting CSE distributes requests.
803. The Group Hosting CSE receives the member's response.
804. When the responses of all the members are received, deleting or emptying the content in the memberList, otherwise, only deleting the URI of the member receiving the response from the memberList; or delete a group resource.
805. The aggregation response is fed back to the initiator and carries corresponding information, such as deleted memberList or emptied memberList or information of the memberList or deleted group resources.
It should be noted that, the initiator in the application example of the present invention may be a certain company, the Group home CSE is a functional entity on the cloud platform of the company, and the Member home CSE may be a gateway or a functional entity on a home appliance of the company, which is not limited to this.
As shown in fig. 9, a flowchart of an execution method for a group member resource deletion operation by a second application instance of the present invention includes:
901. the initiator sends a delete request to the Group Hosting CSE with the to attribute being the URI of the virtual resource < fanOutPoint >.
902. The Group Hosting CSE distributes requests.
903. The Group Hosting CSE receives the member's response.
904. a, (a step is an optional step) when the response of all the members is received, deleting or emptying the content in the memberList, otherwise, only deleting the URI of the member receiving the response from the memberList; and aggregating the response to the initiator, wherein if the step a is executed, the response contains the information of the memberList.
905. The initiator initiates the operation of deleting the group; if the step a is performed, the originator can initiate the operation of deleting or updating the memberList in the group according to the memberList information.
906. Deleting or updating groups.
907. Delete or update the response.
As shown in fig. 10, a flowchart of an execution method for a group member resource deletion operation by a third application example of the present invention includes:
1001. the initiator sends a delete request to the Group Hosting CSE with the to attribute being the URI of the virtual resource < fanOutPoint >.
1002. The Group Hosting CSE distributes the request to the various members.
1003. The Group Hosting CSE marks the existing memberList as the old one and re-establishes a new one.
1004. A response is received from the member.
1005. And extracting the URI of the member which has fed back the response from the old memberList, updating the URI, and storing the URI into the new memberList. And updating the URI: remove member resource identification from the old URI, such as: the old URI: baseCSE/remotecCSEID/AEID, and baseCSE/remotecCSEID.
1006. And feeding back the aggregation response to the initiator, wherein the new memberList is carried.
As shown in fig. 11, a flowchart of an execution method for a group member resource deletion operation by a fourth application example of the present invention includes:
1101. the initiator sends a delete request to the Group Hosting CSE with the to attribute being the URI of the virtual resource < fanOutPoint >.
1102. Before distributing the requests, the Group Hosting CSE adds an indication in each request to indicate that all the sub-resources under the target resource are deleted or the content of the resource is emptied.
1103. And distributing the request to each member and carrying the indication.
1104. A response is received from the member.
1105. And feeding back the aggregation response to the initiator.
As shown in fig. 12, a flowchart of an execution method for a group member resource deletion operation by a fifth application example of the present invention includes:
1201. the initiator sends a delete request to the Group Hosting CSE with the to attribute being the URI of the virtual resource < fanOutPoint >. This request represents a clearing of the contents of the member resource.
1202. And the Group Hosting CSE changes the deletion request into an updating request, and the content of the updating member resource is null.
1203. And distributing the update request to each member, and emptying the content of the target member.
1204. A response is received from the member.
1205. And feeding back the aggregation response to the initiator.
After the application example deletes the group resource, updating the member URI in the memberList or deleting the group; or changing the update operation to the operation of deleting the group resources, so that the invalid operation to the group resources of the deleted members can be avoided, and the network resources are saved.
Those of skill in the art will further appreciate that the various illustrative logical blocks, units, and steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both. To clearly illustrate the interchangeability of hardware and software, various illustrative components, elements, and steps have been described above generally in terms of their functionality. Whether such functionality is implemented as hardware or software depends upon the particular application and design requirements of the overall system. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present embodiments.
The various illustrative logical blocks, or elements, described in connection with the embodiments disclosed herein may be implemented or performed with a general purpose processor, a digital signal processor, an Application Specific Integrated Circuit (ASIC), a field programmable gate array or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or any combination thereof designed to perform the functions described herein. A general-purpose processor may be a microprocessor, but in the alternative, the processor may be any conventional processor, controller, microcontroller, or state machine. A processor may also be implemented as a combination of computing devices, e.g., a digital signal processor and a microprocessor, a plurality of microprocessors, one or more microprocessors in conjunction with a digital signal processor core, or any other similar configuration.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may be stored in RAM memory, flash memory, ROM memory, EPROM memory, EEPROM memory, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art. For example, a storage medium may be coupled to the processor such the processor can read information from, and write information to, the storage medium. In the alternative, the storage medium may be integral to the processor. The processor and the storage medium may reside in an ASIC, which may be located in a user terminal. In the alternative, the processor and the storage medium may reside in different components in a user terminal.
In one or more exemplary designs, the functions described above in connection with the embodiments of the invention may be implemented in hardware, software, firmware, or any combination of the three. If implemented in software, the functions may be stored on or transmitted over as one or more instructions or code on a computer-readable medium. Computer-readable media includes both computer storage media and communication media that facilitate transfer of a computer program from one place to another. Storage media may be any available media that can be accessed by a general purpose or special purpose computer. For example, such computer-readable media can include, but is not limited to, RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to carry or store program code in the form of instructions or data structures and which can be read by a general-purpose or special-purpose computer, or a general-purpose or special-purpose processor. Additionally, any connection is properly termed a computer-readable medium, and, thus, is included if the software is transmitted from a website, server, or other remote source via a coaxial cable, fiber optic cable, twisted pair, Digital Subscriber Line (DSL), or wirelessly, e.g., infrared, radio, and microwave. Such discs (disk) and disks (disc) include compact disks, laser disks, optical disks, DVDs, floppy disks and blu-ray disks where disks usually reproduce data magnetically, while disks usually reproduce data optically with lasers. Combinations of the above may also be included in the computer-readable medium.
The above-mentioned embodiments are intended to illustrate the objects, technical solutions and advantages of the present invention in further detail, and it should be understood that the above-mentioned embodiments are merely exemplary embodiments of the present invention, and are not intended to limit the scope of the present invention, and any modifications, equivalent substitutions, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.