CN114253807A - Alarm information notification method and device - Google Patents

Alarm information notification method and device Download PDF

Info

Publication number
CN114253807A
CN114253807A CN202111562771.6A CN202111562771A CN114253807A CN 114253807 A CN114253807 A CN 114253807A CN 202111562771 A CN202111562771 A CN 202111562771A CN 114253807 A CN114253807 A CN 114253807A
Authority
CN
China
Prior art keywords
alarm
notification
subscription
alarm information
information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202111562771.6A
Other languages
Chinese (zh)
Other versions
CN114253807B (en
Inventor
李悦
卢道和
罗锶
张晓通
曾可
谢军
朱国雄
陈楚曦
关俊
姚正杰
陈亚锋
李康华
邱文
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
WeBank Co Ltd
Original Assignee
WeBank Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by WeBank Co Ltd filed Critical WeBank Co Ltd
Priority to CN202111562771.6A priority Critical patent/CN114253807B/en
Publication of CN114253807A publication Critical patent/CN114253807A/en
Application granted granted Critical
Publication of CN114253807B publication Critical patent/CN114253807B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/3006Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system is distributed, e.g. networked systems, clusters, multiprocessor systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/32Monitoring with visual or acoustical indication of the functioning of the machine
    • G06F11/324Display of status information
    • G06F11/327Alarm or error message display
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/02Banking, e.g. interest calculation or account maintenance

Abstract

The invention discloses a method and a device for notifying alarm information, which comprise the following steps: the first alarm receiving end determines a first notification rule that a notification object is self from a notification rule set of the alarm notification end; the first alarm receiving end is any one of the alarm receiving ends; aiming at any first notification rule, a first alarm receiving end determines a first subscription theme aiming at the first notification rule and subscribes alarm information meeting the first notification rule according to the first subscription theme; and the first alarm receiving terminal pulls each alarm information of the first alarm receiving terminal through each first subscription theme corresponding to each first notification rule. The method and the device reduce the calculated amount of the alarm notification end, reduce the requirement on the calculation performance of the alarm notification end, improve the efficiency of acquiring the alarm information by the alarm receiving end and improve the notification efficiency of the alarm information.

Description

Alarm information notification method and device
Technical Field
The invention relates to the field of financial technology (Fintech), in particular to a method and a device for notifying alarm information.
Background
With the development of computer technology, more and more technologies (such as block chains, cloud computing or big data) are applied to the financial field, the traditional financial industry is gradually changing to the financial technology, the big data technology is not an exception, but higher requirements are provided for information alarm in the big data technology due to the requirements of security and real-time performance of the financial and payment industries.
At present, when the device runs abnormally, the application instance executes wrongly, and the like, alarm information is generated, so that a user can know the information such as the reason, the solution, and the like of the alarm. In the technical scheme of sending alarm information to a user, the prior art is generally implemented in the following two ways.
1. Sending alarm information based on a centralized architecture: the alarm information is concentrated into a single device, and each piece of alarm information is sent by the device; for any alarm information, the equipment traverses the notification rule set, determines the notification rule corresponding to the alarm information, and sends the alarm information to a notification object according to the notification rule.
2. Sending alarm information based on a distributed architecture: distributing the alarm information into a plurality of devices, and sending each piece of alarm information by the plurality of devices; and for any alarm information in the equipment, the equipment traverses the notification rule set, determines a notification rule corresponding to the alarm information, and sends the alarm information to a notification object according to the notification rule.
However, in the method 1, when the number of alarms is large, the utilization rate of the CPU of the device is high, and there is a risk of delaying the notification of the alarm information; in the method 2, the number of the devices is increased to reduce the service performance of the devices, so that the risk of alarm information notification delay is reduced; however, in both the method 1 and the method 2, for any alarm information, the corresponding notification rule needs to be matched in the notification rule set, so that a large number of matching operations are required, and the notification efficiency of the alarm information is affected.
Disclosure of Invention
The embodiment of the invention provides an alarm information notification method and an alarm information notification device, which are used for reducing the calculated amount of an alarm notification end and improving the notification efficiency of alarm information.
In a first aspect, an embodiment of the present invention provides an alarm information notification method, including:
the first alarm receiving end determines a first notification rule that a notification object is self from a notification rule set of the alarm notification end; the first alarm receiving terminal is any one of the alarm receiving terminals;
aiming at any first notification rule, the first alarm receiving end determines a first subscription theme aiming at the first notification rule and subscribes the alarm information meeting the first notification rule according to the first subscription theme;
and the first alarm receiving terminal pulls the alarm information of the first alarm receiving terminal through the first subscription topics corresponding to the first notification rules.
In the technical scheme, the alarm information is divided into the alarm information with different subjects, so that the first alarm receiving terminal acquires the alarm information related to the first alarm receiving terminal, the alarm notification terminal is not required to determine the alarm information related to the first alarm receiving terminal, the calculated amount of the alarm notification terminal is reduced, the requirement on the calculation performance of the alarm notification terminal is reduced, the efficiency of acquiring the alarm information by the alarm receiving terminal is improved, and the notification efficiency of the alarm information is improved.
Optionally, the determining, by the first alert receiving end, a first subscription topic for the first notification rule includes:
and the first alarm receiving end splices the field value of the alarm level field of the first notification rule and the field value of the object field to which the alarm belongs to generate a first subscription theme aiming at the first notification rule.
In the technical scheme, the first subscription theme is generated according to the first notification rule related to the first alarm receiving terminal, so that the first alarm receiving terminal only subscribes the subscription theme related to the first alarm receiving terminal, only the alarm information related to the first alarm receiving terminal is acquired, the alarm notification terminal is not required to determine the alarm information related to the first alarm receiving terminal, the calculated amount of the alarm notification terminal is reduced, the requirement on the calculation performance of the alarm notification terminal is lowered, the efficiency of acquiring the alarm information by the alarm receiving terminal is improved, and the notification efficiency of the alarm information is improved.
Optionally, the pulling, by the first alarm receiving end, each alarm information of the first alarm receiving end through each first subscription topic corresponding to each first notification rule includes:
the first alarm receiving terminal pulls each alarm information of the first alarm receiving terminal from each first subscription theme of the message queue server cluster; the alarm information in each second subscription topic in the message queue server side cluster is respectively stored by the alarm notification side according to each second subscription topic; the second subscription topics are determined according to the notification rules in the notification rule set; the first subscription theme belongs to any subscription theme in the second subscription themes.
In the above technical solution, the alarm information is stored by the alarm notification terminal according to each second subscription topic; therefore, the alarm receiving terminal subscribes the subscription theme related to the alarm receiving terminal, the alarm receiving terminal automatically acquires the alarm information related to the alarm receiving terminal, the alarm notification terminal is not required to distinguish the alarm information aiming at the alarm receiving terminal, the calculated amount of the alarm notification terminal is reduced, and the requirement on the calculation performance of the alarm notification terminal is lowered.
Optionally, after pulling each alarm information of the first alarm receiving end, the method further includes:
aiming at any alarm information, when the first alarm receiving end determines that the field value of each field in the alarm information is consistent with the field value of each field in the first notification rule corresponding to the alarm information, the first alarm receiving end presents the alarm information to a user.
In the above technical solution, when judging whether the alarm information needs to be presented, the alarm receiving end determines whether the alarm information meets the alarm presentation condition, and the alarm notification end does not judge whether each alarm information is the alarm information to be presented, so that the calculation amount of the alarm notification end is reduced, and the requirement on the calculation performance of the alarm notification end is reduced.
In a second aspect, an embodiment of the present invention provides an alarm information notification method, including:
aiming at any alarm information, an alarm notification end determines a third subscription subject corresponding to the alarm information;
the alarm notification end sends the alarm information to a corresponding third subscription theme in the message queue server end cluster; each second subscription topic is stored in the message queue server cluster; the second subscription subjects are determined according to the notification rules in the notification rule set of the alarm notification terminal; the third subscription theme belongs to any subscription theme in the second subscription themes; and the second subscription subjects are used for subscribing by the alarm receiving terminals and pulling alarm information from the second subscription subjects.
In the technical scheme, the alarm notification end respectively stores the alarm information according to a third subscription theme of the alarm information; therefore, the alarm receiving end can acquire the alarm information related to the alarm receiving end by subscribing the subscription theme related to the alarm receiving end, the alarm notification end is not required to distinguish the alarm information aiming at the alarm receiving end, the calculation amount of the alarm notification end is reduced, and the requirement on the calculation performance of the alarm notification end is lowered.
Optionally, the determining, by the alert notification end, a third subscription topic corresponding to the alert information includes:
and the alarm notification end splices the field value of the alarm level field of the alarm information and the field value of the object field to which the alarm belongs to generate a third subscription theme corresponding to the alarm information.
Optionally, the second subscription topics are determined according to the notification rules in the notification rule set of the alarm notification end, and include:
aiming at any notification rule in the notification rule set, the alarm notification end splices the field value of the alarm level field and the field value of the object field to which the alarm belongs in the notification rule to generate a second subscription theme corresponding to the notification rule.
In the technical scheme, the alarm notification end generates a second subscription theme through the field value of the alarm level field and the field value of the object field to which the alarm belongs in the notification rule; correspondingly, a third subscription theme corresponding to the alarm information is generated according to the field value of the alarm level field of the alarm information and the field value of the object field to which the alarm belongs, and then the alarm information is stored in the corresponding second subscription theme, so that the alarm receiving end obtains the alarm information from the second subscription theme according to the subscription theme related to the alarm receiving end, and the notification efficiency of the alarm information is improved.
In a third aspect, an embodiment of the present invention provides an alarm information notification apparatus, including:
the determining module is used for determining a first notification rule of a notification object from a notification rule set of an alarm notification end; the first alarm receiving terminal is any one of the alarm receiving terminals;
the processing module is used for determining a first subscription theme aiming at any first notification rule and subscribing the alarm information meeting the first notification rule according to the first subscription theme;
and pulling each alarm information of the first alarm receiving terminal through each first subscription theme corresponding to each first notification rule.
Optionally, the processing module is specifically configured to:
and splicing the field value of the alarm level field of the first notification rule and the field value of the object field to which the alarm belongs to generate a first subscription theme aiming at the first notification rule.
Optionally, the processing module is specifically configured to:
pulling each alarm information of the first alarm receiving end from each first subscription theme of the message queue server cluster; the alarm information in each second subscription topic in the message queue server side cluster is respectively stored by the alarm notification side according to each second subscription topic; the second subscription topics are determined according to the notification rules in the notification rule set; the first subscription theme belongs to any subscription theme in the second subscription themes.
Optionally, the processing module is further configured to:
after pulling each alarm information of the first alarm receiving terminal, for any alarm information, when the field value of each field in the alarm information is determined to be consistent with the field value of each field in the first notification rule corresponding to the alarm information, the alarm information is presented to a user.
In a fourth aspect, an embodiment of the present invention provides an alarm information notification apparatus, including:
the generating unit is used for determining a third subscription theme corresponding to any alarm information;
the sending unit is used for sending the alarm information to a corresponding third subscription theme in the message queue server cluster; each second subscription topic is stored in the message queue server cluster; the second subscription subjects are determined according to the notification rules in the notification rule set of the alarm notification terminal; the third subscription theme belongs to any subscription theme in the second subscription themes; and the second subscription subjects are used for subscribing by the alarm receiving terminals and pulling alarm information from the second subscription subjects.
Optionally, the generating unit is specifically configured to:
and splicing the field value of the alarm grade field of the alarm information and the field value of the object field to which the alarm belongs to generate a third subscription theme corresponding to the alarm information.
Optionally, the generating unit is specifically configured to:
and aiming at any notification rule in the notification rule set, splicing the field value of the alarm level field in the notification rule and the field value of the object field to which the alarm belongs to generate a second subscription theme corresponding to the notification rule.
In a fifth aspect, an embodiment of the present invention further provides a computer device, including:
a memory for storing program instructions;
and the processor is used for calling the program instruction stored in the memory and executing the alarm information notification method according to the obtained program.
In a sixth aspect, an embodiment of the present invention further provides a computer-readable storage medium, where the computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are configured to cause a computer to execute the above-mentioned alarm information notification method.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic diagram of an alarm architecture according to an embodiment of the present invention;
FIG. 2 is a system architecture diagram according to an embodiment of the present invention;
fig. 3 is a schematic flowchart of an alarm information notification method according to an embodiment of the present invention;
fig. 4 is a flowchart illustrating an alarm information notification method according to an embodiment of the present invention;
fig. 5 is a schematic flow chart of the alarm information discrimination provided by the embodiment of the present invention;
fig. 6 is a schematic structural diagram of an alarm information notification apparatus according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of an alarm information notification apparatus according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer, the present invention will be described in further detail with reference to the accompanying drawings, and it is apparent that the described embodiments are only a part of the embodiments of the present invention, not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In order to better explain the technical solution of the present invention, the following terms are explained.
Message queue: the system is a whole set of message communication protocol and comprises a client and a server, wherein the client is used for receiving and sending messages, and the server is used for temporarily storing and persisting messages. The message queue is used for decoupling the call between systems and can ensure the reliable delivery of the message. According to the message production and consumption relationship, the method is divided into a producer and a consumer. The producer sends the message to the message queue, and the consumer obtains the message from the message queue.
Publish/subscribe: a particular mode of message distribution. In this mode, the topic is a predefined message collection container, and a specific message is stored in the same topic, and different topics are distinguished by topic names. The producer sends the messages meeting specific conditions to a specific topic, and the consumer can regularly acquire the specific messages by subscribing the topic. The important characteristic of the publish/subscribe mode is that each consumer has an independent consumption progress mark for the messages under the same theme, so that the characteristic that different consumers consume the same theme independently is realized.
Centralized architecture: an information system architecture type features that the information is centralized to single high-performance equipment for processing and storage, and the equipment sharing can increase the resource utilization rate of equipment.
Distributed architecture: an information system architecture type is characterized in that information is dispersed to a plurality of devices for processing and storing, and the information system architecture type has the advantages of convenience in capacity expansion, flexibility and high usability.
Load performance ratio: the ratio of the load divided by the performance is smaller, which indicates that the performance is more sufficient relative to the load, and the load can be ensured to be processed in time.
In the prior art, an alarm flow generally consists of three subjects, and fig. 1 is a schematic diagram of an alarm architecture exemplarily shown in an embodiment of the present invention, as shown in fig. 1, including an alarm database 110, an alarm notification end 120, and an alarm receiving end 130.
The alarm database 110 is configured to store alarm information, where each piece of alarm information is stored in a row data form, and each piece of alarm information includes multiple fields, such as an alarm level, a department to which an alarm belongs, and an alarm object type; for example, the alarm information includes four fields of "alarm number", "alarm level", "alarm belonging department", and "alarm object type", and the field values are "001", "important", "department a", and "application instance", respectively.
The alarm notification terminal 120 is configured to pull new alarm information from the alarm database 110, match each piece of alarm information with predefined notification rules in sequence, and push alarm information meeting the condition to the corresponding alarm receiving terminal 130; the notification rule includes a notification object (i.e., an alarm receiving end) and a matching condition, and the matching condition corresponds to a field value of each field of the alarm information.
The alarm receiving terminal 130 is configured to receive alarm information and present the alarm information to a user; if the alarm receiving end is a mobile phone, a personal computer client and the like; the alarm receiving terminal 130 may be plural, and the number thereof is not limited herein.
At present, the notification of the alarm information is generally realized by the following two architectures.
1. Sending alarm information based on a centralized architecture: the alarm information is concentrated into a single device (namely an alarm notification end), and each piece of alarm information is sent by the device; for any alarm information, the equipment traverses the notification rule set, determines the notification rule corresponding to the alarm information, and sends the alarm information to a notification object according to the notification rule.
2. Sending alarm information based on a distributed architecture: distributing the alarm information into a plurality of devices, and sending each piece of alarm information by the plurality of devices; and for any alarm information in the equipment, the equipment traverses the notification rule set, determines a notification rule corresponding to the alarm information, and sends the alarm information to a notification object according to the notification rule.
However, in the method 1, when the number of alarms is large, the utilization rate of the CPU of the device is high, and there is a risk of delaying the notification of the alarm information; for example, if the number of alarm messages is N, the number of notification rules is S, and the CPU (central processing unit) performance of the device is U, the load L of the device is N × S, and the load performance ratio R of the device is N × S/U; however, the smaller the R value is, the more the performance of the device is more sufficient for the load, and since the CPU performance U of the device is fixed, the increase in the number of alarm information or notification rules causes an increase in R, which decreases the efficiency of the device in processing alarm information.
In the above method 2, the load performance ratio of the equipment is reduced by increasing the number of the equipment; for example, if the number of alarm messages is N, the number of notification rules is S, the CPU performance of the device is U, and the number of devices is X, the average load L of each device is N × S/X, and the load performance ratio of the device is R × N × S/(U × X); the numerical value of R is reduced by reducing the quantity of the alarm information of each device, so that the efficiency of processing the alarm information by the devices is improved.
However, in any device, for any alarm information, it is still necessary to determine an alarm notification end corresponding to the alarm information by traversing all notification rules; for example, the notification rules include notification rules for the alarm notification end a1 and the alarm notification end a2, and the alarm information is the alarm information for the alarm notification end a1, but the alarm notification end needs to match all the notification rules with the alarm information, so that the alarm notification end performs a large amount of useless calculation; that is to say, the prior art does not reduce the calculation amount of the alarm notification end through the notification rule, and does not improve the notification efficiency of the alarm information through the notification rule.
Therefore, there is a need for an alarm information notification method to reduce the amount of computation at the alarm notification end, avoid useless computation, and improve the notification efficiency of the alarm information.
Fig. 2 illustrates an exemplary system architecture to which an embodiment of the present invention is applicable, which includes an alarm database 210, an alarm notification end 220, and an alarm receiving end 230.
The alarm database 210 is used for storing alarm information.
The alarm notification terminal 220 is used for pulling alarm information from the alarm database 210; the alarm notification terminal 220 further comprises a notification rule configuration center 221, an alarm pre-sending module 222 and a message queue terminal 223; the notification rule configuration center 221 is configured to store notification rules configured by a user in a customized manner; the warning pre-sending module 222 is configured to determine, according to the notification rule configured by the user-defined, each topic (for example, topics 1 to topic n, which are characterized by a second subscription topic in the embodiment of the present invention) in the message queue server cluster, and determine a third subscription topic of each warning information; the message queue side 223 is configured to store each alarm information into a corresponding topic in the message queue server side cluster according to the third subscription topic of each alarm information; in the embodiment of the present invention, each topic of the message queue server cluster is used as a container for temporarily storing the alarm information, which may be stored in the alarm notification end 220 or stored in another module, and is not limited specifically herein.
The alarm receiving end 230 is configured to obtain a notification rule related to itself in the notification rule configuration center 221, and generate a first subscription topic; and pulling the alarm information in the theme corresponding to the theme set according to the first subscription theme, and judging whether the pulled alarm information is presented or not.
It should be noted that the structure shown in fig. 2 is only an example, and the embodiment of the present invention is not limited thereto.
Based on the above description, fig. 3 exemplarily illustrates a flowchart of an alarm information notification method according to an embodiment of the present invention, where the flowchart may be executed by an alarm information notification apparatus.
As shown in fig. 3, the process specifically includes:
in step 310, the first alarm receiving end determines the first notification rule that the notification object is itself from the notification rule set of the alarm notification end.
In the embodiment of the invention, the first alarm receiving end is any one of the alarm receiving ends.
Step 320, aiming at any first notification rule, the first alarm receiving end determines a first subscription topic aiming at the first notification rule, and subscribes the alarm information meeting the first notification rule according to the first subscription topic.
In the embodiment of the invention, the first alarm receiving end generates the first subscription theme according to the field value of the alarm level field and the field value of the object field to which the alarm belongs in the first notification rule.
Step 330, the first alarm receiving end pulls each alarm information of the first alarm receiving end through each first subscription theme corresponding to each first notification rule.
In the embodiment of the invention, the first alarm receiving terminal determines the corresponding second subscription subject in the message queue server cluster according to each first subscription subject so as to obtain the alarm information.
In step 310, each notification rule in the notification rule set is customized by the user and then stored in the alarm notification end; specifically, the alarm receiving end is used as a notification object, and the field value of the object field to which the alarm belongs and the field value of the alarm level field are spliced to generate a notification rule.
For example, the notification rules are shown in table 1 below.
TABLE 1
Figure BDA0003420736400000111
It should be noted that the notification rule shown in table 1 is only an example, and in an implementation manner, the number of matching conditions may be multiple, the target value may be one or more (e.g., level i1, level i2, level i3, level i4, etc.), and the number of fields may be multiple, which is not particularly limited.
For example, the field value of the alarm level of any notification rule and the field value of the object to which the alarm belongs are both one, 3 field values of the alarm level are provided (for example, level i1, level i2, and level i3), and 2 field values of the object to which the alarm belongs (for example, department a and department B), and 6 notification rules are formed.
In the embodiment of the present invention, the first alarm receiving end may determine the first notification rule related to itself according to the notification object, and take table 1 as an example, if the first alarm receiving end is the alarm receiving end c, the first alarm receiving end uses the second notification rule in table 1 as the first notification rule of itself.
In step 320, the first alert receiving end is generated according to the first notification rule based on the form of each second subscription topic in the message queue server cluster.
Specifically, the first alarm receiving end splices the field value of the alarm level field of the first notification rule and the field value of the object field to which the alarm belongs, and generates a first subscription theme for the first notification rule.
Based on the above example, the first alarm receiving end is the alarm receiving end c, the first notification rule of the first alarm receiving end is the notification rule two in the table 1, and the first subscription topic is "secondary-department B".
In step 330, the first alarm receiving end determines a corresponding second subscription topic in the message queue service end cluster according to the first subscription topic, and then pulls each alarm information related to the first alarm receiving end.
Specifically, a first alarm receiving terminal pulls each alarm information of the first alarm receiving terminal from each first subscription topic of a message queue server cluster; the first subscription theme belongs to any one of the second subscription themes.
In the embodiment of the invention, the alarm information in each second subscription topic in the message queue server side cluster is respectively stored by the alarm notification side according to each second subscription topic; the second subscription topics are determined according to the notification rules in the notification rule set.
Fig. 4 is a flowchart illustrating an exemplary method for notifying an alarm information according to an embodiment of the present invention, where the flowchart includes the following steps.
Step 410, aiming at any alarm information, the alarm notification end determines a third subscription subject corresponding to the alarm information.
Step 420, the alarm notification end sends the alarm information to a third subscription topic corresponding to the message queue server end cluster.
In step 410, the alarm notification end splices the field value of the alarm level field of the alarm information and the field value of the object field to which the alarm belongs to generate a third subscription theme corresponding to the alarm information.
The alarm information is shown in table 2 below, for example.
TABLE 2
Alarm serial number Alarm rating Object to which an alarm belongs Kind of alarm object
001 Primary Department A Examples of the applications
002 Primary Department B Network device
003 Of secondary importance Department C Main unit
For example, based on the alarm information shown in table 2, the third subscription topic of the alarm information with the alarm sequence number "001" is "main-department a"; the third subscription topic of the alarm information with the alarm serial number of "002" is "main-department B"; the third subscription topic of the alarm information with the alarm serial number of "003" is "secondary-department C"; it should be noted that, the number and the field of the alarm information are not limited in the embodiment of the present invention.
In step 420, the second subscription theme is also generated according to the field value of the corresponding alarm level field and the field value of the object field to which the alarm belongs; specifically, for any notification rule in the notification rule set, the alarm notification end splices the field value of the alarm level field in the notification rule with the field value of the object field to which the alarm belongs, and generates a second subscription theme corresponding to the notification rule.
For example, the alarm level field in the notification rule includes 3 field values, i1, i2 and i3, respectively, and the object field to which the alarm belongs includes 2 field values, department a and department B, respectively; 6 second subscription topics are generated. A second subscription theme as shown in table 3 below.
TABLE 3
Figure BDA0003420736400000131
Taking the above table 3 as an example, the logic code for generating the second subscription theme is as follows:
Figure BDA0003420736400000132
Figure BDA0003420736400000141
as an example based on table 1, the second subscription topic corresponding to the notification rule one is "main-department a"; the second subscription topic corresponding to the notification rule two is "secondary-department B".
Because the third subscription topic ("main-department a") of the alarm information with the alarm sequence number of "001" is consistent with the second subscription topic ("main-department a") corresponding to the notification rule one, the alarm information with the alarm sequence number of "001" is stored in the second subscription topic corresponding to the notification rule one.
In the embodiment of the invention, the fields used by the first subscription theme, the second subscription theme and the third subscription theme are corresponding, so that the accuracy of the alarm information transmission is ensured. However, it should be noted that the fields used by the first subscription theme, the second subscription theme, and the third subscription theme may be selected by the developer in a customized manner, and are not specifically limited herein. For example, subscription topics may be generated based on field values of the alarm object category field.
After the third subscription theme of each alarm information is obtained, each alarm information is stored in the corresponding second subscription theme in the message queue server cluster; the logic code is as follows:
string Dep_Alarm=Alarm.Department;
string Lev_Alarm=Alarm.Level;
string sendtoTopic=Dep_Alarm+Lev_Alarm;
the Alarm is an Alarm information body which comprises a destination and a Level, namely an object field value to which the Alarm belongs and an Alarm Level field value;
the third sending subject is generated according to the object field value and the alarm level field value of the alarm;
DefaultMQProducer Alarm_producer=new DefaultMQProducer("Alarm producer");Alarm_producer.start();
Message Alarm_msg=new Message(SendToTopic,Alarm);
SendResult result ═ Alarm _ generator.send (Alarm _ msg); and/or creating and starting a message queue end, sending alarm information and storing a sending result.
In step 330, after the first alarm receiving end generates the first subscription topic, the first alarm receiving end obtains the alarm information from the corresponding second subscription topic in the message queue server cluster; the logic code is as follows:
object Rules ═ getresults ('userA'); invoking a rule acquisition interface of a notification rule configuration center to acquire all first notification rules related to a first alarm receiving end;
Figure BDA0003420736400000151
in an implementable manner, after the first alarm receiving end determines each first subscription topic, the user can select a plurality of first subscription topics to subscribe, so that only the desired alarm information is pulled; for example, the first subscription topic includes j1, j2, and j3, the user only selects j1 and j2 to subscribe with the second subscription topic corresponding to the message queue server cluster, and then the first alarm receiving end only pulls the alarm information in the second subscription topic corresponding to j1 and j 2.
After the first alarm receiving terminal pulls the alarm information, whether the alarm information is presented or not is determined through the matching condition in the first notification rule; specifically, for any alarm information, when the first alarm receiving end determines that the field value of each field in the alarm information is consistent with the field value of each field in the first notification rule corresponding to the alarm information, the first alarm receiving end presents the alarm information to the user.
To better explain the above technical solution, fig. 5 exemplarily shows a flow diagram of discriminating the alarm information, as shown in fig. 5, the flow is as follows.
Step 510, an alarm message is obtained.
The first alarm receiving end obtains an alarm message from the message queue server cluster according to the first subscription theme.
Step 520, traverse the first notification rule.
In one possible implementation, the first alarm receiving end compares the first notification rules with the alarm information.
In an implementable manner, a first notification rule related to the alarm information is determined according to a field value of a preset field (such as an alarm level field, an object field to which the alarm belongs, and the like), and then the first notification rule related to the alarm information is compared with the alarm information according to the first notification rule related to the alarm information.
Step 530, determine whether the field values are consistent, if yes, execute step 540, otherwise execute step 510.
Comparing the first notification rule with the field value of the field of the alarm information aiming at any first notification rule, and determining whether the first notification rule is consistent with the field value of the field of the alarm information; in an implementable manner, the field values of all fields need to be consistent; in another practical manner, a forced flag may be set, and a matching condition for forced matching may be set, for example, condition one and condition two in the first notification rule are set with "+" signs, so as to indicate that if field values of condition one and condition two are consistent with field values of fields corresponding to the alarm information, it is determined that each field value is consistent without comparing other fields (i.e., fields without setting "+" signs).
And step 540, presenting the alarm information.
Step 550, determining whether the last alarm information is present, if so, ending the process, otherwise, executing step 510, and obtaining the next alarm information.
Further by way of example, the notification rule of the first alarm receiving end a is shown in the following table 4.
TABLE 4
Figure BDA0003420736400000171
And determining the first subscription topic of the first alarm receiving end a as 'primary-department A' and 'secondary-department A'.
Assume that the first alarm receiving end a obtains 2 pieces of alarm information, as shown in table 5 below.
TABLE 5
Alarm serial number Alarm rating Object to which an alarm belongs Kind of alarm object
01 Primary Department A Main unit
02 Of secondary importance Department A Network device
For the alarm information having the alarm sequence number of "01", each field value ("main-department a-host") thereof is identical to the field value ("main-department a-host") of each matching condition of the notification rule a1 in the above table 4, the alarm information having the alarm sequence number of "01" is presented so that the user can know.
For the alarm information whose alarm sequence number is "02", the field values ("secondary-department a-network device") do not coincide with the field values ("secondary-department a-application instance") of the respective matching conditions of the notification rule a2 in the above table 4, the alarm information whose alarm sequence number is "02" is discarded.
Based on the technical scheme of the invention, assuming that the number of the alarm information is N, the number of the notification rules is S, the CPU performance of the equipment is U, the number of the equipment is X, and the notification rule related to each equipment is S/X, the average load L of each equipment is N S/X2The ratio of load performance of the plant R N S/(U X)2) (ii) a Therefore, the numerical value of R is reduced by reducing the number of the notification rules related to each device, and the efficiency of processing the alarm information by the device is improved.
In the embodiment of the invention, the second subscription theme is set, so that the alarm notification end is not needed to determine the alarm information related to the alarm receiving end, the calculated amount of the alarm notification end is reduced, and the requirement on the calculation performance of the alarm notification end is reduced; the first subscription theme is generated, the alarm receiving terminal only subscribes the subscription theme related to the alarm receiving terminal, the first alarm receiving terminal automatically acquires the alarm information related to the first alarm receiving terminal, the second subscription theme is selectively subscribed, the flexibility of pulling the alarm information is improved, whether the alarm information is presented or not is judged at the alarm receiving terminal, the flexibility of the user in presenting is improved, the calculated amount of the alarm notification terminal is reduced, and the notification efficiency of the alarm information is improved.
Based on the same technical concept, fig. 6 exemplarily shows a schematic structural diagram of an alarm information notification apparatus provided by an embodiment of the present invention, and the apparatus may execute a flow of an alarm information notification method.
As shown in fig. 6, the apparatus specifically includes:
the determining module 610 is configured to determine, from the notification rule set of the alarm notification end, that the notification object is a first notification rule of the notification object; the first alarm receiving terminal is any one of the alarm receiving terminals;
a processing module 620, configured to determine, for any first notification rule, a first subscription topic for the first notification rule, and subscribe, according to the first subscription topic, alarm information that meets the first notification rule;
and pulling each alarm information of the first alarm receiving terminal through each first subscription theme corresponding to each first notification rule.
Optionally, the processing module 620 is specifically configured to:
and splicing the field value of the alarm level field of the first notification rule and the field value of the object field to which the alarm belongs to generate a first subscription theme aiming at the first notification rule.
Optionally, the processing module 620 is specifically configured to:
pulling each alarm information of the first alarm receiving end from each first subscription theme of the message queue server cluster; the alarm information in each second subscription topic in the message queue server side cluster is respectively stored by the alarm notification side according to each second subscription topic; the second subscription topics are determined according to the notification rules in the notification rule set; the first subscription theme belongs to any subscription theme in the second subscription themes.
Optionally, the processing module 620 is further configured to:
after pulling each alarm information of the first alarm receiving terminal, for any alarm information, when the field value of each field in the alarm information is determined to be consistent with the field value of each field in the first notification rule corresponding to the alarm information, the alarm information is presented to a user.
Based on the same technical concept, fig. 7 exemplarily shows a schematic structural diagram of an alarm information notification apparatus provided by an embodiment of the present invention, and the apparatus may execute a flow of an alarm information notification method.
As shown in fig. 7, the apparatus specifically includes:
a generating unit 710, configured to determine, for any alarm information, a third subscription topic corresponding to the alarm information;
a sending unit 720, configured to send the alarm information to a third subscription topic corresponding to the message queue server cluster; each second subscription topic is stored in the message queue server cluster; the second subscription subjects are determined according to the notification rules in the notification rule set of the alarm notification terminal; the third subscription theme belongs to any subscription theme in the second subscription themes; and the second subscription subjects are used for subscribing by the alarm receiving terminals and pulling alarm information from the second subscription subjects.
Optionally, the generating unit 710 is specifically configured to:
and splicing the field value of the alarm grade field of the alarm information and the field value of the object field to which the alarm belongs to generate a third subscription theme corresponding to the alarm information.
Optionally, the generating unit 710 is specifically configured to:
and aiming at any notification rule in the notification rule set, splicing the field value of the alarm level field in the notification rule and the field value of the object field to which the alarm belongs to generate a second subscription theme corresponding to the notification rule.
Based on the same technical concept, an embodiment of the present invention further provides a computer device, including:
a memory for storing program instructions;
and the processor is used for calling the program instruction stored in the memory and executing the alarm information notification method according to the obtained program.
Based on the same technical concept, the embodiment of the present invention further provides a computer-readable storage medium, where computer-executable instructions are stored, and the computer-executable instructions are used to enable a computer to execute the above alarm information notification method.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present application without departing from the spirit and scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is intended to include such modifications and variations as well.

