Alarm resource positioning method, device, system, equipment and readable storage medium

By receiving and parsing the model and resource identifier fields in alarm messages and generating query conditions using pre-stored configuration information, the problem of low efficiency in alarm resource location in distributed cloud systems is solved, and rapid location and efficient management across resource types are achieved.

CN122160243APending Publication Date: 2026-06-05CHINA MOBILE FINANCIAL TECHNOLOGY CO LTD +1

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
CHINA MOBILE FINANCIAL TECHNOLOGY CO LTD
Filing Date
2026-02-28
Publication Date
2026-06-05

AI Technical Summary

Technical Problem

In distributed cloud systems, existing monitoring and alarm platforms lack a unified identification system and standardized interfaces, resulting in significant differences in alarm information formats, semantics, and resource identification rules for different resource types, leading to low efficiency in alarm resource location.

Method used

By receiving the model name and resource identifier fields from the alarm message, and using the resource model name and identifier configuration information in the pre-stored configuration information, query conditions are generated, the resource identifier field is automatically parsed, and the alarm resource is located.

Benefits of technology

It enables rapid location of alarm resources across resource types, improves the efficiency of alarm resource location, reduces the amount of code required for third-party access, shortens the integration cycle, and expands the applicability of the method.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122160243A_ABST
    Figure CN122160243A_ABST
Patent Text Reader

Abstract

The application discloses a kind of positioning methods, devices, systems, equipment and readable storage medium of alarm resource, it is related to cloud computing operation and maintenance management technical field, to solve the problem of low positioning efficiency of alarm resource.The method comprises: receiving alarm message sent by alarm party, alarm message includes model name field and resource identification field;Determine target configuration information from multiple pre-stored configuration information, pre-stored configuration information includes resource model name and corresponding resource identification configuration information;Determine query condition based on the value of resource identification field and the resource identification configuration information of target configuration information;Alarm resource corresponding to alarm message is positioned in the target resource model of CMDB based on query condition.The present application embodiment can improve the positioning efficiency of alarm resource.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of cloud computing operation and maintenance management technology, and in particular to a method, apparatus, system, device and readable storage medium for locating alarm resources. Background Technology

[0002] In current distributed cloud system architectures, the infrastructure resources hosted in private cloud environments exhibit high heterogeneity. Various resources are typically provided by different vendors and implement localized alarm functions based on their respective independent technology stacks. Due to the lack of a unified identification system and standardized interfaces, alarm information generated by different resources differs significantly in format, semantics, and resource identification rules.

[0003] Existing monitoring and alarm platforms often require developing separate adaptation logic for each resource type when achieving alarm correlation and accurate location across resource types. This includes parsing its unique alarm structure and mapping its non-standard resource identifiers, resulting in low efficiency in locating alarm resources. Summary of the Invention

[0004] This invention provides a method, apparatus, system, device, and readable storage medium for locating alarm resources, in order to solve the problem of low efficiency in locating alarm resources.

[0005] To solve the above-mentioned technical problems, this application is implemented as follows: In a first aspect, embodiments of this application provide a method for locating alarm resources, including: Receive an alarm message sent by an alarm, the alarm message including a model name field and a resource identifier field, the model name field being used to identify the target resource model, and the resource identifier field being used to locate the resource from the target resource model; The target configuration information is determined from multiple pre-stored configuration information, wherein the pre-stored configuration information includes a resource model name and a corresponding resource identifier configuration information, the resource identifier configuration information is used to describe the configuration rules of the resource identifier field, and the resource model name of the target configuration information matches the value of the model name field; The query conditions are determined based on the value of the resource identifier field and the resource identifier configuration information of the target configuration information; Based on the query conditions, locate the alarm resource corresponding to the alarm message in the target resource model of CMDB.

[0006] Optionally, when there is only one target field, the resource identifier configuration information includes the target field name of the target field, where the target field is a field used to locate resources; When there are at least two target fields, the resource identifier configuration information includes the target field name, the preset order of the target field names, and the separator between any two adjacent target field names.

[0007] Optionally, the resource identifier configuration information includes a composite resource identifier and a delimiter. The composite resource identifier is a plurality of target field names concatenated according to the preset arrangement order, and any two adjacent target field names are concatenated by the delimiter.

[0008] Optionally, determining the query conditions based on the value of the resource identifier field and the resource identifier configuration information of the target configuration information includes: The composite resource identifier of the target configuration information is segmented based on the segmentation symbol to obtain a first array, and the value of the resource identifier field is segmented based on the segmentation symbol to obtain a second array; The elements in the first array are used as keys, and the elements in the second array at the same position are used as values. The resulting key-value pairs are then used as the query conditions.

[0009] Optionally, before determining the target configuration information from multiple pre-stored configuration information, the method further includes: Determine the resource model in the CMDB corresponding to the resource provider's resources; Determine the resource model name and corresponding target field of the resource model, wherein the target field is a field used to locate the resource; Generate the resource identifier configuration information based on the target field; The resource model name and the corresponding resource identifier configuration information are associated and stored as the pre-stored configuration information.

[0010] Optionally, after locating the alarm resource corresponding to the alarm message in the target resource model of the CMDB based on the query conditions, the method further includes: Locate the cloud data center where the alarm resource is located and the cloud tenant information that uses the alarm resource.

[0011] Optionally, locating the alarm resource corresponding to the alarm message in the target resource model of the CMDB based on the query conditions includes: Match the target resource model in the CMDB based on the model name field; Based on the query conditions, locate the alarm resource corresponding to the alarm message in the target resource model.

[0012] Secondly, embodiments of the present invention provide a system for locating alarm resources, comprising: A monitoring and alarm platform, wherein the monitoring and alarm platform is used to perform the steps in the alarm resource location method as described in the first aspect; CMDB is used to store multiple pre-stored configuration information and resource models; An external alarm module, comprising multiple alarms, is used to push alarm messages to the monitoring and alarm platform.

[0013] Thirdly, embodiments of the present invention provide a device for locating alarm resources, comprising: The receiving module is used to receive alarm messages sent by the alarm department. The alarm message includes a model name field and a resource identifier field. The model name field is used to determine the target resource model, and the resource identifier field is used to locate the resource from the target resource model. The first determining module is used to determine target configuration information from multiple pre-stored configuration information. The pre-stored configuration information includes a resource model name and a corresponding resource identifier configuration information. The resource identifier configuration information is used to describe the configuration rules of the resource identifier field. The resource model name of the target configuration information matches the value of the model name field. The second determining module is used to determine query conditions based on the value of the resource identifier field and the resource identifier configuration information of the target configuration information; The first positioning module is used to locate the resource corresponding to the alarm message in the target resource model of the CMDB based on the query conditions.

[0014] Fourthly, embodiments of the present invention provide a device for locating alarm resources, including: a memory, a processor, and a program stored in the memory and executable on the processor; The processor is configured to read a program from the memory to implement the steps in the alarm resource location method as described in the first aspect.

[0015] Fifthly, embodiments of the present invention provide a readable storage medium for storing a program, which, when executed by a processor, implements the steps in the alarm resource location method described in the first aspect.

[0016] In this embodiment of the invention, an alarm message sent by an alarm is received. The alarm message includes a model name field and a resource identifier field. The model name field is used to determine the target resource model, and the resource identifier field is used to locate the resource from the target resource model. Target configuration information is determined from multiple pre-stored configuration information. Through the aforementioned pre-stored configuration information, the resource model name and the corresponding resource identifier configuration information are mapped and stored. After receiving the alarm message, the target configuration information can be determined based on the model name field, and then the resource identifier configuration information can be obtained. The resource identifier field is then automatically parsed based on the resource identifier configuration information to obtain query conditions. Based on the query conditions, the alarm resource corresponding to the alarm message is located in the target resource model of the CMDB. Through this method, alarm messages sent by different alarms can be automatically parsed, thereby quickly locating alarm resources and improving the efficiency of alarm resource location. Attached Figure Description

[0017] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0018] Figure 1 A flowchart illustrating the alarm resource location method provided in this application embodiment; Figure 2 One of the structural schematic diagrams of the alarm resource positioning system provided in the embodiments of this application; Figure 3 A second schematic diagram of the structure of the alarm resource location system provided in the embodiments of this application; Figure 4 A schematic diagram of the structure of the alarm resource positioning device provided in the embodiments of this application; Figure 5 A schematic diagram of the structure of the alarm resource positioning device provided in the embodiments of this application. Detailed Implementation

[0019] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0020] Unless otherwise defined, the technical or scientific terms used in this application shall have the ordinary meaning understood by one of ordinary skill in the art to which this application pertains. The terms "first," "second," and similar terms used in this application do not indicate any order, quantity, or importance, but are merely used to distinguish different components. Similarly, the terms "a" or "one," and similar terms do not indicate a quantity limitation, but rather indicate the presence of at least one. The terms "connected" or "linked," and similar terms, are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. Terms such as "upper," "lower," "left," and "right," etc., are used only to indicate relative positional relationships; when the absolute position of the described object changes, the relative positional relationship also changes accordingly.

[0021] The following description, in conjunction with the accompanying drawings, further illustrates the alarm resource location method, apparatus, system, device, and readable storage medium proposed in the embodiments of the application. Please refer to... Figure 1 , Figure 1 A flowchart illustrating a method for locating alarm resources provided in an embodiment of this application is shown below. Figure 1 As shown, the method includes: Step 101: Receive an alarm message sent by the alarm department. The alarm message includes a model name field and a resource identifier field. The model name field is used to determine the target resource model, and the resource identifier field is used to locate the resource from the target resource model.

[0022] It should be noted that, as a specific embodiment, the alarm resource location method provided in this embodiment is applied to a monitoring and alarm platform and is executed by the monitoring and alarm platform. The monitoring and alarm platform connects to the platforms to which each resource belongs, receives alarm messages pushed by different alarms, thereby realizing the centralization of alarms for various types of resources.

[0023] It should be understood that the resource identifier field is used to locate resources from the target resource model. In specific implementations, different platforms provide different resource types, and the resource location methods for different resource types may also differ. In specific implementations, typically at least one field is used to locate resources; these fields are called target fields, and the number of target fields is not limited here.

[0024] In some embodiments, resource types include cloud hosts, cloud databases, cloud storage resources, and cloud network devices. For example, in some embodiments, cloud hosts are typically identified based on Internet Protocol (IP) addresses; that is, the target field for a cloud host is its IP address. Cloud databases are typically identified based on instance names and ports; that is, the target fields for a cloud database are the instance name and port. Cloud storage resources are typically identified based on bucket names, user names, and storage identifiers; that is, the target fields for cloud storage resources are the bucket name, user name, and storage identifier. Cloud network devices are typically identified based on device names and ports; that is, the target fields for cloud network devices are the device name and port.

[0025] Upon receiving the alert message, the system extracts the model name and resource identifier fields. Each field includes a field name and a field value. The model name field identifies the specific resource model, i.e., the target resource model, while the resource identifier field identifies the specific resource within the target resource model, facilitating resource location.

[0026] In this embodiment, only two core fields need to be specified in the alarm message (i.e., the model name field and the resource identifier field), which is far fewer than the methods in the prior art. This greatly reduces the amount of code required for third-party access and shortens the connection cycle with the alarm.

[0027] In some embodiments, in addition to the model name field and resource identifier field, the alarm message includes a message identifier field and an alarm information field. Each field includes a field name and a field value. The message identifier field is used to identify the alarm message, and the alarm information field is used to describe the specific alarm information. This approach improves the richness of the alarm message content.

[0028] Step 102: Determine the target configuration information from multiple pre-stored configuration information. The pre-stored configuration information includes a resource model name and a corresponding resource identifier configuration information. The resource identifier configuration information is used to describe the configuration rules of the resource identifier field. The resource model name of the target configuration information matches the value of the model name field.

[0029] The Configuration Management database (CMDB) stores multiple resource models, each with a different model for each resource type. In practice, the monitoring and alerting platform, together with various cloud resource providers, determines the model name of their resources on the CMDB platform, records it as a resource pool, and identifies which fields uniquely identify a resource for each model—the target fields for each model.

[0030] Resource identifier configuration information describes the configuration rules for the resource identifier field. Based on these rules, the resource identifier field can be automatically parsed to determine its specific physical meaning. It should be understood that these configuration rules can be adjusted and set according to actual circumstances; specific limitations are not specified here.

[0031] Optionally, in some embodiments, when there is only one target field, the resource identifier configuration information includes the target field name of the target field, where the target field is a field used to locate resources.

[0032] The fact that there is only one target field indicates that for this resource model, a unique resource can be located based on just one field. For example, the pre-stored configuration information 1 is the pre-stored configuration information corresponding to resource model A. Resource model A locates the specific resource based on the "instance name" field. Therefore, the pre-stored configuration information includes "model A" (resource model name) and "instance name" (resource identification configuration information).

[0033] Optionally, in some embodiments, when the number of target fields is at least two, the resource identifier configuration information includes the target field name, the preset order of the target field names, and the separator between any two adjacent target field names.

[0034] The requirement of at least two target fields indicates that for this resource model, a unique resource must be located based on at least two fields. In this case, the resource identifier field includes information from multiple target fields, and the resource identifier configuration information describes the configuration rules by which the information from these multiple target fields is used to compose the resource identifier field.

[0035] In this embodiment, the resource identifier configuration information provides the target field name, the preset order of the target field names, and the delimiter between any two adjacent target field names. The resource identifier field can be segmented by the delimiter, and the specific meaning of each segmented field can be determined by the preset order, thus avoiding ambiguity.

[0036] In some embodiments, the segmentation symbol is randomly generated, thereby improving the flexibility of resource identification configuration information. In other embodiments, the segmentation symbol is predetermined. Optionally, in other embodiments, the segmentation symbol is determined based on user input. In this embodiment, having the user specify the segmentation symbol avoids subsequent identification errors caused by the actual existence of the symbol within the resource when using a fixed symbol, thus improving the accuracy of resource location.

[0037] In this embodiment, when there is only one target field, the resource identifier configuration information includes the target field name. When there are at least two target fields, the resource identifier configuration information includes the target field name, the order of arrangement, and a delimiter. By using the above method to concatenate the target field names with a delimiter, the problem of combined identifiers for multi-field resources is solved, thereby achieving compatibility with mixed scenarios involving single and multiple target fields and expanding the applicability of this method.

[0038] It should be understood that the storage structure of the pre-stored configuration information is not limited here; its essence is a structured data carrier for storing mapping rules. For example, in some embodiments, the pre-stored configuration information is stored through a model metadata registry. In other embodiments, the pre-stored configuration information is stored using configuration files, such as in JavaScript Object Notation (JSON) format.

[0039] For ease of understanding, the following is an example of pre-stored configuration information in a specific registry data structure: {resource_model: 'object_storage', resource_name: 'object_storage-user_name-bucket_name', delimiter: '-'}.

[0040] In the example above, the resource model name is "object_storage", and its corresponding resource identifier configuration information is "object_storage-user_name-bucket_name', separator: '-'". According to the resource identifier configuration information, there are three target fields: the object storage field (object_storage), the object user field (user_name), and the object bucket field (bucket_name), arranged in the order "object_storage", "user_name", and "bucket_name", and concatenated using the separator "-".

