Alarm method and device, computer equipment, storage medium and program product
By generating cascaded alarm information based on the dependency relationship between child devices and parent devices, the problem of incomplete alarm information in the traditional alarm notification method is solved, and the comprehensiveness and correlation of alarm information is achieved.
Patent Information
- Application Number
- CN202510435464.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-08
- Publication Date
- 2025-07-11
AI Technical Summary
The traditional alarm notification method cannot reflect the dependence between various alarm information, causing users to be unable to determine whether other devices associated with the faulty device have faults, resulting in incomplete alarm information.
By obtaining the alarm determination results of the alarm conditions associated with each child device, the first alarm information is generated based on the operation data and alarm conditions of the child device, and cascade alarm information is generated based on the dependency between the parent device and the child device, reflecting the correlation between the alarm information of the child device and the parent device.
It improves the comprehensiveness of the alarm information, can accurately represent whether the child device needs to be alerted, and quickly generates the alarm information of the parent device, enhancing the relevance and comprehensiveness of the alarm information.
Smart Images

Figure CN120295870A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of alarm processing, and in particular, to an alarm method, apparatus, computer device, computer-readable storage medium, and computer program product. Background Art
[0002] When a software or hardware failure occurs in a device, alarm information can be generated based on the failure information and presented to the user to notify the user to process the failure according to the alarm information.
[0003] In traditional alarm notification methods, the alarm information corresponding to each device is presented to the user by running the development code corresponding to different alarm rules. However, each alarm information is presented to the user separately, and the dependency relationship between the alarm information cannot be reflected, so that the user cannot determine whether there are failures in other devices associated with the faulty device.
[0004] Therefore, the traditional alarm notification method has the problem of incomplete alarm information. Summary of the Invention
[0005] Based on this, it is necessary to provide an alarm method, apparatus, computer device, computer-readable storage medium, and computer program product that can improve the comprehensiveness of alarm information for the above technical problems.
[0006] In a first aspect, this application provides an alarm method. The method includes:
[0007] Obtain the alarm determination results of the alarm conditions associated with each sub-device, where the alarm determination results are obtained according to the operation data of the sub-device and the alarm conditions;
[0008] For each of the sub-devices, obtain the first alarm information of the sub-device according to the alarm determination result, and determine the second alarm information of the parent device according to each of the first alarm information and the alarm determination result of the parent device corresponding to each of the sub-devices;
[0009] Generate cascaded alarm information according to each of the first alarm information and the second alarm information.
[0010] In one of the embodiments, the number of the alarm conditions associated with the sub-device is multiple, and the obtaining the first alarm information of the sub-device according to the alarm determination result includes:
[0011] Obtain the first logical relationship between the alarm conditions associated with the sub-device;
[0012] Obtain the first alarm information according to the first logical relationship and each of the alarm determination results.
[0013] In one embodiment, obtaining the first alarm information according to the first logical relationship and each of the alarm determination results includes:
[0014] When the first logical relationship is a logical AND, if each of the alarm determination results is that the operation data corresponding to each alarm condition satisfies the alarm condition, it is determined that the first alarm information is that the sub-device is in a state that requires an alarm;
[0015] When the first logical relationship is a logical OR, if any one of the alarm determination results is that the operation data corresponding to the alarm condition satisfies the alarm condition, it is determined that the first alarm information is that the sub-device is in a state that requires an alarm;
[0016] When the first logical relationship is a logical NOT, if each of the alarm determination results is that the operation data corresponding to each alarm condition does not satisfy the alarm condition, it is determined that the first alarm information is that the sub-device is in a state that requires an alarm.
[0017] In one embodiment, obtaining the first alarm information according to the first logical relationship and each of the alarm determination results includes:
[0018] When the first logical relationship is a nested relationship, determine the priority of each alarm condition according to the nested relationship;
[0019] Perform recursive processing on each of the alarm determination results according to the priority and the second logical relationship between each alarm condition, and obtain the first alarm information, where the second logical relationship includes any one of logical AND, logical OR, and logical NOT.
[0020] In one embodiment, determining the second alarm information of the parent device according to each of the first alarm information and the alarm determination results of the parent device corresponding to each sub-device includes:
[0021] Obtain the third logical relationship between the parent device and each sub-device, where the third logical relationship includes any one of logical AND, logical OR, and logical NOT;
[0022] Determine the second alarm information according to the third logical relationship, the alarm determination result of the parent device, and each of the first alarm information.
[0023] In one embodiment, after generating the cascaded alarm information according to each of the first alarm information and the second alarm information, the method further includes:
[0024] Detect whether the alarm handling strategy corresponding to the cascaded alarm information includes an alarm self-healing strategy;
[0025] If the alarm handling policy includes the alarm self-healing policy, send self-healing instructions to each of the sub-devices according to the alarm self-healing policy, where the self-healing instructions are used for each of the sub-devices to perform alarm self-healing processing;
[0026] If the alarm handling policy does not include the alarm self-healing policy and does not include the alarm suppression policy and the alarm masking policy, generate an alarm notification according to the cascaded alarm information.
[0027] In a second aspect, the present application further provides a disease risk analysis device. The device includes:
[0028] A first acquisition module, configured to acquire an alarm determination result of an alarm condition associated with each sub-device, where the alarm determination result is acquired according to the operation data of the sub-device and the alarm condition;
[0029] A second acquisition module, configured to, for each of the sub-devices, acquire first alarm information of the sub-device according to the alarm determination result, and determine second alarm information of the parent device according to each of the first alarm information and the alarm determination result of the parent device corresponding to each sub-device;
[0030] A first generation module, configured to generate cascaded alarm information according to each of the first alarm information and the second alarm information.
[0031] In a third aspect, the present application further provides a computer device, including a memory and a processor, where the memory stores a computer program, and when the processor executes the computer program, the steps of the method described in the first aspect above are implemented.
[0032] In a fourth aspect, the present application further provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method described in the first aspect above are implemented.
[0033] In a fifth aspect, the present application further provides a computer program product. The computer program product includes a computer program, and when the computer program is executed by a processor, the steps of the method described in the first aspect above are implemented.
[0034] The above warning method, device, computer device, computer-readable storage medium, and computer program product. The server obtains the warning determination results of the warning conditions associated with each sub-device. Then, for each sub-device, the first warning information of the sub-device is obtained according to the warning determination result, and according to the warning determination results of the parent devices corresponding to each sub-device for each first warning information, the second warning information of the device is determined. Then, cascade warning information is generated according to each first warning information and the second warning information. Since the warning determination result is obtained according to the operation data of the sub-device and the warning condition, it can accurately represent whether a warning needs to be issued for the sub-device and generate the first warning information. Moreover, since the dependency relationship between the parent device and the sub-device is prior information known in the device, after obtaining the first warning information, based on the dependency relationship between the devices, the second warning information corresponding to the parent device can be quickly and accurately generated according to the first warning information and the warning determination result of the parent device. Thus, cascade warning information is generated according to the first warning information of the sub-device and the second warning information of the parent device, so that the cascade warning information can reflect the correlation between the warning information of the sub-device and the warning information of the parent device, thereby improving the comprehensiveness of the warning information. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the following will briefly introduce the drawings required for use in the description of the embodiments or related technologies. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.
[0036] Figure 1 It is an application environment diagram of the warning method in one embodiment;
[0037] Figure 2 It is a schematic flowchart of the warning method in one embodiment;
[0038] Figure 3 It is a schematic flowchart of step 202 in another embodiment;
[0039] Figure 4 It is a schematic flowchart of step 302 in another embodiment;
[0040] Figure 5 It is a schematic flowchart of step 202 in another embodiment;
[0041] Figure 6 It is a schematic flowchart of step 203 in another embodiment;
[0042] Figure 7 It is a schematic flowchart of the warning method in another embodiment;
[0043] Figure 8 is a structural block diagram of an alarm device in an embodiment;
[0044] Figure 9 is an internal structure diagram of a computer device in an embodiment. Detailed implementation manners
[0045] In order to make the objectives, technical solutions, and advantages of the present application clearer and more understandable, the present application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0046] In the field of fault detection, a fault detection tool can be used to display the alarm information of a faulty device to a user to notify the user that the device has a fault. In traditional alarm processing methods, for different alarm situations, corresponding alarm notification programs need to be developed, and when the alarm occurs, the alarm notification program is triggered to display the alarm information to the user.
[0047] However, this method can only display the alarm information corresponding to each alarm situation to the user separately, and cannot display the cascaded alarm information associated with a single alarm information, resulting in the user being unable to process the existing faults in a timely manner based on the alarm information. Therefore, there is a problem of incomplete alarm information in the traditional technology.
[0048] In view of this, the present application proposes an alarm method that can improve the comprehensiveness of alarm information. The server obtains the alarm determination results of the alarm conditions associated with each sub-device. Then, for each sub-device, the first alarm information of the sub-device is obtained according to the alarm determination result, and according to the alarm determination results of the parent devices corresponding to each sub-device, the second alarm information of the device is determined. Then, cascaded alarm information is generated according to each first alarm information and the second alarm information. Since the alarm determination result is obtained based on the operation data and alarm conditions of the sub-device, it can accurately represent whether the sub-device needs to be alarmed and generate the first alarm information. Moreover, since the dependency relationship between the parent device and the sub-device is the prior information known in the device, after obtaining the first alarm information, based on the dependency relationship between the devices, the second alarm information corresponding to the parent device can be quickly and accurately generated according to the first alarm information and the alarm determination result of the parent device. Thus, cascaded alarm information is generated according to the first alarm information of the sub-device and the second alarm information of the parent device, so that the cascaded alarm information can reflect the correlation between the alarm information of the sub-device and the alarm information of the parent device, thereby improving the comprehensiveness of the alarm information.
[0049] The alarm method provided by the embodiments of the present application can be applied to, for example Figure 1In the illustrated implementation environment, the server 102 communicates with the device 104 via a network. Among them, the data storage system can store the data that the server 102 needs to process. The data storage system can be integrated on the server 102, or can be placed in the cloud or on other network servers. The device 104 includes multiple dependent sub-devices and a parent device. The server 102 obtains the alarm determination results of the alarm conditions associated with each sub-device. The alarm determination results are obtained based on the operating data of the sub-devices and the alarm conditions. Then, for each sub-device, the first alarm information of the sub-device is obtained according to the alarm determination results, and according to each first alarm information, the second alarm information of the parent device corresponding to each sub-device is determined. Then, cascaded alarm information is generated according to each first alarm information and the second alarm information. Among them, the server 102 can be implemented by an independent server or a server cluster composed of multiple servers. Among them, the device 104 can be a server device, and each component included in the server is a sub-device. Or, the device 104 can also be a server cluster including multiple dependent servers, and each server in the device cluster is a sub-device. As Figure 1 shown, taking the device 104 as a server device as an example.
[0050] In an exemplary embodiment, as Figure 2 shown, an alarm method is provided. Taking the method applied to the Figure 1 server in it as an example for explanation, it includes the following steps 201-step 203:
[0051] Step 201, obtain the alarm determination results of the alarm conditions associated with each sub-device.
[0052] Among them, the alarm determination results are obtained based on the operating data of the sub-devices and the alarm conditions.
[0053] Among them, the alarm condition is a condition for judging whether the device has a fault or an abnormality according to the operating data of the device and the preset rules and thresholds. In the alarm condition, an alarm expression can be set, and the alarm expression is used to judge whether the operating data of the device meets the alarm condition. Exemplarily, according to performance indicators such as CPU usage rate, memory usage rate, disk I / O rate, and network bandwidth utilization rate, an alarm expression can be set, and when the operating data of the device meets the alarm expression, it is determined that the operating data meets the alarm condition, thereby determining that the device has a fault. Exemplarily, as shown in the following table, different alarm conditions can be set in advance according to different fault judgment rules.
[0054]
[0055] It should be noted that among multiple devices belonging to the same server, the devices can be divided into parent devices and child devices belonging to the parent devices according to the dependency relationships between the devices. Then, when a child device fails, the parent device to which the child device belongs may also fail. For example, for the fan in the server and the hard disk enclosure used to install and protect the hard disk, since the hard disk in the hard disk enclosure generates heat during operation, it is necessary for the fan to operate to dissipate heat from the hard disk enclosure so that the temperature inside the hard disk enclosure is within a reasonable range to ensure that the hard disk can operate stably and reliably. The normal operation of the hard disk enclosure depends on the effective heat dissipation function of the fan. Therefore, the hard disk enclosure can be used as the parent device and the fan as the child device.
[0056] Optionally, one parent device can correspond to one child device, or one parent device can also correspond to multiple child devices. Since the alarm rules for different devices are different, the alarm conditions corresponding to different child devices may be the same or different. Optionally, one child device may be associated with one alarm condition, or one child device may be associated with multiple alarm conditions. In this embodiment, taking one parent device corresponding to multiple child devices and one child device being associated with one alarm condition as an example, the process of generating cascaded alarm information is described.
[0057] Among them, the alarm determination result refers to whether there is a failure in the child device. Optionally, the alarm determination result can be that there is a failure, or the alarm determination result can also be that there is no failure. Among them, the operation data of the child device refers to various parameters and indicators generated during the operation of the child device, which is used to reflect the state, performance and operation situation of the child device.
[0058] In this embodiment, for each child device, the server can obtain the corresponding operation data of the child device according to the alarm condition associated with the child device, and then compare the alarm condition with the corresponding operation data to obtain the alarm determination result corresponding to the alarm condition, so as to obtain the alarm determination results of the alarm conditions associated with each child device.
[0059] As a possible implementation, the association relationship between devices can be used as edges, and the operation data of each device can be used as nodes to generate a device relationship tree. When generating alarm information, the operation data corresponding to the alarm condition can be obtained from the device relationship tree, so that the alarm determination result can be obtained based on the operation data and the alarm condition. Specifically, for each alarm condition, the server can obtain the operation data of a sub-device and the threshold data corresponding to the operation data, and substitute the operation data and the threshold data into the alarm expression of the alarm condition. If the operation data and the threshold data satisfy the alarm expression, it is determined that the operation data satisfies the alarm condition, that is, the alarm determination result is that an alarm needs to be issued for the sub-device. For example, if the alarm condition is: if the fan temperature > the threshold temperature, it is determined that an alarm needs to be issued for the fan. The obtained fan temperature is 60 degrees, and the threshold temperature is 50 degrees. Since 60 degrees > 50 degrees, it is determined that the operation data and the threshold data satisfy the alarm expression, so an alarm needs to be issued for the fan.
[0060] Step 202, for each sub-device, obtain the first alarm information of the sub-device according to the alarm determination result, and determine the second alarm information of the parent device according to the first alarm information of each sub-device and the alarm determination result of the parent device corresponding to each sub-device.
[0061] It should be noted that if the alarm determination result is that the operation data of the sub-device satisfies the alarm condition, it can be determined that an alarm needs to be issued for the sub-device; if the alarm determination result is that the operation data of the sub-device does not satisfy the alarm condition, it can be determined that an alarm does not need to be issued for the sub-device. Therefore, the first alarm information of the sub-device can be obtained according to the alarm determination result.
[0062] Among them, the parent device is a device at a higher level relative to the sub-device. The parent device can manage and control the sub-device. The sub-device is functionally dependent on the parent device, and the operation of the sub-device depends on the supervision of the parent device. Exemplarily, the sub-devices corresponding to the parent device hard disk enclosure can include fans, hard disks, and power supplies. The normal and stable operation of the hard disk enclosure depends on the normal and stable operation of the fans, hard disks, and power supplies. Therefore, the second alarm information of the hard disk enclosure can be determined according to the first alarm information corresponding to the fans, hard disks, and power supplies. Among them, the alarm determination result of the parent device can be determined according to the result of whether the operation data of the parent device satisfies the alarm condition associated with the parent device. Optionally, if the operation data of the parent device satisfies the alarm condition associated with the parent device, it can be determined that the alarm determination result of the parent device is that the parent device needs to be alarmed; or, if the operation data of the parent device does not satisfy the alarm condition associated with the parent device, it can be determined that the alarm determination result of the parent device is that the parent device does not need to be alarmed.
[0063] Among them, the first warning message is a warning message used to describe whether the sub-device is in a state that requires warning. The second warning message is a warning message used to describe whether the parent device is in a state that requires warning.
[0064] Taking a sub-device as an example, in this embodiment, the server can determine whether to issue a warning to the sub-device according to the warning determination result of the sub-device, so as to obtain the first warning message of the sub-device. Then, it obtains the multiple first warning messages of the multiple sub-devices corresponding to the parent device. Next, it detects the operating state of the parent device according to the multiple first warning messages to obtain the warning determination result of the parent device, and determines whether to issue a warning to the parent device according to the warning determination result of the parent device. Then, it determines the second warning message of the parent device.
[0065] Step 203: Generate a cascaded warning message according to each first warning message and the second warning message.
[0066] Among them, the cascaded warning message is a warning message used to describe whether the sub-device and the parent device with an association relationship are in a state that requires warning. The cascaded warning message may include the relevant information of the sub-device in a state that requires warning, and the relevant information of the parent device in a state that requires warning caused by the sub-device. For example, the device identifiers of the sub-device and the parent device, the fault type of the sub-device, the fault type of the parent device and other relevant information. In a device, when a certain sub-device fails, due to the mutual association and dependency relationship between devices, the fault will spread along a specific path, resulting in a situation where multiple related sub-devices and / or parent devices successively generate warning messages. These warning messages are mutually associated, forming a cascading effect, just like dominoes, where one fault can trigger a series of subsequent warnings.
[0067] In this embodiment, after obtaining each first warning message, the server can determine whether to issue a warning to each sub-device related to the parent device, and after obtaining the second warning message, it can determine whether to issue a warning to the parent device, so as to generate a cascaded warning message.
[0068] In the above warning method, the server obtains the warning determination results of the warning conditions associated with each sub-device. Then, for each sub-device, according to the warning determination result, the server obtains the first warning information of the sub-device, and based on the warning determination results of the parent devices corresponding to each sub-device, determines the second warning information of the device. Subsequently, based on the first warning information and the second warning information, the server generates cascaded warning information. Since the warning determination result is obtained based on the operation data and warning conditions of the sub-device, it can accurately represent whether a warning needs to be issued for the sub-device and generate the first warning information. Moreover, since the dependency relationship between the parent device and the sub-device is prior information known in the device, after obtaining the first warning information, based on the dependency relationship between the devices, the second warning information corresponding to the parent device can be quickly and accurately generated according to the first warning information and the warning determination result of the parent device. Thus, the cascaded warning information is generated based on the first warning information of the sub-device and the second warning information of the parent device, enabling the cascaded warning information to reflect the correlation between the warning information of the sub-device and the warning information of the parent device, and further improving the comprehensiveness of the warning information.
[0069] Based on Figure 2 the embodiment shown, refer to Figure 3 , the number of warning conditions associated with the sub-device is multiple. This embodiment is related to the process in which the server obtains the first warning information of the sub-device according to the warning determination result. Step 202 includes Figure 3 the steps 301 and 302 shown:
[0070] Step 301, obtain the first logical relationship between the warning conditions associated with the sub-device.
[0071] It can be understood that if each sub-device is associated with multiple warning conditions, the first warning information corresponding to the sub-device can be determined according to the multiple warning determination results corresponding to the multiple warning conditions. Therefore, it is necessary to obtain the first logical relationship between the warning conditions to determine the logical relationship between the warning determination results.
[0072] Among them, the first logical relationship between the warning conditions can represent the influence relationship between different warning conditions. For example, the factors affecting the normal operation of the fan include temperature and speed. If the temperature is abnormal, it may cause the fan to malfunction. If the speed is abnormal, it may also cause the fan to malfunction. Then the warning conditions associated with the fan can include the temperature warning condition and the speed warning condition, and the logical relationship between the temperature warning condition and the speed warning condition is logical OR.
[0073] In this embodiment, the server can determine the alarm factors (the alarm factors correspond to alarm conditions) that cause the failure of the sub-device according to historical failure data, and determine the logical relationship between the alarm factors that cause the failure of the sub-device. Then, according to the logical relationship between the alarm factors that cause the failure of the sub-device, determine the first logical relationship between the alarm conditions.
[0074] Exemplarily, if the factors causing the fan failure include the temperature of the fan and the speed of the fan, and abnormal temperature or abnormal speed will cause the fan failure. Therefore, the first logical relationship between the temperature alarm condition and the speed alarm condition is logical OR.
[0075] Step 302, obtain the first alarm information according to the first logical relationship and each alarm determination result.
[0076] In this embodiment, the server can determine the association relationship between the alarm determination result of each alarm condition and the alarm determination results of other alarm conditions according to the first logical relationship between the alarm conditions. Then, determine the overall alarm determination result of each alarm determination result according to the association relationship. Then, determine the first alarm information according to the overall alarm determination result.
[0077] Exemplarily, if the fan is associated with the temperature alarm condition and the speed alarm condition, and the first logical relationship between the temperature alarm condition and the speed alarm condition is logical OR, then if the running data of the fan satisfies the temperature alarm condition, or the running data of the fan satisfies the speed alarm condition, it can be determined that the first alarm information of the fan is that the fan is in a state that requires an alarm.
[0078] In this embodiment, the server first obtains the first logical relationship between the alarm conditions associated with the sub-device, and then obtains the first alarm information of the sub-device according to the first logical relationship and the alarm determination results of the sub-device. Since the first logical relationship corresponds to the alarm conditions associated with the sub-device, the alarm determination results of the sub-device can be accurately converged according to the first logical relationship, so as to improve the accuracy of the obtained first alarm information, and further improve the comprehensiveness of the first alarm information while reducing redundant alarm information.
[0079] Based on Figure 3 the embodiment shown, this embodiment relates to the process in which the server obtains the first alarm information according to the first logical relationship and each alarm determination result when the sub-device is associated with multiple alarm conditions. Step 302 may include the following several situations:
[0080] First, in the case where the first logical relationship is logical AND, if the alarm determination results are that the running data corresponding to each alarm condition satisfies the alarm condition, then determine that the first alarm information is that the sub-device is in a state that requires an alarm.
[0081] Among them, logical AND is a logical relationship used to determine whether two or more conditions hold simultaneously. For example, if multiple conditions all hold, it is considered that the determination result of the logical AND is true; if one of the multiple conditions does not hold, it is considered that the determination result of the logical AND is false.
[0082] In this embodiment, when the first logical relationship is logical AND, the server can respectively determine whether each alarm determination result is that the running data meets the alarm condition. Then, when each alarm determination result is that the running data meets the alarm condition, that is, when each condition corresponding to the logical AND holds, it is determined that an alarm needs to be issued to the sub-device, so as to determine that the first alarm information is that the sub-device is in a state where an alarm is needed.
[0083] Second, when the first logical relationship is logical OR, if any alarm determination result is that the running data corresponding to the alarm condition meets the alarm condition, it is determined that the first alarm information is that the sub-device is in a state where an alarm is needed.
[0084] Among them, logical OR is a logical relationship used to determine whether at least one of two or more conditions holds. For example, if one of the multiple conditions holds, it is considered that the determination result of the logical OR is true; if each of the multiple conditions does not hold, it is considered that the determination result of the logical OR is false.
[0085] In this embodiment, when the first logical relationship is logical OR, the server can respectively determine whether each alarm determination result is that the running data meets the alarm condition. Then, when one alarm determination result is that the running data meets the alarm condition, that is, when one condition corresponding to the logical OR holds, it is determined that an alarm needs to be issued to the sub-device, so as to determine that the first alarm information is that the sub-device is in a state where an alarm is needed.
[0086] Third, when the first logical relationship is logical NOT, if each alarm determination result is that the running data corresponding to each alarm condition does not meet the alarm condition, it is determined that the first alarm information is that the sub-device is in a state where an alarm is needed.
[0087] Among them, logical NOT is a logical relationship used to determine whether a condition holds after performing a negation operation on the logical value of the condition. For example, if logical NOT includes multiple conditions, if the results after negating each condition are all false, it is considered that the determination result of the logical NOT is true; if the results after negating each condition are all true, it is considered that the determination result of the logical NOT is false.
[0088] In this embodiment, when the first logical relationship is logical NOT, the server can respectively determine whether each alarm determination result indicates that the running data meets the alarm condition. Then, when each alarm determination result indicates that the running data does not meet the alarm condition, that is, when multiple conditions corresponding to the logical NOT do not hold, it is determined that an alarm needs to be issued to the sub-device, and thus the first alarm information is determined to be that the sub-device is in a state where an alarm is required.
[0089] Exemplarily, if a fan is associated with two alarm conditions: a temperature alarm condition and a speed alarm condition. Among them, the temperature alarm condition is: if the fan temperature < the threshold temperature, then the alarm for the fan is eliminated; the speed alarm condition is: if the fan speed < the threshold speed, then the alarm for the fan is eliminated. The fan temperature obtained by the server is 60 degrees, the fan speed is 7000 revolutions per minute, the threshold temperature is 50 degrees, and the threshold speed is 6000 revolutions per minute. Then it can be determined that the fan temperature does not meet the threshold temperature, and the fan speed also does not meet the threshold speed, that is, the temperature alarm condition does not hold, and the speed alarm condition does not hold. Then, the alarm for the fan cannot be eliminated. Therefore, an alarm needs to be issued to the fan, and the first alarm information is determined to be that the fan is in a state where an alarm is required.
[0090] In this embodiment, when the first logical relationship is logical AND, if each alarm determination result indicates that the running data corresponding to each alarm condition meets the alarm condition, then the first alarm information is determined to be that the sub-device is in a state where an alarm is required; when the first logical relationship is logical OR, if any alarm determination result indicates that the running data corresponding to the alarm condition meets the alarm condition, then the first alarm information is determined to be that the sub-device is in a state where an alarm is required; when the first logical relationship is logical NOT, if each alarm determination result indicates that the running data corresponding to each alarm condition does not meet the alarm condition, then the first alarm information is determined to be that the sub-device is in a state where an alarm is required. Thus, according to different logical relationships between multiple alarm conditions associated with the sub-device, the first alarm information of each sub-device can be flexibly determined, thereby improving the accuracy and flexibility of determining the first alarm information.
[0091] Based on Figure 3 the embodiment shown, refer to Figure 4 , this embodiment relates to the process in which the server obtains the first alarm information according to the first logical relationship and each alarm determination result when the sub-device is associated with multiple nested alarm conditions. Step 302 includes Figure 4 the steps 401 and 402 shown in
[0092] Step 401, when the first logical relationship is a nested relationship, determine the priority of each alarm condition according to the nested relationship.
[0093] Among them, the nesting relationship means that a sub-device is included in a larger or more complex parent device structure as a component or accessory of other devices, thus forming a hierarchical inclusion relationship. For example, the CPU and the radiator of a server. The radiator usually consists of a heat sink and a cooling fan. The heat sink is usually attached to the surface of the CPU to conduct the heat generated by the CPU. The cooling fan is usually installed on or near the heat sink to dissipate the heat into the air through forced convection. Therefore, a nesting relationship is formed among the CPU, the radiator, the heat sink, and the cooling fan. In this nesting relationship, the CPU is the core device surrounded and protected by the radiator, and the heat sink and the cooling fan in the radiator are external devices that surround the CPU and provide heat dissipation functions for it.
[0094] Among them, the priority is used to determine the processing order for whether the running data meets each alarm condition. It should be noted that for multiple alarm conditions with a nesting relationship, the processing order of each alarm condition can be determined according to the hierarchical structure of the nesting relationship, and then processed in sequence to obtain the first alarm information. For example, it can be first determined whether the alarm condition in the outermost layer of the nesting relationship is met. If it is met, then it is determined in sequence whether the inner alarm conditions are met.
[0095] In this embodiment, when the first logical relationship of the server is a nesting relationship, the processing order for determining whether the running data meets each alarm condition can be determined according to the hierarchical structure of the nesting relationship, and then the priority of each alarm condition can be determined according to the processing order.
[0096] Step 402, recursively process each alarm determination result according to the priority and the second logical relationship between each alarm condition to obtain the first alarm information.
[0097] Among them, the second logical relationship includes any one of logical AND, logical OR, and logical NOT.
[0098] Among them, the second logical relationship refers to the logical relationship between each alarm condition with a nesting relationship. Recursive processing means dividing a large problem into multiple sub-problems with smaller scales but similar structures, and solving the large problem by solving each sub-problem. It can be understood that for multiple alarm conditions with a nesting relationship, according to the hierarchical structure of the nesting relationship, starting from the outermost layer to the innermost layer in sequence, the alarm determination results are recursively processed according to the second logical relationship until the termination condition is reached to obtain the first alarm information.
[0099] In this embodiment, when the server obtains the alarm determination results of each alarm condition, according to the priority and the second logical relationship between the alarm conditions, the recursive processing results between every two adjacent alarm determination results are determined in sequence until the alarm determination result of the last alarm condition is processed to obtain the first alarm information.
[0100] Exemplarily, taking a fan as an example, there is a nested relationship among multiple alarm conditions associated with the fan: Fan hardware (Fan controller (Fan temperature OR Fan speed)). The server can first determine whether the fan hardware is damaged. If the fan hardware is not damaged, then determine whether the fan controller is damaged. If the fan controller is not damaged, then determine whether the fan temperature and fan speed meet the alarm conditions, so as to obtain the first alarm information corresponding to the fan, that is, determine whether the fan is in a state that requires an alarm.
[0101] In this embodiment, when the first logical relationship is a nested relationship, the server can determine the priority of each alarm condition according to the nested relationship, and then recursively process each alarm determination result according to the priority and the second logical relationship among the alarm conditions. The second logical relationship includes any one of logical AND, logical OR, and logical NOT, so as to be able to determine the overall determination result corresponding to multiple alarm conditions with a nested relationship, and improve the flexibility of obtaining the first alarm information.
[0102] Based on Figure 2 the embodiments shown, see Figure 5 , this embodiment relates to the process in which the server determines the second alarm information of the parent device according to each first alarm information and the alarm determination result of the parent device corresponding to each sub-device. Step 202 includes Figure 5 the steps 501 and 502 shown in
[0103] Step 501, obtain the third logical relationship between the parent device and each sub-device. The third logical relationship includes any one of logical AND, logical OR, and logical NOT.
[0104] Among them, the third logical relationship refers to the dependency relationship between the parent device and the sub-device. For example, in a server, if controller A can control fan 1 and fan 2, then the working state of controller A is jointly determined by the working states of fan 1 and fan 2. Then, controller A is used as the parent device, fan 1 and fan 2 are used as sub-devices, and the third logical relationship between the parent device and each sub-device is logical AND, that is, if a sub-device fails, the parent device also fails.
[0105] In this embodiment, the server can determine the parent device with a dependency relationship and the corresponding sub-devices according to the control logic between devices, and then determine the third logical relationship between the parent device and the sub-devices according to the device dependency relationship between the parent device and each sub-device.
[0106] Exemplarily, if fan 1 fails and fan 2 does not fail, then controller A will have a partial failure; if fan 1 does not fail and fan 2 fails, then controller A will have a degraded failure; if fan 1 fails and fan 2 also fails, then controller A will have a complete failure.
[0107] Step 502, determine the second alarm information according to the third logical relationship, the alarm determination result of the parent device, and each first alarm information.
[0108] Among them, the second alarm information may include that the device is in a degraded alarm state and that the device is in a complete alarm state.
[0109] In this embodiment, the server can determine the degree to which the first alarm information of each sub-device causes a failure of the parent device according to the third logical relationship, and then determine the second alarm information of the parent device according to the failure triggering degree corresponding to each sub-device and the alarm determination result of the parent device.
[0110] Exemplarily, for controller A, fan 1, and fan 2 whose third logical relationship is logical AND, if fan 1 and fan 2 both fail and controller A has a failure, then controller A will have a failure, and it can be determined that the second alarm information is that the parent device is in a state that requires an alarm; if fan 1 fails, fan 2 does not fail, and controller A does not have a failure, then controller A has a degraded failure, and it can be determined that the second alarm information is that the parent device is in a state that requires a degraded alarm; or, if fan 1 does not fail, fan 2 fails, and controller A does not have a failure, then controller A has a degraded failure, and it can be determined that the second alarm information is that the parent device is in a state that requires a degraded alarm.
[0111] In this embodiment, by obtaining the third logical relationship between the parent device and each sub-device, the server can determine the second alarm information according to the third logical relationship, the alarm determination result of the parent device, and each first alarm information. Among them, the third logical relationship includes any one of logical AND, logical OR, and logical NOT, so that the influence degree of the first alarm information of the sub-device on the second alarm information can be flexibly determined according to the third logical relationship, thereby improving the flexibility of determining the second alarm information.
[0112] In one embodiment, based on the above embodiment, refer to Figure 6 , this embodiment relates to the process of how to process the cascaded alarm information after the server generates the cascaded alarm information according to each first alarm information and the second alarm information. As Figure 6 shown, step 203 includes Figure 6 the steps 601 and 602 shown in
[0113] Step 601: Detect whether the alarm handling policy corresponding to the cascaded alarm information includes an alarm self-healing policy.
[0114] Among them, the alarm handling policy refers to the fault handling method formulated for the fault corresponding to the alarm information.
[0115] It can be understood that for some device faults, they can be handled by changing the working state of the device, and for some faults, manual handling is required. For faults that can be handled by changing the working state of the device, when setting the alarm conditions associated with the fault, corresponding alarm self-healing policies can be set to control the working state of the faulty device, thereby handling the fault.
[0116] As a possible implementation, when setting the alarm conditions, corresponding alarm handling policies can be formulated according to the fault information corresponding to the alarm conditions, and the corresponding relationship between the alarm conditions and the alarm handling policies can be stored so that after determining the cascaded alarm information, the alarm handling policies can be read from the storage space according to the alarm conditions included in the cascaded alarm information.
[0117] In this embodiment, the server can determine the alarm conditions satisfied by the operation data of the device according to the cascaded alarm information, then obtain the alarm handling policy corresponding to the alarm conditions from the storage space, and then detect the alarm handling policy, and determine whether the alarm handling policy includes an alarm self-healing policy according to the detection result.
[0118] Step 602: If the alarm handling policy includes an alarm self-healing policy, send a self-healing instruction to each sub-device according to the alarm self-healing policy, and the self-healing instruction is used for each sub-device to perform alarm self-healing processing.
[0119] Among them, the self-healing instruction is an instruction for the sub-device to handle the fault. It can be understood that the self-healing instruction can include an alarm self-healing policy, so that after the sub-device receives the self-healing instruction, it can perform alarm self-healing processing according to the alarm self-healing policy in the self-healing instruction.
[0120] In this embodiment, the server can generate a self-healing instruction according to the alarm self-healing policy when the alarm handling policy includes an alarm self-healing policy, and then send the self-healing instruction to the sub-device corresponding to the cascaded alarm information to instruct the sub-device to perform alarm self-healing processing according to the alarm self-healing policy included in the self-healing instruction.
[0121] Exemplarily, if there are redundant fans in the server, when the working fan fails and is in a state that requires an alarm, a self-healing instruction to switch the workload from the working fan to the redundant fan can be generated, so that the sub-device can perform alarm self-healing processing according to the self-healing instruction.
[0122] Step 603: If the alarm handling policy does not include the alarm self-healing policy, and the alarm handling policy does not include the alarm suppression policy and the alarm masking policy, an alarm notification is generated based on the cascaded alarm information.
[0123] Among them, the alarm suppression policy refers to the policy of suppressing alarm information to avoid generating too many unnecessary alarms in specific situations. For example, if the cascaded alarm information includes multiple duplicate alarm information of a certain device, an alarm suppression policy can be set for the duplicate alarm information. For example, if an alarm message is generated when the fan temperature exceeds the threshold temperature, but if it exceeds the threshold temperature multiple times within a short period (for example, within one minute), an alarm message can be set to be sent only once to avoid frequent alarms.
[0124] Among them, the alarm masking policy refers to the policy of masking alarm information to organize or hide specific alarms and reduce unnecessary alarm interference. For example, if the cascaded alarm information includes the alarm information of a certain device, an alarm masking policy can be set for this alarm information and this alarm information is not processed. For example, during the upgrade process of the server system, device operation may be abnormal due to version incompatibility. Therefore, if there is an alarm information that a device's system upgrade component cannot operate normally, this alarm information can be masked.
[0125] Among them, the alarm notification is a notification for the server to display the cascaded alarm information to the user. For example, the form of the alarm notification can be an email, a text message, a page pop-up window, a trap message, etc.
[0126] In this embodiment, when the alarm handling policy does not include the alarm self-healing policy, the server can detect whether the alarm self-healing policy includes the alarm suppression policy. If the alarm suppression policy is included, the alarm information corresponding to the alarm suppression policy in the cascaded alarm information is not processed. If the alarm suppression policy is not included, the server can detect whether the alarm self-healing policy includes the alarm masking policy. If the alarm masking policy is included, the alarm information corresponding to the alarm masking policy in the cascaded alarm information is not processed. If the alarm masking policy is not included, an alarm notification is generated based on the cascaded alarm information.
[0127] As a possible implementation, after the server generates the alarm notification, it can send the alarm notification to the device through the network, or send the alarm notification to the user terminal bound to the device to timely notify the user to handle the faults existing in the device.
[0128] In this embodiment, the server first detects whether the alarm handling policy corresponding to the cascaded alarm information includes an alarm self-healing policy. Then, when the alarm handling policy includes the alarm self-healing policy, the server sends self-healing instructions to each sub-device according to the alarm self-healing policy. The self-healing instructions are used for each sub-device to perform alarm self-healing processing. And when the alarm handling policy does not include the alarm self-healing policy, and the alarm handling policy does not include the alarm suppression policy and the alarm masking policy, the server generates an alarm notification according to the cascaded alarm information. Thus, corresponding processing can be performed on the cascaded alarm information according to different types of alarm handling policies, improving the timeliness of processing the cascaded alarm information.
[0129] In one embodiment, an alarm method for a server is provided. As Figure 7 shown, the method includes the following steps:
[0130] Step 701, configure multiple alarm conditions according to a preset alarm rule.
[0131] Step 702, sort the alarm conditions according to the dependency relationship and perform alarm analysis in sequence according to the sorting.
[0132] Step 703, for multiple alarm conditions with a dependency relationship, obtain the alarm determination results of the alarm conditions associated with each sub-device.
[0133] Step 704, for each sub-device, obtain the first logical relationship between the alarm conditions associated with the sub-device.
[0134] Step 705, when the first logical relationship is logical AND, if the alarm determination results are that the operation data corresponding to each alarm condition all satisfy the alarm condition, determine that the first alarm information is that the sub-device is in a state that requires an alarm.
[0135] Step 706, when the first logical relationship is logical OR, if any alarm determination result is that the operation data corresponding to the alarm condition satisfies the alarm condition, determine that the first alarm information is that the sub-device is in a state that requires an alarm.
[0136] Step 707, when the first logical relationship is logical NOT, if the alarm determination results are that the operation data corresponding to each alarm condition all do not satisfy the alarm condition, determine that the first alarm information is that the sub-device is in a state that requires an alarm.
[0137] Step 708, when the first logical relationship is a nested relationship, determine the priority of each alarm condition according to the nested relationship, and perform recursive processing on the alarm determination results according to the priority and the second logical relationship between the alarm conditions. The second logical relationship includes any one of logical AND, logical OR, and logical NOT to obtain the first alarm information.
[0138] Step 709, obtain the third logical relationship between the parent device and each sub-device, where the third logical relationship includes any one of logical AND, logical OR, and logical NOT.
[0139] Step 7010, determine the second alarm information according to the third logical relationship, the alarm determination result of the parent device, and each first alarm information.
[0140] Step 7011, generate cascaded alarm information according to each first alarm information and the second alarm information.
[0141] Step 7012, detect whether the alarm handling strategy corresponding to the cascaded alarm information includes an alarm self-healing strategy.
[0142] Step 7013, if the alarm handling strategy includes an alarm self-healing strategy, send a self-healing instruction to each sub-device according to the alarm self-healing strategy, and the self-healing instruction is used for each sub-device to perform alarm self-healing processing.
[0143] Step 7014, if the alarm handling strategy does not include an alarm self-healing strategy, and the alarm handling strategy does not include an alarm suppression strategy and an alarm masking strategy, generate an alarm notification according to the cascaded alarm information.
[0144] It should be understood that although the steps in the flowcharts involved in the above embodiments are displayed in sequence according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless there is a clear indication in this article, the execution of these steps does not have a strict order limit, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be executed alternately or alternately with at least a part of other steps or steps or stages in other steps.
[0145] Based on the same inventive concept, the embodiments of the present application also provide an alarm device for implementing the alarm method involved above. The implementation solutions provided by this device to solve problems are similar to the implementation solutions recorded in the above method. Therefore, the specific limitations in one or more alarm device embodiments provided below can refer to the limitations on the alarm method in the above text, and will not be repeated here.
[0146] In an exemplary embodiment, as Figure 8 shown, an alarm device is provided, including:
[0147] The first acquisition module 801 is configured to acquire the alarm determination results of the alarm conditions associated with each sub-device, where the alarm determination results are acquired according to the operation data of the sub-device and the alarm conditions;
[0148] The second acquisition module 802 is configured to, for each of the sub-devices, acquire the first alarm information of the sub-device according to the alarm determination result, and determine the second alarm information of the parent device according to each of the first alarm information and the alarm determination results of the parent devices corresponding to the sub-devices;
[0149] The first generation module 803 is configured to generate cascaded alarm information according to each of the first alarm information and the second alarm information.
[0150] In one embodiment, the number of the alarm conditions associated with the sub-device is multiple. The second acquisition module 802 includes:
[0151] The first acquisition unit is configured to acquire the first logical relationship between the alarm conditions associated with the sub-device;
[0152] The second acquisition unit is configured to acquire the first alarm information according to the first logical relationship and each of the alarm determination results.
[0153] In one embodiment, the second acquisition unit is specifically configured to:
[0154] When the first logical relationship is logical AND, if each of the alarm determination results is that the operation data corresponding to each alarm condition satisfies the alarm condition, it is determined that the first alarm information is that the sub-device is in a state that requires an alarm;
[0155] When the first logical relationship is logical OR, if any one of the alarm determination results is that the operation data corresponding to the alarm condition satisfies the alarm condition, it is determined that the first alarm information is that the sub-device is in a state that requires an alarm;
[0156] When the first logical relationship is logical NOT, if each of the alarm determination results is that the operation data corresponding to each alarm condition does not satisfy the alarm condition, it is determined that the first alarm information is that the sub-device is in a state that requires an alarm.
[0157] In one embodiment, the second acquisition unit is specifically configured to:
[0158] When the first logical relationship is a nested relationship, determine the priorities of the alarm conditions according to the nested relationship;
[0159] According to the second logical relationship between the priority and each of the alarm conditions, recursively process each of the alarm determination results to obtain the first alarm information, where the second logical relationship includes any one of logical AND, logical OR, and logical NOT.
[0160] In one embodiment, the second acquisition module 802 includes:
[0161] A third acquisition unit, configured to acquire a third logical relationship between the parent device and each of the child devices, where the third logical relationship includes any one of logical AND, logical OR, and logical NOT;
[0162] A determination unit, configured to determine the second alarm information according to the third logical relationship, the alarm determination result of the parent device, and each of the first alarm information.
[0163] In one embodiment, after generating cascade alarm information according to each of the first alarm information and the second alarm information, the above device further includes:
[0164] A detection module, configured to detect whether the alarm processing policy corresponding to the cascade alarm information includes an alarm self-healing policy;
[0165] A sending module, configured to, if the alarm processing policy includes the alarm self-healing policy, send a self-healing instruction to each of the child devices according to the alarm self-healing policy, where the self-healing instruction is used for each of the child devices to perform alarm self-healing processing;
[0166] A second generation module, configured to, if the alarm processing policy does not include the alarm self-healing policy, and the alarm processing policy does not include an alarm suppression policy and an alarm masking policy, generate an alarm notification according to the cascade alarm information.
[0167] Each module in the above alarm device can be implemented in whole or in part by software, hardware, and their combination. The above modules can be embedded in or independent of the processor in the server in the form of hardware, or stored in the memory in the server in the form of software, so as to facilitate the processor to call and execute the operations corresponding to the above modules.
[0168] In an exemplary embodiment, a computer device is provided. The computer device can be a server, and its internal structure diagram can be as Figure 9As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, abbreviated as I / O), and a communication interface. Among them, the processor, the memory, and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store the operation data of the sub-devices. The input / output interface of the computer device is used to exchange information between the processor and external devices. The communication interface of the computer device is used to communicate with external terminals through a network connection. The computer program, when executed by the processor, implements an alarm method.
[0169] Those skilled in the art can understand that Figure 9 the structure shown in
[0170] is only a block diagram of some structures related to the solution of this application, and does not constitute a limitation on the computer device to which the solution of this application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0171] Obtain the alarm determination results of the alarm conditions associated with each sub-device, where the alarm determination results are obtained according to the operation data of the sub-device and the alarm conditions;
[0172] For each of the sub-devices, obtain the first alarm information of the sub-device according to the alarm determination result, and determine the second alarm information of the parent device according to the first alarm information and the alarm determination results of the parent devices corresponding to the sub-devices;
[0173] Generate cascaded alarm information according to the first alarm information and the second alarm information.
[0174] In one embodiment, when the processor executes the computer program, the following steps are specifically implemented:
[0175] Obtain the first logical relationship between the alarm conditions associated with the sub-device;
[0176] Obtain the first alarm information according to the first logical relationship and the alarm determination results.
[0177] In one embodiment, when the processor executes the computer program, the following steps are specifically implemented:
[0178] When the first logical relationship is logical AND, if each of the alarm determination results is that the operation data corresponding to each alarm condition satisfies the alarm condition, it is determined that the first alarm information indicates that the sub-device is in a state that requires an alarm.
[0179] When the first logical relationship is logical OR, if any one of the alarm determination results is that the operation data corresponding to the alarm condition satisfies the alarm condition, it is determined that the first alarm information indicates that the sub-device is in a state that requires an alarm.
[0180] When the first logical relationship is logical NOT, if each of the alarm determination results is that the operation data corresponding to each alarm condition does not satisfy the alarm condition, it is determined that the first alarm information indicates that the sub-device is in a state that requires an alarm.
[0181] In one embodiment, when the processor executes the computer program, the following steps are specifically implemented:
[0182] When the first logical relationship is a nested relationship, determine the priority levels of the respective alarm conditions according to the nested relationship.
[0183] Perform recursive processing on each of the alarm determination results according to the priority levels and the second logical relationship between the respective alarm conditions to obtain the first alarm information, where the second logical relationship includes any one of logical AND, logical OR, and logical NOT.
[0184] In one embodiment, when the processor executes the computer program, the following steps are specifically implemented:
[0185] Obtain the third logical relationship between the parent device and each of the sub-devices, where the third logical relationship includes any one of logical AND, logical OR, and logical NOT.
[0186] Determine the second alarm information according to the third logical relationship, the alarm determination result of the parent device, and each of the first alarm information.
[0187] In one embodiment, when the processor executes the computer program, the following steps are specifically implemented:
[0188] Detect whether the alarm handling policy corresponding to the cascaded alarm information includes an alarm self-healing policy.
[0189] If the alarm handling policy includes the alarm self-healing policy, send a self-healing instruction to each of the sub-devices according to the alarm self-healing policy, where the self-healing instruction is used for each of the sub-devices to perform alarm self-healing processing.
[0190] If the alarm handling policy does not include the alarm self-healing policy, and the alarm handling policy does not include the alarm suppression policy and the alarm masking policy, an alarm notification is generated according to the cascaded alarm information.
[0191] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented:
[0192] Obtain the alarm determination results of the alarm conditions associated with each sub-device, where the alarm determination results are obtained according to the operation data of the sub-device and the alarm conditions;
[0193] For each of the sub-devices, obtain the first alarm information of the sub-device according to the alarm determination result, and determine the second alarm information of the parent device according to each of the first alarm information and the alarm determination results of the parent devices corresponding to the sub-devices;
[0194] Generate cascaded alarm information according to each of the first alarm information and the second alarm information.
[0195] In one of the embodiments, when the computer program is executed by a processor, the following steps are specifically implemented:
[0196] Obtain the first logical relationship between the alarm conditions associated with the sub-device;
[0197] Obtain the first alarm information according to the first logical relationship and each of the alarm determination results.
[0198] In one of the embodiments, when the computer program is executed by a processor, the following steps are specifically implemented:
[0199] In the case where the first logical relationship is logical AND, if each of the alarm determination results is that the operation data corresponding to each alarm condition satisfies the alarm condition, it is determined that the first alarm information is that the sub-device is in a state that requires an alarm;
[0200] In the case where the first logical relationship is logical OR, if any one of the alarm determination results is that the operation data corresponding to the alarm condition satisfies the alarm condition, it is determined that the first alarm information is that the sub-device is in a state that requires an alarm;
[0201] In the case where the first logical relationship is logical NOT, if each of the alarm determination results is that the operation data corresponding to each alarm condition does not satisfy the alarm condition, it is determined that the first alarm information is that the sub-device is in a state that requires an alarm.
[0202] In one embodiment, when the computer program is executed by a processor, the following steps are specifically implemented:
[0203] When the first logical relationship is a nested relationship, determine the priorities of the alarm conditions according to the nested relationship;
[0204] According to the priorities and the second logical relationship between the alarm conditions, perform recursive processing on the alarm determination results to obtain the first alarm information, where the second logical relationship includes any one of logical AND, logical OR, and logical NOT.
[0205] In one embodiment, when the computer program is executed by a processor, the following steps are specifically implemented:
[0206] Obtain the third logical relationship between the parent device and each of the child devices, where the third logical relationship includes any one of logical AND, logical OR, and logical NOT;
[0207] Determine the second alarm information according to the third logical relationship, the alarm determination result of the parent device, and each of the first alarm information.
[0208] In one embodiment, when the computer program is executed by a processor, the following steps are specifically implemented:
[0209] Detect whether the alarm handling strategy corresponding to the cascaded alarm information includes an alarm self-healing strategy;
[0210] If the alarm handling strategy includes the alarm self-healing strategy, send a self-healing instruction to each of the child devices according to the alarm self-healing strategy, where the self-healing instruction is used for each of the child devices to perform alarm self-healing processing;
[0211] If the alarm handling strategy does not include the alarm self-healing strategy, and the alarm handling strategy does not include an alarm suppression strategy and an alarm masking strategy, generate an alarm notification according to the cascaded alarm information.
[0212] In one embodiment, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the following steps are implemented:
[0213] Obtain the alarm determination results of the alarm conditions associated with each child device, where the alarm determination results are obtained according to the operating data of the child device and the alarm conditions;
[0214] For each of the child devices, obtain the first alarm information of the child device according to the alarm determination result, and determine the second alarm information of the parent device according to each of the first alarm information and the alarm determination result of the parent device corresponding to each child device;
[0215] Generate cascaded alarm information based on each of the first alarm messages and the second alarm message.
[0216] In one embodiment, when the computer program is executed by a processor, the following steps are specifically implemented:
[0217] Obtain a first logical relationship between the alarm conditions associated with the sub-devices;
[0218] Obtain the first alarm message according to the first logical relationship and each of the alarm determination results.
[0219] In one embodiment, when the computer program is executed by a processor, the following steps are specifically implemented:
[0220] In the case where the first logical relationship is a logical AND, if each of the alarm determination results is that the running data corresponding to each alarm condition satisfies the alarm condition, determine that the first alarm message is that the sub-device is in a state that requires an alarm;
[0221] In the case where the first logical relationship is a logical OR, if any one of the alarm determination results is that the running data corresponding to the alarm condition satisfies the alarm condition, determine that the first alarm message is that the sub-device is in a state that requires an alarm;
[0222] In the case where the first logical relationship is a logical NOT, if each of the alarm determination results is that the running data corresponding to each alarm condition does not satisfy the alarm condition, determine that the first alarm message is that the sub-device is in a state that requires an alarm.
[0223] In one embodiment, when the computer program is executed by a processor, the following steps are specifically implemented:
[0224] In the case where the first logical relationship is a nested relationship, determine the priority of each alarm condition according to the nested relationship;
[0225] Perform recursive processing on each of the alarm determination results according to the priority and a second logical relationship between the alarm conditions, and obtain the first alarm message, where the second logical relationship includes any one of a logical AND, a logical OR, and a logical NOT.
[0226] In one embodiment, when the computer program is executed by a processor, the following steps are specifically implemented:
[0227] Obtain a third logical relationship between the parent device and each of the sub-devices, where the third logical relationship includes any one of a logical AND, a logical OR, and a logical NOT;
[0228] Determine the second alarm information according to the third logical relationship, the alarm determination result of the parent device, and each of the first alarm information.
[0229] In one embodiment, when the computer program is executed by a processor, the following steps are specifically implemented:
[0230] Detect whether the alarm handling strategy corresponding to the cascaded alarm information includes an alarm self-healing strategy;
[0231] If the alarm handling strategy includes the alarm self-healing strategy, send a self-healing instruction to each of the child devices according to the alarm self-healing strategy, where the self-healing instruction is used for each of the child devices to perform alarm self-healing processing;
[0232] If the alarm handling strategy does not include the alarm self-healing strategy, and the alarm handling strategy does not include an alarm suppression strategy and an alarm masking strategy, generate an alarm notification according to the cascaded alarm information.
[0233] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to a memory, database, or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memories. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc. The databases involved in the embodiments provided in the present application can include at least one of relational databases and non-relational databases. Non-relational databases can include distributed databases based on blockchain, etc., without limitation. The processors involved in the embodiments provided in the present application can be general-purpose processors, central processors, graphics processors, digital signal processors, programmable logic devices, data processing logics based on quantum computing, etc., without limitation.
[0234] The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity of description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as the scope recorded in this specification.
[0235] The above-described embodiments merely represent several implementation manners of the present application. The description thereof is relatively specific and detailed, but it should not be construed as a limitation on the patent scope of the present application. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present application, several modifications and improvements can still be made, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the appended claims.
Claims
1. An alarm method, characterized in that, The method includes: Obtaining the alarm determination results of the alarm conditions associated with each sub-device, where the alarm determination results are obtained based on the operation data of the sub-device and the alarm conditions; For each of the sub-devices, obtaining first alarm information of the sub-device according to the alarm determination result, and determining second alarm information of the parent device according to the first alarm information and the alarm determination results of the parent devices corresponding to the sub-devices; Generating cascaded alarm information according to the first alarm information and the second alarm information.
2. The method according to claim 1, wherein The number of the alarm conditions associated with the sub-device is multiple. The obtaining of the first alarm information of the sub-device according to the alarm determination result includes: Obtaining a first logical relationship between the alarm conditions associated with the sub-device; Obtaining the first alarm information according to the first logical relationship and the alarm determination results.
3. The method according to claim 2, wherein The obtaining of the first alarm information according to the first logical relationship and the alarm determination results includes: When the first logical relationship is logical AND, if the alarm determination results are that the operation data corresponding to each alarm condition satisfy the alarm condition, determining that the first alarm information is that the sub-device is in a state where an alarm is required; When the first logical relationship is logical OR, if any one of the alarm determination results is that the operation data corresponding to the alarm condition satisfy the alarm condition, determining that the first alarm information is that the sub-device is in a state where an alarm is required; When the first logical relationship is logical NOT, if the alarm determination results are that the operation data corresponding to each alarm condition do not satisfy the alarm condition, determining that the first alarm information is that the sub-device is in a state where an alarm is required.
4. The method according to claim 2, wherein The obtaining of the first alarm information according to the first logical relationship and the alarm determination results includes: When the first logical relationship is a nested relationship, determining the priority levels of the alarm conditions according to the nested relationship; Performing recursive processing on the alarm determination results according to the priority levels and a second logical relationship between the alarm conditions, where the second logical relationship includes any one of logical AND, logical OR, and logical NOT, to obtain the first alarm information.
5. The method according to claim 1, characterized in that, The determining of the second alarm information of the parent device according to the first alarm information and the alarm determination results of the parent devices corresponding to the sub-devices includes: Obtaining a third logical relationship between the parent device and the sub-devices, where the third logical relationship includes any one of logical AND, logical OR, and logical NOT; Determining the second alarm information according to the third logical relationship, the alarm determination result of the parent device, and the first alarm information.
6. The method according to claim 1, wherein After generating the cascaded alarm information according to the first alarm information and the second alarm information, the method further includes: Detecting whether the alarm handling strategy corresponding to the cascaded alarm information includes an alarm self-healing strategy; If the alarm handling policy includes the alarm self-healing policy, send a self-healing instruction to each of the sub-devices according to the alarm self-healing policy, where the self-healing instruction is used for each of the sub-devices to perform alarm self-healing processing; If the alarm handling policy does not include the alarm self-healing policy, and the alarm handling policy does not include an alarm suppression policy and an alarm masking policy, generate an alarm notification according to the cascaded alarm information.
7. An alarm device, characterized in that, The device includes: A first acquisition module, configured to acquire an alarm determination result of an alarm condition associated with each sub-device, where the alarm determination result is acquired according to the operation data of the sub-device and the alarm condition; A second acquisition module, configured to, for each of the sub-devices, acquire first alarm information of the sub-device according to the alarm determination result, and determine second alarm information of the parent device according to the first alarm information and the alarm determination result of the parent device corresponding to each of the sub-devices; A first generation module, configured to generate cascaded alarm information according to the first alarm information and the second alarm information.
8. A computer device, comprising a memory and a processor, the memory storing a computer program, characterized in that, When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.