Label management method and device, equipment and medium
By generating string labels composed of dimensions and dimension values, and managing target resources based on these labels, the problems of inconsistent label management standards and performance bottlenecks in the existing technology are solved, and the consistency and efficiency of label management are achieved.
Patent Information
- Application Number
- CN202411986611.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2025-04-29
AI Technical Summary
In the prior art, label management has problems such as inconsistent standards, name rules, and inconsistent attribute definitions, resulting in conflicts and ambiguity when using them, and performance bottlenecks lead to low processing efficiency when managing a large number of resources and tags.
By responding to tag requests, the description information of the target resource is obtained, a string label composed of dimensions and dimension values is generated, and the target resource is managed based on these tags.
It realizes consistency and interoperability of tag management in multi-cloud environments, optimizes the tag management process, and improves the efficiency and accuracy of tag management.
Smart Images

Figure CN119903252A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of cloud computing technology, and in particular to a tag management method, device, equipment and medium. Background Art
[0002] In cloud computing resource management, tags have been widely used and become an important resource management tool. As resource management functions continue to enrich, tags include text type tags, digital type tags, time type tags, etc. The above heterogeneous data structures require secondary processing in processing, converting different data formats into a unified data format, and then performing unified processing and analysis after conversion, which increases the difficulty of tag processing.
[0003] At present, tag management involves multiple business modules, which are divided into different horizontal and vertical systems. In actual production, the tag standards are not unified, the name rules are different, and the attribute definitions are inconsistent. Traditional tags are defined as single tags, and there are inconsistent description dimension standards, which leads to conflicts and ambiguity when used. In addition, when the number of managed resources is huge and the number of tags is large, there are performance bottlenecks when operating tags, and the processing efficiency needs to be improved. Summary of the invention
[0004] In order to solve the above technical problems, the present disclosure provides a tag management method, device, equipment and medium.
[0005] In a first aspect, an embodiment of the present disclosure provides a tag management method, including:
[0006] In response to receiving a tag management request from a tag requester for a target resource, acquiring description information corresponding to the target resource; the description information includes a dimension and a dimension value;
[0007] Generate a tag corresponding to the target resource according to the description information; wherein the tag is a string type, the tag is composed of a key value, the dimension is used as the tag key of the tag, and the dimension value is used as the tag value of the tag;
[0008] The target resource is managed based on the tag.
[0009] In a second aspect, an embodiment of the present disclosure provides a tag management device, including:
[0010] an acquisition module, configured to acquire description information corresponding to the target resource in response to receiving a tag management request from a tag requester for the target resource; the description information includes a dimension and a dimension value;
[0011] A generation module, used to generate a tag corresponding to the target resource according to the description information; wherein the tag is a string type, the tag is composed of a key value, the dimension is used as the tag key of the tag, and the dimension value is used as the tag value of the tag;
[0012] A management module is used to manage the target resource based on the tag.
[0013] In a third aspect, an embodiment of the present disclosure provides an electronic device, comprising: a processor; a memory for storing executable instructions of the processor; the processor is used to read the executable instructions from the memory and execute the instructions to implement the tag management method described in the first aspect above.
[0014] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable storage medium, wherein the storage medium stores a computer program, and when the computer program is executed by a processor, the tag management method described in the first aspect is implemented.
[0015] Compared with the prior art, the technical solution provided by the disclosed embodiment has the following advantages: in response to receiving a tag management request for a target resource from a tag requester, obtaining description information corresponding to the target resource, generating a tag corresponding to the target resource according to the description information, wherein the tag is of string type and consists of a key value, using the dimension as the tag key of the tag and the dimension value as the tag value of the tag, so as to manage the target resource based on the tag. Thus, a unified cloud computing tag management system is built according to business demands, and the differences in tag management among different cloud service providers are addressed to ensure the consistency and interoperability of tag management in a multi-cloud environment, optimize the tag management process, and improve the efficiency and accuracy of tag management. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0017] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0018] Figure 1 A flowchart of a tag management method provided by an embodiment of the present disclosure;
[0019] Figure 2 A schematic diagram of a label management system provided by an embodiment of the present disclosure;
[0020] Figure 3 An interactive schematic diagram of tag management provided by an embodiment of the present disclosure;
[0021] Figure 4 A schematic diagram of the structure of a label management device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0022] In order to more clearly understand the above-mentioned objectives, features and advantages of the present disclosure, the scheme of the present disclosure will be further described below. It should be noted that the embodiments of the present disclosure and the features in the embodiments can be combined with each other without conflict.
[0023] In the following description, many specific details are set forth to facilitate a full understanding of the present disclosure, but the present disclosure may also be implemented in other ways different from those described herein; it is obvious that the embodiments in the specification are only part of the embodiments of the present disclosure, rather than all of the embodiments.
[0024] Figure 1 This is a flow chart of a tag management method provided in an embodiment of the present disclosure. The method provided in an embodiment of the present disclosure can be executed by a tag management device, which can be implemented in software and / or hardware and can be integrated on any electronic device with computing capabilities.
[0025] like Figure 1 As shown, the tag management method provided by the embodiment of the present disclosure may include:
[0026] Step 101: in response to receiving a tag management request for a target resource from a tag requester, obtain description information corresponding to the target resource.
[0027] In this embodiment, a unified label management system is constructed, and the label association relationship of all platform resources is maintained through the label management system. All label-related resource information can be obtained through the label management system, such as unified management of resources for all labeling objects. Among them, the labeling object is defined as a resource, and the resource includes cloud resources, such as elastic cloud servers, object storage, users, and physical servers at the bottom of cloud computing. By making the label management system independent as a service and providing resource labeling capabilities to the outside world, the label requester can come from the service portal, operation center, operation and maintenance center, etc. The service portal, operation center, operation and maintenance center, etc. can be shielded from the label management system. The label management system does not need to pay attention to what the resource is or which system it comes from. The label requester only needs to inform the labeling object and what label needs to be bound / unbound.
[0028] When the tag requester performs tag management on the target resource, it sends a tag management request to the tag management system, and the tag management system obtains the description information corresponding to the target resource in response to receiving the tag management request, wherein the description information includes dimensions and dimension values.
[0029] Optionally, the tag management system provides a unified tag management interface to facilitate other cloud product consoles to quickly and cost-effectively access the tag system. During the access process, only the type of target resource to be bound and the unique identification code of the target resource need to be specified. There is no need to determine the service platform to which the target resource belongs. The above strategy reduces the difficulty of using tags.
[0030] Step 102: Generate a tag corresponding to the target resource according to the description information.
[0031] Among them, the label is composed of key values, the dimension is used as the label key of the label, the dimension value is used as the label value of the label, the label is defined in the form of key value, the label is a string type, simple and highly readable.
[0032] As an example, the attributes of customers are represented by tags. For example, based on the scale dimension, the tag key of the tag is "customer scale", and the tag value is "large enterprise", "medium-sized enterprise", etc. If based on the credit dimension, the tag key of the tag is "customer credit rating", and the tag value is "high-credit enterprise", "medium-credit enterprise", etc. In this way, the dimension and specific value of the tag can be quickly perceived directly through the tag.
[0033] Step 103: Manage the target resource based on the tag.
[0034] In this embodiment, after determining the tag corresponding to the target resource, the tag management system maintains the association between the tag and the resource to achieve tag-based management of the target resource. Optionally, the identification information corresponding to the target resource is obtained, and the association between the tag and the identification information is established to determine the association between the tag and the resource.
[0035] As an example, when a tag binding request for a target resource is obtained, an association relationship between the tag and the identification information is established. In this example, the identification information of the target resource can have an association relationship with one tag, or can have an association relationship with multiple tags of different tag dimensions. For example, for a target resource that is not bound to a tag, an association relationship between the tag and the identification information of the target resource is established based on the tag corresponding to the target resource to achieve tag binding of the target resource. For another example, for a target resource that has been bound to a first tag of a first tag dimension, when a tag binding request is obtained to bind a second tag of a second tag dimension to the target resource, an association relationship between the second tag and the identification information of the target resource is established.
[0036] As another example, when a tag unbinding request for a target resource is obtained, the association between the tag and the identification information is deleted. In this example, for a target resource that has bound a tag, the tag to be unbound is determined according to the tag unbinding request, and the association between the tag and the identification information of the target resource is deleted, thereby unbinding the tag from the target resource.
[0037] As another example, when a tag update request for a target resource is obtained, a first tag is obtained, and the first tag is a tag corresponding to the target resource. From all tags associated with the identification information of the target resource, a second tag with the same tag key as the first tag is determined, and then the tag value of the second tag is updated according to the tag value of the first tag. In this example, for a target resource with a bound tag, the tag to be updated and its tag key can be determined according to the tag update request, and the updated tag value can be obtained by parsing. The tag value of the tag to be updated in the tag management system is updated by the parsed tag value, thereby realizing the tag update of the target resource.
[0038] As another example, when a query request is obtained, query information is obtained, and the query information includes a query dimension and a query dimension value. According to the query dimension and the query dimension value, a target tag whose dimension is consistent with the query dimension and whose dimension value is consistent with the query dimension value is determined from all tags in the tag management system, and then, according to the resource corresponding to the target identification information associated with the target tag, the query result of the query information is determined. In this example, the corresponding resources can be queried based on the tag key and the tag value. For example, if the query dimension is the customer credit rating and the query dimension value is a high-credit enterprise, the target tag whose customer credit rating is a high-credit enterprise can be determined in the tags of each resource, so that the resources associated with the target tag are used as query results, so as to realize the tag query function and bind resources through tag retrieval.
[0039] The current tag management involves multiple business modules, which are divided into different horizontal and vertical systems. In actual production, the tag standards are not unified, the name rules are different, and the attribute definitions are inconsistent. Traditional tags are defined as single tags, and there are inconsistent description dimension standards, which leads to conflicts and ambiguities in use. In addition, when the number of managed resources is huge and the number of tags is large, there are performance bottlenecks when operating tags, and the processing efficiency needs to be improved.
[0040] According to the technical solution of the embodiment of the present disclosure, in response to receiving a tag management request for a target resource from a tag requester, descriptive information corresponding to the target resource is obtained, and a tag corresponding to the target resource is generated according to the descriptive information. The tag is of string type, and the tag consists of a key value. The dimension is used as the tag key of the tag, and the dimension value is used as the tag value of the tag, so as to manage the target resource based on the tag. Thus, a unified cloud computing tag management system is built according to business demands, and the differences in tag management among different cloud service providers are targeted to ensure the consistency and interoperability of tag management in a multi-cloud environment, optimize the tag management process, and improve the efficiency and accuracy of tag management.
[0041] In one embodiment of the present disclosure, after managing target resources based on tags, when tag updates and / or changes in the association between tags and resources are detected in the tag management system, the tag updates and / or association changes are synchronized to the cloud platform.
[0042] In this embodiment, a two-way synchronization mechanism with the cloud platform is implemented through the tag service, which not only synchronizes the changes in cloud computing resources to the unified tag management system, but also synchronizes the tag updates, resource and tag association changes in the tag management system to the cloud platform, ensuring the consistency of data between the cloud platform and the tag management system. Since the tag service provides a unified support capability and only has a unified service entry, the consistency of data can be guaranteed, which solves the problem of untimely and inconsistent data updates caused by the complexity of tag updates and the need to synchronize multiple related systems or services.
[0043] Reference Figure 2 , the business system is directly connected through the tag service, and the unified tag service is used to perform tag binding, unbinding, query and other functions. Based on the classified data provided by the tag, the relevant business data is quickly aggregated, counted and analyzed according to the tag classification to empower the business system. As a result, a globally unified and convenient tag management system can be provided to provide efficient auxiliary tools for resource management and business expansion. Among them, the tag management system is constructed, and the tag metadata adopts the traditional tag method, and the core data is constructed through the tag key (Key) and tag value (Value), supporting tag type, description, version, creator and other information. The tag management system supports the management of tag metadata. The management of tag metadata includes the creation, update, deletion and other actions of the descriptive attributes of the tag itself, as well as the maintenance of the association between tags and resources. The quality and accuracy of tag metadata are guaranteed by unified management of tag metadata, avoiding data inconsistency caused by multiple entries for data update.
[0044] In one embodiment of the present disclosure, when a user's access request to a target resource is detected, the user's user attributes and the tag attributes corresponding to the target resource are obtained. When the user attributes and the tag attributes meet the preset matching conditions, the user is allowed to access the target resource, otherwise, the user is denied access to the target resource. In this embodiment, an attribute-based access control model is constructed, which can determine the user's access rights in combination with the user attributes and the tag attributes, and implement user access control to tags and resources. Among them, user attributes include the user's role, department, resource usage rights, etc., and tag attributes include the sensitivity of the tag, compliance requirements, etc.
[0045] As an example, the user attribute and the tag attribute satisfy the preset matching condition, including: for the target resource with the tag attribute of the first customer scale or the second customer scale, when the user attribute is a manager-level operation administrator, it is determined that the preset matching condition is satisfied; when the user attribute is an ordinary-level operation administrator, if the tag attribute is the first customer scale, it is determined that the preset matching condition is not satisfied, and if the tag attribute is the second customer scale, it is determined that the preset matching condition is satisfied; wherein the first customer scale is greater than the second customer scale. In this example, the tag value corresponding to the first customer scale is the tag of a large enterprise, and the tag value corresponding to the second customer scale is the tag of a medium-sized enterprise.
[0046] Reference Figure 3 , Figure 3 The front-end and back-end of the tag management side and the front-end and back-end of the product side are shown in the figure. In the disclosed embodiment, all-round and refined management of cloud computing resources is achieved, resource management functions of multi-cloud products in the horizontal dimension are provided, and the tag management system that supports fast and concise docking of multiple cloud products is supported, the business barriers between various business systems are broken, and simplified and unified management effects are achieved in various business scenarios. In addition, the tag maintenance function of the entire resource life cycle for self-service, operation, maintenance, and planning in the vertical dimension is provided, which integrates tag management with enterprise business processes, mines the value of tag data, and provides support for business decisions such as enterprise strategic planning, cost control, and resource optimization.
[0047] Figure 4 A schematic diagram of a label management device provided by an embodiment of the present disclosure is shown in FIG. Figure 4 As shown, the label management device includes: an acquisition module 41, a generation module 42, and a management module 43.
[0048] The acquisition module 41 is used to acquire description information corresponding to the target resource in response to receiving a tag management request from the tag requester for the target resource; the description information includes a dimension and a dimension value;
[0049] A generating module 42 is used to generate a tag corresponding to the target resource according to the description information; wherein the tag is a string type, the tag is composed of a key value, the dimension is used as the tag key of the tag, and the dimension value is used as the tag value of the tag;
[0050] The management module 43 is used to manage the target resources based on the tags.
[0051] In one embodiment of the present disclosure, the management module 43 is specifically used to:
[0052] Get the identification information corresponding to the target resource;
[0053] When a tag binding request for a target resource is obtained, an association relationship between the tag and the identification information is established;
[0054] When a tag unbinding request for a target resource is obtained, the association between the tag and the identification information is deleted.
[0055] In one embodiment of the present disclosure, the management module 43 is specifically used to:
[0056] When a tag update request for a target resource is obtained, a first tag is obtained; the first tag is a tag corresponding to the target resource;
[0057] Determine, from all tags associated with the identification information of the target resource, a second tag having the same tag key as the first tag;
[0058] Update the label value of the second label according to the label value of the first label.
[0059] In one embodiment of the present disclosure, the management module 43 is specifically used to:
[0060] Obtain query information; the query information includes query dimension and query dimension value;
[0061] According to the query dimension and the query dimension value, determine a target tag whose dimension is consistent with the query dimension and whose dimension value is consistent with the query dimension value from all tags in the tag management system;
[0062] The query result of the query information is determined according to the resource corresponding to the target identification information associated with the target tag.
[0063] In one embodiment of the present disclosure, the device further includes:
[0064] The synchronization module is used to synchronize the tag update and / or the association relationship change to the cloud platform when detecting the tag update and / or the association relationship change between the tag and the resource in the tag management system.
[0065] In one embodiment of the present disclosure, the device further includes:
[0066] The access control module is used to obtain the user attributes of the user and the tag attributes corresponding to the target resource when a user's access request to the target resource is detected;
[0067] When the user attributes and tag attributes meet the preset matching conditions, the user is allowed to access the target resource;
[0068] Otherwise, the user is denied access to the target resource.
[0069] In one embodiment of the present disclosure, user attributes and tag attributes satisfy preset matching conditions, including:
[0070] For a target resource whose label attribute is the first customer scale or the second customer scale, when the user attribute is a manager-level operation administrator, it is determined that the preset matching condition is met;
[0071] When the user attribute is an ordinary-level operation administrator, if the tag attribute is the first customer scale, it is determined that the preset matching condition is not met; if the tag attribute is the second customer scale, it is determined that the preset matching condition is met; wherein, the first customer scale is greater than the second customer scale.
[0072] The tag management device provided in the embodiment of the present disclosure can execute any tag management method provided in the embodiment of the present disclosure, and has the corresponding functional modules and beneficial effects of the execution method. The contents not described in detail in the embodiment of the device of the present disclosure can refer to the description in any method embodiment of the present disclosure.
[0073] The present disclosure also provides an electronic device, which includes one or more processors and a memory. The processor may be a central processing unit (CPU) or other forms of processing units with data processing capabilities and / or instruction execution capabilities, and may control other components in the electronic device to perform desired functions. The memory may include one or more computer program products, and the computer program product may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. Volatile memory may include, for example, random access memory (RAM) and / or cache memory (cache), etc. Non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, etc. One or more computer program instructions may be stored on a computer-readable storage medium, and the processor may run the program instructions to implement the method of the above embodiment of the present disclosure and / or other desired functions. Various contents such as input signals, signal components, noise components, etc. may also be stored in the computer-readable storage medium.
[0074] In one example, the electronic device may further include: an input device and an output device, and these components are interconnected through a bus system and / or other forms of connection mechanisms. In addition, the input device may also include, for example, a keyboard, a mouse, etc. The output device may output various information to the outside, including determined distance information, direction information, etc. The output device may include, for example, a display, a speaker, a printer, and a communication network and a remote output device connected thereto, etc. In addition, according to the specific application, the electronic device may also include any other appropriate components such as a bus, an input / output interface, etc.
[0075] In addition to the above methods and devices, the embodiments of the present disclosure may also be a computer program product, which includes computer program instructions. When the computer program instructions are executed by a processor, the processor executes any method provided by the embodiments of the present disclosure.
[0076] The computer program product may be written in any combination of one or more programming languages to write program code for performing the operations of the disclosed embodiments, including object-oriented programming languages such as Java, C++, etc., and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server.
[0077] In addition, the embodiments of the present disclosure may also be a computer-readable storage medium on which computer program instructions are stored. When the computer program instructions are executed by a processor, the processor executes any method provided by the embodiments of the present disclosure.
[0078] Computer readable storage media can adopt any combination of one or more readable media. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium can include, for example, but is not limited to, a system, device or device of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, 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 disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0079] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0080] The above description is only a specific embodiment of the present disclosure, so that those skilled in the art can understand or implement the present disclosure. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present disclosure. Therefore, the present disclosure will not be limited to the embodiments described herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A tag management method, characterized in that: The method comprises: In response to receiving a tag management request from a tag requester for a target resource, acquiring description information corresponding to the target resource; the description information includes a dimension and a dimension value; Generate a tag corresponding to the target resource according to the description information; wherein the tag is a string type, the tag is composed of a key value, the dimension is used as the tag key of the tag, and the dimension value is used as the tag value of the tag; The target resource is managed based on the tag.
2. The method according to claim 1, characterized in that The managing the target resource based on the tag includes: Obtaining identification information corresponding to the target resource; When a tag binding request for the target resource is obtained, an association relationship between the tag and the identification information is established; When a tag unbinding request for the target resource is obtained, the association relationship between the tag and the identification information is deleted.
3. The method according to claim 2, characterized in that The managing the target resource based on the tag includes: When a tag update request for the target resource is obtained, a first tag is obtained; the first tag is the tag corresponding to the target resource; Determine, from all tags associated with the identification information of the target resource, a second tag having the same tag key as the first tag; The label value of the second label is updated according to the label value of the first label.
4. The method according to claim 2, characterized in that The managing the target resource based on the tag includes: Acquire query information; the query information includes query dimension and query dimension value; According to the query dimension and the query dimension value, determine a target tag whose dimension is consistent with the query dimension and whose dimension value is consistent with the query dimension value from all tags in the tag management system; The query result of the query information is determined according to the resource corresponding to the target identification information associated with the target tag.
5. The method according to claim 1, characterized in that After managing the target resource based on the tag, the method further includes: When a tag update and / or a change in the association relationship between a tag and a resource is detected in the tag management system, the tag update and / or the association relationship change is synchronized to the cloud platform.
6. The method according to claim 1, characterized in that The method further comprises: When a user's access request to the target resource is detected, obtaining a user attribute of the user and a tag attribute corresponding to the target resource; When the user attribute and the tag attribute meet a preset matching condition, allowing the user to access the target resource; Otherwise, the user is denied access to the target resource.
7. The method according to claim 6, characterized in that The user attribute and the tag attribute meet a preset matching condition, including: For the target resource whose tag attribute is the first customer scale or the second customer scale, when the user attribute is a manager-level operation administrator, determining that the preset matching condition is met; In the case where the user attribute is an ordinary level operation administrator, if the tag attribute is the first customer scale, it is determined that the preset matching condition is not met; if the tag attribute is the second customer scale, it is determined that the preset matching condition is met; wherein, the first customer scale is larger than the second customer scale.
8. A label management device, characterized in that: include: An acquisition module, configured to acquire description information corresponding to the target resource in response to receiving a label management request from a label requester for the target resource; The description information includes dimension and dimension value; A generation module, used to generate a tag corresponding to the target resource according to the description information; wherein the tag is a string type, the tag is composed of a key value, the dimension is used as the tag key of the tag, and the dimension value is used as the tag value of the tag; A management module is used to manage the target resource based on the tag.
9. An electronic device, characterized in that: include: processor; a memory for storing instructions executable by the processor; The processor is used to read the executable instructions from the memory and execute the instructions to implement the tag management method described in any one of claims 1-7.
10. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the tag management method described in any one of claims 1 to 7 is implemented.