[0041] Another specific example of pre-stored configuration information is as follows: {resource_model: 'mysql_instance', resource_name: 'ip_address|instance_port', delimiter: '|'}.

[0042] If the MySQL database model name in CMDB is "mysql_instance", then the resource pool content is "mysql_instance". There are two target fields that define a resource: the IP address field (ip_address) and the instance port field (instance_port), separated by "|". In the example above, the resource model name is "mysql_instance", and its corresponding resource identifier configuration information is "ip_address|instance_port', separated by '|'".

[0043] It should be noted that, in some embodiments, the field name of the target field strictly follows the field name stored in the CMDB, thereby ensuring that the concatenated resource identifier configuration information completely matches the CMDB query logic, improving the accuracy and efficiency of the matching.

[0044] Optionally, in some embodiments, the resource identifier configuration information includes a composite resource identifier and a delimiter, wherein the composite resource identifier is a plurality of target field names concatenated according to the preset arrangement order, and any two adjacent target field names are concatenated by the delimiter.

[0045] In this embodiment, the resource identifier configuration information includes a specific composite resource identifier and a delimiter. The composite resource identifier is a string predetermined according to configuration rules, which includes the target field name, arrangement, and delimiter. For example, the composite resource identifier is: “ip_address|instance_port, separator: |”; Based on the above composite resource identifier, the target field names are "ip_address" and "instance_port", which are arranged in sequence and concatenated by the separator "|".

[0046] In this embodiment, the target fields are arranged in a preset order and concatenated into a string using a specified delimiter. In this way, no matter how many target fields are needed to confirm a specific resource (i.e., the number of target fields is arbitrary), it can be finally converted into a single string, thereby fixing the data format, improving the efficiency of data processing, and thus improving the efficiency of locating alarm resources.

[0047] Optionally, in some embodiments, before step 102, the method further includes: Determine the resource model in the CMDB corresponding to the resource provider's resources; Determine the resource model name and corresponding target field of the resource model, wherein the target field is a field used to locate the resource; Generate the resource identifier configuration information based on the target field; The resource model name and the corresponding resource identifier configuration information are associated and stored as the pre-stored configuration information.

[0048] The process involves working with the resource provider to determine the corresponding resource model in the CMDB for the resource type they provide (i.e., determining the resource model name), and identifying the fields within that resource model used to determine resource information (i.e., determining the target fields). If there is only one target field, resource identification configuration information is generated based on the field name. If there are at least two target fields, resource identification configuration information is generated using the field names, their order, and delimiters.

[0049] In this embodiment, the resource model name and its corresponding resource identifier configuration information are associated and stored as pre-stored configuration information, thus forming a mapping relationship between resource providers and resource models. This mapping relationship enables dynamic composite resource identifier mapping; different types of resources maintain this mapping relationship, which serves as the data foundation for locating alarm resources and determining the scope of tenant impact. It should be understood that in some embodiments, the alarm may refer to any one of multiple resource providers.

[0050] When a new resource provider joins the monitoring and alarm platform, if the new resource provider's resource type is an existing resource type, it can be directly connected to the monitoring and alarm platform; if the new resource provider's resource type is a new resource type, only a pre-stored configuration information corresponding to that resource type needs to be added, which improves the convenience of adding new resource types and increases efficiency.

[0051] As a specific implementation, the pre-stored configuration information is managed based on the data registry. When a new resource type is added, only a new record needs to be written to the registry (e.g., if a new resource model A is added, the model name: resource type A; resource identifier configuration information: ip_address|instance_port; separator: |) is recorded in the data registry. There is no need to modify the interface code. Compared with the traditional hard-coding method, the expansion efficiency is greatly improved, and the rule changes are zero downtime.

[0052] Step 103: Determine query conditions based on the value of the resource identifier field and the resource identifier configuration information of the target configuration information.

[0053] In this embodiment, the value of the resource identifier field is analyzed based on the configuration rules of the resource identifier field described in the target resource identifier configuration information to obtain specific query conditions.

[0054] For example, in some embodiments, the target resource identifier configuration information includes the target field name of the target field. Based on the target resource identifier configuration information, the value of the resource identifier field can be determined as the value of the target field. The target field name and the value of the resource identifier field are combined to obtain a set of key-value pairs, which are used as query conditions.

[0055] For example, in other embodiments, the resource identifier configuration information includes the target field name, the sorting order, and the delimiter. The value of the resource identifier field is split based on the delimiter, and the target field name and the split resource identifier field value are combined according to the sorting order to obtain multiple key-value pairs, which are used as query conditions.

[0056] Optionally, in some embodiments, step 103 includes: The composite resource identifier of the target configuration information is segmented based on the segmentation symbol to obtain a first array, and the value of the resource identifier field is segmented based on the segmentation symbol to obtain a second array; The elements in the first array are used as keys, and the elements in the second array at the same position are used as values. The resulting key-value pairs are then used as the query conditions.

[0057] For example, the composite resource identifier of the target configuration information is “ip_address|instance_port”, the value of the resource identifier field is “10.4.12.XX|33XX”, and the separator is “|”.

[0058] The composite resource identifier of the target configuration information is segmented based on the segmentation symbol, and the first array is as follows: "{"ip_address","instance_port"}"; The resource identifier field value is split based on the delimiter, resulting in the following second array: "{"10.4.12.XX","33XX"}"; By combining the elements in the first array as query field names and the elements in the second array at the same position as field values, we can obtain the following query conditions: "ip_address=10.4.12.XX; instance_port=33XX".

[0059] In this embodiment, based on the resource identifier field received in real time and the preset composite resource identifier, the two can be automatically segmented and matched according to predetermined rules to obtain query conditions. In this way, the convenience of determining query conditions is improved, and the efficiency of locating alarm resources is further improved.

[0060] Step 104: Based on the query conditions, locate the alarm resource corresponding to the alarm message in the target resource model of the CMDB.

[0061] In this embodiment, the alarm resource corresponding to the alarm message can be determined by locating it in the CMDB based on the query conditions. In some embodiments, the query conditions and the model name field are used as common query fields to locate the alarm resource corresponding to the alarm message in the CMDB.

[0062] Optionally, in some embodiments, step 104 includes: Match the target resource model in the CMDB based on the model name field; Based on the query conditions, locate the alarm resource corresponding to the alarm message in the target resource model.

[0063] In this embodiment, the target resource model is first determined based on query conditions, and then the target resource model is queried in the CMDB to locate the specific resource that triggered the alarm. This method achieves hierarchical resource location, improving the efficiency of resource location.

[0064] For example, if the value of the model name field in the alarm message is "mysql_instance", and the resulting query conditions are "ip_address=10.4.12.XX;instance_port=33XX", the resource corresponding to the alarm message can be located by matching the above model name field and query conditions in the CMDB.

[0065] Optionally, in some embodiments, after step 104, the method further includes: Locate the cloud data center where the alarm resource is located and the cloud tenant information that uses the alarm resource.

[0066] Specifically, once the resource that triggered the alarm is located, its resource pool (e.g., data center, network domain, Virtual Private Cloud, VPC) can be found through the CMDB platform. The person in charge of using the resource can be identified, and an alarm ticket can be pushed to them. At the same time, the cloud tenant information that uses the resource can be located, and abnormal alarm information can be pushed to them.

[0067] In this embodiment, after locating the specific alarm resource, the location of its cloud data center resource pool and the tenant information using the resource are further searched through the above method, which helps the cloud service provider to quickly locate the alarm location and notify the affected users in a timely manner.

[0068] Optionally, in some embodiments, after step 103, the method further includes: if no alarm resource corresponding to the alarm message is found based on the query conditions, returning an error message.

[0069] In this embodiment, if no alarm resource can be matched from the CMDB platform, the alarm will still be issued, but it will be marked as an abnormal alarm item, and the corresponding error message will be returned in the interface feedback result to remind the user whether the field value of the specific "model name field" or "resource identifier field" is unmatched.

[0070] like Figure 2 As shown, this embodiment of the invention also provides a system for locating alarm resources, including: A monitoring and alarm platform, wherein the monitoring and alarm platform is used to perform the steps in the above-mentioned alarm resource location method; CMDB is used to store multiple pre-stored configuration information and resource models; An external alarm module, comprising multiple alarms, is used to push alarm messages to the monitoring and alarm platform.

[0071] Optionally, in some embodiments, the monitoring and alarm platform includes a centralized alarm management module, an alarm configuration module, and a resource-CMDB association configuration module; The centralized alarm management module is used to receive alarm messages sent by alarms. Each alarm message includes a model name field and a resource identifier field. The model name field is used to determine the target resource model, and the resource identifier field is used to locate the resource from the target resource model. It then determines target configuration information from multiple pre-stored configuration information sets. The pre-stored configuration information includes a resource model name and corresponding resource identifier configuration information. The resource identifier configuration information describes the configuration rules of the resource identifier field, and the resource model name of the target configuration information matches the value of the model name field. Based on the value of the resource identifier field and the resource identifier configuration information of the target configuration information, it determines query conditions. Finally, based on the query conditions, it locates the alarm resource corresponding to the alarm message in the target resource model within the configuration management database (CMDB). The alarm configuration module is used to determine the resource model corresponding to the resource provider's resource in the CMDB; determine the resource model name and corresponding target field of the resource model, wherein the target field is a field used to locate the resource; and generate the resource identification configuration information based on the target field. The resource-CMDB association configuration module is used to associate and store the resource model name and the corresponding resource identifier configuration information as the pre-stored configuration information.

[0072] For ease of understanding, the following specific embodiment will be used as an example to illustrate the alarm resource location method provided by the present invention.

[0073] Please see Figure 3 First, the alarm configuration module, together with various cloud resource providers, determines the resource model name of their resources in the CMDB, recording it as a resource pool, and identifies which fields can uniquely identify each resource model. If multiple target fields are required, a delimiter and a preset arrangement order are specified. After determining the arrangement order of multiple target fields, they are concatenated using the specified delimiter and recorded as a Composite Resource Identifier (CRI). In this embodiment, having the user specify the delimiter avoids errors caused by the use of fixed symbols that already exist in the actual resource. The field order strictly follows the field names of the resource models in the CMDB, ensuring that the concatenated identifier completely matches the CMDB query logic. The resource model name and the corresponding resource identifier configuration information are stored as pre-stored configuration information in the registry.

[0074] In the Dynamic Resource Identifier Mapping API (DRI-API), the model name field strictly corresponds to the model name in the CMDB, rather than a generic colloquial name; the resource identifier field supports single fields (such as cloud host IP directly filled in) and multiple fields concatenated (such as databases requiring IP and port). The interface automatically identifies the number of target fields by the number of times the separator appears, without the need for additional field descriptions, reducing the number of transmitted fields by 30% compared to traditional interfaces.

[0075] The centralized alarm management module matches the value of the model name field with the resource model in the CMDB to determine the resource type that triggered the alarm; it then segments the value of the resource identifier field according to the delimiter and forms an array in the order of the segments, which is named array 1 here.

[0076] Find the mapping information corresponding to the resource model name in the pre-stored configuration information through the model name field, and divide the CRI value obtained by concatenation in the pre-stored configuration information according to the delimiter recorded in the mapping table, and form an array in order, which is named array 2.

[0077] Using the elements at the same positions in arrays 1 and 2 as column names and values, query the corresponding CMDB model to find the matching alarm resources: The following is an example of a specific implementation. A specific alarm message example is as follows: Message identifier field: "alert_id": "ALERT-001"; Model name field: "resource_model": "mysql"; Resource identifier field: "resource_name": "10.4.12.XX|33XX"; Alarm message field: "message": "CPU exceeds threshold, current value is 93%".

[0078] In the above alarm message, "alert_id" is the field name of the message identifier field, "ALERT-001" is the field value of the message identifier field; "resource_model" is the field name of the model name field, "mysql" is the field value of the model name field; "resource_name" is the field name of the resource identifier field, "10.4.12.XX|33XX" is the field value of the resource identifier field; "message" is the field name of the alarm information field, and "CPU exceeds threshold, current value is 93%" is the field value of the alarm information field.

[0079] Assuming the MySQL database is named "mysql" in the CMDB model, then the resource pool content is "mysql". A resource has two fields: ip_address and instance_port. We agree to use "|" as the separator and record this separator through configuration. Therefore, the CRI content is: ip_address|instance_port.

[0080] When a MySQL database uses the DRI-API interface to push alarm messages, the value of the model name field is "mysql" and the value of the resource identifier field is "10.4.12.XX|33XX". The resulting array 1 after splitting these values ​​is: {"10.4.12.XX","33XX"}.

[0081] The CRI array 2 corresponding to mysql_instance is: {"ip_address","instance_port"}; the query condition after combining the elements at the same position of the two arrays is: ip_address=10.4.12.XX and instance_port=33XX. Based on the above conditions, query the MySQL model in CMDB to find the resource information that uniquely matches the model, and record it as the alarm resource.

[0082] By using the above methods, the specific resource that triggered the alarm can be identified, the location of the cloud data center resource pool where the alarm resource is located can be found, and the tenant information using the resource can be obtained. This helps cloud service providers quickly locate the alarm location and promptly notify affected users.

[0083] If the pushed alarm information cannot be matched with a specific alarm resource from the CMDB platform through the query conditions, the platform will still issue the alarm, but mark it as an abnormal alarm item, and return corresponding error messages in the interface feedback results, reminding the user whether the value of the specific model name field or the resource identifier field failed to match. Abnormal alarms are automatically classified into the "Unmatched Resource Pool" and generate analysis reports containing "Model Name Matching Failure Rate" and "Details of Missing Composite Resource Identifier Fields", realizing a closed loop of abnormal self-optimization.

[0084] For example, in the mysql_instance model, 30% of the mismatches are due to incorrect IP field format (non-IPv4 / IPv6), and 70% are due to the port being outside the range of 1-65535. At the same time, optimization suggestions containing CMDB model field rules are pushed to the resource provider (such as "Please ensure that the ip_address field conforms to the IPv4 / IPv6 format, example: 10.4.12.12").

[0085] In some embodiments, the composite resource identifier is associated with the fault self-healing script. When an alarm is triggered, the alarm resource is located and the corresponding self-healing script is automatically invoked (e.g., restarting the database instance or expanding the disk), thereby realizing a closed-loop automation of alarm, location, and repair.

[0086] In this embodiment, when performing centralized alarm access, users are provided with simple configurable capabilities for matching various alarm resources, without requiring users to develop code for each platform. After an alarm occurs, the alarm information from each resource provider can be centralized and a general alarm processing platform capability can be formed using the CMDB platform. In conjunction with the work order system, alarms can be accurately pushed to affected users.

[0087] Please see Figure 4 This embodiment of the invention also provides a location device 400 for alarm resources. Figure 4 This is one of the structural diagrams of the alarm resource locating device 400 provided in an embodiment of the present invention. Because the problem-solving principle of the alarm resource locating device 400 is similar to that in the embodiment of the present invention... Figure 1 The method for locating alarm resources shown is similar, so the implementation of the alarm resource location device 400 can be found in the implementation of the method, and the repeated parts will not be described again.

[0088] like Figure 4 As shown, the alarm resource locating device 400 includes: The receiving module 401 is used to receive an alarm message sent by the alarm, the alarm message including a model name field and a resource identifier field, the model name field being used to determine the target resource model, and the resource identifier field being used to locate the resource from the target resource model; The first determining module 402 is used to determine target configuration information from multiple pre-stored configuration information. The pre-stored configuration information includes a resource model name and a corresponding resource identifier configuration information. The resource identifier configuration information is used to describe the configuration rules of the resource identifier field. The resource model name of the target configuration information matches the value of the model name field. The second determining module 403 is used to determine query conditions based on the value of the resource identifier field and the resource identifier configuration information of the target configuration information; The first positioning module 404 is used to locate the alarm resource corresponding to the alarm message in the target resource model of the configuration management database CMDB based on the query conditions.

[0089] Optionally, when there is only one target field, the resource identifier configuration information includes the target field name of the target field, where the target field is a field used to locate resources; When there are at least two target fields, the resource identifier configuration information includes the target field name, the preset order of the target field names, and the separator between any two adjacent target field names.

[0090] Optionally, the resource identifier configuration information includes a composite resource identifier and a delimiter. The composite resource identifier is a plurality of target field names concatenated according to the preset arrangement order, and any two adjacent target field names are concatenated by the delimiter.

[0091] Optionally, the second determining module 403 includes: The segmentation unit is used to segment the composite resource identifier of the target configuration information based on the segmentation symbol to obtain a first array, and to segment the value of the resource identifier field based on the segmentation symbol to obtain a second array; The determining unit is used to take the elements in the first array as keys and the elements in the second array at the same position as values, and determine the resulting key-value pairs as the query conditions.

[0092] Optionally, the alarm resource locating device 400 further includes: The third determination module is used to determine the resource model corresponding to the resource provider's resources in the CMDB; The fourth determining module is used to determine the resource model name and the corresponding target field of the resource model, wherein the target field is a field used to locate the resource; The generation module is used to generate the resource identifier configuration information based on the target field; The storage module is used to associate and store the resource model name and the corresponding resource identifier configuration information as the pre-stored configuration information.

[0093] Optionally, the alarm resource locating device 400 further includes: The second positioning module is used to locate the cloud data center where the alarm resource is located and the cloud tenant information that uses the alarm resource.

[0094] The alarm resource locating device 400 provided in this embodiment of the invention can execute the alarm resource locating method embodiment described above. Its implementation principle and technical effect are similar, and will not be repeated here.

[0095] In the several embodiments provided in this application, it should be understood that the disclosed methods and apparatus can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.

[0096] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can be physically comprised separately, or two or more units can be integrated into one unit. The integrated unit described above can be implemented in hardware or in the form of hardware plus software functional units.

[0097] The integrated units implemented as software functional units described above can be stored in a computer-readable storage medium. These software functional units, stored in a storage medium, include several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute some steps of the transmission and reception methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0098] like Figure 5As shown, this embodiment of the invention also provides an alarm resource location device 500, which includes: a processor 501, configured to read a program from a memory 502 and execute the following steps: Receive an alarm message sent by an alarm, the alarm message including a model name field and a resource identifier field, the model name field being used to identify the target resource model, and the resource identifier field being used to locate the resource from the target resource model; The target configuration information is determined from multiple pre-stored configuration information, wherein the pre-stored configuration information includes a resource model name and a corresponding resource identifier configuration information, the resource identifier configuration information is used to describe the configuration rules of the resource identifier field, and the resource model name of the target configuration information matches the value of the model name field; The query conditions are determined based on the value of the resource identifier field and the resource identifier configuration information of the target configuration information; Based on the query conditions, locate the alarm resource corresponding to the alarm message in the target resource model of the configuration management database CMDB.

[0099] Optionally, when there is only one target field, the resource identifier configuration information includes the target field name of the target field, where the target field is a field used to locate resources; When there are at least two target fields, the resource identifier configuration information includes the target field name, the preset order of the target field names, and the separator between any two adjacent target field names.

[0100] Optionally, the resource identifier configuration information includes a composite resource identifier and a delimiter. The composite resource identifier is a plurality of target field names concatenated according to the preset arrangement order, and any two adjacent target field names are concatenated by the delimiter.

[0101] Optionally, the processor 501 is further configured to read the program in the memory 502 and perform the following steps: The composite resource identifier of the target configuration information is segmented based on the segmentation symbol to obtain a first array, and the value of the resource identifier field is segmented based on the segmentation symbol to obtain a second array; The elements in the first array are used as keys, and the elements in the second array at the same position are used as values. The resulting key-value pairs are then used as the query conditions.

[0102] Optionally, the processor 501 is further configured to read the program in the memory 502 and perform the following steps: Determine the resource model in the CMDB corresponding to the resource provider's resources; Determine the resource model name and corresponding target field of the resource model, wherein the target field is a field used to locate the resource; Generate the resource identifier configuration information based on the target field; The resource model name and the corresponding resource identifier configuration information are associated and stored as the pre-stored configuration information.

[0103] Optionally, the processor 501 is further configured to read the program in the memory 502 and perform the following steps: Locate the cloud data center where the alarm resource is located and the cloud tenant information that uses the alarm resource.

[0104] The alarm resource locating device 500 provided in this embodiment of the invention can execute the alarm resource locating method embodiment described above. Its implementation principle and technical effect are similar, and will not be repeated here.

[0105] This application also provides a readable storage medium storing a program. When the program is executed by a processor, it implements the various processes of the above-described alarm resource location method embodiment and achieves the same technical effect. To avoid repetition, it will not be described again here.

[0106] The readable storage medium can be any available medium or data storage device that the processor can access, including but not limited to magnetic storage (such as floppy disks, hard disks, magnetic tapes, magneto-optical disks (MO), etc.), optical storage (such as compact disks (CD), digital video discs (DVD), Blu-ray discs (BD), high-definition universal discs (HVD), etc.), and semiconductor storage (such as read-only memory (ROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), non-volatile memory (NAND FLASH), solid-state disks (SSD), etc.).

[0107] It should be noted that, in this document, 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 a 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.

[0108] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, disk, optical disk) and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of this application.

[0109] The embodiments of this application have been described above with reference to the accompanying drawings. However, this application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of this application.

Claims

1. A method for locating alarm resources, characterized in that, include: Receive an alarm message sent by an alarm, the alarm message including a model name field and a resource identifier field, the model name field being used to identify the target resource model, and the resource identifier field being used to locate the resource from the target resource model; The target configuration information is determined from multiple pre-stored configuration information, wherein the pre-stored configuration information includes a resource model name and a corresponding resource identifier configuration information, the resource identifier configuration information is used to describe the configuration rules of the resource identifier field, and the resource model name of the target configuration information matches the value of the model name field; The query conditions are determined based on the value of the resource identifier field and the resource identifier configuration information of the target configuration information; Based on the query conditions, locate the alarm resource corresponding to the alarm message in the target resource model of the configuration management database CMDB.

2. The method according to claim 1, characterized in that, When there is only one target field, the resource identifier configuration information includes the target field name of the target field, where the target field is a field used to locate resources; When there are at least two target fields, the resource identifier configuration information includes the target field name, the preset order of the target field names, and the separator between any two adjacent target field names.

3. The method according to claim 2, characterized in that, The resource identifier configuration information includes a composite resource identifier and a separator. The composite resource identifier is a plurality of target field names concatenated in the preset order, and any two adjacent target field names are concatenated by the separator.

4. The method according to claim 3, characterized in that, The process of determining query conditions based on the value of the resource identifier field and the resource identifier configuration information of the target configuration information includes: The composite resource identifier of the target configuration information is segmented based on the segmentation symbol to obtain a first array, and the value of the resource identifier field is segmented based on the segmentation symbol to obtain a second array; The elements in the first array are used as keys, and the elements in the second array at the same position are used as values. The resulting key-value pairs are then used as the query conditions.

5. The method according to claim 1, characterized in that, Before determining the target configuration information from multiple pre-stored configuration information, the method further includes: Determine the resource model in the CMDB corresponding to the resource provider's resources; Determine the resource model name and corresponding target field of the resource model, wherein the target field is a field used to locate the resource; Generate the resource identifier configuration information based on the target field; The resource model name and the corresponding resource identifier configuration information are associated and stored as the pre-stored configuration information.

6. The method according to claim 1, characterized in that, After locating the alarm resource corresponding to the alarm message in the target resource model of the CMDB based on the query conditions, the method further includes: Locate the cloud data center where the alarm resource is located and the cloud tenant information that uses the alarm resource.

7. A system for locating alarm resources, characterized in that, include: A monitoring and alarm platform, wherein the monitoring and alarm platform is used to perform the steps in the method for locating alarm resources as described in any one of claims 1 to 6; CMDB is used to store multiple pre-stored configuration information and resource models; An external alarm module, comprising multiple alarms, is used to push alarm messages to the monitoring and alarm platform.

8. A device for locating alarm resources, characterized in that, include: The receiving module is used to receive alarm messages sent by the alarm department. The alarm message includes a model name field and a resource identifier field. The model name field is used to determine the target resource model, and the resource identifier field is used to locate the resource from the target resource model. The first determining module is used to determine target configuration information from multiple pre-stored configuration information. The pre-stored configuration information includes a resource model name and a corresponding resource identifier configuration information. The resource identifier configuration information is used to describe the configuration rules of the resource identifier field. The resource model name of the target configuration information matches the value of the model name field. The second determining module is used to determine query conditions based on the value of the resource identifier field and the resource identifier configuration information of the target configuration information; The first positioning module is used to locate the alarm resource corresponding to the alarm message in the target resource model of the configuration management database CMDB based on the query conditions.

9. A device for locating alarm resources, comprising: A memory, a processor, and a program stored in the memory and executable on the processor; characterized in that, The processor is configured to read a program from the memory to implement the steps in the alarm resource location method as described in any one of claims 1 to 6.

10. A readable storage medium for storing a program, characterized in that, When the program is executed by the processor, it implements the steps in the alarm resource location method as described in any one of claims 1 to 6.