Claims (10)

1. An alarm information notification method, comprising:
the first alarm receiving end determines a first notification rule that a notification object is self from a notification rule set of the alarm notification end; the first alarm receiving terminal is any one of the alarm receiving terminals;
aiming at any first notification rule, the first alarm receiving end determines a first subscription theme aiming at the first notification rule and subscribes the alarm information meeting the first notification rule according to the first subscription theme;
and the first alarm receiving terminal pulls the alarm information of the first alarm receiving terminal through the first subscription topics corresponding to the first notification rules.
2. The method of claim 1, wherein the first alert receiving end determining a first subscription topic for the first notification rule comprises:
and the first alarm receiving end splices the field value of the alarm level field of the first notification rule and the field value of the object field to which the alarm belongs to generate a first subscription theme aiming at the first notification rule.
3. The method of claim 1, wherein the pulling, by the first alarm receiving end, each alarm information of the first alarm receiving end through each first subscription topic corresponding to each first notification rule comprises:
the first alarm receiving terminal pulls each alarm information of the first alarm receiving terminal from each first subscription theme of the message queue server cluster; the alarm information in each second subscription topic in the message queue server side cluster is respectively stored by the alarm notification side according to each second subscription topic; the second subscription topics are determined according to the notification rules in the notification rule set; the first subscription theme belongs to any subscription theme in the second subscription themes.
4. The method as claimed in claim 1, wherein after pulling each alarm message at the first alarm receiving end, further comprising:
aiming at any alarm information, when the first alarm receiving end determines that the field value of each field in the alarm information is consistent with the field value of each field in the first notification rule corresponding to the alarm information, the first alarm receiving end presents the alarm information to a user.
5. An alarm information notification method, comprising:
aiming at any alarm information, an alarm notification end determines a third subscription subject corresponding to the alarm information;
the alarm notification end sends the alarm information to a corresponding third subscription theme in the message queue server end cluster; each second subscription topic is stored in the message queue server cluster; the second subscription subjects are determined according to the notification rules in the notification rule set of the alarm notification terminal; the third subscription theme belongs to any subscription theme in the second subscription themes; and the second subscription subjects are used for subscribing by the alarm receiving terminals and pulling alarm information from the second subscription subjects.
6. The method of claim 5, wherein the determining, by the alert notification end, a third subscription topic corresponding to the alert information comprises:
and the alarm notification end splices the field value of the alarm level field of the alarm information and the field value of the object field to which the alarm belongs to generate a third subscription theme corresponding to the alarm information.
7. The method of claim 5, wherein the second subscription topics are determined according to notification rules in the notification rule set of the alert notification peer, and comprise:
aiming at any notification rule in the notification rule set, the alarm notification end splices the field value of the alarm level field and the field value of the object field to which the alarm belongs in the notification rule to generate a second subscription theme corresponding to the notification rule.
8. An alarm information notifying apparatus, comprising:
the determining module is used for determining a first notification rule of a notification object from a notification rule set of an alarm notification end; the first alarm receiving terminal is any one of the alarm receiving terminals;
the processing module is used for determining a first subscription theme aiming at any first notification rule and subscribing the alarm information meeting the first notification rule according to the first subscription theme;
and pulling each alarm information of the first alarm receiving terminal through each first subscription theme corresponding to each first notification rule.
9. A computer device, comprising:
a memory for storing program instructions;
a processor for calling program instructions stored in said memory to perform the method of any one of claims 1 to 4 or 5 to 7 in accordance with the obtained program.
10. A computer-readable storage medium having stored thereon computer-executable instructions for causing a computer to perform the method of any one of claims 1 to 4 or 5 to 7.
CN202111562771.6A 2021-12-20 2021-12-20 Alarm information notification method and device Active CN114253807B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111562771.6A CN114253807B (en) 2021-12-20 2021-12-20 Alarm information notification method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111562771.6A CN114253807B (en) 2021-12-20 2021-12-20 Alarm information notification method and device

Publications (2)

Publication Number Publication Date
CN114253807A true CN114253807A (en) 2022-03-29
CN114253807B CN114253807B (en) 2023-04-07

Family

ID=80793205

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111562771.6A Active CN114253807B (en) 2021-12-20 2021-12-20 Alarm information notification method and device

Country Status (1)

Country Link
CN (1) CN114253807B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018184130A1 (en) * 2017-04-03 2018-10-11 Honeywell International Inc. Alarm and notification generation devices, methods, and systems
CN109815082A (en) * 2018-12-15 2019-05-28 中国平安人寿保险股份有限公司 KAFKA theme monitoring method, device, electronic equipment and storage medium
CN110633442A (en) * 2019-08-19 2019-12-31 阿里巴巴集团控股有限公司 Pushing method and device and electronic equipment
CN112437000A (en) * 2020-11-16 2021-03-02 平安信托有限责任公司 Message queue pushing method and device, computer equipment and storage medium
CN112511339A (en) * 2020-11-09 2021-03-16 宝付网络科技(上海)有限公司 Container monitoring alarm method, system, equipment and storage medium based on multiple clusters
CN113377626A (en) * 2021-08-11 2021-09-10 上海领健信息技术有限公司 Visual unified alarm method, device, equipment and medium based on service tree
CN113794597A (en) * 2021-09-15 2021-12-14 中国联合网络通信集团有限公司 Alarm information processing method, system, electronic device and storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018184130A1 (en) * 2017-04-03 2018-10-11 Honeywell International Inc. Alarm and notification generation devices, methods, and systems
CN109815082A (en) * 2018-12-15 2019-05-28 中国平安人寿保险股份有限公司 KAFKA theme monitoring method, device, electronic equipment and storage medium
CN110633442A (en) * 2019-08-19 2019-12-31 阿里巴巴集团控股有限公司 Pushing method and device and electronic equipment
CN112511339A (en) * 2020-11-09 2021-03-16 宝付网络科技(上海)有限公司 Container monitoring alarm method, system, equipment and storage medium based on multiple clusters
CN112437000A (en) * 2020-11-16 2021-03-02 平安信托有限责任公司 Message queue pushing method and device, computer equipment and storage medium
CN113377626A (en) * 2021-08-11 2021-09-10 上海领健信息技术有限公司 Visual unified alarm method, device, equipment and medium based on service tree
CN113794597A (en) * 2021-09-15 2021-12-14 中国联合网络通信集团有限公司 Alarm information processing method, system, electronic device and storage medium

Also Published As

Publication number Publication date
CN114253807B (en) 2023-04-07

Similar Documents

Publication Publication Date Title
CN108897854B (en) Monitoring method and device for overtime task
CN109450987B (en) Number generation method, device and system and storage medium
US20130013549A1 (en) Hardware-assisted approach for local triangle counting in graphs
CN106921754A (en) The load-balancing method of group system, device, medium and electronic equipment
CN111641524A (en) Monitoring data processing method, device, equipment and storage medium
US11102284B2 (en) Service processing methods and systems based on a consortium blockchain network
WO2017118318A1 (en) Data storage and service processing method and device
CN114448989B (en) Method, device, electronic equipment, storage medium and product for adjusting message distribution
CN111737353A (en) Metadata synchronization method and device
CN109325599A (en) A kind of data processing method, server and computer-readable medium
CN114253807B (en) Alarm information notification method and device
CN113179329B (en) Service issuing method and device, server and storage medium
CN110071968A (en) A kind of message storage method and device based on block chain
CN116302863B (en) Alarm processing method, device, equipment and computer readable medium
CN117032987A (en) Distributed task scheduling method, system, equipment and computer readable medium
CN109146672B (en) Matching method and device based on production mode
CN113762819A (en) Channel scheduling method and device
CN116431523B (en) Test data management method, device, equipment and storage medium
CN111935289B (en) Dynamic monitoring method and device based on block chain
CN111274209A (en) Call bill file processing method and device
CN111652616B (en) Transaction data real-time monitoring method and device
CN115115457B (en) Method, system and medium for processing business transaction flow
CN109510855B (en) Event distribution system, method and device
CN116303279A (en) Concurrent file acquisition method, concurrent file acquisition device, concurrent file acquisition equipment and storage medium
CN117827450A (en) Service processing method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant