CN111078512B - Alarm record generation method and device, alarm equipment and storage medium - Google Patents

Alarm record generation method and device, alarm equipment and storage medium Download PDF

Info

Publication number
CN111078512B
CN111078512B CN201911073229.7A CN201911073229A CN111078512B CN 111078512 B CN111078512 B CN 111078512B CN 201911073229 A CN201911073229 A CN 201911073229A CN 111078512 B CN111078512 B CN 111078512B
Authority
CN
China
Prior art keywords
alarm
data
rule
alarm rule
equipment data
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.)
Active
Application number
CN201911073229.7A
Other languages
Chinese (zh)
Other versions
CN111078512A (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.)
Shanghai Envision Innovation Intelligent Technology Co Ltd
Envision Digital International Pte Ltd
Original Assignee
Shanghai Envision Innovation Intelligent Technology Co Ltd
Envision Digital International Pte 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 Shanghai Envision Innovation Intelligent Technology Co Ltd, Envision Digital International Pte Ltd filed Critical Shanghai Envision Innovation Intelligent Technology Co Ltd
Priority to CN201911073229.7A priority Critical patent/CN111078512B/en
Publication of CN111078512A publication Critical patent/CN111078512A/en
Application granted granted Critical
Publication of CN111078512B publication Critical patent/CN111078512B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3466Performance evaluation by tracing or monitoring
    • G06F11/3476Data logging

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Alarm Systems (AREA)

Abstract

The embodiment of the application discloses an alarm record generation method, an alarm record generation device, alarm equipment and a storage medium, and belongs to the field of equipment alarms. The method comprises the following steps: acquiring device data uploaded by target devices; searching a target alarm rule matched with the equipment data in an alarm rule table, wherein the alarm rule in the alarm rule table adopts a JsonSchema structure; if a target alarm rule matched with the equipment data is found, checking the equipment data through a validter corresponding to the target alarm rule to obtain a checking result; and if the verification result indicates that the equipment data meets the target alarm rule, generating an alarm record, wherein the alarm record contains the equipment data. After the device data is matched with the alarm rule of the Json Schema structure, the device data can be directly checked in the validator, and the analysis step of the alarm rule can be omitted, so that the processing efficiency of the alarm device is improved.

Description

