Attribute operating method and device
The present document discloses an attribute operating method and device. In the above method, receiving a request message from a sending end, herein, parameter information carried in the request message includes: operating indication information, a resource address to be operated, an information type to be operated, and an information content to be operated; determining to operate on an attribute according to the operation indication information and the information type; and executing an operation corresponding to the attribute by using the resource address and the information content. On the basis of the technical solution provided by the present document, the execution of any attribute operation can be implemented without re-creating resources.
1. An attribute operating method, comprising:
receiving a request message from a sending end, wherein, parameter information carried in the request message comprises: operating indication information, a resource address to be operated, an information type to be operated, and an information content to be operated;
determining to operate on an attribute according to the operation indication information and the information type in the request message; and
executing an operation corresponding to the attribute by using the resource address and the information content in the request message, wherein the information type is an attribute type used for indicating that an object of the operation is an attribute, the operating indication information indicates to create the attribute or delete the attribute in a resource indicated by the resource address;
wherein, the resource address is a resource address of an attribute to be added, and the information content is an attribute name and an attribute parameter value of the attribute; and executing an operation corresponding to the attribute by using the resource address and the information content comprises:
determining that the attribute name is included in a resource that is indicated by the resource address of the attribute to be added;
judging whether the attribute is allowed to be created as multiple;
if the attribute is allowed to be created as multiple, then creating the attribute in the resource, wherein, a name of the attribute is determined according to the attribute name and different with a name that has already existed in the resource and corresponds to the attribute, and a parameter value of the attribute is set as the attribute parameter value; and
if the attribute is not allowed to be created as multiple, then returning a response message to the sending end, wherein, the response message carries creation failure indication information.
2. The method according to claim 1 , wherein, executing an operation corresponding to the attribute by using the resource address and the information content comprises:
determining that the attribute name is not included in a resource that is indicated by the resource address of the attribute to be added; and
creating the attribute in the resource, wherein, a name of the attribute is set as the attribute name and a parameter value of the attribute is set as the attribute parameter value.
3. The method according to claim 2 , wherein, the sending end is one of the following: a common service entity CSE, and an application entity AE.
4. The method according to claim 1 , wherein, when the resource address is a resource address of an attribute to be deleted, and the information content is an attribute name of the attribute; and executing an operation corresponding to the attribute by using the resource address and the information content comprises:
determining that the attribute name is included in a resource that is indicated by the resource address of the attribute to be deleted; and
deleting the attribute in the resource.
5. The method according to claim 4 , wherein, the sending end is one of the following: a common service entity CSE, and an application entity AE.
6. The method according to claim 1 , wherein, when the resource address is a resource address of an attribute to be deleted, and the information content is an attribute name of the attribute; and executing an operation corresponding to the attribute by using the resource address and the information content comprises:
determining that the attribute name is not included in a resource that is indicated by the resource address of the attribute to be deleted; and
returning a response message to the sending end, wherein, the response message carries deleting failure indication information.
7. The method according to claim 6 , wherein, the sending end is one of the following: a common service entity CSE, and an application entity AE.
8. The method according to claim 1 , wherein, the sending end is one of the following: a common service entity CSE, and an application entity AE.
9. An attribute operating device, comprising a memory storing instructions and a processor which executes the instruction in the memory to:
receive a request message from a sending end, wherein, parameter information carried in the request message comprises: operating indication information, a resource address to be operated, an information type to be operated, and an information content to be operated;
determine to operate on an attribute according to the operation indication information and the information type in the request message; and
execute an operation corresponding to the attribute by using the resource address and the information content in the request message, wherein the information type is an attribute type used for indicating that an object of the operation is an attribute, the operating indication information indicates to create the attribute or delete the attribute in a resource indicated by the resource address;
wherein, the resource address is a resource address of an attribute to be added, and the information content is an attribute name and an attribute parameter value of the attribute; and the processor is arranged to:
determine that the attribute name is included in a resource that is indicated by the resource address of the attribute to be added;
judge whether the attribute is allowed to be created as multiple;
create the attribute in the resource when the judgment unit outputs YES, wherein, a name of the attribute is determined according to the attribute name and different with a name that has already existed in the resource and corresponds to the attribute, and a parameter value of the attribute is set as the attribute parameter value; and
return a response message to the sending end when the judgment unit outputs NO, wherein, the response message carries creation failure indication information.
10. The device according to claim 9 , wherein, the processor is arranged to:
determine that the attribute name is not included in a resource that is indicated by the resource address of the attribute to be added; and
create the attribute in the resource, wherein, a name of the attribute is set as the attribute name and a parameter value of the attribute is set as the attribute parameter value.
11. The device according to claim 9 , wherein, when the resource address is a resource address of an attribute to be deleted, and the information content is an attribute name of the attribute; and the processor is arranged to:
determine that the attribute name is included in a resource that is indicated by the resource address of the attribute to be deleted; and
delete the attribute in the resource.
12. The device according to claim 9 , wherein, when the resource address is a resource address of an attribute to be deleted, and the information content is an attribute name of the attribute; and the processor is arranged to:
determine that the attribute name is not included in a resource that is indicated by the resource address of the attribute to be deleted; and
return a response message to the sending end, wherein, the response message carries deleting failure indication information.