Alarm notification method and device

By acquiring user-defined alarm rules, generating target annotations, and using alarm managers and interceptors for preprocessing and parsing, the problems of false alarms and inflexible templates in existing alarm notifications are solved, enabling flexible customization and accurate alarm notifications.

CN120973641APending Publication Date: 2025-11-18AIBEE (BEIJING) TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511127302.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-12
Publication Date
2025-11-18

AI Technical Summary

Technical Problem

In existing technologies, alarm notifications cannot control alarm triggering based on time periods, leading to false alarms. Furthermore, alarm notification templates are inflexible and cannot meet the alarm needs of different teams.

Method used

This paper provides a method for alarm notification. By obtaining user-defined alarm rules, including time period, notification method and alarm level, target annotations are generated, and alarm content is rendered and sent to the user through alarm manager and interceptor for preprocessing and parsing.

Benefits of technology

It enables flexible customization of alarm content according to user needs, reduces false alarms, improves the accuracy and applicability of alarm notifications, and meets the alarm needs of different teams.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120973641A_ABST
    Figure CN120973641A_ABST
Patent Text Reader

Abstract

The invention discloses an alarm notification method and device. The method comprises the following steps: acquiring an alarm rule sent by a user; sending the alarm rule to an alarm manager, and preprocessing the alarm rule through the alarm manager to obtain a processed alarm rule; sending the alarm processing rule to an interceptor, and analyzing the alarm processing rule through the interceptor to obtain annotation information; and rendering alarm content according to the annotation information through the interceptor, and sending the alarm content to the transmission interface, so that the transmission interface sends the alarm content to the user. Therefore, the alarm content is rendered according to the alarm rule defined by the user, and the problem of alarm requirements of different users is effectively solved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of data processing, and in particular to a notification method and device for alarm. BACKGROUND

[0002] In the current AI passenger flow analysis system deployment, each shopping mall or public place needs to monitor its operating system, Kubernetes cluster and passenger flow analysis service in real time to ensure the stability and efficient operation of the system.

[0003] When the monitoring system identifies any abnormality, the alarm tool will send an alarm signal according to the preset alarm rule. These alarm information will be processed through the platform, and the alarm will be notified to the operation and maintenance personnel according to the configured rule, so that the operation and maintenance personnel can quickly receive the notification of system abnormality and take timely repair measures.

[0004] Since the alarm notification is only triggered based on the threshold, it cannot control the alarm triggering according to the time period, which makes it easy to cause false alarms in certain scenarios (such as when the number of people in the shopping mall is zero at night). In addition, the alarm notification template is not flexible and cannot customize content according to different levels, which leads to the inability to meet the alarm needs of different teams. SUMMARY

[0005] Based on the above shortcomings of the prior art, the present application provides a notification method and device for alarm to solve the problem that the prior art cannot customize content according to different levels, thereby leading to the inability to meet the alarm needs of different teams.

[0006] In order to achieve the above purpose, the present application provides the following technical solutions:

[0007] The first aspect of the present application provides a notification method for alarm, comprising:

[0008] obtaining an alarm rule sent by a user;

[0009] sending the alarm rule to an alarm manager and preprocessing the alarm rule through the alarm manager to obtain a processed alarm rule;

[0010] sending the processed alarm rule to an interceptor and analyzing the processed alarm rule through the interceptor to obtain annotation information;

[0011] rendering alarm content through the interceptor according to the annotation information and sending the alarm content to a transmission interface, so that the transmission interface sends the alarm content to the user.

[0012] Optionally, in the above notification method for alarm, the obtaining of the alarm rule sent by the user comprises:

[0013] When receiving the change instruction of the alarm rule, the annotation is acquired;

[0014] In response to triggering the alarm time definition operation in the alarm definition module, an alarm time definition page is displayed;

[0015] According to the alarm time period selected in the alarm time definition page, the alarm time period is added in the time field contained in the annotation;

[0016] In response to triggering the alarm recovery notification operation in the alarm definition module, an alarm recovery notification page is displayed;

[0017] According to the target alarm function set in the alarm recovery notification page, the value corresponding to the target alarm function is added in the notification field contained in the annotation;

[0018] In response to triggering the alarm level operation in the alarm definition module, an alarm level definition page is displayed;

[0019] According to the alarm level selected in the alarm level definition page, the alarm level is added in the alarm level field contained in the annotation;

[0020] According to the alarm level, the alarm template is determined, and the alarm template is added in the alarm template field contained in the annotation to obtain a target annotation;

[0021] According to the target annotation, the alarm rule is generated.

[0022] Optionally, in the alarm notification method described above, before the alarm rule is sent to the alarm manager, the method further includes:

[0023] The alarm rule is sent to an alarm tool, and the alarm rule is stored by the alarm tool;

[0024] After the storage is completed, the alarm rule is run, and it is judged whether the alarm time period in the alarm rule meets an alarm time threshold;

[0025] If the alarm time period in the alarm rule meets the alarm time threshold, the alarm rule is sent to the alarm manager.

[0026] Optionally, in the alarm notification method described above, the interceptor includes a time period filter, an alarm recovery, an alarm level filter, and a template renderer, and the alarm content is rendered by the interceptor according to the annotation information, including:

[0027] extract a time field from the annotation information through the time period filter, and determine whether an alarm time period corresponding to the time field meets a current time period;

[0028] If the alarm time period corresponding to the time field meets the current time period, a notification field is read from the annotation information through the alarm recovery filter, and it is determined whether a value corresponding to the notification field is a preset threshold value;

[0029] If the value corresponding to the notification field is the preset threshold value, an alarm level field is read from the annotation information through the alarm level filter, and a template renderer is determined according to the alarm level field;

[0030] An alarm template field is read from the annotation information through the determined template renderer, and an alarm template is searched according to the alarm template field;

[0031] The annotation information is rendered into alarm content according to the alarm template through the determined template renderer.

[0032] Optionally, in the alarm notification method described above, the determining of the template renderer according to the alarm level field comprises:

[0033] When the value corresponding to the alarm level field is a first alarm level value, the template renderer is determined to be a DingTalk template renderer, an email template renderer, and an SMS template renderer according to the first alarm level value;

[0034] When the value corresponding to the alarm level field is a second alarm level value, the template renderer is determined to be a DingTalk template renderer and an email template renderer according to the second alarm level value;

[0035] When the value corresponding to the alarm level field is a third alarm level value, the template renderer is determined to be a DingTalk template renderer according to the third alarm level value.

[0036] The second aspect of the present application provides an alarm notification device, comprising:

[0037] A rule acquisition unit is configured to acquire an alarm rule sent by a user;

[0038] A preprocessing unit is configured to send the alarm rule to an alarm manager, and pre-process the alarm rule through the alarm manager to obtain a processed alarm rule;

[0039] An analysis unit is configured to send the processed alarm rule to an interceptor, and analyze the processed alarm rule through the interceptor to obtain annotation information;

[0040] A rendering unit is configured to render alarm content according to the annotation information through the interceptor, and send the alarm content to a transmission interface, so that the transmission interface sends the alarm content to the user.

[0041] Optionally, in the alarm notification device, the rule obtaining unit comprises:

[0042] An annotation obtaining unit is configured to obtain an annotation when receiving a change instruction of an alarm rule.

[0043] A first display unit is configured to display an alarm time definition page in response to triggering an alarm time definition operation in an alarm definition module.

[0044] A first increasing unit is configured to increase an alarm time period in a time field contained in the annotation according to the alarm time period selected in the alarm time definition page.

[0045] A second display unit is configured to display an alarm recovery notification page in response to triggering an alarm recovery notification operation in the alarm definition module.

[0046] A second increasing unit is configured to increase a value corresponding to a target alarm function in a notification field contained in the annotation according to the target alarm function set in the alarm recovery notification page.

[0047] A third display unit is configured to display an alarm level definition page in response to triggering an alarm level operation in the alarm definition module.

[0048] The second increasing unit is configured to increase an alarm level in an alarm level field contained in the annotation according to the alarm level selected in the alarm level definition page.

[0049] A third increasing unit is configured to determine an alarm template according to the alarm level, and increase the alarm template in an alarm template field contained in the annotation to obtain a target annotation.

[0050] A generating unit is configured to generate an alarm rule according to the target annotation.

[0051] Optionally, in the alarm notification device, the rule obtaining unit comprises:

[0052] A storage unit is configured to send the alarm rule to an alarm tool, and store the alarm rule through the alarm tool.

[0053] The judging unit is configured to execute the alarm rule after the storage is completed, and judge whether the alarm time period in the alarm rule satisfies an alarm time threshold; wherein, if the alarm time period in the alarm rule satisfies the alarm time threshold, the preprocessing unit executes the sending of the alarm rule to the alarm manager.

[0054] Optionally, in the alarm notification device, the interceptor comprises a time period filter, an alarm restorer, an alarm level filter, and a template renderer, and the rendering unit comprises:

[0055] The time judging unit is configured to extract a time field from the annotation information through the time period filter, and judge whether an alarm time period corresponding to the time field satisfies a current time period.

[0056] The numerical value judging unit is configured to read a notification field from the annotation information through the alarm restorer if the alarm time period corresponding to the time field satisfies the current time period, and judge whether a numerical value corresponding to the notification field is a preset threshold value.

[0057] The renderer determining unit is configured to read an alarm level field from the annotation information through the alarm level filter if the numerical value corresponding to the notification field is the preset threshold value, and determine a template renderer according to the alarm level field.

[0058] The searching unit is configured to read an alarm template field from the annotation information through the determined template renderer, and search for an alarm template according to the alarm template field.

[0059] The rendering sub-unit is configured to render the annotation information into alarm content according to the alarm template through the determined template renderer.

[0060] Optionally, in the alarm notification device, the renderer determining unit comprises:

[0061] The first determining unit is configured to determine a template renderer as a Feishu template renderer, an email template renderer, and an SMS template renderer according to a first alarm level value when a numerical value corresponding to the alarm level field is the first alarm level value.

[0062] The second determining unit is configured to determine a template renderer as a Feishu template renderer and an email template renderer according to a second alarm level value when a numerical value corresponding to the alarm level field is the second alarm level value.

[0063] The third determining unit is configured to determine a template renderer as a Feishu template renderer according to a third alarm level value when a numerical value corresponding to the alarm level field is the third alarm level value.

[0064] The application provides a notification method of an alarm, which comprises the following steps: obtaining an alarm rule sent by a user; sending the alarm rule to an alarm manager; preprocessing the alarm rule by the alarm manager to obtain a processed alarm rule; sending the processed alarm rule to an interceptor; analyzing the processed alarm rule by the interceptor to obtain annotation information; rendering alarm content according to the annotation information by the interceptor; and sending the alarm content to a transmission interface, so that the transmission interface sends the alarm content to the user. Thus, the alarm content is rendered according to the alarm rule defined by the user, and the problem of different alarm requirements of different users is effectively solved. BRIEF DESCRIPTION OF DRAWINGS

[0065] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiments or the prior art description. Obviously, the drawings in the following description only constitute a part of the embodiments of the present application, and for those skilled in the art, other drawings can also be obtained without creative labor on the basis of the provided drawings.

[0066] Figure 1 A flowchart of a notification method of an alarm provided by an embodiment of the present application;

[0067] Figure 2 A flowchart of an acquisition method of an alarm rule provided by another embodiment of the present application;

[0068] Figure 3 A structural diagram of a target annotation provided by another embodiment of the present application;

[0069] Figure 4 A flowchart of a rendering method of alarm content provided by another embodiment of the present application;

[0070] Figure 5 A structural diagram of a notification device of an alarm provided by another embodiment of the present application. DETAILED DESCRIPTION

[0071] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments only constitute a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor fall within the scope of protection of the present application.

[0072] In this application, the terms such as first and second are used only to distinguish one entity or operation from another, and do not necessarily require or imply these entities or operations to be in any such actual relationship or order. Moreover, the terms "include", "contain" or any other variants thereof are intended to cover non-exclusive inclusion, so that the process, method, article or equipment including a series of elements not only includes those elements, but also includes other elements not explicitly listed or inherent to such process, method, article or equipment. Without more limitations, the element defined by the statement "includes a" does not exclude the presence of additional identical elements in the process, method, article or equipment including the element.

[0073] The embodiment of the present application provides a notification method of an alarm, as shown in the method, the method specifically comprises the following steps: Figure 1 The method specifically comprises the following steps:

[0074] S101, acquiring an alarm rule sent by a user.

[0075] It can be understood that in the embodiment of the present application, the user can define the alarm rule according to the alarm demand of the user. Alternatively, the user can send the alarm rule defined to the system through the interface provided by the alarm definition module, so that the system acquires the alarm rule to perform corresponding alarm work.

[0076] Alternatively, in another embodiment of the present application, a specific implementation of the step S101, as shown in the method, the method specifically comprises the following steps: Figure 2 The method specifically comprises the following steps:

[0077] S201, acquiring an annotation when a definition instruction of an alarm rule is received.

[0078] It can be understood that when the alarm definition module in the system receives the definition instruction of the alarm rule sent by the user, the alarm definition module will automatically generate an annotation, and the annotation is used to generate the alarm rule according to the content defined by the user.

[0079] S202, displaying an alarm time definition page in response to triggering an alarm time definition operation in the alarm definition module.

[0080] Specifically, when the definition instruction of the alarm rule sent by the user is received, the alarm definition module will first show a definition interface of the alarm rule to the user, then the user can first click the alarm time definition operation in the definition interface, so that the alarm definition module shows the alarm time definition interface to the user, and then the user can define the alarm time period in the alarm time definition interface according to the demand of the user.

[0081] S203、According to the alarm time period selected in the alarm time definition page, the alarm time period is added in the time field contained in the annotation.

[0082] It can be understood that the user can set the alarm time period in the alarm time definition page according to the user's own needs. If the alarm time period is not set, the system will default to all day to send the alarm. If the user has set the time period, the alarm definition module will add the alarm time period in the time field contained in the annotation.

[0083] For example, the user's business only needs to be alarmed from 9:00 to 23:00, and the alarm definition module will add the label

alertTimeInterval: 9:00~23:30

[0084] S204, in response to triggering the alarm recovery notification operation in the alarm definition module, display the alarm recovery notification page.

[0085] It can be understood that after the alarm time period is set, the user can next set whether to disable the notification of recovering the alarm. At this time, the alarm definition module will display the alarm recovery notification page to the user to make corresponding settings.

[0086] S205, according to the target alarm function set in the alarm recovery notification page, the value corresponding to the target alarm function is added in the notification field contained in the annotation.

[0087] Specifically, the target alarm function refers to the function of recovering the alarm notification. The notification of recovering the alarm refers to that after the alarm is triggered, the system will send a "recovery alarm" notification when the problem is solved or recovered, telling the user that the original problem has been solved or recovered. This notification is used to inform the operator or administrator that the fault has been repaired or the problem has been solved.

[0088] If the user does not actively disable this function, the system will default to send the "recovery alarm notification". That is, the system will automatically send a notification after the alarm problem is solved, informing the relevant personnel that the problem has been solved. If the user chooses to disable the recovery alarm notification function, the system will no longer send such a "recovery alarm" notification. The state after disabling will be represented in the system by setting a specific marker.

[0089] Therefore, if the target alarm function set by the user in the alarm recovery notification page is to disable the function of recovering the alarm notification, the alarm definition module will add the label

sendResolved: false

[0090] S206, in response to triggering the alarm level operation in the alarm definition module, display the alarm level definition page.

[0091] It can be understood that after setting the notification function of the recovery alarm, the alarm definition module will show the user a page for setting the alarm level, so that the user can set the level of this alarm rule.

[0092] S207. According to the alarm level selected in the alarm level definition page, increase the alarm level in the alarm level field contained in the annotation.

[0093] Specifically, in the embodiment of the present application, the alarm level is set from low to high as P2, P1, P0 three levels. Assuming that the user selects P0 level, the alarm definition module will increase the label of

alertLevel: P0

[0094] S208. According to the alarm level, determine the alarm template, and increase the alarm template in the alarm template field contained in the annotation to obtain the target annotation.

[0095] It should be noted that in the embodiment of the present application, the alarm definition module will show the user the alarm template according to the alarm level selected by the user. If the user selects P0 level, 3 kinds of alarm templates can be selected, which are respectively WeChat alarm template, email alarm template, and SMS alarm template. If the user selects P1 level, 2 kinds of alarm templates can be selected, which are respectively WeChat alarm template and email alarm template. If the user selects P2 level, the alarm definition module will default to select the WeChat alarm template for the user.

[0096] In addition, if the existing template does not meet the business needs of the user, a new template can also be added. If no template is selected, the general template is used by default. Assuming that the user only selects the email template, the alarm definition module will increase the label of

mailTemplate: Template-A

[0097] At this time, the user has set the time period required by the alarm rule, disabled the recovery alarm notification, the level and the template, so that the system will generate the target annotation according to the functions set by the user. The specific content of the target annotation can be as shown in the content. Figure 3

[0098] S209. According to the target annotation, generate the alarm rule.

[0099] Specifically, the system will generate specific alarm behavior rules according to the annotations set by the user (such as setting the recovery alarm notification, the alarm time, etc.). These rules ensure that the system can alarm, notify according to the predetermined way when detecting the exception, and adjust according to the target annotation.

[0100] ​S102, send the alarm rule to the alarm manager, and preprocess the alarm rule through the alarm manager to obtain a processed alarm rule.

[0101] Specifically, the alarm manager refers to an AlertManager module, which is a component for managing, organizing, and responding to system alarms, and is usually used in monitoring and notification systems. Its main function is to receive, process, organize, and forward alarm information to ensure that operators can discover and respond to abnormalities in the system in a timely manner.

[0102] Specifically, after the alarm rule is set, the AlertManager module will preprocess the alarm rule. The specific preprocessing methods are filtering, aggregation, suppression, and classification operations. The filtering operation refers to the AlertManager filtering out the alarms that need to be processed according to the preset rules. The purpose of filtering is to exclude unnecessary alarms and reduce the interference of useless information.

[0103] The aggregation operation refers to combining multiple similar or related alarms into one alarm. This is to avoid triggering multiple alarm notifications for the same problem, reduce the number of notifications, and improve the concentration of information.

[0104] The suppression operation refers to actively suppressing the sending of some alarms in certain situations. This is usually to avoid the system repeatedly sending the same alarm and reduce interference.

[0105] The classification operation is to group and classify alarm information according to certain attributes (such as severity, type, device, location, etc.). This helps the AlertManager more accurately handle different types of alarms and sort them according to priority or urgency.

[0106] After the AlertManager module completes the filtering, aggregation, suppression, and classification operations, the system will send the final alarm information to the interceptor, which will further process the alarm rules to ensure that the alarm information can be timely and effectively delivered to the relevant personnel and take appropriate response measures when necessary.