Alarm record generation method and device, alarm equipment and storage medium
Technical Field
The embodiment of the application relates to the field of equipment alarms, in particular to an alarm record generation method, an alarm record generation device, alarm equipment and a storage medium.
Background
With the popularization of internet of things (Internet of things, ioT) technology, abnormal data uploaded by intelligent devices are known in time, so that better management of the devices is facilitated.
At present, alarm equipment is generally adopted to analyze data uploaded by the equipment, an alarm rule list is stored in the alarm equipment in advance, when any data is uploaded, the data is matched with the alarm rule list, the alarm rule is analyzed after the data is matched with a corresponding alarm rule, the analyzed alarm rule and alarm execution action are converted into complex logic codes such as conditional sentences, the uploaded data points are analyzed according to the logic codes, and finally whether an alarm record is generated is judged.
In the related art, for each data, the process of generating the alarm record needs to go through the processes of rule matching, rule parsing, determining the processing flow and implementing verification, and the service logic is complex, so as to affect the processing efficiency of the alarm device.
Disclosure of Invention
The embodiment of the application provides an alarm record generation method, an alarm record generation device, alarm equipment and a storage medium. The technical scheme is as follows:
in one aspect, an embodiment of the present application provides a method for generating an alarm record, where the method includes:
Acquiring device data uploaded by target devices;
searching a target alarm rule matched with the equipment data in an alarm rule table, wherein the alarm rule in the alarm rule table adopts a JS object numbered musical notation (JavaScript Object Notation Schema, json Schema) structure;
if the target alarm rule matched with the equipment data is found, checking the equipment data through a verifier (verifier) corresponding to the target alarm rule to obtain a checking result;
and if the verification result indicates that the equipment data meets the target alarm rule, generating an alarm record, wherein the alarm record comprises the equipment data.
In another aspect, an embodiment of the present application provides an alarm record generating apparatus, including:
the acquisition module is used for acquiring the device data uploaded by the target device;
the searching module is used for searching a target alarm rule matched with the equipment data in an alarm rule table, and the alarm rule in the alarm rule table adopts a Json Schema structure;
the verification module is used for verifying the equipment data through a validder corresponding to the target alarm rule if the target alarm rule matched with the equipment data is found out, so that a verification result is obtained;
And the alarm module is used for generating an alarm record if the verification result indicates that the equipment data meets the target alarm rule, wherein the alarm record comprises the equipment data.
In another aspect, an embodiment of the present application provides an alarm device, where the alarm device includes a processor and a memory, where at least one instruction, at least one section of program, a code set, or an instruction set is stored in the memory, where the at least one instruction, the at least one section of program, the code set, or the instruction set is loaded and executed by the processor to implement the alarm record generating method according to the above aspect.
In another aspect, a computer readable storage medium having stored therein at least one instruction, at least one program, a set of codes, or a set of instructions loaded and executed by a processor to implement the alert record generating method as described in the above aspect is provided.
In another aspect, there is also provided a computer program product storing at least one instruction that is loaded and executed by a processor to implement the alert record generating method of the above aspect.
By adopting the alarm record generation method provided by the embodiment of the application, after the alarm device acquires the device data uploaded by the target device, namely, the target alarm rule matched with the device data is searched in the alarm rule table, and because the alarm rules in the alarm rule table all adopt a Json Schema structure, if the target alarm rule matched with the device data is searched, the device data can be directly checked through the corresponding valve of the target alarm rule to obtain a check result, and the alarm record is generated when the check result indicates that the device data meets the target alarm rule. When the equipment data is matched with the alarm rule, the alarm rule can be directly checked in the validator, analysis of the alarm rule is not needed, and the alarm rule and the execution action are not needed to be converted into complex logic codes such as conditional sentences, so that a series of complex business logics can be avoided, and the processing efficiency of the alarm equipment is improved.
Drawings
FIG. 1 illustrates a schematic diagram of an implementation environment provided by an exemplary embodiment of the present application;
FIG. 2 illustrates a flow chart of an alarm record generation method according to an exemplary embodiment of the present application;
FIG. 3 illustrates a flow chart of an alarm record generation method according to another exemplary embodiment of the present application;
FIG. 4 illustrates an implementation diagram of an alarm record generation method according to an exemplary embodiment of the present application;
FIG. 5 is a block diagram illustrating a configuration of an alarm record generating apparatus according to an exemplary embodiment of the present application;
fig. 6 is a schematic structural view of an alarm device according to an exemplary embodiment of the present application.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present application more apparent, the embodiments of the present application will be described in further detail with reference to the accompanying drawings.
References herein to "a plurality" means two or more. "and/or", describes an association relationship of an association object, and indicates that there may be three relationships, for example, a and/or B, and may indicate: a exists alone, A and B exist together, and B exists alone. The character "/" generally indicates that the context-dependent object is an "or" relationship.
In the related art, the generation of the alarm record needs to sequentially go through the steps of rule matching, rule analysis, determining a processing flow, analyzing and uploading data, generating the alarm record and the like.
For example, the data uploaded by the device is "temperature,2", and firstly, according to the attribute of the data, namely, the data is data related to the temperature of the device, an alarm rule "temperature, > = 1and < = 10" matched with the attribute is searched in a list of stored alarm rules; because the alarm rule cannot be directly used for processing data, the alarm rule should be analyzed, that is, the meaning of the interval represented by "> =1 and < =10" is analyzed, and a processing flow is determined according to the type of the analyzed interval, wherein the processing flow is a conditional statement code combined by the analyzed alarm rule and the verification action, and further, the data "2" is analyzed according to the processing flow, that is, the data "2" meets the alarm rule, and then an alarm record is generated.
Obviously, by adopting the method for generating the alarm record provided by the related technology, after each piece of uploaded data is matched with the corresponding alarm rule, the alarm rule is required to be analyzed, and the interval type of the alarm rule is acquired, so that the corresponding processing flow is determined according to the interval type, the uploaded data is analyzed through the processing flow, the business logic is complex, and the processing efficiency of alarm equipment is affected; in addition, for data that does not match the alert rule, a corresponding process flow cannot be provided, resulting in failure to analyze the uploaded data.
In order to solve the above problems, an embodiment of the present application provides an alarm record generation method. Referring to FIG. 1, a schematic diagram of an implementation environment provided by an exemplary embodiment of the present application is shown. The implementation environment comprises an acquisition device 101, an alarm device 102 and an inquiry terminal 103.
The collection device 101 is a device with a data collection function, and the collected device data is time sequence data of an equal time interval, and may be new energy devices provided with sensors such as a wind speed detector, a temperature and humidity detector, a photovoltaic sensor and the like, such as a wind driven generator and a photovoltaic panel.
The acquisition device 101 is connected with the alarm device 102 through a wired or wireless network.
The alarm device 102 is a computer device having functions of storing data acquired by the acquisition device 101, processing the data, generating an alarm record, and the like, and may be a server, a server cluster formed by a plurality of servers, or a cloud server. Optionally, after acquiring the device data sent by the acquisition device 101, the alarm device 102 processes the device data to generate an alarm record, and sends the alarm record to the query terminal 103; alternatively, when the alarm device receives the query instruction, the alarm record may be sent to the query terminal 103 according to the query condition. In the embodiment of the present application, the alarm device 102 further stores alarm rules with several Json Schema structures.
Because the alarm rule of the Json Schema structure has check logic, the data check can be directly performed. In a possible implementation manner, after the alarm device 102 obtains the device data sent by the acquisition device 101, if an alarm rule matched with the device data is found in the alarm rule table, the device data is directly checked by a validder corresponding to the alarm rule to obtain a check result, and if the check result indicates that the device data meets the alarm rule, an alarm record is generated. The analyzing alarm rules and the process of determining the processing flow in the related technology are omitted, and the processing efficiency of the alarm equipment can be improved.
The inquiry terminal 103 is a device having a data inquiry function. In one possible application scenario, the query terminal 103 sends a query instruction including a query condition to the alert device 102, and the alert device 102 queries a corresponding alert record according to the query condition and feeds back the alert record to the query terminal 103, where the query terminal 103 may display the received alert record in a chart form. The query terminal 103 may be a personal computer, a smart phone, a tablet computer, etc., as shown in fig. 1, and the query terminal 103 is a personal computer.
Referring to fig. 2, a flowchart of an alarm record generation method according to an exemplary embodiment of the present application is shown. The embodiment takes the alarm record generation method for an alarm device as an example for explanation, and the method comprises the following steps:
step 201, obtaining device data uploaded by a target device.
The target device refers to a device connected with the alarm device, and the target device can be connected with the alarm device through a wired network or a wireless network. The target device is provided with a sensor for acquiring data, such as a temperature detector, for acquiring data of an index of the temperature of the target device. The time interval between the optional acquisition of adjacent two device data is the same.
In one possible implementation manner, the sensor arranged on the target device collects device data in real time and sends the device data to the alarm device in real time, and the alarm device obtains the device data uploaded by the target device. The device data should include at least a numerical value and a data type, for example, "temperature,2", where "temperature" represents a data type, i.e., a temperature, and "2" means a temperature value of 2.
Optionally, the device data may also include a device number and a device data acquisition time.
Step 202, searching a target alarm rule matched with the equipment data in an alarm rule table, wherein the alarm rule in the alarm rule table adopts a Json Schema structure.
In one possible implementation, since the alarm rules in the alarm rule table are updated, in order to improve alarm accuracy, the alarm device acquires the latest alarm rule table at predetermined time intervals. For example, the alarm device acquires the latest alarm rule table every 30 minutes.
The alarm device may store a plurality of alarm rule lists, each alarm rule list stores a plurality of alarm rules, and the plurality of alarm rules all adopt a Json Schema structure. Illustratively, the alert rule "temperature, > = 1and < = 10" is defined using the Json Schema structural specification as follows:
"temperature": {// temperature "Type": number,// type: numerical value
"maximum": "10",// maximum: 10
"minimum": "1"// minimum: 1.
}”。
the above example is only a part of the alarm rule, unlike the alarm rule storage form in the related art, in this embodiment, the alarm rule is described by adopting the Json Schema structure, and the machine can directly read the alarm rule of the Json Schema structure, so that the analysis step of the alarm rule is omitted.
Alternatively, the alert rule may be a user-defined alert rule. For example, on a user interface of the alert device, the user may input alert rules associated with the target device in advance.
In one possible implementation, after the alarm device acquires the device data, the alarm rule table searches for a target alarm rule according to the data type of the device data, for example, if the data type is "temperature", and then searches for an alarm rule about temperature.
And 203, if a target alarm rule matched with the equipment data is found, checking the equipment data through a validder corresponding to the target alarm rule to obtain a checking result.
In a possible implementation manner, since the alarm rule of the Json Schema structure is provided with the verification logic, the verification logic can be directly used for data verification, and therefore after the device data is matched with the target alarm rule, the verification is directly performed on the device data through the validator corresponding to the target alarm rule, so that a verification result is obtained. And if the verification code of the Json Schema structure is stored in the validzer, the validzer verifies the device data according to the verification code and the alarm rule.
And 204, if the verification result indicates that the equipment data meets the target alarm rule, generating an alarm record, wherein the alarm record contains the equipment data.
In one possible implementation, when the verification result is "true", which indicates that the device data meets the target alarm rule, an alarm record is generated. The alarm record may include device data for a user to query, and analyze the cause of the abnormal data generated by the target device using the device data. Optionally, the alarm record may also include the uploading time of the device data.
It should be noted that, the generated alarm record may also be stored in the alarm device, and an alarm record table for storing the alarm record may be specially set for the user to check.
In summary, in the embodiment of the present application, after the alarm device obtains the device data uploaded by the target device, the alarm rule table searches for the target alarm rule matched with the device data, and because the alarm rules in the alarm rule table all adopt the Json Schema structure, if the target alarm rule matched with the device data is found, the device data can be directly checked by the validator corresponding to the target alarm rule, so as to obtain a check result, and when the check result indicates that the device data meets the target alarm rule, an alarm record is generated. When the equipment data is matched with the alarm rule, the alarm rule can be directly checked in the validator, analysis of the alarm rule is not needed, and the alarm rule and the execution action are not needed to be converted into complex logic codes such as conditional sentences, so that a series of complex business logics can be avoided, and the processing efficiency of the alarm equipment is improved.
In the above embodiment, for the device data uploaded by the device, the alarm device needs to find the target alarm rule matched with the device data in the alarm rule table, so that the subsequent verification process can be performed, and further the alarm record is generated. Because the alarm rule table is stored in the alarm device in advance, the alarm rules stored in the alarm rule table cannot be completely matched with all the uploaded device data, and for the device data which is not matched with the alarm rules, a corresponding verification process may not be performed, so that the alarm function of the device data cannot be realized.
Referring to fig. 3, a flowchart of an alarm record generation method according to another exemplary embodiment of the present application is shown. The embodiment takes the alarm record generation method for an alarm device as an example for explanation, and the method comprises the following steps:
step 301, obtaining device data uploaded by a target device.
Step 302, searching a target alarm rule matched with the equipment data in an alarm rule table, wherein the alarm rule in the alarm rule table adopts a Json Schema structure.
The implementation of step 301 and step 302 may refer to step 201 and step 202, and this embodiment is not described herein.
And 303, if the target alarm rule matched with the equipment data is not found, storing the equipment data in an alarm rule database table, wherein the alarm rule database table is used for storing the data which is not matched with the alarm rule.
In one possible implementation, after the alarm device acquires the device data, the device data cannot enter the verifier to perform verification according to the type of the device data and the target alarm rule is not found in the alarm rule table, where the device data may be stored in an alarm rule database table, and the alarm rule database table is specially used for storing data that is not matched with the alarm rule.
Alternatively, the alert rule database table may be stored in the alert device in the form of a file. The user can input the query instruction to the alarm rule database table at the query terminal, and after the alarm device receives the query instruction, the alarm rule database table can be fed back to the query terminal, and the user can open the alarm rule database table at the query terminal interface for viewing.
Illustratively, the alarm rule database table can store equipment data according to the sequence of acquisition time, and can also store the same type of equipment data in the same alarm rule database table; the alarm rule database table may include acquisition time of device data, device identification (number of target device) and numerical value, and the storage form of the device data in the alarm rule database table may be as shown in table one:
list one
Numbering device Acquisition time Device identification Temperature (temperature)
0 2019-08-10T00:00:00 x001 40
1 2019-08-10T00:10:00 x001 40
2 2019-08-10T00:20:00 x001 41.5
3 2019-08-10T00:30:00 x001 45
4 2019-08-10T00:40:00 x001 41
200 2019-08-11T11:20:00 x001 46.5
And 304, when the data volume of the equipment data in the alarm rule database table reaches a data volume threshold, generating a candidate alarm rule according to the equipment data, wherein the candidate alarm rule adopts a Json Schema structure.
The data quantity threshold value refers to that the data quantity of equipment data (of the same data type) in the alarm rule database table is enough to be used for generating candidate alarm rules, and when the data quantity threshold value is lower than the data quantity threshold value, the generated candidate alarm rules possibly have great deviation from actual demands and have no reference value. The number threshold may be set by the user on his own as desired. For example, when the number threshold is 500 and the alarm device detects that the data size of the device data in the alarm rule database table reaches 500, candidate alarm rules are generated according to the device data, and the candidate alarm rules still adopt a Json Schema structure.
Because the alarm rule is mainly aimed at abnormal device data, and the device data which is not matched with the target alarm rule does not only comprise the abnormal device data, in order to ensure the rationality of the generated candidate alarm rule, the device data which is not matched with the target alarm rule needs to be classified so as to distinguish normal device data from abnormal device data, and then the candidate alarm rule can be generated according to the abnormal device data.
In one possible implementation, step 304 may include the following steps.
1. A data classifier is trained from the device data, the data classifier for distinguishing between normal device data and abnormal device data, wherein an algorithm employed to train the data classifier comprises at least one of a random forest or a gradient enhanced decision tree (Gradient Boosting Decision Tree, GBDT).
In one possible implementation, a data classifier may be provided in the alert device, which is trained with device data and may be used to distinguish between normal device data and abnormal device data. The algorithm used for training the data classifier can be a random forest or GBDT. Of course, the user can select a proper classification algorithm according to the actual requirement, and the algorithm used by the data classifier in this embodiment is not limited enough.
2. And inputting the equipment data into a data classifier to obtain abnormal equipment data output by the data classifier.
Illustratively, a device data set is a= {40, 41, 40.5, 40.6, 46, 41.3, 40.8, 45.6, 44.9}, and an abnormal device data set is r= {46, 45.6, 44.9}, which is obtained by inputting the device data into the data classifier.
3. And generating candidate alarm rules according to the abnormal equipment data.
In one possible implementation manner, when the alarm device classifies the input device data through the data classifier, abnormal device data is obtained, so that an alarm interval is determined according to the abnormal device data, and a candidate alarm rule is generated according to the alarm interval and the data type.
Illustratively, the abnormal device data set may be r= {46, 45.6, 44.9}, and the alert interval may be ". Gtoreq.44.9", and further generate candidate alert rules according to the alert interval and the data type, for example,
"temperature": {// temperature
"Type": number,// type: numerical value
"minimum": "44.9"// min: 44.9
}”。
Alternatively, the candidate alarm rule may be continuously trained according to the subsequently uploaded unmatched device data, and the candidate alarm rule may be better improved and optimized, so that the candidate alarm rule has a more practical reference value.
Step 305, storing the candidate alert rules to an alert rule table.
In one possible implementation, after the alert device generates candidate alert rules from the device data, the candidate alert rules are automatically stored in the alert rule table so that device data acquired by subsequent alert devices may be matched to the candidate alert rules.
Alternatively, the candidate alert rules may be stored in a special alert rule table to distinguish from the original alert rules; different labels may also be used to distinguish candidate alert rules from original alert rules, such as prefixing the candidate alert rules with a "pre". Of course, the user can set the distinguishing mark by himself according to the actual application.
And 306, if a target alarm rule matched with the equipment data is found, checking the equipment data through a validder corresponding to the target alarm rule to obtain a checking result.
In one possible implementation, the alert rule table stores basic alert rules and candidate alert rules. Wherein, the basic alarm rule is set manually. For example, the user inputs the basic alarm rule through the user interface, and the alarm device receives the input instruction and stores the input basic alarm rule into the alarm rule table. The candidate alarm rules are generated by the alarm device according to device data training which is not matched with the alarm rules.
Optionally, when the candidate alarm rule meets the actual alarm requirement, the user may set the candidate alarm rule, and after the alarm device receives a setting instruction for the candidate alarm rule in the alarm rule list, the candidate alarm rule may be set as a basic alarm rule according to the setting instruction.
Schematically, after the alarm device acquires the device data, a target alarm rule matched with the device data is searched in an alarm rule table, the device data may be matched with a basic alarm rule or a candidate alarm rule, and as long as the device data matched with the alarm rule enter a corresponding validator to check the device data, so as to obtain a check result.
And step 307, if the checking result indicates that the device data does not meet the target alarm rule, the device data is cleared.
Because the alarm device mainly focuses on abnormal device data, when the verification result shows that the device data does not meet the alarm rule, namely, the device data is normal device data, the device data can be cleared, namely, the device data which does not meet the alarm rule cannot be stored in the alarm device, and normal records similar to the alarm records cannot be generated according to the device data.
And 308, if the verification result indicates that the equipment data meets the basic alarm rule, generating a basic alarm record and carrying out alarm reminding.
In one possible implementation manner, if the target alarm rule matched with the device data is a basic alarm rule, a basic alarm record is generated, and the basic alarm record is stored in the alarm device, wherein the basic alarm record contains the device data and can also contain the uploading time of the device data. Because the basic alarm rule accords with the actual alarm requirement, the basic alarm record is generated according to the basic alarm rule, and the alarm reminding is carried out at the same time, so that a user can know the abnormal condition of the equipment in time. The alarm device may perform alarm reminding by sending alarm information to a preset alarm terminal, which is not limited in this embodiment.
Optionally, for two adjacent device data (the same data type), the two adjacent device data are respectively denoted as A1 and A2 according to the sequence of the uploading time, if A1 meets the basic alarm rule, a basic alarm record is generated, and an alarm prompt is carried out, and in the time period of carrying out the alarm prompt, A2 does not meet the basic alarm rule, namely, the A2 bit normal data, the alarm prompt can be stopped, and the device data uploaded by the target device at the moment is denoted as normal data.
Step 309, if the verification result indicates that the device data meets the candidate alarm rule, generating a candidate alarm record, where storage locations of the basic alarm record and the candidate alarm record are different, or the basic alarm record and the candidate alarm record correspond to different marks.
In one possible implementation, if the target alert rule that matches the device data is a candidate alert rule, a candidate alert record is generated and stored in the alert device. Wherein the candidate alert record is similar to the base alert record and may also contain device data. And the storage location of the candidate alert record may be different from the base alert record so that the user can distinguish between the candidate alert record and the base alert record when querying.
Alternatively, different flags may be used in storing the candidate alert record and the base alert record. For example, different colors may be used for differentiation, or different prefixes may be used.
Because the candidate alarm records are only used as reference objects of users, the accuracy of the candidate alarm records cannot be determined, in order to avoid false alarm reminding, when the candidate alarm records are generated, the candidate alarm records are only required to be stored in corresponding positions so as to be convenient for the users to refer to, and alarm reminding is not required.
And step 310, deleting the repeated alarm records if the equipment data contained in the adjacent alarm records are the same, wherein the uploading moments of the equipment data corresponding to the adjacent alarm records are adjacent.
In a possible implementation manner, the device data acquired by the alarm device may have repeated data, for the repeated device data adjacent to the uploading time, adjacent alarm records generated according to the device data are basically the same except for the time difference, so that the repeated alarm records have no reference value, and therefore, the alarm device can delete one alarm record and avoid the storage space waste caused by the repeated alarm records.
For example, the uploaded two adjacent device data are respectively 'T00:10:50, temperature, 40.0' and 'T00:10:51, temperature and 40.0', the uploading time of the two device data is adjacent, the data types and the number are the same, the alarm records generated according to the device data can be respectively 'A1, T00:10:50, temperature, 40.0' and 'A2, T00:10:51, temperature and 40.0', the two alarm records only have time differences, the time interval is short, so that repeated alarm records have no reference value, and therefore, one alarm record can be alternatively deleted, for example, only one alarm record corresponding to A1 is stored, and the alarm record corresponding to A2 is deleted.
In the embodiment of the application, the candidate alarm rule is generated by collecting and training the equipment data which is not matched with the target alarm rule, so that the equipment data which is uploaded subsequently can be matched with the corresponding alarm rule, and the candidate alarm record can be generated for reference by a user. And the device data is classified by utilizing a data classifier, abnormal device data in the device data is distinguished, and then a candidate alarm rule is generated according to the abnormal device data, so that the candidate alarm rule is more reasonable, and the generated candidate alarm record has more reference value. In addition, when the candidate alarm rule meets the actual alarm requirement, the candidate alarm rule can be converted into a basic alarm rule so as to carry out alarm reminding.
Referring to fig. 4, a schematic diagram of an implementation of the alarm record generation method according to an exemplary embodiment of the present application is shown.
In a possible implementation manner, when the device 401 uploads the device data to the alarm device 402, the alarm device 402 periodically acquires the latest alarm rule table 403 of the Json schema structure, searches the alarm rule table 403 of the Json schema structure for an alarm rule matched with the device data, and if the alarm rule matched with the device data is found, directly enters the validter 405 corresponding to the alarm rule for verification, and generates an alarm record according to the verification result. If the verification result indicates that the device data meets the alarm rule, a current alarm record 406 is generated, and if the alarm rule is not met, that is, the device data is normal device data, the device data is cleared. Optionally, for two adjacent device data of the same data type, the current device data accords with the alarm rule, and in the process of carrying out alarm reminding, if the latter device data is normal device data, stopping alarm reminding. Optionally, if the uploading time of the device data is adjacent and the generated adjacent alarm records contain the same device data, deleting one repeated alarm record.
Illustratively, if no alert rule matching with the device data is found, the device data is stored in the alert rule database table 404, and candidate alert rules may be generated by training the data and stored in the alert rule table 403 of the Json schema structure, so as to implement an alert function for such device data.
Referring to fig. 5, a block diagram of an alarm record generating apparatus according to an exemplary embodiment of the present application is shown. The device comprises:
an obtaining module 510, configured to obtain device data uploaded by a target device;
the searching module 520 is configured to search a target alarm rule matching with the device data in an alarm rule table, where the alarm rule in the alarm rule table adopts a Json Schema structure;
the verification module 530 is configured to, if the target alarm rule matching with the device data is found, verify the device data through a validder corresponding to the target alarm rule, to obtain a verification result;
and an alarm module 540, configured to generate an alarm record if the verification result indicates that the device data meets the target alarm rule, where the alarm record includes the device data.
Optionally, the apparatus further includes:
the first storing module is used for storing the equipment data in an alarm rule database table if the target alarm rule matched with the equipment data is not found, and the alarm rule database table is used for storing data which is not matched with the alarm rule;
the generation module is used for generating candidate alarm rules according to the equipment data when the data volume of the equipment data in the alarm rule database table reaches a data volume threshold, wherein the candidate alarm rules adopt a Json Schema structure;
and the second storing module is used for storing the candidate alarm rule into the alarm rule table.
Optionally, the generating module includes:
the training unit is used for training a data classifier according to the equipment data, and the data classifier is used for distinguishing normal equipment data from abnormal equipment data, wherein an algorithm adopted for training the data classifier comprises at least one of random forests or GBDT;
the input unit is used for inputting the equipment data into the data classifier to obtain the abnormal equipment data output by the data classifier;
and the generating unit is used for generating the candidate alarm rule according to the abnormal equipment data.
Optionally, the alarm rule table includes a basic alarm rule and the candidate alarm rule, where the basic alarm rule is set manually;
optionally, the alarm module includes:
the first alarm unit is used for generating a basic alarm record and carrying out alarm reminding if the verification result indicates that the equipment data meets the basic alarm rule;
and the second alarm unit is used for generating a candidate alarm record if the verification result indicates that the equipment data meets the candidate alarm rule, wherein the storage positions of the basic alarm record and the candidate alarm record are different, or the basic alarm record and the candidate alarm record correspond to different marks.
Optionally, the apparatus further includes:
the receiving module is used for receiving a setting instruction of the candidate alarm rule in the alarm rule table;
and the setting module is used for setting the candidate alarm rule as the basic alarm rule according to the setting instruction.
Optionally, the apparatus further includes:
and the deleting module is used for deleting the repeated alarm records if the equipment data contained in the adjacent alarm records are the same, and the uploading moments of the equipment data corresponding to the adjacent alarm records are adjacent.
Optionally, the apparatus further includes:
and the clearing module is used for clearing the equipment data if the checking result indicates that the equipment data does not meet the target alarm rule.
In summary, in the embodiment of the present application, after the alarm device obtains the device data uploaded by the target device, the alarm device searches the target alarm rule matching with the device data in the alarm rule table, and because the alarm rules in the alarm rule table all adopt the Json Schema structure, if the target alarm rule matching with the device data is found, the device data can be directly checked by the corresponding valve of the target alarm rule, so as to obtain a check result, and when the check result indicates that the device data meets the target alarm rule, the alarm record is generated. When the equipment data is matched with the alarm rule, the alarm rule can be directly checked in the validator, analysis of the alarm rule is not needed, and the alarm rule and the execution action are not needed to be converted into complex logic codes such as conditional sentences, so that a series of complex business logics can be avoided, and the processing efficiency of the alarm equipment is improved.
It should be noted that: in the alarm record generating device provided in the above embodiment, only the division of the above functional modules is used as an example, and in practical application, the above functional allocation may be performed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules, so as to perform all or part of the functions described above. In addition, the alarm record generating device and the alarm record generating method provided in the foregoing embodiments belong to the same concept, and specific implementation processes thereof are detailed in the method embodiments, which are not repeated herein.
Referring to fig. 6, a schematic structural diagram of an alarm device according to an exemplary embodiment of the present application is shown. The alarm device 600 includes a Central Processing Unit (CPU) 601, a system memory 604 including a Random Access Memory (RAM) 602 and a Read Only Memory (ROM) 603, and a system bus 605 connecting the system memory 604 and the central processing unit 601. The alert device 600 also includes a basic input/output system (I/O system) 606 that facilitates the transfer of information between the various devices within the alert device, and a mass storage device 607 for storing an operating system 613, application programs 614, and other program modules 615.
The basic input/output system 606 includes a display 608 for displaying information and an input device 609, such as a mouse, keyboard, etc., for a user to input information. Wherein the display 608 and the input device 609 are connected to the central processing unit 601 through an input output controller 610 connected to the system bus 605. The basic input/output system 606 may also include an input/output controller 610 for receiving and processing input from a number of other devices, such as a keyboard, mouse, or electronic stylus. Similarly, the input output controller 610 also provides output to a display screen, a printer, or other type of output device.
The mass storage device 607 is connected to the central processing unit 601 through a mass storage controller (not shown) connected to the system bus 605. The mass storage device 607 and its associated computer-readable storage medium provide non-volatile storage for the alert device 600. That is, the mass storage device 607 may include a computer readable storage medium (not shown) such as a hard disk or CD-ROI drive.
The computer-readable storage medium may include computer storage media and communication media without loss of generality. Computer storage media includes volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable storage instructions, data structures, program modules or other data. Computer storage media includes RAM, ROM, EPROM, EEPROM, flash memory or other solid state memory technology, CD-ROM, DVD or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices. Of course, those skilled in the art will recognize that the computer storage medium is not limited to the one described above. The system memory 604 and mass storage device 607 described above may be collectively referred to as memory.
The memory stores one or more programs configured to be executed by the one or more central processing units 601, the one or more programs containing instructions for implementing the methods described above, the central processing unit 601 executing the one or more programs to implement the methods provided by the various method embodiments described above.
The alert device 600 may also operate through a network, such as the internet, connected to a remote server on the network, according to various embodiments of the present application. I.e. the alarm device 600 may be connected to the network 612 via a network interface unit 611 connected to the system bus 605, or alternatively, the network interface unit 611 may be used to connect to other types of networks or remote server systems (not shown).
The memory also includes one or more programs stored in the memory, the one or more programs including steps for performing the method provided by the embodiments of the present application, as performed by the alert device.
Embodiments of the present application also provide a computer readable medium storing at least one instruction that is loaded and executed by the processor to implement the alert record generating method according to the above embodiments.
Embodiments of the present application also provide a computer program product storing at least one instruction that is loaded and executed by the processor to implement the alert record generating method as described in the above embodiments.
Those skilled in the art will appreciate that in one or more of the examples described above, the functions described in the embodiments of the present application may be implemented in hardware, software, firmware, or any combination thereof. When implemented in software, these functions may be stored on or transmitted over as one or more instructions or code on a computer-readable medium. Computer-readable media includes both computer storage media and communication media including any medium that facilitates transfer of a computer program from one place to another. A storage media may be any available media that can be accessed by a general purpose or special purpose computer.
The foregoing description of the preferred embodiments of the present application is not intended to limit the application, but rather, the application is to be construed as limited to the appended claims.

