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

By obtaining multi-device or multi-test point data of IoT devices and generating alarm records based on target alarm rules, the problem of inability to accurately describe complex IoT business scenarios in the prior art is solved, and the accuracy and efficiency of multi-device joint alarms are achieved.

CN115061872BActive Publication Date: 2025-08-22ENVISION DIGITAL INT PTE LTD +1
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202210665026.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-13
Publication Date
2025-08-22
Estimated Expiration
2042-06-13

AI Technical Summary

Technical Problem

In the prior art, alarm devices cannot accurately describe complex business scenarios in IoT applications, and cannot effectively utilize the association relationship between multiple devices or multiple measurement points for abnormal monitoring.

Method used

By acquiring the first device data, determining the second device data corresponding to the same target alarm rule, generating alarm records based on the multi-device or multi-test point joint alarm rule, and processing data using key-value pair format and streaming processing library (such as Kafka Stream) to realize joint alarm of multiple devices.

Benefits of technology

Multi-device or multi-test point joint alarm is realized, improving the accuracy and efficiency of alarm record generation, and providing an effective alarm method for complex alarm scenarios in IoT application scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115061872B_ABST
    Figure CN115061872B_ABST
Patent Text Reader

Abstract

The embodiment of the present application discloses an alarm record generation method, apparatus, alarm device and storage medium, belonging to the field of device alarm. The method includes: obtaining first device data, the first device data is provided by a first data acquisition device; based on the first device data, determining at least one second device data, the second device data is provided by a second data acquisition device, the first data acquisition device and the second data acquisition device correspond to the same target alarm rule; in response to the first device data and at least one second device data meeting the target alarm rule, generating an alarm record corresponding to the first data acquisition device. The purpose of joint alarm of multiple devices or multiple measuring points is achieved, and an alarm method is provided for complex alarm scenarios in IoT application scenarios, meeting the scenario requirements of abnormal monitoring of multiple measuring points.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of device alarms, and in particular to an alarm record generation method, apparatus, alarm device, and storage medium. Background Art

[0002] With the popularization of Internet of Things (IoT) technology, timely understanding of abnormal data uploaded by smart devices is conducive to better device management.

[0003] At present, alarm devices are commonly used to analyze the data uploaded by devices. A list of alarm rules is pre-stored in the alarm device. When any device data is uploaded, it will enter the alarm rule list for matching. After matching the corresponding alarm rule, it is determined whether the device data meets the alarm rule. If the alarm rule is met, an alarm is triggered.

[0004] In related technologies, the alarm engine is mainly applied to a single measurement point of a single device, that is, it only judges whether the device is abnormal based on the data of a certain measurement point reported by a certain device, without taking into account the data of other devices connected to it, and cannot accurately describe the complex business scenarios in IoT applications. Summary of the Invention

[0005] The embodiments of the present application provide a method, apparatus, alarm device, and storage medium for generating an alarm record. The technical solution is as follows:

[0006] In one aspect, an embodiment of the present application provides a method for generating an alarm record, the method comprising:

[0007] Acquire first device data, where the first device data is provided by a first data acquisition device;

[0008] Determining at least one second device data based on the first device data, where the second device data is provided by a second data acquisition device, and the first data acquisition device and the second data acquisition device correspond to the same target alarm rule;

[0009] In response to the first device data and at least one of the second device data satisfying the target alarm rule, an alarm record corresponding to the first data acquisition device is generated.

[0010] On the other hand, an embodiment of the present application provides an alarm record generating device, the device comprising:

[0011] An acquisition module, configured to acquire first device data, where the first device data is provided by a first data acquisition device;

[0012] a first determining module, configured to determine at least one second device data based on the first device data, where the second device data is provided by a second data acquisition device, and the first data acquisition device and the second data acquisition device correspond to the same target alarm rule;

[0013] A generating module is configured to generate an alarm record corresponding to the first data acquisition device in response to the first device data and at least one of the second device data satisfying the target alarm rule.

[0014] On the other hand, an embodiment of the present application provides an alarm device, which includes a processor and a memory, wherein the memory stores at least one program, and the at least one program is loaded and executed by the processor to implement the alarm record generation method as described in the above aspects.

[0015] On the other hand, a computer-readable storage medium is provided, in which at least one program is stored. The at least one program is loaded and executed by a processor to implement the alarm record generation method as described in the above aspect.

[0016] According to another aspect of the present application, a computer program product or computer program is provided, comprising computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the alarm record generation method provided in the above-described optional implementation.

[0017] By adopting the alarm record generation method provided in the embodiment of the present application, when the alarm device obtains the first device data corresponding to the first device, it can determine the second device data of the second device corresponding to the same target alarm rule as the first device based on the first device data, and then determine whether to trigger the target alarm rule through the first device data and at least one second device data, thereby achieving the purpose of joint alarm of multiple devices or multiple measuring points, providing an alarm method for complex alarm scenarios in Internet of Things application scenarios, and meeting the scenario requirements of abnormal monitoring of multiple measuring points. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] Figure 1 A schematic diagram showing an implementation environment provided by an exemplary embodiment of the present application is shown;

[0019] Figure 2 A flowchart of a method for generating an alarm record according to an exemplary embodiment of the present application is shown;

[0020] Figure 3 A flowchart of a method for generating an alarm record according to another exemplary embodiment of the present application is shown;

[0021] Figure 4 A schematic diagram of an alarm record generation process according to an exemplary embodiment of the present application is shown;

[0022] Figure 5 A schematic diagram of an alarm record generation process according to another exemplary embodiment of the present application is shown;

[0023] Figure 6 A flowchart of a method for generating first device data according to an exemplary embodiment of the present application is shown;

[0024] Figure 7 A flowchart of a method for generating second device data according to an exemplary embodiment of the present application is shown;

[0025] Figure 8 A schematic diagram of the complete process of generating an alarm record according to an exemplary embodiment of the present application is shown;

[0026] Figure 9 A schematic diagram showing an alarm engine and device data storage location shown in an exemplary embodiment of the present application is shown;

[0027] Figure 10 A structural block diagram of an alarm record generating device provided by an exemplary embodiment of the present application is shown;

[0028] Figure 11 A schematic structural diagram of an alarm device provided by an exemplary embodiment of the present application is shown. DETAILED DESCRIPTION

[0029] In order to make the objectives, technical solutions and advantages of this application clearer, the implementation methods of this application will be further described in detail below with reference to the accompanying drawings.

[0030] In this document, "plurality" refers to two or more. "And / or" describes a relationship between associated objects, indicating that three possible relationships exist. For example, "A and / or B" can mean: A exists alone, A and B exist simultaneously, or B exists alone. The character " / " generally indicates an "or" relationship between the associated objects.

[0031] The embodiment of the present application provides a method for generating an alarm record, which is applied to the application scenario of multi-device joint alarm. Figure 1 , which shows a schematic diagram of an implementation environment provided by an exemplary embodiment of the present application. The implementation environment includes a collection device 101, an alarm device 102 and a query terminal 103.

[0032] The acquisition device 101 is a device with data acquisition function, and the device data collected is time series data with equal time intervals. It can be a new energy device equipped with sensors such as wind speed detectors, temperature and humidity detectors, photovoltaic sensors, etc., such as wind turbines, photovoltaic panels, etc.

[0033] The data collection device 101 and the alarm device 102 are connected via a wired or wireless network.

[0034] Alarm device 102 is a computer device that stores data collected by acquisition device 101, processes that data, and generates alarm records. It can be a single server, a server cluster consisting of multiple servers, or a cloud server. Optionally, after acquiring device data sent by acquisition device 101, alarm device 102 processes the data, generates an alarm record, and sends the alarm record to query terminal 103. Optionally, upon receiving a query instruction, the alarm device can send the alarm record to query terminal 103 based on the query conditions.

[0035] The query terminal 103 is a device with data query function. In one possible application scenario, the query terminal 103 sends a query instruction containing query conditions to the alarm device 102. The alarm device 102 queries the corresponding alarm records according to the query conditions and feeds back to the query terminal 103. The query terminal 103 can display the received alarm records in the form of charts. The query terminal 103 can be a personal computer, a smart phone, a tablet computer, etc. Figure 1 As shown, the query terminal 103 is a personal computer.

[0036] Please refer to Figure 2 , which shows a flowchart of an alarm record generation method shown in an exemplary embodiment of the present application. This embodiment is described by taking the alarm record generation method for an alarm device as an example, and the method includes:

[0037] Step 201: Acquire first device data, where the first device data is provided by a first data acquisition device.

[0038] Among them, the first data acquisition device is a device with data acquisition function, which can be installed on the Internet of Things device or connected to the Internet of Things device to monitor the device status of the Internet of Things device. Schematically, the first data acquisition device can be an ammeter, a voltmeter, a temperature and humidity detector, a light sensor, a wind speed detector, a photovoltaic sensor, etc. The embodiment of this application does not limit the specific type of the first data acquisition device.

[0039] In a possible implementation, the first data collection device uploads the collected first device data to the alarm device, and the corresponding alarm device determines whether to trigger a target alarm based on the first device data.

[0040] Step 202: Based on the first device data, determine at least one second device data, where the second device data is provided by a second data acquisition device, and the first data acquisition device and the second data acquisition device correspond to the same target alarm rule.

[0041] In order to meet certain complex alarm scenarios in IoT application scenarios, for example, in IoT systems, IoT devices are interrelated. Judging whether an IoT device is operating normally often requires combining data from multiple measurement points of itself, or relying on data reported in real time by other IoT devices. In one possible implementation, based on the joint alarm scenario of multiple devices or multiple measurement points, the alarm rules are improved, and the alarm rules are improved from supporting a single measurement point to supporting multiple measurement points. That is, the device data uploaded by at least two data acquisition devices is required to execute the subsequent alarm process.

[0042] Unlike the single-point alarm process, it is only necessary to determine whether the first device data meets the target alarm rules. In the multi-point alarm scenario, after obtaining the first device data, it is also necessary to determine the device data collected by the relevant data acquisition device corresponding to the same target alarm rule as the first data acquisition device, that is, the second device data, and then determine whether to generate an alarm record based on at least one second device data and the first device data.

[0043] Schematically, if the target alarm rule corresponds to data acquisition device A and data acquisition device B, that is, to determine whether an alarm is generated, the device data collected by data acquisition device A and the device data collected by data acquisition device B are required. Correspondingly, when the alarm device obtains the first device data uploaded by data acquisition device A, it is also necessary to determine the second device data collected by data acquisition device B based on the first device data, and then determine whether the target alarm rule is met based on the first device data and the second device data; if the target alarm rule corresponds to data acquisition device A, data acquisition device B and data acquisition device C, when the alarm device obtains the first device data corresponding to data acquisition device A, it is also necessary to determine the second device data collected by data acquisition device B and the third device data corresponding to data acquisition device C based on the first device data, and then determine whether the target alarm rule is met based on the first device data, the second device data and the third device data.

[0044] Optionally, the first data acquisition device and the second data acquisition device can be used to collect different device data of the same IoT device. Schematically, the first data acquisition device can be an ammeter for measuring the current value corresponding to IoT device A, and the second data acquisition device can be a voltmeter for measuring the voltage value corresponding to IoT device A.

[0045] Optionally, the first data acquisition device and the second data acquisition device can be used to collect device data of different IoT devices. Schematically, the first data acquisition device can be ammeter A, used to measure the current value corresponding to IoT device A, and the second data acquisition device can be ammeter B, used to measure the current value corresponding to IoT device B.

[0046] Optionally, the first data acquisition device and the second data acquisition device may be data acquisition devices of the same type. Schematically, the first data acquisition device and the second data acquisition device are both ammeters. Optionally, the first data acquisition device and the second data acquisition device may be data acquisition devices of different types. Schematically, the first data acquisition device may be an ammeter, and the second data acquisition device may be a voltmeter.

[0047] It should be noted that if the first data acquisition device and the second data acquisition device are of the same type, and the first data acquisition device and the second data acquisition device are used to collect device data of the same Internet of Things device, then the first data acquisition device and the second data acquisition device need to collect device data at different locations (measuring points) of the Internet of Things device.

[0048] Step 203: In response to the first device data and at least one second device data satisfying the target alarm rule, an alarm record corresponding to the first data acquisition device is generated.

[0049] In a possible implementation, when the first device data and at least one second device data meet the alarm condition indicated by the target alarm rule, an alarm record corresponding to the first data acquisition device is generated.

[0050] Indicatively, if the target alarm rule can be expressed as:

[0051]

[0052] It can be seen from the target alarm rule that two measurement points are configured in the target alarm rule: current 1 measured by meter A, and current 2 measured by meter B. An alarm will only be generated when the sum of current 1 and current 2 is greater than 10. In schematic form, when current 1 collected by meter A (first device data) is obtained, and current 2 collected by meter B corresponding to the same target alarm rule as meter A (second device data) is obtained, it is determined whether the sum of current 1 and current 2 meets the alarm condition. If the sum of current 1 and current 2 meets the alarm condition, an alarm is triggered and an alarm record is generated; if the sum of current 1 and current 2 does not meet the alarm condition, no alarm is triggered.

[0053] To sum up, in the embodiment of the present application, after the alarm device obtains the first device data corresponding to the first device, it can determine the second device data of the second device corresponding to the same target alarm rule as the first device based on the first device data, and then determine whether to trigger the target alarm rule through the first device data and at least one second device data, thereby achieving the purpose of joint alarm of multiple devices or multiple measuring points, providing an alarm method for complex alarm scenarios in Internet of Things application scenarios, and meeting the scenario requirements of abnormal monitoring of multiple measuring points.

[0054] In order to improve the accuracy of determining the second device data, in one possible implementation, both the first device data and the second device data are in key-value pair format, and each device data corresponding to the same alarm rule of the first data acquisition device uses the same key, so that the corresponding second device data can be found based on the key of the first device data.

[0055] Please refer to Figure 3 , which shows a flowchart of an alarm record generation method shown in another exemplary embodiment of the present application. This embodiment is described by taking the alarm record generation method for an alarm device as an example, and the method includes:

[0056] Step 301: Acquire first device data, where the first device data is provided by a first data acquisition device.

[0057] Among them, the first device data is in a key-value pair format; in order to distinguish different alarm rules and different data acquisition devices, the first device data can use the target rule identifier corresponding to the target alarm rule and the first measuring point identifier corresponding to the first data acquisition device as the first target key, and the first target value corresponding to the first device data can be determined by the specific device value collected; schematically, the first device data can be expressed as: current1_ruleOverload: 8, wherein the first target key corresponding to the first device data is current1_ruleOverload, wherein current 1 is the first measuring point identifier, ruleOverload (circuit overload) represents the target alarm rule, and the first target value is 8, indicating that the value of current 1 is 8A.

[0058] Optionally, in the embodiment of the present application, a streaming processing library (Kafka Stream) is used to process the device data (measurement point data) uploaded by each data acquisition device. It can connect the data of multiple streams together through certain rules, perform real-time calculation and analysis, and apply it to joint alarms of multiple devices and multiple measurement points.

[0059] Optionally, the alarm device may read the first device data from Kstream in the streaming database.

[0060] Step 302: Based on the first target key in the first device data, search for at least one second device data matching the first target key from a related device database, where the related device database stores device data corresponding to the same alarm rule as the first data acquisition device.

[0061] In order to obtain the device data collected by other data acquisition devices corresponding to the same alarm rule, in a possible implementation manner, the device data of other data acquisition devices corresponding to the same target alarm rule as the first data acquisition device are written into the relevant device database in the format of the same target key as the first device data, and the relevant device database will be updated in real time, that is, the latest value corresponding to the device data is stored in the relevant device database.

[0062] Schematically, the relevant equipment database can be shown in Table 1.

[0063] Table 1

[0064] Key (measurement point_alarm rule) Value (value) the latest value of the relevant measurement point Current1_ruleOverload Meter B_Current 2:5 Current1_ruleOverload Meter C_Current 3:7 Current 1_Circuit Break Meter D_Current 4:1 … …

[0065] It can be seen from Table 1 that when the first device data corresponding to the first data acquisition device is: Current 1_ruleOverload: 8, based on the first target key "Current 1_ruleOverload" corresponding to the first device data, two second device data "Current 1_ruleOverload: Meter B_Current 2: 5" and "Current 1_ruleOverload: Meter C_Current 3: 7" can be found from the relevant device database, indicating that Current 1, Current 2 and Current 3 correspond to the same target alarm rule "ruleOverload (circuit overload)".

[0066] In one possible implementation, after the alarm device obtains the first device data, it can determine the first target key from the first device data, and based on the first target key, search for at least one second device data that matches the first target key from the relevant device database. If the keys are the same, it means that the second device data and the first device data correspond to the same target alarm rule.

[0067] Optionally, the alarm device may search for the second device data from a Ktable in the streaming database based on the first device data.

[0068] Step 303: Determine a first target value from the first device data, and determine a second target value from at least one second device data.

[0069] In one possible implementation, after determining at least one second device data, a first target value can be determined from the first device data, and a second target value can be determined from at least one second device data, so as to subsequently determine whether the first target value and the second target value meet the target alarm rules.

[0070] Step 304: In response to the first target value and at least one second target value satisfying the target alarm rule, an alarm record corresponding to the first data acquisition device is generated.

[0071] In one possible implementation, when it is determined that the first target value and at least one second target value meet the target alarm rules, an alarm is triggered and an alarm record corresponding to the first data acquisition device is generated; conversely, if the first target value and at least one second target value do not meet the target alarm rules, the alarm is not triggered, or the alarm is stopped from being triggered.

[0072] Indicative, such as Figure 4 As shown, it shows a schematic diagram of the alarm record generation process shown in an exemplary embodiment of the present application. When meter A generates current 1 measurement point data, the alarm rule is matched based on the current 1 measurement point data, and the corresponding alarm rule is determined to be: circuit overload. The alarm rule is configured with two measurement points: meter A (current 1) and meter B (current 2). Based on the alarm rule and the measurement point identifier, the measurement point data is written to Kafka (a streaming database) according to the rule. Similarly, when meter B generates current 2 measurement point data, the alarm rule is matched based on the current 2 measurement point data, and the measurement point data is written to Kafka according to the rule based on the alarm rule and the measurement point identifier. The alarm server corresponding to the first data acquisition device reads the value of current 2 from Kafka and determines whether the alarm rule is met: current 1 + current 2 > 10. If so, an alarm is generated; otherwise, the alarm is terminated. Similarly, the alarm server corresponding to the second data acquisition device reads the value of current 1 from Kafka and determines whether the alarm rule is met: current 1 + current 2 > 10. If so, an alarm is generated; otherwise, the alarm is terminated.

[0073] Depend on Figure 4 It can be seen that two measurement points are configured in the alarm rule: current 1 and current 2, and an alarm will be generated only when the values ​​of the two measurement points reach a certain threshold (10) at the same time.

[0074] like Figure 5 As shown, it shows a schematic diagram of the alarm record generation process shown in another exemplary embodiment of the present application. The alarm rule corresponding to the alarm record generation process can be expressed as:

[0075]

[0076]

[0077] Based on this alarm rule, the corresponding alarm record generation process is as follows: when air conditioner A generates indoor temperature measurement point data, the alarm rule is matched based on the indoor temperature measurement point data: the air conditioner cooling is abnormal, and two measurement points are configured in the alarm rule: the air conditioner (indoor temperature measurement point) and the weather station (outdoor temperature measurement point). Based on the alarm rule and the temperature measurement point, the indoor temperature measurement point data is written into Kafka according to the rule; similarly, weather station A generates outdoor temperature measurement point data, the alarm rule is matched based on the outdoor temperature measurement point data, and based on the alarm rule and the temperature measurement point, the outdoor temperature measurement point data is written into Kafka according to the rule; since the alarm rule only needs to output the alarm record corresponding to air conditioner A, the alarm server corresponding to air conditioner A reads the latest value of the outdoor temperature measurement point from Kafka, and determines whether to generate an alarm based on whether the indoor temperature and outdoor temperature meet the following condition: indoor temperature > outdoor temperature.

[0078] Depend on Figure 5 From the alarm record generation process shown, it can be seen that the normal operation of air conditioner A depends on the measurement point data reported by weather station A, that is, the operation status of one device depends on the measurement point data reported by another device.

[0079] In an embodiment of the present application, the device data provided by each data acquisition device is represented according to preset rules, for example, alarm rule + measurement point identification, so that the device data corresponding to other data acquisition devices corresponding to the same alarm rule as the first data acquisition device all correspond to the same target key. Therefore, in the process of generating an alarm record, the device data corresponding to the same alarm rule can be searched from the relevant device database based on the first target key in the first data device, thereby improving the search efficiency of the second device data and further improving the accuracy of determining the second device data.

[0080] It can be seen from the above embodiments that when matching the second device data based on the first device data, it depends on a specific key-value pair format. Correspondingly, in order to realize the above-mentioned process of searching for device data based on the key, the data reported by each data acquisition device needs to be written into the database according to specific rules.

[0081] In an illustrative example, Figure 6 FIG. 1 shows a flowchart of a first device data generation method according to an exemplary embodiment of the present application. This embodiment uses the alarm record generation method for an alarm device as an example for explanation. The method includes:

[0082] Step 601: Receive first measurement point data sent by a first data acquisition device.

[0083] In this embodiment, after the first data acquisition device collects the first measuring point data, it will report the first measuring point data to the alarm device. After the corresponding alarm device receives the first measuring point data sent by the first data acquisition device, it will write the first measuring point data into the database according to certain rules to obtain the first device data with specific rules.

[0084] Illustratively, the first measurement point data sent by the first data acquisition device can be expressed as:

[0085]

[0086] Step 602: Determine target alarm rules based on the first measurement point data.

[0087] Since the first target key corresponding to the first device data needs to be determined by the target alarm rule, in a possible implementation manner, when the alarm device receives the first measurement point data sent by the first data acquisition device, it first determines the matching target alarm rule based on the first measurement point data, and then determines the writing rule of the first measurement point data.

[0088] In order to match the first measurement point data with the corresponding target alarm rule, a set of key-value pairs is configured for each measurement point in the alarm rule as measurement point selectors; when the first data acquisition device reports the measurement point data, it also brings a set of key-value pairs as measurement point labels (labels) to describe the measurement point information. The alarm device then compares the measurement point labels with the alarm rule selectors one by one. If the key-value pairs match, it means that the alarm rule is applicable to the measurement point data.

[0089] Optionally, the matching between measurement point labels and alarm rule selectors supports: complete text matching, value range matching, list element matching, text regular matching, etc.

[0090] Schematically, if the measurement point selector corresponding to the alarm rule _circuit overload can be expressed as:

[0091]

[0092]

[0093] The first measurement point data corresponding to the first data acquisition device can be expressed as:

[0094] Since the "deviceId": "meter A" in the first measuring point data matches the "deviceId": "meter A" in the alarm rule, the "model": "ammeter" in the first measuring point data matches the "model": "ammeter" in the alarm rule, the "position": "posX" in the first measuring point data belongs to the range represented by "position": ["posX", "posY"] in the alarm rule, and the "version": "V1.4.3" in the first measuring point data matches the "version": " / V2.* / " in the alarm rule, it means that the first measuring point data matches the circuit overload alarm rule, and the circuit overload is determined as the target alarm rule.

[0095] On the contrary, if the data of the first measuring point can be expressed as:

[0096]

[0097] Since the “deviceId”: “electricity meter C” in the first measuring point data does not match the “deviceId” in the alarm rule, it is determined that the first measuring point data does not match the alarm rule (circuit overload).

[0098] Step 603 : using the target rule identifier of the target alarm rule and the first measuring point identifier as the first target key and the first measuring point data as the first target value, determine the first device data, where the first measuring point identifier is the device identifier corresponding to the first data acquisition device.

[0099] In order to distinguish different measuring points and different alarm rules, in one possible implementation, after matching the target alarm rule based on the first measuring point data, the target rule identifier of the target alarm rule and the first measuring point identifier are used as the first target key, and the first measuring point data is used as the first target value to determine the first device data, and the first device data is written into the corresponding database.

[0100] Optionally, the target rule identifier may be a rule name or rule ID corresponding to the target alarm rule, or other identifiers that can uniquely identify the target alarm rule, which is not limited in this embodiment of the present application.

[0101] Optionally, the first measuring point identifier is the device identifier corresponding to the first data acquisition device. Schematically, the device identifier may be the device name of the first data acquisition device. For example, the first data acquisition device is meter A, and correspondingly, the first measuring point identifier may be meter A; or it may be the identifier corresponding to the measurement point of the first data acquisition device. For example, the first data acquisition device is used to collect the current at measurement point A of the Internet of Things device, and correspondingly, the first measuring point identifier may be measurement point A. This embodiment of the present application does not constitute a limitation to this.

[0102] Step 604: Based on the target alarm rule, determine a second data acquisition device that corresponds to the same target alarm rule as the first data acquisition device.

[0103] Since the target alarm rules correspond to different measuring points or different data acquisition devices, in order to generate alarm records corresponding to other acquisition devices, and in the process of generating alarm records, there is no need to obtain device data from the alarm server corresponding to the first data acquisition device, that is, there is no need to obtain device data across servers. In one possible implementation, after obtaining the first measuring point data, the first measuring point data is backed up and copied, and the backed-up device data is routed to the alarm servers corresponding to other data acquisition devices.

[0104] Optionally, in order to determine the number of copies of the first measuring point data and the destination alarm server to which the copied first measuring point data needs to be routed, in a possible implementation, after determining the target alarm rule based on the first measuring point data, it is also necessary to determine at least one second data acquisition device corresponding to the same target alarm rule as the first data acquisition device based on the target alarm rule, so as to determine the number of copies and the destination alarm server based on the number of second data acquisition devices.

[0105] Optionally, if the target alarm rule includes two measuring points, the data of the first measuring point needs to be backed up in two copies, one for generating the first device data and the other for generating the third device data, which is used to generate the alarm record corresponding to the second data acquisition device.

[0106] Step 605 : Determine third device data using the target rule identifier and the second measuring point identifier as a third target key and the first measuring point data as a third target value.

[0107] When generating an alarm record corresponding to the second data acquisition device, the key for writing the measurement point data reported by the second data acquisition device to the alarm server corresponding to the second data acquisition device is: second measurement point identifier + target rule identifier. Correspondingly, when generating third device data based on the first measurement point data, it is also necessary to use the target rule identifier + second measurement point identifier as the key and the first measurement point data as the value, so that when generating the alarm record corresponding to the second data acquisition device, the third device data can be found from the relevant device database based on the key "second measurement point identifier + target rule identifier".

[0108] Optionally, the second measuring point identifier is a device identifier corresponding to the second data acquisition device, the third device data is used to be stored in a related device database corresponding to the second data acquisition device, and the third device data is used to generate an alarm record corresponding to the second data acquisition device.

[0109] In this embodiment, the measurement point data reported by the first data acquisition device is written into the database according to predefined specifications, for example, alarm rule + measurement point identifier, so that the device data corresponding to other data acquisition devices corresponding to the same alarm rule as the first data acquisition device all correspond to the same target key. Therefore, in the process of generating the alarm record, the device data corresponding to the same alarm rule can be searched from the relevant device database based on the first target key in the first data device, thereby improving the search efficiency of the second device data and further improving the accuracy of determining the second device data.

[0110] Similar to the generation process of the first device data, the second device data also needs to be written according to specific rules when it is written into the alarm server corresponding to the first data acquisition device.

[0111] like Figure 7 FIG. 1 shows a flowchart of a second device data generation method according to an exemplary embodiment of the present application. This embodiment uses the alarm record generation method for an alarm device as an example for explanation. The method includes:

[0112] Step 701: Receive second measurement point data sent by a second data acquisition device.

[0113] In this embodiment, after the second data acquisition device collects the second measuring point data, it will report the second measuring point data to the alarm device. After the corresponding alarm device receives the second measuring point data sent by the second data acquisition device, it will write the second measuring point data into the database according to certain rules to obtain second device data with specific rules.

[0114] Step 702: Determine a target alarm rule based on the second measurement point data.

[0115] In order to determine whether the second data acquisition device has an associated data acquisition device, in a possible implementation, after obtaining the second measuring point data sent by the second data acquisition device, it is first necessary to perform target alarm rule matching based on the second measuring point data, so as to determine whether there is an associated measuring point based on the matched target alarm rule, as well as the writing rule of the second measuring point data.

[0116] The process of matching the target alarm rule based on the second measurement point data may refer to the process of matching the target alarm rule based on the first measurement point data in the above embodiment, and will not be described in detail in this embodiment of the present application.

[0117] Step 703: Based on the target alarm rule, determine a first data acquisition device corresponding to the same target alarm rule as the second data acquisition device.

[0118] This embodiment is illustrated by taking the example that the second data acquisition device corresponds to the same target alarm rule as the first data acquisition device, and generates the alarm rule corresponding to the first data acquisition device. In a possible implementation manner, when the target alarm rule is determined based on the second measuring point data, it is also necessary to determine the first data acquisition device corresponding to the same target alarm rule as the second data acquisition device based on the target alarm rule, so as to determine the writing rule of the second measuring point data based on the first data acquisition device.

[0119] Step 704 : Determine second device data using the target rule identifier and the first measuring point identifier as a second target key and the second measuring point data as a second target value.

[0120] Since when generating the alarm record corresponding to the first data acquisition device, it is necessary to use the "target rule identifier and the first measuring point identifier" as the first target key to find the device data corresponding to the same target alarm rule from the relevant device database, therefore, in a possible implementation method, the second measuring point data also needs to use the target rule identifier and the first measuring point identifier as the second target key, and the second measuring point data as the second target value to generate the second device data and write it into the relevant device database.

[0121] Illustratively, the first device data may be expressed as “current1_ruleOverload”, and the second device data may be expressed as “current1_ruleOverload: meter B_current2:5”.

[0122] Step 705: Update the second device data to the relevant device database corresponding to the first data acquisition device.

[0123] Optionally, after generating the second device data, the second device data can be updated to the relevant device database corresponding to the first data acquisition device, so that when generating the alarm record corresponding to the first data acquisition device, the device data corresponding to the same target alarm rule can be found from the relevant device database.

[0124] In this embodiment, the second measuring point data collected by the second data acquisition device is written into the relevant device database corresponding to the first data acquisition device according to specific rules. Since the second device data and the first device data correspond to the same target key, the device data corresponding to the same target alarm rule can be found from the relevant device database based on the first device data, thereby improving the query efficiency of the device data.

[0125] Please refer to Figure 8, which shows a complete schematic diagram of the alarm record generation process shown in an exemplary embodiment of the present application. The alarm rule library contains an alarm rule: Circuit Overload (ruleOverload). This alarm rule applies to two measurement points: Current 1 of device meter A and Current 2 of device meter B. The alarm condition is: Current 1 + Current 2 > 10.

[0126] When meter A reports the current at measurement point 1, which is 8, the alarm rule library is queried and the alarm rule "circuit overload" is matched. Analysis of the alarm rule configuration shows that this alarm rule applies to both current 1 of meter A and current 2 of meter B. Therefore, the measurement point data is copied into two copies. The first copy, as the current measurement point stream, is sent to the Current Metric Kafka Topic with the key "current1_ruleOverload" and the value "8." Based on the key, the data is routed to partition 1 in the Current Metric Kafka Topic and subsequently consumed by alarm engine Server 1 as the current measurement point stream. The second set of data uses the current at point 1 as a related measurement point for the alarm rule ruleOverload for point 2. It is sent to the Relative Metrics Kafka Topic with the key current2_ruleOverload and the value {meterA_current1:8}. Based on the key, the data is routed to partition 2 in the RelativeMetrics Kafka Topic and subsequently consumed by Alarm Engine Server 2 as a related measurement point stream. A KTable indexed by the related measurement points is constructed in the local cache of Alarm Engine Server 2 to record the latest values ​​of the related measurement points. The KTable in Alarm Engine Server 2 is shown in Table 2:

[0127] Table 2

[0128] Key (measurement point_alarm rule) Value (value) the latest value of the relevant measurement point Current2_ruleOverload {Meter A_Current 1:8}

[0129] When meter B reports a current of 5 at measurement point 2, the alarm rule base is searched and the alarm rule "circuit overload" is matched. Similarly, the associated measurement point is determined to be current 1. Therefore, the data for this measurement point is copied into two copies. The first copy, as the current measurement point stream, is sent to the Current Metric Kafka Topic with the key "current2_ruleOverload" and the value "5." Based on the key, this data is routed to partition 2 in the Current Metric Kafka Topic and subsequently consumed by alarm engine Server 2 as the current measurement point stream. When consumed by alarm engine Server 2, current 2 is joined with the data with the same key in Server 2's KTable, resulting in the latest value of current 1 being 8. Therefore, current 1 + current 2 = 8 + 5 > 10, satisfying the alarm condition and generating an alarm. The second set of data uses the current at point 2 as a related measurement point for the alarm rule "ruleOverload" for point 1, and is sent to the Relative Metrics Kafka topic. The key is "current1_ruleOverload" and the value is {meter B_current2:5}. Based on the key, the data is routed to partition 1 in the Relative Metrics Kafka topic and subsequently consumed by Alarm Engine Server 1 as a related measurement point stream. At the same time, a KTable indexed by the related measurement points is constructed in the local cache of Alarm Engine Server 1 to record the latest values ​​of the related measurement points. This KTable in Alarm Engine Server 1 is shown in Table 3:

[0130] Table 3

[0131] Key (measurement point_alarm rule) Value (value) the latest value of the relevant measurement point Current1_ruleOverload {Meter A_Current 2:5}

[0132] When consumed by the alarm engine Server1, Current 1 will be joined with the data with the same key in Server 1KTable, and the latest value of Current 2 will be 5. Therefore: Current 1 + Current 2 = 8 + 5 > 10, which meets the alarm condition and generates an alarm.

[0133] Depend on Figure 8 It can be seen that in the process of generating alarm records, data backup is required, that is, by redundancy of the data of each measuring point, all measuring points in the alarm rule are routed to the same alarm engine server, thereby avoiding the process of querying the measuring point value across servers. Figure 8 For the alarm record generation process, please refer to Figure 9, which shows a schematic diagram of the alarm engine and device data storage locations in an exemplary embodiment of the present application. When measurement point Z reports a piece of data, it matches alarm rules 2 and 4. The measurement point values ​​associated with alarm rules 2 and 4 can be read from the local cache of alarm engine server 1, avoiding network I / O. Furthermore, because the alarm engine server only caches the latest value of each device measurement point, data redundancy does not consume excessive storage space.

[0134] Please refer to Figure 10 , which shows a structural block diagram of an alarm record generation device provided by an exemplary embodiment of the present application. The device includes:

[0135] An acquisition module 1001 is configured to acquire first device data, where the first device data is provided by a first data acquisition device;

[0136] A first determining module 1002 is configured to determine at least one second device data based on the first device data, where the second device data is provided by a second data acquisition device, and the first data acquisition device and the second data acquisition device correspond to the same target alarm rule;

[0137] The generating module 1003 is configured to generate an alarm record corresponding to the first data acquisition device in response to the first device data and at least one of the second device data satisfying the target alarm rule.

[0138] Optionally, the first device data is in a key-value pair format;

[0139] The first determining module 1002 includes:

[0140] The first determination unit is used to search for at least one second device data matching the first target key from a related device database based on the first target key in the first device data, and the related device database stores device data corresponding to the same alarm rule as the first data acquisition device.

[0141] Optionally, the generating module 1003 includes:

[0142] a second determining unit, configured to determine a first target value from the first device data, and to determine a second target value from at least one piece of the second device data;

[0143] A generating unit is configured to generate the alarm record corresponding to the first data acquisition device in response to the first target value and at least one of the second target values ​​satisfying the target alarm rule.

[0144] Optionally, the device further includes:

[0145] A first receiving module, configured to receive first measurement point data sent by the first data acquisition device;

[0146] A second determining module, configured to determine the target alarm rule based on the first measuring point data;

[0147] The third determination module is used to determine the first device data using the target rule identifier of the target alarm rule and the first measuring point identifier as the first target key and the first measuring point data as the first target value, where the first measuring point identifier is the device identifier corresponding to the first data acquisition device.

[0148] Optionally, the device further includes:

[0149] A second receiving module, configured to receive the second measuring point data sent by the second data acquisition device;

[0150] a fourth determining module, configured to determine the target alarm rule based on the second measuring point data;

[0151] a fifth determining module, configured to determine, based on the target alarm rule, the first data acquisition device corresponding to the same target alarm rule as the second data acquisition device;

[0152] a sixth determining module, configured to determine the second device data by using the target rule identifier and the first measuring point identifier as a second target key and the second measuring point data as a second target value;

[0153] An updating module is used to update the second device data to the relevant device database corresponding to the first data acquisition device.

[0154] Optionally, the device further includes:

[0155] a seventh determining module, configured to determine, based on the target alarm rule, the second data acquisition device corresponding to the same target alarm rule as the first data acquisition device;

[0156] The eighth determination module is used to determine the third device data using the target rule identifier and the second measuring point identifier as the third target key and the first measuring point data as the third target value. The second measuring point identifier is the device identifier corresponding to the second data acquisition device. The third device data is used to be stored in the relevant device database corresponding to the second data acquisition device. The third device data is used to generate an alarm record corresponding to the second data acquisition device.

[0157] Optionally, the acquisition module 1001 includes:

[0158] A reading unit, configured to read the first device data from Kstream in the streaming database;

[0159] The first determining module includes:

[0160] A search unit is configured to search for the second device data from the Ktable in the streaming database based on the first device data.

[0161] To sum up, in the embodiment of the present application, after the alarm device obtains the first device data corresponding to the first device, it can determine the second device data of the second device corresponding to the same target alarm rule as the first device based on the first device data, and then determine whether to trigger the target alarm rule through the first device data and at least one second device data, thereby achieving the purpose of joint alarm of multiple devices or multiple measuring points, providing an alarm method for complex alarm scenarios in Internet of Things application scenarios, and meeting the scenario requirements of abnormal monitoring of multiple measuring points.

[0162] It should be noted that the alarm record generation device provided in the above embodiment is merely an example of the division of the above-mentioned functional modules. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the alarm record generation device provided in the above embodiment and the alarm record generation method embodiment are based on the same concept. The specific implementation process is detailed in the method embodiment and will not be repeated here.

[0163] Please refer to Figure 11 , which shows a schematic diagram of the structure of an alarm device provided by an exemplary embodiment of the present application. The alarm device 1100 includes a central processing unit (CPU) 1101, a system memory 1104 including a random access memory (RAM) 1102 and a read-only memory (ROM) 1103, and a system bus 1105 connecting the system memory 1104 and the central processing unit 1101. The alarm device 1100 also includes a basic input / output system (I / O system) 1106 that helps transmit information between various components within the alarm device, and a large-capacity storage device 1107 for storing an operating system 1113, application programs 1114, and other program modules 1115.

[0164] The basic input / output system 1106 includes a display 1108 for displaying information and an input device 1109 such as a mouse and keyboard for user input. The display 1108 and the input device 1109 are both connected to the central processing unit 1101 via an input / output controller 1110 connected to the system bus 1105. The basic input / output system 1106 may also include an input / output controller 1110 for receiving and processing input from a variety of other devices such as a keyboard, mouse, or electronic stylus. Similarly, the input / output controller 1110 also provides output to a display screen, printer, or other types of output devices.

[0165] The mass storage device 1107 is connected to the central processing unit 1101 via a mass storage controller (not shown) connected to the system bus 1105. The mass storage device 1107 and its associated server-readable storage medium provide non-volatile storage for the alarm device 1100. In other words, the mass storage device 1107 may include a server-readable storage medium (not shown) such as a hard disk or a CD-ROM drive.

[0166] Without loss of generality, the server-readable storage medium may include server storage media and communication media. Server storage media include volatile and non-volatile, removable and non-removable media implemented by any method or technology for storing information such as server-readable storage instructions, data structures, program modules or other data. Server storage media include RAM, ROM, Erasable Programmable Read Only Memory (EPROM), Electronically Erasable Programmable Read-Only Memory (EEPROM), flash memory or other solid-state storage technology, CD-ROM, Digital Versatile Disc (DVD) or other optical storage or other optical storage, tape cassette, magnetic tape, disk storage or other magnetic storage device. Of course, those skilled in the art will appreciate that the server storage medium is not limited to the above-mentioned ones. The above-mentioned system memory 1104 and mass storage device 1107 can be collectively referred to as memory.

[0167] The memory stores one or more programs, and the one or more programs are configured to be executed by one or more central processing units 1101. The one or more programs contain instructions for implementing the above-mentioned model training method. The central processing unit 1101 executes the one or more programs to implement the methods provided by the above-mentioned various method embodiments.

[0168] According to various embodiments of the present application, the alarm device 1100 may also be connected to a remote server on a network via a network such as the Internet. That is, the alarm device 1100 may be connected to the network 1112 via the network interface unit 1111 connected to the system bus 1105. Alternatively, the network interface unit 1111 may be used to connect to other types of networks or remote server systems (not shown).

[0169] The memory also includes one or more programs, which are stored in the memory and include steps executed by the alarm device in the method provided in the embodiment of the present application.

[0170] An embodiment of the present application further provides a computer-readable medium storing at least one instruction, wherein the at least one instruction is loaded and executed by the processor to implement the alarm record generation method described in the above embodiments.

[0171] An embodiment of the present application further provides a computer program product, which stores at least one instruction, and the at least one instruction is loaded and executed by the processor to implement the alarm record generation method described in the above embodiments.

[0172] Those skilled in the art will appreciate that in one or more of the above examples, the functions described in the embodiments of the present application can be implemented using hardware, software, firmware, or any combination thereof. When implemented using software, these functions can be stored in a computer-readable medium or transmitted as one or more instructions or codes on a computer-readable medium. Computer-readable media include computer storage media and communication media, wherein communication media include any media that facilitates the transmission of computer programs from one place to another. The storage medium can be any available medium that can be accessed by a general-purpose or special-purpose computer.

[0173] The above description is merely an optional embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application shall be included in the scope of protection of the present application.

Claims

1. A method for generating an alarm record, characterized in that: The method comprises: receiving first measuring point data sent by a first data acquisition device, wherein the first measuring point data includes a set of key-value pairs, and the set of key-value pairs in the first measuring point data is used to describe measuring point information of the first data acquisition device; determining a target alarm rule based on the first measurement point data, wherein the target alarm rule is determined when a set of key-value pairs corresponding to a measurement point exists in the target alarm rule and matches a set of key-value pairs of the first measurement point data; Determine first device data using the target rule identifier of the target alarm rule and the first measuring point identifier as a first target key and the first measuring point data as a first target value, wherein the first measuring point identifier is a device identifier corresponding to the first data acquisition device; Acquiring the first device data; receiving second measuring point data sent by a second data acquisition device, wherein the second measuring point data includes a set of key-value pairs, and the set of key-value pairs in the second measuring point data is used to describe measuring point information of the second data acquisition device; determining the target alarm rule based on the second measuring point data, wherein the target alarm rule is determined when a set of key-value pairs corresponding to a measuring point exists in the target alarm rule and matches a set of key-value pairs of the second measuring point data; Based on the target alarm rule, determining the first data acquisition device corresponding to the same target alarm rule as the second data acquisition device; Determine second device data using the target rule identifier and the first measuring point identifier as a second target key and the second measuring point data as a second target value, wherein the first target key and the second target key are the same target key; Updating the second device data into the relevant device database corresponding to the first data acquisition device; Determining at least one piece of second device data in a related device database corresponding to the first data acquisition device based on the first target key in the first device data; In response to the first device data and at least one of the second device data satisfying the target alarm rule, an alarm record corresponding to the first data acquisition device is generated.

2. The method according to claim 1, characterized in that The step of generating an alarm record corresponding to the first data acquisition device in response to the first device data and at least one second device data satisfying the target alarm rule includes: determining a first target value from the first device data, and determining a second target value from at least one of the second device data; In response to the first target value and at least one of the second target values ​​satisfying the target alarm rule, the alarm record corresponding to the first data acquisition device is generated.

3. The method according to claim 1, characterized in that After determining the target alarm rule based on the first measurement point data, the method further includes: Based on the target alarm rule, determining the second data acquisition device corresponding to the same target alarm rule as the first data acquisition device; The third device data is determined using the target rule identifier and the second measuring point identifier as the third target key and the first measuring point data as the third target value. The second measuring point identifier is the device identifier corresponding to the second data acquisition device. The third device data is used to be stored in the relevant device database corresponding to the second data acquisition device. The third device data is used to generate an alarm record corresponding to the second data acquisition device.

4. The method according to claim 1 or 2, characterized in that The second device data is searched from the Ktable in the streaming database; The acquiring of the first device data includes: The first device data is read from Kstream in the streaming database.

5. An alarm record generating device, characterized in that: The device comprises: A first receiving module is configured to receive first measuring point data sent by a first data acquisition device, wherein the first measuring point data includes a set of key-value pairs, and the set of key-value pairs in the first measuring point data is used to describe measuring point information of the first data acquisition device; a second determining module, configured to determine a target alarm rule based on the first measuring point data, wherein the target alarm rule is determined when a set of key-value pairs corresponding to a measuring point exists in the target alarm rule and matches a set of key-value pairs of the first measuring point data; a third determining module, configured to determine first device data using the target rule identifier of the target alarm rule and the first measuring point identifier as a first target key and the first measuring point data as a first target value, wherein the first measuring point identifier is a device identifier corresponding to the first data acquisition device; An acquisition module, configured to acquire the first device data; A second receiving module is configured to receive second measuring point data sent by a second data acquisition device, wherein the second measuring point data includes a set of key-value pairs, and the set of key-value pairs in the second measuring point data is used to describe measuring point information of the second data acquisition device; a fourth determining module, configured to determine the target alarm rule based on the second measuring point data, the target alarm rule being determined when a set of key-value pairs corresponding to a measuring point exists in the target alarm rule and matches a set of key-value pairs of the second measuring point data; a fifth determining module, configured to determine, based on the target alarm rule, the first data acquisition device corresponding to the same target alarm rule as the second data acquisition device; a sixth determining module, configured to determine second device data using the target rule identifier and the first measuring point identifier as a second target key and the second measuring point data as a second target value, wherein the first target key and the second target key are the same target key; An updating module, configured to update the second device data to a related device database corresponding to the first data acquisition device; a first determining module, configured to determine at least one piece of second device data in a related device database corresponding to the first data acquisition device based on the first target key corresponding to the first device data; A generating module is configured to generate an alarm record corresponding to the first data acquisition device in response to the first device data and at least one of the second device data satisfying the target alarm rule.

6. An alarm device, characterized in that: The alarm device includes a processor and a memory, wherein the memory stores at least one program, and the at least one program is loaded and executed by the processor to implement the alarm record generation method according to any one of claims 1 to 4.

7. A computer-readable storage medium, characterized in that The computer-readable storage medium stores at least one program, and the at least one program is loaded and executed by a processor to implement the alarm record generation method according to any one of claims 1 to 4.

8. A computer program product, characterized in that The computer program product stores at least one instruction, and the at least one instruction is loaded and executed by a processor to implement the alarm record generation method according to any one of claims 1 to 4.

Citation Information

Patent Citations

  • Alarm method based on Internet of Things cloud platform, computer storage medium and equipment

    CN110661665A

  • Data processing method and device of Internet of Things equipment, electronic equipment and storage medium

    CN111917877A

  • Alarm information generation method and device, electronic equipment and readable storage medium

    CN113687969A