CN111078512A - 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
CN111078512A
CN111078512A CN201911073229.7A CN201911073229A CN111078512A CN 111078512 A CN111078512 A CN 111078512A CN 201911073229 A CN201911073229 A CN 201911073229A CN 111078512 A CN111078512 A CN 111078512A
Authority
CN
China
Prior art keywords
alarm
data
alarm rule
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.)
Granted
Application number
CN201911073229.7A
Other languages
Chinese (zh)
Other versions
CN111078512B (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

Images

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 and device, alarm equipment and a storage medium, and belongs to the field of equipment alarm. 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 the target alarm rule matched with the equipment data is found, verifying the equipment data through the validators corresponding to the target alarm rule to obtain a verification 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. After the equipment data is matched with the alarm rule of the Json Schema structure, the equipment data can be directly verified in the validator, and the analysis step of the alarm rule can be omitted, so that the processing efficiency of the alarm equipment 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 alarm, in particular to an alarm record generation method and device, alarm equipment and a storage medium.
Background
With the popularization of the Internet of things (IoT), abnormal data uploaded by the intelligent device can be known in time, which is beneficial to better management of the device.
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 enters the alarm rule list to be matched, the alarm rule is analyzed after the data is matched with the corresponding alarm rule, the analyzed alarm rule and the alarm execution action are converted into complex logic codes such as conditional statements and the like, the uploaded data points are analyzed according to the logic codes, and finally whether an alarm record is generated or not is judged.
In the related art, for each data, the process of generating an alarm record needs to pass through the processes of rule matching, rule analysis, processing flow determination and verification implementation, the service logic is complex, and the processing efficiency of the alarm device is affected.
Disclosure of Invention
The embodiment of the application provides an alarm record generation method and device, alarm equipment and a storage medium. The technical scheme is as follows:
in one aspect, an embodiment of the present application provides an alarm record generating method, 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 JavaScript Object Notation Schema (Json Schema) structure;
if the target alarm rule matched with the equipment data is found, verifying the equipment data through a verifier (validator) corresponding to the target alarm rule to obtain a verification 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.
On the other hand, an embodiment of the present application provides an alarm record generating device, where the device includes:
the acquisition module is used for acquiring the equipment data uploaded by the target equipment;
the searching module is used for 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 verification module is used for verifying the equipment data through a validator corresponding to the target alarm rule to obtain a verification result if the target alarm rule matched with the equipment data is found;
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 alarm device is provided in an embodiment of the present application, and includes a processor and a memory, where at least one instruction, at least one program, a set of codes, or a set of instructions is stored in the memory, and the at least one instruction, the at least one program, the set of codes, or the set of instructions 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 is provided having stored therein at least one instruction, at least one program, set of codes, or set of instructions that is loaded and executed by a processor to implement the alarm record generation method as described in the above aspect.
In another aspect, a computer program product is provided, which stores at least one instruction, and the at least one instruction is loaded and executed by a processor to implement the alarm record generating method of the above aspect.
By adopting the method for generating the alarm record provided by the embodiment of the application, after the alarm device acquires the device data uploaded by the target device, 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 the Json Schema structure, if the target alarm rule matched with the device data is searched, the device data can be directly verified through the validators corresponding to the target alarm rule to obtain the verification result, and the alarm record is generated when the verification result indicates that the device data meets the target alarm rule. The JsonSchema structure is used for defining the alarm rule, after the equipment data is matched with the alarm rule, the equipment data can be directly verified in the validator without analyzing the alarm rule or converting the alarm rule and the execution action into complex logic codes such as conditional statements and the like, 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 alert record generation method shown in an exemplary embodiment of the present application;
FIG. 3 illustrates a flow chart of an alert record generation method according to another exemplary embodiment of the present application;
FIG. 4 is a schematic diagram illustrating an implementation of a method for generating an alarm record according to an exemplary embodiment of the present application;
FIG. 5 is a block diagram illustrating an exemplary embodiment of an alert record generation apparatus;
fig. 6 shows a schematic structural diagram of an alarm device according to an exemplary embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, embodiments of the present invention will be described in detail with reference to the accompanying drawings.
Reference herein to "a plurality" means two or more. "and/or" describes the association relationship of the associated objects, meaning that there may be three relationships, e.g., a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship.
In the related technology, the generation of the alarm record needs to sequentially perform the steps of rule matching, rule analysis, determination of processing flow, analysis of uploaded data, generation of the alarm record and the like.
For example, the data uploaded by the device is "temperature, 2", and first, according to the attribute temperature of the data, that is, the data is data related to the device temperature, the alarm rule "temperature, > < 1and < 10" matching the attribute is searched in the list of stored alarm rules; since the alarm rule cannot be directly used for processing data, the alarm rule should be analyzed, that is, the meaning of the section represented by "> < 1and < 10" is analyzed, a processing flow is determined according to the analyzed section type, the processing flow is a conditional statement code combining the analyzed alarm rule and the verification action, and then data "2" is analyzed according to the processing flow, that is, data "2" meets the alarm rule, and an alarm record is generated.
Obviously, by adopting the method for generating alarm records provided by the related art, after each uploaded data is matched with the corresponding alarm rule, the alarm rule needs to be analyzed to obtain the interval type of the alarm rule, so that the corresponding processing flow is determined according to the interval type, the uploaded data is analyzed through the processing flow, the service logic is complex, and the processing efficiency of the alarm equipment is influenced; in addition, for data which is not matched with the alarm rule, a corresponding processing flow cannot be provided, so that the uploaded data cannot be analyzed.
In order to solve the above problem, an embodiment of the present application provides an alarm record generating 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 a collection device 101, an alarm device 102 and an inquiry terminal 103.
The collection device 101 is a device having a data collection function, and the collected device data is time sequence data at equal time intervals, and may be new energy devices provided with sensors such as a wind speed detector, a temperature and humidity detector, and a photovoltaic sensor, such as a wind turbine 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; optionally, 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 a plurality of alarm rules of a Json Schema structure.
The alarm rule of the Json Schema structure has check logic, so that data check can be directly carried out. In a possible implementation manner, after the alarm device 102 acquires the device data sent by the acquisition device 101, if an alarm rule matching the device data is found in the alarm rule table, the device data is directly verified through a validator corresponding to the alarm rule to obtain a verification result, and if the verification result indicates that the device data meets the alarm rule, an alarm record is generated. The processes of analyzing the alarm rules and 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 a possible application scenario, the query terminal 103 sends a query instruction containing a query condition to the alarm device 102, the alarm device 102 queries a corresponding alarm record according to the query condition and feeds the query record back to the query terminal 103, and the query terminal 103 may display the received alarm record in a graph 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. In this embodiment, the method for generating an alarm record is described as an example of using the method for generating an alarm record in an alarm device, where the method includes:
step 201, acquiring device data uploaded by a target device.
The target device is 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 the target device temperature index. The time interval between two adjacent device data collected optionally is the same.
In a possible implementation manner, a sensor arranged on the target device acquires device data in real time and sends the device data to the alarm device in real time, and the alarm device acquires the device data uploaded by the target device. The device data should at least include a numerical value and a data type, for example, "temperature, 2", "temperature" represents a data type, i.e., 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 a possible implementation mode, since the alarm rules in the alarm rule table are updated, in order to improve the alarm accuracy, the alarm device acquires the latest alarm rule table at predetermined time intervals. For example, the alarm device obtains the latest alarm rule table every 30 minutes.
The warning device can store a plurality of warning rule lists, each warning rule list stores a plurality of warning rules, and the warning rules all adopt a Json Schema structure. Illustratively, the alarm rule "temperature, > -1 and < ═ 10" is defined as follows using the Json Schema structure specification:
"temperature": {// temperature "Type": "number",// type: numerical value
"maximum": "10",// max: 10
"minimum": "1"// min: 1.
}”。
the above example is only a part of the alarm rule, and is different from an alarm rule storage form in the related art, in this embodiment, the Json Schema structure is used to describe the alarm rule, and the machine may directly read the alarm rule of the Json Schema structure, and omit the step of analyzing the alarm rule.
Optionally, the alarm rule may be a user-defined alarm rule. For example, on the user interface of the alerting device, the user may enter in advance the alert rules associated with the target device.
In a possible implementation manner, after the alarm device obtains the device data, the alarm device searches for a target alarm rule in the alarm rule table according to the data type of the device data, for example, if the data type is "temperature", the alarm rule related to the temperature is searched for.
Step 203, if the target alarm rule matched with the equipment data is found, verifying the equipment data through the validators corresponding to the target alarm rule to obtain a verification result.
In a possible implementation manner, since the alarm rule of the Json Schema structure has a check logic, and can be directly used for data check, after the device data is matched with the target alarm rule, the device data is checked directly through the validator corresponding to the target alarm rule, so as to obtain a check result. And the validator checks the equipment data according to the check code and the alarm rule.
And step 204, 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 one possible implementation, when the check result is "true", indicating that the device data meets the target alarm rule, an alarm record is generated. The alarm records may contain device data, so that a user can query the alarm records and analyze the reason for generating abnormal data by the target device by using the device data. Optionally, the alarm record may also include an upload 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 alarm records may be specially configured for the user to view.
To sum up, in the embodiment of the present application, after the alarm device obtains the device data uploaded by the target device, the alarm rule table is searched for a target alarm rule matching the device data, and since the alarm rules in the alarm rule table all adopt a Json Schema structure, if the target alarm rule matching the device data is found, the device data can be directly verified through the validators corresponding to the target alarm rule to obtain a verification result, and when the verification result indicates that the device data meets the target alarm rule, an alarm record is generated. The Json Schema structure is used for defining the alarm rule, after the equipment data is matched with the alarm rule, the equipment data can be directly verified in the validator without analyzing the alarm rule or converting the alarm rule and the execution action into complex logic codes such as conditional statements and the like, 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 warning device may perform a subsequent verification process to generate a warning record only if the warning device needs to search the target warning rule matched with the device data in the warning rule table. The alarm rule table is pre-stored in the alarm device, the alarm rules stored in the alarm rule table cannot completely match all uploaded device data, and corresponding verification processes may not be performed on the device data which is not matched with the alarm rules, so that the alarm function on the device data cannot be realized.
Referring to fig. 3, a flowchart of an alert record generation method according to another exemplary embodiment of the present application is shown. In this embodiment, the method for generating an alarm record is described as an example of using the method for generating an alarm record in an alarm device, where the method includes:
step 301, acquiring 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.
Step 201 and step 202 may be referred to in the implementation of step 301 and step 302, which is not described herein again in this embodiment.
Step 303, if the target alarm rule matched with the device data is not found, storing the device data in an alarm rule database table, where the alarm rule database table is used to store data that is not matched with the alarm rule.
In a possible implementation manner, after the alarm device obtains the device data, the target alarm rule is not found in the alarm rule table according to the type of the device data, and the device data cannot enter the verifier to be verified, at this time, the device data may be stored in the 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 alarm rule database table may be stored in the alarm device in the form of a file. The user can input the query instruction of the alarm rule database table at the query terminal, and after receiving the query instruction, the alarm device can feed the alarm rule database table back to the query terminal, and the user can open the alarm rule database table at the interface of the query terminal to check.
Illustratively, the alarm rule database table may store the device data according to the sequence of the acquisition time, or may store the same type of device data in the same alarm rule database table; the alarm rule database table may include the collection time of the device data, the device identifier (the number of the target device), and the value, and the storage form of the device data in the alarm rule database table may be as shown in table one:
watch 1
Numbering Time of acquisition Device identification Temperature of
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 step 304, when the data volume of the device data in the alarm rule database table reaches a data volume threshold, generating a candidate alarm rule according to the device data, wherein the candidate alarm rule adopts a Json Schema structure.
The data volume threshold refers to that the data volume of the device data (of the same data type) in the alarm rule database table is enough to generate a candidate alarm rule, and when the data volume threshold is lower than the data volume threshold, the generated candidate alarm rule may have a great deviation from the actual demand and has no reference value. The number threshold value can be set by the user according to the requirement. Illustratively, when the quantity threshold is 500, and when the alarm device detects that the data quantity of the device data in the alarm rule database table reaches 500, a candidate alarm rule is generated according to the device data, and the candidate alarm rule still adopts a Json Schema structure.
Because the alarm rule mainly aims at abnormal equipment data, and the equipment data which is not matched with the target alarm rule does not only comprise the abnormal equipment data, in order to ensure the reasonability of the generated candidate alarm rule, the equipment data which is not matched with the target alarm rule needs to be classified so as to distinguish normal equipment data from abnormal equipment data, and then the candidate alarm rule can be generated according to the abnormal equipment data.
In one possible implementation, step 304 may include the following steps.
1. Training a data classifier according to the equipment data, wherein the data classifier is used for distinguishing normal equipment data from abnormal equipment data, and an adopted algorithm of the training data classifier comprises at least one of a random forest or a Gradient Boosting Decision Tree (GBDT).
In one possible implementation, a data classifier may be set in the alarm device, and the data classifier may be trained by the device data and may be used to distinguish between normal device data and abnormal device data. The algorithm used for training the data classifier may be a random forest or a GBDT. Of course, the user may also select a suitable classification algorithm according to actual requirements, and the algorithm used by the data classifier is not limited in this embodiment.
2. And inputting the equipment data into the data classifier to obtain abnormal equipment data output by the data classifier.
Illustratively, a data set of one device data is a ═ {40, 41, 40.5, 40.6, 46, 41.3, 40.8, 45.6, 44.9}, and when the device data is input into the data classifier, an abnormal device data set is obtained as R ═ {46, 45.6, 44.9 }.
3. And generating candidate alarm rules according to the abnormal equipment data.
In a possible implementation manner, after 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 alarm interval may be "≧ 44.9", and a candidate alarm rule is generated according to the alarm interval and the data type, for example,
"temperature": temperature {// temperature
"Type": "number",// type: numerical value
"minimum": "44.9"// min: 44.9
}”。
Optionally, 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 higher actual reference value.
Step 305, storing the candidate alarm rule to an alarm rule table.
In one possible implementation, after the alarm device generates the candidate alarm rule according to the device data, the candidate alarm rule is automatically stored in the alarm rule table, so that the device data acquired by the subsequent alarm device can be matched with the candidate alarm rule.
Optionally, the candidate alarm rule may be stored in a special alarm rule table so as to be distinguished from the original alarm rule; different labels may also be used to distinguish the candidate alarm rules from the original alarm rules, such as prefixing the candidate alarm rules with "pre". Of course, the user can set the distinguishing mark according to the actual application.
Step 306, if the target alarm rule matched with the equipment data is found, verifying the equipment data through the validators corresponding to the target alarm rule to obtain a verification result.
In one possible embodiment, the alarm rule table stores basic alarm rules and candidate alarm rules. Wherein, the basic alarm rule is manually set. For example, the user inputs the basic alarm rule through the user interface, and the alarm device stores the input basic alarm rule into the alarm rule table when receiving the input instruction. And the candidate alarm rules are generated by the alarm equipment according to the equipment data which are 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 the basic alarm rule according to the setting instruction.
Illustratively, after the alarm device obtains the device data, a target alarm rule matched with the device data is searched in the alarm rule table, the device data may be matched with the basic alarm rule or the candidate alarm rule, and as long as the device data matched with the alarm rule enters the corresponding validator to verify the device data, so as to obtain a verification result.
And 307, if the verification result indicates that the equipment data does not meet the target alarm rule, clearing the equipment data.
Because the alarm device mainly focuses on abnormal device data, when the check result indicates that the device data does not satisfy the alarm rule, that is, the device data is normal device data, the device data can be cleared, that is, the device data which does not satisfy the alarm rule is not stored in the alarm device, and a normal record similar to the alarm record is not 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 a 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 stored in the alarm device, where the basic alarm record includes the device data and may also include the upload time of the device data. Because the basic alarm rule accords with the actual alarm requirement, the alarm reminding is required to be carried out while generating the basic alarm record according to the basic alarm rule, so that a user can know the abnormal condition of the equipment in time. The warning device may perform warning reminding by sending warning information to a preset warning terminal, and the like, which is not limited in this embodiment.
Optionally, for two adjacent device data (of the same data type), the data are respectively represented as a 1and a2 according to the sequence of uploading time, if a1 meets the basic alarm rule, a basic alarm record is generated, and alarm reminding is performed, and in the time period of alarm reminding, the a2 does not meet the basic alarm rule, that is, the a 2-bit normal data may stop the alarm reminding, indicating that the device data uploaded by the target device at this time is normal data.
Step 309, if the verification result indicates that the device data meets the candidate alarm rule, generating a candidate alarm record, wherein the 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 alarm rule matching the device data is a candidate alarm rule, a candidate alarm record is generated and stored in the alarm device. Wherein the candidate alarm records, similar to the basic alarm records, also contain device data. And the storage position of the candidate alarm records can be different from the basic alarm records, so that the user can distinguish the candidate alarm records from the basic alarm records during query.
Alternatively, different flags may be used when storing the candidate alarm records and the basic alarm records. For example, using different color differentiation, or using different prefixes.
Because the candidate alarm records are only used as reference objects of the user, the accuracy of the candidate alarm records cannot be determined, and in order to avoid carrying out wrong alarm reminding, when the candidate alarm records are generated, the candidate alarm records only need to be stored at corresponding positions so as to be convenient for the user to refer to, and the alarm reminding is not needed.
And 310, if the equipment data contained in the adjacent alarm records are the same, deleting the repeated alarm records, wherein the uploading time of the equipment data corresponding to the adjacent alarm records is adjacent.
In a possible implementation manner, the device data acquired by the alarm device may have repeated data, and for repeated device data adjacent to the uploading time, the adjacent alarm records generated according to the device data are basically the same except for different times, so that the repeated alarm records have no reference value, and therefore, the alarm device may delete one of the alarm records, and avoid storage space waste caused by the repeated alarm records.
For example, two pieces of uploaded adjacent device data are "T00: 10:50, temperature, 40.0" and "T00: 10:51, temperature, 40.0", respectively, the two pieces of device data are uploaded at adjacent time and have the same data type and value, the alarm records generated according to the device data can be "a 1, T00:10:50, temperature, 40.0" and "a 2, T00:10:51, temperature, 40.0", respectively, only have the difference in time and have a short time interval, so that the repeated alarm records have no reference value, and thus, only one alarm record can be alternatively deleted, that is, 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 device data which is not matched with the target alarm rule, so that the subsequently uploaded device data can be matched with the corresponding alarm rule, and the candidate alarm record can be generated for the reference of a user. And the data classifier is used for classifying the equipment data, distinguishing abnormal equipment data in the equipment data, and further generating a candidate alarm rule according to the abnormal equipment data, so that the candidate alarm rule is more reasonable, and the generated candidate alarm record is more reference value. In addition, when the candidate alarm rule meets the actual alarm requirement, the candidate alarm rule can be converted into the basic alarm rule so as to carry out alarm reminding.
Please refer to fig. 4, which illustrates an implementation diagram of an alarm record generating method according to an exemplary embodiment of the present application.
In a possible implementation manner, in the process that the device 401 uploads the device data to the alarm device 402, the alarm device 402 regularly obtains the latest alarm rule table 403 of the Json schema structure, searches the alarm rule table 403 of the Json schema structure for the alarm rule matching the device data, and if the alarm rule matching the device data is found, directly enters the validator405 corresponding to the alarm rule for verification, and generates an alarm record according to the verification result. If the check 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 conforms to the alarm rule, and in the process of performing alarm reminding, if the latter device data is normal device data, the alarm reminding is stopped. Optionally, if the uploading time of the device data is adjacent and the device data included in the generated adjacent alarm records is the same, one of the repeated alarm records is deleted.
Illustratively, if the alarm rule matching the device data is not found, the device data is stored in the alarm rule database table 404, a candidate alarm rule may be generated by training the data, and the candidate alarm rule is stored in the alarm rule table 403 of the Json schema structure, so as to implement the alarm function on the device data.
Referring to fig. 5, a block diagram of an alert record generating apparatus according to an exemplary embodiment of the present application is shown. The device includes:
an obtaining module 510, configured to obtain device data uploaded by a target device;
a searching module 520, configured to search a target alarm rule matched with the device data in an alarm rule table, where the alarm rule in the alarm rule table is of a Json Schema structure;
a checking module 530, configured to check the device data through a validator corresponding to the target alarm rule if the target alarm rule matching the device data is found, so as to obtain a check result;
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 comprises:
the first storage 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 are not matched with the alarm rule;
a generating module, configured to generate a candidate alarm rule according to the device data when a data amount of the device data in the alarm rule database table reaches a data amount threshold, where the candidate alarm rule adopts a Json Schema structure;
and the second storage module is used for storing the candidate alarm rule to 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 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;
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 manually set;
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 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.
Optionally, the apparatus further comprises:
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 comprises:
and the clearing module is used for clearing the equipment data if the verification result indicates that the equipment data does not meet the target alarm rule.
To sum up, in the embodiment of the present application, by using the method for generating an alarm record provided in the embodiment of the present application, after the alarm device obtains the device data uploaded by the target device, the alarm rule table is searched for the target alarm rule matching the device data, and because the alarm rules in the alarm rule table all adopt the Json Schema structure, if the target alarm rule matching the device data is found, the device data may be directly verified through the validator corresponding to the target alarm rule to obtain a verification result, and an alarm record is generated when the verification result indicates that the device data meets the target alarm rule. The Json Schema structure is used for defining the alarm rule, after the equipment data is matched with the alarm rule, the equipment data can be directly verified in the validator without analyzing the alarm rule or converting the alarm rule and the execution action into complex logic codes such as conditional statements and the like, a series of complex business logics can be avoided, and the processing efficiency of the alarm equipment is improved.
It should be noted that: the alarm record generating device provided in the foregoing embodiment is only illustrated by dividing the functional modules, and in practical applications, the functions may be distributed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules, so as to complete all or part of the functions described above. In addition, the alarm record generating device and the alarm record generating method provided by the above embodiments belong to the same concept, and specific implementation processes thereof are detailed in the method embodiments and are not described herein again.
Referring to fig. 6, a schematic structural diagram of an alarm device according to an exemplary embodiment of the present application is shown. The alerting 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 alerting device 600 also includes a basic input/output system (I/O system) 606 to facilitate the transfer of information between the various components within the alerting 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, input/output controller 610 may also provide 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 media provide non-volatile storage for the alerting device 600. That is, the mass storage device 607 may include a computer-readable storage medium (not shown) such as a hard disk or a CD-ROI drive.
Without loss of generality, the computer-readable storage media may include computer storage media and communication media. 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 appreciate that the computer storage media is not limited to the foregoing. 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, and the central processing unit 601 executes the one or more programs to implement the methods provided by the various method embodiments described above.
According to various embodiments of the present application, the alerting device 600 may also operate via a remote server connected to a network, such as the internet. That is, the alerting device 600 may be connected to the network 612 through the network interface unit 611 connected to the system bus 605, or may be connected to other types of networks or remote server systems (not shown) using the network interface unit 611.
The memory also includes one or more programs, which are stored in the memory, the one or more programs including instructions for performing the steps performed by the alert device in the methods provided by the embodiments of the present application.
The embodiment of the present application further provides a computer-readable medium, where at least one instruction is stored, and the at least one instruction is loaded and executed by the processor to implement the alarm record generating method according to the above embodiments.
The embodiment of the present application further provides a computer program product, where at least one instruction is stored, and the at least one instruction is loaded and executed by the processor to implement the alarm record generating method according to the above embodiments.
Those skilled in the art will recognize 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, the 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 above description is only exemplary of the present application and should not be taken as limiting, as any modification, equivalent replacement, or improvement made within the spirit and principle of the present application should be included in the protection scope of the present application.

Claims (16)

1. An alarm record generation method, characterized in that the method comprises:
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 Json Schema structure of the JS object notation;
if the target alarm rule matched with the equipment data is found, verifying the equipment data through a verifier corresponding to the target alarm rule to obtain a verification 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.
2. The method of claim 1, wherein after the target alarm rule matching the device data is looked up in an alarm rule table, the method further comprises:
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 are 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 value, generating a candidate alarm rule according to the equipment data, wherein the candidate alarm rule adopts a Json Schema structure;
and storing the candidate alarm rule to the alarm rule table.
3. The method of claim 2, wherein generating candidate alarm rules from the device data comprises:
training a data classifier according to the equipment data, wherein the data classifier is used for distinguishing normal equipment data from abnormal equipment data, and 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;
and generating the candidate alarm rule according to the abnormal equipment data.
4. The method according to claim 2, wherein the alarm rule table comprises a basic alarm rule and the candidate alarm rule, and the basic alarm rule is manually set;
if the verification result indicates that the equipment data meets a target alarm rule, generating an alarm record, including:
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.
5. The method of claim 4, further comprising:
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.
6. The method according to any one of claims 1 to 5, wherein after generating an alarm record if the verification result indicates that the device data satisfies the target alarm 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.
7. The method according to any one of claims 1 to 5, wherein after the device data is verified by the validator 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, clearing the equipment data.
8. An alert record generation apparatus, characterized in that the apparatus comprises:
the acquisition module is used for acquiring the equipment data uploaded by the target equipment;
the searching module is used for 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 verification module is used for verifying the equipment data through a validator corresponding to the target alarm rule to obtain a verification result if the target alarm rule matched with the equipment data is found;
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.
9. The apparatus of claim 8, further comprising:
the first storage 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 are not matched with the alarm rule;
a generating module, configured to generate a candidate alarm rule according to the device data when a data amount of the device data in the alarm rule database table reaches a data amount threshold, where the candidate alarm rule adopts a Json Schema structure;
and the second storage module is used for storing the candidate alarm rule to the alarm rule table.
10. The apparatus of claim 9, wherein the generating module comprises:
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;
and the generating unit is used for generating the candidate alarm rule according to the abnormal equipment data.
11. The apparatus according to claim 9, wherein the alarm rule table comprises a basic alarm rule and the candidate alarm rule, and the basic alarm rule is 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.
12. The apparatus of claim 11, further comprising:
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.
13. The apparatus of any one of claims 8 to 12, 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.
14. The apparatus of any one of claims 8 to 12, further comprising:
and the clearing module is used for clearing the equipment data if the verification result indicates that the equipment data does not meet the target alarm rule.
15. An alert device comprising a processor and a memory having stored therein at least one instruction, at least one program, set of codes, or set of instructions that is loaded and executed by the processor to implement an alert record generation method according to any of claims 1 to 7.
16. 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, which is loaded and executed by a processor to implement the alarm record generating method of any of claims 1 to 7.
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 true CN111078512A (en) 2020-04-28
CN111078512B 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)

Cited By (4)

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

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100114620A1 (en) * 2008-10-30 2010-05-06 Diament Judah M Service Description Refinement Based on Actual Service Use
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

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100114620A1 (en) * 2008-10-30 2010-05-06 Diament Judah M Service Description Refinement Based on Actual Service Use
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
孟晓等: "变电站无线测温告警算法", 《电力系统自动化》 *

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111782486A (en) * 2020-07-03 2020-10-16 上海浦东发展银行股份有限公司 Alarm implementation method and system based on dynamic configuration
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
US20220271988A1 (en) * 2021-02-25 2022-08-25 Insight Direct Usa, Inc. Dynamic iot rule and alert templating engine
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

Also Published As

Publication number Publication date
CN111078512B (en) 2023-09-12

Similar Documents

Publication Publication Date Title
CN111078512B (en) Alarm record generation method and device, alarm equipment and storage medium
CN114048870A (en) Power system abnormity monitoring method based on log characteristic intelligent mining
CN111831636A (en) Data processing method, device, computer system and readable storage medium
CN106934254A (en) The analysis method and device of a kind of licensing of increasing income
CN111368867B (en) File classifying method and system and computer readable storage medium
CN110659282A (en) Data route construction method and device, computer equipment and storage medium
CN114187036B (en) Internet advertisement intelligent recommendation management system based on behavior characteristic recognition
CN112613569A (en) Image recognition method, and training method and device of image classification model
CN113868498A (en) Data storage method, electronic device, device and readable storage medium
CN113836128A (en) Abnormal data identification method, system, equipment and storage medium
CN106294406B (en) Method and equipment for processing application access data
CN111159559A (en) Method for constructing recommendation engine according to user requirements and user behaviors
CN112925899B (en) Ordering model establishment method, case clue recommendation method, device and medium
CN116932523B (en) Platform for integrating and supervising third party environment detection mechanism
CN113190426B (en) Stability monitoring method for big data scoring system
CN117221087A (en) Alarm root cause positioning method, device and medium
CN111967437A (en) Text recognition method, device, equipment and storage medium
CN108021713B (en) Document clustering method and device
WO2023039973A1 (en) Abnormal false alarm processing method and apparatus, and storage medium and terminal
CN113971213A (en) Smart city management public information sharing system
CN114648010A (en) Data table standardization method, device, equipment and computer storage medium
CN114218383A (en) Method, device and application for judging repeated events
Punjabi et al. Forensic Intelligence-Combining Artificial Intelligence with Digital Forensics
CN111027296A (en) Report generation method and system based on knowledge base
CN118096057A (en) Enterprise group service method, device, system and storage medium

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