Claims (12)

1. A method of generating an alarm record, the method comprising:
acquiring device data uploaded by target devices;
searching a target alarm rule matched with the equipment data in an alarm rule table, wherein the alarm rule in the alarm rule table adopts a JS object numbered musical notation Schema Json Schema structure;
if the target alarm rule matched with the equipment data is found, checking the equipment data through a checker corresponding to the target alarm rule to obtain a checking result;
if the verification result indicates that the equipment data meets the target alarm rule, generating an alarm record, wherein the alarm record contains the equipment data;
if the target alarm rule matched with the equipment data is not found, storing the equipment data in an alarm rule database table, wherein the alarm rule database table is used for storing data which is not matched with the alarm rule;
when the data volume of the equipment data in the alarm rule database table reaches a data volume threshold, generating a candidate alarm rule according to the equipment data, wherein the candidate alarm rule adopts a Json Schema structure; wherein generating candidate alert rules from the device data comprises training a data classifier from the device data, the data classifier being configured to distinguish between normal device data and abnormal device data, wherein an adopted algorithm for training the data classifier comprises at least one of a random forest or a gradient enhanced decision tree GBDT; inputting the equipment data into the data classifier to obtain the abnormal equipment data output by the data classifier; generating the candidate alarm rule according to the abnormal equipment data;
And storing the candidate alarm rule into the alarm rule table.
2. The method of claim 1, wherein the alert rule table includes basic alert rules and the candidate alert rules, the basic alert rules being manually set;
and if the verification result indicates that the equipment data meets the target alarm rule, generating an alarm record, wherein the alarm record comprises the following steps:
if the verification result indicates that the equipment data meets the basic alarm rule, generating a basic alarm record and carrying out alarm reminding;
and if the verification result indicates that the equipment data meets the candidate alarm rule, generating a candidate alarm record, wherein the storage positions of the basic alarm record and the candidate alarm record are different, or the basic alarm record and the candidate alarm record correspond to different marks.
3. The method according to claim 2, wherein the method further comprises:
receiving a setting instruction of the candidate alarm rule in the alarm rule table;
and setting the candidate alarm rule as the basic alarm rule according to the setting instruction.
4. A method according to any one of claims 1 to 3, wherein, after generating an alert record if the verification result indicates that the device data meets the target alert rule, the method further comprises:
And if the equipment data contained in the adjacent alarm records are the same, deleting the repeated alarm records, wherein the uploading moments of the equipment data corresponding to the adjacent alarm records are adjacent.
5. A method according to any one of claims 1 to 3, wherein after the verifying the device data by using the validzer corresponding to the target alarm rule, the method further includes:
and if the verification result indicates that the equipment data does not meet the target alarm rule, the equipment data is cleared.
6. An alarm record generation apparatus, the apparatus comprising:
the acquisition module is used for acquiring the device data uploaded by the target device;
the searching module is used for searching a target alarm rule matched with the equipment data in an alarm rule table, and the alarm rule in the alarm rule table adopts a Json Schema structure;
the verification module is used for verifying the equipment data through a validder corresponding to the target alarm rule if the target alarm rule matched with the equipment data is found out, so that a verification result is obtained;
the alarm module is used for generating an alarm record if the verification result indicates that the equipment data meets the target alarm rule, wherein the alarm record comprises the equipment data;
The first storing module is used for storing the equipment data in an alarm rule database table if the target alarm rule matched with the equipment data is not found, and the alarm rule database table is used for storing data which is not matched with the alarm rule;
the generation module is used for generating candidate alarm rules according to the equipment data when the data volume of the equipment data in the alarm rule database table reaches a data volume threshold, wherein the candidate alarm rules adopt a Json Schema structure, and the generation module comprises a training unit, an input unit and a generation unit; the training unit is used for training a data classifier according to the equipment data, and the data classifier is used for distinguishing normal equipment data from abnormal equipment data, wherein an algorithm adopted for training the data classifier comprises at least one of random forest or GBDT; the input unit is used for inputting the equipment data into the data classifier to obtain the abnormal equipment data output by the data classifier; the generating unit is used for generating the candidate alarm rule according to the abnormal equipment data;
and the second storing module is used for storing the candidate alarm rule into the alarm rule table.
7. The apparatus of claim 6, wherein the alert rule table includes basic alert rules and the candidate alert rules, the basic alert rules being manually set;
the alarm module comprises:
the first alarm unit is used for generating a basic alarm record and carrying out alarm reminding if the verification result indicates that the equipment data meets the basic alarm rule;
and the second alarm unit is used for generating a candidate alarm record if the verification result indicates that the equipment data meets the candidate alarm rule, wherein the storage positions of the basic alarm record and the candidate alarm record are different, or the basic alarm record and the candidate alarm record correspond to different marks.
8. The apparatus of claim 7, wherein the apparatus further comprises:
the receiving module is used for receiving a setting instruction of the candidate alarm rule in the alarm rule table;
and the setting module is used for setting the candidate alarm rule as the basic alarm rule according to the setting instruction.
9. The apparatus according to any one of claims 6 to 8, further comprising:
And the deleting module is used for deleting the repeated alarm records if the equipment data contained in the adjacent alarm records are the same, and the uploading moments of the equipment data corresponding to the adjacent alarm records are adjacent.
10. The apparatus according to any one of claims 6 to 8, further comprising:
and the clearing module is used for clearing the equipment data if the checking result indicates that the equipment data does not meet the target alarm rule.
11. An alert device comprising a processor and a memory having stored therein at least one instruction, at least one program, code set or instruction set, the at least one instruction, the at least one program, code set or instruction set being loaded and executed by the processor to implement the alert record generation method of any of claims 1 to 5.
12. A computer readable storage medium having stored therein at least one instruction, at least one program, a set of codes, or a set of instructions, the at least one instruction, the at least one program, the set of codes, or the set of instructions being loaded and executed by a processor to implement the alert record generation method of any one of claims 1 to 5.
CN201911073229.7A 2019-11-05 2019-11-05 Alarm record generation method and device, alarm equipment and storage medium Active CN111078512B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911073229.7A CN111078512B (en) 2019-11-05 2019-11-05 Alarm record generation method and device, alarm equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911073229.7A CN111078512B (en) 2019-11-05 2019-11-05 Alarm record generation method and device, alarm equipment and storage medium

