CN109981322B - Method and device for cloud resource management based on label - Google Patents

Method and device for cloud resource management based on label Download PDF

Info

Publication number
CN109981322B
CN109981322B CN201711460710.2A CN201711460710A CN109981322B CN 109981322 B CN109981322 B CN 109981322B CN 201711460710 A CN201711460710 A CN 201711460710A CN 109981322 B CN109981322 B CN 109981322B
Authority
CN
China
Prior art keywords
label
cloud resource
cloud
tag
strategy
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
CN201711460710.2A
Other languages
Chinese (zh)
Other versions
CN109981322A (en
Inventor
郝鹏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology Co Ltd
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 Beijing Jingdong Century Trading Co Ltd, Beijing Jingdong Shangke Information Technology Co Ltd filed Critical Beijing Jingdong Century Trading Co Ltd
Priority to CN201711460710.2A priority Critical patent/CN109981322B/en
Publication of CN109981322A publication Critical patent/CN109981322A/en
Application granted granted Critical
Publication of CN109981322B publication Critical patent/CN109981322B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0893Assignment of logical groups to network elements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/50Network service management, e.g. ensuring proper service fulfilment according to agreements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/50Network service management, e.g. ensuring proper service fulfilment according to agreements
    • H04L41/5041Network service management, e.g. ensuring proper service fulfilment according to agreements characterised by the time relationship between creation and deployment of a service
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network

Abstract

The invention discloses a method and a device for cloud resource management based on labels, and relates to the technical field of computers. One embodiment of the method comprises: acquiring a cloud resource list corresponding to the label according to the operation type and the label identification; and determining the cloud resources selected from the cloud resource list according to the cloud resource identification, and executing operation on the cloud resources to realize the label-based cloud resource management. The implementation method can independently take out the tags as an independent service for management, so that an independent list page can be conveniently established for the tags, operation items such as tag creation, tag binding cloud resources and tag unbinding cloud resources can be conveniently provided on the list page, and uniform management of tag operation is realized; the unified management of cloud resources with the same label is realized, the scene requirement that a plurality of cloud resources are bound by a single label at the same time is met, and the operation and maintenance cost is reduced.

Description

Method and device for cloud resource management based on label
Technical Field
The invention relates to the technical field of computers, in particular to a method and a device for cloud resource management based on labels.
Background
In recent years, with the maturity and development of cloud computing technology, the trend of enterprise-level business migration from a traditional data center to a cloud platform is more obvious. The enterprise-level service has the characteristics of more resources, large scale and more service types, so that the operation and maintenance efficiency can be effectively improved by realizing grouping management on the cloud resources on the cloud platform, and a uniform management strategy is provided for the cloud resources. The cloud resources are various data stored in the cloud platform.
Currently, mainstream cloud service providers, such as Microsoft Azure and Amazon AWS, provide functions such as resource groups and tags for users to implement requirements of cloud resource grouping management, resource management across resource groups, and the like. Through the mode of the resource group, a user can divide all cloud resources into different resource groups according to requirements, and specific management strategies are implemented aiming at the resource groups, so that unified management of the resources is realized. The resource group focuses on helping users realize the grouping management of a large number of cloud resources, for example, the cloud resources are classified into different resource groups according to the attributes of departments, functions and the like, and a uniform management strategy is implemented on the resource group level; on the other hand, through the label mode, the user can add the same label for the cloud resources which belong to different resource groups and have the same characteristics, and then utilize the label to screen the resources, so that the uniform management of the cloud resources with the same characteristics is realized. The label focuses on helping the user to realize the grouping management of cloud resources with the same characteristics, for example, cloud resources belonging to different resource groups have the same region attribute, and the user can realize the unified management of resources belonging to different resource groups but having the same region attribute by creating the label 'region-China' and identifying the cloud resources.
The conventional cloud resource management scheme is described below with reference to fig. 1. Fig. 1 is a schematic diagram of a conventional cloud resource management process. The method comprises the steps of creating a resource group and configuring a management strategy of the resource group to complete the creation of the resource group; then, cloud resources can be added to the resource group, when the cloud resources are added, whether the current strategy of the cloud resources is consistent with the strategy of the resource group needs to be judged, if so, the strategy of the resource group is applied to the cloud resources, otherwise, the cloud resources preferentially adopt the strategy with high level; then, the operation page of the cloud resource can be displayed as the tag added to the cloud resource. When cloud resources which are located in different resource groups and have the same characteristics need to be searched through the tags, the cloud resources can be searched according to the key-value pairs of the tags, and for the screened cloud resources, if the strategy of one or more cloud resources needs to be modified, the strategy needs to be configured for each cloud resource through a programming interface. And then, the system judges whether the newly configured strategy is consistent with the original strategy or not for each cloud resource in sequence, if so, the original configuration is reserved, and otherwise, the newly configured strategy is covered on the original strategy.
The final purpose of implementing grouping management on cloud resources is to apply uniform policies such as role allocation, authority control, log recording, monitoring alarm and the like on the cloud resources in the group. At present, in a resource group level, a mainstream cloud service provider provides a role allocation, authority control, log recording, monitoring and alarming and other policy configuration entrance for a user, and after a cloud resource is added into a resource group, the cloud resource inherits a resource group policy. And when the resource group strategy is inconsistent with the cloud resource strategy, the cloud resource preferentially adopts a higher-level strategy.
By means of the resource group, the user can implement uniform policy control on the resources in the group. For the cloud resources with the same characteristics inside and across resource groups to implement grouping unified management, the assistance of a labeling tool is needed. The specific implementation manner is that a user creates a label on a cloud resource operation interface, the label is implemented in a form of a key-value pair, the "key" is usually a certain attribute of the cloud resource, and the "value" is usually a selectable value of the attribute. And the user repeats the above operations and adds a label to each resource needing to be identified.
After the cloud resource label is added, the user can filter out the cloud resources needing to be operated by using the label key-value pair as a screening condition, and implement the operation of the management strategy aiming at the part of the cloud resources. In a general implementation form, a user calls an API (Application Programming Interface) provided by a cloud service provider to screen a cloud resource with a certain label in a Programming manner, and applies a unified management policy on a resource-by-resource basis.
In the process of implementing the invention, the inventor finds that at least the following problems exist in the prior art:
1) in the prior art, there are two ways to bind/unbind the cloud resource and the tag, one is to create/delete the tag for the cloud resource one by one through a cloud resource operation page; the other is to add/delete tags to/from cloud resources by writing/removing tags to/from cloud resource attributes through a programming interface provided by the cloud service provider. In the two modes, label management is carried out in the dimension of the cloud resource, the label is only an attached attribute of the cloud resource, and when a plurality of cloud resources in a plurality of resource groups need to be added with the same label, repeated operation is frequently required, so that great operation and maintenance workload is brought; moreover, the existing technical scheme cannot deal with a scene that a plurality of cloud resources are bound to a single label at the same time;
2) in the prior art, the label focuses on assisting in achieving the screening and filtering operation of the cloud resources, and then a user needs to achieve policy management operation on screened cloud resources in a programming mode. In this way, the user needs to pay attention to both the implementation of the policy management interface and the code and the formulation of the management policy, which increases the operation cost of the service.
Disclosure of Invention
In view of this, embodiments of the present invention provide a method and an apparatus for label-based cloud resource management, which can independently obtain a label as an independent service for management, and further can conveniently establish an independent list page for the label and provide operation items such as creating a label, binding a label to a cloud resource, unbinding a label from the cloud resource on the list page, thereby implementing unified management of label operations; the unified management of cloud resources with the same label is realized, the scene requirement that a plurality of cloud resources are bound by a single label at the same time is met, and the operation and maintenance cost is reduced.
To achieve the above object, according to an aspect of the embodiments of the present invention, a method for tag-based cloud resource management is provided.
A method of tag-based cloud resource management, comprising: acquiring a cloud resource list corresponding to the label according to the operation type and the label identification; and determining the cloud resources selected from the cloud resource list according to the cloud resource identification, and executing operation on the cloud resources to realize the label-based cloud resource management.
Optionally, the operation types include: label binding, label unbinding, label modification, and label deletion.
Optionally, if the operation type is label binding, the cloud resource list corresponding to the label is a cloud resource list to which the label can be bound; and, the step of performing an operation on the cloud resource comprises: and modifying the strategy item of the cloud resource according to the strategy item identifier of the label and the strategy value corresponding to the strategy item.
Optionally, if the operation type is label unbinding, the cloud resource list corresponding to the label is the cloud resource list to which the label is bound; and, the step of performing an operation on the cloud resource comprises: and modifying the value of the strategy item of the cloud resource into the strategy value of the resource group where the cloud resource is located.
Optionally, if the operation type is tag modification, the cloud resource list corresponding to the tag is a cloud resource list to which the tag is bound, and the cloud resources are all cloud resources included in the cloud resource list; and, the step of performing an operation on the cloud resource comprises: and modifying the strategy items of the cloud resources according to the strategy item identification of the label changing and the strategy value corresponding to the strategy items.
Optionally, if the operation type is label deletion, the cloud resource list corresponding to the label is a cloud resource list to which the label is bound, and the cloud resources are all cloud resources included in the cloud resource list; and, the step of performing an operation on the cloud resource comprises: modifying the value of the strategy item of the cloud resource into the strategy value of the resource group where the cloud resource is located; after the step of performing the operation on the cloud resource, the method further comprises: and deleting the label.
According to another aspect of the embodiment of the invention, a device for label-based cloud resource management is provided.
An apparatus of tag-based cloud resource management, comprising: the cloud resource acquisition module is used for acquiring a cloud resource list corresponding to the label according to the operation type and the label identification; and the cloud resource operation module is used for determining the cloud resources selected from the cloud resource list according to the cloud resource identification and executing operation on the cloud resources so as to realize the label-based cloud resource management.
Optionally, the operation types include: label binding, label unbinding, label modification, and label deletion.
Optionally, if the operation type is label binding, the cloud resource list corresponding to the label is a cloud resource list to which the label can be bound; and the cloud resource operation module is further configured to: and modifying the strategy item of the cloud resource according to the strategy item identifier of the label and the strategy value corresponding to the strategy item.
Optionally, if the operation type is label unbinding, the cloud resource list corresponding to the label is the cloud resource list to which the label is bound; and the cloud resource operation module is further configured to: and modifying the value of the strategy item of the cloud resource into the strategy value of the resource group where the cloud resource is located.
Optionally, if the operation type is tag modification, the cloud resource list corresponding to the tag is a cloud resource list to which the tag is bound, and the cloud resources are all cloud resources included in the cloud resource list; and the cloud resource operation module is further configured to: and modifying the strategy items of the cloud resources according to the strategy item identification of the label changing and the strategy value corresponding to the strategy items.
Optionally, if the operation type is label deletion, the cloud resource list corresponding to the label is a cloud resource list to which the label is bound, and the cloud resources are all cloud resources included in the cloud resource list; and the cloud resource operation module is further configured to: modifying the value of the strategy item of the cloud resource into the strategy value of the resource group where the cloud resource is located; the device further comprises: and the label deleting module is used for deleting the label after the operation is executed on the cloud resource.
According to another aspect of the embodiment of the invention, an electronic device for label-based cloud resource management is provided.
An electronic device for tag-based cloud resource management, comprising: one or more processors; the storage device is used for storing one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors implement the method for label-based cloud resource management provided by the embodiment of the invention.
According to yet another aspect of embodiments of the present invention, a computer-readable medium is provided.
A computer readable medium, on which a computer program is stored, which when executed by a processor implements a method for tag-based cloud resource management provided by an embodiment of the present invention.
One embodiment of the above invention has the following advantages or benefits: the cloud resource list corresponding to the labels is obtained according to the operation type and the label identification, and the cloud resources selected from the cloud resource list are operated to realize label-based cloud resource management, so that the labels can be independently taken out to be managed as an independent service, an independent list page can be conveniently established for the labels, operation items such as label creation, label binding of cloud resources and label unbinding of the cloud resources can be conveniently provided on the list page, and uniform management of label operation is realized; on the basis of the original tag function, after the tag is bound with the cloud resource, the cloud resource can conveniently acquire the associated policy in the tag by using the tag association policy description file, so that the uniform management of the cloud resource with the same tag is realized, the scene requirement that a plurality of cloud resources are bound by a single tag at the same time is met, and the operation and maintenance cost is reduced.
Further effects of the above-mentioned non-conventional alternatives will be described below in connection with the embodiments.
Drawings
The drawings are included to provide a better understanding of the invention and are not to be construed as unduly limiting the invention. Wherein:
FIG. 1 is a schematic diagram of a conventional cloud resource management process;
FIG. 2 is a schematic diagram of a label design principle of an embodiment of the invention;
FIG. 3 is a schematic diagram of a tag list page structure according to an embodiment of the invention;
FIG. 4 is a schematic diagram of a main flow of a method of tag-based cloud resource management according to an embodiment of the present invention;
FIG. 5 is a schematic flow chart of cloud resource management according to an embodiment of the present invention;
FIG. 6 is a flowchart illustrating a tag bound cloud resource according to an embodiment of the present invention;
FIG. 7 is a schematic flow chart of unbinding a cloud resource according to an embodiment of the present invention;
FIG. 8 is a schematic diagram of the main modules of an apparatus for tag-based cloud resource management according to an embodiment of the present invention;
FIG. 9 is an exemplary system architecture diagram in which embodiments of the present invention may be employed;
fig. 10 is a schematic block diagram of a computer system suitable for use in implementing a terminal device or server according to an embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present invention are described below with reference to the accompanying drawings, in which various details of embodiments of the invention are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
In order to solve the problems in the prior art, the invention can be in butt joint with a cloud resource management system provided by the existing mainstream cloud service provider in a plug-in mode, so that the tag is independently taken out to be used as an independent service instead of being used as the accessory attribute of the cloud resource for management, an independent tag operation page is set, the operation of binding the cloud resource by the tag is supported, and the scene of binding a plurality of cloud resources by a single tag is better realized. On the basis of reserving the label "key-value" pair of functions, the functions described by the strategy are added to the label. Through the association of the label and the policy description file, the aim that the cloud resource automatically applies the management policy in the label policy description file after the label binds the cloud resource is achieved, and the function is equivalent to the aim that the label is a policy control center. The policy description file is described by a formatting description Language such as XML (Extensible Markup Language), JSON (JavaScript Object Notation), YAML (Yet antenna Markup Language, which is a recursive abbreviation of YAML Ain't a Markup Language, and Another Markup Language), and the like. The policy description file needs to be described by using a standardized formatting language, so that the system can conveniently parse the file.
The technical scheme of the invention is based on the resource group and the label technology of the existing cloud platform, and the differences are as follows:
1) the tag function is extracted from the attached attributes of the cloud resources, the tag function is managed as an independent service in the cloud platform, and an independent list page and an independent operation item are set for the tag;
2) the invention sets the function of associating management strategies for the label on the basis of the original key-value pair function of the label function, and realizes the purpose of the label, namely a strategy control center.
Fig. 2 is a schematic diagram of a label design principle of an embodiment of the present invention. As shown in FIG. 2, the present invention enables unified policy management of cloud resources with the same characteristics within and across resource groups through a single tag.
Fig. 3 is a schematic diagram of a tag list page structure according to an embodiment of the present invention. As shown in fig. 3, the tag list page may mainly contain the following parts:
1) tag list: after a user enters a label list page, the system displays all created labels under a current account for the user in a label list mode; each label in the label list is a label resource, and the label resource mainly comprises a label identification number, a label key-value pair, a label policy description file, a label operation item and the like. Wherein:
and (3) tag identification number: when the label is created, the system generates a unique identification number for the label, and the form is as follows: tag-UUID. The "tag" part is a fixed part, and the UUID (Universally Unique Identifier) is a Unique Identifier created by the system for the resource, and the UUID is typically generated using a programming language, such as a self-contained UUID generation tool in Java, Python. Generally, a UUID is a random combination of numbers to ensure uniqueness within a system. The form of the UUID is exemplified by 32 characters in the form of 8-4-4-12 containing 32 16 digits divided into five segments, examples being: 550e8400-e29b-41d4-a 716-446655440000;
label "key-value" pair: the 'key-value' pair filled in when the label is created can be edited and modified;
label policy description file: when creating the label, the strategy description written by the formatting description language such as XML, JSON or YAML can be edited and modified;
a label operation item: operations of binding cloud resources, unbinding cloud resources and deleting tags can be provided;
2) label creation: creation of the tag may be performed by clicking a create tag function key on the tag list page. According to the introduction of the label resource, the label 'key-value' pair and the label policy description file are editable and modifiable during label creation, so that the label creation page provides an edit box for writing the 'key-value' pair and an edit box for writing the policy description file for a user.
Fig. 4 is a schematic diagram of a main flow of a method of tag-based cloud resource management according to an embodiment of the present invention. As shown in fig. 4, the method for label-based cloud resource management according to the embodiment of the present invention mainly includes the following steps S401 and S402.
Step S401: acquiring a cloud resource list corresponding to the label according to the operation type and the label identification;
step S402: and determining the cloud resources selected from the cloud resource list according to the cloud resource identification, and executing operation on the cloud resources to realize the label-based cloud resource management.
The operation types of the label mainly comprise: label binding, label unbinding, label modification, and label deletion.
According to the technical scheme of the embodiment of the invention, if the operation type is label binding, the cloud resource list corresponding to the label is the cloud resource list which can be bound by the label; and, the step of performing an operation on the cloud resource includes: and modifying the strategy items of the cloud resources according to the strategy item identification of the label and the strategy values corresponding to the strategy items.
If the operation type is label unbinding, the cloud resource list corresponding to the label is the cloud resource list to which the label is bound; and, the step of performing an operation on the cloud resource includes: and modifying the value of the strategy item of the cloud resource into the strategy value of the resource group where the cloud resource is located.
If the operation type is label modification, the cloud resource list corresponding to the label is the cloud resource list bound by the label, and the selected cloud resources are all cloud resources included in the cloud resource list; and, the step of performing an operation on the cloud resource includes: and modifying the strategy items of the cloud resources according to the strategy item identifiers of which the labels are changed and the strategy values corresponding to the strategy items.
If the operation type is label deletion, the cloud resource list corresponding to the label is the cloud resource list bound by the label, and the selected cloud resources are all cloud resources included in the cloud resource list; and, the step of performing an operation on the cloud resource includes: modifying the value of the strategy item of the cloud resource into the strategy value of the resource group where the cloud resource is located; after performing the operation on the cloud resource, the method may further include: the tag is deleted.
Before performing operations such as label binding, label unbinding, label modification, label deletion and the like, a label needs to be created in advance. The implementation of the embodiment of the present invention will be described with reference to fig. 5 to 7.
Fig. 5 is a schematic flow chart of cloud resource management according to an embodiment of the present invention. In the description of this embodiment, the process of creating a resource group and adding a cloud resource to the resource group is omitted, and the process of creating a tag and binding the tag to the cloud resource is mainly described. As shown in fig. 5, the main flow of an embodiment of the present invention may include the following steps:
1) the user enters a label list page;
2) clicking a created label, and entering a label creation bullet box, wherein the method comprises the following steps:
writing "key-value" pairs, such as "region-China";
writing a policy description file, for example:
Figure BDA0001530105510000101
Figure BDA0001530105510000111
the example above implements a policy to set 15 level monitoring for event-A events. It should be noted that, the fields in the policy description file, such as < policy >, </monitor >, < event >, etc., and all the optional values of the corresponding fields, such as 15, etc., are set by the cloud service provider according to the functions of the cloud platform policy management system itself, and form a usage document to be provided to the user. In addition, when a field and a corresponding field optional value need to be newly added, a mechanism for analyzing the newly added field and processing the optional value needs to be added to the strategy description file background analysis code;
3) clicking to confirm creation, finishing label creation, returning to a label list page to check the created label;
4) clicking a label binding cloud resource option in the operation item of the created label, and realizing the label binding cloud resource according to the following processes: firstly, a user acquires a cloud resource list which can be bound, generally all the cloud resources which are not bound by the label at present, and can also set rules according to needs to screen out the cloud resource list which can be bound, wherein the cloud resources can be respectively shown in the list according to the cloud resource categories, such as cloud hosts, cloud hard disks, public network IP and the like; then, the user selects one or more cloud resources to be bound, which can be located in the same resource group or different resource groups; then, the cloud resource management system performs policy consistency detection on all selected cloud resources, judges whether the current policy of the cloud resources is consistent with the policy of the tag to be bound, if so, retains the original policy configuration, otherwise, the policy of the tag to be bound covers the original policy configuration; finally, the cloud resources to which the tag is bound can be viewed on the tag list page.
Fig. 6 is a flowchart illustrating a tag binding cloud resource according to an embodiment of the present invention. As shown in fig. 6, the tag binding cloud resource process mainly includes the following steps:
1) in a user interface of a client, a user binds a certain label to a plurality of cloud resources, clicks for determination, and sends a label binding cloud resource request to a service system of a server;
2) the service system acquires all the cloud resources selected by the user, and applies the strategies described in the current label to the cloud resources one by one;
3) the service system obtains the policy items and their corresponding values in the policy description file of the tag through the tag parser and adds the policy items into a corresponding policy item list, such as adding the monitoring alarm policy items into the monitoring alarm policy item list, adding the authority control policy items into the authority control policy item list, and so on. The policy items correspond to fields in the policy description file, and the policy description file parsing code in the tag parser automatically locates the policy items according to the corresponding fields, for example: in the embodiment shown in fig. 5, the code may be located to the monitoring alarm system according to the field < monitor > in the example of the policy description file, the code may be located to the event-a in the monitoring alarm system according to the field < event >, and the level < level > of the event may be 15;
4) the business system triggers a strategy modification task and transmits a corresponding strategy item list to a corresponding system, such as transmitting a monitoring alarm strategy item list to a monitoring alarm system and a cloud resource list selected by a user;
5) and the resource management system, the authority control system and the monitoring alarm system match the cloud resources one by one and the strategy items one by one in the data table according to the cloud resource list and the strategy item list, and cover the label strategy with the original strategy configuration. Since the resource management system, the authority control system and the monitoring alarm system are all public service systems, all cloud resources relate to the three systems, and therefore the 3 systems are taken as examples in the embodiment of the invention. When the strategy items of the cloud resources are configured, if the new configuration value of the label strategy is different from the original configuration value of the original strategy, the new configuration value covers the original configuration value; if the new configuration value is the same as the original configuration value, no change is made;
6) after the strategy modification of all the cloud resources is completed, the system executing the strategy modification task respectively informs the service system of the completion of the strategy modification;
7) and displaying the binding relationship between the updated label and the cloud resource on a user interface of the client. The user can check the cloud resource information bound by the label through the label list page, and can also check the label bound by each cloud resource through the cloud resource list page.
Fig. 7 is a schematic flow chart of unbinding a cloud resource according to an embodiment of the present invention. As shown in fig. 7, the label unbinding cloud resource mainly includes the following steps:
1) in a user interface of a client, a user selects a certain label, selects a plurality of cloud resources to be unbound from the cloud resources bound by the label, clicks for determination, and sends a label unbound cloud resource request to a service system of a server;
2) the service system acquires a cloud resource list which is selected by a user and needs to be unbound, triggers a policy modification task, and transmits the cloud resource list to various systems, such as a resource management system, a permission management system and a monitoring alarm system;
3) the resource management system, the authority management system and the monitoring alarm system acquire a cloud resource list and modify the management strategy of the cloud resources in the resource list one by one to be the same as the resource group strategy of the cloud resources;
4) after the strategy modification of all the cloud resources is completed, each system executing the strategy modification task respectively informs the service system of the completion of the strategy modification;
5) and displaying the binding relationship between the updated label and the cloud resource on a user interface of the client. The user can check the cloud resource information bound by the label through the label list page, and can also check the label bound by each cloud resource through the cloud resource list page.
In addition, according to the technical scheme of the invention, when the label is modified, the strategy corresponding to the cloud resource list corresponding to the label is also modified correspondingly. If the user selects to modify the label, the service system of the server side modifies the strategy for all cloud resources in the cloud resource list bound by the label. When the strategy of the cloud resource is modified, one method is that the strategy items of the cloud resource are modified according to all the strategy items in the strategy description file after the label modification and the corresponding strategy values thereof as introduced in the process of binding the label to the cloud resource; the other method is that the strategy description files before and after the label is modified are compared to obtain the changed strategy item and the corresponding strategy value, and then the strategy item of the cloud resource is modified according to the changed content. Obviously, the latter is more optimal. In specific implementation, a cloud resource management scheme for how to modify the labels can be flexibly selected according to needs.
Similarly, the technical scheme of the invention can also realize label deletion. Before the label deletion is executed, all cloud resources bound by the label need to be unbound. If the user selects to delete the label, the service system of the server end prompts the user to unbind the label first. The process of label unbinding is shown in fig. 7, at this time, the cloud resource list corresponding to the label is all the cloud resources to which the label has been bound, and after the label unbinding is performed on all the cloud resources, the label is deleted.
According to the content introduced above, management of cloud resources based on tags can be achieved. Moreover, compared with the prior art, the technical scheme of the invention has the following beneficial effects:
1) in the prior art, tags are managed as attached attributes of cloud resources, although there is an independent list page, functions in the list page are limited to viewing the tags, and no operation item is provided. The label is independently taken out to be used as an independent service for management, an independent list page is established for the label, operation items such as label creation, label binding cloud resources and label unbinding cloud resources are provided on the list page, and uniform management of label operation is achieved;
2) in the prior art, the label binding/unbinding cloud resources adopt two modes, wherein one mode is that labels are created/deleted one by one; the other method is to call a related interface in a programming mode, and write/remove the tag into/from the cloud resource attribute when the cloud resource is operated, and both the two modes are to perform tag management in the dimension of the cloud resource, so that a user needs to frequently repeat operation, or consult the programming interface and write related codes, and the operation and maintenance workload is large. According to the invention, the label list page provides the cloud resource binding key and the cloud resource list capable of binding the label, so that a user can directly bind the label and the cloud resource on the interface, and the operation flow is simplified;
3) in the prior art, the tag only can help a user to realize the functions of cloud resource identification and screening, and a management strategy, such as authority control, monitoring level improvement and the like, is applied to the screened cloud resources, and a relevant interface needs to be called in a programming mode to modify a corresponding strategy, so that the user operation and maintenance cost is high, and the workload is large. According to the invention, on the basis of the original tag function, the tag association strategy description file is described, and the cloud resource can obtain the associated strategy in the tag while the tag is bound with the cloud resource, so that the uniform management of the cloud resource with the same tag is realized, the scene requirement that a plurality of cloud resources are bound by a single tag at the same time is met, and the operation and maintenance cost is reduced.
Fig. 8 is a schematic diagram of main modules of an apparatus for tag-based cloud resource management according to an embodiment of the present invention. As shown in fig. 8, an apparatus 800 for tag-based cloud resource management according to an embodiment of the present invention mainly includes a cloud resource obtaining module 801 and a cloud resource operating module 802.
The cloud resource obtaining module 801 is configured to obtain a cloud resource list corresponding to the tag according to the operation type and the tag identifier;
the cloud resource operation module 802 is configured to determine a cloud resource selected from the cloud resource list according to the cloud resource identifier, and perform an operation on the cloud resource to implement tag-based cloud resource management.
Wherein, the operation types mainly include: label binding, label unbinding, label modification, and label deletion.
According to the technical scheme of the embodiment of the invention, if the operation type is label binding, the cloud resource list corresponding to the label is the cloud resource list which can be bound by the label; moreover, the cloud resource operating module 802 may be further configured to:
and modifying the strategy items of the cloud resources according to the strategy item identification of the label and the strategy values corresponding to the strategy items.
If the operation type is label unbinding, the cloud resource list corresponding to the label is the cloud resource list to which the label is bound; moreover, the cloud resource operating module 802 may be further configured to:
and modifying the value of the strategy item of the cloud resource into the strategy value of the resource group where the cloud resource is located.
If the operation type is label modification, the cloud resource list corresponding to the label is the cloud resource list bound by the label, and the selected cloud resources are all cloud resources included in the cloud resource list; moreover, the cloud resource operating module 802 may be further configured to:
and modifying the strategy items of the cloud resources according to the strategy item identifiers of which the labels are changed and the strategy values corresponding to the strategy items.
If the operation type is label deletion, the cloud resource list corresponding to the label is the cloud resource list bound by the label, and the selected cloud resources are all cloud resources included in the cloud resource list; moreover, the cloud resource operating module 802 may be further configured to:
modifying the value of the strategy item of the cloud resource into the strategy value of the resource group where the cloud resource is located;
the apparatus 800 for tag-based cloud resource management according to the present invention may further include: and a label deleting module (not shown in the figure) for deleting the label after the operation is performed on the cloud resource.
According to the technical scheme of the embodiment of the invention, the cloud resource list corresponding to the label is obtained according to the operation type and the label identification, and the cloud resource selected from the cloud resource list is operated to realize label-based cloud resource management, so that the label can be independently taken out to be used as an independent service for management, an independent list page can be conveniently established for the label, operation items such as label creation, label binding of cloud resources and label unbinding of cloud resources can be conveniently provided on the list page, and the uniform management of label operation is realized; on the basis of the original tag function, after the tag is bound with the cloud resource, the cloud resource can conveniently acquire the associated policy in the tag by using the tag association policy description file, so that the uniform management of the cloud resource with the same tag is realized, the scene requirement that a plurality of cloud resources are bound by a single tag at the same time is met, and the operation and maintenance cost is reduced.
Fig. 9 illustrates an exemplary system architecture 900 of an apparatus for tag-based cloud resource management or a method for tag-based cloud resource management to which embodiments of the present invention may be applied.
As shown in fig. 9, the system architecture 900 may include end devices 901, 902, 903, a network 904, and a server 905. Network 904 is the medium used to provide communication links between terminal devices 901, 902, 903 and server 905. Network 904 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
A user may use the terminal devices 901, 902, 903 to interact with a server 905 over a network 904 to receive or send messages and the like. The terminal devices 901, 902, 903 may have installed thereon various messenger client applications such as, for example only, a shopping-like application, a web browser application, a search-like application, an instant messaging tool, a mailbox client, social platform software, etc.
The terminal devices 901, 902, 903 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, and the like.
The server 905 may be a server providing various services, such as a background management server (for example only) providing support for shopping websites browsed by users using the terminal devices 901, 902, 903. The backend management server may analyze and perform other processing on the received data such as the product information query request, and feed back a processing result (for example, target push information, product information — just an example) to the terminal device.
It should be noted that the method for label-based cloud resource management provided by the embodiment of the present invention is generally executed by the server 905, and accordingly, the apparatus for label-based cloud resource management is generally disposed in the server 905.
It should be understood that the number of terminal devices, networks, and servers in fig. 9 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Referring now to FIG. 10, a block diagram of a computer system 1000 suitable for use with a terminal device or server implementing an embodiment of the invention is shown. The terminal device or the server shown in fig. 10 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present invention.
As shown in fig. 10, the computer system 1000 includes a Central Processing Unit (CPU)1001 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM)1002 or a program loaded from a storage section 1008 into a Random Access Memory (RAM) 1003. In the RAM 1003, various programs and data necessary for the operation of the system 1000 are also stored. The CPU 1001, ROM 1002, and RAM 1003 are connected to each other via a bus 1004. An input/output (I/O) interface 1005 is also connected to bus 1004.
The following components are connected to the I/O interface 1005: an input section 1006 including a keyboard, a mouse, and the like; an output section 1007 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage portion 1008 including a hard disk and the like; and a communication section 1009 including a network interface card such as a LAN card, a modem, or the like. The communication section 1009 performs communication processing via a network such as the internet. The driver 1010 is also connected to the I/O interface 1005 as necessary. A removable medium 1011 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 1010 as necessary, so that a computer program read out therefrom is mounted into the storage section 1008 as necessary.
In particular, according to the embodiments of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication part 1009 and/or installed from the removable medium 1011. The computer program executes the above-described functions defined in the system of the present invention when executed by the Central Processing Unit (CPU) 1001.
It should be noted that the computer readable medium shown in the present invention can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present invention, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present invention, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units or modules described in the embodiments of the present invention may be implemented by software, or may be implemented by hardware. The described units or modules may also be provided in a processor, and may be described as: a processor includes a cloud resource acquisition module and a cloud resource operation module. The names of these units or modules do not in some cases form a limitation on the units or modules themselves, for example, the cloud resource acquiring module may also be described as a "module for acquiring a cloud resource list corresponding to a tag according to an operation type and a tag identifier".
As another aspect, the present invention also provides a computer-readable medium that may be contained in the apparatus described in the above embodiments; or may be separate and not incorporated into the device. The computer readable medium carries one or more programs which, when executed by a device, cause the device to comprise: acquiring a cloud resource list corresponding to the label according to the operation type and the label identification; and determining the cloud resources selected from the cloud resource list according to the cloud resource identification, and executing operation on the cloud resources to realize the label-based cloud resource management.
According to the technical scheme of the embodiment of the invention, the cloud resource list corresponding to the label is obtained according to the operation type and the label identification, and the cloud resource selected from the cloud resource list is operated to realize label-based cloud resource management, so that the label can be independently taken out to be used as an independent service for management, an independent list page can be conveniently established for the label, operation items such as label creation, label binding of cloud resources and label unbinding of cloud resources can be conveniently provided on the list page, and the uniform management of label operation is realized; on the basis of the original tag function, after the tag is bound with the cloud resource, the cloud resource can conveniently acquire the associated policy in the tag by using the tag association policy description file, so that the uniform management of the cloud resource with the same tag is realized, the scene requirement that a plurality of cloud resources are bound by a single tag at the same time is met, and the operation and maintenance cost is reduced.
The above-described embodiments should not be construed as limiting the scope of the invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions can occur, depending on design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (12)

1. A method for label-based cloud resource management, comprising:
acquiring a cloud resource list corresponding to the label according to the operation type and the label identification;
determining the cloud resources selected from the cloud resource list according to the cloud resource identification, and performing operation on the cloud resources to realize label-based cloud resource management;
the label is a service independent of the cloud resource management system, and has a policy management function and operation items, and the operation types supported by the operation items include: label binding, label unbinding, label modification, and label deletion.
2. The method according to claim 1, wherein if the operation type is tag binding, the cloud resource list corresponding to the tag is a cloud resource list to which the tag can be bound; and the number of the first and second electrodes,
the step of performing an operation on the cloud resource comprises:
and modifying the strategy item of the cloud resource according to the strategy item identifier of the label and the strategy value corresponding to the strategy item.
3. The method according to claim 1, wherein if the operation type is label unbinding, the cloud resource list corresponding to the label is a cloud resource list to which the label is bound; and the number of the first and second electrodes,
the step of performing an operation on the cloud resource comprises:
and modifying the value of the strategy item of the cloud resource into the strategy value of the resource group where the cloud resource is located.
4. The method according to claim 1, wherein if the operation type is tag modification, the cloud resource list corresponding to the tag is a cloud resource list to which the tag is bound, and the cloud resources are all cloud resources included in the cloud resource list; and the number of the first and second electrodes,
the step of performing an operation on the cloud resource comprises:
and modifying the strategy items of the cloud resources according to the strategy item identification of the label changing and the strategy value corresponding to the strategy items.
5. The method according to claim 1, wherein if the operation type is tag deletion, the cloud resource list corresponding to the tag is a cloud resource list to which the tag is bound, and the cloud resources are all cloud resources included in the cloud resource list; and the number of the first and second electrodes,
the step of performing an operation on the cloud resource comprises:
modifying the value of the strategy item of the cloud resource into the strategy value of the resource group where the cloud resource is located;
after the step of performing the operation on the cloud resource, the method further comprises: and deleting the label.
6. An apparatus for tag-based cloud resource management, comprising:
the cloud resource acquisition module is used for acquiring a cloud resource list corresponding to the label according to the operation type and the label identification; the label is a service independent of the cloud resource management system, and has a policy management function and operation items, and the operation types supported by the operation items include: label binding, label unbinding, label modification and label deletion;
and the cloud resource operation module is used for determining the cloud resources selected from the cloud resource list according to the cloud resource identification and executing operation on the cloud resources so as to realize the label-based cloud resource management.
7. The apparatus according to claim 6, wherein if the operation type is tag binding, the cloud resource list corresponding to the tag is a cloud resource list to which the tag can be bound; and the number of the first and second electrodes,
the cloud resource operating module is further configured to:
and modifying the strategy item of the cloud resource according to the strategy item identifier of the label and the strategy value corresponding to the strategy item.
8. The apparatus according to claim 6, wherein if the operation type is label unbinding, the cloud resource list corresponding to the label is a cloud resource list to which the label is bound; and the number of the first and second electrodes,
the cloud resource operating module is further configured to:
and modifying the value of the strategy item of the cloud resource into the strategy value of the resource group where the cloud resource is located.
9. The apparatus according to claim 6, wherein if the operation type is tag modification, the cloud resource list corresponding to the tag is a cloud resource list to which the tag has been bound, and the cloud resources are all cloud resources included in the cloud resource list; and the number of the first and second electrodes,
the cloud resource operating module is further configured to:
and modifying the strategy items of the cloud resources according to the strategy item identification of the label changing and the strategy value corresponding to the strategy items.
10. The apparatus according to claim 6, wherein if the operation type is tag deletion, the cloud resource list corresponding to the tag is a cloud resource list to which the tag has been bound, and the cloud resources are all cloud resources included in the cloud resource list; and the number of the first and second electrodes,
the cloud resource operating module is further configured to:
modifying the value of the strategy item of the cloud resource into the strategy value of the resource group where the cloud resource is located;
the device further comprises: and the label deleting module is used for deleting the label after the operation is executed on the cloud resource.
11. An electronic device for tag-based cloud resource management, comprising:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-5.
12. A computer-readable medium, on which a computer program is stored, which, when being executed by a processor, carries out the method according to any one of claims 1-5.
CN201711460710.2A 2017-12-28 2017-12-28 Method and device for cloud resource management based on label Active CN109981322B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711460710.2A CN109981322B (en) 2017-12-28 2017-12-28 Method and device for cloud resource management based on label

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711460710.2A CN109981322B (en) 2017-12-28 2017-12-28 Method and device for cloud resource management based on label

