WO2013104181A1 - 管理资源的方法和装置 - Google Patents

管理资源的方法和装置 Download PDF

Info

Publication number
WO2013104181A1
WO2013104181A1 PCT/CN2012/078740 CN2012078740W WO2013104181A1 WO 2013104181 A1 WO2013104181 A1 WO 2013104181A1 CN 2012078740 W CN2012078740 W CN 2012078740W WO 2013104181 A1 WO2013104181 A1 WO 2013104181A1
Authority
WO
WIPO (PCT)
Prior art keywords
resource
upper layer
layer resource
information
lower layer
Prior art date
Application number
PCT/CN2012/078740
Other languages
English (en)
French (fr)
Inventor
张楚雄
张永靖
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2013104181A1 publication Critical patent/WO2013104181A1/zh

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/11File system administration, e.g. details of archiving or snapshots
    • G06F16/122File system administration, e.g. details of archiving or snapshots using management policies

Definitions

  • the present invention relates to the field of cloud computing, and more particularly to a method and apparatus for managing resources in the field of cloud computing.
  • Narrow cloud computing refers to the delivery and use of information technology (Information Technology (“IT”) cornerstone facilities, which means that the required resources are obtained on-demand and easily expanded through the network; generalized cloud computing refers to the delivery and use of services. Mode refers to obtaining the required services on the network in an on-demand, scalable manner. This service can be related to IT, software, the Internet, or other services.
  • the core idea of cloud computing is to uniformly manage and schedule a large number of computing resources connected by networks to form a computing resource pool to provide on-demand services to users.
  • the network that provides the resources is called the "cloud.”
  • the resources in the "cloud” are infinitely expandable to the user and can be obtained at any time, expanded at any time, used on demand, and paid for by usage.
  • the cloud service system composes a number of different types of resources that users request based on business needs to form a virtual device to accomplish a specific task.
  • the method for applying for the resource may be that the user actively applies through the terminal, or may be a cloud service provider (here, a provider that provides the I-layer resource service) through the cloud service providing system, according to the increase of the user's service volume.
  • Automatically allocate or translate resources For the resources requested by the user, such as virtual machines, storage space, network resources, etc., the cloud service system can combine the resources according to the user's business needs according to a certain topology.
  • the Distributed Management Task Force (DMTF, for example) Cloud Management Work Grou (CMWG) defines the management model and management protocol for the I-tier resource. Including a plurality of modules, such as a virtual machine (Machine) module, a virtual machine template (MachineTemplate) module, etc., wherein the resources contained in the I layer are represented by different modules in the management model, for example, a virtual machine (machine) representation
  • the computing resource, the storage (Volume) represents the storage resource, and the network (Network) represents the network resource.
  • the user needs to first select a virtual machine template ( MachineTemplate ) and then create an instance based on this virtual machine template.
  • a cloud service system contains multiple MachineTemplates, each of which describes a type of virtual machine, indicating that the cloud service system can provide these types of virtual machines.
  • the MachineTemplate contains modules such as MachineConfiguration and Machinelmage to describe the specific information needed to create a virtual machine.
  • a storage resource Volume
  • MachineConfiguration MachineConfiguration
  • Machinelmage to describe the specific information needed to create a virtual machine.
  • the system resource is used as a resource container, including computing resources, storage resources, and network resources.
  • the operation of the System will directly affect the resources it contains. For example, deleting a System, various resources included in the System may also be deleted. .
  • the creation of the System is similar to the creation of Machine, with a corresponding system template ( SystemTemplate ).
  • a System can include multiple Machine, Volume, and Network; similarly, a SystemTemplate can also include multiple VM Templates, MachineTemplates, and NetworkTemplates.
  • the upper layer resource or resource template knows which underlying resource or resource template is included, but the lower layer resource or resource template does not know which upper layer resource or resource template is included.
  • the cloud service system when the cloud service system performs the operation of deleting a certain resource, it can only query all possible upper-layer resources one by one, and can update the information of the upper-layer resources, which is slow and inefficient, and cannot satisfy the management of massive resources in the cloud service system. maintain. Summary of the invention
  • the embodiments of the present invention provide a method and an apparatus for managing resources, which can maintain the integrity of resource relationships in a simple and efficient manner when deleting resources.
  • An aspect of the present invention provides a method for managing a resource, where the method includes: acquiring, when deleting a first resource of a cloud service system, acquiring upper layer resource inclusion information and/or lower layer resource containing information of the first resource; The upper resource of a resource contains information and/or the underlying resource contains information to manage the first resource.
  • Another aspect of the present invention provides an apparatus for managing a resource, where the apparatus includes: an acquiring module, configured to acquire an upper layer resource containing information and/or a lower layer of the first resource when determining to delete the first resource of the cloud service system
  • the resource contains information;
  • a management module configured to be based on the first resource
  • the layer resource contains information and/or the underlying resource contains information to manage the first resource.
  • the method and device for managing resources according to the foregoing technical solution by managing the target resource according to the upper and lower layer resource inclusion information of the target resource, can quickly determine the upper and lower layer resources of the target resource, and update the upper and lower resources. Contains information to easily and efficiently maintain the integrity and validity of resource relationships when deleting resources, and to avoid ambiguity in operations. DRAWINGS
  • FIG. 1 is a schematic block diagram of a hierarchical relationship between resources according to an embodiment of the present invention.
  • FIG. 2 is a schematic flowchart of a method for managing resources according to an embodiment of the present invention.
  • FIG. 3 is a schematic flowchart of a method for managing a first resource according to an embodiment of the present invention.
  • FIG. 4 is another schematic flowchart of a method for managing resources according to an embodiment of the present invention.
  • FIG. 5 is another schematic block diagram of a hierarchical relationship between resources according to an embodiment of the present invention.
  • 6 is still another schematic block diagram of a hierarchical relationship between resources according to an embodiment of the present invention.
  • FIG. 7 is another schematic flowchart of a method for managing a first resource according to an embodiment of the present invention.
  • FIG. 8 is still another schematic flowchart of a method for managing a first resource according to an embodiment of the present invention.
  • FIG. 9 is still another schematic flowchart of a method for managing a first resource according to an embodiment of the present invention.
  • FIG. 10 is still another schematic flowchart of a method for managing a first resource according to an embodiment of the present invention.
  • FIG. 11 is a schematic flow chart of a method of managing a first resource according to another embodiment of the present invention.
  • FIG. 12 is another schematic flowchart of a method of managing a first resource according to another embodiment of the present invention.
  • FIG. 13 is a schematic block diagram of an apparatus for managing resources according to an embodiment of the present invention.
  • FIG. 14 is another schematic block diagram of an apparatus for managing resources according to an embodiment of the present invention.
  • FIG. 15 is a schematic block diagram of a management module in accordance with an embodiment of the present invention.
  • FIG. 16 is another schematic block diagram of a management module in accordance with an embodiment of the present invention.
  • Figure 17 is a schematic block diagram of an execution unit in accordance with an embodiment of the present invention.
  • FIG. 18 is still another schematic block diagram of a management module according to an embodiment of the present invention.
  • Figure 19 is a schematic block diagram of a fifth determining unit in accordance with an embodiment of the present invention.
  • Figure 20 is still another schematic block diagram of a management module in accordance with an embodiment of the present invention.
  • 21 is a schematic block diagram of an eighth determining unit according to an embodiment of the present invention. detailed description
  • the resources of the cloud service system may include a computing resource (Machine), a storage resource (Volume), and a network resource (Network).
  • the resource template of the cloud service system may include a computing template (Machine Template). , Storage Template (Volume Template) and Network Resource Template (Network Template).
  • the resources of the cloud service system may represent computing resources, storage resources, and network resources, and may also represent computing resource templates, storage resource targets, and network resource templates, but the embodiments of the present invention are not limited thereto. this.
  • the resource can also represent other resources in the cloud computing space.
  • the association relationship between resources generally has an inclusion and an inclusion relationship.
  • the system resource System is simply referred to as "S1", and includes a virtual machine resource Machinel (referred to as “VM1") and a storage (Volume) resource Volume 2 (referred to as "V2"), and VM1 includes a storage resource Volumel (referred to as "VI”).
  • VM1 virtual machine resource Machinel
  • V2 storage resource Volume 2
  • VI storage resource Volumel
  • the inclusion and inclusion relationship may be referred to as an upper and lower layer relationship.
  • Systeml is the upper resource of VM1
  • VM1 is the lower layer resource of Systeml.
  • VM1 including Volume1
  • VM1 is the upper resource of Volume1
  • Volumel is the lower resource of VM1.
  • embodiments of the present invention will express the inclusion and inclusion relationship between resources in combination with hierarchical relationships between resources.
  • FIG. 2 shows a schematic flow diagram of a method 100 of managing resources in accordance with an embodiment of the present invention.
  • the method 100 includes: S110.
  • S110 When determining to delete the first resource of the cloud service system, obtain upper layer resource inclusion information and/or lower layer resource inclusion information of the first resource.
  • the cloud service system may first acquire the upper and lower resources of the target resource. Including information, the upper and lower layer resource inclusion information of the first resource includes upper layer resource inclusion information of the target resource and/or lower layer resource inclusion information of the target resource, so that the cloud service system can include information according to the upper and lower layer resources, and the target Resources are managed.
  • the method for managing resources manages the target resource according to the upper and lower layer resource inclusion information of the target resource, and can quickly determine the upper and lower layer resources of the target resource, and update the inclusion information of the upper and lower layer resources, thereby It is able to maintain the integrity and validity of resource relationships simply and efficiently when deleting resources, and avoid the ambiguity of operations.
  • the integrity of the resource relationship means that in the resource management model, the resources of the upper and lower resources of each resource contain information that is not empty; the validity of the resource relationship means that in the resource management model, each resource can Management, ie the user does not operate on a resource that does not exist.
  • the upper and lower layer resource inclusion information of the resource refers to the upper layer resource containing information of the resource and/or the lower layer resource containing information of the resource.
  • the term "and / or” in this context is merely an association that describes the associated object, indicating that there can be three relationships, for example, A and / or B, which can mean: A exists separately, while A and B exist, exist alone B these three situations.
  • the character " in this article” generally means that the contextual object is an "or" relationship.
  • the determining, by the cloud service system, the deletion of the target resource may include: the cloud service system receiving the deletion resource request sent by the user by using the terminal, where the deletion resource request includes indication information for indicating the deleted target resource; According to the delete resource request, it is determined that the target resource of the cloud service system is to be deleted. At this time, the cloud service system can manage the target resources according to an embodiment of the present invention.
  • the determining, by the cloud service system, the deleting the target resource may further include: when the cloud service system determines to delete the upper layer resource of the target resource, the cloud service system determines to delete the target resource. That is, when the cloud service system determines to delete a certain resource, it also means that the cloud service system determines to delete the lower layer resource of the resource, so that the cascading delete operation may be performed according to an embodiment of the present invention. Maintain the integrity and effectiveness of resource relationships simply and efficiently.
  • the relationship between the resources includes the inclusion relationship of the target resource to the lower layer resource, and the included relationship of the target resource to the upper layer resource, that is, the relationship between the resources is a two-way inclusion relationship.
  • the cloud service system may create a two-way inclusion relationship of the resource according to the resource template. After the user applies for various resources, the cloud service system may also create a resource according to the request of the user. The two-way inclusion relationship between. A method for creating a two-way inclusion relationship according to a user's request by the cloud service system will be described in detail below with reference to FIG.
  • the method 100 for managing resources may further include:
  • S130 Receive a request message sent by a user for requesting to create an upper layer resource containing information of the first resource.
  • the cloud service system can manage the resources of the cloud service system according to the set upper and lower resources including information.
  • the URL of the cloud service system is http://www.cloudexample.com
  • the inclusion and inclusion relationship between the resources shown in FIG. 1 is based on the distributed management task group (Distributed Management).
  • Task Force referred to as "DMTF”
  • CMWG Cloud Management WorkGroup
  • the partial attributes of Systeml and their values can be as shown in Table 1.
  • Some attributes of VM1 and their values can be As shown in table 2.
  • Systeml includes the virtual machine resource VM1 and the storage resource Volume2; similarly, according to Table 2, it can be known that VM1 contains the storage resource Volumel. That is, in the current relevant regulations, the inclusion relationship between the upper and lower resources is one-way.
  • the relevant attributes of the target resource it can be known which lower-layer resources are included in the target resource, but if the cloud service system is not queried by traversing If the information of other resources is included, it is impossible to know which upper layer resources are included in the target resource. For example, it is impossible to obtain which System and/or Machine resources are included in the storage resource Volumel.
  • the user can establish the inclusion information of VM1 or Volume1 by performing an update operation, that is, VM1 includes Volume1, and Volume1 is included by VM1.
  • VM1 includes Volume1
  • VM1 is included by VM1.
  • HTTP HyperText Transfer Protocol
  • volume ⁇ "href: "http://www.example.com/Volume 1 " ⁇ ,
  • the above specific message includes a message header and a message body, and the two parts are separated by blank lines.
  • PUT is usually used to modify an existing resource.
  • /VM1 after the PUT is a Uniform Resource Identifier ("URI") that requests the target resource VM1 to be modified.
  • URI Uniform Resource Identifier
  • the relative URI is combined with the value of the host Host to form the complete URI of the VM1, ie http: ⁇ www.cloudexample.com/VMl.
  • "CIMISelect” is an attribute selector defined by the DMTF CMWG, which means that the volume attribute of VM1 needs to be modified.
  • the cloud service system can increase the value of the Volumes 1.parentNode by performing an Update operation on volume 1.
  • some of the attributes of VM1 and their values can be as shown in Table 3.
  • the embodiment of the present invention adds an attribute called "parentNode” to all resource modules except the System, for example, a virtual machine resource module, a storage resource module, a computing resource template module, and a storage resource template module. , network resource template module and other modules
  • this attribute is used to save the Uniform Resource Identifier ("URI") of the upper resource containing the target resource, that is, set the target.
  • URI Uniform Resource Identifier
  • the upper resource of the resource contains information, so that the cloud service system can directly and quickly determine the upper resource of the target resource according to the information of the upper and lower resources of the target resource, thereby facilitating management of the target resource, and maintaining the integrity of the resource relationship simply and efficiently. Effectiveness.
  • an attribute called "parentNode” is added to the resource module as an example, and the attribute is used to carry the upper layer resource containing information of the target resource, and the attribute may also adopt other names.
  • the embodiment is not limited to this.
  • the method 200 includes:
  • the cloud service system When the first resource has an upper layer resource, for example, when the first resource is a resource other than the System resource, specifically, when the first resource is, for example, a virtual machine resource VM or a storage resource Volume, the cloud service system
  • the first upper layer resource of the first resource may be determined according to the upper layer resource inclusion information of the first resource.
  • the cloud service system may delete the lower layer resource containing information of the first upper layer resource.
  • the lower layer resource of the first resource includes information, and the first resource is released.
  • the deciphering resource indicates that the cloud service system reclaims the resource allocated to the user, and deleting the resource indicates that the user initiates an operation request for deleting the resource to the cloud service system.
  • deleting the information about the lower layer resource of the first resource in the lower layer resource containing information of the first upper layer resource only deleting and having only one layer containing/being the first upper layer resource
  • the underlying resource containing information of the relationship includes information in the lower layer resource of the first resource. For example, if Systeml includes VM1 and VM1 contains Volumel, then the lower layer resource of Systeml is deleted and contains information about the underlying resources in the information. In the Machine property, Systeml contains information on the underlying resources of the VM, regardless of Systeml's Volume property, Systeml contains information on the lower resources of the Volume.
  • the system resource SystemK is simply referred to as "SI", which includes virtual machine resources VM3 and VM1, and the system resource System2 (referred to as “S2") contains virtual machine resources VM1 and VM2;
  • a storage resource Volumel (referred to as “VI") is included, and the VM1 includes a storage resource Volumel and Volume2 (referred to as “V2”), and the VM2 includes a storage resource Volume3 (referred to as "V3").
  • V2 storage resource Volumel and Volume2
  • V3 storage resource Volume3
  • the cloud service system can delete the information of the lower layer resource of System2 identified by the URI and the information of the lower layer of the VM2. That is, delete the attribute value http://www.cloudexample.com/VM2 in the machines attribute in System2, keep S2's information about the underlying resources of VM1, and release VM2.
  • the attribute value in the machines attribute in System2 is only http: ⁇ www. cloudexample.com/VMl.
  • the information about the target resource that is still stored in the upper-layer resource of the target resource, so that the integrity and validity of the resource relationship can be easily and efficiently maintained when the resource is deleted.
  • FIG. 8 is a diagram illustrating a method for managing the first resource when the first upper layer resource includes at least two resources, taking the resource level relationship diagram shown in FIG. 5 and FIG. 6 as an example.
  • the method 200 of managing a first resource may include:
  • S240 Determine, according to the upper layer resource inclusion information of the first resource, a first upper layer resource of the first resource.
  • S250 when the first upper layer resource includes at least two resources, prompting the user to select the content of the deletion operation;
  • the cloud service system may determine the first upper layer resource of the first resource according to the upper layer resource containing information of the first resource, where the first upper layer resource includes at least two resources, the cloud The service system may prompt the user to select the content of the deletion operation, and perform a corresponding deletion operation according to the selection result of the user.
  • the cloud service system may prompt the user to select to delete all upper layer resources, and include information about the lower layer resources of the first resource, and translate The first resource is placed; the user may be prompted to delete the specific upper layer resource to include information on the lower resource of the first resource without releasing the first resource.
  • the cloud service system can prompt the user to select the content of the deletion operation by popping up a dialog box.
  • the dialog box may, for example, have two buttons, one for indicating that the resource is not being translated, and the other for indicating that the resource is selected for release.
  • the performing the corresponding deletion operation may include:
  • the first resource is released.
  • the performing the corresponding deletion operation may include:
  • the upper layer resource contains information in the upper layer resource of the specific upper layer resource.
  • the specific upper layer resource refers to an upper layer resource to which the resource currently located by the user belongs.
  • the first resource is VM1
  • the first upper resource is Systeml and System2, the specific upper layer.
  • the resource is System2.
  • VM1 is included by both Systeml and System2.
  • VMl .parentNode contains the values of Systeml.self and System2.self.
  • the user needs to specify one of the following two situations in response to the prompt given by the cloud service system: (1) Do not translate VM1; (2) VM1.
  • the specific processing of the user's delete resource request by the cloud service system is to delete the upper and lower layer resources contained between System2 and VM1, and does not actually translate VM1; for the second case, the cloud service
  • the specific processing of the user's delete resource request is to delete the underlying resources of VM1 in System2 and Systeml, that is, update the genus '1' of Systeml. machines and System2.machines, and release VM1. It should be understood that the cloud The service system also needs to process the underlying resources (ie, Volumel and Volume2) included in VM1, which will be described in detail below, and will not be described herein.
  • the client side solution and the server side solution can be adopted, which will be described separately below.
  • the client can determine that the VM1 has two associated upper-layer resources, System1 and System2, according to the obtained attribute value of the VM 1.parentNode, so the client can prompt the user to explicitly execute the first This is still the second case. For example, the client can prompt the user to make a selection by popping up a dialog box.
  • the operation request initiated by the client to the cloud service system is to update the inclusion relationship of the VM1.
  • the message may be:
  • the cloud service system can perform the following operations:
  • the value of parentNode is "http://www.cloudexample.com/Systeml", that is, in the included relationship of VM1 after the update, VM1 is included by System1, thereby determining that System2 needs to be deleted.
  • the underlying resources of VM1 Inclusion relationship is "http://www.cloudexample.com/Systeml", that is, in the included relationship of VM1 after the update, VM1 is included by System1, thereby determining that System2 needs to be deleted.
  • the operation request actually initiated by the client is the translation of VM1, and the message may specifically be:
  • the cloud service system can do the following:
  • the cloud service system may determine the lower layer resources VI and V2 of the VM1 as the first lower layer resource respectively according to the lower layer resource inclusion information of the VM1 as the first resource.
  • the cloud service system determines that the second upper layer resource of the VI includes VM3 and VM1 according to the upper layer resource information of the VI, and the second upper layer resource includes the VM3 resource except the VM1 resource. Therefore, the cloud service system deletes the upper resource of the VI and contains information about the upper resource of the VM1 in the information.
  • the cloud service system determines that the second upper layer resource of the V2 includes only the first resource VM1 according to the upper layer resource inclusion information of the V2, so the cloud service system translates the first lower layer resource V2. ;
  • the client initiates a delete DELETE operation request for the VM1 according to the user's operation; after receiving the request, the cloud service system determines that the VM1 has two associated upper-layer resources Systeml and according to the attribute value of the VMl.parentNode. System2, then prompt The user chooses to delete the content of the operation.
  • the cloud service system can prompt the user to select the content of the deletion operation by popping up a dialog box.
  • the dialog box may, for example, have two buttons, one for indicating that the resource is not to be translated, and the other for indicating that the resource is selected for translation.
  • the cloud service system can determine whether to release the first resource according to the result of the user's selection.
  • the other processing flow is the same as the client side solution, and will not be described here.
  • the method for managing resources manages the target resource according to the upper and lower layer resource inclusion information of the target resource, and can quickly determine the upper layer resource of the target resource, and update the inclusion information of the upper layer resource, thereby enabling When deleting a resource, the integrity and validity of the resource relationship are maintained simply and efficiently. Especially when the deleted target resource has multiple upper-layer resources, the corresponding deletion operation can be performed according to the user's selection, and the deletion operation can be avoided. Righteousness.
  • the method 200 for managing the first resource in the embodiment of the present invention may include:
  • S270 Determine, according to the information about the underlying resource of the first resource, the one of the lower resources of the first resource as the first lower layer resource.
  • S290 Determine, according to the relationship between the second upper layer resource and the first resource, whether to perform a cascade delete operation on the first lower layer resource.
  • the determining whether to perform the cascading delete operation on the first lower layer resource includes:
  • the second upper layer resource includes resources other than the first resource, deleting the upper layer resource containing information of the first lower layer resource and the upper layer resource containing information of the first resource, without releasing the first The next level of resources.
  • the first resource includes at least two lower layer resources, the above process should be performed for each lower layer resource.
  • the cloud service system Before releasing the first resource, the cloud service system uses the attribute value of VM1. volumes for the lower layer resources included in VM1. Volume 1 and Volume2, when it is determined that Volume 1 is the first lower layer resource, according to the attribute value of Volume l.parentNode, it is determined that the upper layer resource of Volume 1 includes VM1 and VM3, that is, VM1 and VM3 share Volumel, so Volumel cannot be deleted, otherwise The resources of VM3 will be incomplete. To this end, the cloud service system can determine to update the attribute value of Volume l.parentNode, that is, delete http://www.cloudexample.com/VMl. When the cloud service system determines that Volume 2 is the first lower layer resource, the cloud service system can determine that Volume 2 has only one upper layer resource according to the attribute value of Volume2.parentNode, so the cloud service system can translate Volume2.
  • the method for managing resources manages the target resource according to the upper and lower layer resource inclusion information of the target resource, and can quickly determine the upper and lower layer resources of the target resource, and update the inclusion information of the upper and lower layer resources, thereby It is able to maintain the integrity and validity of resource relationships simply and efficiently when deleting resources, and avoid the ambiguity of operations.
  • the deleted target resource has a lower layer resource
  • the method for managing the first resource by the cloud service system when the target resource to be deleted has the upper layer resource is described in detail above with reference to FIG. 4 to FIG. 10. The following describes the target resource only has the lower layer in combination with FIG. 11 and FIG. The method by which the cloud service system manages the first resource when there is no upper resource.
  • the method 300 for managing the first resource by the cloud service system includes:
  • the cloud service system may include one of the first resources according to the lower resource of the first resource.
  • the lower layer resource is determined as the second lower layer resource; the cloud service system may determine, according to the relationship between the third upper layer resource of the second lower layer resource and the first resource, Performing a cascade delete operation on the second lower layer resource, and releasing the first resource.
  • the cloud service system determines whether to perform the cascading delete operation on the second lower layer resource, including:
  • the third upper layer resource includes a resource other than the first resource, deleting the upper layer resource inclusion information of the first resource and the upper layer resource containing information of the first resource.
  • the method for managing resources manages the target resource according to the upper and lower layer resource inclusion information of the target resource, and can quickly determine the lower layer resource of the target resource, and update the inclusion information of the lower layer resource, thereby enabling When deleting resources, it is simple and efficient to maintain the integrity and validity of resource relationships and avoid the ambiguity of operations.
  • the size of the sequence numbers of the above processes does not mean the order of execution, and the order of execution of each process should be determined by its function and internal logic, and should not be taken to the embodiments of the present invention.
  • the implementation process constitutes any limitation.
  • FIG. 13 shows a schematic block diagram of an apparatus 500 for managing resources in accordance with an embodiment of the present invention.
  • the apparatus 500 includes:
  • the obtaining module 510 is configured to: when determining to delete the first resource of the cloud service system, acquire upper layer resource inclusion information and/or lower layer resource inclusion information of the first resource;
  • the management module 520 is configured to manage the first resource according to the upper resource inclusion information and/or the lower resource inclusion information of the first resource.
  • the device for managing resources manages the target resource according to the upper and lower layer resource inclusion information of the target resource, and can quickly determine the upper and lower layer resources of the target resource, and update the inclusion information of the upper and lower layer resources, thereby It is able to maintain the integrity and validity of resource relationships simply and efficiently when deleting resources, and avoid the ambiguity of operations.
  • the apparatus 500 further includes: a receiving module 530, configured to receive a request message sent by a user for requesting to create an upper layer resource containing information of the first resource;
  • the setting module 540 is configured to set upper layer resource inclusion information of the first resource according to the request message.
  • the management module 520 includes: a first determining unit 610, configured to determine, according to the upper layer resource inclusion information of the first resource, the first of the first resource Upper resource
  • the deleting unit 620 is configured to: when the first upper layer resource includes only one resource, delete the lower layer resource containing information of the first upper layer resource and the lower layer resource containing information of the first resource; the first translation unit 630, The first resource is released.
  • the management module 520 includes: a second determining unit 640, configured to determine, according to the upper layer resource inclusion information of the first resource, the first of the first resource.
  • Upper resource
  • the prompting unit 650 is configured to prompt the user to select the content of the deletion operation when the first upper layer resource includes at least two resources;
  • the executing unit 660 is configured to perform a corresponding deleting operation according to the selection result of the user.
  • the executing unit 660 includes:
  • a first deletion sub-unit 661 configured to: when the user selects to release the first resource, delete information in the lower layer resource containing information of each upper-layer resource in the first upper-layer resource, and include information in the lower-layer resource of the first resource;
  • the first translation unit 662 is configured to release the first resource.
  • the executing unit 660 includes:
  • a second deletion sub-unit 663 configured to: when the user chooses not to release the first resource, delete the lower-layer resource inclusion information of the specific upper-layer resource in the first upper-layer resource, the lower-layer resource inclusion information of the first resource, and The upper layer resource containing information of the first resource is deleted, and the upper layer resource containing information of the specific upper layer resource is deleted.
  • the device for managing resources manages the target resource according to the upper and lower layer resource inclusion information of the target resource, can quickly determine the upper layer resource of the target resource, and update the inclusion information of the upper layer resource, thereby enabling When deleting resources, it is simple and efficient to maintain the integrity and validity of resource relationships and avoid the ambiguity of operations.
  • the management module 520 further includes:
  • the third determining unit 670 is configured to determine, according to the lower layer resource inclusion information of the first resource, one of the lower layer resources of the first resource as the first lower layer resource;
  • the fourth determining unit 680 is configured to determine, according to the upper layer resource inclusion information of the first lower layer resource, the second upper layer resource of the first lower layer resource;
  • the fifth determining unit 690 is configured to determine, according to the relationship between the second upper layer resource and the first resource, whether to perform a cascade delete operation on the first lower layer resource.
  • the fifth determining unit 690 includes:
  • a second release subunit 691 configured to release the first lower layer resource when the second upper layer resource only includes the first resource
  • a third deletion sub-unit 692 configured to: when the second upper layer resource includes a resource other than the first resource, delete an upper layer resource inclusion information of the first lower layer resource, and include an upper layer resource content of the first resource information.
  • the device for managing resources manages the target resource according to the upper and lower layer resource inclusion information of the target resource, can quickly determine the lower layer resource of the target resource, and update the inclusion information of the lower layer resource, thereby enabling When deleting resources, it is simple and efficient to maintain the integrity and validity of resource relationships and avoid the ambiguity of operations.
  • the management module 520 includes:
  • the sixth determining unit 710 is configured to determine, according to the information about the underlying resource of the first resource, one of the lower layer resources of the first resource as the second lower layer resource;
  • the seventh determining unit 720 is configured to determine, according to the upper layer resource inclusion information of the second lower layer resource, the third upper layer resource of the second lower layer resource;
  • the eighth determining unit 730 is configured to determine, according to the relationship between the third upper layer resource and the first resource, whether to perform a cascade delete operation on the second lower layer resource;
  • the second translation unit 740 is configured to release the first resource.
  • the eighth determining unit 730 includes:
  • a third translation unit 731 configured to release the second lower layer resource when the third upper layer resource only includes the first resource
  • a fourth deletion sub-unit 732 configured to: when the third upper layer resource includes a resource other than the first resource, delete the upper layer resource inclusion information of the second lower layer resource, and the upper layer resource include information of the first resource .
  • the apparatus 500 for managing resources may correspond to the cloud service system in the embodiment of the present invention, and the above and other operations and/or functions of the respective modules in the apparatus 500 are respectively implemented in order to implement FIG. 2 to FIG.
  • the corresponding flow of each method in 12 will not be repeated here for brevity.
  • the device for managing resources passes the upper and lower layers according to the target resource.
  • the resource includes information to manage the target resource, can quickly determine the lower layer resource of the target resource, and update the inclusion information of the lower layer resource, thereby being able to simply and efficiently maintain the integrity and validity of the resource relationship when deleting the resource, and avoid The ambiguity of the operation.
  • the disclosed systems, devices, and methods may be implemented in other ways.
  • the device embodiments described above are merely illustrative.
  • the division of the unit is only a logical function division.
  • there may be another division manner for example, multiple units or components may be combined or Can be integrated into another system, or some features can be ignored, or not executed.
  • the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, or an electrical, mechanical or other form of connection.
  • the units described as separate components may or may not be physically separate, and the components displayed as units may or may not be physical units, i.e., may be located in one place, or may be distributed over multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the embodiments of the present invention.
  • each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
  • the above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
  • the integrated unit if implemented in the form of a software functional unit and sold or used as a standalone product, may be stored in a computer readable storage medium.
  • a computer readable storage medium including instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the present invention. All or part of the steps of the method described in the various embodiments are invented.
  • the foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and the like, which can store program codes. .

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

本发明公开了一种管理资源的方法和装置。该方法包括:在确定删除云服务系统的第一资源时,获取该第一资源的上层资源包含信息和/或下层资源包含信息;根据该第一资源的上层资源包含信息和/或下层资源包含信息,管理该第一资源。该装置包括:获取模块和管理模块。本发明实施例的管理资源的方法和装置,通过根据目标资源的上下层资源包含信息对该目标资源进行管理,能够快速确定目标资源的上下层资源,并更新该上下层资源的包含信息,从而能够在删除资源时,简单高效地维护资源关系的完整性和有效性,并避免操作的二义性。

Description

本申请要求于 2012年 01月 11 日提交中国专利局、 申请号为
201210007082. 3 , 发明名称为 "管理资源的方法和装置" , 的中国专利申请 的优先权, 其全部内容通过引用结合在本申请中。
技术领域
本发明涉及云计算领域, 尤其涉及云计算领域中管理资源的方法和装 置。
背景技术
狭义云计算指信息技术( Information Technology, 简称为 "IT" )基石出 设施的交付和使用模式, 指通过网络以按需、 易扩展的方式获得所需资源; 广义云计算指服务的交付和使用模式, 指通过网络以按需、 易扩展的方式 获得所需服务。 这种服务可以与 IT、 软件、 互联网相关, 也可以是其他服 务。 云计算的核心思想是, 对大量用网络连接的计算资源进行统一管理和 调度, 构成一个计算资源池, 以向用户提供按需服务。 提供资源的网络被 称为 "云"。 "云" 中的资源在使用者看来是可以无限扩展的, 并且可以随 时获取, 随时扩展, 按需使用, 并按使用付费。
在基石出设施层 (Infrastructure, 简称为 "I层"), 云服务系统将用户根 据业务需要申请的众多不同类型的资源组成一个虚拟设备, 以便完成特定 的任务。 其中申请资源的方式可以是用户通过其终端主动申请, 也可以是 云服务提供商 ( Cloud Service Provider, 这里指提供 I层资源服务的提供商 ) 通过其云服务提供系统, 根据用户业务量的增加自动分配或译放资源。 对 于用户申请的资源, 例如虚拟机、 存储空间、 网络资源等, 云服务系统可 以根据用户的业务需求, 将这些资源按照一定的拓朴结构组合到一起。
分布式管理任务组 ( Distributed Management Task Force , 简称为 " DMTF,,) 云管理工作组 ( Cloud Management Work Grou , 简称为 "CMWG" )定义了 I层资源的管理模型和管理协议。 在该管理模型中, 包 括多个模块, 例如虚拟机 ( Machine )模块、虚拟机模板 ( MachineTemplate ) 模块等。 其中, I层包含的资源由该管理模型中的不同模块来表示, 例如, 虚拟机( Machine )表示计算资源, 存储( Volume )表示存储资源, 网络 ( Network )表示网络资源。 为了创建一个 Machine , 用户需要首先选择一个虚拟机模板 ( MachineTemplate ), 然后根据这个虚拟机模板创建一个实例。 一个云服务 系统包含多个 MachineTemplate, 每个 MachineTemplate描述一种类型的虚 拟机, 表示云服务系统能够提供这些类型的虚拟机。 MachineTemplate包含 了 MachineConfiguration、 Machinelmage等模块, 用于描述创建虚拟机需要 的具体信息。 对于存储资源 (Volume ), 网络资源 (Network )的创建而言, 其创建的方式与创建计算资源 (Machine ) 的方式类似。
系统资源 (System )作为资源容器, 包括计算资源、 存储资源、 网络 资源;对 System的操作将直接作用于其包含的资源,例如:删除一个 System, 该 System包括的各种资源也可能会被删除。 System的创建与 Machine的创 建类似, 有对应的系统模板 ( SystemTemplate )。 一个 System可以包括多个 Machine, Volume, Network; 类似地, 一个 SystemTemplate也可以包括多 个虚拟机模板( MachineTemplate )、 存储模板( VolumeTemplate )、 网络模 板 ( NetworkTemplate )。
在上述管理模型和管理协议中, 上层资源或资源模板知道包含了哪些 下层资源或资源模板, 但下层资源或资源模板却不知道被哪些上层资源或 资源模板所包含。
因此, 当云服务系统执行删除某个资源的操作时, 只能逐一查询所有 可能的上层资源, 才能更新上层资源的包含信息, 速度慢, 效率低, 无法 满足云服务系统中海量资源的管理和维护。 发明内容
本发明实施例提供了一种管理资源的方法和装置, 能够在删除资源时 以简单高效的方式维护资源关系的完整性。
本发明一方面提供了一种管理资源的方法, 该方法包括: 在确定删除 云服务系统的第一资源时, 获取该第一资源的上层资源包含信息和 /或下层 资源包含信息; 根据该第一资源的上层资源包含信息和 /或下层资源包含信 息, 管理该第一资源。
本发明的另一方面提供了一种管理资源的装置, 该装置包括: 获取模 块, 用于在确定删除云服务系统的第一资源时, 获取该第一资源的上层资 源包含信息和 /或下层资源包含信息; 管理模块, 用于根据该第一资源的上 层资源包含信息和 /或下层资源包含信息, 管理该第一资源。
基于上述技术方案, 本发明实施例的管理资源的方法和装置, 通过根 据目标资源的上下层资源包含信息对该目标资源进行管理, 能够快速确定 目标资源的上下层资源, 并更新该上下层资源的包含信息, 从而能够在删 除资源时, 简单高效地维护资源关系的完整性和有效性, 并避免操作的二 义性。 附图说明
为了更清楚地说明本发明实施例的技术方案, 下面将对本发明实施例 中所需要使用的附图作简单地介绍, 显而易见地, 下面所描述的附图仅仅 是本发明的一些实施例, 对于本领域普通技术人员来讲, 在不付出创造性 劳动的前提下, 还可以根据这些附图获得其他的附图。
图 1是根据本发明实施例的资源之间的层级关系的示意性框图。
图 2是根据本发明实施例的管理资源的方法的示意性流程图。
图 3是根据本发明实施例的管理第一资源的方法的示意性流程图。 图 4是根据本发明实施例的管理资源的方法的另一示意性流程图。 图 5是根据本发明实施例的资源之间的层级关系的另一示意性框图。 图 6是根据本发明实施例的资源之间的层级关系的再一示意性框图。 图 7是根据本发明实施例的管理第一资源的方法的另一示意性流程图。 图 8是根据本发明实施例的管理第一资源的方法的再一示意性流程图。 图 9是根据本发明实施例的管理第一资源的方法的再一示意' f生流程图。 图 10是根据本发明实施例的管理第一资源的方法的再一示意性流程 图。
图 11 是根据本发明另一实施例的管理第一资源的方法的示意性流程 图。
图 12是根据本发明另一实施例的管理第一资源的方法的另一示意性流 程图。
图 13是根据本发明实施例的管理资源的装置的示意性框图。
图 14是根据本发明实施例的管理资源的装置的另一示意性框图。
图 15是根据本发明实施例的管理模块的示意性框图。
图 16是根据本发明实施例的管理模块的另一示意性框图。 图 17是根据本发明实施例的执行单元的示意性框图。
图 18是根据本发明实施例的管理模块的再一示意性框图。
图 19是根据本发明实施例的第五确定单元的示意性框图。
图 20是根据本发明实施例的管理模块的再一示意性框图。
图 21是根据本发明实施例的第八确定单元的示意性框图。 具体实施方式
下面将结合本发明实施例中的附图, 对本发明实施例中的技术方案进 行清楚、 完整地描述, 显然, 所描述的实施例是本发明的一部分实施例, 而不是全部实施例。 基于本发明中的实施例, 本领域普通技术人员在没有 做出创造性劳动的前提下所获得的所有其他实施例, 都应属于本发明保护 的范围。
在本发明实施例中, 云服务系统的资源可以包括计算资源 (Machine ), 存储资源 (Volume )和网络资源 (Network ); 类似地, 云服务系统的资源 模板可以包括计算资源模板 ( Machine Template ), 存储资源模板 ( Volume Template )和网络资源模板 ( Network Template )。
应理解, 在下文中, 为了描述方便, 云服务系统的资源既可以表示计 算资源、 存储资源和网络资源, 又可以表示计算资源模板、 存储资源目标 和网络资源模板, 但本发明实施例并不限于此。 例如, 该资源还可以表示 云计算领域的其它资源。
在本发明实施例中, 各资源之间的关联关系通常具有包含和被包含关 系。如图 1所示,系统资源 System 简称为 "S1" )包含虚拟机资源 Machinel (简称为 "VM1" )和存储( Volume )资源 Volume2 (简称为 "V2" ), VM1 包含存储资源 Volumel (简称为 "VI" )。 应理解, 该包含和被包含关系可 以称之为上下层关系。例如,对于 Systeml包含 VM1而言, Systeml是 VM1 的上层资源, VM1是 Systeml的下层资源; 对于 VM1包含 Volumel而言, VM1是 Volumel的上层资源, Volumel是 VM1的下层资源。 在下文中, 本发明实施例将结合资源之间的层级关系, 表达各资源之间的包含和被包 含关系。
图 2示出了根据本发明实施例的管理资源的方法 100的示意性流程图。 如图 2所示, 该方法 100包括: S110, 在确定删除云服务系统的第一资源时, 获取该第一资源的上层 资源包含信息和 /或下层资源包含信息;
S120, 根据该第一资源的上层资源包含信息和 /或下层资源包含信息, 管理该第一资源。
云服务系统例如根据用户的请求而确定删除云服务系统的目标资源即 第一资源时, 或例如根据删除目标资源的上层资源而确定删除该目标资源 时, 可以首先获取该目标资源的上下层资源包含信息, 该第一资源的上下 层资源包含信息包括该目标资源的上层资源包含信息和 /或该目标资源的下 层资源包含信息, 从而云服务系统可以根据该上下层资源包含信息, 对该 目标资源进行管理。
因此, 本发明实施例的管理资源的方法, 通过根据目标资源的上下层 资源包含信息对该目标资源进行管理, 能够快速确定目标资源的上下层资 源, 并更新该上下层资源的包含信息, 从而能够在删除资源时, 简单高效 地维护资源关系的完整性和有效性, 并避免操作的二义性。
应理解, 资源关系的完整性是指在资源的管理模型中, 各资源的上下 层资源包含信息所指向的资源不为空; 资源关系的有效性是指在资源的管 理模型中, 各资源可以管理, 即用户不会操作一个不存在的资源。
还应理解, 在本发明实施例中, 资源的上下层资源包含信息是指该资 源的上层资源包含信息和 /或该资源的下层资源包含信息。 本文中术语 "和 / 或",仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如, A和 /或 B, 可以表示: 单独存在 A, 同时存在 A和 B, 单独存在 B这三种 情况。 另外, 本文中字符 " , —般表示前后关联对象是一种 "或" 的关系。
在本发明实施例中, 云服务系统确定删除目标资源可以包括: 云服务 系统接收用户通过终端发送的删除资源请求, 该删除资源请求包括用于指 示被删除的目标资源的指示信息; 云服务系统根据该删除资源请求, 确定 要删除云服务系统的该目标资源。 此时, 云服务系统可以根据本发明实施 例对目标资源进行管理。
在本发明实施例中, 云服务系统确定删除目标资源也可以包括: 当云 服务系统确定删除目标资源的上层资源时, 云服务系统确定删除该目标资 源。 即, 当云服务系统确定删除某一资源时, 同时也意味着云服务系统确 定删除该资源的下层资源, 从而可以根据本发明实施例进行级联删除操作, 简单高效地维护资源关系的完整性和有效性。
在本发明实施例中, 资源之间的关联关系既包括目标资源对下层资源 的包含关系, 也包括目标资源对上层资源的被包含关系, 即各资源之间的 关联关系为双向包含关系。 在本发明实施例中, 用户申请各类资源时, 云 服务系统可以根据资源模板创建该资源的双向包含关系; 用户申请到各类 资源后, 云服务系统也可以根据用户的请求, 创建资源之间的双向包含关 系。 下面将结合图 3 , 对云服务系统根据用户的请求创建双向包含关系的方 法进行详细描述。
如图 3所示, 管理资源的方法 100还可以包括:
S130, 接收用户发送的用于请求创建该第一资源的上层资源包含信息 的请求消息;
S140, 根据该请求消息, 设置该第一资源的上层资源包含信息。
由此, 云服务系统可以根据设置的上下层资源包含信息, 对云服务系 统的资源进行管理。
具 体 而 言 , 例 如 ^叚 设 云 服 务 系 统 的 网 址 为 http://www.cloudexample.com, 对于图 1所示的各资源之间的包含和被包含 关系, 根据分布式管理任务组( Distributed Management Task Force , 简称为 " DMTF " ) 云管理工作组 ( Cloud Management WorkGroup , 简称为 "CMWG" )的相关规定, Systeml的部分属性及其值可以如表 1所示, VM1 的部分属性及其值可以如表 2所示。
表 1
属性 描述
http://www.cloudexample.com/Sys
self
teml
name Systeml machi http://www.cloudexample.com/VM
nes 1
volum http://www. cloudexample . com/Vol
es ume2 表 2
Figure imgf000009_0001
根据表 1中所示的 Systeml的 machines属性和 Volumes属性, 可以获 知 Systeml 包含虚拟机资源 VMl和存储资源 Volume2; 类似地, 根据表 2 可以获知 VM1包含存储资源 Volumel。 即在目前的相关规定中, 上下层资 源之间的包含关系是单向的, 根据目标资源的相关属性, 可以知道该目标 资源包含了哪些下层资源, 但是如果不通过遍历的方式查询云服务系统中 其他资源的包含信息, 则无法获知该目标资源被哪些上层资源所包含, 例 如, 无法获取存储资源 Volumel被哪些 System和 /或 Machine资源所包含。
而在本发明实施例中, 假设用户已经申请到 VM1和 Volumel, 用户可 以通过对 VM1或 Volumel执行更新 ( Update )操作建立两者的包含信息, 即 VM1 包含 Volumel , 且 Volumel被 VM1所包含。 例如, 对 VM1执行 Update 操作的超文本传输协议 ( HyperText Transfer Protocol , 简称为 "HTTP" ) 消息如下所示:
PUT /VMl? CIMISelect=volumes HTTP/1.1
Host: http://www.cloudexample.com
Content-Type: application/CIMI-Machine+j son { "volumes": [
{ "volume": { "href: "http://www.example.com/Volume 1 " },
}
] 上述具体消息包括消息头和消息体两部分, 这两部分之间由空行进行 分隔。 其中, 在消息头部分中, "PUT" 通常用于修改已有的资源, PUT后 面的 /VM1是请求要修改的目标资源 VM1的相对通用资源标志符 ( Uniform Resource Identifier, 简称 "URI" ), 该相对 URI与主机 Host的值组合形成该 VM1的完整的 URI, 即 http:〃 www.cloudexample.com/VMl。 "CIMISelect" 是 DMTF CMWG定义的属性选择符, 此处表示需要对 VM1的 volumes属 性进行修改。
在消息体部分中, 以 JASON的格式表示在 VM 1.volumes的属性值中, 增加设置属性值 http://www.example.com/Volume 1。 在实际操作中 , 云服务 系 统需要首先读取 VMl .volumes 的属性值, 然后将属性值 http://www.example.com/Volume 1增力口到已有属 '1"生值的后面。
类似地, 云服务系统通过对 volume 1 执行 Update 操作, 可以在 Volumes 1.parentNode 的 属 性 值 中 , 增 力。 设 置 属 性 值 http://www.cloudexample.com/VMl , 从而可以建立该 VM1资源的双向包含 关系。 此时, VM1的部分属性及其值可以如表 3所示。
表 3
Figure imgf000010_0001
因此, 本发明实施例通过在除 System以外的所有资源模块中增加一个 称为 "parentNode (母节点)" 的属性, 例如在虚拟机资源模块、 存储资源 模块、 计算资源模板模块、 存储资源模板模块、 网络资源模板模块等模块 中, 增加称为该 "parentNode" 的属性, 如表 3所示, 该属性用于保存包含 该目标资源的上层资源的统一资源标识符( Uniform Resource Identifier , 简 称为 "URI" ), 即设置目标资源的上层资源包含信息, 使得云服务系统可以 根据目标资源的上下层资源包含信息, 简单且快速地确定目标资源的上层 资源, 从而便于对目标资源进行管理, 简单高效地维护资源关系的完整性 的有效性。
应理解, 在本发明实施例中, 以资源模块中增加称为 "parentNode" 的 属性为例, 说明该属性用于承载目标资源的上层资源包含信息, 该属性也 可以采用其它的名称, 本发明实施例并不限于此。
下面将结合图 4至图 12, 详细描述云服务系统在删除资源时, 如何根 据第一资源的上下层资源包含信息, 对该第一资源进行管理。 如图 4所示, 该方法 200包括:
S210, 根据该第一资源的上层资源包含信息, 确定该第一资源的第一 上层资源;
S220, 在该第一上层资源仅包括一个资源时, 删除该第一上层资源的 下层资源包含信息中、 对该第一资源的下层资源包含信息;
S230, 译放该第一资源。
当该第一资源具有上层资源时, 例如, 当该第一资源为除 System资源 之外的其余资源时, 具体而言该第一资源例如为虚拟机资源 VM或存储资 源 Volume时, 云服务系统可以根据该第一资源的上层资源包含信息, 确定 该第一资源的第一上层资源, 在该第一上层资源仅包括一个资源时, 云服 务系统可以删除该第一上层资源的下层资源包含信息中、 对该第一资源的 下层资源包含信息, 并释放该第一资源。
应理解, 在本发明实施例中, 译放资源表示云服务系统回收分配给用 户的资源, 而删除资源表示用户向云服务系统发起删除资源的操作请求。
还应理解, 在本发明实施例中, 删除第一上层资源的下层资源包含信 息中对该第一资源的下层资源包含信息, 是指仅删除与该第一上层资源仅 具有一层包含 /被包含关系的下层资源包含信息中, 对该第一资源的下层资 源包含信息。 例如 , 假设 Systeml包含 VM1 , VM1又包含 Volumel , 那么 删除 Systeml的下层资源包含信息中的下层资源包含信息,指删除 Systeml 的 Machine属性中, Systeml对 VM的下层资源包含信息,而不考虑 Systeml 的 Volume属性中, Systeml对 Volume的下层资源包含信息。
下面将结合图 5和图 6所示的资源之间的层级关系示意图, 对本发明 实施例的方法进行详细描述。
例如,在图 5所示的层级关系示意图中,系统资源 SystemK简称为 "SI" ) 包含虚拟机资源 VM3和 VM1 , 系统资源 System2 (简称为 "S2" ) 包含虚 拟机资源 VM1和 VM2; 该 VM3包含存储资源 Volumel (简称为 "VI" ), 该 VM1包含存储资源 Volumel和 Volume2 (简称为 "V2" ), 该 VM2包含 存储资源 Volume3 (简称为 "V3" )。 对于图 5所示的资源拓朴关系图, 所 有资源都属于同一个用户。 因此, 在用户的资源管理视图中, 所呈现的资 源包含信息可以如图 6所示。
假设确定删除云服务系统的 VM2, 即第一资源为 VM2, 那么云服务系 统根据 VM2中的 parentNode属性, 即该第一资源的上层资源包含信息, 可 即该 VM2的上层资源为 System2。 由于 VM2的 parentNode属性只有一个 上述属性值, 即 System2为 VM2的唯——个上层资源, 因此云服务系统可 以删除该 URI标识的 System2的下层资源包含信息中、对该 VM2的下层资 源包含信息, 即删除 System2 中的 machines 属性中的属性值 http://www.cloudexample.com/VM2 , 保留 S2对 VM1的下层资源包含信息, 并释放 VM2。 此时, System2 中的 machines 属性中的属性值仅为 http:〃 www. cloudexample.com/VMl。 目标资源的上层资源中, 仍保存的对该目标资源的包含信息, 从而能够在 删除资源时, 简单高效地维护资源关系的完整性和有效性。
上文中结合图 4, 并以图 5和图 6所示的资源层级关系示意图为例, 描 述了当第一上层资源仅包括一个资源时, 管理该第一资源的方法, 下面将 结合图 7和图 8, 并以图 5和图 6所示的资源层级关系示意图为例,描述当 第一上层资源包括至少两个资源时, 管理该第一资源的方法。
如图 7所示, 管理第一资源的该方法 200可以包括:
S240, 根据该第一资源的上层资源包含信息, 确定该第一资源的第一 上层资源; S250, 在该第一上层资源包括至少两个资源时, 提示用户选择删除操 作的内容;
5260, 根据该用户的选择结果, 执行相应的删除操作。
当该第一资源具有上层资源时, 云服务系统可以根据该第一资源的上 层资源包含信息, 确定该第一资源的第一上层资源, 在该第一上层资源包 括至少两个资源时, 云服务系统可以提示该用户选择删除操作的内容, 并 根据该用户的选择结果, 执行相应的删除操作。
在 S250中, 由于至少两个上层资源包含该第一资源, 因此, 在删除该 第一资源时, 云服务系统可以提示用户选择删除所有上层资源对该第一资 源的下层资源包含信息, 并译放该第一资源; 也可以提示用户选择删除特 定上层资源对该第一资源的下层资源包含信息, 而不释放该第一资源。 例 如, 云服务系统可以通过弹出对话框的形式, 提示用户选择删除操作的内 容。 该对话框例如可以具有两个按钮, 一个按钮指示选择不译放资源, 另 一按钮指示选择释放资源。
在 S260中, 当用户选择译放该第一资源时, 如图 8所示, 该执行相应 的删除操作, 可以包括:
5261 , 在该用户选择译放该第一资源时, 删除该第一上层资源中各上 层资源的下层资源包含信息中、 对该第一资源的下层资源包含信息;
5262, 译放该第一资源。
在 S260中, 当用户选择不译放该第一资源时, 如图 8所示, 该执行相 应的删除操作, 可以包括:
5263 , 在该用户选择不译放该第一资源时, 删除该第一上层资源中特 定上层资源的下层资源包含信息中、 对该第一资源的下层资源包含信息, 以及删除该第一资源的上层资源包含信息中、 对该特定上层资源的上层资 源包含信息。
应理解, 在 S263中, 该特定上层资源指用户当前所在的资源所属的上 层资源。 例如, 在图 5 所示的资源层级关系图中, 当用户在浏览 System2 下的资源时, 决定对 VM1执行删除操作时, 第一资源为 VM1 , 第一上层 资源为 Systeml和 System2, 该特定上层资源为 System2。
例如, 如图 5和图 6所示, VM1同时被 Systeml和 System2所包含。 当用户在浏览 System2 下的资源时, 决定对 VM1 执行删除操作时, 由于 VMl .parentNode中包含 Systeml.self和 System2.self的值, 用户需在对云服 务系统给出的提示的响应中指定如下两种情况之一: (1 )不译放 VM1 ; ( 2 ) 译放 VM1。
对于第一种情况, 云服务系统对用户的删除资源请求的具体处理是, 删除 System2与 VM1之间的上下层资源包含信息,而并不会真正译放 VM1 ; 对于第二种情况, 云服务系统对用户的删除资源请求的具体处理是, 删除 System2 以及 Systeml 中对 VM1 的下层资源包含信息, 即更新 Systeml. machines和 System2.machines的属' 1"生值, 并释放 VM1。 应理解, 云服务系统还需要对 VM1包含的下层资源(即 Volumel和 Volume2 )进行 处理, 下文中将详细描述, 在此不再贅述。
对 VM1执行删除操作,可以采用客户端侧解决方案以及服务器侧解决 方案, 下面将分别进行描述。
在客户端侧解决方案中, 客户端可以根据获取的 VM 1.parentNode的属 性值, 可以确定 VM1有两个关联的上层资源 Systeml和 System2, 于是客 户端可以通过提示, 要求用户明确是执行第一种情况还是第二种情况。 例 如, 客户端可以通过弹出对话框的形式, 提示用户进行选择。
如果用户选择执行第一种情况, 那么客户端实际向云服务系统发起的 操作请求是更新 VM1的包含关系, 该消息具体可以为:
PUT /VM 1? CIMISelect=parentnode HTTP/ 1.1
Content-Type: application/CIMI-Machine+j son
Host: http:〃 www.cloudexample.com
{ "ParentNode": "htt : //www. cloudexample. com/System 1 "
} 云服务系统在收到该消息后, 可以执行以下操作:
( 1 )根据 VMl.parentNode的属性值,确认 VM1被 Systeml和 System2 所包含;
( 2 )根据接 收到 的 请 求 消 息 中 parentNode 的 取值 为 "http://www.cloudexample.com/Systeml " , 即更新后 VM1的被包含关系中, VM1被 Systeml所包含,从而确定需要删除 System2中对 VM1的下层资源 包含关系;
( 3 ) 更新 System2.machines 的 属 性值 , 即 删 除其 中 的 http://www.cloudexample.com/VMl ,从而解除 System2对 VM1的包含关系;
( 4 ) 更新 VMl.parentNode的属性值,删除 VMl.parentNode的属性值 中的 http:〃 www.cloudexample.com/System2,从而解除 VM1对 System2的反 向包含关系;
( 5 )在处理结束时向客户端返回处理成功消息。
如果用户选择执行第二种情况, 那么客户端实际发起的操作请求是译 放 VM1 , 该消息具体可以为:
DELETE /VMl HTTP/ 1.1
Host: http://www.cloudexample.com 云服务系统在收到该消息后, 可以执行以下操作:
( 1 )根据 VMl.parentNode的属性值,确认 VM1被 Systeml和 System2 所包含;
( 2 ) 更新 Systeml. machines和 System2.machines的属' 1"生值, 从而删除 其中的 http://www.cloudexample.com/VMl;
( 3 )根据本发明实施例的方法,确定对资源 Volume 1和 Volume2进行 删除处理。 具体而言, 云服务系统根据作为第一资源的 VM1的下层资源包 含信息, 可以分别将 VM1的下层资源 VI和 V2确定为第一下层资源。 对 于 VI作为第一下层资源而言, 云服务系统根据 VI的上层资源包含信息, 确定 VI 的第二上层资源包括 VM3和 VM1 , 由于该第二上层资源包括除 VM1资源之外的 VM3资源, 因此云服务系统删除 VI的上层资源包含信息 中对 VM1的上层资源包含信息。 对于 V2作为第一下层资源而言, 云服务 系统根据 V2的上层资源包含信息, 确定 V2的第二上层资源仅包括第一资 源 VM 1 , 因此云服务系统译放该第一下层资源 V2;
( 4 )释放 VM1 ;
( 5 ) 在处理结束时向客户端返回处理成功消息。
在服务器侧解决方案中, 客户端根据用户的操作, 针对 VM1发起删除 DELETE操作请求; 云服务系统收到该请求后, 根据 VMl.parentNode的属 性值, 判断 VM1有两个关联的上层资源 Systeml和 System2, 于是提示用 户选择删除操作的内容。 例如, 云服务系统可以通过弹出对话框的形式, 提示用户选择删除操作的内容。 该对话框例如可以具有两个按钮, 一个按 钮指示选择不译放资源, 另一按钮指示选择译放资源。 云服务系统可以根 据用户的选择结果, 确定是否译放第一资源。 其他的处理流程与客户端侧 解决方案相同, 在此不再贅述。
因此, 本发明实施例的管理资源的方法, 通过根据目标资源的上下层 资源包含信息对该目标资源进行管理, 能够快速确定目标资源的上层资源 , 并更新该上层资源的包含信息, 从而能够在删除资源时, 简单高效地维护 资源关系的完整性和有效性, 特别是在被删除的目标资源有多个上层资源 时, 能够根据用户的选择而执行相应的删除操作, 能够避免删除操作的二 义性。
在本发明实施例中, 当根据第一资源的上下层资源包含信息, 确定要 译放该第一资源时, 如果该第一资源具有下层资源, 那么如图 9所示, 在 释放该第一资源之前, 本发明实施例的管理第一资源的该方法 200可以包 括:
S270, 根据该第一资源的下层资源包含信息, 将该第一资源的其中一 个下层资源确定为第一下层资源;
S280, 根据该第一下层资源的上层资源包含信息, 确定该第一下层资 源的第二上层资源;
5290, 根据该第二上层资源与该第一资源的关系, 确定是否对该第一 下层资源进行级联删除操作。
在本发明实施例中, 如图 10所示, 该确定是否对该第一下层资源进行 级联删除操作, 包括:
5291 , 在该第二上层资源仅包括该第一资源时, 译放该第一下层资源;
5292, 在该第二上层资源包括除该第一资源之外的资源时, 删除该第 一下层资源的上层资源包含信息中、 对该第一资源的上层资源包含信息, 而不释放该第一下层资源。
应理解, 当第一资源包括至少两个下层资源时, 应对每一个下层资源 都执行上述流程。
仍以删除图 5和图 6中所示的 VM1为例进行说明。在释放该第一资源 之前,云服务系统根据 VM1. volumes的属性值,对于 VM1包括的下层资源 Volume 1 和 Volume2 , 在确定 Volume 1 为第一下层资源时, 根据 Volume l.parentNode的属性值,确定 Volume 1的上层资源包括 VM1和 VM3 , 即 VM1和 VM3共享 Volumel , 因此不能删除 Volumel , 否则会造成 VM3 的资源不完整。 为此, 云服务系统可以确定更新 Volume l.parentNode 的属 性值, 即删除其中的 http://www.cloudexample.com/VMl。 而在云服务系统 确定 Volume2为第一下层资源时,云服务系统可以根据 Volume2.parentNode 的属性值, 确定 Volume2 只有一个上层资源, 于是云服务系统可以译放 Volume2„
因此, 本发明实施例的管理资源的方法, 通过根据目标资源的上下层 资源包含信息对该目标资源进行管理, 能够快速确定目标资源的上下层资 源, 并更新该上下层资源的包含信息, 从而能够在删除资源时, 简单高效 地维护资源关系的完整性和有效性, 并避免操作的二义性。 特别是在被删 除的目标资源具有下层资源时, 能够根据该下层资源与该目标资源的关系 , 确定是否对该下层资源进行级联删除操作, 从而能够简单高效地维护资源 关系的完整性和有效性, 并避免操作的二义性。
上文中结合图 4至图 10, 详细描述了要删除的目标资源具有上层资源 时, 云服务系统对第一资源进行管理的方法, 下面将结合图 11和图 12, 描 述当目标资源仅具有下层资源而没有上层资源时, 云服务系统对第一资源 进行管理的方法。
如图 11所示, 云服务系统对第一资源进行管理的方法 300包括:
S310, 根据该第一资源的下层资源包含信息, 将该第一资源的其中一 个下层资源确定为第二下层资源;
S320, 根据该第二下层资源的上层资源包含信息, 确定该第二下层资 源的第三上层资源;
S330, 根据该第三上层资源与该第一资源的关系, 确定是否对该第二 下层资源进行级联删除操作;
S340, 译放该第一资源。
当该第一资源没有上层资源时, 例如, 当云服务系统确定删除的第一 资源为 System资源时, 云服务系统可以根据该第一资源的下层资源包含信 息, 将该第一资源的其中一个下层资源确定为第二下层资源; 云服务系统 可以根据该第二下层资源的第三上层资源与该第一资源的关系, 确定是否 对该第二下层资源进行级联删除操作, 并译放该第一资源。
在 S330中,云服务系统确定是否对该第二下层资源进行级联删除操作, 包括:
5331 , 在该第三上层资源仅包括该第一资源时, 译放该第二下层资源;
5332, 在该第三上层资源包括除该第一资源之外的资源时, 删除该第 二下层资源的上层资源包含信息中、 对该第一资源的上层资源包含信息。
因此, 本发明实施例的管理资源的方法, 通过根据目标资源的上下层 资源包含信息对该目标资源进行管理, 能够快速确定目标资源的下层资源, 并更新该下层资源的包含信息, 从而能够在删除资源时, 简单高效地维护 资源关系的完整性和有效性, 并避免操作的二义性。
应理解, 在本发明的各种实施例中, 上述各过程的序号的大小并不意 味着执行顺序的先后, 各过程的执行顺序应以其功能和内在逻辑确定, 而 不应对本发明实施例的实施过程构成任何限定。
上文中结合图 1至图 12, 详细描述了根据本发明实施例的管理资源的 方法, 下面将结合图 13至图 21 , 对根据本发明实施例的管理资源的装置进 行描述。
图 13示出了根据本发明实施例的管理资源的装置 500的示意性框图。 如图 13所示, 该装置 500包括:
获取模块 510, 用于在确定删除云服务系统的第一资源时, 获取该第一 资源的上层资源包含信息和 /或下层资源包含信息;
管理模块 520, 用于根据该第一资源的上层资源包含信息和 /或下层资 源包含信息, 管理该第一资源。
因此, 本发明实施例的管理资源的装置, 通过根据目标资源的上下层 资源包含信息对该目标资源进行管理, 能够快速确定目标资源的上下层资 源, 并更新该上下层资源的包含信息, 从而能够在删除资源时, 简单高效 地维护资源关系的完整性和有效性, 并避免操作的二义性。
在本发明实施例中, 如图 14所示, 可选地, 该装置 500还包括: 接收模块 530,用于接收用户发送的用于请求创建该第一资源的上层资 源包含信息的请求消息;
设置模块 540, 用于根据该请求消息,设置该第一资源的上层资源包含 信息。 在本发明实施例中, 如图 15所示, 可选地, 该管理模块 520包括: 第一确定单元 610, 用于根据该第一资源的上层资源包含信息, 确定该 第一资源的第一上层资源;
删除单元 620, 用于在该第一上层资源仅包括一个资源时, 删除该第一 上层资源的下层资源包含信息中、 对该第一资源的下层资源包含信息; 第一译放单元 630, 用于译放该第一资源。
在本发明实施例中, 如图 16所示, 可选地, 该管理模块 520包括: 第二确定单元 640, 用于根据该第一资源的上层资源包含信息, 确定该 第一资源的第一上层资源;
提示单元 650, 用于在该第一上层资源包括至少两个资源时,提示该用 户选择删除操作的内容;
执行单元 660, 用于根据该用户的选择结果, 执行相应的删除操作。 可选地, 如图 17所示, 该执行单元 660包括:
第一删除子单元 661 , 用于在该用户选择译放该第一资源时, 删除该第 一上层资源中各上层资源的下层资源包含信息中、 对该第一资源的下层资 源包含信息;
第一译放子单元 662, 用于译放该第一资源。
可选地, 如图 17所示, 该执行单元 660包括:
第二删除子单元 663 , 用于在该用户选择不释放该第一资源时, 删除该 第一上层资源中特定上层资源的下层资源包含信息中、 对该第一资源的下 层资源包含信息, 以及删除该第一资源的上层资源包含信息中、 对该特定 上层资源的上层资源包含信息。
因此, 本发明实施例的管理资源的装置, 通过根据目标资源的上下层 资源包含信息对该目标资源进行管理, 能够快速确定目标资源的上层资源 , 并更新该上层资源的包含信息, 从而能够在删除资源时, 简单高效地维护 资源关系的完整性和有效性, 并避免操作的二义性。
可选地, 如图 18所示, 该管理模块 520还包括:
第三确定单元 670, 用于根据该第一资源的下层资源包含信息, 将该第 一资源的其中一个下层资源确定为第一下层资源;
第四确定单元 680, 用于根据该第一下层资源的上层资源包含信息, 确 定该第一下层资源的第二上层资源; 第五确定单元 690, 用于根据该第二上层资源与该第一资源的关系, 确 定是否对该第一下层资源进行级联删除操作。
可选地, 如图 19所示, 该第五确定单元 690包括:
第二释放子单元 691 , 用于在该第二上层资源仅包括该第一资源时,释 放该第一下层资源;
第三删除子单元 692,用于在该第二上层资源包括除该第一资源之外的 资源时, 删除该第一下层资源的上层资源包含信息中、 对该第一资源的上 层资源包含信息。
因此, 本发明实施例的管理资源的装置, 通过根据目标资源的上下层 资源包含信息对该目标资源进行管理, 能够快速确定目标资源的下层资源, 并更新该下层资源的包含信息, 从而能够在删除资源时, 简单高效地维护 资源关系的完整性和有效性, 并避免操作的二义性。
可选地, 如图 20所示, 该管理模块 520包括:
第六确定单元 710, 用于根据该第一资源的下层资源包含信息, 将该第 一资源的其中一个下层资源确定为第二下层资源;
第七确定单元 720, 用于根据该第二下层资源的上层资源包含信息, 确 定该第二下层资源的第三上层资源;
第八确定单元 730, 用于根据该第三上层资源与该第一资源的关系, 确 定是否对该第二下层资源进行级联删除操作;
第二译放单元 740, 用于译放该第一资源。
可选地, 如图 21所示, 该第八确定单元 730包括:
第三译放子单元 731 , 用于在该第三上层资源仅包括该第一资源时,释 放该第二下层资源;
第四删除子单元 732,用于在该第三上层资源包括除该第一资源之外的 资源时, 删除该第二下层资源的上层资源包含信息中、 对该第一资源的上 层资源包含信息。
应理解, 根据本发明实施例的管理资源的装置 500可对应于本发明实 施例中的云服务系统, 并且装置 500中的各个模块的上述和其它操作和 /或 功能分别为了实现图 2至图 12中的各个方法的相应流程, 为了简洁, 在此 不再赘述。
因此, 本发明实施例的管理资源的装置, 通过根据目标资源的上下层 资源包含信息对该目标资源进行管理, 能够快速确定目标资源的下层资源, 并更新该下层资源的包含信息, 从而能够在删除资源时, 简单高效地维护 资源关系的完整性和有效性, 并避免操作的二义性。
本领域普通技术人员可以意识到, 结合本文中所公开的实施例描述的 各示例的单元及算法步骤, 能够以电子硬件、 计算机软件或者二者的结合 来实现, 为了清楚地说明硬件和软件的可互换性, 在上述说明中已经按照 功能一般性地描述了各示例的组成及步骤。 这些功能究竟以硬件还是软件 方式来执行, 取决于技术方案的特定应用和设计约束条件。 专业技术人员 可以对每个特定的应用来使用不同方法来实现所描述的功能, 但是这种实 现不应认为超出本发明的范围。
所属领域的技术人员可以清楚地了解到, 为了描述的方便和简洁, 上 述描述的系统、 装置和单元的具体工作过程, 可以参考前述方法实施例中 的对应过程, 在此不再贅述。
在本申请所提供的几个实施例中, 应该理解到, 所揭露的系统、 装置 和方法, 可以通过其它的方式实现。 例如, 以上所描述的装置实施例仅仅 是示意性的, 例如, 所述单元的划分, 仅仅为一种逻辑功能划分, 实际实 现时可以有另外的划分方式, 例如多个单元或组件可以结合或者可以集成 到另一个系统, 或一些特征可以忽略, 或不执行。 另外, 所显示或讨论的 相互之间的耦合或直接耦合或通信连接可以是通过一些接口、 装置或单元 的间接耦合或通信连接, 也可以是电的, 机械的或其它的形式连接。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的, 作为单元显示的部件可以是或者也可以不是物理单元, 即可以位于一个地 方, 或者也可以分布到多个网络单元上。 可以根据实际的需要选择其中的 部分或者全部单元来实现本发明实施例方案的目的。
另外, 在本发明各个实施例中的各功能单元可以集成在一个处理单元 中, 也可以是各个单元单独物理存在, 也可以是两个或两个以上单元集成 在一个单元中。 上述集成的单元既可以采用硬件的形式实现, 也可以采用 软件功能单元的形式实现。
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销 售或使用时, 可以存储在一个计算机可读取存储介质中。 基于这样的理解, 本发明的技术方案本质上或者说对现有技术做出贡献的部分, 或者该技术 方案的全部或部分可以以软件产品的形式体现出来, 该计算机软件产品存 储在一个存储介质中, 包括若干指令用以使得一台计算机设备(可以是个 人计算机, 服务器, 或者网络设备等)执行本发明各个实施例所述方法的 全部或部分步骤。 而前述的存储介质包括: U盘、 移动硬盘、 只读存储器 ( ROM, Read-Only Memory ), 随机存取存储器 (RAM, Random Access Memory )、 磁碟或者光盘等各种可以存储程序代码的介质。
以上所述, 仅为本发明的具体实施方式, 但本发明的保护范围并不局 限于此, 任何熟悉本技术领域的技术人员在本发明揭露的技术范围内, 可 轻易想到各种等效的修改或替换, 这些修改或替换都应涵盖在本发明的保 护范围之内。 因此, 本发明的保护范围应以权利要求的保护范围为准。

Claims

权利要求
1、 一种管理资源的方法, 其特征在于, 包括:
在确定删除云服务系统的第一资源时, 获取所述第一资源的上层资源 包含信息和 /或下层资源包含信息;
根据所述第一资源的上层资源包含信息和 /或下层资源包含信息, 管理 所述第一资源。
2、 根据权利要求 1所述的方法, 其特征在于, 所述方法还包括: 接收用户发送的用于请求创建所述第一资源的上层资源包含信息的请 求消息;
根据所述请求消息 , 设置所述第一资源的上层资源包含信息。
3、 根据权利要求 1或 2所述的方法, 其特征在于, 所述管理所述第一 资源, 包括:
根据所述第一资源的上层资源包含信息, 确定所述第一资源的第一上 层资源;
在所述第一上层资源仅包括一个资源时, 删除所述第一上层资源的下 层资源包含信息中、 对所述第一资源的下层资源包含信息;
译放所述第一资源。
4、 根据权利要求 1或 2所述的方法, 其特征在于, 所述管理所述第一 资源, 包括:
根据所述第一资源的上层资源包含信息, 确定所述第一资源的第一上 层资源;
在所述第一上层资源包括至少两个资源时, 提示用户选择删除操作的 内容;
根据所述用户的选择结果, 执行相应的删除操作。
5、 根据权利要求 4所述的方法, 其特征在于, 所述执行相应的删除操 作, 包括:
在所述用户选择译放所述第一资源时, 删除所述第一上层资源中各上 层资源的下层资源包含信息中、 对所述第一资源的下层资源包含信息; 译放所述第一资源。
6、 根据权利要求 4所述的方法, 其特征在于, 所述执行相应的删除操 作, 包括: 在所述用户选择不译放所述第一资源时, 删除所述第一上层资源中特 定上层资源的下层资源包含信息中、 对所述第一资源的下层资源包含信息, 以及删除所述第一资源的上层资源包含信息中、 对所述特定上层资源的上 层资源包含信息。
7、 根据权利要求 3或 5所述的方法, 其特征在于, 在译放所述第一资 源之前, 所述管理所述第一资源还包括:
根据所述第一资源的下层资源包含信息, 将所述第一资源的其中一个 下层资源确定为第一下层资源;
根据所述第一下层资源的上层资源包含信息, 确定所述第一下层资源 的第二上层资源;
根据所述第二上层资源与所述第一资源的关系, 确定是否对所述第一 下层资源进行级联删除操作。
8、 根据权利要求 7所述的方法, 其特征在于, 所述确定是否对所述第 一下层资源进行级联删除操作, 包括:
在所述第二上层资源仅包括所述第一资源时, 译放所述第一下层资源; 在所述第二上层资源包括除所述第一资源之外的资源时, 删除所述第 一下层资源的上层资源包含信息中、 对所述第一资源的上层资源包含信息。
9、 根据权利要求 1或 2所述的方法, 其特征在于, 所述管理所述第一 资源, 包括:
根据所述第一资源的下层资源包含信息, 将所述第一资源的其中一个 下层资源确定为第二下层资源;
根据所述第二下层资源的上层资源包含信息, 确定所述第二下层资源 的第三上层资源;
根据所述第三上层资源与所述第一资源的关系, 确定是否对所述第二 下层资源进行级联删除操作;
译放所述第一资源。
10、 根据权利要求 9所述的方法, 其特征在于, 所述确定是否对所述 第二下层资源进行级联删除操作, 包括:
在所述第三上层资源仅包括所述第一资源时, 译放所述第二下层资源; 在所述第三上层资源包括除所述第一资源之外的资源时, 删除所述第 二下层资源的上层资源包含信息中、 对所述第一资源的上层资源包含信息。
11、 一种管理资源的装置, 其特征在于, 包括:
获取模块, 用于在确定删除云服务系统的第一资源时, 获取所述第一 资源的上层资源包含信息和 /或下层资源包含信息;
管理模块, 用于根据所述第一资源的上层资源包含信息和 /或下层资源 包含信息, 管理所述第一资源。
12、 根据权利要求 11所述的装置, 其特征在于, 所述装置还包括: 接收模块, 用于接收用户发送的用于请求创建所述第一资源的上层资 源包含信息的请求消息;
设置模块, 用于根据所述请求消息, 设置所述第一资源的上层资源包 含信息。
13、 根据权利要求 11或 12所述的装置, 其特征在于, 所述管理模块 包括:
第一确定单元, 用于根据所述第一资源的上层资源包含信息, 确定所 述第一资源的第一上层资源;
删除单元, 用于在所述第一上层资源仅包括一个资源时, 删除所述第 一上层资源的下层资源包含信息中、 对所述第一资源的下层资源包含信息; 第一释放单元, 用于译放所述第一资源。
14、 根据权利要求 11或 12所述的装置, 其特征在于, 所述管理模块 包括:
第二确定单元, 用于根据所述第一资源的上层资源包含信息, 确定所 述第一资源的第一上层资源;
提示单元, 用于在所述第一上层资源包括至少两个资源时, 提示用户 选择删除操作的内容;
执行单元, 用于根据所述用户的选择结果, 执行相应的删除操作。
15、 根据权利要求 14所述的装置, 其特征在于, 所述执行单元包括: 第一删除子单元, 用于在所述用户选择译放所述第一资源时, 删除所 述第一上层资源中各上层资源的下层资源包含信息中、 对所述第一资源的 下层资源包含信息;
第一译放子单元, 用于译放所述第一资源。
16、 根据权利要求 14所述的装置, 其特征在于, 所述执行单元包括: 第二删除子单元, 用于在所述用户选择不译放所述第一资源时, 删除 所述第一上层资源中特定上层资源的下层资源包含信息中、 对所述第一资 源的下层资源包含信息, 以及删除所述第一资源的上层资源包含信息中、 对所述特定上层资源的上层资源包含信息。
17、 根据权利要求 13或 15所述的装置, 其特征在于, 所述管理模块 还包括:
第三确定单元, 用于根据所述第一资源的下层资源包含信息, 将所述 第一资源的其中一个下层资源确定为第一下层资源;
第四确定单元, 用于根据所述第一下层资源的上层资源包含信息, 确 定所述第一下层资源的第二上层资源;
第五确定单元, 用于根据所述第二上层资源与所述第一资源的关系, 确定是否对所述第一下层资源进行级联删除操作。
18、 根据权利要求 17所述的装置, 其特征在于, 所述第五确定单元包 括:
第二译放子单元, 用于在所述第二上层资源仅包括所述第一资源时, 译放所述第一下层资源;
第三删除子单元, 用于在所述第二上层资源包括除所述第一资源之外 的资源时, 删除所述第一下层资源的上层资源包含信息中、 对所述第一资 源的上层资源包含信息。
19、 根据权利要求 11或 12所述的装置, 其特征在于, 所述管理模块 包括:
第六确定单元, 用于根据所述第一资源的下层资源包含信息, 将所述 第一资源的其中一个下层资源确定为第二下层资源;
第七确定单元, 用于根据所述第二下层资源的上层资源包含信息, 确 定所述第二下层资源的第三上层资源;
第八确定单元, 用于根据所述第三上层资源与所述第一资源的关系, 确定是否对所述第二下层资源进行级联删除操作;
第二译放单元, 用于译放所述第一资源。
20、 根据权利要求 19所述的装置, 其特征在于, 所述第八确定单元包 括:
第三译放子单元, 用于在所述第三上层资源仅包括所述第一资源时, 译放所述第二下层资源; 第四删除子单元, 用于在所述第三上层资源包括除所述第一资源之外 的资源时, 删除所述第二下层资源的上层资源包含信息中、 对所述第一资 源的上层资源包含信息。
PCT/CN2012/078740 2012-01-11 2012-07-17 管理资源的方法和装置 WO2013104181A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201210007082.3 2012-01-11
CN201210007082.3A CN103207813B (zh) 2012-01-11 2012-01-11 管理资源的方法和装置

Publications (1)

Publication Number Publication Date
WO2013104181A1 true WO2013104181A1 (zh) 2013-07-18

Family

ID=48755042

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2012/078740 WO2013104181A1 (zh) 2012-01-11 2012-07-17 管理资源的方法和装置

Country Status (2)

Country Link
CN (1) CN103207813B (zh)
WO (1) WO2013104181A1 (zh)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104243292A (zh) * 2014-10-14 2014-12-24 中国联合网络通信集团有限公司 一种邮件管理系统及邮箱动态扩容方法
CN104317857A (zh) * 2014-10-15 2015-01-28 安徽华贞信息科技有限公司 一种房屋信息采集服务系统
US20240064194A1 (en) * 2013-09-20 2024-02-22 Convida Wireless, Llc Enhanced m2m content management based on interest

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104639590B (zh) * 2013-11-13 2017-11-07 同济大学 一种终端获取云服务的方法
CN108459910A (zh) * 2018-03-02 2018-08-28 上海云轴信息科技有限公司 一种删除资源的方法及设备
CN114651236A (zh) * 2020-02-06 2022-06-21 Oppo广东移动通信有限公司 资源删除方法、装置、设备及存储介质
CN112181590A (zh) * 2020-09-25 2021-01-05 烽火通信科技股份有限公司 云平台内资源删除方法、装置、设备及可读存储介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1545048A (zh) * 2003-11-17 2004-11-10 中兴通讯股份有限公司 一种用二维表实现的树的存储、访问的方法
US20050278354A1 (en) * 2004-06-04 2005-12-15 Vinay Gupta Dynamic hierarchical data structure tree building and state propagation using common information model
CN1729467A (zh) * 2002-11-06 2006-02-01 甲骨文国际公司 用于管理来自单个接口的多层次数据的技术
CN1851694A (zh) * 2005-09-07 2006-10-25 华为技术有限公司 一种对系统资源进行管理的实现方法

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101453379B (zh) * 2009-01-06 2010-12-08 中国人民解放军信息工程大学 一种资源管理方法和系统
CN101640613B (zh) * 2009-09-11 2012-01-25 中兴通讯股份有限公司 一种网络资源关联管理的方法及装置

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1729467A (zh) * 2002-11-06 2006-02-01 甲骨文国际公司 用于管理来自单个接口的多层次数据的技术
CN1545048A (zh) * 2003-11-17 2004-11-10 中兴通讯股份有限公司 一种用二维表实现的树的存储、访问的方法
US20050278354A1 (en) * 2004-06-04 2005-12-15 Vinay Gupta Dynamic hierarchical data structure tree building and state propagation using common information model
CN1851694A (zh) * 2005-09-07 2006-10-25 华为技术有限公司 一种对系统资源进行管理的实现方法

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20240064194A1 (en) * 2013-09-20 2024-02-22 Convida Wireless, Llc Enhanced m2m content management based on interest
CN104243292A (zh) * 2014-10-14 2014-12-24 中国联合网络通信集团有限公司 一种邮件管理系统及邮箱动态扩容方法
CN104317857A (zh) * 2014-10-15 2015-01-28 安徽华贞信息科技有限公司 一种房屋信息采集服务系统
CN104317857B (zh) * 2014-10-15 2019-03-22 深圳市易图资讯股份有限公司 一种房屋信息采集服务系统

Also Published As

Publication number Publication date
CN103207813A (zh) 2013-07-17
CN103207813B (zh) 2018-08-14

Similar Documents

Publication Publication Date Title
WO2013104181A1 (zh) 管理资源的方法和装置
WO2018059222A1 (zh) 一种文件切片上传方法、装置及云存储系统
US8788760B2 (en) Adaptive caching of data
US10430510B2 (en) Method for controlling access to electronic documents based on stateless communication
TWI431978B (zh) Methods, devices and systems for obtaining resources
CN103780679B (zh) 基于http协议的长延时远程调用方法
WO2015067117A1 (zh) 一种云上传方法及系统、调度设备、客户端
WO2017113201A1 (zh) 一种网络服务的生命周期管理方法及设备
WO2015180648A1 (zh) 一种资源分配的方法及装置
WO2013078875A1 (zh) 内容的管理方法的方法、装置和系统
WO2012139474A1 (zh) 数据的获取方法、设备和系统
WO2014190544A1 (zh) 应用部署方法和设备
WO2014183417A1 (zh) 管理内存的方法、装置和系统
WO2016141783A1 (zh) 访问控制、策略获取、属性获取方法及相关装置
WO2012102731A1 (en) Utilizing content via personal clouds
WO2014161261A1 (zh) 数据的存储方法及装置
JP2022526803A (ja) ネットワークに基づいたメディア処理(nbmp)におけるメディア処理機能のための構成パラメータのグラフ表現及び記述
WO2015131523A1 (zh) 数据查询方法、系统及计算机存储介质
US10474643B2 (en) Distributed file system and method of creating files effectively
CN110324722A (zh) 直播间中数据的获取方法、装置、设备和存储介质
KR101080862B1 (ko) Rest 스타일 제삼자호 api시스템 및 운영방법
CN104054308A (zh) 应用层资源选择的方法、装置和系统
TWI505100B (zh) 在區域網路中進行資料分享與數據同步的方法
AU2017382907B2 (en) Technologies for scaling user interface backend clusters for database-bound applications
US20140149499A1 (en) Remote request fulfillment and delivery

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: 12865402

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: 12865402

Country of ref document: EP

Kind code of ref document: A1