Publications (2)

Publication Number Publication Date
CN111078512A CN111078512A (en) 2020-04-28
CN111078512B true CN111078512B (en) 2023-09-12

Family

ID=70310690

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911073229.7A Active CN111078512B (en) 2019-11-05 2019-11-05 Alarm record generation method and device, alarm equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111078512B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111782486B (en) * 2020-07-03 2024-04-16 上海浦东发展银行股份有限公司 Alarm realization method and system based on dynamic configuration
CN112182367A (en) * 2020-09-18 2021-01-05 佳都新太科技股份有限公司 Management and control alarm method and device
US11824639B2 (en) * 2021-02-25 2023-11-21 Insight Direct Usa, Inc. Dynamic IoT rule and alert templating engine
CN114915542A (en) * 2022-04-28 2022-08-16 远景智能国际私人投资有限公司 Data abnormity warning method, device, equipment and storage medium

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106951231A (en) * 2017-02-23 2017-07-14 微梦创科网络科技(中国)有限公司 A kind of computer software development approach and device
CN107347048A (en) * 2016-05-04 2017-11-14 北京京东尚科信息技术有限公司 The method, apparatus and system of data check
EP3258426A1 (en) * 2016-06-17 2017-12-20 Business Objects Software Ltd. Automatic condition monitoring and anomaly detection for predictive maintenance
CN108153663A (en) * 2016-12-02 2018-06-12 阿里巴巴集团控股有限公司 Page data processing method and device
CN108959034A (en) * 2018-07-05 2018-12-07 北京木瓜移动科技股份有限公司 A kind of monitoring alarm method, device, electronic equipment and storage medium
CN110096296A (en) * 2019-05-10 2019-08-06 广州品唯软件有限公司 A kind of caching control methods and equipment
CN110148285A (en) * 2019-05-15 2019-08-20 东营汉威石油技术开发有限公司 A kind of oilwell parameter intelligent early-warning system and its method for early warning based on big data technology
CN110233842A (en) * 2019-06-10 2019-09-13 腾讯科技(深圳)有限公司 A kind of method of calibration and relevant apparatus of request
CN110399400A (en) * 2018-10-31 2019-11-01 腾讯科技(深圳)有限公司 Detect method, apparatus, equipment and the medium of abnormal data

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8341212B2 (en) * 2008-10-30 2012-12-25 International Business Machines Corporation Service description refinement based on actual service use

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107347048A (en) * 2016-05-04 2017-11-14 北京京东尚科信息技术有限公司 The method, apparatus and system of data check
EP3258426A1 (en) * 2016-06-17 2017-12-20 Business Objects Software Ltd. Automatic condition monitoring and anomaly detection for predictive maintenance
CN108153663A (en) * 2016-12-02 2018-06-12 阿里巴巴集团控股有限公司 Page data processing method and device
CN106951231A (en) * 2017-02-23 2017-07-14 微梦创科网络科技(中国)有限公司 A kind of computer software development approach and device
CN108959034A (en) * 2018-07-05 2018-12-07 北京木瓜移动科技股份有限公司 A kind of monitoring alarm method, device, electronic equipment and storage medium
CN110399400A (en) * 2018-10-31 2019-11-01 腾讯科技(深圳)有限公司 Detect method, apparatus, equipment and the medium of abnormal data
CN110096296A (en) * 2019-05-10 2019-08-06 广州品唯软件有限公司 A kind of caching control methods and equipment
CN110148285A (en) * 2019-05-15 2019-08-20 东营汉威石油技术开发有限公司 A kind of oilwell parameter intelligent early-warning system and its method for early warning based on big data technology
CN110233842A (en) * 2019-06-10 2019-09-13 腾讯科技(深圳)有限公司 A kind of method of calibration and relevant apparatus of request

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
变电站无线测温告警算法;孟晓等;《电力系统自动化》;第37卷(第05期);81-86 *