Publications (2)

Publication Number Publication Date
CN109981322A CN109981322A (en) 2019-07-05
CN109981322B true CN109981322B (en) 2022-04-26

Family

ID=67074770

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711460710.2A Active CN109981322B (en) 2017-12-28 2017-12-28 Method and device for cloud resource management based on label

Country Status (1)

Country Link
CN (1) CN109981322B (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110609926A (en) * 2019-09-20 2019-12-24 中国银行股份有限公司 Data tag storage management method and device
CN110781000B (en) * 2019-10-17 2022-07-05 中国建设银行股份有限公司 Multi-application resource allocation method and device
CN112231167A (en) * 2019-12-17 2021-01-15 北京京东尚科信息技术有限公司 Cloud resource monitoring method, device, equipment and storage medium
CN111736972A (en) * 2020-06-24 2020-10-02 苏州浪潮智能科技有限公司 Cloud resource management function invalidation method and device and computer readable storage medium
CN112115303B (en) * 2020-09-02 2023-10-03 北京达佳互联信息技术有限公司 Data processing method and device
CN112367370A (en) * 2020-10-27 2021-02-12 中国光大银行股份有限公司 Management method, device, equipment and medium for hybrid cloud resource data
CN115733786A (en) * 2021-08-27 2023-03-03 中兴通讯股份有限公司 Routing and cloud resource registration method and device, storage medium and electronic device
CN116308394B (en) * 2023-05-22 2023-08-04 工业富联(佛山)创新中心有限公司 Label association method, apparatus, electronic device and computer readable storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103391274A (en) * 2012-05-08 2013-11-13 北京邮电大学 Integrated network safety managing method and device
CN105094754A (en) * 2014-04-21 2015-11-25 阿里巴巴集团控股有限公司 Application development method, response method of page requests and device based on tags
CN105812175A (en) * 2016-03-07 2016-07-27 联想(北京)有限公司 Resource management method and resource management device
CN105912668A (en) * 2016-04-12 2016-08-31 上海上讯信息技术股份有限公司 Method and equipment for label management

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103391274A (en) * 2012-05-08 2013-11-13 北京邮电大学 Integrated network safety managing method and device
CN105094754A (en) * 2014-04-21 2015-11-25 阿里巴巴集团控股有限公司 Application development method, response method of page requests and device based on tags
CN105812175A (en) * 2016-03-07 2016-07-27 联想(北京)有限公司 Resource management method and resource management device
CN105912668A (en) * 2016-04-12 2016-08-31 上海上讯信息技术股份有限公司 Method and equipment for label management

Also Published As

Publication number Publication date
CN109981322A (en) 2019-07-05

Similar Documents

Publication Publication Date Title
CN109981322B (en) Method and device for cloud resource management based on label
CN107302597B (en) Message file pushing method and device
CN107491382B (en) Log output method and device
CN104111944A (en) Page processing method and device and page generating method and device
CN111190888A (en) Method and device for managing graph database cluster
CN111563015B (en) Data monitoring method and device, computer readable medium and terminal equipment
CN111427701A (en) Workflow engine system and business processing method
US11882154B2 (en) Template representation of security resources
CN110647327B (en) Method and device for dynamic control of user interface based on card
US11658930B2 (en) Personalized dashboard chart for email subscriptions
CN111190664A (en) Method and system for generating page
CN113568803B (en) Method, electronic device and computer program product for monitoring a storage system
CN112099841A (en) Method and system for generating configuration file
CN110874302A (en) Method and device for determining buried point configuration information
CN112131287A (en) Method and device for reading data
CN112306984A (en) Data source routing method and device
CN112784195A (en) Page data publishing method and system
CN110858240A (en) Front-end module loading method and device
CN112448931B (en) Network hijacking monitoring method and device
CN113110898A (en) Transaction task execution method and device
CN113821206A (en) Page embedded point information display method and device
CN116048466A (en) Service realization method, system and device
CN113760925A (en) Data processing method and device
CN114880292A (en) File classification method and device
CN117675561A (en) Software configuration method and device and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant