CN116578462A - Alarm method, alarm device, electronic equipment and storage medium - Google Patents

Alarm method, alarm device, electronic equipment and storage medium Download PDF

Info

Publication number
CN116578462A
CN116578462A CN202310558006.XA CN202310558006A CN116578462A CN 116578462 A CN116578462 A CN 116578462A CN 202310558006 A CN202310558006 A CN 202310558006A CN 116578462 A CN116578462 A CN 116578462A
Authority
CN
China
Prior art keywords
alarm
expression
database
rule
matching
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.)
Pending
Application number
CN202310558006.XA
Other languages
Chinese (zh)
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.)
Wanguo Data Service Co ltd
Original Assignee
Wanguo Data Service 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 Wanguo Data Service Co ltd filed Critical Wanguo Data Service Co ltd
Priority to CN202310558006.XA priority Critical patent/CN116578462A/en
Publication of CN116578462A publication Critical patent/CN116578462A/en
Pending legal-status Critical Current

Links

Classifications

    • 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
    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2228Indexing structures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/25Integrating or interfacing systems involving database management systems
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y04INFORMATION OR COMMUNICATION TECHNOLOGIES HAVING AN IMPACT ON OTHER TECHNOLOGY AREAS
    • Y04SSYSTEMS INTEGRATING TECHNOLOGIES RELATED TO POWER NETWORK OPERATION, COMMUNICATION OR INFORMATION TECHNOLOGIES FOR IMPROVING THE ELECTRICAL POWER GENERATION, TRANSMISSION, DISTRIBUTION, MANAGEMENT OR USAGE, i.e. SMART GRIDS
    • Y04S10/00Systems supporting electrical power generation, transmission or distribution
    • Y04S10/50Systems or methods supporting the power network operation or management, involving a certain degree of interaction with the load-side end user applications

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Quality & Reliability (AREA)
  • Data Mining & Analysis (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The application provides an alarming method, an alarming device, electronic equipment and a storage medium, wherein the alarming method comprises the following steps: obtaining an alarm rule, wherein the alarm rule comprises: an alarm expression and a time period; judging whether the using alarm expression is matched with the data record in the database; if so, determining the last time according to the current time and the time period, acquiring the matching times between the current time and the last time from the history matching record, and generating alarm information according to the matching times. In the implementation process of the scheme, under the condition that the alarm expression in the alarm rule is matched with the data record in the database, the alarm information is generated according to the matching times between the current moment and the last moment determined by the time period, so that the condition that the external factors suddenly rise or fall to cause false alarm is effectively improved, and the alarm accuracy is improved.

Description

Alarm method, alarm device, electronic equipment and storage medium
Technical Field
The application relates to the technical field of operation and maintenance of a data center and a machine room, in particular to an alarm method, an alarm device, electronic equipment and a storage medium.
Background
At present, index data of a data center machine room is monitored, and is mostly stored and monitored through a monitoring program system written by an operator of the data center, and meanwhile, a developer also writes a program of an alarm rule to monitor the index data and generate alarm information when the alarm rule is met. However, in a specific practical process, it is found that the external factor suddenly increases or decreases to cause a false alarm, specifically for example: the index data can be suddenly increased or decreased (for example, the air conditioner suddenly jumps) due to some external factors, and the normal value can be recovered after the external factors disappear, so that the false alarm at the moment causes lower alarm accuracy.
Disclosure of Invention
The embodiment of the application aims to provide an alarm method, an alarm device, electronic equipment and a storage medium, which are used for solving the problem of low alarm accuracy.
The embodiment of the application provides an alarm method, which comprises the following steps: obtaining an alarm rule, wherein the alarm rule comprises: an alarm expression and a time period; judging whether the using alarm expression is matched with the data record in the database; if so, determining the last time according to the current time and the time period, acquiring the matching times between the current time and the last time from the history matching record, and generating alarm information according to the matching times. In the implementation process of the scheme, under the condition that the alarm expression in the alarm rule is matched with the data record in the database, the alarm information is generated according to the matching times between the current moment and the last moment determined by the time period, so that the condition that the external factors suddenly rise or fall to cause false alarm is effectively improved, and the alarm accuracy is improved.
Optionally, in an embodiment of the present application, acquiring the alarm rule includes: acquiring an alarm rule from the expression designer in response to a determination operation of the expression designer; and analyzing the alarm expression and the time period from the alarm rule. In the implementation process of the scheme, the alarm rules are acquired from the expression designer in response to the determining operation of the expression designer, so that the alarm rules are flexibly and custom configured, and the configuration flexibility and the robustness of the alarm rules and the alarm expressions are improved.
Optionally, in an embodiment of the present application, generating the alarm information according to the matching times includes: judging whether the matching times are larger than a preset threshold value or not; if yes, generating alarm information according to the data record matched with the current moment. In the implementation process of the scheme, the alarm information is generated according to the matched data records at the current moment only when the matching times are larger than the preset threshold, so that the situation that external factors suddenly rise or fall (for example, accidentally match with one data record) to cause false alarms is effectively improved, the number of the false alarms is reduced, and the alarm accuracy is improved.
Optionally, in an embodiment of the present application, after determining whether the matching number is greater than a preset threshold, the method further includes: and if the matching times are smaller than or equal to a preset threshold value, determining that false alarms are generated. In the implementation process of the scheme, the false alarm is determined under the condition that the matching times are smaller than or equal to the preset threshold value, so that the alarm accuracy is improved.
Optionally, in an embodiment of the present application, after determining whether the alert expression matches the data record in the database, the method further includes: if the alert expression does not match the data record in the database, then a return is made to perform a determination as to whether the alert expression is used to match the data record in the database. In the implementation process of the scheme, under the condition that the alarm expression is not matched with the data record in the database, the judgment action is returned to be executed, so that the operation of backtracking the matching times between the current moment and the last moment is saved, and the computing resource is effectively saved.
Optionally, in an embodiment of the present application, the method further includes: acquiring index data and a current time stamp of infrastructure equipment of a data center; and taking the current timestamp as an index key, taking the index data as a specific value, and storing the index data and the current timestamp in a database in an associated manner. In the implementation process of the scheme, the index data is stored in the database in an associated mode by taking the current timestamp as an index key and the index data as a specific value, so that the searching speed and efficiency of the index data are effectively improved.
Optionally, in an embodiment of the present application, after generating the alarm information according to the matching times, the method further includes: judging whether a subscriber of the alarm rule is acquired or not; if yes, sending alarm information to the subscriber of the alarm rule. In the implementation process of the scheme, after the subscriber of the alarm rule is acquired, the alarm information is sent to the subscriber of the alarm rule, so that the situation that the alarm information is not sent to the subscriber in time is improved, and the timeliness of sending the alarm information to the subscriber of the alarm rule is effectively improved.
The embodiment of the application also provides an alarm device, which comprises: the alarm rule acquisition module is used for acquiring alarm rules, and the alarm rules comprise: an alarm expression and a time period; the data matching judging module is used for judging whether the using alarm expression is matched with the data record in the database; and the alarm information generation module is used for determining the last time according to the current time and the time period if the alarm expression is matched with the data record in the database, acquiring the matching times between the current time and the last time from the history matching record, and then generating alarm information according to the matching times.
Optionally, in an embodiment of the present application, the alert rule acquisition module includes: the determining operation response sub-module is used for responding to the determining operation of the expression designer and acquiring an alarm rule from the expression designer; and the alarm rule analysis sub-module is used for analyzing the alarm expression and the time period from the alarm rule.
Optionally, in an embodiment of the present application, the alarm information generating module includes: the data record judging sub-module is used for judging whether the matching times are larger than a preset threshold value or not; and the alarm information generation sub-module is used for generating alarm information according to the data record matched at the current moment if the matching times are greater than a preset threshold value.
Optionally, in an embodiment of the present application, the alarm information generating module further includes: and the false alarm prompting sub-module is used for determining false alarm if the matching times are smaller than or equal to a preset threshold value.
Optionally, in an embodiment of the present application, the alarm device further includes: and the return execution judging module is used for returning to execute the judgment whether the alarm expression is matched with the data record in the database or not if the alarm expression is not matched with the data record in the database.
Optionally, in an embodiment of the present application, the alarm device further includes: the index data acquisition module is used for acquiring index data and a current time stamp of infrastructure equipment of the data center; and the index data storage module is used for storing the index data and the current time stamp in a database in an associated manner by taking the current time stamp as an index key and the index data as a specific value.
Optionally, in an embodiment of the present application, the alarm device further includes: the alarm subscription judging module is used for judging whether a subscriber of an alarm rule is acquired or not; and the alarm information sending module is used for sending alarm information to the subscriber of the alarm rule if the subscriber of the alarm rule is acquired.
The embodiment of the application also provides electronic equipment, which comprises: a processor and a memory storing machine-readable instructions executable by the processor to perform the method as described above when executed by the processor.
Embodiments of the present application also provide a computer readable storage medium having stored thereon a computer program which, when executed by a processor, performs a method as described above.
Additional features and advantages of embodiments of the application will be set forth in the description which follows, and in part will be apparent from the description, or may be learned by practice of embodiments of the application.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the embodiments of the present application will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application, and therefore should not be considered as limiting the scope, and other related drawings can be obtained according to these drawings without inventive effort to those of ordinary skill in the art.
FIG. 1 is a schematic flow chart of an alarm method according to an embodiment of the present application;
FIG. 2 is a schematic diagram of a database according to an embodiment of the present application;
FIG. 3 is a schematic diagram of an expression designer provided by an embodiment of the application;
FIG. 4 is a schematic structural diagram of an alarm device according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present application more clear, the technical solutions of the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application, and it should be understood that the accompanying drawings in the embodiments of the present application are only for the purpose of illustration and description, and are not intended to limit the scope of the embodiments of the present application. In addition, it should be understood that the schematic drawings are not drawn to scale. The flowcharts used in the embodiments of the present application illustrate operations implemented according to some embodiments of the present application. It should be understood that the operations of the flow diagrams may be implemented out of order and that steps without logical context may be performed in reverse order or concurrently. Moreover, one or more other operations may be added to or removed from the flow diagrams by those skilled in the art under the direction of the teachings of the embodiments of the present application.
In addition, the described embodiments are only some, but not all, of the embodiments of the present application. The components of the embodiments of the present application generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations. Accordingly, the following detailed description of the embodiments of the application, as presented in the figures, is not intended to limit the scope of the claimed embodiments of the application, but is merely representative of selected embodiments of the application.
It will be appreciated that "first" and "second" in embodiments of the application are used to distinguish similar objects. It will be appreciated by those of skill in the art that the words "first," "second," and the like do not limit the amount and order of execution, and that the words "first," "second," and the like do not necessarily differ. In the description of the embodiments of the present application, the term "and/or" is merely an association relationship describing an association object, and indicates that three relationships may exist, for example, a and/or B may indicate: a exists alone, A and B exist together, and B exists alone. In addition, the character "/" herein generally indicates that the front and rear associated objects are an "or" relationship. The term "plurality" refers to two or more (including two), and similarly, "plurality" refers to two or more (including two).
It should be noted that, the alarm method provided by the embodiment of the present application may be executed by an electronic device, where the electronic device refers to a device terminal or a server having a function of executing a computer program, where the device terminal is for example: smart phones, personal computers, tablet computers, personal digital assistants, or mobile internet appliances, etc. A server refers to a device that provides computing services over a network, such as: an x86 server and a non-x 86 server, the non-x 86 server comprising: mainframe, minicomputer, and UNIX servers.
Application scenarios to which the alarm method is applicable are described below, where the application scenarios include, but are not limited to: the alarm method may be used to monitor and alarm index information of infrastructure equipment of a data center, where the infrastructure equipment includes, but is not limited to: transfer switch equipment and uninterruptible power supply (Uninterruptible Power Supply, UPS) in a power supply system, precise air conditioning equipment and fresh air system equipment in a refrigeration system and the like. Of course, in a specific implementation process, the building equipment management system (Building Management System, BMS) may collect the index data of the infrastructure equipment of the data center by using the industrial control protocol, and then, the alarm method is used in the BMS system to monitor and match the index data of the infrastructure equipment of the data center. Or subscribing certain index data in the BMS system through a data center basic management (Data Center Infrastructure Management, DCIM) system, and monitoring and matching certain index data in the BMS system by using the alarm method in the DCIM system, so that after a periodic matching result is obtained, alarm information is generated according to the matching result, the situation that external factors suddenly rise or fall to cause false alarms is effectively improved, and the alarm accuracy is improved.
Please refer to fig. 1, which illustrates a flowchart of an alarm method according to an embodiment of the present application; the main idea of the alarm method is that under the condition that the alarm expression in the alarm rule is matched with the data record in the database, the alarm information is generated according to the matching times between the current moment and the last moment determined by the time period, so that the situation that the external factors suddenly rise or fall to cause false alarms is effectively improved, the number of false alarms is reduced, and the alarm accuracy is improved. The embodiment of the alarm method may include:
step S110: obtaining an alarm rule, wherein the alarm rule comprises: alert expressions and time periods.
The method for acquiring the alarm rule in step S110 includes: the first acquisition mode is to receive alarm rules sent by other terminal equipment and store the alarm rules into a file system, a database or mobile storage equipment; the second acquisition mode acquires a pre-stored alarm rule, specifically for example: acquiring alarm rules from a file system, a database or a mobile storage device; and thirdly, acquiring alarm rules on the Internet by using software such as a browser or other application programs to access the Internet.
Step S120: it is determined whether the usage alert expression matches a data record in the database.
It can be appreciated that before matching in the Database using the alert expression, the index data in the BMS system may also be stored in the Database in time sequence, and the data record in the Database may be represented as database= [ { time stamp, id, value }, … … ]; wherein, database represents the Database, timestamp represents the timestamp of the index data storage, id represents the equipment identifier or the data identifier of the index data, and value represents the specific value of the index data.
The fact that the alarm expression is matched with the data record in the database means that the specific value in the data record in the database meets the condition of the alarm expression, that is, the matched specific value in the data record meets the condition of the alarm expression.
Please refer to fig. 2, which illustrates a schematic structure of a database according to an embodiment of the present application; the database may maintain a sparse index table (refer to the shape of the coordinates of fig. 2) in the memory, and when storing the index data into the database, the current timestamp (timestamp) of the electronic device is acquired first, and the current timestamp is stored into the sparse index table, and then the index data is packaged into a data File (File) and stored in a distributed File system, where the distributed File system may employ GFS, HDFS, ceph, lustre, mogileFS, mooseFS, fastDFS, TFS, gridFS, and the like.
Step S130: if the alarm expression is matched with the data record in the database, determining the last time according to the current time and the time period, acquiring the matching times between the current time and the last time from the history matching record, and generating alarm information according to the matching times.
It can be appreciated that if the alert expression is matched to the data record in the database, a record of association between the alert expression and the matching time is added to the history matching record, so as to obtain the matching times (for example, the matching times between the current time and the previous time) from the history matching record according to the time range. Then, the last time is determined according to the current time and the time period (for example, the current time is 6 points 30, the time period is 7 minutes, then the last time is 6 points 23), and the matching times between the current time and the last time are obtained from the history matching record (for example, the matching times between the 6 points 23 to 30 are obtained, where the matching times may be 1 time or multiple times, for example, 3 times or 5 times). Then, the warning information is generated according to the number of matches, and the embodiment of generating the warning information according to the number of matches will be described in detail below. Optionally, after generating the alarm information according to the matching times, the alarm information may be directly pushed to a subscriber subscribing to the alarm rule, or may be stored on the electronic device, and the user may be used to view the alarm information corresponding to the alarm rule.
In the implementation process, under the condition that the alarm expression in the alarm rule is matched with the data record in the database, the alarm information is generated according to the matching times between the current moment and the last moment determined by the time period, so that the situation that external factors suddenly rise or fall to cause false alarms is effectively improved, the number of false alarms is reduced, and the alarm accuracy is improved.
Please refer to fig. 3, which illustrates a schematic diagram of an expression designer provided in an embodiment of the present application; the expression designer refers to a text editor for defining an alert expression in an alert rule, which may include a plurality of conditions that may be connected using logical connectors (e.g., logical AND, logical OR, NOT, etc. logical symbols). Wherein each of the plurality of conditions may include a variable name, a relationship symbol, a specific value, etc., the relationship symbol may be greater than, equal to, less than, etc., and the specific value may be an integer, a floating point number, a character string, etc. The set of alert rules described above may be represented as R all =[{rule=[{expression,period},……],title,message},……]The method comprises the steps of carrying out a first treatment on the surface of the Wherein R is all Representing a set of alert rules, rule representingA single alarm rule, expression represents an alarm expression, period represents a time period, title represents an alarm name title, message represents alarm prompt information or an alarm prompt message.
As an alternative embodiment of the above step S110, the alert rule may be acquired by the expression designer, which may include:
step S111: in response to a determination operation of the expression designer, an alert rule is obtained from the expression designer.
The determining operation refers to an operation in the expression designer that determines to save or generate an alert expression in an alert rule, where the determining operation includes, but is not limited to: save operations, commit operations or generate operations, and so forth.
When the expression designer is used for designing the alarm rule set, the corresponding alarm equipment, the state of the alarm equipment, the operation symbol and the specific value can be directly selected in the expression designer, so that a single alarm rule can be generated, the logic connectors can be clicked in sequence, and more alarm rules can be generated, thereby obtaining the alarm rule set. Of course, in a specific practical process, the expression designer may also provide a high-level mode, so that a developer familiar with the writing of alarm rules writes alarm expressions and time periods directly in the expression designer of the high-level mode, thereby obtaining the alarm rule set.
Step S112: and analyzing the alarm expression and the time period from the alarm rule.
The embodiments of the above steps S111 to S112 are, for example: in response to a determination operation of an expression designer in a hypertext markup language (Hyper Text Markup Language, HTML) page, obtaining an alert rule from the expression designer, and parsing the alert expression and the time period from the alert rule using an executable program compiled or interpreted in a preset programming language; among these, programming languages that can be used are, for example: C. c++, java, BASIC, javaScript, LISP, shell, perl, ruby, python, PHP, etc.
As an alternative implementation manner of the step S120, the database may be an in-memory database, a relational database, or a non-relational database, for example: judging whether the alarm expression is matched with the data record in the databases such as the memory database, the relational database or the non-relational database by using an executable program compiled or interpreted by a preset programming language; among these, in-memory databases that can be used are, for example: memcached and Redis, etc., relational databases that can be used are, for example: mysql, postgreSQL, oracle and SQLSever, etc., non-relational databases that may be used include: grakn databases, hadoop subsystem HBase, mongoDB, couchDB, and the like.
As an alternative embodiment of the above step S130, the alarm information may be generated according to a comparison result between the matching number and the preset number, and the embodiment may include:
step S131: and judging whether the matching times are larger than a preset threshold value.
It will be appreciated that the above-mentioned preset threshold may be set according to the specific situation, for example: the preset threshold is set to 2 times, 4 times, 6 times, etc.
Step S132: and if the matching times are greater than a preset threshold, generating alarm information according to the data record matched at the current moment.
The embodiments of the above steps S131 to S132 are, for example: the executable program compiled or interpreted by using the preset programming language is used for judging whether the matching times are greater than a preset threshold, the matching times can be 1 time or multiple times (for example, 3 times or 5 times), specifically, assuming that the preset threshold is 2 times, if the matching times are 3 times or 5 times, alarm information can be generated according to the data records matched at the current moment. Among these, programming languages that can be used are, for example: C. c++, java, BASIC, javaScript, LISP, shell, perl, ruby, python, PHP, etc.
As an alternative embodiment of the above step S130, after determining whether the number of matching is greater than the preset threshold, the method further includes:
step S133: and if the matching times are smaller than or equal to a preset threshold value, determining that false alarms are generated.
The embodiment of step S133 described above is, for example: assuming that the preset threshold is 4 times, if the number of matches is 1 or 3 times, it is obvious that the number of matches is smaller than the preset threshold, then the data record matched at this time can be determined to be the data record of the false alarm, that is, the false alarm.
As an optional implementation manner of the foregoing alert method, after determining whether the alert expression matches the data record in the database, the method further includes:
step S140: if the alert expression does not match the data record in the database, then a return is made to perform a determination as to whether the alert expression is used to match the data record in the database.
The embodiment of step S140 described above is, for example: if the alarm expression is not matched with the data record in the database, returning to the execution step S120; if the alarm expression is matched with the data record in the database, determining the last time according to the current time and the time period, acquiring the matching times between the current time and the last time from the history matching record, and generating alarm information according to the matching times.
As an alternative embodiment of the foregoing alert method, the foregoing database may further store index data of infrastructure equipment of the data center, and the embodiment may include:
step S150: index data and a current timestamp of infrastructure equipment of a data center are obtained.
Step S160: and taking the current timestamp as an index key, taking the index data as a specific value, and storing the index data and the current timestamp in a database in an associated manner.
The embodiments of the above steps S150 to S160 are, for example: index data and a current time stamp of infrastructure equipment of the data center are acquired from the BMS system. And taking the current timestamp as an index key, taking the index data as a specific value (value), and storing the index data and the current timestamp in a database in a time sequence mode in an associated mode.
As an optional implementation manner of the foregoing alert method, after generating alert information according to the matching times, the alert information may also be sent to a subscriber subscribing to the alert rule, where the implementation manner may include:
step S170: the electronic device determines whether a subscriber to the alert rule is obtained.
Step S180: if the subscriber of the alarm rule is obtained, the electronic equipment sends alarm information to the subscriber of the alarm rule.
The embodiments of the above steps S170 to S180 are, for example: the electronic device uses an executable program compiled or interpreted by a preset programming language to judge whether a subscriber of the alarm rule is acquired. After the plurality of subscribers to the alarm rule are obtained, each subscriber to the alarm rule can be traversed, and the alarm information is sent to each subscriber, that is, the electronic device sends the alarm information to the subscriber to each alarm rule.
Please refer to fig. 4, which illustrates a schematic structural diagram of an alarm device according to an embodiment of the present application; the embodiment of the application provides an alarm device 200, which comprises:
the alarm rule obtaining module 210 is configured to obtain an alarm rule, where the alarm rule includes: alert expressions and time periods.
The data matching judging module 220 is configured to judge whether the usage alert expression matches to a data record in the database.
The alarm information generating module 230 is configured to determine a previous time according to the current time and the time period if the alarm expression is matched to the data record in the database, obtain the matching times between the current time and the previous time from the history matching record, and then generate alarm information according to the matching times.
Optionally, in an embodiment of the present application, the alert rule acquisition module includes:
and the determining operation response sub-module is used for responding to the determining operation of the expression designer and acquiring the alarm rule from the expression designer.
And the alarm rule analysis sub-module is used for analyzing the alarm expression and the time period from the alarm rule.
Optionally, in an embodiment of the present application, the alarm information generating module includes:
and the data record judging sub-module is used for judging whether the matching times are larger than a preset threshold value. .
And the alarm information generation sub-module is used for generating alarm information according to the data record matched at the current moment if the matching times are greater than a preset threshold value.
Optionally, in an embodiment of the present application, the alarm information generating module further includes:
and the false alarm prompting sub-module is used for determining false alarm if the matching times are smaller than or equal to a preset threshold value.
Optionally, in an embodiment of the present application, the alarm device further includes:
and the return execution judging module is used for returning to execute the judgment whether the alarm expression is matched with the data record in the database or not if the alarm expression is not matched with the data record in the database.
Optionally, in an embodiment of the present application, the alarm device further includes:
and the index data acquisition module is used for acquiring the index data and the current time stamp of the infrastructure equipment of the data center.
And the index data storage module is used for storing the index data and the current time stamp in a database in an associated manner by taking the current time stamp as an index key and the index data as a specific value.
Optionally, in an embodiment of the present application, the alarm device further includes:
and the alarm subscription judging module is used for judging whether the subscriber of the alarm rule is acquired or not.
And the alarm information sending module is used for sending alarm information to the subscriber of the alarm rule if the subscriber of the alarm rule is acquired.
It should be understood that the apparatus corresponds to the above-described alarm method embodiment, and is capable of executing the steps involved in the above-described method embodiment, and specific functions of the apparatus may be referred to the above description, and detailed descriptions thereof are omitted herein as appropriate. The device includes at least one software functional module that can be stored in memory in the form of software or firmware (firmware) or cured in an Operating System (OS) of the device.
Please refer to fig. 5, which illustrates a schematic structural diagram of an electronic device according to an embodiment of the present application. An electronic device 300 provided in an embodiment of the present application includes: a processor 310 and a memory 320, the memory 320 storing machine-readable instructions executable by the processor 310, which when executed by the processor 310 perform the method as described above.
The embodiment of the present application also provides a computer readable storage medium 330, on which computer readable storage medium 330 a computer program is stored which, when executed by the processor 310, performs a method as above. The computer readable storage medium 330 may be implemented by any type or combination of volatile or nonvolatile Memory devices, such as static random access Memory (Static Random Access Memory, SRAM for short), electrically erasable programmable Read-Only Memory (Electrically Erasable Programmable Read-Only Memory, EEPROM for short), erasable programmable Read-Only Memory (Erasable Programmable Read Only Memory, EPROM for short), programmable Read-Only Memory (Programmable Read-Only Memory, PROM for short), read-Only Memory (ROM for short), magnetic Memory, flash Memory, magnetic disk, or optical disk.
It should be noted that, in the present specification, each embodiment is described in a progressive manner, and each embodiment is mainly described as different from other embodiments, and identical and similar parts between the embodiments are all enough to be referred to each other. For the apparatus class embodiments, the description is relatively simple as it is substantially similar to the method embodiments, and reference is made to the description of the method embodiments for relevant points.
In the embodiments of the present application, it should be understood that the disclosed apparatus and method may be implemented in other manners. The apparatus embodiments described above are merely illustrative, for example, of the flowcharts and block diagrams in the figures that illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved.
In addition, the functional modules of the embodiments of the present application may be integrated together to form a single part, or the modules may exist separately, or two or more modules may be integrated to form a single part. Furthermore, in the description herein, reference to the terms "one embodiment," "some embodiments," "examples," "specific examples," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the embodiments of the application. In this specification, schematic representations of the above terms are not necessarily directed to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, the different embodiments or examples described in this specification and the features of the different embodiments or examples may be combined and combined by those skilled in the art without contradiction.
The foregoing description is merely an optional implementation of the embodiment of the present application, but the scope of the embodiment of the present application is not limited thereto, and any person skilled in the art may easily think about changes or substitutions within the technical scope of the embodiment of the present application, and the changes or substitutions are covered by the scope of the embodiment of the present application.

Claims (10)

1. An alert method, comprising:
obtaining an alarm rule, wherein the alarm rule comprises: an alarm expression and a time period;
judging whether the alarm expression is matched with the data record in the database;
if so, determining the last time according to the current time and the time period, acquiring the matching times between the current time and the last time from a history matching record, and generating alarm information according to the matching times.
2. The method of claim 1, wherein the obtaining the alert rule comprises:
acquiring the alarm rule from the expression designer in response to a determination operation of the expression designer;
and analyzing the alarm expression and the time period from the alarm rule.
3. The method of claim 1, wherein the generating alert information according to the number of matches comprises:
judging whether the matching times are larger than a preset threshold value or not;
if yes, generating the alarm information according to the data record matched with the current moment.
4. The method of claim 3, further comprising, after said determining if said number of matches is greater than a preset threshold:
and if the matching times are smaller than or equal to a preset threshold value, determining that false alarms are generated.
5. The method of claim 4, further comprising, after said determining if said alert expression matches a data record in a database:
and if the alarm expression is not matched with the data record in the database, returning to execute the judgment whether the alarm expression is matched with the data record in the database.
6. The method of any one of claims 1-5, further comprising:
acquiring index data and a current time stamp of infrastructure equipment of a data center;
and taking the current timestamp as an index key, taking the index data as a specific value, and storing the index data and the current timestamp in the database in an associated manner.
7. The method according to any one of claims 1-5, further comprising, after said generating alert information according to said matching times:
judging whether a subscriber of the alarm rule is acquired or not;
if yes, sending the alarm information to the subscriber of the alarm rule.
8. An alert device, comprising:
the alarm rule acquisition module is used for acquiring alarm rules, and the alarm rules comprise: an alarm expression and a time period;
the data matching judging module is used for judging whether the alarm expression is matched with the data record in the database or not;
and the alarm information generation module is used for determining the last time according to the current time and the time period if the alarm expression is matched with the data record in the database, acquiring the matching times between the current time and the last time from the history matching record, and then generating alarm information according to the matching times.
9. An electronic device, comprising: a processor and a memory storing machine-readable instructions executable by the processor to perform the method of any one of claims 1 to 7 when executed by the processor.
10. A computer-readable storage medium, characterized in that it has stored thereon a computer program which, when executed by a processor, performs the method according to any of claims 1 to 7.
CN202310558006.XA 2023-05-17 2023-05-17 Alarm method, alarm device, electronic equipment and storage medium Pending CN116578462A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310558006.XA CN116578462A (en) 2023-05-17 2023-05-17 Alarm method, alarm device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310558006.XA CN116578462A (en) 2023-05-17 2023-05-17 Alarm method, alarm device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116578462A true CN116578462A (en) 2023-08-11

Family

ID=87535448

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310558006.XA Pending CN116578462A (en) 2023-05-17 2023-05-17 Alarm method, alarm device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116578462A (en)

Similar Documents

Publication Publication Date Title
CN109639450B (en) Fault alarm method, system, computer equipment and medium based on neural network
US9836346B2 (en) Error troubleshooting using a correlated knowledge base
CN110995482B (en) Alarm analysis method and device, computer equipment and computer readable storage medium
CN108363657B (en) Method, equipment and medium for monitoring integrity of embedded data acquisition of APP client
CN108563445B (en) Application program code detection method and server
CN111835760A (en) Alarm information processing method and device, computer storage medium and electronic equipment
CN112804079B (en) Alarm analysis method, device, equipment and storage medium for cloud computing platform
CN114710368B (en) Security event detection method and device and computer readable storage medium
CN115357470B (en) Information generation method and device, electronic equipment and computer readable medium
CN109672608B (en) Method for transmitting messages according to time
CN115905863A (en) Machine learning model training method and quantum network equipment performance value prediction method
CN112380145A (en) SDK generation method, device, equipment and readable storage medium
CN113704117A (en) Algorithm testing system, method and device
CN112115039B (en) Test case generation method, device and equipment
CN116578462A (en) Alarm method, alarm device, electronic equipment and storage medium
CN112988776B (en) Method, device and equipment for updating text parsing rule and readable storage medium
CN115408535A (en) Accident knowledge graph construction method and device, storage medium and electronic equipment
CN111143294B (en) Data retrieval method and device for power acquisition terminal and electronic equipment
CN111736848A (en) Packet conflict positioning method and device, electronic equipment and readable storage medium
CN111935279A (en) Internet of things network maintenance method based on block chain and big data and computing node
CN112948341B (en) Method and apparatus for identifying anomalous network device logs
CN114756401B (en) Abnormal node detection method, device, equipment and medium based on log
CN115134265B (en) Real-time monitoring and early warning method, device and equipment for flow and storage medium
CN109063206B (en) Article monitoring method and device
CN117785625A (en) Method, device, equipment and storage medium for predicting server performance

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