A service method, system, device, computer program product and storage medium

By generating and storing tag records in a bypass manner, the problem of the cloud tag system being unable to query historical tags is solved, enabling convenient querying of historical tags for cloud resources and improving query efficiency and accuracy.

CN123185040APending Publication Date: 2026-11-27ALIBABA CLOUD COMPUTING CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510690915.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-26
Publication Date
2026-11-27

AI Technical Summary

Technical Problem

The existing cloud tagging system cannot support querying historical tags for cloud resources, which leads to obstacles when referencing historical tags in scenarios such as post-billing.

Method used

By introducing a bypass tag record generation subsystem, tag operation events in the tag system are traced back to generate and store tag records containing tag lifetimes. Data subscription tools and memory queue mechanisms are used to efficiently obtain log records, perform analysis and processing to generate tag records.

Benefits of technology

It enables flexible querying of historical tags from the dimensions of time, cloud resources, and tags without interfering with the tag system, thus improving the convenience and accuracy of the query.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123185040A_ABST
    Figure CN123185040A_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a service method, system, device, computer program product and storage medium. In the service process, the label operation events occurring in the label system for different cloud resources can be traced back. Based on this, from the perspective of any cloud resource, by tracing back the label operation events, the label changes on the cloud resource can be fully perceived, so that the labels that have appeared on the cloud resource can be comprehensively discovered. Label records containing label survival time can be generated for each label that has appeared on the cloud resource, and stored. This can quantify the label change on the cloud resource as the label survival time, so that the life cycle of each label that has appeared on the cloud resource can be accurately presented on the time axis through the generated label records. Accordingly, without interfering with the label system, the historical labels on the cloud resource can be flexibly queried from the dimensions of time, cloud resource and label, and the query convenience of the historical labels can be effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of cloud computing technology, and in particular to a service method, system, device, computer program product, and storage medium. Background Technology

[0002] In the cloud computing field, cloud providers can offer users various cloud resources and support the association of various tags with these resources to describe their attributes. Cloud providers can use tagging systems to manage these tags, and the tags recorded in these systems serve as crucial data for efficient and refined management and control. For example, cloud providers can determine the billing price for cloud resources used by users based on the tags associated with them.

[0003] Currently, the tagging system uses a real-time update mechanism. When the tags of cloud resources change, the corresponding tag list for the cloud resource can be updated immediately. The tagging system does not retain historical tags for cloud resources. However, in various cloud resource management scenarios, it may be necessary to refer to historical tags for management purposes. For example, cloud vendors typically use post-billing for cloud resources, which may require reference to historical tags. However, the tagging system does not support querying these historical tags, which poses a significant obstacle to the post-billing process.

[0004] Therefore, how to support convenient querying of historical tags for cloud resources has become an urgent problem to be solved. Summary of the Invention

[0005] This application provides a service method, system, device, computer program product, and storage medium to support convenient querying of historical tags for cloud resources.

[0006] This application provides a service method, including:

[0007] In response to preset service commands, trace back the tag operation events that occurred in the tag system for different cloud resources;

[0008] Based on the tag operation events traced back for any cloud resource, a tag record for the cloud resource is generated, and the tag record contains the tag lifetime of the tag corresponding to the traced tag operation event;

[0009] Store the tag records.

[0010] This application embodiment also provides a service system, including a tag record generation subsystem; the tag record generation subsystem is used for:

[0011] In response to preset service commands, trace back the tag operation events that occurred in the tag system for different cloud resources;

[0012] Based on the tag operation events traced back for any cloud resource, a tag record for the cloud resource is generated, and the tag record contains the tag lifetime of the tag corresponding to the traced tag operation event;

[0013] Store the tag records.

[0014] This application also provides a computing device, including a memory, a processor, and a communication component;

[0015] The memory is used to store one or more computer instructions;

[0016] The processor is coupled to the memory and the communication component to execute one or more computer instructions for performing the aforementioned service method.

[0017] This application also provides a computer-readable storage medium for storing a computer program, which, when executed by one or more processors, causes the one or more processors to perform the aforementioned service method.

[0018] This application also provides a computer program product, including a computer program that, when executed by one or more processors, causes the one or more processors to perform the aforementioned service method.

[0019] This application proposes a service method to support historical tag querying, which can initiate a service in response to a preset service command. During the service process, tag operation events occurring for different cloud resources in the tag system can be traced back. Based on this, from the perspective of any cloud resource, by tracing back the tag operation events, the tag changes on the cloud resource can be fully perceived, thereby comprehensively discovering the tags that have appeared on the cloud resource. Moreover, based on the tag operation events traced back for the cloud resource, tag records containing tag lifetimes can be generated for each tag that has appeared on the cloud resource and stored. This quantifies the tag changes on the cloud resource into tag lifetimes, thereby accurately presenting the lifecycle of each tag that has appeared on the cloud resource on a timeline through the generated tag records. Accordingly, in this application embodiment, by generating and storing the above-mentioned tag records for the cloud resource, not only can the tags that have appeared on the cloud resource be comprehensively described, but also the lifecycles of different tags can be described. In this way, without interfering with the tag system, it is possible to support flexible querying of historical tags on the cloud resource from dimensions such as time, cloud resource, and tag, which can effectively improve the convenience of historical tag querying. Attached Figure Description

[0020] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:

[0021] Figure 1 A schematic diagram of the structure of a service system provided in an exemplary embodiment of this application;

[0022] Figure 2 A schematic diagram of an optional structure of a service system provided in an exemplary embodiment of this application;

[0023] Figure 3 A schematic diagram illustrating an optional implementation scheme for the backtracking step provided as an exemplary embodiment of this application;

[0024] Figure 4 A schematic diagram illustrating the application logic of a service system in an exemplary application scenario, provided as an exemplary embodiment of this application;

[0025] Figure 5 This is a schematic diagram illustrating the visualization effect of a tag recording proposed in an exemplary embodiment of this application;

[0026] Figure 6 A flowchart illustrating a service method provided for another exemplary embodiment of this application;

[0027] Figure 7 This is a schematic diagram of the structure of a computing device provided as another exemplary embodiment of this application. Detailed Implementation

[0028] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below in conjunction with specific embodiments and corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0029] It should be noted that, in the cases involving user information in the embodiments of this application, the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in the embodiments of this application are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use, and processing of related data must comply with the relevant laws, regulations, and standards of the relevant countries and regions, and corresponding operation entry points are provided for users to choose to authorize or refuse. In addition, the various models involved in this application (including but not limited to language models or large models) comply with relevant laws and standards.

[0030] Before proceeding with a detailed description of the technical solutions provided in the various embodiments of this application, the following is a brief explanation of several technical concepts involved in this application.

[0031] Cloud resources, also known as cloud computing resources, can be understood as various virtualized computing resources available to users within a cloud computing system. Their main characteristics are resource virtualization, dynamic allocation, and elastic scaling. Cloud resources have a wide range of applications and are suitable for various types of users. For example, enterprises can use cloud resources in a cloud computing system to build websites and applications, and can also enjoy various cloud computing services provided by cloud service providers through cloud resources. Typical cloud resources include, but are not limited to, Elastic Cloud Servers (ECS), Virtual Machines (VMs), and containers, etc., which will not be further exemplified here.

[0032] A tagging system can be understood as a metadata tool used to manage and classify cloud resources. By adding custom tags (key-value pairs) to cloud resources (such as ECS instances, relational database service (RDS) databases, object storage service (OSS) buckets, etc.), it is possible to achieve fine-grained management, grouping, access control and cost analysis of cloud resources.

[0033] A label is metadata used to identify and categorize cloud resources, existing in the form of key-value pairs. It's like an "electronic tag" attached to a cloud resource, using custom attributes to mark it.

[0034] Typically, tagging systems use a database to associate tags with different cloud resource records. Data entries in the database record tag information such as tag identifiers (keys) and tag values. Moreover, as explained in the background, tagging systems employ a real-time update mechanism. When a cloud resource's tag changes, the corresponding tag list (containing multiple data entries) is immediately updated. The tagging system does not retain historical tags for cloud resources (data entries corresponding to deleted tags are also deleted). Therefore, tagging systems cannot support querying historical tags for cloud resources. However, in various cloud resource management scenarios, it may be necessary to refer to historical tags as a basis for management. For example, cloud vendors typically use post-billing for cloud resources, which may require referencing historical tags. However, the tagging system's inability to query these historical tags presents a significant obstacle to the post-billing process.

[0035] Currently, some design ideas in the field propose to retain historical tags in the tagging system. However, this causes significant interference to the tagging system and affects the processing accuracy and performance of existing functions in the tagging system.

[0036] To address the aforementioned technical issues, this application provides a solution. The basic idea is to use a bypass method to maintain relevant information on historical tags for cloud resources, thereby enabling convenient querying of historical tags for cloud resources without interfering with the tagging system.

[0037] Based on the above basic idea, this application proposes a service solution to support convenient querying of historical tags for cloud resources.

[0038] The technical solutions provided by the various embodiments of this application are described in detail below with reference to the accompanying drawings.

[0039] Figure 1 This is a schematic diagram of the structure of a service system provided for an exemplary embodiment of this application. For example... Figure 1 As shown, the system includes a tag record generation subsystem. In this embodiment, the product form of the tag record generation subsystem is not limited. Optionally, the product form of the tag record generation subsystem can be a cloud service; however, this is not limited, and no further examples of product forms will be provided. In this embodiment, the deployment form of the tag record generation subsystem is also not limited. Optionally, the tag record generation subsystem can be deployed as a cloud computing system, or it can be deployed as a computing device, etc.; no further examples of deployment forms will be provided here.

[0040] The service system in this embodiment may include at least two service functions: tag record generation and storage functions, and tag query functions.

[0041] The following section explains the generation and storage functions of tag records.

[0042] In this embodiment, the tag record generation subsystem can generate and store tag records for cloud resources. The processing logic in the tag record generation subsystem (hereinafter referred to as the "subsystem") will be described below.

[0043] refer to Figure 1 The subsystem can respond to preset service commands and start services. During the service process, it can trace back the tag operation events that occurred in the tag system for different cloud resources.

[0044] Understandably, tag operations on cloud resources within the tagging system are incremental; that is, tag operations on cloud resources continuously occur within the tagging system. Therefore, in this embodiment, the subsystem's retrospective tracking of tag operation events occurring on different cloud resources within the tagging system is also incremental. To address this, the subsystem can employ a round-robin retrospective mechanism to gradually trace back the tag operation events occurring within the tagging system. Furthermore, this ensures that when incremental tag operations occur in the tagging system, the corresponding tag operation events can be traced back promptly, thereby comprehensively perceiving tag changes on different cloud resources within the tagging system.

[0045] It is worth noting that the referenced basis in this backtracking process is not limited. Tagging operations in the tagging system usually generate operation traces, and relevant data describing these traces can be used as the backtracking basis in this embodiment. Examples of backtracking basis will be provided later, and will not be elaborated upon here.

[0046] Based on this, in the backtracking phase, from the perspective of any cloud resource, a series of tag operation events that occurred in the tagging system can be traced back to the cloud resource. These tag operation events can fully reflect the changes in tags on the cloud resource. Therefore, in the backtracking phase, the changes in tags on the cloud resource can be fully perceived through the traced tag operation events.

[0047] Continue to refer to Figure 1 The subsystem can then continue executing the tag record generation process. During this process, a tag record for any cloud resource can be generated based on any tag operation event traced back to that cloud resource. This tag record contains the tag lifetime of the tag corresponding to the traced tag operation event.

[0048] In this way, from the perspective of any cloud resource, a tag record containing the tag's lifespan can be generated for each tag that has appeared on the cloud resource, based on a series of tag operation events traced back to that cloud resource.

[0049] In this embodiment, the information dimensions in the tag record may include, but are not limited to, cloud resource identifiers, tag identifiers, tag values ​​under the tag, tag creation time, and tag deletion time, etc., without limitation or further examples.

[0050] In this embodiment, the backtracking process is performed from the perspectives of both cloud resources and tags. Therefore, by backtracking the tag operation events, information about each tag that has appeared on the cloud resources can be perceived, including tag identifiers and tag values.

[0051] Thus, in this embodiment, based on the tag operation events traced back to the cloud resources, information such as the identifiers and tag values ​​of each tag that has appeared on the cloud resources can be determined. This information enables the querying of historical tags on cloud resources from both cloud resource and tag dimensions.

[0052] More importantly, the tag record generation process also proposes to quantify the lifespan of each tag that has appeared on the cloud resource based on the tag changes perceived by the cloud resource from tag operation events. The tag lifespan can be used to describe when a tag is created and when it is deleted; that is, the tag lifespan can be used to describe the tag's lifecycle. It can be understood that tags on cloud resources have a lifecycle; their lifecycle begins when they are created and ends when they are deleted.

[0053] As can be seen, this embodiment introduces a new perspective—the time perspective—in the tag record generation process, and introduces tag lifespan information for this time perspective. This information allows for querying historical tags on cloud resources from a time dimension.

[0054] Based on this, tag records can be generated using the identifiers, tag values, and tag lifespans of each tag that has appeared on the cloud resources. Thus, based on the tag records generated for the cloud resources, not only can the tags that have appeared on the cloud resources be presented, but also the distribution of each tag on the cloud resources over time can be shown. This allows for a comprehensive and accurate presentation of tag changes on the cloud resources through the tag records.

[0055] Continue to refer to Figure 1 The subsystem can store tag records generated for different cloud resources to support historical tag queries for any cloud resource.

[0056] In this embodiment, a database storage subsystem can be used to store tag records generated for different cloud resources. As mentioned earlier, the tag system typically uses a database to associate tags with records of different cloud resources. For ease of distinction, the database used in the tag system to record tags for different cloud resources will be described as the first database; the database used in this embodiment to store tag records generated by the subsystem for different cloud resources will be described as the second database. Clearly, the first and second databases are independent of each other. In this embodiment, the storage of tag records does not interfere with the tag system, and the tag system is unaware of this.

[0057] As can be seen, in this embodiment, the subsystem generates and stores tag records for cloud resources in a bypass manner without relying on the tag system. Moreover, in this embodiment, the subsystem supports historical tag queries for cloud resources without relying on the tag system. Therefore, interference with the tag system can be effectively avoided.

[0058] In this embodiment, the subsystem can generate separate tag records for different cloud resources. Depending on the actual tag changes, the number of tag records generated for a single cloud resource may be one or more. From the perspective of tags, since the tag system usually supports updating tag values ​​under the same tag identifier, there may be multiple tag records under one tag identifier, and each tag record corresponds one-to-one with the tag values ​​that have appeared under that tag identifier.

[0059] In this embodiment, since the tag records generated for cloud resources contain information such as tag identifiers, tag values, and tag lifespans, it supports flexible querying of historical tags on cloud resources from the dimensions of cloud resources, tags, and time. For the time dimension, the required historical time period can be configured in the historical tag query request for cloud resources. Because the tag records in this embodiment contain tag lifespans, historical tags associated with cloud resources within that historical time period can be efficiently and accurately located using the tag lifespan, enabling historical tag queries based on historical time periods.

[0060] The tag query function included in the service system in this embodiment will be described in detail in subsequent embodiments, and will not be elaborated here.

[0061] In summary, this embodiment proposes a service method to support historical tag querying, which can initiate the service in response to a preset service command. During the service process, tag operation events that occurred for different cloud resources in the tag system can be traced back. Based on this, from the perspective of any cloud resource, by tracing back the tag operation events, the tag changes on the cloud resource can be fully perceived, thereby comprehensively discovering the tags that have appeared on the cloud resource. Moreover, based on the tag operation events traced back for the cloud resource, tag records containing tag lifetimes can be generated for each tag that has appeared on the cloud resource and stored. This quantifies the tag changes on the cloud resource into tag lifetimes, thereby accurately presenting the lifecycle of each tag that has appeared on the cloud resource on a timeline through the generated tag records. Accordingly, in this embodiment, by generating and storing the above-mentioned tag records for the cloud resource, not only can the tags that have appeared on the cloud resource be comprehensively described, but also the lifecycles of different tags can be described. In this way, without interfering with the tag system, it is possible to support flexible querying of historical tags on the cloud resource from dimensions such as time, cloud resource, and tag, which can effectively improve the convenience of historical tag querying.

[0062] In the above or following embodiments, the backtracking process can be implemented in various ways. One optional implementation is provided below.

[0063] In this optional implementation, it is proposed that log records can be obtained from the log files corresponding to the tag system; the obtained log records can be analyzed and processed to trace back the tag operation events that occurred in the tag system for different cloud resources.

[0064] In this optional implementation, a log file corresponding to the tagging system is introduced as the basis for backtracking. It can be understood that tag operations occurring in the tagging system will generate log records in the corresponding log file. In other words, the log records in this file can describe the operational traces of tag operations in the tagging system. As mentioned earlier, the tagging system typically uses a database to associate tags with different cloud resource records. Data entries in the database are used to record tag information corresponding to the tags, such as tag identifiers (keys) and tag values ​​(values). In this case, tag operations in the tagging system are essentially changes to the database, and these changes trigger the database's logging mechanism, such as a binary log (binlog) mechanism, thereby generating log records in the corresponding log file of the tagging system. The binary log mechanism in the database is a commonly used data recording and synchronization technology, mainly used to track database changes (such as inserts, updates, and deletions). Of course, other logging mechanisms can also be used in the database; these are not limited here, nor will further examples be provided.

[0065] Of course, this optional implementation does not limit the way log files are generated in the tag system. In addition to the log files generated by using a database to record tags for different cloud resources, the tag system can also use other storage methods to record tags for different cloud resources. Regardless of the storage method used, the tag system can generate log files based on a log mechanism that is compatible with the storage method. Here, we do not limit the way log files are generated in the tag system, nor do we provide any further explanation.

[0066] The key design principle of this optional implementation is the use of existing log files from the tag system as the basis for backtracking. Since the log files are generated in a bypass manner within the tag system and are not used in the main workflow, this optional implementation ensures that the subsystem's use of log files does not interfere with the main workflow. This effectively guarantees that neither the backtracking nor the tag record generation process will interfere with the tag system. Furthermore, the log files comprehensively record tag operations within the tag system, including not only user-initiated tag operations but also those initiated by various cloud products. Therefore, using log files as the basis for backtracking effectively ensures the comprehensiveness of the tag operation events backtracked.

[0067] This optional implementation mainly involves two aspects of the process: the process of obtaining log records from the log file, and the process of analyzing and processing the obtained log records.

[0068] The following provides illustrative examples of the processing procedures for these two aspects.

[0069] The process of retrieving log records from log files

[0070] In this optional implementation, various methods can be used to obtain log records from the log file. The following is an exemplary method. This exemplary method proposes:

[0071] Data subscription tools can be used to subscribe to the log files corresponding to the tag system, so as to obtain log records from the log files through the data subscription tools.

[0072] Figure 2 This is a schematic diagram of an optional structure of a service system provided for an exemplary embodiment of this application. (Reference) Figure 2 In addition to subsystems, the service system may also include subsystems (i.e. Figure 2 In addition to the tag record generation subsystem, the system may also include a data subscription device. The data subscription device may be equipped with data subscription tools. Here, any computing device in the tag system can be reused as a data subscription device. Of course, this is merely an example; dedicated devices can also be deployed as data subscription devices as needed. The deployment method of the data subscription device is not limited here, nor will further examples be provided.

[0073] In this context, a data subscription tool can be understood as a cloud service or client software tool capable of implementing data subscription functionality. This exemplary acquisition scheme supports the use of various existing or future data subscription tools, such as Data Transmission Service (DTS), but further examples of data subscription tools are not provided here. Data subscription can be understood as a mechanism or service that allows users or systems to obtain real-time updates from a specific data source. Its core is a "subscription-push" model, allowing subscribers (such as the aforementioned data subscription tool) to proactively obtain changes in data of interest without frequently querying the data source, thereby improving the efficiency and real-time nature of data acquisition.

[0074] As mentioned earlier, tag operations on cloud resources in the tag system are incremental. Correspondingly, the log files in the tag system are also incremental. In this exemplary acquisition scheme, the data subscription method can obtain log records from the log files more efficiently and in a more timely manner, thereby effectively improving the generation efficiency and timeliness of subsequent tag records, and thus effectively improving the query accuracy of historical tags.

[0075] Figure 3 This is a schematic diagram illustrating an optional implementation scheme for the backtracking step, provided as an exemplary embodiment of this application. (See reference...) Figure 3 In this exemplary acquisition scheme, an optimization scheme is also proposed:

[0076] Using a data subscription tool, log records are read from log files and stored in a memory queue provided by the subsystem.

[0077] refer to Figure 2 The data subscription tool can store log records read from log files into an in-memory queue provided by the subsystem. An in-memory queue can be understood as a message queue implementation based on memory storage. By introducing an in-memory queue, on the one hand, a data buffer can be formed directly between the data subscription tool and the subsystem, allowing the data subscription tool to read log records from log files at a higher read rate. This enables more timely retrieval of incremental log records from log files, thus ensuring the efficiency of log record analysis and processing in the subsystem. On the other hand, it allows the log records read from log files by the data subscription tool to be directly stored in the subsystem's memory. The subsystem can then directly use the log records from memory, further ensuring the efficiency of log record analysis and processing in the subsystem.

[0078] In this optimized scheme, the subsystem, upon receiving the aforementioned service instruction, can trigger the data subscription tool to begin reading log records from the log file. However, the timing of log record reading by the data subscription tool is not limited to this. In some design approaches, the data subscription tool may also receive the aforementioned service instruction and, triggered by the instruction, begin reading log records from the log file; further examples of the reading timing are not provided here. Furthermore, the data subscription tool uses a data subscription method to gradually read log records from the log file. Ultimately, the data subscription tool can read all log records from the log file, and when incremental log records appear in the log file, the data subscription tool can automatically continue reading these incremental log records. This fully ensures the comprehensiveness of the subsystem's processing of log records in the log file in this embodiment, and consequently, fully ensures the comprehensiveness of the tag records generated for cloud resources in this embodiment.

[0079] Of course, in addition to the above-mentioned exemplary acquisition schemes, other acquisition schemes can also be used to obtain log records from log files. For example, the subsystem can subscribe to log records from the log file independently. This is not limited here, nor will any further examples of acquisition schemes be given.

[0080] The process of analyzing and processing the acquired log records.

[0081] In this optional implementation, various solutions can be used to analyze and process the acquired log records. The following provides an example analysis and processing solution.

[0082] Following the previous approach of storing log records in a memory queue provided by the subsystem, some exemplary analysis schemes propose that: in the subsystem, a single thread can be used to read log records in batches from the memory queue; the log records read in batches are then split into multiple batches of log records to support parallel analysis and processing of multiple batches of log records.

[0083] Here, the subsystem employs a mechanism of batch reading and multi-batch parallel processing to analyze and process log records. Single-threaded batch reading effectively improves the efficiency and controllability of retrieving log records from the memory queue; multi-batch parallel processing effectively improves the efficiency of log record analysis and processing.

[0084] This can effectively improve the efficiency of the subsystem in processing log records.

[0085] Understandably, every log record in the log file is an important basis for backtracking. In this regard, a mechanism to ensure the integrity of log records has been further proposed.

[0086] refer to Figure 3The integrity guarantee mechanism proposes that: after multiple batches of log records have been analyzed and processed, a single thread can be used to update the data acquisition points for the log file; in the event of a restart of the data subscription tool or a reset of the log file, a single thread can be used to send the data acquisition points to the data subscription tool so that the data subscription tool can continue to acquire log records from the log file according to the data acquisition points maintained by the single thread.

[0087] In this embodiment, situations such as a data subscription tool restarting due to switching data subscription devices or log files being reset due to a tag system restart may require the service system to restart. The data subscription tool and subsystems will then need to continue operating after the restart. After the service system restarts, inaccurate data acquisition points may cause log record omissions in the subsystems, resulting in some log records not being analyzed and processed, and consequently, incomplete tag records generated by the subsystems.

[0088] As can be seen, by introducing the aforementioned integrity guarantee mechanism, the subsystem can use a single thread to retrieve data in batches from the memory queue. This single thread can also be used to maintain the data retrieval points, ensuring that the data retrieval points are consistent with the processing progress of log records within the subsystem. After restarting, the data subscription tool continues to retrieve log records from the log file based on the data retrieval points maintained by this single thread. Therefore, it effectively avoids the problem of missing log records and ensures that the subsystem can comprehensively analyze and process the log records in the log file.

[0089] In this way, through the above-mentioned batch parallel processing mechanism and integrity guarantee mechanism, not only can the efficiency of log record analysis and processing be effectively improved, but also the accuracy of data reading points can be effectively guaranteed. This ensures that the subsystem can comprehensively analyze and process the log records in the log file, thereby ensuring the comprehensiveness of the generated tag records and thus ensuring the accuracy of querying historical tags of cloud resources.

[0090] Additionally, refer to Figure 3 Based on the data read points maintained by the subsystem, latency monitoring of log record analysis and processing within the subsystem can also be performed. That is, by comparing the data read points maintained by the subsystem with the data read points already reached in the log files by the data subscription tool, the processing latency of log records in the subsystem can be determined. Through latency monitoring, it is possible to promptly identify whether the subsystem's log record processing rate is reasonable, thereby adjusting the processing rate in the subsystem to better match the data acquisition rate in the data subscription tool, improving the processing rate coordination between the data subscription tool and the subsystem. In some exemplary analysis schemes, the following is also proposed:

[0091] For any log record obtained, the log event information recorded in the log record is converted into operation event information with tags as the operation objects; wherein, the operation event information is used to describe the tag operation event that occurred on the cloud resource pointed to by the log event information.

[0092] In this exemplary analysis and processing scheme, an "event transformation mechanism" is used to analyze and process log records in order to trace back the tag operation events corresponding to the log records.

[0093] As mentioned earlier, the log records in the log file describe the operational traces of tag operations in the tag system. When tag operations are performed in the tag system, the operation object is essentially the information carrier used to store tag information, such as the data entries in the aforementioned first database. Therefore, the log event information recorded in the log records describes the modification operations on the aforementioned information carrier in the tag system. The event conversion mechanism used in this exemplary analysis and processing scheme can convert the log event information with the aforementioned information carrier as the operation object into operation event information with the tag as the operation object.

[0094] It is understandable that the log records contain some data from the tag information carried by the aforementioned information carrier. This data can be used to convert the operation object from the aforementioned information carrier into a tag. The log records also contain operation description data used to describe the change operations that occurred on the aforementioned information carrier. This data can be used to convert the operation description data for the information carrier into operation description data for the tag. Through these two conversions, the log records can be analyzed and processed, thereby generating operation event information with tags as the operation object. It can be seen that the operation event information can fully describe the tag operation events that occurred on the cloud resource pointed to by the log event information.

[0095] The following provides an exemplary implementation of an "event transition mechanism". Using any of the log records mentioned above as an example, the solution will be described as follows:

[0096] The target cloud resource and target tag, log event type, event occurrence time, and tag value operated under the target tag can be identified from the log event information recorded in the log record.

[0097] Based on the conversion relationship between log event types and tag operation types, determine the target tag operation type that occurred on the target tag;

[0098] Based on the relationship between tag operation type and lifetime boundary dimension, the event occurrence time is taken as the time value of the target tag under the target lifetime boundary dimension associated with the target tag operation type;

[0099] Based on the target tag operation type, the tag value operated on under the target tag, and the time value under the target survival time boundary dimension, operation event information with the target tag as the operation object is generated;

[0100] The survival time boundary dimension includes the creation time dimension and the deletion time dimension.

[0101] In this exemplary implementation, implementation logic is proposed for the conversion of the above two aspects. Regarding the operation object, the target cloud resource and target tag can be identified from the log event information, thereby determining the operation object—the target tag on the target resource—in the operation event information. Regarding the operation description data, the conversion relationship between the preset log event type and the tag operation type, as well as the association relationship between the tag operation type and the lifetime boundary dimension, are used to determine the target tag operation type occurring on the target tag and the relevant time values ​​in the tag lifetime, converting them into operation description data with the target tag as the operation object. Thus, based on the operation object and operation description data converted from the log records, operation event information with the target tag as the operation object can be generated.

[0102] In this exemplary implementation, the conversion relationship between the log event type and the tag operation type, as well as the association relationship between the tag operation type and the lifetime boundary dimension, can be flexibly designed as needed, ensuring that it can adapt to the tag storage method and the log mechanism adopted in the tag system.

[0103] The following example, using a tag system where tags are stored in a primary database, illustrates the data conversion process described above. (Reference) Figure 2 The tagging system can deploy multiple primary databases geographically to support tagging cloud resources in different regions. In this case, the log files corresponding to the tagging system can be used to record operation events of the tagging system on data entries in the primary database, and as mentioned earlier, the data entries are used to record the tag information corresponding to the tag.

[0104] First, in the process of determining the type of target label operation that occurs on the target label:

[0105] If the log event type is a data entry insertion event, then the target label operation type occurring on the target label is determined to be a label creation event;

[0106] If the log event type is a data entry update event, then the target label operation type that occurred on the target label includes label deletion events and label creation events;

[0107] If the log event type is a data entry deletion event, then the target label operation type occurring on the target label is determined to be a label deletion event.

[0108] Understandably, in this scenario, the log event types in the log time information can typically include, but are not limited to, data entry insertion events, data entry update events, and data entry deletion events. A data entry insertion event can essentially be understood as the creation of a new tag on the cloud resource, and therefore can be converted into a tag creation event. A data entry update event can essentially be understood as an operation performed on the tag value under a tag, i.e., deleting the old tag value and creating a new tag value under the tag, and therefore can be converted into a tag deletion event and a tag creation event. A data entry deletion event can essentially be understood as the deletion of a tag on the cloud resource, and therefore can be converted into a tag deletion event.

[0109] Then, in the process of determining the relevant time values ​​in the tag lifetime:

[0110] If the target tag operation type is a tag creation event, then the event occurrence time will be used as the time value of the target tag in the creation time dimension;

[0111] If the target tag operation type includes tag deletion event and tag creation event, then the event occurrence time will be used as the time value of the old tag value under the target tag in the deletion time dimension, and as the time value of the new tag value under the target tag in the creation time dimension;

[0112] If the target tag operation type is a tag deletion event, then the event occurrence time will be used as the time value of the target tag in the deletion time dimension.

[0113] As mentioned earlier, the lifetime boundary dimension can include both creation time and deletion time dimensions. If the log event type in the log record is a data entry insertion event, a tag creation event will be extracted from the log record, indicating that the tagging system has created a new target tag on the target cloud resource, which also signifies the start of the target tag's lifecycle. Therefore, the event occurrence time can be used as the time value under the creation time dimension. If the log event type in the log record is a data entry update event, a tag deletion event and a tag creation event will be extracted from the log record, indicating that the tagging system has deleted the old tag value and created a new tag value under the target tag on the target cloud resource, which also signifies the end of the lifecycle of the old tag value under the target tag and the start of the lifecycle of the new tag. Therefore, the event occurrence time can be used as the time value of the old tag value under the target tag under the deletion time dimension, and as the time value of the new tag value under the target tag under the creation time dimension. If the log event type in the log record is a data entry deletion event, then the tag deletion event will be converted from the log record, which indicates that the tag system has deleted the target tag on the target cloud resource, that is, it indicates that the life cycle of the target tag has ended. Therefore, the event occurrence time can be used as the time value of the target tag in the deletion time dimension.

[0114] In this way, the creation time and / or deletion time values ​​of the tag's lifespan can be determined from the log records. It's worth noting that for tag deletion events, indicating that the tag already exists, the log records usually include the tag's creation time. This time in the log records can be used as the tag's creation time value; that is, when the target tag's operation type is a tag deletion event, the complete tag lifespan can be obtained from the log records.

[0115] As can be seen from the exemplary description of the above operation description data conversion process, by pre-setting the conversion relationship between log event type and tag operation type, as well as the correlation relationship between tag operation type and lifetime boundary dimension, the target tag operation type and related time value in lifetime can be efficiently, comprehensively and accurately converted from log records, thereby effectively improving the efficiency and accuracy of log record analysis and processing.

[0116] In summary, this embodiment provides optional implementation methods for the backtracking process, introducing the log files corresponding to the tag system as the basis for backtracking. Log records are obtained from the log files through data subscription, and a memory queue and multi-batch parallel processing mechanism are introduced to effectively improve the efficiency of log record analysis and processing. It also proposes that a subsystem maintain data read points, which can effectively ensure the comprehensiveness of the analysis and processing of log records in the log files. Furthermore, an event conversion mechanism is proposed, which can convert operation event information with tags as the operation object from the log records to describe the tag operation events occurring on cloud resources, fully ensuring the accuracy and comprehensiveness of the backtracked tag operation events.

[0117] It is worth noting that, in this embodiment, besides the optional implementation methods described above, other implementation methods can also be used in the backtracking stage. For example, tag change records reported by the monitoring system for the tag system can be introduced as the backtracking basis. Of course, other information objects that can describe the operation traces of tags in the tag system can also be introduced as the backtracking basis. Moreover, for different backtracking bases, analysis and processing logic can be flexibly designed to reconstruct the operation traces of tags from the backtracking bases, thereby backtracking the tag operation events required in this embodiment. The implementation method of the backtracking stage is not limited here, nor are further examples of implementation methods provided.

[0118] In the above or following embodiments, various implementation methods can be adopted in the tag record generation stage. One optional implementation method is provided below.

[0119] In this optional implementation, after tracing back the tag operation event for the target tag to the target cloud resource, if no tag record matching the tag operation event is stored in the second database, then tag records are generated for the target tags that have appeared on the target cloud resource based on the operation event information corresponding to the tag operation event. The second database stores tag records generated for different cloud resources, the operation event information describes the tag operation event for the target tag that occurred on the target cloud resource, the target cloud resource is any cloud resource, and the target tag is any tag that has appeared on the target cloud resource.

[0120] In this optional implementation, a "duplicate avoidance mechanism" is proposed. After tracing back the tag operation event, a deduplication step is designed to check the tag records in the second database. Based on the deduplication avoidance mechanism, duplicate backtracking and out-of-order backtracking are allowed in the backtracking process. Furthermore, in the tag record generation process, the impact of duplicate or out-of-order backtracking on the idempotency of the second database can be effectively avoided. In other words, duplicate tag records can be effectively avoided from being stored in the second database.

[0121] The aforementioned duplicate backtracking can be understood as the occurrence of duplicate tagged operation events due to repeated analysis and processing of the same backtracking basis (such as log records). For example, if the same log record is repeatedly obtained in a subsystem for various reasons, it will lead to repeated analysis and processing of the log record in the backtracking process, thus resulting in the duplicate backtracking problem.

[0122] The aforementioned out-of-order backtracking can be understood as the out-of-order analysis and processing of multiple backtracking bases for the same tag, resulting in out-of-order tag operation events being backtracked for that tag. For example, if the tagging system creates a target tag on a target cloud resource and then quickly deletes it, and the backtracking process uses mechanisms such as multi-batch parallel processing to analyze and process the log records, it may result in the tag deletion event for the target tag being backtracked first, followed by the tag creation event for the target tag, thus causing an out-of-order backtracking problem.

[0123] In this optional implementation, through a deduplication mechanism, from the perspective of the second database, a tag record should be stored for any tag value under any tag that has appeared on any cloud resource. Based on this storage requirement, if, after tracing back a tag operation event, a tag record corresponding to the tag value under the tag pointed to in the tag operation event is not stored in the second database, it can be determined that no tag record adapted to the tag operation event is stored in the second database. In this case, it indicates that the tag value under the tag pointed to in the tag operation event has not experienced the aforementioned duplicate tracing and out-of-order tracing problems. It is the first tag operation event tracing back for the tag value under the tag, which can trigger the generation of a tag record for the target tag that has appeared on the target cloud resource based on the operation event information corresponding to the tag operation event. For the operation event information, please refer to the relevant examples in the previous embodiments, which will not be repeated here.

[0124] An exemplary tag record generation scheme is proposed as follows:

[0125] If the tag operation event type in the operation event information includes a tag creation event, then extract the identifier of the target resource, the identifier of the target tag, the new tag value created under the target tag, and the time value of the new tag value in the creation time dimension from the operation event information to generate the tag record corresponding to the target tag.

[0126] If the tag operation event class in the operation event information includes a tag deletion event, then extract the identifier of the target resource, the identifier of the target tag, the old tag value deleted under the target tag, and the time value of the target tag in the deletion time dimension from the operation event information. Also, obtain the time value of the old tag value deleted under the target tag in the creation time dimension from the log event information to generate the tag record corresponding to the target tag.

[0127] As mentioned earlier, the information dimensions in a tag record may include, but are not limited to, cloud resource identifiers, tag identifiers, tag values ​​under the tag, tag creation time, and tag deletion time. In this tag record generation scheme, information can be extracted from operation event information according to the required information dimensions in the tag record.

[0128] Understandably, if the tag operation event type in the operation event information includes a tag creation event, it indicates that the traced tag operation events include tag creation events, meaning the tag system created a new target tag on the target cloud resource. In this case, the deletion time of the target tag is not present in the operation event information; therefore, it is unnecessary to extract the time value of the target tag in the deletion time dimension from the operation event information. Consequently, the generated tag record will lack the deletion time from the tag's lifespan.

[0129] If the tag operation event type in the operation event information includes a tag deletion event, it indicates that the traced tag operation event includes a tag deletion event. That is, it indicates that the tag system deleted the tag value under the target tag that appeared on the target cloud resource. In this case, the operation event information contains the time value of the old tag deleted under the target tag in the deletion time dimension. The operation event information or the corresponding log event information also contains the time value of the old tag deleted under the target tag in the deletion time dimension. Therefore, in this case, the generated tag record will contain the complete tag lifespan.

[0130] The deduplication mechanism can also identify various situations where it is unnecessary to generate tagged records:

[0131] If the tag lifetime in the tag record that matches the tag operation event in the second database is missing a time value under the deletion time dimension, then the tag lifetime in the tag record that matches the tag operation event in the second database will be updated according to the operation event information corresponding to the tag operation event.

[0132] If the tag lifecycle is found to be complete in the tag record that matches the tag operation event in the second database, then the operation event information corresponding to the tag operation event is discarded.

[0133] As mentioned above, the tag records generated in the subsystem may contain incomplete lifetime information, typically lacking the time value for the tag in the deletion time dimension. In this case, the subsystem does not need to regenerate the tag records; instead, it can update the tag lifetime information in the existing tag records in the second database. This situation usually occurs when the traced tag operation event is a tag deletion event. In this case, the time value of the old tag value deleted under the target tag in the deletion time dimension can be extracted from the operation event information corresponding to such a tag operation event and added to the tag record corresponding to that tag operation event to complete the tag lifetime information in that tag record.

[0134] The aforementioned issues of repeated or out-of-order backtracking can lead to situations where the tag record in the second database that matches the backtracked tag operation event already has a complete tag lifetime. For example, if a tag deletion event is backtracked for a target tag, the subsystem can generate a tag record containing the complete tag lifetime for the target tag. Subsequently, when a tag creation event for the target tag is backtracked, the tag record may already exist with a complete tag lifetime. In this case, there's no need to process the operation event information corresponding to that tag operation event; instead, the operation event information can be directly discarded, thus ensuring idempotency in the second database.

[0135] In summary, this embodiment provides optional implementation methods for the tag record generation stage. By introducing a deduplication mechanism, issues such as duplicate backtracking and out-of-order backtracking can be allowed in the backtracking stage, but the impact of these issues on the idempotency of the second database can be effectively avoided in the tag record generation stage. Moreover, information can be extracted from the operation event information corresponding to different types of tag operation events backtracked according to the required information dimensions in the tag records, thereby efficiently and accurately generating tag records for each tag appearing on the cloud resources.

[0136] In the above or following embodiments, it is possible to flexibly query historical tags on cloud resources from the dimensions of cloud resources, tags, and time. The following provides an exemplary query scheme for the time dimension.

[0137] The following is proposed in this exemplary query scheme:

[0138] It can respond to historical tag query requests for any cloud resource and determine the required historical time period for the query;

[0139] From the tag records generated for cloud resources, find tag records whose time values ​​under the creation time dimension and / or deletion time dimension are within the historical time period in the tag lifespan;

[0140] Generate query results based on the found tag records.

[0141] As mentioned earlier, by quantifying the tag lifespan in the tag record, the lifecycle of each tag that has appeared in the cloud resource can be accurately presented on the timeline. Therefore, when the historical period to be queried is indicated in the historical tag query request, the historical tags associated with the cloud resource in that historical period can be efficiently and accurately determined based on the tag lifespan in the tag record, thereby effectively improving the convenience and accuracy of the query.

[0142] In this exemplary query scheme, an optimization scheme is further proposed for the case where a second database is used to store the tag records generated for different cloud resources.

[0143] In this optimization scheme: First and second boundary time values ​​corresponding to historical time periods can be determined, with the first boundary time value being less than the second boundary time value; query conditions are set in the query statement for time values ​​under the creation time dimension being less than or equal to the second boundary time value and time values ​​under the deletion time dimension being greater than or equal to the first boundary time value; a query request is initiated to the second database according to the query statement to find tag records in the second database whose time values ​​under the creation time dimension and / or deletion time dimension are within the historical time period. If any tag record lacks a time value under the deletion time dimension, the time value under the deletion time dimension of the tag record is defaulted to a preset future time value.

[0144] In this optimization scheme, in the second database, for tag records that lack a time value for deletion under the time dimension, the time value for deletion under the time dimension in these tag records is defaulted to a preset future time value, such as a maximum value. It can be understood that this default future time value is only used during historical tag queries. From the subsystem's perspective, in the aforementioned tag record generation stage, it is still assumed that the time value for deletion under the time dimension in these tag records is missing.

[0145] Based on this, in this optimization scheme, the subsystem can automatically generate query statements based on the historical time periods determined from historical tag query requests, and design the query conditions in the query statements as "AND" logic rather than "OR" logic. In this way, when executing a query request in the second database according to this query statement, only one query operation needs to be performed in the second database, without triggering multiple query operations. This can effectively improve the query efficiency in the second database, thereby further improving the convenience of querying historical tags on cloud resources.

[0146] In summary, this embodiment provides optional implementation methods for the query function of the service system, especially proposing a query support scheme for the time dimension. This scheme can accurately screen out historical tags actually associated with cloud resources within any historical time period, thereby meeting the query needs for historical tags in various management and control scenarios. Furthermore, the query request in the second database has been optimized by proposing the use of "AND" logic to represent query conditions in the query statement. This effectively reduces the number of query operations in the second database, thereby significantly improving the query efficiency and convenience of historical tags on cloud resources.

[0147] Figure 4 This is a schematic diagram illustrating the application logic of a service system in an exemplary application scenario, provided as an exemplary embodiment of this application. In this exemplary application scenario, the service system includes a tag record generation subsystem, and a database is used to store tag records generated by the tag record generation subsystem for tags that have appeared on different cloud resources. Any computing device in the tag system can be reused as a data subscription device in the service system.

[0148] In this exemplary application scenario, the data structure of the tag record can be defined to include the following fields: user identifier, region identifier, cloud resource identifier, cloud resource type, tag identifier, tag value, tag creation time, and tag deletion time. See Table 1 for reference.

[0149]

[0150] Table 1

[0151] refer to Figure 4 In this application scenario, log files generated by the tag system are used as the basis for backtracking. Therefore, the following design approach is proposed for the backtracking process, as shown in Table 2:

[0152]

[0153] Table 2

[0154] Based on the above design concept, the service system in this embodiment can not only ensure the efficiency of backtracking in the backtracking process, but also ensure the accuracy of data reading points in the backtracking process, effectively avoiding the problem of missing log recording processing.

[0155] In the tag record generation process, an "event conversion mechanism" and a "duplicate avoidance mechanism" were proposed.

[0156] The "event transition mechanism" can be found in Table 3:

[0157]

[0158] Table 3

[0159] The exemplary processing flow of the "duplicate avoidance mechanism" after tracing back any tag operation event is as follows:

[0160] insert event handling process:

[0161] Use (uid, region, resourceType, resourceId, tagKey, createTime) as the primary key to query the database.

[0162] • If a tag record can be found, it means that the tag record has already been processed, and the tag operation event retrieved in this backtracking is ignored;

[0163] If no tag record can be found, data is extracted from the operation event information corresponding to the tag operation event according to the data structure of the tag record to generate a tag record and write it to the database.

[0164] update event handling flow:

[0165] 1. For the old tag value v1, query the database using (uid, region, resourceType, resourceId, tagKey, createTime) as the primary key;

[0166] a. If a tag record can be found, update the deleteTime in the tag record.

[0167] b. If no tag record can be found, generate a tag record and write it to the database, while setting deleteTime.

[0168] 2. For the new tag value v2, query the database using (uid, region, resourceType, resourceId, tagKey, createTime) as the primary key;

[0169] a. If a tag record can be found, ignore the tag operation event retrieved in this backtracking process;

[0170] b. If no tag record can be found, generate a tag record and write it to the database.

[0171] Delete event handling process:

[0172] Query the database using (uid, region, resourceType, resourceId, tagKey, createTime) as the primary key.

[0173] If a tag record can be found, update the deleteTime field in the tag record.

[0174] If no tag record is found, generate a tag record and write it to the database, while setting deleteTime.

[0175] Regarding the historical tag search function:

[0176] Figure 5 This is a schematic diagram illustrating the visualization effect of a tag recording method proposed in an exemplary embodiment of this application. (Reference) Figure 5 The service system in this embodiment can accurately present the lifecycle of each tag that appears on the timeline for cloud resources. Figure 5 The text shows several exemplary tags that have appeared on cloud resources, such as env:test, env:prod, and prject:A. For details, please refer to [link to relevant documentation]. Figure 5 This will not be repeated here. Taking one of the tags, env:test, as an example, env is the tag identifier (key), and test is the tag value (value).

[0177] Therefore, if you want to query the historical tags of cloud resources within the historical time period [t1, t2], please refer to... Figure 5 Therefore, the tags that meet the conditions should include: env:test, project:A, env:prod, department:it.

[0178] To address this, different query statements can be designed based on the different settings for the default time value under the deletion time dimension when the deletion time dimension is missing in the tag record, as shown in Table 4:

[0179]

[0180] Table 4

[0181] The second type of query statement can effectively reduce the number of queries in the database, and can significantly improve the historical tag query performance of the service system in high-concurrency query scenarios.

[0182] As can be seen from the above description of the exemplary application scenarios, the service system provided in this embodiment can produce at least the following technical effects in the exemplary application scenarios:

[0183] 1. Tag records can be constructed using only existing log files in the database, and the use of log files is bypassed, without affecting the main process of the tag system.

[0184] 2. Separating the reception and processing of log records can improve the efficiency of log record reception and enable batch processing of log records, while maintaining the accuracy of data reading positions during parallel consumption of log records.

[0185] 3. By constructing the lifecycle of each tag based on log records, duplicate and out-of-order data can be ignored, ensuring the accuracy of the generated tag records.

[0186] Figure 6 The diagram below illustrates a service method as provided in another exemplary embodiment of this application. This method can be executed by the aforementioned tag record generation subsystem, which can be implemented as software, hardware, or a combination of both. The tag record generation subsystem can be integrated into a computing cluster or computing device. (Reference) Figure 6 The method may include:

[0187] Step 600: In response to the preset service instructions, trace back the tag operation events that occurred in the tag system for different cloud resources;

[0188] Step 601: Generate a tag record for the cloud resource based on any tag operation event traced back for any cloud resource. The tag record contains the tag lifetime of the tag corresponding to the traced tag operation event.

[0189] Step 602: Store the tag record.

[0190] In an optional embodiment, the tracing of tag operation events occurring for different cloud resources in the tagging system includes:

[0191] Obtain log records from the log file corresponding to the tag system;

[0192] The acquired log records are analyzed and processed to trace back the tag operation events that occurred in the tag system for different cloud resources.

[0193] In one optional embodiment, log records are obtained from the log file corresponding to the tag system, including:

[0194] Using a data subscription tool, data is subscribed to from the log files corresponding to the tag system, so as to obtain log records from the log files through the data subscription tool.

[0195] In one optional embodiment, a data subscription tool is used to subscribe to the log files corresponding to the tag system, so as to obtain log records from the log files through the data subscription tool, including:

[0196] Using the data subscription tool, log records are read from the log file and stored in a memory queue;

[0197] Log records are read in batches from the memory queue using a single thread;

[0198] The log records read in batches are split into multiple batches of log records to support parallel analysis and processing of the multiple batches of log records.

[0199] In an optional embodiment, the method further includes:

[0200] After the single thread detects that the analysis and processing of log records in multiple batches have been completed, it updates the data acquisition points for the log file.

[0201] In the event of a restart of the data subscription tool or a reset of the log file, the single thread sends an updated data acquisition point to the data subscription tool, so that the data subscription tool continues to acquire log records from the log file according to the data acquisition point maintained by the single thread.

[0202] In one optional embodiment, the acquired log records are analyzed and processed to trace back the tag operation events that occurred in the tagging system for different cloud resources, including:

[0203] For any log record obtained, the log event information recorded in the log record is converted into operation event information with tags as the operation objects;

[0204] The operation event information is used to describe the tag operation events that occurred on the cloud resource pointed to by the log event information.

[0205] In an optional embodiment, the log event information recorded in the log records is converted into operation event information with tags as the operation objects, including:

[0206] From the log event information recorded in the log records, identify the target cloud resource and target tag, log event type, event occurrence time, and tag value operated under the target tag;

[0207] Based on the conversion relationship between log event types and tag operation types, the target tag operation type occurring on the target tag is determined;

[0208] Based on the correlation between the tag operation type and the survival time boundary dimension, the event occurrence time is taken as the time value of the target tag under the target survival time boundary dimension associated with the target tag operation type;

[0209] Based on the target tag operation type, the tag value operated on under the target tag and the time value under the target survival time boundary dimension, operation event information with the target tag as the operation object is generated;

[0210] The survival time boundary dimension includes a creation time dimension and a deletion time dimension.

[0211] In an optional embodiment, the tagging system uses a first database to manage tags, and the log file is used to record operation events of the tagging system on data entries in the first database. Based on the conversion relationship between log event types and tag operation types, the target tag operation type occurring on the target tag is determined, including:

[0212] If the log event type is a data entry insertion event, then the target label operation type occurring on the target label is determined to be a label creation event;

[0213] If the log event type is a data entry update event, then the target tag operation type occurring on the target tag is determined to include tag deletion events and tag creation events;

[0214] If the log event type is a data entry deletion event, then the target tag operation type occurring on the target tag is determined to be a tag deletion event.

[0215] In an optional embodiment, based on the association between the tag operation type and the lifetime boundary dimension, the event occurrence time is used as the time value of the target tag under the target lifetime boundary dimension associated with the target tag operation type, including:

[0216] If the target tag operation type is a tag creation event, then the event occurrence time is used as the time value of the target tag in the creation time dimension;

[0217] If the target tag operation type includes tag deletion event and tag creation event, then the event occurrence time is used as the time value of the old tag value under the target tag in the deletion time dimension, and as the time value of the new tag value under the target tag in the creation time dimension;

[0218] If the target tag operation type is a tag deletion event, then the event occurrence time is used as the time value of the target tag in the deletion time dimension.

[0219] In one optional embodiment, based on the tag operation events traced back for any cloud resource, tag records are generated for each tag that has appeared on the cloud resource, including:

[0220] After tracing back the tag operation events for the target tag to the target cloud resource, if no tag record matching the tag operation event is stored in the second database, then a tag record is generated for the target tag that has appeared on the target cloud resource based on the operation event information corresponding to the tag operation event.

[0221] The second database is used to store tag records generated for different cloud resources. The operation event information is used to describe tag operation events that occur on the target cloud resource for the target tag. The target cloud resource is any cloud resource, and the target tag is any tag that has appeared on the target cloud resource.

[0222] In an optional embodiment, generating tag records for the target tags that have appeared on the target cloud resource based on the operation event information corresponding to the tag operation event includes:

[0223] If the tag operation event type in the operation event information includes a tag creation event, then the identifier of the target resource, the identifier of the target tag, the new tag value created under the target tag, and the time value of the new tag value in the creation time dimension are extracted from the operation event information to generate the tag record corresponding to the target tag.

[0224] If the tag operation event class in the operation event information includes a tag deletion event, then the identifier of the target resource, the identifier of the target tag, the old tag value deleted under the target tag, and the time value of the target tag in the deletion time dimension are extracted from the operation event information. The time value of the old tag value deleted under the target tag in the creation time dimension is obtained from the operation event information or from the aforementioned log event information to generate the tag record corresponding to the target tag.

[0225] In an optional embodiment, the method further includes:

[0226] If the tag lifetime in the tag record that matches the tag operation event in the second database is found to lack a time value under the deletion time dimension, then the tag lifetime in the tag record that matches the tag operation event in the second database is updated according to the operation event information corresponding to the tag operation event.

[0227] If the tag lifetime of a tag record in the second database that matches the tag operation event is found to be complete, then the operation event information corresponding to the tag operation event is discarded.

[0228] In an optional embodiment, updating the tag lifetime in the tag record corresponding to the tag operation event in the second database according to the operation event information corresponding to the tag operation event includes:

[0229] If the tag operation event type in the operation event information includes a tag deletion event, then the time value of the old tag value deleted under the target tag in the deletion time dimension is extracted from the operation event information; the extracted time value is added to the tag record corresponding to the old tag deleted under the target tag in the second database to complete the tag life time in the tag record.

[0230] In an optional embodiment, the method further includes:

[0231] In response to a historical tag query request for any cloud resource, determine the historical time period to be queried;

[0232] From the tag records generated for the cloud resources, find tag records whose time values ​​under the creation time dimension and / or deletion time dimension are located within the historical time period in the tag lifespan;

[0233] Generate query results based on the found tag records.

[0234] In one optional embodiment, searching for tag records whose creation time value and / or deletion time value in the tag lifetime dimension are located within the historical time period from the tag records generated for the cloud resource includes:

[0235] Determine the first boundary time value and the second boundary time value corresponding to the historical period, wherein the first boundary time value is less than the second boundary time value;

[0236] Set the time value under the creation time dimension that is less than or equal to the second boundary time value and the time value under the deletion time dimension that is greater than or equal to the first boundary time value as the query conditions in the query statement;

[0237] A query request is initiated to the second database according to the query statement, in order to find tag records in the second database whose time value under the creation time dimension and / or deletion time dimension are located within the historical time period;

[0238] If any tag record lacks a time value under the deletion time dimension, the time value under the deletion time dimension of the tag record will be defaulted to a preset future time value; the second database is used to store tag records generated for different cloud resources.

[0239] It is worth noting that the technical details of the above-mentioned service method embodiments can be referred to the relevant descriptions in the foregoing service system embodiments. To save space, they will not be repeated here, but this should not cause any loss to the scope of protection of this application.

[0240] It should be noted that some processes described in the above embodiments and accompanying drawings include multiple operations appearing in a specific order. However, it should be clearly understood that these operations may not be executed in the order they appear in this document, or they may be executed in parallel. The operation numbers, such as 601, 602, etc., are merely used to distinguish different operations and do not represent any execution order. Furthermore, these processes may include more or fewer operations, and these operations may be executed sequentially or in parallel. It should also be noted that the descriptions such as "first" and "second" in this document are used to distinguish different databases and boundary time values, etc., and do not represent a chronological order, nor do they limit "first" and "second" to different types.

[0241] Figure 7 This is a schematic diagram of a computing device provided as another exemplary embodiment of this application. The aforementioned tag recording generation subsystem can be integrated into this computing device. Figure 7 As shown, the computing device may include: memory 70 and processor 71.

[0242] The memory 70 is used to store the computer program corresponding to the above-mentioned model performance optimization device.

[0243] The processor 71, coupled to the memory 70, is used to execute the computer program in the memory 70 for performing the aforementioned service method.

[0244] Furthermore, such as Figure 7 As shown, the computing device also includes other components such as a communication component 72 and a power supply component 73. Figure 7 The diagram only shows some components and does not mean that the computing device includes only these components. Figure 7 The components shown.

[0245] It is worth noting that the technical details of the above embodiments of the computer device can be referred to the relevant descriptions in the foregoing method embodiments. To save space, they will not be repeated here, but this should not cause any loss to the scope of protection of this application.

[0246] The aforementioned memory can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random-Access Memory (SRAM), Electrically Erasable Programmable Read Only Memory (EEPROM), Erasable Programmable Read Only Memory (EPROM), Programmable Read-Only Memory (PROM), Read-Only Memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.

[0247] The aforementioned communication component is configured to facilitate wired or wireless communication between the device containing the communication component and other devices. The device containing the communication component can access wireless networks based on communication standards, such as 2G, 3G, 4G / LTE, 5G, or combinations thereof. In one exemplary embodiment, the communication component receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel.

[0248] The aforementioned power supply components provide power to various components within the device in which they reside. These power supply components may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power to the device in which they reside.

[0249] Accordingly, embodiments of this application also provide a computer-readable storage medium storing a computer program, which, when executed by a processor, enables the processor to implement the steps in the above-described method embodiments. The computer-readable storage medium may be volatile, non-volatile, or a combination thereof, and may be removable or non-removable. Examples of computer-readable storage media include, but are not limited to, phase-change random access memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), flash memory or other memory technologies, CD-ROM, digital video disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transfer medium.

[0250] Accordingly, this application also provides a computer program product, which includes a computer program or instructions that, when executed by a processor, cause the processor to implement the steps in the above method embodiments. It should be understood that each step or combination of steps in the above method flow can be implemented by the computer program or instructions. Furthermore, these computer programs or instructions can be applied to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device, enabling the processor of the general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing device to function as an apparatus for implementing the corresponding functions in the above method embodiments.

[0251] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.

[0252] The above are merely embodiments of this application and are not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.

Claims

1. A service method, characterized in that, include: In response to preset service commands, trace back the tag operation events that occurred in the tag system for different cloud resources; Based on the tag operation events traced back for any cloud resource, a tag record for the cloud resource is generated, and the tag record contains the tag lifetime of the tag corresponding to the traced tag operation event; Store the tag records.

2. The method according to claim 1, characterized in that, The tagging system traces tagging operation events that occur for different cloud resources, including: Obtain log records from the log file corresponding to the tag system; The acquired log records are analyzed and processed to trace back the tag operation events that occurred in the tag system for different cloud resources.

3. The method according to claim 2, characterized in that, Obtain log records from the log file corresponding to the tag system, including: Use a data subscription tool to retrieve log records from the log file; The data subscription tool is used to subscribe to data from the log files corresponding to the tag system.

4. The method according to claim 3, characterized in that, Using a data subscription tool, data is subscribed to from the log files corresponding to the tag system, so as to obtain log records from the log files through the data subscription tool, including: Using the data subscription tool, log records are read from the log file and stored in a memory queue; The acquired log records are analyzed and processed, including: Log records are read in batches from the memory queue using a single thread; The log records read in batches are split into multiple batches of log records to support parallel analysis and processing of the multiple batches of log records.

5. The method according to claim 4, characterized in that, Also includes: After the single thread detects that the analysis and processing of log records in multiple batches have been completed, it updates the data acquisition points for the log file. In the event of a restart of the data subscription tool or a reset of the log file, the single thread sends an updated data acquisition point to the data subscription tool, so that the data subscription tool continues to acquire log records from the log file according to the data acquisition point maintained by the single thread.

6. The method according to claim 2, characterized in that, The acquired log records are analyzed and processed to trace back the tag operation events that occurred in the tag system for different cloud resources, including: For any log record obtained, the log event information recorded in the log record is converted into operation event information with the tag as the operation object, so as to trace back the tag operation events that occurred in the tag system for the cloud resources pointed to by the log event information; The operation event information is used to describe the tag operation events that occurred on the cloud resource pointed to by the log event information.

7. The method according to claim 6, characterized in that, The log event information recorded in the log records is converted into operation event information with tags as the operation objects, including: From the log event information recorded in the log records, identify the target cloud resource and target tag, log event type, event occurrence time, and tag value operated under the target tag; Based on the conversion relationship between log event types and tag operation types, the target tag operation type occurring on the target tag is determined; Based on the correlation between the tag operation type and the survival time boundary dimension, the event occurrence time is taken as the time value of the target tag under the target survival time boundary dimension associated with the target tag operation type; Based on the target tag operation type, the tag value operated on under the target tag and the time value under the target survival time boundary dimension, operation event information with the target tag as the operation object is generated; The survival time boundary dimension includes a creation time dimension and a deletion time dimension.

8. The method according to claim 7, characterized in that, The tagging system uses a first database to manage tags. The log file records operation events in the tagging system for data entries in the first database. Based on the conversion relationship between log event types and tag operation types, the target tag operation type occurring on the target tag is determined, including: If the log event type is a data entry insertion event, then the target label operation type occurring on the target label is determined to be a label creation event; If the log event type is a data entry update event, then the target tag operation type occurring on the target tag is determined to include tag deletion events and tag creation events; If the log event type is a data entry deletion event, then the target tag operation type occurring on the target tag is determined to be a tag deletion event.

9. The method according to claim 8, characterized in that, Based on the correlation between tag operation type and lifetime boundary dimension, the event occurrence time is used as the time value of the target tag under the target lifetime boundary dimension associated with the target tag operation type, including: If the target tag operation type is a tag creation event, then the event occurrence time is used as the time value of the target tag in the creation time dimension; If the target tag operation type includes tag deletion event and tag creation event, then the event occurrence time is used as the time value of the old tag value under the target tag in the deletion time dimension, and as the time value of the new tag value under the target tag in the creation time dimension; If the target tag operation type is a tag deletion event, then the event occurrence time is used as the time value of the target tag in the deletion time dimension.

10. The method according to claim 1, characterized in that, Based on the tag operation events traced back for any cloud resource, generate tag records for each tag that has appeared on the cloud resource, including: After tracing back the tag operation events for the target tag to the target cloud resource, if no tag record matching the tag operation event is stored in the second database, then a tag record is generated for the target tag that has appeared on the target cloud resource based on the operation event information corresponding to the tag operation event. The second database is used to store tag records generated for different cloud resources. The operation event information is used to describe tag operation events that occur on the target cloud resource for the target tag. The target cloud resource is any cloud resource, and the target tag is any tag that has appeared on the target cloud resource.

11. The method according to claim 10, characterized in that, Based on the operation event information corresponding to the tag operation event, generate tag records for the target tags that have appeared on the target cloud resource, including: If the tag operation event type in the operation event information includes a tag creation event, then the identifier of the target resource, the identifier of the target tag, the new tag value created under the target tag, and the time value of the new tag value in the creation time dimension are extracted from the operation event information to generate the tag record corresponding to the target tag. If the tag operation event class in the operation event information includes a tag deletion event, then the identifier of the target resource, the identifier of the target tag, the old tag value deleted under the target tag, and the time value of the target tag in the deletion time dimension are extracted from the operation event information. In addition, the time value of the old tag value deleted under the target tag in the creation time dimension is obtained from the operation event information to generate the tag record corresponding to the target tag.

12. The method according to claim 10, characterized in that, Also includes: If the tag lifetime in the tag record that matches the tag operation event in the second database is found to lack a time value under the deletion time dimension, then the tag lifetime in the tag record that matches the tag operation event in the second database is updated according to the operation event information corresponding to the tag operation event. If the tag lifetime of a tag record in the second database that matches the tag operation event is found to be complete, then the operation event information corresponding to the tag operation event is discarded.

13. The method according to claim 12, characterized in that, Based on the operation event information corresponding to the tag operation event, update the tag lifetime in the tag record corresponding to the tag operation event in the second database, including: If the tag operation event type in the operation event information includes a tag deletion event, then the time value of the old tag value deleted under the target tag in the deletion time dimension is extracted from the operation event information; the extracted time value is added to the tag record corresponding to the old tag deleted under the target tag in the second database to complete the tag life time in the tag record.

14. The method according to claim 1, characterized in that, Also includes: In response to a historical tag query request for any cloud resource, determine the historical time period to be queried; From the tag records generated for the cloud resources, find tag records whose time values ​​under the creation time dimension and / or deletion time dimension are located within the historical time period in the tag lifespan; Generate query results based on the found tag records.

15. The method according to claim 14, characterized in that, From the tag records generated for the cloud resources, find tag records whose creation time value and / or deletion time value in the tag lifetime dimension are within the historical time period, including: Determine the first boundary time value and the second boundary time value corresponding to the historical period, wherein the first boundary time value is less than the second boundary time value; Set the time value under the creation time dimension that is less than or equal to the second boundary time value and the time value under the deletion time dimension that is greater than or equal to the first boundary time value as the query conditions in the query statement; A query request is initiated to the second database according to the query statement, in order to find tag records in the second database whose time value under the creation time dimension and / or deletion time dimension are located within the historical time period; If any tag record lacks a time value under the deletion time dimension, the time value under the deletion time dimension of the tag record will be defaulted to a preset future time value; the second database is used to store tag records generated for different cloud resources.

16. A service system, characterized in that, Includes a tag record generation subsystem; the tag record generation subsystem is used for: In response to preset service commands, trace back the tag operation events that occurred in the tag system for different cloud resources; Based on the tag operation events traced back for any cloud resource, a tag record for the cloud resource is generated, and the tag record contains the tag lifetime of the tag corresponding to the traced tag operation event; Store the tag records.

17. The service system according to claim 16, characterized in that, It also includes a data subscription device equipped with data subscription tools, the data subscription device being used for: Subscribe to data in the log files corresponding to the tag system; The acquired log records are transmitted to the tag record generation subsystem, so that the tag record generation subsystem can use the log records to trace back the tag operation events that occurred in the tag system for different cloud resources. The data subscription device is any computing device selected from the tag system.

18. A computing device, characterized in that, Includes memory, processor, and communication components; The memory is used to store one or more computer instructions; The processor is coupled to the memory and the communication component and is used to execute one or more computer instructions for performing the service method according to any one of claims 1-15.

19. A computer-readable storage medium for storing a computer program, characterized in that, When the computer program is executed by one or more processors, the one or more processors perform the service method according to any one of claims 1-15.

20. A computer program product, characterized in that, Includes a computer program that, when executed by one or more processors, causes the one or more processors to perform the service method according to any one of claims 1-15.