WO2021155529A1 - Resource deletion method, apparatus, and device, and storage medium - Google Patents

Resource deletion method, apparatus, and device, and storage medium Download PDF

Info

Publication number
WO2021155529A1
WO2021155529A1 PCT/CN2020/074414 CN2020074414W WO2021155529A1 WO 2021155529 A1 WO2021155529 A1 WO 2021155529A1 CN 2020074414 W CN2020074414 W CN 2020074414W WO 2021155529 A1 WO2021155529 A1 WO 2021155529A1
Authority
WO
WIPO (PCT)
Prior art keywords
resource
target
referenced
deletion
condition
Prior art date
Application number
PCT/CN2020/074414
Other languages
French (fr)
Chinese (zh)
Inventor
吕小强
Original Assignee
Oppo广东移动通信有限公司
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 Oppo广东移动通信有限公司 filed Critical Oppo广东移动通信有限公司
Priority to PCT/CN2020/074414 priority Critical patent/WO2021155529A1/en
Priority to CN202080077989.XA priority patent/CN114651236A/en
Publication of WO2021155529A1 publication Critical patent/WO2021155529A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]

Definitions

  • the embodiments of the present application relate to the field of communication technologies, and in particular, to a method, device, device, and storage medium for deleting resources.
  • IoT device management methods based on REST Representational State Transfer
  • REST Representational State Transfer
  • things such as devices
  • CURDN including create (create), update (modify/update), retrieve (acquire), delete) Delete
  • notification notification
  • a collection resource may include one or more reference resources, and the reference resource may be a collection resource or a non-collection resource.
  • each resource has its own resource attributes, which include: resource identifier, resource type, and interface.
  • resource identifier can be represented by uri (uniform resource identifier);
  • resource type can be represented by rt (resource type, resource type);
  • the interface can be represented by if (interface, interface).
  • the collection resource also has a links attribute.
  • the collection resource can use the linkadd (add link) interface in the IF attribute to add the URI of a reference resource to the links attribute of the collection resource.
  • the embodiments of the present application provide a resource deletion method, device, equipment, and storage medium.
  • the technical solution is as follows:
  • an embodiment of the present application provides a method for deleting a resource, which is applied to an Internet of Things device, and the method includes:
  • the target resource is a collective resource, acquiring a first reference resource, where the first reference resource is a reference resource of the target resource;
  • the first reference resource When the first reference resource satisfies a first condition, delete the target resource and the first reference resource, and the first condition includes that the first reference resource is not other than the target resource. Referenced by other resources.
  • an embodiment of the present application provides a method for deleting a resource, which is applied to a terminal device, and the method includes:
  • the target resource is a collective resource
  • the first reference resource of the target resource satisfies a first condition
  • the target resource and the first reference resource are deleted, and the first condition includes all
  • the first referenced resource is not referenced by other resources except the target resource.
  • an embodiment of the present application provides a resource deletion device, which is applied to an Internet of Things device, and the device includes:
  • the resource determination module is used to determine the target resource to be deleted
  • the resource acquisition module is configured to acquire a first reference resource when the target resource is a collective resource, and the first reference resource is a reference resource of the target resource;
  • a resource deletion module configured to delete the target resource and the first reference resource when the first reference resource satisfies a first condition, and the first condition includes that the first reference resource has not been deleted Referred to by resources other than the target resource.
  • an embodiment of the present application provides a resource deletion device, which is applied to a terminal device, and the device includes:
  • a request sending module configured to send a resource deletion request to an Internet of Things device, where the resource deletion request is a request for the terminal device to delete a target resource in the Internet of Things device;
  • the target resource is a collective resource
  • the first reference resource of the target resource satisfies a first condition
  • the target resource and the first reference resource are deleted, and the first condition includes all
  • the first referenced resource is not referenced by other resources except the target resource.
  • an embodiment of the present application provides an Internet of Things device, the Internet of Things device including a processor and a transceiver connected to the processor; wherein:
  • the processor is used to determine the target resource to be deleted
  • the processor is further configured to obtain a first reference resource when the target resource is a collective resource, where the first reference resource is a reference resource of the target resource;
  • the processor is further configured to delete the target resource and the first reference resource when the first reference resource satisfies a first condition, and the first condition includes that the first reference resource is not Referenced by resources other than the target resource.
  • an embodiment of the present application provides a terminal device, the terminal device including a processor and a transceiver connected to the processor; wherein:
  • the transceiver is configured to send a resource deletion request to an Internet of Things device, where the resource deletion request is a request by the terminal device to delete a target resource in the Internet of Things device;
  • the target resource is a collective resource
  • the first reference resource of the target resource satisfies a first condition
  • the target resource and the first reference resource are deleted, and the first condition includes all
  • the first referenced resource is not referenced by other resources except the target resource.
  • an embodiment of the present application provides a computer-readable storage medium in which a computer program is stored, and the computer program is used to be executed by a processor of an Internet of Things device to implement the above-mentioned Internet of Things device side The resource deletion method.
  • an embodiment of the present application provides a computer-readable storage medium in which a computer program is stored, and the computer program is used to be executed by a processor of a terminal device to implement the above-mentioned resources on the terminal device side. Delete method.
  • an embodiment of the present application provides a chip that includes a programmable logic circuit and/or program instructions.
  • the chip runs on an Internet of Things device, it is used to implement the above-mentioned Internet of Things device side Resource deletion method.
  • an embodiment of the present application provides a chip that includes a programmable logic circuit and/or program instructions.
  • the chip runs on a terminal device, it is used to implement resource deletion on the terminal device side as described above. method.
  • the target resource to be deleted is determined and the target resource is a collective resource
  • the reference resource of the target resource is obtained, and the reference resource is deleted when it is determined that the reference resource meets the conditions; compared with related technologies
  • all the reference resources included in the collection resource are deleted at the same time.
  • the technical solution provided by the embodiment of the present application first analyzes and processes the reference resources included in the collection resource, and then confirms The referenced resource can be deleted only when the referenced resource can be deleted. In the process of resource deletion, more detailed and sufficient consideration is carried out to avoid the impact on other resources due to the accidental deletion of the referenced resource, ensuring the Internet of Things The normal and reliable operation of the system.
  • Figure 1 is a schematic diagram of an implementation environment provided by an embodiment of the present application.
  • FIG. 2 is a flowchart of a method for deleting resources provided by an embodiment of the present application
  • FIG. 3 is a flowchart of a resource deletion method provided by another embodiment of the present application.
  • FIG. 4 is a flowchart of a method for deleting resources provided by still another embodiment of the present application.
  • FIG. 5 is a flowchart of a method for deleting resources according to another embodiment of the present application.
  • Fig. 6 is a block diagram of a resource deletion device provided by an embodiment of the present application.
  • FIG. 7 is a block diagram of a resource deletion device provided by another embodiment of the present application.
  • FIG. 8 is a block diagram of a resource deletion device provided by another embodiment of the present application.
  • FIG. 9 is a schematic structural diagram of an Internet of Things device provided by an embodiment of the present application.
  • FIG. 10 is a schematic structural diagram of a terminal device provided by an embodiment of the present application.
  • the refrigerator is a resource
  • the switch of the refrigerator is also a resource.
  • two resource types are defined: collective resources and non-collective resources.
  • a collection resource refers to a linked collection of multiple reference resources
  • a reference resource refers to a resource referenced by a collection resource.
  • a collection resource can include one or more reference resources.
  • the reference resource can be a collection resource or a non-collection. resource.
  • the referenced resource may also be referred to as a "linked resource" or other names, which is not limited in this application.
  • the reference resource in the collection resource is only a link, and the link points to the real address of the reference resource in the network.
  • a certain reference resource of a certain collective resource may be on the same physical device as the collective resource, or it may not be on the same physical device.
  • resource identifier used to identify the name of the resource
  • resource identification attribute allows the client to interact with the resource through a specific protocol.
  • the resource type attribute is used to indicate the type of the resource.
  • a resource type is defined in an IoT technology system, and then different fields, different devices, and different resources can instantiate the resource type.
  • the interface attribute is used to indicate how the resource can be operated, for example, through different interfaces such as create (create) and delete (delete).
  • a collection resource For a collection resource, it also contains a link attribute, which is used to indicate the relationship between the collection resource and the reference resource it refers to, and the URI of the reference resource is included in the link attribute.
  • linkadd add link
  • the linkadd interface can add an existing resource to the collective resource as a reference resource for the collective resource.
  • the linkadd interface adds a URI that references a resource to the link attribute of the collection resource. If the interface attribute of a collection resource contains the create interface, the client can use the create interface to create a new reference resource. The collection resource can directly reference the new reference resource. In addition, the new reference resource can also be used by the new reference resource.
  • a collection resource since the collection resource includes at least one reference resource, when the collection resource is deleted through the delete interface of the collection resource , Also need to recursively delete the reference resources in the collection resources.
  • a collection resource A is created through the create interface of a certain resource, and the collection resource A contains the delete interface and the create interface.
  • the collection resource B is created through the create interface of the collection resource A, then the collection resource A contains the collection resource B, Then, the collection resource B is referenced to the collection resource C through the linkadd interface of the collection resource C, and the collection resource C also contains the collection resource B.
  • the client deletes the collection resource A through the delete interface of the collection resource A. If it is deleting When collecting resource A, delete the collection resource B created through the create interface of the collection resource A. Obviously, it will directly affect the use of the collection resource C, which will affect the management of IoT devices and the normal operation of the IoT system. .
  • the reference resource of the collection resource is first obtained, and then the collection resource and the reference resource are deleted when the reference resource meets the set conditions, where:
  • the setting condition includes that the reference resource is not referenced by other resources except the collection resource.
  • the embodiment of the present application fully considers the characteristics of the reference resource of the collection resource when deleting the collection resource, so that when the collection resource is deleted through the delete interface, the use of resources other than the collection resource will not be affected, thereby solving the problem.
  • the above problems avoid the impact on other resources due to the accidental deletion of reference resources, and ensure the normal and reliable operation of the Internet of Things system.
  • FIG. 1 shows a schematic diagram of an implementation environment provided by an embodiment of the present application.
  • the implementation environment may include: a terminal device 11, a first Internet of Things device 12, and a second Internet of Things device 13.
  • the implementation environment may be an Internet of Things system.
  • the terminal device 11 may include various handheld devices (such as mobile phones, tablet computers, etc.) with wireless communication functions, in-vehicle devices, wearable devices, computing devices or other processing devices connected to wireless modems, as well as various forms of user equipment ( User Equipment, UE), Mobile Station (MS), etc.
  • UE User Equipment
  • MS Mobile Station
  • Collective resources or non-collective resources can be stored in the first Internet of Things device 12.
  • the collective resource includes a link to the reference resource stored on the second Internet of Things device 13.
  • the specific implementation form of the first Internet of Things device 12 may also be different.
  • the first Internet of Things device 12 may be a router; for another example, in a cloud platform-based Internet of Things system, the first Internet of Things device 12 may be a server in the cloud.
  • the specific manifestation of the first Internet of Things device 12 is not limited, and any device that stores collective resources and/or non-collective resources can be used as the first Internet of Things device 12.
  • Reference resources may be stored in the second Internet of Things device 13.
  • a collection resource can include one or more reference resources, and the reference resource can be a collection resource or a non-collection resource.
  • the second Internet of Things device 13 may be an access device in the Internet of Things system, such as a terminal device, a smart home device, or other devices with network access capabilities, which are not limited in the embodiment of the present application.
  • the terminal device 11 may communicate with the first Internet of Things device 12 through a wireless or wired network, and the first Internet of Things device 12 may also communicate with the second Internet of Things device 13 through a wireless or wired network.
  • the number of the first Internet of Things device 12 may be one or more; the number of the second Internet of Things device 13 may be one or more.
  • the referenced resource may be on the same IoT device as the collective resource, or it may not be on the same IoT device, and the referenced resource may be a collective resource or a non-collective resource. That is, the first Internet of Things device 12 and the second Internet of Things device 13 may be the same Internet of Things device, or two different Internet of Things devices. However, regardless of whether the first Internet of Things device 12 and the second Internet of Things device 13 are the same Internet of Things device or two different Internet of Things devices, the following method procedures provided in the embodiments of the present application are applicable.
  • the terminal device 11 may be a mobile phone used by the user
  • the first Internet of Things device 12 may be a router
  • the second Internet of Things device 13 may be a smart TV, a smart speaker, a smart air conditioner, Smart home appliances such as smart lights, smart doors and windows, smart curtains, smart sockets, etc.
  • a client can be installed and running in the terminal device 11, and the client can initiate a resource deletion request to the first Internet of Things device 12, such as a deletion request for a collective resource or a deletion request for a non-collective resource .
  • the first Internet of Things device 12 stores non-collective resources
  • the first Internet of Things device 12 can directly delete the non-collective resources.
  • the first Internet of Things device 12 saves a collective resource
  • the first Internet of Things device 12 receives the resource deletion request, it can delete the collective resource and the reference resource saved in the second Internet of Things device 13
  • For the specific deletion process please refer to the following method example, which will not be repeated here.
  • FIG. 2 shows a flowchart of a resource deletion method provided by an embodiment of the present application.
  • the method can be applied to the implementation environment shown in FIG. 1.
  • the method can include the following steps (210-230):
  • Step 210 The Internet of Things device determines the target resource to be deleted.
  • the target resource refers to the resource to be deleted.
  • the target resource can be a collective resource or a non-collective resource; the number of the target resource can be one or more.
  • the types are not limited.
  • the target resource to be deleted may be determined by the Internet of Things device.
  • the Internet of Things device can determine the target resource to be deleted according to the request of the terminal device. For example, the Internet of Things device receives a resource deletion request from the terminal device, and determines the target resource to be deleted according to the resource deletion request; the Internet of Things device also The target resource to be deleted can be determined by oneself according to the state of the resource managed by it.
  • the Internet of Things device determines the resource that has not been used in the last 48 hours as the target resource to be deleted according to the state of the resource managed by it.
  • This embodiment of the application There is no restriction on the specific method for the IoT device to determine the target resource.
  • the IoT device can either use one of the two optional methods to determine the target resource alone, or use a combination of the two optional methods.
  • To determine the target resource other methods can also be used to determine the target resource.
  • the embodiments of the present application provide multiple ways to determine the target resource, which can improve the flexibility of the IoT device in determining the target resource and improve the efficiency of resource management.
  • the above method further includes the following steps (212-214):
  • Step 212 The terminal device sends a resource deletion request to the Internet of Things device.
  • the resource deletion request is used to request the deletion of the target resource.
  • the resource deletion request sent by the terminal device may include the resource identifier of the target resource, so that the IoT device receives After the resource deletion request is received, the resource deletion request can be parsed to obtain the information of the target resource to be deleted.
  • Step 214 When the resource deletion request satisfies the third condition, the Internet of Things device executes the step of deleting the target resource.
  • the Internet of Things device after the Internet of Things device receives the resource deletion request, it can detect the resource deletion request to determine whether the requesting party can delete the target resource.
  • the IoT device may detect whether the resource deletion request meets the third condition, and if the resource deletion request meets the third condition, execute the step of deleting the target resource.
  • the third condition is a condition for determining that the requester can delete the target resource.
  • the third condition includes but is not limited to: the target resource supports a deletion interface, and the requester has the right to delete the target resource.
  • the requesting party refers to the party that sends the resource deletion request.
  • the requesting party may be the terminal device introduced in the foregoing implementation environment embodiment.
  • the embodiment of the present application does not limit the method for determining the third condition.
  • the third condition may be pre-defined by an agreement, or may be specifically determined by the Internet of Things device according to resource conditions and actual security requirements.
  • the target resource is a collective resource
  • the IoT device determines that the resource deletion request satisfies the third condition, it can execute the step of deleting the target resource.
  • the collective resource contains at least one reference resource, in order to make a more detailed and sufficient Considering that it is necessary to perform further analysis and processing on the referenced resource of the target resource, and then the Internet of Things device may perform step 210 and subsequent steps to delete the referenced resource of the target resource.
  • the embodiment of the present application does not limit the execution order of step 210 and step 214.
  • Step 210 may be executed simultaneously with step 214, may also be executed before step 214, or may be executed after step 214.
  • Step 220 In a case where the target resource is a collective resource, the Internet of Things device obtains the first reference resource.
  • the Internet of Things device determines the target resource to be deleted, or the Internet of Things device determines the target resource to be deleted, it can determine whether the target resource is a collective resource.
  • the embodiment of this application determines the target for the Internet of Things device.
  • the specific timing of whether the resource is a collective resource is not limited.
  • the IoT device may delete the target resource, and at the same time also delete the resource attribute of the target resource.
  • the target resource is referenced by other resources, when the IoT device deletes the target resource, it also deletes the reference relationship of the target resource included in the resource attribute of the target resource.
  • the target resource is a collective resource
  • the target resource may include at least one reference resource.
  • the embodiment of the present application only takes the first reference resource as an example for illustration.
  • the first reference resource may be any reference resource of the target resource. Steps for deleting other reference resources of the target resource , Can be deduced by referring to the deletion steps of the first referenced resource.
  • the first reference resource may be a collective resource or a non-collective resource. The embodiment of the present application does not limit the resource type of the first reference resource.
  • Step 230 When the first reference resource meets the first condition, the Internet of Things device deletes the target resource and the first reference resource.
  • the Internet of Things device After the Internet of Things device obtains the first reference resource, it can detect the first reference resource to determine whether deleting the first reference resource will affect other resources except the target resource.
  • the Internet of Things device may detect whether the first referenced resource meets the first condition, and in the case that the first referenced resource meets the first condition, it is determined that deleting the first referenced resource will not affect other resources except the target resource.
  • the resource has an impact, so that the IoT device can delete the target resource and the first referenced resource.
  • the first condition includes that the first referenced resource is not referenced by other resources except the target resource. If the first referenced resource is referenced by other resources except the target resource, it means that deleting the first referenced resource will affect the normal use of other resources.
  • the first condition further includes at least one of the following: the first referenced resource supports To delete the interface, the requesting party has the right to delete the first referenced resource, and the first referenced resource is created through the creation interface of the target resource.
  • the requesting party refers to the party that sends the resource deletion request.
  • the embodiment of the present application does not limit the method for determining the first condition.
  • the first condition may be pre-defined by an agreement, or may be specifically determined by the Internet of Things device according to resource conditions and actual security requirements.
  • the method further includes: the Internet of Things device detects whether the first referenced resource supports the deletion interface; in the case that the first referenced resource supports the deletion interface , The Internet of Things device detects whether the requesting party has the right to delete the first referenced resource; in the case that the requesting party has the right to delete the first referenced resource, the Internet of Things device detects whether the first referenced resource is a resource other than the target resource When the first referenced resource is not referenced by other resources except the target resource, the IoT device detects whether the first referenced resource is created through the creation interface of the target resource; the first referenced resource is passed When the creation interface of the target resource is created, it is determined that the first reference resource satisfies the first condition.
  • this exemplary embodiment only shows a possible sequence of detecting whether the first referenced resource meets the first condition.
  • Those skilled in the art will understand the technical solutions of the embodiments of the present application. It is easy to think of other procedures for detecting whether the first referenced resource meets the first condition, and other content that can be included in the first condition, but they should all fall within the protection scope of the present application.
  • the IoT device executes the steps of deleting the target resource and the first referenced resource.
  • the IoT device deletes the target resource
  • the resource attribute of the target resource is also deleted.
  • the IoT device deletes the target resource at the same time as the resource of the target resource.
  • the reference relationship of the target resource contained in the attribute; when the IoT device deletes the first reference resource, the resource attribute of the first reference resource is also deleted, and the target resource contained in the resource attribute of the target resource and the first reference resource are also deleted Reference relationship.
  • the reference relationship of the target resource includes the reference relationship between the target resource and the first reference resource.
  • the IoT device can delete the target resource and the first reference resource at the same time; it can also delete the first reference resource first, and then delete the target resource; it can also delete the target resource first, and then delete the first reference resource.
  • This application does not limit the sequence of deleting the first reference resource and deleting the target resource by the IoT device.
  • the Internet of Things device may delete the target resource when it is determined that the resource deletion request satisfies the third condition, and then determine whether the first referenced resource satisfies the first condition, and when the first referenced resource satisfies the first condition , Delete the first reference resource.
  • step 232 when the first referenced resource does not meet the first condition
  • the IoT device deletes the target resource, and keeps the first reference resource without deleting.
  • the first referenced resource does not meet the first condition, which means that deleting the first referenced resource will also affect other resources except the target resource.
  • the IoT device deletes the target resource, and
  • the step of keeping the first reference resource without deleting that is, the IoT device deletes the target resource, and at the same time also deletes the reference relationship between the target resource and the first reference resource, but because the IoT device retains the first reference resource and does not delete it, Therefore, it will not affect other resources other than the target resource, for example, it will not affect other collective resources that reference the first referenced resource.
  • the above method further includes the following steps (240-250):
  • Step 240 In the case where it is determined to delete the first reference resource, and the first reference resource is a collective resource, acquire the second reference resource.
  • the embodiment of the present application provides a corresponding resource deletion method in response to this situation.
  • the IoT device determines that the target resource is a collective resource
  • the reference resource of the target resource ie the first reference resource
  • it is determined to delete the reference resource of the target resource ie the first reference resource
  • obtain the second reference Resources where the second reference resource is a reference resource of the first reference resource.
  • the first referenced resource when the first referenced resource is a collection resource, the first referenced resource may include one or more referenced resources, and the second referenced resource may be any referenced resource of the first referenced resource.
  • the embodiments of this application only Taking the step of deleting the second referenced resource as an example for illustration, the steps of deleting other referenced resources of the first referenced resource can be derived by analogy with reference to the deleting step of the second referenced resource.
  • Step 250 When the second reference resource meets the second condition, delete the second reference resource.
  • the Internet of Things device After the Internet of Things device obtains the second referenced resource, it can detect the second referenced resource to determine whether deleting the second referenced resource will affect other resources other than the first referenced resource.
  • the Internet of Things device may detect whether the second referenced resource meets the second condition, and in the case that the second referenced resource meets the second condition, it is determined that deleting the second referenced resource will not affect any other than the first referenced resource. Other resources have an impact, so that the IoT device can delete the second reference resource.
  • the second condition includes that the second referenced resource is not referenced by other resources except the first referenced resource. If the second referenced resource is referenced by other resources except the first referenced resource, it means that deleting the second referenced resource will affect the normal use of other resources.
  • the second condition further includes at least one of the following: Support for the second referenced resource To delete the interface, the requesting party has the right to delete the second reference resource, and the second reference resource is created through the creation interface of the first reference resource. That is, the substance of the second condition can be the same as that of the first condition. The only difference is that the first condition is used to determine that deleting the first referenced resource will not affect other resources except the target resource. The second condition is used It is determined that deleting the second referenced resource will not affect other resources except the first referenced resource.
  • the substance of the second condition and the first condition may also be different.
  • the second condition may only include that the second referenced resource is not referenced by other resources other than the first referenced resource.
  • the specific content of the second condition and the relationship between the second condition and the first condition are not limited.
  • the second condition may be pre-defined by an agreement, or may be specifically determined by the Internet of Things device according to resource conditions and actual security requirements.
  • step 252 when the second referenced resource is not When the second condition is met, the IoT device deletes the first referenced resource, and keeps the second referenced resource without deleting. That is, when the IoT device deletes the first reference resource, the reference relationship between the first reference resource and the second reference resource is also deleted, but because the IoT device retains the second reference resource and does not delete it, it will not reference the first reference resource. Resources other than the resource have an impact, such as no impact on other collective resources that reference the second referenced resource.
  • the target resource to be deleted when the target resource to be deleted is determined, and the target resource is a collective resource, by obtaining the reference resource of the target resource, it is determined that the reference resource satisfies the conditions.
  • the reference resource is deleted again; compared to when the related technology deletes the collection resource, all the reference resources included in the collection resource are deleted at the same time.
  • the reference resource included in the collection resource is analyzed and processed, and the reference resource is deleted only when it is confirmed that the reference resource can be deleted, so that more detailed and sufficient considerations are made during the resource deletion process to avoid accidental deletion Quoting resources results in an impact on other resources, ensuring the normal and reliable operation of the Internet of Things system.
  • the target resource when the referenced resource of the target resource does not meet the conditions, the target resource is deleted, and the referenced resource is retained without deleting, so as to ensure that the referenced resource and other resources other than the target resource are present.
  • deleting the target resource will not affect other resources, avoiding the impact on other resources due to accidental deletion of the reference resource, and ensuring the normal and reliable operation of the IoT system.
  • the Internet of Things device first performs a check on the second referenced resource. It is detected that when the second reference resource meets the second condition and does not meet the second condition, the corresponding resource deletion step is performed respectively, so that the reference resource belonging to the target resource of the collective resource is also a collective resource, which provides a specific The way to delete the target resource recursively.
  • the technical solution of the present application is introduced and explained mainly from the perspective of interaction between the terminal device and the Internet of Things device.
  • the above-mentioned steps related to the Internet of Things device can be individually implemented as a resource deletion method on the IoT device side; the above-mentioned steps related to the terminal device can be individually implemented as a resource deletion method on the terminal device side.
  • FIG. 6 shows a block diagram of a resource deletion apparatus provided by an embodiment of the present application.
  • the device has the function of realizing the example of the method on the side of the Internet of Things device, and the function can be realized by hardware, or by hardware executing corresponding software.
  • the device can be the Internet of Things device described above, or it can be set in the Internet of Things device.
  • the device 600 may include: a resource determining module 610, a resource acquiring module 620, and a resource deleting module 630.
  • the resource determining module 610 is used to determine the target resource to be deleted.
  • the resource obtaining module 620 is configured to obtain a first reference resource when the target resource is a collective resource, and the first reference resource is a reference resource of the target resource.
  • the resource deletion module 630 is configured to delete the target resource and the first reference resource when the first reference resource satisfies a first condition, and the first condition includes that the first reference resource is not deleted Referenced by resources other than the target resource.
  • the first condition further includes at least one of the following: the first referenced resource supports a deletion interface, the requesting party has the right to delete the first referenced resource, and the first referenced resource is passed through the target Created by the resource creation interface.
  • the device 600 further includes a resource detection module 640, configured to: detect whether the first reference resource supports the deletion interface; when the first reference resource supports the deletion interface In the case of detecting whether the requesting party has the right to delete the first referenced resource; in the case that the requesting party has the right to delete the first referenced resource, detecting whether the first referenced resource is deleted Is referenced by resources other than the target resource; in the case that the first referenced resource is not referenced by other resources except the target resource, it is detected whether the first referenced resource passes the target
  • the creation interface of the resource is created; in the case that the first reference resource is created through the creation interface of the target resource, it is determined that the first reference resource satisfies the first condition.
  • the resource deletion module is further configured to delete the target resource when the first reference resource does not meet the first condition, and reserve the first reference resource without deleting.
  • the resource deletion module 630 is further configured to obtain a second reference resource when it is determined to delete the first reference resource and the first reference resource is a collective resource. Is the reference resource of the first reference resource; the resource deletion module 630 is further configured to delete the second reference resource when the second reference resource satisfies a second condition, and the second condition includes The second referenced resource is not referenced by other resources except the first referenced resource.
  • the apparatus 600 further includes: a request receiving module 650, configured to receive a resource deletion request, the resource deletion request being used to request deletion of the target resource; the resource deletion module 630, It is also used to execute the step of deleting the target resource when the resource deletion request satisfies a third condition; wherein, the third condition includes that the target resource supports a deletion interface, and the requesting party has the ability to delete the target resource. The permissions of the target resource.
  • the target resource to be deleted when the target resource to be deleted is determined, and the target resource is a collective resource, by obtaining the reference resource of the target resource, it is determined that the reference resource satisfies the conditions.
  • the reference resource is deleted again; compared to when the related technology deletes the collection resource, all the reference resources included in the collection resource are deleted at the same time.
  • the reference resource included in the collection resource is analyzed and processed, and the reference resource is deleted only when it is confirmed that the reference resource can be deleted, so that more detailed and sufficient considerations are made during the resource deletion process to avoid accidental deletion Quoting resources results in an impact on other resources, ensuring the normal and reliable operation of the Internet of Things system.
  • FIG. 8 shows a block diagram of a resource deletion apparatus provided by an embodiment of the present application.
  • the device has the function of realizing the above-mentioned method example on the terminal device side, and the function can be realized by hardware, or by hardware executing corresponding software.
  • the device can be the terminal device described above, or it can be set in the terminal device.
  • the apparatus 800 may include: a request sending module 810.
  • the request sending module 810 is configured to send a resource deletion request to the Internet of Things device, where the resource deletion request is a request for the terminal device to delete a target resource in the Internet of Things device; where the target resource is In the case where resources are collected, and the first reference resource of the target resource satisfies a first condition, the target resource and the first reference resource are deleted, and the first condition includes that the first reference resource is not deleted Referenced by resources other than the target resource.
  • the first condition further includes at least one of the following: the first referenced resource supports a deletion interface, the requesting party has the right to delete the first referenced resource, and the first referenced resource is passed through the target Created by the resource creation interface.
  • the technical solution provided by the embodiments of the present application sends a resource deletion request to the Internet of Things device through a terminal device.
  • the Internet of Things device executes the step of deleting the target resource, thereby providing A way to determine the target resource and delete the target resource.
  • the resource deletion request may include the resource identifier of the target resource, so that the IoT device can quickly and easily grasp the target resource to be deleted and improve the efficiency of resource management.
  • the device provided in the above embodiment realizes its functions, only the division of the above-mentioned functional modules is used as an example for illustration. In actual applications, the above-mentioned functions can be allocated by different functional modules according to actual needs. That is, the content structure of the device is divided into different functional modules to complete all or part of the functions described above.
  • FIG. 9 shows a schematic structural diagram of an Internet of Things device 90 provided by an embodiment of the present application.
  • the Internet of Things device 90 may be the first Internet of Things device and the second Internet of Things device described above. That is, the Internet of Things device 90 may be a device for storing collective resources and/or non-collective resources in an Internet of Things system, or a device for storing reference resources in an Internet of Things system.
  • the Internet of Things device 90 may include: a processor 91, a receiver 92, a transmitter 93, a memory 94, and a bus 95.
  • the processor 91 includes one or more processing cores, and the processor 91 executes various functional applications and information processing by running software programs and modules.
  • the receiver 92 and the transmitter 93 may be implemented as a transceiver 96, and the transceiver 96 may be a communication chip.
  • the memory 94 is connected to the processor 91 through a bus 95.
  • the memory 94 may be used to store a computer program, and the processor 91 is used to execute the computer program to implement each step executed by the Internet of Things device in the foregoing method embodiment.
  • the memory 94 may be implemented by any type of volatile or non-volatile storage device or a combination thereof.
  • the volatile or non-volatile storage device includes but is not limited to: RAM (Random-Access Memory, random access memory) And ROM (Read-Only Memory), EPROM (Erasable Programmable Read-Only Memory, Erasable Programmable Read-Only Memory), EEPROM (Electrically Erasable Programmable Read-Only Memory, Electrically Erasable Programmable Read-Only Memory) Memory), flash memory or other solid-state storage technology, CD-ROM (Compact Disc Read-Only Memory), DVD (Digital Video Disc, high-density digital video disc) or other optical storage, tape cartridges, magnetic tapes, disks Storage or other magnetic storage devices. in:
  • the processor 91 is configured to determine the target resource to be deleted; when the target resource is a collective resource, obtain a first reference resource, where the first reference resource is a reference resource of the target resource; In the case that the first reference resource satisfies a first condition, the target resource and the first reference resource are deleted, and the first condition includes that the first reference resource is not a resource other than the target resource Cited.
  • the first condition further includes at least one of the following: the first referenced resource supports a deletion interface, the requesting party has the right to delete the first referenced resource, and the first referenced resource is passed through the target Created by the resource creation interface.
  • the processor 91 is further configured to detect whether the first reference resource supports the deletion interface; in the case that the first reference resource supports the deletion interface, detect whether the requestor has The right to delete the first referenced resource; in the case that the requesting party has the right to delete the first referenced resource, detect whether the first referenced resource is referenced by resources other than the target resource In the case where the first reference resource is not referenced by other resources except the target resource, detecting whether the first reference resource is created through the creation interface of the target resource; in the first In the case that a reference resource is created through the creation interface of the target resource, it is determined that the first reference resource satisfies the first condition.
  • the processor 91 is further configured to delete the target resource when the first reference resource does not meet the first condition, and reserve the first reference resource without deleting.
  • the processor 91 is further configured to obtain a second reference resource when it is determined to delete the first reference resource and the first reference resource is a collective resource, where the second reference resource is The reference resource of the first reference resource; when the second reference resource satisfies a second condition, the second reference resource is deleted, and the second condition includes that the second reference resource is not deleted Referenced by resources other than the first referenced resource.
  • the transceiver 96 is configured to receive a resource deletion request, where the resource deletion request is used to request deletion of the target resource; the processor 91 is further configured to: In the case of, execute the step of deleting the target resource; wherein, the third condition includes that the target resource supports a deletion interface, and the requesting party has the right to delete the target resource.
  • FIG. 10 shows a schematic structural diagram of a terminal device 100 according to an embodiment of the present application.
  • the terminal device 100 may include: a processor 101, a receiver 102, a transmitter 103, a memory 104, and a bus 105.
  • the processor 101 includes one or more processing cores, and the processor 101 executes various functional applications and information processing by running software programs and modules.
  • the receiver 102 and the transmitter 103 may be implemented as a transceiver 106, and the transceiver 106 may be a communication chip.
  • the memory 104 is connected to the processor 101 through a bus 105.
  • the memory 104 may be used to store a computer program, and the processor 101 is used to execute the computer program to implement each step executed by the terminal device in the foregoing method embodiment.
  • the memory 104 may be implemented by any type of volatile or non-volatile storage device or a combination thereof.
  • the volatile or non-volatile storage device includes but is not limited to: RAM (Random-Access Memory, random access memory) And ROM (Read-Only Memory), EPROM (Erasable Programmable Read-Only Memory, Erasable Programmable Read-Only Memory), EEPROM (Electrically Erasable Programmable Read-Only Memory, Electrically Erasable Programmable Read-Only Memory) Memory), flash memory or other solid-state storage technology, CD-ROM (Compact Disc Read-Only Memory), DVD (Digital Video Disc, high-density digital video disc) or other optical storage, tape cartridges, magnetic tapes, disks Storage or other magnetic storage devices. in:
  • the transceiver 106 is configured to send a resource deletion request to an Internet of Things device, where the resource deletion request is a request by the terminal device to delete a target resource in the Internet of Things device; wherein, in the target resource Is a collective resource, and the first reference resource of the target resource satisfies the first condition, the target resource and the first reference resource are deleted, and the first condition includes that the first reference resource is not Referenced by resources other than the target resource.
  • the first condition further includes at least one of the following: the first referenced resource supports a deletion interface, the requesting party has the right to delete the first referenced resource, and the first referenced resource is passed through the target Created by the resource creation interface.
  • the embodiment of the present application provides a computer-readable storage medium in which a computer program is stored, and the computer program is used to be executed by a processor of an Internet of Things device to implement the resource deletion method on the side of the Internet of Things device. .
  • the embodiment of the present application provides a computer-readable storage medium in which a computer program is stored, and the computer program is used to be executed by a processor of a terminal device to implement the foregoing resource deletion method on the terminal device side.
  • the embodiment of the present application provides a chip that includes a programmable logic circuit and/or program instructions, and when the chip runs on an IoT device, it is used to implement the resource deletion method on the IoT device side as described above.
  • an embodiment of the present application provides a chip that includes a programmable logic circuit and/or program instructions.
  • the chip runs on a terminal device, it is used to implement resource deletion on the terminal device side as described above. method.
  • This application also provides a computer program product, which when the computer program product runs on the processor of the Internet of Things device, causes the Internet of Things device to execute the resource deletion method on the side of the Internet of Things device.
  • This application also provides a computer program product, which when the computer program product runs on the processor of the terminal device, causes the terminal device to execute the above-mentioned resource deletion method on the terminal device side.
  • the functions described in the embodiments of the present application may be implemented by hardware, software, firmware, or any combination thereof. When implemented by software, these functions can be stored in a computer-readable medium or transmitted as one or more instructions or codes on the computer-readable medium.
  • the computer-readable medium includes a computer storage medium and a communication medium, where the communication medium includes any medium that facilitates the transfer of a computer program from one place to another.
  • the storage medium may be any available medium that can be accessed by a general-purpose or special-purpose computer.

Abstract

The present application relates to the technical field of Internet of things, and provides a resource deletion method, apparatus, and device, and a storage medium. The method comprises: an Internet of things device determines a target resource to be deleted; if the target resource is a collection resource, the Internet of things device obtains a first reference resource; if the first reference resource satisfies a first condition, the Internet of things device deletes the target resource and the first reference resource. Compared with the prior art, when deleting a collection resource, a reference resource comprised in the collection resource is also deleted. In the technical solution provided by embodiments of the present application, when deleting a collection resource, a reference resource comprised in the collection resource is first analyzed, and the reference resource is deleted only when it is confirmed that the reference resource can be deleted; thus, during resource deletion, more detailed and full consideration is carried out to avoid influence on other resources due to mistaken deletion of reference resources, and ensure normal and reliable operation of an Internet of Things system.

Description

资源删除方法、装置、设备及存储介质Resource deletion method, device, equipment and storage medium 技术领域Technical field
本申请实施例涉及通信技术领域,特别涉及一种资源删除方法、装置、设备及存储介质。The embodiments of the present application relate to the field of communication technologies, and in particular, to a method, device, device, and storage medium for deleting resources.
背景技术Background technique
基于REST(Representational State Transfer,表现层状态转移)架构的物联网设备管理方法越来越流行。在REST架构下,物理世界中的事物(如设备)均可以使用资源(resource)的方式来描述,并且使用CURDN(包括create(创建)、update(修改/更新)、retrieve(获取)、delete(删除)、notification(通知))的方式来操作资源。IoT device management methods based on REST (Representational State Transfer) architecture are becoming more and more popular. Under the REST architecture, things (such as devices) in the physical world can be described in the form of resources, and CURDN (including create (create), update (modify/update), retrieve (acquire), delete) Delete), notification (notification)) to manipulate resources.
在资源描述过程中,定义了一种名称为collection的集合资源。集合资源可以包括一个或多个引用资源,该引用资源可以是集合资源,也可以是非集合资源。在REST架构下,每个资源都有自己的资源属性,资源属性包括:资源标识、资源类型和接口。例如,资源标识可以用uri(uniform resource identifier,统一资源标识符)来表示;资源类型可以用rt(resource type,资源类型)来表示;接口可以用if(interface,接口)来表示。此外,集合资源还存在一个links(链接)属性。集合资源可以使用IF属性中的linkadd(增加链接)接口,将一个引用资源的URI增加到集合资源的links属性里。In the process of resource description, a collection resource named collection is defined. A collection resource may include one or more reference resources, and the reference resource may be a collection resource or a non-collection resource. Under the REST architecture, each resource has its own resource attributes, which include: resource identifier, resource type, and interface. For example, the resource identifier can be represented by uri (uniform resource identifier); the resource type can be represented by rt (resource type, resource type); and the interface can be represented by if (interface, interface). In addition, the collection resource also has a links attribute. The collection resource can use the linkadd (add link) interface in the IF attribute to add the URI of a reference resource to the links attribute of the collection resource.
在REST架构下,由于集合资源中包括至少一个引用资源,针对集合资源的删除过程,还需要进一步研究。Under the REST architecture, since the collection resource includes at least one reference resource, the deletion process of the collection resource needs further study.
发明内容Summary of the invention
本申请实施例提供了一种资源删除方法、装置、设备及存储介质。所述技术方案如下:The embodiments of the present application provide a resource deletion method, device, equipment, and storage medium. The technical solution is as follows:
一方面,本申请实施例提供了一种资源删除方法,应用于物联网设备,所述方法包括:On the one hand, an embodiment of the present application provides a method for deleting a resource, which is applied to an Internet of Things device, and the method includes:
确定待删除的目标资源;Determine the target resource to be deleted;
在所述目标资源是集合资源的情况下,获取第一引用资源,所述第一引用资源是所述目标资源的引用资源;In the case that the target resource is a collective resource, acquiring a first reference resource, where the first reference resource is a reference resource of the target resource;
在所述第一引用资源满足第一条件的情况下,删除所述目标资源以及所述第一引用资源,所述第一条件包括所述第一引用资源未被除所述目标资源之外的其它资源所引用。When the first reference resource satisfies a first condition, delete the target resource and the first reference resource, and the first condition includes that the first reference resource is not other than the target resource. Referenced by other resources.
另一方面,本申请实施例提供了一种资源删除方法,应用于终端设备,所述方法包括:On the other hand, an embodiment of the present application provides a method for deleting a resource, which is applied to a terminal device, and the method includes:
向物联网设备发送资源删除请求,所述资源删除请求是所述终端设备请求对所述物联网设备中的目标资源进行删除的请求;Sending a resource deletion request to the Internet of Things device, where the resource deletion request is a request by the terminal device to delete a target resource in the Internet of Things device;
其中,在所述目标资源是集合资源,且所述目标资源的第一引用资源满足第一条件的情况下,所述目标资源和所述第一引用资源被删除,所述第一条件包括所述第一引用资源未被除所述目标资源之外的其它资源所引用。Wherein, when the target resource is a collective resource, and the first reference resource of the target resource satisfies a first condition, the target resource and the first reference resource are deleted, and the first condition includes all The first referenced resource is not referenced by other resources except the target resource.
再一方面,本申请实施例提供了一种资源删除装置,应用于物联网设备,所述装置包括:In another aspect, an embodiment of the present application provides a resource deletion device, which is applied to an Internet of Things device, and the device includes:
资源确定模块,用于确定待删除的目标资源;The resource determination module is used to determine the target resource to be deleted;
资源获取模块,用于在所述目标资源是集合资源的情况下,获取第一引用资源,所述第 一引用资源是所述目标资源的引用资源;The resource acquisition module is configured to acquire a first reference resource when the target resource is a collective resource, and the first reference resource is a reference resource of the target resource;
资源删除模块,用于在所述第一引用资源满足第一条件的情况下,删除所述目标资源以及所述第一引用资源,所述第一条件包括所述第一引用资源未被除所述目标资源之外的其它资源所引用。A resource deletion module, configured to delete the target resource and the first reference resource when the first reference resource satisfies a first condition, and the first condition includes that the first reference resource has not been deleted Referred to by resources other than the target resource.
又一方面,本申请实施例提供了一种资源删除装置,应用于终端设备,所述装置包括:In another aspect, an embodiment of the present application provides a resource deletion device, which is applied to a terminal device, and the device includes:
请求发送模块,用于向物联网设备发送资源删除请求,所述资源删除请求是所述终端设备请求对所述物联网设备中的目标资源进行删除的请求;A request sending module, configured to send a resource deletion request to an Internet of Things device, where the resource deletion request is a request for the terminal device to delete a target resource in the Internet of Things device;
其中,在所述目标资源是集合资源,且所述目标资源的第一引用资源满足第一条件的情况下,所述目标资源和所述第一引用资源被删除,所述第一条件包括所述第一引用资源未被除所述目标资源之外的其它资源所引用。Wherein, when the target resource is a collective resource, and the first reference resource of the target resource satisfies a first condition, the target resource and the first reference resource are deleted, and the first condition includes all The first referenced resource is not referenced by other resources except the target resource.
还一方面,本申请实施例提供了一种物联网设备,所述物联网设备包括处理器和与所述处理器相连的收发器;其中:In yet another aspect, an embodiment of the present application provides an Internet of Things device, the Internet of Things device including a processor and a transceiver connected to the processor; wherein:
所述处理器,用于确定待删除的目标资源;The processor is used to determine the target resource to be deleted;
所述处理器,还用于在所述目标资源是集合资源的情况下,获取第一引用资源,所述第一引用资源是所述目标资源的引用资源;The processor is further configured to obtain a first reference resource when the target resource is a collective resource, where the first reference resource is a reference resource of the target resource;
所述处理器,还用于在所述第一引用资源满足第一条件的情况下,删除所述目标资源以及所述第一引用资源,所述第一条件包括所述第一引用资源未被除所述目标资源之外的其它资源所引用。The processor is further configured to delete the target resource and the first reference resource when the first reference resource satisfies a first condition, and the first condition includes that the first reference resource is not Referenced by resources other than the target resource.
还一方面,本申请实施例提供了一种终端设备,所述终端设备包括处理器和与所述处理器相连的收发器;其中:In another aspect, an embodiment of the present application provides a terminal device, the terminal device including a processor and a transceiver connected to the processor; wherein:
所述收发器,用于向物联网设备发送资源删除请求,所述资源删除请求是所述终端设备请求对所述物联网设备中的目标资源进行删除的请求;The transceiver is configured to send a resource deletion request to an Internet of Things device, where the resource deletion request is a request by the terminal device to delete a target resource in the Internet of Things device;
其中,在所述目标资源是集合资源,且所述目标资源的第一引用资源满足第一条件的情况下,所述目标资源和所述第一引用资源被删除,所述第一条件包括所述第一引用资源未被除所述目标资源之外的其它资源所引用。Wherein, when the target resource is a collective resource, and the first reference resource of the target resource satisfies a first condition, the target resource and the first reference resource are deleted, and the first condition includes all The first referenced resource is not referenced by other resources except the target resource.
还一方面,本申请实施例提供了一种计算机可读存储介质,所述存储介质中存储有计算机程序,所述计算机程序用于被物联网设备的处理器执行,以实现上述物联网设备侧的资源删除方法。In another aspect, an embodiment of the present application provides a computer-readable storage medium in which a computer program is stored, and the computer program is used to be executed by a processor of an Internet of Things device to implement the above-mentioned Internet of Things device side The resource deletion method.
还一方面,本申请实施例提供了一种计算机可读存储介质,所述存储介质中存储有计算机程序,所述计算机程序用于被终端设备的处理器执行,以实现上述终端设备侧的资源删除方法。In another aspect, an embodiment of the present application provides a computer-readable storage medium in which a computer program is stored, and the computer program is used to be executed by a processor of a terminal device to implement the above-mentioned resources on the terminal device side. Delete method.
还一方面,本申请实施例提供了一种芯片,所述芯片包括可编程逻辑电路和/或程序指令,当所述芯片在物联网设备上运行时,用于实现如上述物联网设备侧的资源删除方法。In yet another aspect, an embodiment of the present application provides a chip that includes a programmable logic circuit and/or program instructions. When the chip runs on an Internet of Things device, it is used to implement the above-mentioned Internet of Things device side Resource deletion method.
还一方面,本申请实施例提供了一种芯片,所述芯片包括可编程逻辑电路和/或程序指令,当所述芯片在终端设备上运行时,用于实现如上述终端设备侧的资源删除方法。In another aspect, an embodiment of the present application provides a chip that includes a programmable logic circuit and/or program instructions. When the chip runs on a terminal device, it is used to implement resource deletion on the terminal device side as described above. method.
本申请实施例提供的技术方案可以包括如下有益效果:The technical solutions provided by the embodiments of the present application may include the following beneficial effects:
在确定待删除的目标资源,且该目标资源是集合资源的情况下,通过获取该目标资源的引用资源,在确定该引用资源满足条件的情况下,再删除该引用资源;相比于相关技术在删除集合资源时,一并将该集合资源所包括的引用资源都删除,本申请实施例提供的技术方案 在删除集合资源时,先对该集合资源所包括的引用资源进行分析处理,在确认该引用资源可以被删除的情况下,才删除该引用资源,从而在资源删除过程中,进行了更加详实和充分的考虑,避免因误删除引用资源而导致对其它资源产生影响,确保了物联网系统的正常可靠运行。In the case that the target resource to be deleted is determined and the target resource is a collective resource, the reference resource of the target resource is obtained, and the reference resource is deleted when it is determined that the reference resource meets the conditions; compared with related technologies When deleting a collection resource, all the reference resources included in the collection resource are deleted at the same time. When deleting the collection resource, the technical solution provided by the embodiment of the present application first analyzes and processes the reference resources included in the collection resource, and then confirms The referenced resource can be deleted only when the referenced resource can be deleted. In the process of resource deletion, more detailed and sufficient consideration is carried out to avoid the impact on other resources due to the accidental deletion of the referenced resource, ensuring the Internet of Things The normal and reliable operation of the system.
附图说明Description of the drawings
图1是本申请一个实施例提供的实施环境的示意图;Figure 1 is a schematic diagram of an implementation environment provided by an embodiment of the present application;
图2是本申请一个实施例提供的资源删除方法的流程图;FIG. 2 is a flowchart of a method for deleting resources provided by an embodiment of the present application;
图3是本申请另一个实施例提供的资源删除方法的流程图;FIG. 3 is a flowchart of a resource deletion method provided by another embodiment of the present application;
图4是本申请再一个实施例提供的资源删除方法的流程图;FIG. 4 is a flowchart of a method for deleting resources provided by still another embodiment of the present application;
图5是本申请又一个实施例提供的资源删除方法的流程图;FIG. 5 is a flowchart of a method for deleting resources according to another embodiment of the present application;
图6是本申请一个实施例提供的资源删除装置的框图;Fig. 6 is a block diagram of a resource deletion device provided by an embodiment of the present application;
图7是本申请另一个实施例提供的资源删除装置的框图;FIG. 7 is a block diagram of a resource deletion device provided by another embodiment of the present application;
图8是本申请又一个实施例提供的资源删除装置的框图;FIG. 8 is a block diagram of a resource deletion device provided by another embodiment of the present application;
图9是本申请一个实施例提供的物联网设备的结构示意图;FIG. 9 is a schematic structural diagram of an Internet of Things device provided by an embodiment of the present application;
图10是本申请一个实施例提供的终端设备的结构示意图。FIG. 10 is a schematic structural diagram of a terminal device provided by an embodiment of the present application.
具体实施方式Detailed ways
为使本申请的目的、技术方案和优点更加清楚,下面将结合附图对本申请实施方式作进一步地详细描述。In order to make the purpose, technical solutions, and advantages of the present application clearer, the implementation manners of the present application will be described in further detail below in conjunction with the accompanying drawings.
在一种物联网系统架构中,所有的物理对象、功能对象等都使用资源来描述。例如冰箱是一个资源,冰箱的开关也是一个资源。在资源描述过程中,定义了两种资源类型:集合资源和非集合资源。其中,集合资源是指多个引用资源的链接集合,引用资源是指集合资源所引用的资源,一个集合资源中可以包括一个或者多个引用资源,该引用资源可以是集合资源,也可以是非集合资源。引用资源也可以称为“链接资源”或者其它名称,本申请对此不作限定。一般在集合资源中的引用资源仅是一个链接(link),该链接指向了引用资源在网络中的真实地址。可选地,某一集合资源的某一个引用资源有可能与该集合资源在同一台物理设备上,也有可能不在同一台物理设备上。In an IoT system architecture, all physical objects and functional objects are described by resources. For example, the refrigerator is a resource, and the switch of the refrigerator is also a resource. In the process of resource description, two resource types are defined: collective resources and non-collective resources. Among them, a collection resource refers to a linked collection of multiple reference resources, and a reference resource refers to a resource referenced by a collection resource. A collection resource can include one or more reference resources. The reference resource can be a collection resource or a non-collection. resource. The referenced resource may also be referred to as a "linked resource" or other names, which is not limited in this application. Generally, the reference resource in the collection resource is only a link, and the link points to the real address of the reference resource in the network. Optionally, a certain reference resource of a certain collective resource may be on the same physical device as the collective resource, or it may not be on the same physical device.
无论是集合资源还是非集合资源,都包含资源标识、资源类型和接口这三个属性。其中,资源标识属性用于标识该资源的名称,资源标识属性允许客户端(client)对该资源通过特定的协议进行交互操作。资源类型属性用于指示该资源的类型。一般来说,一个物联网技术体系内定义一个资源类型,然后不同的领域、不同的设备、不同的资源可以实例化该资源类型。接口属性用于指示该资源可以通过哪些方式来操作,例如通过create(创建)和delete(删除)等不同接口来操作。Regardless of whether it is a collection resource or a non-collection resource, it contains three attributes: resource identifier, resource type, and interface. Among them, the resource identification attribute is used to identify the name of the resource, and the resource identification attribute allows the client to interact with the resource through a specific protocol. The resource type attribute is used to indicate the type of the resource. Generally speaking, a resource type is defined in an IoT technology system, and then different fields, different devices, and different resources can instantiate the resource type. The interface attribute is used to indicate how the resource can be operated, for example, through different interfaces such as create (create) and delete (delete).
对于集合资源,还包含链接(links)属性,链接属性用于指示该集合资源与其引用的引用资源之间的关系,在链接属性中包含了引用资源的uri。一般来说,集合资源的接口属性中还存在一个linkadd(增加链接)接口,linkadd接口可以为该集合资源增加一个已经存在的资源,以作为该集合资源的引用资源。需要注意的一点是,linkadd接口是将一个引用资源的uri增加到集合资源的链接属性中。如果一个集合资源的接口属性中包含create接口,则客户端可以使用该create接口创建一个新的引用资源,该集合资源可以直接引用该新的引用资源, 此外,该新的引用资源也可以被该集合资源之外的其它资源所引用。此外,如果资源的if属性中包含delete接口,则表示该资源是可以删除的,因此,如果客户端需要删除集合资源中使用create接口创建的引用资源,则需要在创建该引用资源时为该引用资源增加delete接口。For a collection resource, it also contains a link attribute, which is used to indicate the relationship between the collection resource and the reference resource it refers to, and the URI of the reference resource is included in the link attribute. Generally speaking, there is also a linkadd (add link) interface in the interface attribute of the collective resource, and the linkadd interface can add an existing resource to the collective resource as a reference resource for the collective resource. One thing to note is that the linkadd interface adds a URI that references a resource to the link attribute of the collection resource. If the interface attribute of a collection resource contains the create interface, the client can use the create interface to create a new reference resource. The collection resource can directly reference the new reference resource. In addition, the new reference resource can also be used by the new reference resource. Referenced by resources other than the collection resource. In addition, if the if attribute of the resource contains the delete interface, it means that the resource can be deleted. Therefore, if the client needs to delete the reference resource created by the create interface in the collection resource, it needs to be the reference when creating the reference resource Resources add delete interface.
在一个示例中,删除非集合资源,直接通过非集合资源的delete接口删除即可,然而,对于集合资源,由于集合资源中包括至少一个引用资源,因此在通过集合资源的delete接口删除集合资源时,还需要递归删除集合资源中的引用资源。假设通过某一资源的create接口创建了集合资源A,且集合资源A包含delete接口和create接口,然后,通过集合资源A的create接口创建了集合资源B,则集合资源A包含了集合资源B,接着,通过集合资源C的linkadd接口将集合资源B引用到集合资源C,则集合资源C也包含了集合资源B,此时,客户端通过集合资源A的delete接口删除集合资源A,若在删除集合资源A的同时,将通过集合资源A的create接口创建的集合资源B一并删除,很显然会直接影响集合资源C的使用,从而对物联网设备的管理和物联网系统的正常运行造成影响。In one example, to delete a non-collection resource, you can delete it directly through the delete interface of the non-collection resource. However, for a collection resource, since the collection resource includes at least one reference resource, when the collection resource is deleted through the delete interface of the collection resource , Also need to recursively delete the reference resources in the collection resources. Suppose that a collection resource A is created through the create interface of a certain resource, and the collection resource A contains the delete interface and the create interface. Then, the collection resource B is created through the create interface of the collection resource A, then the collection resource A contains the collection resource B, Then, the collection resource B is referenced to the collection resource C through the linkadd interface of the collection resource C, and the collection resource C also contains the collection resource B. At this time, the client deletes the collection resource A through the delete interface of the collection resource A. If it is deleting When collecting resource A, delete the collection resource B created through the create interface of the collection resource A. Obviously, it will directly affect the use of the collection resource C, which will affect the management of IoT devices and the normal operation of the IoT system. .
在本申请实施例提供的技术方案中,通过delete接口删除集合资源时,先获取集合资源的引用资源,然后在引用资源满足设定条件的情况下,删除该集合资源以及该引用资源,其中,该设定条件包括该引用资源没有被除了该集合资源之外的其它资源引用。本申请实施例通过在删除集合资源时,充分考虑该集合资源的引用资源的特点,使得通过delete接口在删除该集合资源时,不会影响除该集合资源之外的其它资源的使用,从而解决上述问题,避免了因误删除引用资源而导致对其它资源产生影响,确保了物联网系统的正常可靠运行。In the technical solution provided by the embodiment of the present application, when deleting a collection resource through the delete interface, the reference resource of the collection resource is first obtained, and then the collection resource and the reference resource are deleted when the reference resource meets the set conditions, where: The setting condition includes that the reference resource is not referenced by other resources except the collection resource. The embodiment of the present application fully considers the characteristics of the reference resource of the collection resource when deleting the collection resource, so that when the collection resource is deleted through the delete interface, the use of resources other than the collection resource will not be affected, thereby solving the problem. The above problems avoid the impact on other resources due to the accidental deletion of reference resources, and ensure the normal and reliable operation of the Internet of Things system.
下面,将通过几个实施例,对本申请技术方案进行介绍说明。Hereinafter, the technical solution of the present application will be introduced and explained through several embodiments.
请参考图1,其示出了本申请一个实施例提供的实施环境的示意图,该实施环境可以包括:终端设备11、第一物联网设备12和第二物联网设备13。该实施环境可以是一个物联网系统。Please refer to FIG. 1, which shows a schematic diagram of an implementation environment provided by an embodiment of the present application. The implementation environment may include: a terminal device 11, a first Internet of Things device 12, and a second Internet of Things device 13. The implementation environment may be an Internet of Things system.
终端设备11可以包括各种具有无线通信功能的手持设备(如手机、平板电脑等)、车载设备、可穿戴设备、计算设备或连接到无线调制解调器的其它处理设备,以及各种形式的用户设备(User Equipment,UE),移动台(Mobile Station,MS)等等。为方便描述,本申请实施例中,上面提到的设备统称为终端。The terminal device 11 may include various handheld devices (such as mobile phones, tablet computers, etc.) with wireless communication functions, in-vehicle devices, wearable devices, computing devices or other processing devices connected to wireless modems, as well as various forms of user equipment ( User Equipment, UE), Mobile Station (MS), etc. For ease of description, in the embodiments of the present application, the devices mentioned above are collectively referred to as terminals.
第一物联网设备12中可以保存有集合资源,也可以保存有非集合资源。在第一物联网设备12中保存有集合资源的情况下,该集合资源中包含了第二物联网设备13上保存的引用资源的链接(link)。在不同的应用场景中,第一物联网设备12的具体实现形式也可能有所不同。例如,在家庭物联网系统中,第一物联网设备12可以是路由器;又例如,在基于云平台的物联网系统中,第一物联网设备12可以是云端的服务器。在本申请实施例中,对第一物联网设备12的具体表现形式不作限定,任何保存有集合资源和/或非集合资源的设备均可以作为第一物联网设备12。Collective resources or non-collective resources can be stored in the first Internet of Things device 12. In the case where a collective resource is stored in the first Internet of Things device 12, the collective resource includes a link to the reference resource stored on the second Internet of Things device 13. In different application scenarios, the specific implementation form of the first Internet of Things device 12 may also be different. For example, in a home Internet of Things system, the first Internet of Things device 12 may be a router; for another example, in a cloud platform-based Internet of Things system, the first Internet of Things device 12 may be a server in the cloud. In the embodiment of the present application, the specific manifestation of the first Internet of Things device 12 is not limited, and any device that stores collective resources and/or non-collective resources can be used as the first Internet of Things device 12.
第二物联网设备13中可以保存有引用资源。一个集合资源中可以包括一个或者多个引用资源,该引用资源可以是集合资源,也可以是非集合资源。第二物联网设备13可以是物联网系统中的接入设备,如终端设备、智能家居设备、或者其它具备网络接入能力的设备,本申请实施例对此不作限定。Reference resources may be stored in the second Internet of Things device 13. A collection resource can include one or more reference resources, and the reference resource can be a collection resource or a non-collection resource. The second Internet of Things device 13 may be an access device in the Internet of Things system, such as a terminal device, a smart home device, or other devices with network access capabilities, which are not limited in the embodiment of the present application.
终端设备11可以通过无线或者有线网络与第一物联网设备12进行通信,第一物联网设备12也可以通过无线或者有线网络与第二物联网设备13进行通信。此外,第一物联网设备 12的数量可以是一个,也可以是多个;第二物联网设备13的数量可以是一个,也可以是多个。The terminal device 11 may communicate with the first Internet of Things device 12 through a wireless or wired network, and the first Internet of Things device 12 may also communicate with the second Internet of Things device 13 through a wireless or wired network. In addition, the number of the first Internet of Things device 12 may be one or more; the number of the second Internet of Things device 13 may be one or more.
需要说明的一点是,引用资源有可能与集合资源在同一台物联网设备上,也有可能不在同一台物联网设备上,且引用资源可能是集合资源,也可能是非集合资源。也即,上述第一物联网设备12与第二物联网设备13可以是同一台物联网设备,也可以两台不同的物联网设备。但不论第一物联网设备12和第二物联网设备13是同一台物联网设备,还是两台不同的物联网设备,均适用于本申请实施例提供的下述方法流程。One thing to note is that the referenced resource may be on the same IoT device as the collective resource, or it may not be on the same IoT device, and the referenced resource may be a collective resource or a non-collective resource. That is, the first Internet of Things device 12 and the second Internet of Things device 13 may be the same Internet of Things device, or two different Internet of Things devices. However, regardless of whether the first Internet of Things device 12 and the second Internet of Things device 13 are the same Internet of Things device or two different Internet of Things devices, the following method procedures provided in the embodiments of the present application are applicable.
在一个示例中,以家庭物联网系统为例,终端设备11可以是用户使用的手机,第一物联网设备12可以是路由器,第二物联网设备13可以是智能电视、智能音箱、智能空调、智能电灯、智能门窗、智能窗帘、智能插座等智能家居设备。可选地,终端设备11中可以安装运行有客户端(client),该客户端能够向第一物联网设备12发起资源删除请求,如对集合资源的删除请求,或者对非集合资源的删除请求。在第一物联网设备12中保存的是非集合资源的情况下,第一物联网设备12接收到资源删除请求后,可以对该非集合资源直接进行删除。在第一物联网设备12中保存的是集合资源的情况下,第一物联网设备12接收到资源删除请求后,可以对该集合资源,以及第二物联网设备13中保存的引用资源进行删除处理,具体的删除过程,请参见下述方法示例,此处不再赘述。In an example, taking a home Internet of Things system as an example, the terminal device 11 may be a mobile phone used by the user, the first Internet of Things device 12 may be a router, and the second Internet of Things device 13 may be a smart TV, a smart speaker, a smart air conditioner, Smart home appliances such as smart lights, smart doors and windows, smart curtains, smart sockets, etc. Optionally, a client can be installed and running in the terminal device 11, and the client can initiate a resource deletion request to the first Internet of Things device 12, such as a deletion request for a collective resource or a deletion request for a non-collective resource . In the case where the first Internet of Things device 12 stores non-collective resources, after receiving the resource deletion request, the first Internet of Things device 12 can directly delete the non-collective resources. In the case that the first Internet of Things device 12 saves a collective resource, after the first Internet of Things device 12 receives the resource deletion request, it can delete the collective resource and the reference resource saved in the second Internet of Things device 13 For the specific deletion process, please refer to the following method example, which will not be repeated here.
请参考图2,其示出了本申请一个实施例提供的资源删除方法的流程图,该方法可以应用于图1所示的实施环境中。该方法可以包括如下几个步骤(210~230):Please refer to FIG. 2, which shows a flowchart of a resource deletion method provided by an embodiment of the present application. The method can be applied to the implementation environment shown in FIG. 1. The method can include the following steps (210-230):
步骤210,物联网设备确定待删除的目标资源。Step 210: The Internet of Things device determines the target resource to be deleted.
目标资源是指待删除的资源,该目标资源可以是集合资源,也可以是非集合资源;该目标资源的数量可以是一个,也可以是多个,本申请实施例对目标资源的具体数量和资源类型均不作限定。本申请实施例中,可以由物联网设备确定待删除的目标资源。可选地,物联网设备可以根据终端设备的请求确定待删除的目标资源,例如,物联网设备接收到终端设备的资源删除请求,根据该资源删除请求确定待删除的目标资源;物联网设备还可以根据其管理的资源的状态,自行确定待删除的目标资源,例如,物联网设备根据其管理的资源的状态,确定最近48小时内未使用的资源为待删除的目标资源,本申请实施例对物联网设备确定目标资源的具体方式不作限定,实际应用中,物联网设备既可以单独采用上述两种可选方式中一种可选方式确定目标资源,也可以结合使用上述两种可选方式确定目标资源,还可以采用其它方式确定目标资源。本申请实施例通过提供多种方式确定目标资源,可以提升物联网设备确定目标资源的灵活性,提升资源管理效率。The target resource refers to the resource to be deleted. The target resource can be a collective resource or a non-collective resource; the number of the target resource can be one or more. The types are not limited. In the embodiment of the present application, the target resource to be deleted may be determined by the Internet of Things device. Optionally, the Internet of Things device can determine the target resource to be deleted according to the request of the terminal device. For example, the Internet of Things device receives a resource deletion request from the terminal device, and determines the target resource to be deleted according to the resource deletion request; the Internet of Things device also The target resource to be deleted can be determined by oneself according to the state of the resource managed by it. For example, the Internet of Things device determines the resource that has not been used in the last 48 hours as the target resource to be deleted according to the state of the resource managed by it. This embodiment of the application There is no restriction on the specific method for the IoT device to determine the target resource. In actual applications, the IoT device can either use one of the two optional methods to determine the target resource alone, or use a combination of the two optional methods. To determine the target resource, other methods can also be used to determine the target resource. The embodiments of the present application provide multiple ways to determine the target resource, which can improve the flexibility of the IoT device in determining the target resource and improve the efficiency of resource management.
在一个示例中,如图3所示,上述方法还包括如下几个步骤(212~214):In an example, as shown in Figure 3, the above method further includes the following steps (212-214):
步骤212,终端设备向物联网设备发送资源删除请求。Step 212: The terminal device sends a resource deletion request to the Internet of Things device.
资源删除请求用于请求删除目标资源,可选地,为了使得物联网设备便捷快速地掌握待删除的目标资源,终端设备发送的资源删除请求中可以包括目标资源的资源标识,从而物联网设备接收到资源删除请求后,解析该资源删除请求,即可获取待删除的目标资源的信息。The resource deletion request is used to request the deletion of the target resource. Optionally, in order for the IoT device to quickly and easily grasp the target resource to be deleted, the resource deletion request sent by the terminal device may include the resource identifier of the target resource, so that the IoT device receives After the resource deletion request is received, the resource deletion request can be parsed to obtain the information of the target resource to be deleted.
步骤214,在资源删除请求满足第三条件的情况下,物联网设备执行删除目标资源的步骤。Step 214: When the resource deletion request satisfies the third condition, the Internet of Things device executes the step of deleting the target resource.
本申请实施例中,物联网设备接收到资源删除请求后,可以对该资源删除请求进行检测,以确定请求方是否可以对目标资源进行删除。可选地,物联网设备可以通过检测资源删除请 求是否满足第三条件,在资源删除请求满足第三条件的情况下,执行删除目标资源的步骤。其中,第三条件是用于确定请求方可以对目标资源进行删除的条件,可选地,第三条件包括但不限于:目标资源支持删除接口,以及请求方具备删除目标资源的权限。其中,请求方是指发送资源删除请求的一方,例如,请求方可以是上述实施环境实施例中介绍的终端设备。本申请实施例对第三条件的确定方式不作限定,可选地,第三条件可以由协议预先规定,也可以由物联网设备根据资源状况和实际安全需求等具体确定。In the embodiment of the present application, after the Internet of Things device receives the resource deletion request, it can detect the resource deletion request to determine whether the requesting party can delete the target resource. Optionally, the IoT device may detect whether the resource deletion request meets the third condition, and if the resource deletion request meets the third condition, execute the step of deleting the target resource. The third condition is a condition for determining that the requester can delete the target resource. Optionally, the third condition includes but is not limited to: the target resource supports a deletion interface, and the requester has the right to delete the target resource. The requesting party refers to the party that sends the resource deletion request. For example, the requesting party may be the terminal device introduced in the foregoing implementation environment embodiment. The embodiment of the present application does not limit the method for determining the third condition. Optionally, the third condition may be pre-defined by an agreement, or may be specifically determined by the Internet of Things device according to resource conditions and actual security requirements.
在目标资源是集合资源的情况下,物联网设备确定资源删除请求满足第三条件的情况下,可以执行删除目标资源的步骤,但是由于集合资源包含至少一个引用资源,为了进行更加详实和充分的考虑,需要对目标资源的引用资源进行进一步的分析处理,进而物联网设备可以执行步骤210及之后的步骤,以对目标资源的引用资源进行删除处理。本申请实施例对步骤210与步骤214的执行顺序不作限定,步骤210可以与步骤214同时执行,也可以在步骤214之前执行,还可以在步骤214之后执行。In the case that the target resource is a collective resource, and the IoT device determines that the resource deletion request satisfies the third condition, it can execute the step of deleting the target resource. However, since the collective resource contains at least one reference resource, in order to make a more detailed and sufficient Considering that it is necessary to perform further analysis and processing on the referenced resource of the target resource, and then the Internet of Things device may perform step 210 and subsequent steps to delete the referenced resource of the target resource. The embodiment of the present application does not limit the execution order of step 210 and step 214. Step 210 may be executed simultaneously with step 214, may also be executed before step 214, or may be executed after step 214.
步骤220,在目标资源是集合资源的情况下,物联网设备获取第一引用资源。Step 220: In a case where the target resource is a collective resource, the Internet of Things device obtains the first reference resource.
本申请实施例中,物联网设备确定待删除的目标资源之后,或者物联网设备确定待删除的目标资源的同时,可以确定该目标资源是否为集合资源,本申请实施例对物联网设备确定目标资源是否为集合资源的具体时机不作限定。可选地,在确定目标资源为非集合资源的情况下,物联网设备可以删除目标资源,同时也就删除了该目标资源的资源属性。可选地,在该目标资源被其它资源引用的情况下,物联网设备在删除该目标资源的同时,也就删除了该目标资源的资源属性中包含的该目标资源的引用关系。在确定目标资源为集合资源的情况下,由于集合资源包含至少一个引用资源,为了对目标资源的引用资源进行全面的分析,以避免后续删除目标资源时对目标资源之外的其它资源造成影响,物联网设备可以先获取第一引用资源。其中,目标资源可以包含至少一个引用资源,本申请实施例仅以第一引用资源为例进行举例说明,第一引用资源可以是目标资源的任意一个引用资源,目标资源的其它引用资源的删除步骤,可以参照第一引用资源的删除步骤类推得到。可选地,第一引用资源可以是集合资源,也可以是非集合资源,本申请实施例对第一引用资源的资源类型不作限定。In the embodiment of this application, after the Internet of Things device determines the target resource to be deleted, or the Internet of Things device determines the target resource to be deleted, it can determine whether the target resource is a collective resource. The embodiment of this application determines the target for the Internet of Things device. The specific timing of whether the resource is a collective resource is not limited. Optionally, in the case where it is determined that the target resource is a non-collective resource, the IoT device may delete the target resource, and at the same time also delete the resource attribute of the target resource. Optionally, when the target resource is referenced by other resources, when the IoT device deletes the target resource, it also deletes the reference relationship of the target resource included in the resource attribute of the target resource. In the case of determining that the target resource is a collective resource, since the collective resource contains at least one reference resource, in order to conduct a comprehensive analysis of the reference resource of the target resource, so as to avoid the subsequent deletion of the target resource from affecting other resources other than the target resource. The IoT device can first obtain the first reference resource. Wherein, the target resource may include at least one reference resource. The embodiment of the present application only takes the first reference resource as an example for illustration. The first reference resource may be any reference resource of the target resource. Steps for deleting other reference resources of the target resource , Can be deduced by referring to the deletion steps of the first referenced resource. Optionally, the first reference resource may be a collective resource or a non-collective resource. The embodiment of the present application does not limit the resource type of the first reference resource.
步骤230,在第一引用资源满足第一条件的情况下,物联网设备删除目标资源以及第一引用资源。Step 230: When the first reference resource meets the first condition, the Internet of Things device deletes the target resource and the first reference resource.
物联网设备获取到第一引用资源后,可以对该第一引用资源进行检测,以确定删除第一引用资源是否会对除目标资源之外的其它资源产生影响。可选地,物联网设备可以通过检测第一引用资源是否满足第一条件,在第一引用资源满足第一条件的情况下,确定删除该第一引用资源不会对除目标资源之外的其它资源产生影响,从而物联网设备可以删除目标资源以及第一引用资源。可选地,第一条件包括第一引用资源未被除目标资源之外的其它资源所引用。如果第一引用资源被除目标资源之外的其它资源所引用,那么说明删除该第一引用资源会对其它资源的正常使用造成影响。可选地,为了更加可靠准确地确定第一引用资源是否可以删除,以及删除该第一引用资源是否会对其它资源的使用造成影响,第一条件还包括以下至少一项:第一引用资源支持删除接口、请求方具备删除第一引用资源的权限、第一引用资源是通过目标资源的创建接口创建的。其中,请求方是指发送资源删除请求的一方。本申请实施例对第一条件的确定方式不作限定,可选地,第一条件可以由协议预先规定,也可以由物联网设备根据资源状况和实际安全需求等具体确定。After the Internet of Things device obtains the first reference resource, it can detect the first reference resource to determine whether deleting the first reference resource will affect other resources except the target resource. Optionally, the Internet of Things device may detect whether the first referenced resource meets the first condition, and in the case that the first referenced resource meets the first condition, it is determined that deleting the first referenced resource will not affect other resources except the target resource. The resource has an impact, so that the IoT device can delete the target resource and the first referenced resource. Optionally, the first condition includes that the first referenced resource is not referenced by other resources except the target resource. If the first referenced resource is referenced by other resources except the target resource, it means that deleting the first referenced resource will affect the normal use of other resources. Optionally, in order to more reliably and accurately determine whether the first referenced resource can be deleted, and whether deleting the first referenced resource will affect the use of other resources, the first condition further includes at least one of the following: the first referenced resource supports To delete the interface, the requesting party has the right to delete the first referenced resource, and the first referenced resource is created through the creation interface of the target resource. Among them, the requesting party refers to the party that sends the resource deletion request. The embodiment of the present application does not limit the method for determining the first condition. Optionally, the first condition may be pre-defined by an agreement, or may be specifically determined by the Internet of Things device according to resource conditions and actual security requirements.
示例性地,为了提供一种具体确定第一条件是否满足的方式,上述步骤220之后,还包 括:物联网设备检测第一引用资源是否支持删除接口;在第一引用资源支持删除接口的情况下,物联网设备检测请求方是否具备删除第一引用资源的权限;在请求方具备删除第一引用资源的权限的情况下,物联网设备检测第一引用资源是否被除目标资源之外的其它资源所引用;在第一引用资源未被除目标资源之外的其它资源所引用的情况下,物联网设备检测第一引用资源是否是通过目标资源的创建接口创建的;在第一引用资源是通过目标资源的创建接口创建的情况下,确定第一引用资源满足第一条件。需要说明的一点是,此示例性实施例仅示出了一种可能的检测第一引用资源是否满足第一条件的顺序,本领域技术人员在了解了本申请实施例的技术方案后,将很容易想到其它检测第一引用资源是否满足第一条件的顺序,以及第一条件中还可以包括的其它内容,但均应属于本申请的保护范围之内。Exemplarily, in order to provide a specific way to determine whether the first condition is met, after the above step 220, the method further includes: the Internet of Things device detects whether the first referenced resource supports the deletion interface; in the case that the first referenced resource supports the deletion interface , The Internet of Things device detects whether the requesting party has the right to delete the first referenced resource; in the case that the requesting party has the right to delete the first referenced resource, the Internet of Things device detects whether the first referenced resource is a resource other than the target resource When the first referenced resource is not referenced by other resources except the target resource, the IoT device detects whether the first referenced resource is created through the creation interface of the target resource; the first referenced resource is passed When the creation interface of the target resource is created, it is determined that the first reference resource satisfies the first condition. It should be noted that this exemplary embodiment only shows a possible sequence of detecting whether the first referenced resource meets the first condition. Those skilled in the art will understand the technical solutions of the embodiments of the present application. It is easy to think of other procedures for detecting whether the first referenced resource meets the first condition, and other content that can be included in the first condition, but they should all fall within the protection scope of the present application.
本申请实施例中,在第一引用资源满足第一条件的情况下,物联网设备即执行删除目标资源以及第一引用资源的步骤。物联网设备删除目标资源时,也就删除了目标资源的资源属性,可选地,在目标资源被其它资源引用的情况下,物联网设备删除目标资源的同时,也就删除了目标资源的资源属性中包含的目标资源的引用关系;物联网设备删除第一引用资源时,也就删除了第一引用资源的资源属性,以及目标资源的资源属性中包含的目标资源与第一引用资源之间的引用关系。其中,目标资源的引用关系包括目标资源与第一引用资源之间的引用关系。可选地,物联网设备既可以同时删除目标资源和第一引用资源;也可以先删除第一引用资源,然后再删除目标资源;还可以先删除目标资源,再删除第一引用资源,本申请实施例对物联网设备删除第一引用资源和删除目标资源的先后顺序不作限定。例如,物联网设备可以在确定资源删除请求满足第三条件的情况下,对目标资源进行删除,然后再确定第一引用资源是否满足第一条件,在第一引用资源满足第一条件的情况下,删除第一引用资源。In the embodiment of the present application, when the first referenced resource meets the first condition, the IoT device executes the steps of deleting the target resource and the first referenced resource. When the IoT device deletes the target resource, the resource attribute of the target resource is also deleted. Optionally, when the target resource is referenced by other resources, the IoT device deletes the target resource at the same time as the resource of the target resource. The reference relationship of the target resource contained in the attribute; when the IoT device deletes the first reference resource, the resource attribute of the first reference resource is also deleted, and the target resource contained in the resource attribute of the target resource and the first reference resource are also deleted Reference relationship. Wherein, the reference relationship of the target resource includes the reference relationship between the target resource and the first reference resource. Optionally, the IoT device can delete the target resource and the first reference resource at the same time; it can also delete the first reference resource first, and then delete the target resource; it can also delete the target resource first, and then delete the first reference resource. This application The embodiment does not limit the sequence of deleting the first reference resource and deleting the target resource by the IoT device. For example, the Internet of Things device may delete the target resource when it is determined that the resource deletion request satisfies the third condition, and then determine whether the first referenced resource satisfies the first condition, and when the first referenced resource satisfies the first condition , Delete the first reference resource.
可选地,如图4所示,为确保删除目标资源不会对除目标资源之外的其它资源产生影响,上述步骤220之后,还包括步骤232:在第一引用资源不满足第一条件的情况下,物联网设备删除目标资源,且保留第一引用资源不删除。本申请实施例中,第一引用资源不满足第一条件,即表示删除第一引用资源,会对除目标资源之外的其它资源也产生影响,此时,物联网设备执行删除目标资源,且保留第一引用资源不删除的步骤,即物联网设备删除目标资源,且同时也就删除了目标资源与第一引用资源之间的引用关系,但是由于物联网设备保留第一引用资源不删除,从而不会对目标资源之外的其它资源产生影响,如不会对其它引用第一引用资源的集合资源产生影响。Optionally, as shown in FIG. 4, in order to ensure that deleting the target resource will not affect other resources except the target resource, after the above step 220, it further includes step 232: when the first referenced resource does not meet the first condition In this case, the IoT device deletes the target resource, and keeps the first reference resource without deleting. In the embodiment of the present application, the first referenced resource does not meet the first condition, which means that deleting the first referenced resource will also affect other resources except the target resource. At this time, the IoT device deletes the target resource, and The step of keeping the first reference resource without deleting, that is, the IoT device deletes the target resource, and at the same time also deletes the reference relationship between the target resource and the first reference resource, but because the IoT device retains the first reference resource and does not delete it, Therefore, it will not affect other resources other than the target resource, for example, it will not affect other collective resources that reference the first referenced resource.
在一个示例中,如图5所示,上述方法还包括如下几个步骤(240~250):In an example, as shown in Figure 5, the above method further includes the following steps (240-250):
步骤240,在确定删除第一引用资源,且第一引用资源是集合资源的情况下,获取第二引用资源。Step 240: In the case where it is determined to delete the first reference resource, and the first reference resource is a collective resource, acquire the second reference resource.
由于实际应用中可能会出现某一集合资源的引用资源仍然是集合资源的情况,本申请实施例针对这一情况,提供了相应的资源删除方法。物联网设备在确定目标资源为集合资源,目标资源的引用资源(即第一引用资源)也是集合资源,且确定删除目标资源的引用资源(即第一引用资源)的情况下,获取第二引用资源,其中,第二引用资源是第一引用资源的引用资源。Since there may be a situation in which the referenced resource of a certain collective resource is still a collective resource in practical applications, the embodiment of the present application provides a corresponding resource deletion method in response to this situation. When the IoT device determines that the target resource is a collective resource, the reference resource of the target resource (ie the first reference resource) is also a collective resource, and it is determined to delete the reference resource of the target resource (ie the first reference resource), obtain the second reference Resources, where the second reference resource is a reference resource of the first reference resource.
需要说明的一点是,当第一引用资源为集合资源时,第一引用资源可以包括一个或多个引用资源,第二引用资源可以是第一引用资源的任意一个引用资源,本申请实施例仅以第二引用资源的删除步骤为例进行举例说明,第一引用资源的其它引用资源的删除步骤可以参照第二引用资源的删除步骤类推得到。It should be noted that when the first referenced resource is a collection resource, the first referenced resource may include one or more referenced resources, and the second referenced resource may be any referenced resource of the first referenced resource. The embodiments of this application only Taking the step of deleting the second referenced resource as an example for illustration, the steps of deleting other referenced resources of the first referenced resource can be derived by analogy with reference to the deleting step of the second referenced resource.
步骤250,在第二引用资源满足第二条件的情况下,删除第二引用资源。Step 250: When the second reference resource meets the second condition, delete the second reference resource.
物联网设备获取到第二引用资源后,可以对第二引用资源进行检测,以确定删除第二引用资源是否会对第一引用资源之外的其它资源产生影响。可选地,物联网设备可以通过检测第二引用资源是否满足第二条件,在第二引用资源满足第二条件的情况下,确定删除第二引用资源不会对除第一引用资源之外的其它资源产生影响,从而物联网设备可以删除第二引用资源。可选地,第二条件包括第二引用资源未被除第一引用资源之外的其它资源所引用。如果第二引用资源被除第一引用资源之外的其它资源所引用,那么说明删除第二引用资源会对其它资源的正常使用造成影响。可选地,为了更加可靠准确地确定第二引用资源是否可以删除,以及删除该第二引用资源是否会对其它资源的使用造成影响,第二条件还包括以下至少一项:第二引用资源支持删除接口、请求方具备删除第二引用资源的权限、第二引用资源是通过第一引用资源的创建接口创建的。即,第二条件与上述第一条件的实质内容可以是相同的,区别仅在于第一条件用于确定删除第一引用资源不会对除目标资源之外的其它资源产生影响,第二条件用于确定删除第二引用资源不会对除第一引用资源之外的其它资源产生影响。可选地,第二条件与第一条件的实质内容也可以不相同,例如,第二条件可以仅包括第二引用资源未被除第一引用资源之外的其它资源所引用,本申请实施例对第二条件的具体内容,以及第二条件与第一条件之间的关系均不作限定。可选地,第二条件可以由协议预先规定,也可以由物联网设备根据资源状况和实际安全需求等具体确定。After the Internet of Things device obtains the second referenced resource, it can detect the second referenced resource to determine whether deleting the second referenced resource will affect other resources other than the first referenced resource. Optionally, the Internet of Things device may detect whether the second referenced resource meets the second condition, and in the case that the second referenced resource meets the second condition, it is determined that deleting the second referenced resource will not affect any other than the first referenced resource. Other resources have an impact, so that the IoT device can delete the second reference resource. Optionally, the second condition includes that the second referenced resource is not referenced by other resources except the first referenced resource. If the second referenced resource is referenced by other resources except the first referenced resource, it means that deleting the second referenced resource will affect the normal use of other resources. Optionally, in order to more reliably and accurately determine whether the second referenced resource can be deleted, and whether the deletion of the second referenced resource will affect the use of other resources, the second condition further includes at least one of the following: Support for the second referenced resource To delete the interface, the requesting party has the right to delete the second reference resource, and the second reference resource is created through the creation interface of the first reference resource. That is, the substance of the second condition can be the same as that of the first condition. The only difference is that the first condition is used to determine that deleting the first referenced resource will not affect other resources except the target resource. The second condition is used It is determined that deleting the second referenced resource will not affect other resources except the first referenced resource. Optionally, the substance of the second condition and the first condition may also be different. For example, the second condition may only include that the second referenced resource is not referenced by other resources other than the first referenced resource. This embodiment of the present application The specific content of the second condition and the relationship between the second condition and the first condition are not limited. Optionally, the second condition may be pre-defined by an agreement, or may be specifically determined by the Internet of Things device according to resource conditions and actual security requirements.
可选地,如图5所示,为进一步确保删除第二引用资源不会对除第一引用资源之外的其它资源产生影响,上述步骤240之后,还包括步骤252:在第二引用资源不满足第二条件的情况下,物联网设备删除第一引用资源,且保留第二引用资源不删除。即,物联网设备删除第一引用资源,也就删除了第一引用资源与第二引用资源之间的引用关系,但是由于物联网设备保留第二引用资源不删除,从而不会对第一引用资源之外的其它资源产生影响,如不会对其它引用第二引用资源的集合资源产生影响。Optionally, as shown in FIG. 5, in order to further ensure that deleting the second referenced resource will not affect other resources except the first referenced resource, after the above step 240, it further includes step 252: when the second referenced resource is not When the second condition is met, the IoT device deletes the first referenced resource, and keeps the second referenced resource without deleting. That is, when the IoT device deletes the first reference resource, the reference relationship between the first reference resource and the second reference resource is also deleted, but because the IoT device retains the second reference resource and does not delete it, it will not reference the first reference resource. Resources other than the resource have an impact, such as no impact on other collective resources that reference the second referenced resource.
需要说明的一点是,本领域技术人员在了解了本申请的技术方案后,将容易想到当物联网设备确定删除第二引用资源,且第二引用资源也是集合资源的情况下,执行的资源删除步骤,其可以由第一引用资源是集合资源时,物联网设备执行的步骤类推得到,本申请实施例在此不多赘述。It should be noted that after understanding the technical solutions of the present application, those skilled in the art will easily think of the resource deletion performed when the IoT device determines to delete the second referenced resource, and the second referenced resource is also a collective resource The steps, which can be derived by analogy from the steps performed by the Internet of Things device when the first reference resource is a collective resource, and will not be repeated here in the embodiment of the present application.
综上所述,本申请实施例提供的技术方案,在确定待删除的目标资源,且该目标资源是集合资源的情况下,通过获取该目标资源的引用资源,在确定该引用资源满足条件的情况下,再删除该引用资源;相比于相关技术在删除集合资源时,一并将该集合资源所包括的引用资源都删除,本申请实施例提供的技术方案在删除集合资源时,先对该集合资源所包括的引用资源进行分析处理,在确认该引用资源可以被删除的情况下,才删除该引用资源,从而在资源删除过程中,进行了更加详实和充分的考虑,避免因误删除引用资源而导致对其它资源产生影响,确保了物联网系统的正常可靠运行。In summary, in the technical solution provided by the embodiments of the present application, when the target resource to be deleted is determined, and the target resource is a collective resource, by obtaining the reference resource of the target resource, it is determined that the reference resource satisfies the conditions. In this case, the reference resource is deleted again; compared to when the related technology deletes the collection resource, all the reference resources included in the collection resource are deleted at the same time. The reference resource included in the collection resource is analyzed and processed, and the reference resource is deleted only when it is confirmed that the reference resource can be deleted, so that more detailed and sufficient considerations are made during the resource deletion process to avoid accidental deletion Quoting resources results in an impact on other resources, ensuring the normal and reliable operation of the Internet of Things system.
另外,本申请实施例提供的技术方案,在目标资源的引用资源不满足条件的情况下,删除该目标资源,且保留该引用资源不删除,确保该引用资源与目标资源之外的其它资源有引用关系时,删除目标资源不会对其它资源造成影响,避免因误删除引用资源而导致对其它资源产生影响,确保了物联网系统的正常可靠运行。In addition, in the technical solution provided by the embodiments of the present application, when the referenced resource of the target resource does not meet the conditions, the target resource is deleted, and the referenced resource is retained without deleting, so as to ensure that the referenced resource and other resources other than the target resource are present. When referencing the relationship, deleting the target resource will not affect other resources, avoiding the impact on other resources due to accidental deletion of the reference resource, and ensuring the normal and reliable operation of the IoT system.
另外,本申请实施例提供的技术方案,在第一引用资源的引用资源,即第二引用资源也是集合资源的情况下,若确定删除第一引用资源,物联网设备先对第二引用资源进行检测, 在第二引用资源满足第二条件和不满足第二条件时,分别执行相应的资源删除步骤,从而对属于集合资源的目标资源的引用资源也是集合资源的情况,提供了一种具体的递归删除目标资源的方式。In addition, in the technical solution provided by the embodiments of the present application, in the case that the referenced resource of the first referenced resource, that is, the second referenced resource is also a collective resource, if it is determined to delete the first referenced resource, the Internet of Things device first performs a check on the second referenced resource. It is detected that when the second reference resource meets the second condition and does not meet the second condition, the corresponding resource deletion step is performed respectively, so that the reference resource belonging to the target resource of the collective resource is also a collective resource, which provides a specific The way to delete the target resource recursively.
需要说明的是,在上述方法实施例中,主要从终端设备和物联网设备之间交互的角度,对本申请技术方案进行了介绍说明。上述有关物联网设备执行的步骤,可以单独实现成为物联网设备侧的资源删除方法;上述有关终端设备执行的步骤,可以单独实现成为终端设备侧的资源删除方法。It should be noted that, in the foregoing method embodiments, the technical solution of the present application is introduced and explained mainly from the perspective of interaction between the terminal device and the Internet of Things device. The above-mentioned steps related to the Internet of Things device can be individually implemented as a resource deletion method on the IoT device side; the above-mentioned steps related to the terminal device can be individually implemented as a resource deletion method on the terminal device side.
下述为本申请装置实施例,可以用于执行本申请方法实施例。对于本申请装置实施例中未披露的细节,请参照本申请方法实施例。The following are device embodiments of this application, which can be used to implement the method embodiments of this application. For details that are not disclosed in the device embodiments of this application, please refer to the method embodiments of this application.
请参考图6,其示出了本申请一个实施例提供的资源删除装置的框图。该装置具有实现上述物联网设备侧的方法示例的功能,所述功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。该装置可以是上文介绍的物联网设备,也可以设置在物联网设备中。如图6所示,该装置600可以包括:资源确定模块610、资源获取模块620和资源删除模块630。Please refer to FIG. 6, which shows a block diagram of a resource deletion apparatus provided by an embodiment of the present application. The device has the function of realizing the example of the method on the side of the Internet of Things device, and the function can be realized by hardware, or by hardware executing corresponding software. The device can be the Internet of Things device described above, or it can be set in the Internet of Things device. As shown in FIG. 6, the device 600 may include: a resource determining module 610, a resource acquiring module 620, and a resource deleting module 630.
资源确定模块610,用于确定待删除的目标资源。The resource determining module 610 is used to determine the target resource to be deleted.
资源获取模块620,用于在所述目标资源是集合资源的情况下,获取第一引用资源,所述第一引用资源是所述目标资源的引用资源。The resource obtaining module 620 is configured to obtain a first reference resource when the target resource is a collective resource, and the first reference resource is a reference resource of the target resource.
资源删除模块630,用于在所述第一引用资源满足第一条件的情况下,删除所述目标资源以及所述第一引用资源,所述第一条件包括所述第一引用资源未被除所述目标资源之外的其它资源所引用。The resource deletion module 630 is configured to delete the target resource and the first reference resource when the first reference resource satisfies a first condition, and the first condition includes that the first reference resource is not deleted Referenced by resources other than the target resource.
可选地,所述第一条件还包括以下至少一项:所述第一引用资源支持删除接口、请求方具备删除所述第一引用资源的权限、所述第一引用资源是通过所述目标资源的创建接口创建的。Optionally, the first condition further includes at least one of the following: the first referenced resource supports a deletion interface, the requesting party has the right to delete the first referenced resource, and the first referenced resource is passed through the target Created by the resource creation interface.
可选地,如图7所示,所述装置600还包括资源检测模块640,用于:检测所述第一引用资源是否支持所述删除接口;在所述第一引用资源支持所述删除接口的情况下,检测所述请求方是否具备删除所述第一引用资源的权限;在所述请求方具备删除所述第一引用资源的权限的情况下,检测所述第一引用资源是否被除所述目标资源之外的其它资源所引用;在所述第一引用资源未被除所述目标资源之外的其它资源所引用的情况下,检测所述第一引用资源是否是通过所述目标资源的创建接口创建的;在所述第一引用资源是通过所述目标资源的创建接口创建的情况下,确定所述第一引用资源满足所述第一条件。Optionally, as shown in FIG. 7, the device 600 further includes a resource detection module 640, configured to: detect whether the first reference resource supports the deletion interface; when the first reference resource supports the deletion interface In the case of detecting whether the requesting party has the right to delete the first referenced resource; in the case that the requesting party has the right to delete the first referenced resource, detecting whether the first referenced resource is deleted Is referenced by resources other than the target resource; in the case that the first referenced resource is not referenced by other resources except the target resource, it is detected whether the first referenced resource passes the target The creation interface of the resource is created; in the case that the first reference resource is created through the creation interface of the target resource, it is determined that the first reference resource satisfies the first condition.
可选地,所述资源删除模块,还用于在所述第一引用资源不满足所述第一条件的情况下,删除所述目标资源,且保留所述第一引用资源不删除。Optionally, the resource deletion module is further configured to delete the target resource when the first reference resource does not meet the first condition, and reserve the first reference resource without deleting.
可选地,所述资源删除模块630,还用于在确定删除所述第一引用资源,且所述第一引用资源是集合资源的情况下,获取第二引用资源,所述第二引用资源是所述第一引用资源的引用资源;所述资源删除模块630,还用于在所述第二引用资源满足第二条件的情况下,删除所述第二引用资源,所述第二条件包括所述第二引用资源未被除所述第一引用资源之外的其它资源所引用。Optionally, the resource deletion module 630 is further configured to obtain a second reference resource when it is determined to delete the first reference resource and the first reference resource is a collective resource. Is the reference resource of the first reference resource; the resource deletion module 630 is further configured to delete the second reference resource when the second reference resource satisfies a second condition, and the second condition includes The second referenced resource is not referenced by other resources except the first referenced resource.
可选地,如图7所示,所述装置600还包括:请求接收模块650,用于接收资源删除请求,所述资源删除请求用于请求删除所述目标资源;所述资源删除模块630,还用于在所述 资源删除请求满足第三条件的情况下,执行所述删除所述目标资源的步骤;其中,所述第三条件包括所述目标资源支持删除接口、请求方具备删除所述目标资源的权限。Optionally, as shown in FIG. 7, the apparatus 600 further includes: a request receiving module 650, configured to receive a resource deletion request, the resource deletion request being used to request deletion of the target resource; the resource deletion module 630, It is also used to execute the step of deleting the target resource when the resource deletion request satisfies a third condition; wherein, the third condition includes that the target resource supports a deletion interface, and the requesting party has the ability to delete the target resource. The permissions of the target resource.
综上所述,本申请实施例提供的技术方案,在确定待删除的目标资源,且该目标资源是集合资源的情况下,通过获取该目标资源的引用资源,在确定该引用资源满足条件的情况下,再删除该引用资源;相比于相关技术在删除集合资源时,一并将该集合资源所包括的引用资源都删除,本申请实施例提供的技术方案在删除集合资源时,先对该集合资源所包括的引用资源进行分析处理,在确认该引用资源可以被删除的情况下,才删除该引用资源,从而在资源删除过程中,进行了更加详实和充分的考虑,避免因误删除引用资源而导致对其它资源产生影响,确保了物联网系统的正常可靠运行。In summary, in the technical solution provided by the embodiments of the present application, when the target resource to be deleted is determined, and the target resource is a collective resource, by obtaining the reference resource of the target resource, it is determined that the reference resource satisfies the conditions. In this case, the reference resource is deleted again; compared to when the related technology deletes the collection resource, all the reference resources included in the collection resource are deleted at the same time. The reference resource included in the collection resource is analyzed and processed, and the reference resource is deleted only when it is confirmed that the reference resource can be deleted, so that more detailed and sufficient considerations are made during the resource deletion process to avoid accidental deletion Quoting resources results in an impact on other resources, ensuring the normal and reliable operation of the Internet of Things system.
请参考图8,其示出了本申请一个实施例提供的资源删除装置的框图。该装置具有实现上述终端设备侧的方法示例的功能,所述功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。该装置可以是上文介绍的终端设备,也可以设置在终端设备中。如图8所示,该装置800可以包括:请求发送模块810。Please refer to FIG. 8, which shows a block diagram of a resource deletion apparatus provided by an embodiment of the present application. The device has the function of realizing the above-mentioned method example on the terminal device side, and the function can be realized by hardware, or by hardware executing corresponding software. The device can be the terminal device described above, or it can be set in the terminal device. As shown in FIG. 8, the apparatus 800 may include: a request sending module 810.
请求发送模块810,用于向物联网设备发送资源删除请求,所述资源删除请求是所述终端设备请求对所述物联网设备中的目标资源进行删除的请求;其中,在所述目标资源是集合资源,且所述目标资源的第一引用资源满足第一条件的情况下,所述目标资源和所述第一引用资源被删除,所述第一条件包括所述第一引用资源未被除所述目标资源之外的其它资源所引用。The request sending module 810 is configured to send a resource deletion request to the Internet of Things device, where the resource deletion request is a request for the terminal device to delete a target resource in the Internet of Things device; where the target resource is In the case where resources are collected, and the first reference resource of the target resource satisfies a first condition, the target resource and the first reference resource are deleted, and the first condition includes that the first reference resource is not deleted Referenced by resources other than the target resource.
可选地,所述第一条件还包括以下至少一项:所述第一引用资源支持删除接口、请求方具备删除所述第一引用资源的权限、所述第一引用资源是通过所述目标资源的创建接口创建的。Optionally, the first condition further includes at least one of the following: the first referenced resource supports a deletion interface, the requesting party has the right to delete the first referenced resource, and the first referenced resource is passed through the target Created by the resource creation interface.
综上所述,本申请实施例提供的技术方案,通过终端设备向物联网设备发送资源删除请求,在资源删除请求满足第三条件的情况下,物联网设备执行删除目标资源的步骤,从而提供了一种确定目标资源,并且删除目标资源的方式。并且,本申请实施例提供的技术方案中,资源删除请求中可以包括目标资源的资源标识,从而使得物联网设备可以便捷快速地掌握待删除的目标资源,提升资源管理的效率。In summary, the technical solution provided by the embodiments of the present application sends a resource deletion request to the Internet of Things device through a terminal device. When the resource deletion request meets the third condition, the Internet of Things device executes the step of deleting the target resource, thereby providing A way to determine the target resource and delete the target resource. In addition, in the technical solution provided by the embodiments of the present application, the resource deletion request may include the resource identifier of the target resource, so that the IoT device can quickly and easily grasp the target resource to be deleted and improve the efficiency of resource management.
需要说明的一点是,上述实施例提供的装置在实现其功能时,仅以上述各个功能模块的划分进行举例说明,实际应用中,可以根据实际需要而将上述功能分配由不同的功能模块完成,即将设备的内容结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。It should be noted that, when the device provided in the above embodiment realizes its functions, only the division of the above-mentioned functional modules is used as an example for illustration. In actual applications, the above-mentioned functions can be allocated by different functional modules according to actual needs. That is, the content structure of the device is divided into different functional modules to complete all or part of the functions described above.
关于上述实施例中的装置,其中各个模块执行操作的具体方式已经在有关该方法的实施例中进行了详细描述,此处将不做详细阐述说明。Regarding the device in the foregoing embodiment, the specific manner in which each module performs operation has been described in detail in the embodiment of the method, and detailed description will not be given here.
请参考图9,其示出了本申请一个实施例提供的物联网设备90的结构示意图。该物联网设备90可以是上文介绍的第一物联网设备和第二物联网设备。也即,该物联网设备90可以是物联网系统中用于保存集合资源和/或非集合资源的设备,也可以是物联网系统中用于保存引用资源的设备。该物联网设备90可以包括:处理器91、接收器92、发射器93、存储器94和总线95。Please refer to FIG. 9, which shows a schematic structural diagram of an Internet of Things device 90 provided by an embodiment of the present application. The Internet of Things device 90 may be the first Internet of Things device and the second Internet of Things device described above. That is, the Internet of Things device 90 may be a device for storing collective resources and/or non-collective resources in an Internet of Things system, or a device for storing reference resources in an Internet of Things system. The Internet of Things device 90 may include: a processor 91, a receiver 92, a transmitter 93, a memory 94, and a bus 95.
处理器91包括一个或者一个以上处理核心,处理器91通过运行软件程序以及模块,从而执行各种功能应用以及信息处理。The processor 91 includes one or more processing cores, and the processor 91 executes various functional applications and information processing by running software programs and modules.
接收器92和发射器93可以实现为一个收发器96,该收发器96可以是一块通信芯片。The receiver 92 and the transmitter 93 may be implemented as a transceiver 96, and the transceiver 96 may be a communication chip.
存储器94通过总线95与处理器91相连。The memory 94 is connected to the processor 91 through a bus 95.
存储器94可用于存储计算机程序,处理器91用于执行该计算机程序,以实现上述方法实施例中的物联网设备执行的各个步骤。The memory 94 may be used to store a computer program, and the processor 91 is used to execute the computer program to implement each step executed by the Internet of Things device in the foregoing method embodiment.
此外,存储器94可以由任何类型的易失性或非易失性存储设备或者它们的组合实现,易失性或非易失性存储设备包括但不限于:RAM(Random-Access Memory,随机存储器)和ROM(Read-Only Memory,只读存储器)、EPROM(Erasable Programmable Read-Only Memory,可擦写可编程只读存储器)、EEPROM(Electrically Erasable Programmable Read-Only Memory,电可擦写可编程只读存储器)、闪存或其他固态存储其技术,CD-ROM(Compact Disc Read-Only Memory,只读光盘)、DVD(Digital Video Disc,高密度数字视频光盘)或其他光学存储、磁带盒、磁带、磁盘存储或其他磁性存储设备。其中:In addition, the memory 94 may be implemented by any type of volatile or non-volatile storage device or a combination thereof. The volatile or non-volatile storage device includes but is not limited to: RAM (Random-Access Memory, random access memory) And ROM (Read-Only Memory), EPROM (Erasable Programmable Read-Only Memory, Erasable Programmable Read-Only Memory), EEPROM (Electrically Erasable Programmable Read-Only Memory, Electrically Erasable Programmable Read-Only Memory) Memory), flash memory or other solid-state storage technology, CD-ROM (Compact Disc Read-Only Memory), DVD (Digital Video Disc, high-density digital video disc) or other optical storage, tape cartridges, magnetic tapes, disks Storage or other magnetic storage devices. in:
所述处理器91,用于确定待删除的目标资源;在所述目标资源是集合资源的情况下,获取第一引用资源,所述第一引用资源是所述目标资源的引用资源;在所述第一引用资源满足第一条件的情况下,删除所述目标资源以及所述第一引用资源,所述第一条件包括所述第一引用资源未被除所述目标资源之外的其它资源所引用。The processor 91 is configured to determine the target resource to be deleted; when the target resource is a collective resource, obtain a first reference resource, where the first reference resource is a reference resource of the target resource; In the case that the first reference resource satisfies a first condition, the target resource and the first reference resource are deleted, and the first condition includes that the first reference resource is not a resource other than the target resource Cited.
可选地,所述第一条件还包括以下至少一项:所述第一引用资源支持删除接口、请求方具备删除所述第一引用资源的权限、所述第一引用资源是通过所述目标资源的创建接口创建的。Optionally, the first condition further includes at least one of the following: the first referenced resource supports a deletion interface, the requesting party has the right to delete the first referenced resource, and the first referenced resource is passed through the target Created by the resource creation interface.
可选地,所述处理器91,还用于检测所述第一引用资源是否支持所述删除接口;在所述第一引用资源支持所述删除接口的情况下,检测所述请求方是否具备删除所述第一引用资源的权限;在所述请求方具备删除所述第一引用资源的权限的情况下,检测所述第一引用资源是否被除所述目标资源之外的其它资源所引用;在所述第一引用资源未被除所述目标资源之外的其它资源所引用的情况下,检测所述第一引用资源是否是通过所述目标资源的创建接口创建的;在所述第一引用资源是通过所述目标资源的创建接口创建的情况下,确定所述第一引用资源满足所述第一条件。Optionally, the processor 91 is further configured to detect whether the first reference resource supports the deletion interface; in the case that the first reference resource supports the deletion interface, detect whether the requestor has The right to delete the first referenced resource; in the case that the requesting party has the right to delete the first referenced resource, detect whether the first referenced resource is referenced by resources other than the target resource In the case where the first reference resource is not referenced by other resources except the target resource, detecting whether the first reference resource is created through the creation interface of the target resource; in the first In the case that a reference resource is created through the creation interface of the target resource, it is determined that the first reference resource satisfies the first condition.
可选地,所述处理器91,还用于在所述第一引用资源不满足所述第一条件的情况下,删除所述目标资源,且保留所述第一引用资源不删除。Optionally, the processor 91 is further configured to delete the target resource when the first reference resource does not meet the first condition, and reserve the first reference resource without deleting.
可选地,所述处理器91,还用于在确定删除所述第一引用资源,且所述第一引用资源是集合资源的情况下,获取第二引用资源,所述第二引用资源是所述第一引用资源的引用资源;在所述第二引用资源满足第二条件的情况下,删除所述第二引用资源,所述第二条件包括所述第二引用资源未被除所述第一引用资源之外的其它资源所引用。Optionally, the processor 91 is further configured to obtain a second reference resource when it is determined to delete the first reference resource and the first reference resource is a collective resource, where the second reference resource is The reference resource of the first reference resource; when the second reference resource satisfies a second condition, the second reference resource is deleted, and the second condition includes that the second reference resource is not deleted Referenced by resources other than the first referenced resource.
可选地,所述收发器96,用于接收资源删除请求,所述资源删除请求用于请求删除所述目标资源;所述处理器91,还用于在所述资源删除请求满足第三条件的情况下,执行所述删除所述目标资源的步骤;其中,所述第三条件包括所述目标资源支持删除接口、请求方具备删除所述目标资源的权限。Optionally, the transceiver 96 is configured to receive a resource deletion request, where the resource deletion request is used to request deletion of the target resource; the processor 91 is further configured to: In the case of, execute the step of deleting the target resource; wherein, the third condition includes that the target resource supports a deletion interface, and the requesting party has the right to delete the target resource.
请参考图10,其示出了本申请一个实施例提供的终端设备100的结构示意图。该终端设备100可以包括:处理器101、接收器102、发射器103、存储器104和总线105。Please refer to FIG. 10, which shows a schematic structural diagram of a terminal device 100 according to an embodiment of the present application. The terminal device 100 may include: a processor 101, a receiver 102, a transmitter 103, a memory 104, and a bus 105.
处理器101包括一个或者一个以上处理核心,处理器101通过运行软件程序以及模块,从而执行各种功能应用以及信息处理。The processor 101 includes one or more processing cores, and the processor 101 executes various functional applications and information processing by running software programs and modules.
接收器102和发射器103可以实现为一个收发器106,该收发器106可以是一块通信芯片。The receiver 102 and the transmitter 103 may be implemented as a transceiver 106, and the transceiver 106 may be a communication chip.
存储器104通过总线105与处理器101相连。The memory 104 is connected to the processor 101 through a bus 105.
存储器104可用于存储计算机程序,处理器101用于执行该计算机程序,以实现上述方法实施例中的终端设备执行的各个步骤。The memory 104 may be used to store a computer program, and the processor 101 is used to execute the computer program to implement each step executed by the terminal device in the foregoing method embodiment.
此外,存储器104可以由任何类型的易失性或非易失性存储设备或者它们的组合实现,易失性或非易失性存储设备包括但不限于:RAM(Random-Access Memory,随机存储器)和ROM(Read-Only Memory,只读存储器)、EPROM(Erasable Programmable Read-Only Memory,可擦写可编程只读存储器)、EEPROM(Electrically Erasable Programmable Read-Only Memory,电可擦写可编程只读存储器)、闪存或其他固态存储其技术,CD-ROM(Compact Disc Read-Only Memory,只读光盘)、DVD(Digital Video Disc,高密度数字视频光盘)或其他光学存储、磁带盒、磁带、磁盘存储或其他磁性存储设备。其中:In addition, the memory 104 may be implemented by any type of volatile or non-volatile storage device or a combination thereof. The volatile or non-volatile storage device includes but is not limited to: RAM (Random-Access Memory, random access memory) And ROM (Read-Only Memory), EPROM (Erasable Programmable Read-Only Memory, Erasable Programmable Read-Only Memory), EEPROM (Electrically Erasable Programmable Read-Only Memory, Electrically Erasable Programmable Read-Only Memory) Memory), flash memory or other solid-state storage technology, CD-ROM (Compact Disc Read-Only Memory), DVD (Digital Video Disc, high-density digital video disc) or other optical storage, tape cartridges, magnetic tapes, disks Storage or other magnetic storage devices. in:
所述收发器106,用于向物联网设备发送资源删除请求,所述资源删除请求是所述终端设备请求对所述物联网设备中的目标资源进行删除的请求;其中,在所述目标资源是集合资源,且所述目标资源的第一引用资源满足第一条件的情况下,所述目标资源和所述第一引用资源被删除,所述第一条件包括所述第一引用资源未被除所述目标资源之外的其它资源所引用。The transceiver 106 is configured to send a resource deletion request to an Internet of Things device, where the resource deletion request is a request by the terminal device to delete a target resource in the Internet of Things device; wherein, in the target resource Is a collective resource, and the first reference resource of the target resource satisfies the first condition, the target resource and the first reference resource are deleted, and the first condition includes that the first reference resource is not Referenced by resources other than the target resource.
可选地,所述第一条件还包括以下至少一项:所述第一引用资源支持删除接口、请求方具备删除所述第一引用资源的权限、所述第一引用资源是通过所述目标资源的创建接口创建的。Optionally, the first condition further includes at least one of the following: the first referenced resource supports a deletion interface, the requesting party has the right to delete the first referenced resource, and the first referenced resource is passed through the target Created by the resource creation interface.
本申请实施例提供了一种计算机可读存储介质,所述存储介质中存储有计算机程序,所述计算机程序用于被物联网设备的处理器执行,以实现上述物联网设备侧的资源删除方法。The embodiment of the present application provides a computer-readable storage medium in which a computer program is stored, and the computer program is used to be executed by a processor of an Internet of Things device to implement the resource deletion method on the side of the Internet of Things device. .
本申请实施例提供了一种计算机可读存储介质,所述存储介质中存储有计算机程序,所述计算机程序用于被终端设备的处理器执行,以实现上述终端设备侧的资源删除方法。The embodiment of the present application provides a computer-readable storage medium in which a computer program is stored, and the computer program is used to be executed by a processor of a terminal device to implement the foregoing resource deletion method on the terminal device side.
本申请实施例提供了一种芯片,所述芯片包括可编程逻辑电路和/或程序指令,当所述芯片在物联网设备上运行时,用于实现如上述物联网设备侧的资源删除方法。The embodiment of the present application provides a chip that includes a programmable logic circuit and/or program instructions, and when the chip runs on an IoT device, it is used to implement the resource deletion method on the IoT device side as described above.
还一方面,本申请实施例提供了一种芯片,所述芯片包括可编程逻辑电路和/或程序指令,当所述芯片在终端设备上运行时,用于实现如上述终端设备侧的资源删除方法。In another aspect, an embodiment of the present application provides a chip that includes a programmable logic circuit and/or program instructions. When the chip runs on a terminal device, it is used to implement resource deletion on the terminal device side as described above. method.
本申请还提供了一种计算机程序产品,当计算机程序产品在物联网设备的处理器上运行时,使得物联网设备执行上述物联网设备侧的资源删除方法。This application also provides a computer program product, which when the computer program product runs on the processor of the Internet of Things device, causes the Internet of Things device to execute the resource deletion method on the side of the Internet of Things device.
本申请还提供了一种计算机程序产品,当计算机程序产品在终端设备的处理器上运行时,使得终端设备执行上述终端设备侧的资源删除方法。This application also provides a computer program product, which when the computer program product runs on the processor of the terminal device, causes the terminal device to execute the above-mentioned resource deletion method on the terminal device side.
本领域技术人员应该可以意识到,在上述一个或多个示例中,本申请实施例所描述的功能可以用硬件、软件、固件或它们的任意组合来实现。当使用软件实现时,可以将这些功能存储在计算机可读介质中或者作为计算机可读介质上的一个或多个指令或代码进行传输。计算机可读介质包括计算机存储介质和通信介质,其中通信介质包括便于从一个地方向另一个地方传送计算机程序的任何介质。存储介质可以是通用或专用计算机能够存取的任何可用介质。Those skilled in the art should be aware that, in one or more of the foregoing examples, the functions described in the embodiments of the present application may be implemented by hardware, software, firmware, or any combination thereof. When implemented by software, these functions can be stored in a computer-readable medium or transmitted as one or more instructions or codes on the computer-readable medium. The computer-readable medium includes a computer storage medium and a communication medium, where the communication medium includes any medium that facilitates the transfer of a computer program from one place to another. The storage medium may be any available medium that can be accessed by a general-purpose or special-purpose computer.
以上所述仅为本申请的示例性实施例,并不用以限制本申请,凡在本申请的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本申请的保护范围之内。The above are only exemplary embodiments of this application and are not intended to limit this application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of this application shall be included in the protection of this application. Within range.

Claims (20)

  1. 一种资源删除方法,其特征在于,应用于物联网设备中,所述方法包括:A method for deleting resources, which is characterized in that it is applied to an Internet of Things device, and the method includes:
    确定待删除的目标资源;Determine the target resource to be deleted;
    在所述目标资源是集合资源的情况下,获取第一引用资源,所述第一引用资源是所述目标资源的引用资源;In the case that the target resource is a collective resource, acquiring a first reference resource, where the first reference resource is a reference resource of the target resource;
    在所述第一引用资源满足第一条件的情况下,删除所述目标资源以及所述第一引用资源,所述第一条件包括所述第一引用资源未被除所述目标资源之外的其它资源所引用。When the first reference resource satisfies a first condition, delete the target resource and the first reference resource, and the first condition includes that the first reference resource is not other than the target resource. Referenced by other resources.
  2. 根据权利要求1所述的方法,其特征在于,所述第一条件还包括以下至少一项:所述第一引用资源支持删除接口、请求方具备删除所述第一引用资源的权限、所述第一引用资源是通过所述目标资源的创建接口创建的。The method according to claim 1, wherein the first condition further comprises at least one of the following: the first referenced resource supports a deletion interface, the requesting party has the right to delete the first referenced resource, and the The first reference resource is created through the creation interface of the target resource.
  3. 根据权利要求2所述的方法,其特征在于,所述获取第一引用资源之后,还包括:The method according to claim 2, wherein after said obtaining the first reference resource, the method further comprises:
    检测所述第一引用资源是否支持所述删除接口;Detecting whether the first reference resource supports the deletion interface;
    在所述第一引用资源支持所述删除接口的情况下,检测所述请求方是否具备删除所述第一引用资源的权限;In the case that the first reference resource supports the deletion interface, detecting whether the requesting party has the right to delete the first reference resource;
    在所述请求方具备删除所述第一引用资源的权限的情况下,检测所述第一引用资源是否被除所述目标资源之外的其它资源所引用;In the case that the requesting party has the right to delete the first referenced resource, detecting whether the first referenced resource is referenced by resources other than the target resource;
    在所述第一引用资源未被除所述目标资源之外的其它资源所引用的情况下,检测所述第一引用资源是否是通过所述目标资源的创建接口创建的;In the case that the first reference resource is not referenced by other resources except the target resource, detecting whether the first reference resource is created through the creation interface of the target resource;
    在所述第一引用资源是通过所述目标资源的创建接口创建的情况下,确定所述第一引用资源满足所述第一条件。In a case where the first reference resource is created through the creation interface of the target resource, it is determined that the first reference resource satisfies the first condition.
  4. 根据权利要求1至3任一项所述的方法,其特征在于,所述获取第一引用资源之后,还包括:The method according to any one of claims 1 to 3, wherein after the obtaining the first reference resource, the method further comprises:
    在所述第一引用资源不满足所述第一条件的情况下,删除所述目标资源,且保留所述第一引用资源不删除。In a case where the first reference resource does not meet the first condition, delete the target resource, and keep the first reference resource without deleting.
  5. 根据权利要求1至4任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 1 to 4, wherein the method further comprises:
    在确定删除所述第一引用资源,且所述第一引用资源是集合资源的情况下,获取第二引用资源,所述第二引用资源是所述第一引用资源的引用资源;In a case where it is determined to delete the first reference resource and the first reference resource is a collective resource, acquiring a second reference resource, where the second reference resource is a reference resource of the first reference resource;
    在所述第二引用资源满足第二条件的情况下,删除所述第二引用资源,所述第二条件包括所述第二引用资源未被除所述第一引用资源之外的其它资源所引用。In the case that the second reference resource meets a second condition, the second reference resource is deleted, and the second condition includes that the second reference resource is not owned by any resource other than the first reference resource. Reference.
  6. 根据权利要求1至5任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 1 to 5, wherein the method further comprises:
    接收资源删除请求,所述资源删除请求用于请求删除所述目标资源;Receiving a resource deletion request, where the resource deletion request is used to request deletion of the target resource;
    在所述资源删除请求满足第三条件的情况下,执行所述删除所述目标资源的步骤;In the case that the resource deletion request satisfies the third condition, execute the step of deleting the target resource;
    其中,所述第三条件包括所述目标资源支持删除接口、请求方具备删除所述目标资源的 权限。Wherein, the third condition includes that the target resource supports a deletion interface, and the requesting party has the right to delete the target resource.
  7. 一种资源删除方法,其特征在于,应用于终端设备中,所述方法包括:A method for deleting resources, characterized in that it is applied to a terminal device, and the method includes:
    向物联网设备发送资源删除请求,所述资源删除请求是所述终端设备请求对所述物联网设备中的目标资源进行删除的请求;Sending a resource deletion request to the Internet of Things device, where the resource deletion request is a request by the terminal device to delete a target resource in the Internet of Things device;
    其中,在所述目标资源是集合资源,且所述目标资源的第一引用资源满足第一条件的情况下,所述目标资源和所述第一引用资源被删除,所述第一条件包括所述第一引用资源未被除所述目标资源之外的其它资源所引用。Wherein, when the target resource is a collective resource, and the first reference resource of the target resource satisfies a first condition, the target resource and the first reference resource are deleted, and the first condition includes all The first referenced resource is not referenced by other resources except the target resource.
  8. 根据权利要求7所述的方法,其特征在于,所述第一条件还包括以下至少一项:所述第一引用资源支持删除接口、请求方具备删除所述第一引用资源的权限、所述第一引用资源是通过所述目标资源的创建接口创建的。The method according to claim 7, wherein the first condition further comprises at least one of the following: the first referenced resource supports a deletion interface, the requesting party has the right to delete the first referenced resource, and the The first reference resource is created through the creation interface of the target resource.
  9. 一种资源删除装置,其特征在于,应用于物联网设备中,所述装置包括:A resource deletion device, which is characterized in that it is applied to an Internet of Things equipment, and the device includes:
    资源确定模块,用于确定待删除的目标资源;The resource determination module is used to determine the target resource to be deleted;
    资源获取模块,用于在所述目标资源是集合资源的情况下,获取第一引用资源,所述第一引用资源是所述目标资源的引用资源;A resource acquisition module, configured to acquire a first reference resource when the target resource is a collective resource, and the first reference resource is a reference resource of the target resource;
    资源删除模块,用于在所述第一引用资源满足第一条件的情况下,删除所述目标资源以及所述第一引用资源,所述第一条件包括所述第一引用资源未被除所述目标资源之外的其它资源所引用。A resource deletion module, configured to delete the target resource and the first reference resource when the first reference resource satisfies a first condition, and the first condition includes that the first reference resource has not been deleted Referred to by resources other than the target resource.
  10. 根据权利要求9所述的装置,其特征在于,所述第一条件还包括以下至少一项:所述第一引用资源支持删除接口、请求方具备删除所述第一引用资源的权限、所述第一引用资源是通过所述目标资源的创建接口创建的。The device according to claim 9, wherein the first condition further comprises at least one of the following: the first referenced resource supports a deletion interface, the requesting party has the right to delete the first referenced resource, and the The first reference resource is created through the creation interface of the target resource.
  11. 根据权利要求10所述的装置,其特征在于,所述装置还包括资源检测模块,用于:The device according to claim 10, wherein the device further comprises a resource detection module, configured to:
    检测所述第一引用资源是否支持所述删除接口;Detecting whether the first reference resource supports the deletion interface;
    在所述第一引用资源支持所述删除接口的情况下,检测所述请求方是否具备删除所述第一引用资源的权限;In the case that the first reference resource supports the deletion interface, detecting whether the requesting party has the right to delete the first reference resource;
    在所述请求方具备删除所述第一引用资源的权限的情况下,检测所述第一引用资源是否被除所述目标资源之外的其它资源所引用;In the case that the requesting party has the right to delete the first referenced resource, detecting whether the first referenced resource is referenced by resources other than the target resource;
    在所述第一引用资源未被除所述目标资源之外的其它资源所引用的情况下,检测所述第一引用资源是否是通过所述目标资源的创建接口创建的;In the case that the first reference resource is not referenced by other resources except the target resource, detecting whether the first reference resource is created through the creation interface of the target resource;
    在所述第一引用资源是通过所述目标资源的创建接口创建的情况下,确定所述第一引用资源满足所述第一条件。In a case where the first reference resource is created through the creation interface of the target resource, it is determined that the first reference resource satisfies the first condition.
  12. 根据权利要求9至11任一项所述的装置,其特征在于,The device according to any one of claims 9 to 11, characterized in that:
    所述资源删除模块,还用于在所述第一引用资源不满足所述第一条件的情况下,删除所述目标资源,且保留所述第一引用资源不删除。The resource deletion module is further configured to delete the target resource when the first reference resource does not meet the first condition, and reserve the first reference resource without deleting.
  13. 根据权利要求9至12任一项所述的装置,其特征在于,The device according to any one of claims 9 to 12, characterized in that:
    所述资源获取模块,还用于在确定删除所述第一引用资源,且所述第一引用资源是集合资源的情况下,获取第二引用资源,所述第二引用资源是所述第一引用资源的引用资源;The resource acquisition module is further configured to acquire a second reference resource when it is determined to delete the first reference resource and the first reference resource is a collective resource, and the second reference resource is the first reference resource. The reference resource of the reference resource;
    所述资源删除模块,还用于在所述第二引用资源满足第二条件的情况下,删除所述第二引用资源,所述第二条件包括所述第二引用资源未被除所述第一引用资源之外的其它资源所引用。The resource deletion module is further configured to delete the second reference resource when the second reference resource satisfies a second condition, where the second condition includes that the second reference resource is not deleted Referenced by resources other than a referenced resource.
  14. 根据权利要求9至13任一项所述的装置,其特征在于,所述装置还包括:The device according to any one of claims 9 to 13, wherein the device further comprises:
    请求接收模块,用于接收资源删除请求,所述资源删除请求用于请求删除所述目标资源;A request receiving module, configured to receive a resource deletion request, where the resource deletion request is used to request deletion of the target resource;
    所述资源删除模块,还用于在所述资源删除请求满足第三条件的情况下,执行所述删除所述目标资源的步骤;The resource deletion module is further configured to execute the step of deleting the target resource when the resource deletion request satisfies a third condition;
    其中,所述第三条件包括所述目标资源支持删除接口、请求方具备删除所述目标资源的权限。Wherein, the third condition includes that the target resource supports a deletion interface, and the requesting party has the right to delete the target resource.
  15. 一种资源删除装置,其特征在于,应用于终端设备中,所述装置包括:A resource deletion device, which is characterized in that it is applied to a terminal device, and the device includes:
    请求发送模块,用于向物联网设备发送资源删除请求,所述资源删除请求是所述终端设备请求对所述物联网设备中的目标资源进行删除的请求;A request sending module, configured to send a resource deletion request to an Internet of Things device, where the resource deletion request is a request for the terminal device to delete a target resource in the Internet of Things device;
    其中,在所述目标资源是集合资源,且所述目标资源的第一引用资源满足第一条件的情况下,所述目标资源和所述第一引用资源被删除,所述第一条件包括所述第一引用资源未被除所述目标资源之外的其它资源所引用。Wherein, when the target resource is a collective resource, and the first reference resource of the target resource satisfies a first condition, the target resource and the first reference resource are deleted, and the first condition includes all The first referenced resource is not referenced by other resources except the target resource.
  16. 根据权利要求15所述的装置,其特征在于,所述第一条件还包括以下至少一项:所述第一引用资源支持删除接口、请求方具备删除所述第一引用资源的权限、所述第一引用资源是通过所述目标资源的创建接口创建的。The device according to claim 15, wherein the first condition further comprises at least one of the following: the first referenced resource supports a deletion interface, the requesting party has the right to delete the first referenced resource, and the The first reference resource is created through the creation interface of the target resource.
  17. 一种物联网设备,其特征在于,所述物联网设备包括处理器和与所述处理器相连的收发器;其中:An Internet of Things device, characterized in that, the Internet of Things device includes a processor and a transceiver connected to the processor; wherein:
    所述处理器,用于确定待删除的目标资源;The processor is used to determine the target resource to be deleted;
    所述处理器,还用于在所述目标资源是集合资源的情况下,获取第一引用资源,所述第一引用资源是所述目标资源的引用资源;The processor is further configured to obtain a first reference resource when the target resource is a collective resource, where the first reference resource is a reference resource of the target resource;
    所述处理器,还用于在所述第一引用资源满足第一条件的情况下,删除所述目标资源以及所述第一引用资源,所述第一条件包括所述第一引用资源未被除所述目标资源之外的其它资源所引用。The processor is further configured to delete the target resource and the first reference resource when the first reference resource satisfies a first condition, and the first condition includes that the first reference resource is not Referenced by resources other than the target resource.
  18. 一种终端设备,其特征在于,所述终端设备包括处理器和与所述处理器相连的收发器;其中:A terminal device, characterized in that the terminal device includes a processor and a transceiver connected to the processor; wherein:
    所述收发器,用于向物联网设备发送资源删除请求,所述资源删除请求是所述终端设备请求对所述物联网设备中的目标资源进行删除的请求;The transceiver is configured to send a resource deletion request to an Internet of Things device, where the resource deletion request is a request by the terminal device to delete a target resource in the Internet of Things device;
    其中,在所述目标资源是集合资源,且所述目标资源的第一引用资源满足第一条件的情况下,所述目标资源和所述第一引用资源被删除,所述第一条件包括所述第一引用资源未被 除所述目标资源之外的其它资源所引用。Wherein, when the target resource is a collective resource, and the first reference resource of the target resource satisfies a first condition, the target resource and the first reference resource are deleted, and the first condition includes all The first referenced resource is not referenced by other resources except the target resource.
  19. 一种计算机可读存储介质,其特征在于,所述存储介质中存储有计算机程序,所述计算机程序用于被物联网设备的处理器执行,以实现如权利要求1至6任一项所述的资源删除方法。A computer-readable storage medium, wherein a computer program is stored in the storage medium, and the computer program is used to be executed by a processor of an Internet of Things device, so as to implement any one of claims 1 to 6 The resource deletion method.
  20. 一种计算机可读存储介质,其特征在于,所述存储介质中存储有计算机程序,所述计算机程序用于被终端设备的处理器执行,以实现如权利要求7或8所述的资源删除方法。A computer-readable storage medium, wherein a computer program is stored in the storage medium, and the computer program is used to be executed by a processor of a terminal device to implement the resource deletion method according to claim 7 or 8. .
PCT/CN2020/074414 2020-02-06 2020-02-06 Resource deletion method, apparatus, and device, and storage medium WO2021155529A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2020/074414 WO2021155529A1 (en) 2020-02-06 2020-02-06 Resource deletion method, apparatus, and device, and storage medium
CN202080077989.XA CN114651236A (en) 2020-02-06 2020-02-06 Resource deleting method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2020/074414 WO2021155529A1 (en) 2020-02-06 2020-02-06 Resource deletion method, apparatus, and device, and storage medium

Publications (1)

Publication Number Publication Date
WO2021155529A1 true WO2021155529A1 (en) 2021-08-12

Family

ID=77199177

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/074414 WO2021155529A1 (en) 2020-02-06 2020-02-06 Resource deletion method, apparatus, and device, and storage medium

Country Status (2)

Country Link
CN (1) CN114651236A (en)
WO (1) WO2021155529A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115016948A (en) * 2022-08-08 2022-09-06 阿里巴巴(中国)有限公司 Resource access method and device, electronic equipment and readable storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090254926A1 (en) * 2008-04-08 2009-10-08 Microsoft Corporation Registering network applications with an api framework
CN103207813A (en) * 2012-01-11 2013-07-17 华为技术有限公司 Method and device for managing resources
CN108805527A (en) * 2018-05-29 2018-11-13 郑州云海信息技术有限公司 A kind of project management method and device
CN109992252A (en) * 2017-12-29 2019-07-09 中移物联网有限公司 A kind of data analysing method based on Internet of Things, terminal, device and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090254926A1 (en) * 2008-04-08 2009-10-08 Microsoft Corporation Registering network applications with an api framework
CN103207813A (en) * 2012-01-11 2013-07-17 华为技术有限公司 Method and device for managing resources
CN109992252A (en) * 2017-12-29 2019-07-09 中移物联网有限公司 A kind of data analysing method based on Internet of Things, terminal, device and storage medium
CN108805527A (en) * 2018-05-29 2018-11-13 郑州云海信息技术有限公司 A kind of project management method and device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115016948A (en) * 2022-08-08 2022-09-06 阿里巴巴(中国)有限公司 Resource access method and device, electronic equipment and readable storage medium
CN115016948B (en) * 2022-08-08 2022-11-25 阿里巴巴(中国)有限公司 Resource access method and device, electronic equipment and readable storage medium

Also Published As

Publication number Publication date
CN114651236A (en) 2022-06-21

Similar Documents

Publication Publication Date Title
US20230319534A1 (en) Cross-resource subscription for m2m service layer
US9668126B2 (en) Preventing location tracking via smartphone MAC address
EP3490304B1 (en) Method for identifying access point and hotspot, and related products
CN114025021B (en) Communication method, system, medium and electronic equipment crossing Kubernetes cluster
CN107644075B (en) Method and device for collecting page information
CN113326155A (en) Information processing method, device, system and storage medium
CN111258627A (en) Interface document generation method and device
KR20190061060A (en) Profile-based content and services
CN111225082B (en) Identity management method and device of Internet of things intelligent equipment and Internet of things platform
WO2023015816A1 (en) Esim device configuration system, method and apparatus, and storage medium
WO2021155529A1 (en) Resource deletion method, apparatus, and device, and storage medium
US11411887B2 (en) Method and device for performing traffic control on user equipment
US20140136597A1 (en) Relay enabled dynamic virtual private network
US20230045914A1 (en) Method and apparatus for controlling device in internet of things, and gateway device and storage medium
WO2023273576A1 (en) Abnormal request processing method and apparatus, electronic device and storage medium
CN107018140B (en) Authority control method and system
CN111970250B (en) Method for identifying account sharing, electronic device and storage medium
CN114356593A (en) Data processing method, device, network equipment and medium
US11140183B2 (en) Determining criticality of identified enterprise assets using network session information
JP6412641B2 (en) Communication link transmission method, apparatus and terminal
CN114915576B (en) Method and system for identifying terminal equipment at router
CN115038089B (en) Multi-terminal data monitoring and collecting method based on information extraction
CN112988125B (en) Data bridging method, device, equipment and storage medium
CN110022538B (en) Method and device for identifying traffic type
CN114039770B (en) Access control method, device, storage medium and electronic equipment

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20917357

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20917357

Country of ref document: EP

Kind code of ref document: A1