Alarm method and device based on real-time streaming data, electronic equipment and storage medium

By acquiring and parsing real-time streaming data, matching alarm rules and pushing alarm content, the reconstruction problem of the alarm system during changes is solved, the development and time cost is reduced, and flexible adaptation and efficient response are achieved.

CN120263619APending Publication Date: 2025-07-04LION AUTOMOTIVE TECH NANJING CO LTD +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510396024.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-31
Publication Date
2025-07-04

AI Technical Summary

Technical Problem

In the prior art, the alarm system needs to be readjusted or rebuilt when the alarm data, alarm rules and alarm channels change, resulting in excessive development and time costs.

Method used

By obtaining real-time streaming data, analyzing data formats, matching alarm rules, and using preset alarm channels to push alarm content, dynamic changes and comprehensive coverage are achieved.

Benefits of technology

It reduces the development and time cost of alarm systems, and achieves flexible adaptation and efficient response of alarm scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120263619A_ABST
    Figure CN120263619A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of alarm pushing, in particular to an alarm method and device based on real-time streaming data, electronic equipment and a storage medium. The method comprises the following steps: acquiring real-time streaming data; analyzing the real-time streaming data to obtain original data, matching a corresponding alarm rule according to the original data, and judging whether the original data triggers the corresponding alarm rule or not; and pushing alarm content based on a preset alarm channel under the condition that the original data triggers the corresponding alarm rule. Therefore, dynamic change can be carried out according to different real-time streaming data through the configurable alarm rule and the alarm channel, comprehensive coverage of the alarm scene is realized, the problem that an alarm system needs to be readjusted or even rebuilt when the alarm data, the alarm rule, the alarm channel and the like are changed in an alarm service scene is solved, and the alarm efficiency is improved. And the development cost and the time cost of the alarm system are reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of alarm push technology, and in particular to an alarm method, device, electronic device and storage medium based on real-time streaming data. Background Art

[0002] In modern enterprises, the real-time requirements for data are getting higher and higher. With the increasing number of real-time business scenarios, the demand for real-time alarms for such businesses is becoming more and more urgent.

[0003] In the related technology, for the alarm business scenario after massive data processing of the Internet of Vehicles, there is usually only one specific data input, one specific alarm rule and one specific alarm sending channel.

[0004] However, this method can only meet a fixed business scenario. When the alarm data, alarm rules, alarm channels, etc. in the business scenario change, the alarm system needs to be readjusted or even rebuilt, which greatly increases the time and development costs and needs to be solved urgently. Summary of the invention

[0005] The present application provides an alarm method, device, electronic device and storage medium based on real-time streaming data to solve the problem that in alarm business scenarios, when the alarm data, alarm rules, alarm channels, etc. change, the alarm system needs to be readjusted or even rebuilt, thereby reducing the development cost and time cost of the alarm system.

[0006] To achieve the above-mentioned purpose, the first embodiment of the present application proposes an alarm method based on real-time streaming data, comprising the following steps:

[0007] Acquire real-time streaming data, and parse the real-time streaming data to obtain original data;

[0008] Matching corresponding alarm rules according to the original data, and determining whether the original data triggers the corresponding alarm rules;

[0009] When the original data triggers the corresponding alarm rule, the alarm content is pushed based on the preset alarm channel.

[0010] According to an embodiment of the present application, parsing the real-time stream data to obtain original data includes:

[0011] determining a format of the real-time streaming data based on the real-time streaming data;

[0012] A corresponding parsing tool is determined based on the format of the real-time streaming data, and the real-time streaming data is parsed using the corresponding parsing tool to obtain the original data.

[0013] According to an embodiment of the present application, the obtaining of real-time stream data includes:

[0014] Determine multiple alarm data sources and multiple alarm methods, and configure the alarm source address and port;

[0015] And / or, create a program package for listening to alarm data based on a programming language;

[0016] Based on the multiple alarm data sources, multiple alarm methods, alarm source address and port, use the program package for listening to alarm data to obtain the real-time stream data.

[0017] According to an embodiment of the present application, before matching the corresponding alarm rules according to the original data, it further includes:

[0018] Determine at least one alarm sub-rule based on the multiple alarm data sources;

[0019] Combine the at least one alarm sub-rule to obtain a rule flow, and generate different alarm rules by adjusting the enabling status of each alarm sub-rule in the rule flow.

[0020] According to an embodiment of the present application, before pushing the alarm content based on the preset alarm channels, it further includes:

[0021] Develop an interface call program for multiple instant messaging tools;

[0022] Based on the interface call program for multiple instant messaging tools, call the corresponding instant messaging tools to generate the preset alarm channels, where different preset alarm channels are set with different push content templates.

[0023] According to the alarm method based on real-time stream data proposed by the embodiment of the present application, the original data can be obtained by obtaining and parsing the real-time stream data. Corresponding alarm rules can be matched according to the original data, and it can be determined whether the original data triggers the corresponding alarm rules; in the case where the original data triggers the corresponding alarm rules, the alarm content is pushed based on the preset alarm channels. Thus, through configurable alarm rules and alarm channels, dynamic changes can be made according to different real-time stream data, achieving comprehensive coverage of alarm scenarios, and solving the problem that in the alarm service scenario, when changes occur in alarm data, alarm rules, alarm channels, etc., the alarm system needs to be readjusted or even rebuilt, reducing the development cost and time cost of the alarm system.

[0024] To achieve the above object, an embodiment of the second aspect of the present application proposes an alarm device based on real-time stream data, including:

[0025] An obtaining module, configured to obtain real-time stream data and parse the real-time stream data to obtain original data;

[0026] A judgment module, configured to match corresponding alarm rules according to the original data, and judge whether the original data triggers the corresponding alarm rules;

[0027] An alarm module, configured to push alarm content based on a preset alarm channel when the original data triggers the corresponding alarm rules.

[0028] According to an embodiment of the present application, the obtaining module is specifically configured to:

[0029] Determine the format of the real-time stream data based on the real-time stream data;

[0030] Determine a corresponding parsing tool based on the format of the real-time stream data, and parse the real-time stream data using the corresponding parsing tool to obtain the original data.

[0031] According to an embodiment of the present application, the obtaining module is specifically configured to:

[0032] Determine multiple alarm data sources and multiple alarm methods, and configure alarm source addresses and ports;

[0033] And / or create a monitoring alarm data program package based on a programming language;

[0034] Based on the multiple alarm data sources, multiple alarm methods, alarm source addresses and ports, use the monitoring alarm data program package to obtain the real-time stream data.

[0035] According to an embodiment of the present application, before matching corresponding alarm rules according to the original data, the judgment module is further configured to:

[0036] Determine at least one alarm sub-rule based on the multiple alarm data sources;

[0037] Combine the at least one alarm sub-rule to obtain a rule flow, and generate different alarm rules by adjusting the enabling states of each alarm sub-rule in the rule flow.

[0038] According to an embodiment of the present application, before pushing alarm content based on the preset alarm channel, the alarm module is further configured to:

[0039] Develop interface call programs for multiple instant messaging tools;

[0040] Call corresponding instant messaging tools based on the interface call programs for the multiple instant messaging tools to generate the preset alarm channels, where different preset alarm channels are set with different push content templates.

[0041] The alarm device based on real-time streaming data proposed in the embodiments of the present application can obtain and parse the real-time streaming data to obtain the original data, match the corresponding alarm rules according to the original data, and determine whether the original data triggers the corresponding alarm rules; in the case where the original data triggers the corresponding alarm rules, the alarm content is pushed based on the preset alarm channels. Thus, through the configurable alarm rules and alarm channels, dynamic changes can be made according to different real-time streaming data, achieving comprehensive coverage of alarm scenarios, and solving the problem that in the alarm service scenario, when changes occur in alarm data, alarm rules, alarm channels, etc., the alarm system needs to be readjusted or even rebuilt, reducing the development cost and time cost of the alarm system.

[0042] To achieve the above object, an embodiment of the third aspect of the present application proposes an electronic device, including: a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor executes the program to implement the alarm method based on real-time streaming data as described in the above embodiments.

[0043] To achieve the above object, an embodiment of the fourth aspect of the present application proposes a computer-readable storage medium, on which a computer program is stored, and the program is executed by a processor to be used to implement the alarm method based on real-time streaming data as described in the above embodiments.

[0044] The additional aspects and advantages of the present application will be partially given in the following description, partially become obvious from the following description, or be understood through the practice of the present application. Description of the Drawings

[0045] The above and / or additional aspects and advantages of the present application will become obvious and easy to understand from the following description of the embodiments in conjunction with the drawings, where:

[0046] Figure 1 It is a flowchart of an alarm method based on real-time streaming data provided according to an embodiment of the present application;

[0047] Figure 2 It is a flowchart of a method for obtaining real-time streaming data according to an embodiment of the present application;

[0048] Figure 3 It is a flowchart of a method for configuring alarm rules according to an embodiment of the present application;

[0049] Figure 4 It is a flowchart of a method for configuring alarm channels according to an embodiment of the present application;

[0050] Figure 5 It is a flowchart of a method for creating an alarm item according to an embodiment of the present application;

[0051] Figure 6 FIG. Figure 6 is a block diagram of an alarm device based on real-time stream data according to an embodiment of the present application;

[0052] Figure 7 FIG. is a schematic structural diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0053] Embodiments of the present application will be described in detail below. Examples of the embodiments are shown in the accompanying drawings, where the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to explain the present application and should not be construed as limiting the present application.

[0054] A method, device, electronic device, and storage medium for alarm based on real-time stream data according to an embodiment of the present application will be described below with reference to the accompanying drawings.

[0055] Figure 1 FIG. Figure 1 is a flowchart of a method for alarm based on real-time stream data according to an embodiment of the present application.

[0056] Exemplarily, as Figure 1 shown, the method for alarm based on real-time stream data includes the following steps:

[0057] In step S101, real-time stream data is acquired, and the real-time stream data is parsed to obtain original data.

[0058] It can be understood that real-time stream data refers to a data sequence that is continuously generated at specific time intervals and has a time sequence. This data is usually generated at high speed, in large quantities, and continuously, and needs to be processed and analyzed within a short time after generation to obtain valuable information or trigger corresponding business logics.

[0059] Specifically, after acquiring the real-time stream data, in order to extract useful information from the real-time stream data, the real-time stream data can be parsed to extract the original data in the real-time stream data, so as to prepare for further analysis and processing.

[0060] As a possible implementation manner, in some embodiments, parsing the real-time stream data to obtain the original data includes: determining the format of the real-time stream data based on the real-time stream data; determining a corresponding parsing tool based on the format of the real-time stream data, and using the corresponding parsing tool to parse the real-time stream data to obtain the original data.

[0061] Specifically, the data format of real-time streaming data (such as JSON) can be determined according to the characteristics of the real-time streaming data. Then, based on the determined format of the real-time streaming data, a parsing tool that matches it can be further determined. Once the parsing tool is determined, this tool can be used to parse the real-time streaming data, and then convert these data into other forms, such as structured raw data, for further processing or analysis.

[0062] As a possible implementation method, in some embodiments, obtaining real-time streaming data includes: determining multiple alarm data sources and multiple alarm methods, and configuring alarm source addresses and ports; and / or creating a listening alarm data package based on a programming language; obtaining real-time streaming data by using the listening alarm data package based on multiple alarm data sources, multiple alarm methods, alarm source addresses and ports.

[0063] Specifically, the data sources (alarm data sources) covered by the real-time streaming data in the embodiments of the present application can cover the mainstream data of the current Internet system, including, for example, Kafka, RabbitMQ, RocketMQ, and ActiveMQ, etc. Among them, Kafka is an open-source stream processing platform used to build real-time data pipelines and stream applications. It can process high-throughput data and has high availability and durability. Kafka is often used to build real-time data pipelines and streaming applications, such as log aggregation, event sourcing, website activity tracking, operational metrics, log / data integration, etc. RabbitMQ is an open-source message broker software that implements the Advanced Message Queuing Protocol (AMQP), allowing applications to communicate with each other through message passing and supporting multiple message passing modes, including point-to-point and publish / subscribe. RocketMQ is a distributed message middleware that supports publish / subscribe mode and point-to-point message mode, and is suitable for building large-scale distributed systems for processing logs, cache synchronization, message distribution, etc. ActiveMQ is an open-source message broker and integration pattern server that supports multiple protocols, including JMS (Java Message Service), AMQP, MQTT (Message Queuing Telemetry Transport), etc., and is suitable for enterprise message passing and used to build a reliable message passing system. By configuring these systems with the alarm system, it is convenient to collect real-time streaming data from various data sources.

[0064] In addition to configuring the source of alarm data, the alarm methods can also be set, such as single alarm, batch alarm, etc., so as to handle flexibly according to actual requirements. In addition, the address and port number of the alarm source can also be configured to ensure that the alarm information can be sent accurately to the specified destination.

[0065] Furthermore, based on the development of parsing programs in JVM (Java Virtual Machine) virtual machine languages such as Java and Scala, developers can write a program package for listening to alarm data and upload it to the platform for hot deployment. Thus, the program package can start listening to the real-time data stream at any time. Once there is a real-time data stream entering, the listening program of the program package for listening to alarm data will be activated, and based on multiple alarm data sources, multiple alarm methods, the alarm source address and port, the real-time data stream can be obtained.

[0066] In step S102, corresponding alarm rules are matched according to the original data, and it is judged whether the original data triggers the corresponding alarm rules.

[0067] Specifically, after obtaining the original data, the information of the original data can be matched with a series of preset alarm rules. These alarm rules can be adapted to the real-time data streams from different data sources. Through this matching process, it can be identified whether the data meets the conditions defined by any one of the alarm rules. Once it is found that the original data meets the trigger condition of a certain alarm rule, the system can judge that the corresponding alarm rule has been triggered, and thus activate the corresponding alarm mechanism to notify relevant personnel or systems to take necessary countermeasures.

[0068] In step S103, when the original data triggers the corresponding alarm rule, the alarm content is pushed based on the preset alarm channels.

[0069] Specifically, when the original data triggers the corresponding alarm rule, the system can automatically push the alarm content based on the preset alarm channels in a timely manner to ensure that relevant personnel can quickly receive important alarm information.

[0070] For easy understanding, how to obtain the alarm rules will be described in detail below.

[0071] As a possible implementation manner, in some embodiments, before matching the corresponding alarm rules according to the original data, it further includes: determining at least one alarm sub-rule based on multiple alarm data sources; combining at least one alarm sub-rule to obtain a rule flow, and generating different alarm rules by adjusting the enabled state of each alarm sub-rule in the rule flow.

[0072] It can be understood that a rule flow refers to a process of combining multiple alarm sub-rules in a certain logical order, which defines the logical path for alarm triggering. The enabled state refers to whether the alarm sub-rule is in an enabled (activated) state or a disabled (not activated) state, and the enabled state determines whether the rule will trigger an alarm when the conditions are met. In the embodiments of the present application, an alarm rule is an alarm policy composed of one or more alarm sub-rules, which can be adjusted and customized according to different monitoring requirements.

[0073] Specifically, according to the source data model already set for the current alarm item and the specific requirements of each field, a series of dynamic alarm sub-rules can be configured in detail, including but not limited to field range rules (the data value is within a preset range), specific value rules (the data belongs to specific several values), and extreme value rules (the maximum or minimum of the data), etc. In addition, some mathematical function auxiliary rules can also be built in. Then, these sub-rules are combined to form a rule flow, that is, after the previous alarm sub-rule is satisfied, the next alarm sub-rule can be verified. When each alarm sub-rule in the adapted alarm rule passes the verification, the original data can pass and the alarm push service is called.

[0074] It should be noted that the difference between different alarm rules lies in the enabled state of each alarm sub-rule therein, that is, the state of the alarm sub-rule can be changed as needed and can be set to enabled or disabled, so that the alarm system can be flexibly adjusted to meet different monitoring requirements.

[0075] The following details how to obtain a preset alarm channel.

[0076] As a possible implementation manner, in some embodiments, before pushing alarm content based on a preset alarm channel, it further includes: developing interface call programs for multiple instant messaging tools; calling the corresponding instant messaging tools based on the interface call programs for multiple instant messaging tools to generate a preset alarm channel, where different preset alarm channels are set with different push content templates.

[0077] Specifically, the embodiments of the present application can integrate mainstream instant messaging tools on the current market, including but not limited to WeCom, Feishu, DingTalk, etc. By using the OpenAPI (Open Application Programming Interface) provided by these tools, the corresponding instant messaging tools can be called to generate preset alarm channels. In addition, among these preset alarm channels, users are allowed to design and customize the template of the alarm push content under certain constraint conditions, that is, users can flexibly define their own alarm channels to adapt to different business requirements and scenarios. When the raw data triggers the corresponding alarm rules, the system will automatically send the corresponding alarm content in real time according to the preset alarm channels to ensure that the information can be conveyed to the relevant personnel in a timely and accurate manner.

[0078] In addition, the embodiments of the present application also configure the alarm population, that is, users can achieve seamless docking with the internal organizational structure of the enterprise according to the characteristics of the enterprise instant messaging tool. In this way, users can easily obtain and manage the push population, and then perform precise push population configuration for specific alarm information. This function ensures that in case of an emergency or when it is necessary to notify a specific department, the relevant information can be quickly and accurately conveyed to the relevant personnel, thereby improving the response speed and processing efficiency of the enterprise.

[0079] Furthermore, the embodiments of the present application can also perform report statistics and content auditing on the sent alarm records to ensure meeting the strict requirements of data operation services, and at the same time provide necessary information for subsequent analysis and decision support.

[0080] To facilitate those skilled in the art to further understand the alarm method based on real-time stream data proposed by the embodiments of the present application, the following will be further elaborated in conjunction with Figures 2 to 5 for further illustration.

[0081] As Figure 2 shown, the method for obtaining real-time stream data may include the following steps:

[0082] In step S201, select the real-time stream data source.

[0083] That is, before starting to obtain real-time stream data, determine the source of the real-time stream data. These sources may include various data sources, such as Kafka, RabbitMQ, RocketMQ, and ActiveMQ, etc.

[0084] In step S202, set the source data format.

[0085] That is, set its format according to the characteristics of the data. For example, if the data is provided in JSON format, then the corresponding parsing tool needs to be set to process the JSON-formatted data.

[0086] In step S203, upload the program package for listening to alarm data.

[0087] This program package can be written based on programming languages such as Java or Scala and can be uploaded to the platform for hot deployment to process the data stream in real time.

[0088] In step S204, set the result data format.

[0089] That is, after processing the real-time stream data and obtaining the original data, the format of the result data can be set for subsequent analysis and processing. This may include converting the data into a structured form, such as a table or a record in a database.

[0090] Such as Figure 3 As shown, the configuration method of the alarm rule may include the following steps:

[0091] In step S301, set the alarm rule name.

[0092] That is, assign different names to different alarm rules for easy identification and management of different alarm rules.

[0093] In step S302, determine whether there is a source data configuration. If so, execute step S303; otherwise, execute step S306 and then step S303.

[0094] In step S303, select the source data format.

[0095] In step S304, select the attribute fields.

[0096] It can be understood that these fields are the key data points that the alarm rule needs to focus on and analyze.

[0097] In step S305, set the verification rule.

[0098] That is, define the specific conditions for triggering the alarm, that is, when the data meets which conditions, the alarm rule will be triggered. The verification rule may include field range rules, specific value rules, extreme value rules, etc.

[0099] In step S306, access the source data configuration.

[0100] Such as Figure 4 As shown, the configuration method of the alarm channel may include the following steps:

[0101] In step S401, set the name of the alarm channel.

[0102] In step S402, select an alarm channel tool.

[0103] That is, select one or more instant messaging tools as alarm channels, such as WeCom, Feishu, DingTalk, etc., and these tools will be used to send alarm notifications.

[0104] In step S403, determine whether there is a source data configuration. If so, execute step S404; otherwise, execute step S408 and then execute step S404.

[0105] In step S404, select a source data format.

[0106] That is, select a source data format that matches the alarm channel to ensure that alarm information can be correctly extracted from the source data and used for alarm notifications.

[0107] In step S405, select a push content template.

[0108] In step S406, set data field mapping.

[0109] That is, map specific fields in the source data to the alarm notification template to ensure the accuracy and relevance of the alarm information.

[0110] In step S407, select the alarm population.

[0111] That is, determine the target recipients of the alarm notification, namely the alarm population.

[0112] In step S408, access the source data configuration.

[0113] As Figure 5 shown, the method for creating an alarm item may include the following steps:

[0114] In step S501, set the alarm item name based on the business scenario.

[0115] In step S502, determine whether there is a source data configuration. If so, execute step S503; otherwise, execute step S509 and then execute step S503.

[0116] In step S503, select a source data format.

[0117] In step S504, determine whether there is an alarm rule. If so, execute step S505; otherwise, execute step S510 and then execute step S505.

[0118] In step S505, select an alarm rule.

[0119] In step S506, it is determined whether there is an alarm channel. If so, step S506 is executed; otherwise, step S511 is executed, and then step S506 is executed.

[0120] In step S507, the alarm channel is determined.

[0121] In step S508, the alarm is started.

[0122] In step S507, the source data configuration is accessed.

[0123] In step S510, the alarm rule is configured.

[0124] In step S511, the alarm push channel is configured.

[0125] According to the alarm method based on real-time stream data proposed in the embodiment of the present application, the original data can be obtained by acquiring and parsing the real-time stream data, the corresponding alarm rule can be matched according to the original data, and it can be determined whether the original data triggers the corresponding alarm rule; in the case where the original data triggers the corresponding alarm rule, the alarm content is pushed based on the preset alarm channel. Thus, through the configurable alarm rules and alarm channels, dynamic changes can be made according to different real-time stream data, achieving comprehensive coverage of alarm scenarios, solving the problem that in the alarm service scenario, when the alarm data, alarm rules, alarm channels, etc. change, the alarm system needs to be readjusted or even rebuilt, and reducing the development cost and time cost of the alarm system.

[0126] Next, the alarm device based on real-time stream data proposed in the embodiment of the present application is described with reference to the accompanying drawings.

[0127] Figure 6 It is a block diagram of an alarm device based on real-time stream data according to an embodiment of the present application.

[0128] As Figure 6 shown, the alarm device 10 based on real-time stream data includes: an acquisition module 100, a judgment module 200, and an alarm module 300.

[0129] Among them, the acquisition module 100 is used to acquire real-time stream data and parse the real-time stream data to obtain the original data;

[0130] The judgment module 200 is used to match the corresponding alarm rule according to the original data and determine whether the original data triggers the corresponding alarm rule;

[0131] The alarm module 300 is used to push the alarm content based on the preset alarm channel in the case where the original data triggers the corresponding alarm rule.

[0132] Further, in some embodiments, the acquisition module 100 is specifically used for:

[0133] Determine the format of the real-time streaming data based on the real-time streaming data;

[0134] Determine the corresponding parsing tool based on the format of the real-time streaming data, and use the corresponding parsing tool to parse the real-time streaming data to obtain the original data.

[0135] Further, in some embodiments, the obtaining module 100 is specifically configured to:

[0136] Determine multiple alarm data sources and multiple alarm methods, and configure the alarm source address and port;

[0137] And / or, create a monitoring alarm data package based on the programming language;

[0138] Based on multiple alarm data sources, multiple alarm methods, the alarm source address and port, use the monitoring alarm data package to obtain the real-time streaming data.

[0139] Further, in some embodiments, before matching the corresponding alarm rules according to the original data, the judging module 200 is further configured to:

[0140] Determine at least one alarm sub-rule based on multiple alarm data sources;

[0141] Combine at least one alarm sub-rule to obtain a rule flow, and generate different alarm rules by adjusting the enabling status of each alarm sub-rule in the rule flow.

[0142] Further, in some embodiments, before pushing the alarm content based on the preset alarm channels, the alarm module 300 is further configured to:

[0143] Develop interface call programs for multiple instant messaging tools;

[0144] Based on the interface call programs for multiple instant messaging tools, call the corresponding instant messaging tools to generate preset alarm channels, where different preset alarm channels are set with different push content templates.

[0145] It should be noted that the foregoing explanation of the embodiments of the alarm method based on real-time streaming data also applies to the alarm device based on real-time streaming data of this embodiment, and will not be elaborated here.

[0146] The alarm device based on real-time stream data proposed according to the embodiments of the present application can obtain and parse the real-time stream data to obtain the original data, match the corresponding alarm rules according to the original data, and determine whether the original data triggers the corresponding alarm rules; in the case where the original data triggers the corresponding alarm rules, the alarm content is pushed based on a preset alarm channel. Thus, through configurable alarm rules and alarm channels, dynamic changes can be made according to different real-time stream data, achieving comprehensive coverage of alarm scenarios, and solving the problem that in the alarm service scenario, when the alarm data, alarm rules, alarm channels, etc. change, the alarm system needs to be readjusted or even rebuilt, reducing the development cost and time cost of the alarm system.

[0147] Figure 7 The following is a schematic structural diagram of an electronic device provided by an embodiment of the present application. The electronic device may include:

[0148] A memory 701, a processor 702, and a computer program stored on the memory 701 and executable on the processor 702.

[0149] When the processor 702 executes the program, it implements the alarm method based on real-time stream data provided in the above embodiment.

[0150] Further, the electronic device further includes:

[0151] A communication interface 703 for communication between the memory 701 and the processor 702.

[0152] The memory 701 is used to store a computer program executable on the processor 702.

[0153] The memory 701 may include a high-speed RAM (Random Access Memory) memory, and may also include a non-volatile memory, such as at least one disk memory.

[0154] If the memory 701, the processor 702, and the communication interface 703 are implemented independently, the communication interface 703, the memory 701, and the processor 702 can be interconnected through a bus and communicate with each other. The bus may be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus, or an EISA (Extended Industry Standard Architecture) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For the sake of representation, Figure 7It is represented by only one thick line, but it does not mean that there is only one bus or one type of bus.

[0155] Optionally, in a specific implementation, if the memory 701, the processor 702, and the communication interface 703 are integrated on a single chip, the memory 701, the processor 702, and the communication interface 703 can communicate with each other through an internal interface.

[0156] The processor 702 may be a CPU (Central Processing Unit), or an ASIC (Application Specific Integrated Circuit), or one or more integrated circuits configured to implement the embodiments of the present application.

[0157] The embodiments of the present application also provide a computer-readable storage medium, on which a computer program is stored, and when the program is executed by a processor, the warning method based on real-time stream data as described above is implemented.

[0158] In addition, the terms "first" and "second" are used for descriptive purposes only, and cannot be construed as indicating or implying relative importance or implicitly specifying the quantity of the indicated technical features. Thus, the features defined with "first" and "second" may explicitly or implicitly include at least one of the features. In the description of the present application, the meaning of "a plurality" is at least two, such as two, three, etc., unless otherwise specifically defined.

[0159] In the description of this specification, the descriptions with reference to the terms "an embodiment", "some embodiments", "an example", "a specific example", or "some examples", etc. mean that the specific features, structures, materials, or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representations of the above terms are not necessarily directed to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, without conflict, those skilled in the art can combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples.

[0160] Although the embodiments of the present application have been shown and described above, it can be understood that the above embodiments are exemplary and cannot be construed as limiting the present application. Those of ordinary skill in the art can make changes, modifications, substitutions, and variations to the above embodiments within the scope of the present application.

Claims

1. An alarm method based on real-time stream data, characterized in that, It includes the following steps: Obtain real-time stream data, and parse the real-time stream data to obtain raw data; Match corresponding alarm rules according to the raw data, and determine whether the raw data triggers the corresponding alarm rules; When the raw data triggers the corresponding alarm rules, push alarm content based on a preset alarm channel.

2. The method according to claim 1, wherein The parsing the real-time stream data to obtain raw data includes: Determine the format of the real-time stream data based on the real-time stream data; Determine a corresponding parsing tool based on the format of the real-time stream data, and use the corresponding parsing tool to parse the real-time stream data to obtain the raw data.

3. The method according to claim 1, wherein The obtaining the real-time stream data includes: Determine multiple alarm data sources and multiple alarm methods, and configure alarm source addresses and ports; And / or, create a monitoring alarm data package based on a programming language; Based on the multiple alarm data sources, multiple alarm methods, alarm source addresses and ports, use the monitoring alarm data package to obtain the real-time stream data.

4. The method according to claim 3, wherein Before matching corresponding alarm rules according to the raw data, it further includes: Determine at least one alarm sub-rule based on the multiple alarm data sources; Combine the at least one alarm sub-rule to obtain a rule flow, and generate different alarm rules by adjusting the enabling status of each alarm sub-rule in the rule flow.

5. The method according to claim 1, wherein Before pushing alarm content based on the preset alarm channel, it further includes: Develop interface call programs for multiple instant messaging tools; Based on the interface call programs for the multiple instant messaging tools, call the corresponding instant messaging tools to generate the preset alarm channels, where different preset alarm channels are set with different push content templates.

6. An alarm device based on real-time streaming data, characterized in that, It includes: An obtaining module, configured to obtain real-time stream data, and parse the real-time stream data to obtain raw data; A judging module, configured to match corresponding alarm rules according to the raw data, and determine whether the raw data triggers the corresponding alarm rules; An alarm module, configured to push alarm content based on a preset alarm channel when the raw data triggers the corresponding alarm rules.

7. The device according to claim 6, characterized in that, The obtaining module specifically is configured to: Determine the format of the real-time stream data based on the real-time stream data; Determine a corresponding parsing tool based on the format of the real-time stream data, and use the corresponding parsing tool to parse the real-time stream data to obtain the raw data.

8. The device according to claim 6, characterized in that, The obtaining module specifically is configured to: Determine multiple alarm data sources and multiple alarm methods, and configure alarm source addresses and ports; And / or, create a monitoring alarm data package based on a programming language; Based on the multiple alarm data sources, multiple alarm methods, alarm source addresses and ports, use the monitoring alarm data package to obtain the real-time stream data.

9. An electronic device, characterized in that, It includes: A memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor executes the program to implement the alarm method based on real-time stream data according to any one of claims 1-5.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, The program is executed by the processor to be used for implementing the alarm method based on real-time stream data according to any one of claims 1-5.