[0107] Optionally, since the alarm rule also needs to be confirmed to meet the time threshold before being sent to the AlertManager module for preprocessing, before step S102, it can further include:

[0108] Send the alarm rule to the alarm tool and store the alarm rule through the alarm tool.

[0109] Specifically, the alarm tool is a Prometheus module, which is an open-source system monitoring and alerting tool mainly used for collecting, storing, and querying time series data. It can be understood that when the alarm rule is defined, the alarm definition module updates the alarm rule to the Prometheus module, so when the Prometheus module receives the alarm rule, the Prometheus module will load all the alarm rules into the memory for backup processing.

[0110] When the storage is completed, the alarm rule is run, and it is judged whether the alarm time period in the alarm rule meets the alarm time threshold.

[0111] It can be understood that when the alarm rule storage is completed, the Prometheus module will run the alarm rule regularly, and it is judged whether the alarm time period in the alarm rule meets the alarm time threshold. If the alarm time period in the alarm rule meets the alarm time threshold, the alarm rule is sent to the AlertManager module, that is, step S102 is executed.

[0112] Optionally, if the alarm time period in the alarm rule meets the alarm time threshold, the alarm rule is continuously monitored.

[0113] S103, send the processed alarm rule to the interceptor, and parse the processed alarm rule through the interceptor to obtain annotation information.

[0114] Specifically, when the interceptor receives the alarm rule processed by the AlertManager module, that is, the processed alarm rule, the interceptor mainly parses the alarm rule by defining a standard annotation format (such as severity level, component type, time, and custom label) to obtain annotation information.

[0115] S104, render the alarm content according to the annotation information through the interceptor, and send the alarm content to the transmission interface to make the transmission interface send the alarm content to the user.

[0116] It should be noted that the interceptor receives the processed alarm rule, parses the annotation fields (such as severity, component type, timestamp, etc.) in it, obtains annotation information, and determines the processing method of the alarm based on these information. After parsing, the interceptor formats the alarm content into an easy-to-understand form (such as text or HTML), enhancing its readability and context information. Finally, the rendered alarm content is sent to the operation and maintenance personnel through different transmission interfaces (such as email, SMS, or instant message). After receiving the alarm, the operation and maintenance personnel take appropriate handling measures according to the severity of the alarm. This process ensures efficient delivery and timely response of alarm information, which helps users quickly respond to system failures or abnormalities.

[0117] Optionally, in another embodiment of the present application, the interceptor comprises a time period filter, an alarm recovery, an alarm level filter and a template renderer, so that in step S104, the alarm content is rendered by the interceptor according to the annotation information, and one specific implementation manner is as shown in the following steps: Figure 4

[0118] S401, the time field is extracted from the annotation information by the time period filter, and it is judged whether the alarm time period corresponding to the time field meets the current time period.

[0119] It can be understood that the annotation information can include alarm time period, recovery alarm, notification mode, alarm template field and the like, so when the interceptor receives the alarm rule for processing, the time period filter in the interceptor will first extract the time field from the annotation information, and then compare the current time with the time period specified by the alertTimeInterval field in the annotation, and if the alarm time period corresponding to the time field meets the current time period, the alarm recovery is entered, that is, step S402 is executed.

[0120] Optionally, if the alarm time period corresponding to the time field does not meet the current time period, the alarm is directly ignored, and the next alarm rule is judged.

[0121] S402, the notification field is read from the annotation information by the alarm recovery, and it is judged whether the value corresponding to the notification field is a preset threshold.

[0122] It can be understood that when the alarm time period corresponding to the time field meets the current time period, the alarm recovery filter reads the value corresponding to the sendResolved field (notification field) in the annotation information, and judges whether the value corresponding to the sendResolved field (notification field) is false, that is, the preset threshold, and if the value corresponding to the notification field is the preset threshold, the alarm level filter is entered, that is, step S403 is executed.

[0123] Optionally, if the value corresponding to the notification field is not the preset threshold, the alarm is directly ignored, so as to judge the next alarm rule.

[0124] S403, the alarm level field is read from the annotation information by the alarm level filter, and the template renderer is determined according to the alarm level field.

[0125] ​Specifically, when the value corresponding to the notification field is a preset threshold value, the value of the alertLevel field (alert level field) is read from the annotation information through the alarm level filter, because the alarm level has three levels, so the value of the alertLevel field (alert level field) will have three cases, so in order to accurately render the alarm content using the template renderer later, the value of the alertLevel field (alert level field) is also needed to determine the accurate template renderer.

[0126] Optionally, in another embodiment of the present application, the step S403 of determining the template renderer according to the alarm level field specifically includes the following steps:

[0127] When the value corresponding to the alarm level field is the first alarm level value, the template renderer is determined to be the Feishu template renderer, the email template renderer, and the short message template renderer according to the first alarm level value.

[0128] It can be understood that when the value corresponding to the alarm level field is P0, it is determined that the alarm level selected by the user is P0, and the rendered alarm template is the Feishu alarm template, the email alarm template, and the short message alarm template, so the template renderer is determined to be the Feishu template renderer, the email template renderer, and the short message template renderer.

[0129] When the value corresponding to the alarm level field is the second alarm level value, the template renderer is determined to be the Feishu template renderer and the email template renderer according to the second alarm level value.

[0130] It can be understood that when the value corresponding to the alarm level field is P1, it is determined that the alarm level selected by the user is P1, and the rendered alarm template is the Feishu alarm template and the email alarm template, so the template renderer is determined to be the Feishu template renderer and the email template renderer.

[0131] When the value corresponding to the alarm level field is the third alarm level value, the template renderer is determined to be the Feishu template renderer according to the third alarm level value.

[0132] It can be understood that when the value corresponding to the alarm level field is P2, it is determined that the alarm level selected by the user is P2, and the rendered alarm template is the Feishu alarm template, so the template renderer is determined to be the Feishu template renderer.

[0133] S404, read the alarm template field from the annotation information through the determined template renderer, and find the alarm template according to the alarm template field.

[0134] Specifically, the botTemplate (WeChat field) and / or mailTemplate (mail field) and / or smsTemplate (SMS field) field values are read from the annotation information through the WeChat template renderer and / or, the mail template renderer and / or, the SMS template renderer, and the corresponding template is found according to the botTemplate (WeChat field) and / or mailTemplate (mail field) and / or smsTemplate (SMS field) field values, that is, the template name, so as to render the alarm information into the final alarm content according to the found template subsequently.

[0135] S405, rendering the alarm content according to the alarm template through the determined template renderer.

[0136] It can be understood that the determined template renderer renders the annotation field in the alarm information according to the pre-defined alarm template to structured and readable alarm content, and finally the interceptor sends the alarm content produced by different template renderers to WeChat, a mail server, and a third-party SMS interface to notify the user. Thus, it is ensured that the alarm information can not only clearly show the key data, but also help the user to take timely response measures according to different alarm levels.

[0137] The notification method for an alarm provided by the present application comprises the following steps: obtaining an alarm rule sent by a user; sending the alarm rule to an alarm manager; preprocessing the alarm rule through the alarm manager to obtain a processed alarm rule; sending the processed alarm rule to an interceptor; analyzing the processed alarm rule through the interceptor to obtain annotation information; rendering alarm content according to the annotation information through the interceptor; and sending the alarm content to a transmission interface, so that the transmission interface sends the alarm content to the user. Thus, the alarm content is rendered according to the alarm rule defined by the user, and the problem of different alarm requirements of different users is effectively solved.

[0138] Another embodiment of the present application provides a notification device for an alarm, as shown in the accompanying drawings, comprising the following units: Figure 5

[0139] The rule obtaining unit 501 is configured to obtain an alarm rule sent by a user.

[0140] The preprocessing unit 502 is configured to send the alarm rule to an alarm manager, and preprocess the alarm rule through the alarm manager to obtain a processed alarm rule.

[0141] The analysis unit 503 is configured to send the processed alarm rule to an interceptor, and analyze the processed alarm rule through the interceptor to obtain annotation information.

[0142] ​The rendering unit 504 is configured to render the alarm content according to the annotation information through the interceptor, and send the alarm content to the transmission interface, so that the transmission interface sends the alarm content to the user.

[0143] It should be noted that the specific working process of the above-mentioned modules in the embodiments of the present application can correspondingly refer to steps S101-S104 in the above-mentioned method embodiments, which will not be described here.

[0144] Optionally, another embodiment of the present application provides a notification device for alarm, wherein the rule obtaining unit 501 comprises:

[0145] The annotation obtaining unit is configured to obtain the annotation when receiving the change instruction of the alarm rule.

[0146] The first display unit is configured to display an alarm time definition page in response to triggering an alarm time definition operation in the alarm definition module.

[0147] The first increasing unit is configured to increase the alarm time period in the time field contained in the annotation according to the alarm time period selected in the alarm time definition page.

[0148] The second display unit is configured to display an alarm recovery notification page in response to triggering an alarm recovery notification operation in the alarm definition module.

[0149] The second increasing unit is configured to increase the value corresponding to the target alarm function in the notification field contained in the annotation according to the target alarm function set in the alarm recovery notification page.

[0150] The third display unit is configured to display an alarm level definition page in response to triggering an alarm level operation in the alarm definition module.

[0151] The second increasing unit is configured to increase the alarm level in the alarm level field contained in the annotation according to the alarm level selected in the alarm level definition page.

[0152] The third increasing unit is configured to determine the alarm template according to the alarm level, and increase the alarm template in the alarm template field contained in the annotation to obtain the target annotation.

[0153] The generating unit is configured to generate the alarm rule according to the target annotation.

[0154] Optionally, another embodiment of the present application provides a notification device for alarm, further comprising:

[0155] The storage unit is configured to send the alarm rule to the alarm tool, and store the alarm rule through the alarm tool.

[0156] The judging unit is configured to execute the alarm rule after the storage is completed, and judge whether the alarm time period in the alarm rule meets the alarm time threshold. If the alarm time period in the alarm rule meets the alarm time threshold, the preprocessing unit sends the alarm rule to the alarm manager.

[0157] Optionally, another embodiment of the application provides an alarm notification device, wherein the interceptor comprises a time period filter, an alarm restorer, an alarm level filter and a template renderer, and the rendering unit 504 comprises:

[0158] The time judging unit is configured to extract a time field from the annotation information through the time period filter, and judge whether the alarm time period corresponding to the time field meets the current time period.

[0159] The numerical value judging unit is configured to read a notification field from the annotation information through the alarm restorer if the alarm time period corresponding to the time field meets the current time period, and judge whether the numerical value corresponding to the notification field is a preset threshold value.

[0160] The renderer determining unit is configured to read an alarm level field from the annotation information through the alarm level filter if the numerical value corresponding to the notification field is the preset threshold value, and determine a template renderer according to the alarm level field.

[0161] The searching unit is configured to read an alarm template field from the annotation information through the determined template renderer, and search for an alarm template according to the alarm template field.

[0162] The rendering sub-unit is configured to render the annotation information into alarm content according to the alarm template through the determined template renderer.

[0163] Optionally, another embodiment of the application provides an alarm notification device, wherein the renderer determining unit comprises:

[0164] The first determining unit is configured to determine the template renderer as a Feishu template renderer, an email template renderer and an SMS template renderer according to a first alarm level value when the numerical value corresponding to the alarm level field is the first alarm level value.

[0165] The second determining unit is configured to determine the template renderer as the Feishu template renderer and the email template renderer according to a second alarm level value when the numerical value corresponding to the alarm level field is the second alarm level value.

[0166] The third determining unit is configured to determine the template renderer as the Feishu template renderer according to a third alarm level value when the numerical value corresponding to the alarm level field is the third alarm level value.

[0167] It should be noted that the specific working process of each module provided by the above embodiments of the present application can correspondingly refer to the corresponding steps in the above method embodiments, which will not be described here.

[0168] It should also be noted that the notification device provided by the embodiments of the present application has the technical effects of any one of the above embodiments, which will not be described here.

[0169] The skilled person can further realize that the units and algorithm steps of the examples described in combination with the embodiments disclosed herein can be realized in electronic hardware, computer software or a combination of both. In order to clearly illustrate the interchangeability of hardware and software, the components and steps of the examples have been described in the above description in general terms. Whether the functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. The skilled person can use different methods to realize the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.

[0170] The above description of the disclosed embodiments enables a person skilled in the art to implement or use the present application. Various modifications to the embodiments will be apparent to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A notification method of an alarm, characterized by, The method comprises the following steps: obtaining an alarm rule sent by a user; sending the alarm rule to an alarm manager and preprocessing the alarm rule by the alarm manager to obtain a processed alarm rule; sending the processed alarm rule to an interceptor and analyzing the processed alarm rule by the interceptor to obtain annotation information; rendering alarm content according to the annotation information by the interceptor and sending the alarm content to a transmission interface so that the transmission interface sends the alarm content to the user.

2. The method of claim 1, wherein, The method of obtaining the alarm rule sent by the user comprises the following steps: when a change instruction of the alarm rule is received, obtaining an annotation; in response to triggering an alarm time definition operation in an alarm definition module, displaying an alarm time definition page; according to an alarm time period selected in the alarm time definition page, adding the alarm time period in a time field contained in the annotation; in response to triggering an alarm recovery notification operation in the alarm definition module, displaying an alarm recovery notification page; according to a target alarm function set in the alarm recovery notification page, adding a value corresponding to the target alarm function in a notification field contained in the annotation; in response to triggering an alarm level operation in the alarm definition module, displaying an alarm level definition page; according to an alarm level selected in the alarm level definition page, adding the alarm level in an alarm level field contained in the annotation; according to the alarm level, determining an alarm template and adding the alarm template in an alarm template field contained in the annotation to obtain a target annotation; generating an alarm rule according to the target annotation.

3. The method of claim 1, wherein, Before the alarm rule is sent to the alarm manager, the method further comprises the following steps: sending the alarm rule to an alarm tool and storing the alarm rule by the alarm tool; after the storage is completed, running the alarm rule and judging whether an alarm time period in the alarm rule meets an alarm time threshold; if the alarm time period in the alarm rule meets the alarm time threshold, executing the step of sending the alarm rule to the alarm manager.