Also Published As

Publication number Publication date
CN111078512A (en) 2020-04-28

Similar Documents

Publication Publication Date Title
CN111078512B (en) Alarm record generation method and device, alarm equipment and storage medium
US20170279840A1 (en) Automated event id field analysis on heterogeneous logs
CN110276410B (en) Method and device for determining bad reason, electronic equipment and storage medium
CN106934254A (en) The analysis method and device of a kind of licensing of increasing income
CN109656973B (en) Target object association analysis method and device
CN112165462A (en) Attack prediction method and device based on portrait, electronic equipment and storage medium
CN110109908B (en) Analysis system and method for mining potential relationship of person based on social basic information
CN110336838B (en) Account abnormity detection method, device, terminal and storage medium
CN111177568B (en) Object pushing method based on multi-source data, electronic device and storage medium
CN113297044B (en) Operation and maintenance risk early warning method and device
CN110674360A (en) Method and system for constructing data association graph and tracing data
CN116881430B (en) Industrial chain identification method and device, electronic equipment and readable storage medium
CN110334119A (en) A kind of data correlation processing method, device, equipment and medium
CN112925899B (en) Ordering model establishment method, case clue recommendation method, device and medium
KR102257139B1 (en) Method and apparatus for collecting information regarding dark web
CN117093556A (en) Log classification method, device, computer equipment and computer readable storage medium
CN114117134A (en) Abnormal feature detection method, device, equipment and computer readable medium
CN112417996B (en) Information processing method and device for industrial drawing, electronic equipment and storage medium
CN113806492A (en) Record generation method, device and equipment based on semantic recognition and storage medium
CN113760891A (en) Data table generation method, device, equipment and storage medium
CN112115281A (en) Data retrieval method, device and storage medium
US11836637B2 (en) Construction method of human-object-space interaction model based on knowledge graph
US20200242121A1 (en) Method and apparatus for analyzing data
CN113781068B (en) Online problem solving method, device, electronic equipment and storage medium
CN116483831A (en) Recommendation index generation method for distributed database

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
CB03 Change of inventor or designer information

Inventor after: Tang Jian

Inventor after: Ming Lang

Inventor after: Yu Haifeng

Inventor before: Tang Jian

Inventor before: Ming Lang

CB03 Change of inventor or designer information
GR01 Patent grant
GR01 Patent grant