4. The method of claim 1, wherein, The interceptor comprises a time period filter, an alarm recovery device, an alarm level filter and a template renderer, and the method of rendering alarm content according to the annotation information by the interceptor comprises the following steps: extracting a time field from the annotation information by the time period filter and judging whether an alarm time period corresponding to the time field meets a current time period; if the alarm time period corresponding to the time field meets the current time period, reading a notification field from the annotation information by the alarm recovery device and judging whether a value corresponding to the notification field is a preset threshold; if the value corresponding to the notification field is the preset threshold, reading an alarm level field from the annotation information by the alarm level filter and determining a template renderer according to the alarm level field; reading an alarm template field from the annotation information by the determined template renderer and searching for an alarm template according to the alarm template field. The note information is rendered into alarm content by the determined template renderer according to the alarm template.

5. The method of claim 4, wherein, The template renderer is determined according to the alarm level field, including: When the value corresponding to the alarm level field is a first alarm level value, the template renderer is determined as a WeChat template renderer, an email template renderer and an SMS template renderer according to the first alarm level value; When the value corresponding to the alarm level field is a second alarm level value, the template renderer is determined as a WeChat template renderer and an email template renderer according to the second alarm level value; When the value corresponding to the alarm level field is a third alarm level value, the template renderer is determined as a WeChat template renderer according to the third alarm level value.

6. A notification device for an alarm, characterized in that Including: A rule obtaining unit is configured to obtain an alarm rule sent by a user; A preprocessing unit is configured to send the alarm rule to an alarm manager and pre-process the alarm rule by the alarm manager to obtain a processed alarm rule; An analysis unit is configured to send the processed alarm rule to an interceptor and analyze the processed alarm rule by the interceptor to obtain note information; A rendering unit is configured to render alarm content according to the note information by the interceptor and send the alarm content to a transmission interface, so that the transmission interface sends the alarm content to the user.

7. The apparatus of claim 6, wherein, The rule obtaining unit includes: A note obtaining unit is configured to obtain a note when receiving a change instruction of an alarm rule; A first display unit is configured to display an alarm time definition page in response to triggering an alarm time definition operation in an alarm definition module; A first adding unit is configured to add an alarm time period in a time field contained in the note according to the alarm time period selected in the alarm time definition page; A second display unit is configured to display an alarm recovery notification page in response to triggering an alarm recovery notification operation in the alarm definition module; A second adding unit is configured to add a value corresponding to a target alarm function in a notification field contained in the note according to the target alarm function set in the alarm recovery notification page; A third display unit is configured to display an alarm level definition page in response to triggering an alarm level operation in the alarm definition module; A second adding unit is configured to add an alarm level in an alarm level field contained in the note according to the alarm level selected in the alarm level definition page; A third adding unit is configured to determine an alarm template according to the alarm level and add the alarm template in an alarm template field contained in the note to obtain a target note; A generating unit is configured to generate an alarm rule according to the target note.

8. The apparatus of claim 6, wherein, Further including: A storage unit is configured to send the alarm rule to an alarm tool and store the alarm rule by the alarm tool; The judging unit is configured to execute the alarm rule after the storage is completed, and judge whether the alarm time period in the alarm rule meets an alarm time threshold; and the preprocessing unit is configured to send the alarm rule to the alarm manager if the alarm time period in the alarm rule meets the alarm time threshold.

9. The apparatus of claim 6, wherein, The interceptor comprises a time period filter, an alarm recovery unit, an alarm level filter, and a template renderer, and the rendering unit comprises: The time judging unit is configured to extract a time field from the annotation information through the time period filter, and judge whether an alarm time period corresponding to the time field meets a current time period; The value judging unit is configured to read a notification field from the annotation information through the alarm recovery unit if the alarm time period corresponding to the time field meets the current time period, and judge whether a value corresponding to the notification field is a preset threshold value; The renderer determining unit is configured to read an alarm level field from the annotation information through the alarm level filter if the value corresponding to the notification field is the preset threshold value, and determine a template renderer according to the alarm level field; The finding unit is configured to read an alarm template field from the annotation information through the determined template renderer, and find an alarm template according to the alarm template field; The rendering sub-unit is configured to render the annotation information into alarm content according to the alarm template through the determined template renderer.

10. The apparatus of claim 9, wherein, The renderer determining unit comprises: The first determining unit is configured to determine a template renderer as a Feishu template renderer, an email template renderer, and an SMS template renderer according to a first alarm level value if the value corresponding to the alarm level field is the first alarm level value; The second determining unit is configured to determine a template renderer as a Feishu template renderer and an email template renderer according to a second alarm level value if the value corresponding to the alarm level field is the second alarm level value; The third determining unit is configured to determine a template renderer as a Feishu template renderer according to a third alarm level value if the value corresponding to the alarm level field is the third alarm level value.