A data early warning method, device, medium and equipment

Through the method based on flow calculation, complex early warning rules are constructed and multi-input source data is monitored in real time, which solves the problems of multi-input source data monitoring and rule design in the existing technology, and improves the accuracy and application scenarios of data early warning.

CN114356735BActive Publication Date: 2025-03-11ZHEJIANG GEESPACE TECH CO LTD +1
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202111664779.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-31
Publication Date
2025-03-11
Estimated Expiration
2041-12-31

AI Technical Summary

Technical Problem

Existing data early warning technologies are difficult to meet the real-time monitoring and complex rule design requirements of multi-input source data, resulting in limited warning accuracy and application scenarios.

Method used

Using a massive multi-source data early warning method based on flow calculation, we obtain real-time data from multiple input sources through message queues, and build complex early warning rules, including logical calculations and time window aggregation calculations, monitoring data flow in real time and issuing early warning messages.

Benefits of technology

Real-time monitoring of multiple input source data is realized, the accuracy and application scenarios of data warning are improved, and the needs of complex rule design are met.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114356735B_ABST
    Figure CN114356735B_ABST
Patent Text Reader

Abstract

The present disclosure relates to a data warning method, device, medium and equipment, the method comprising: obtaining a message queue, the message queue comprising a plurality of message topics, each of the message topics corresponding to an input source, the message topic being data uploaded by the input source in real time; obtaining a specified message topic in the message queue to obtain a first data stream; obtaining a pre-built warning rule corresponding to the first data stream; monitoring the first data stream, and issuing a warning message when the first data stream does not comply with the warning rule. The data warning method provided in this specification can solve the problem of multiple input sources, realize real-time monitoring of data from multiple input sources, improve the accuracy of data warnings from multiple input sources, and improve the application scenarios of data warnings.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of data early warning technology, and in particular to a data early warning method, device, medium and equipment. Background Art

[0002] Data warning is to monitor the data reported by the terminal device in real time according to the rules defined by the user, and warn the user if data that does not meet the rules is found. Existing data warning technologies can usually only implement simple warning rules, such as threshold judgment of a single device. However, with the development of big data and the Internet of Things, the types and number of devices connected to the system have increased significantly, and simple data warning rules cannot fully meet the needs of users. Therefore, the present invention proposes a massive multi-source data warning method based on stream computing, which can monitor multiple input source data in real time, and at the same time, combined with the stream computing engine, supports complex rule design including logical calculations and time window aggregation calculations. Summary of the invention

[0003] In a first aspect, the present disclosure provides a data early warning method, the method comprising:

[0004] Obtain a message queue, the message queue including a plurality of message topics, each of the message topics corresponds to an input source, and the message topic is data uploaded by the input source in real time;

[0005] Obtaining a specified message topic in the message queue to obtain a first data stream;

[0006] Acquire a pre-built warning rule corresponding to the first data stream;

[0007] The first data flow is monitored, and a warning message is issued when the first data flow does not comply with the warning rule.

[0008] Furthermore, the warning rule is established in the following manner:

[0009] Selecting a target input source from a product list, wherein the product list includes input sources corresponding to the message subject, each of the input sources including at least one device;

[0010] Select a specified number of devices from the target input source;

[0011] Set the time window for the metric statistics of each device according to the selected device;

[0012] Establishing indicator expressions corresponding to warning rules for each device based on the time window;

[0013] Selecting the next input source in the product list as the target input source;

[0014] Repeat the following steps: select a specified number of devices from the target input source; set a time window for the indicator statistics corresponding to each device according to the selected devices; and establish an indicator expression corresponding to the early warning rule of each device based on the time window until the creation of indicator expressions is completed for all input sources in the product list.

[0015] Further, the obtaining of a pre-built warning rule corresponding to the first data stream includes:

[0016] Obtaining an indicator expression for each device in each input source according to the input source corresponding to the first data stream;

[0017] Creating a logical combination expression of early warning indicators based on the association relationship between each device in each of the input sources, wherein the logical combination expression of the early warning indicators includes indicator expressions of multiple devices;

[0018] Correspondingly, the monitoring of the first data flow and issuing a warning message when the first data flow does not comply with the warning rule includes:

[0019] The first data stream is monitored, and when the first data stream does not conform to the logical combination expression, an early warning message is issued.

[0020] Furthermore, the method further comprises: monitoring the first data stream, and before issuing a warning message when the first data stream does not conform to the logical combination expression:

[0021] Verify whether the Boolean value of the logical combination expression meets the preset requirements;

[0022] Correspondingly, the monitoring of the first data stream and issuing of an early warning message when the first data stream does not conform to the logical combination expression is performed when the Boolean value of the logical combination expression conforms to a preset requirement.

[0023] Further, the warning rule includes a plurality of logical combination expressions; the monitoring the first data stream and issuing a warning message when the first data stream does not comply with the warning rule includes:

[0024] Extract the first data stream based on the pre-built filter function, window function and aggregate function to obtain a second data stream of each logical combination expression;

[0025] Returning the union of all non-Null values ​​calculated in the second data stream and specified by the expression based on the union function, to obtain a third data stream;

[0026] When each of the third data flows does not comply with the corresponding warning rule, a warning message is issued.

[0027] In a second aspect, the present disclosure provides a data early warning device, the device comprising:

[0028] A message queue acquisition module is used to acquire a message queue, wherein the message queue includes a plurality of message topics, each of which corresponds to an input source, and the message topic is data uploaded by the input source in real time;

[0029] A first data stream determining module, configured to obtain a specified message topic in the message queue to obtain a first data stream;

[0030] An early warning rule acquisition module, used to acquire a pre-built early warning rule corresponding to the first data stream;

[0031] The early warning module is used to monitor the first data flow and issue an early warning message when the first data flow does not comply with the early warning rule.

[0032] Furthermore, the warning rule is established in the following manner:

[0033] Selecting a target input source from a product list, wherein the product list includes input sources corresponding to the message subject, each of the input sources including at least one device;

[0034] Select a specified number of devices from the target input source;

[0035] Set the time window for the metric statistics of each device according to the selected device;

[0036] Establishing indicator expressions corresponding to warning rules for each device based on the time window;

[0037] Selecting the next input source in the product list as the target input source;

[0038] Repeat the following steps: select a specified number of devices from the target input source; set a time window for indicator statistics corresponding to each device according to the selected devices; and establish an indicator expression corresponding to each device warning rule based on the time window until the creation of indicator expressions is completed for all input sources in the product list.

[0039] Furthermore, the warning rule acquisition module includes:

[0040] An indicator expression acquisition unit, used to acquire an indicator expression for each device in each input source according to the input source corresponding to the first data stream;

[0041] A logical combination expression creation unit, used to create a logical combination expression of the early warning indicator based on the association relationship between each device in each of the input sources, wherein the logical combination expression of the early warning indicator includes indicator expressions of multiple devices;

[0042] Correspondingly, the early warning module is specifically used to monitor the first data flow, and issue an early warning message when the first data flow does not conform to the logical combination expression.

[0043] In a third aspect, the present disclosure provides a computer-readable storage medium, in which at least one instruction or at least one program is stored, and the at least one instruction or at least one program is loaded and executed by a processor to implement the data warning method as described above.

[0044] In a fourth aspect, the present disclosure provides an electronic device comprising at least one processor and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the at least one processor implements the data warning method as described above by executing the instructions stored in the memory.

[0045] The technical solution provided by the embodiments of the present disclosure brings at least the following beneficial effects:

[0046] The embodiments of this specification provide a data warning method, device, medium and equipment, which obtain a message queue through a stream computing engine, wherein the message queue includes multiple message topics, each of which corresponds to an input source, and the message topic is the data uploaded by the input source in real time; obtain a specified message topic in the message queue to obtain a first data stream; obtain a pre-built warning rule corresponding to the first data stream by traversing the indicators of the warning rule; and then monitor the first data stream in real time, and issue a warning message when the first data stream does not comply with the warning rule. The data warning method provided in this specification can solve the problem of multiple input sources, realize real-time monitoring of multiple input source data, improve the accuracy of data warnings for multiple input sources, and improve the application scenarios of data warnings.

[0047] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] The drawings herein are incorporated into and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the description are used to explain the principles of the present disclosure, and do not constitute improper limitations on the present disclosure.

[0049] Figure 1 is a flow chart of a data early warning method according to an exemplary embodiment;

[0050] Figure 2 This is a process of another data early warning method according to an exemplary embodiment;

[0051] Figure 3 is a block diagram of a data early warning device according to an exemplary embodiment;

[0052] Figure 4 It is a block diagram of an electronic device for data early warning according to an exemplary embodiment. DETAILED DESCRIPTION

[0053] In order to enable ordinary persons in the art to better understand the technical solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the accompanying drawings.

[0054] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.

[0055] In order to better understand this application, the following terms are explained first:

[0056] Stream computing: Acquire massive amounts of data from different data sources in real time, and obtain valuable information through real-time analysis and processing.

[0057] A Boolean value is either True or False. ActionScript also converts the values ​​True and False to 1 and 0 when appropriate. Boolean values ​​are often used with logical operators in ActionScript statements to control the flow of scripts through comparisons.

[0058] Stream computing engine: such as big data real-time computing engines such as Flink and Spark.

[0059] Multi-source input: refers to multiple input source products, not simply multiple terminal device access, because one product may have multiple access devices.

[0060] Time window: calculate the maximum, minimum, sum, and average of the attributes within the window period.

[0061] Figure 1is a flow chart of a data early warning method provided in an embodiment of this specification, such as Figure 1 As shown, a data early warning method provided in an embodiment of this specification may include:

[0062] S102: Acquire a message queue, wherein the message queue includes a plurality of message topics, each of the message topics corresponds to an input source, and the message topic is data uploaded by the input source in real time.

[0063] Specifically, the input source reports real-time data to the message queue, and one input source corresponds to a unique message topic. The stream computing engine obtains the monitored input source list, listens to the message topic queue corresponding to the input source list through the message listener, and obtains real-time data from multiple input sources in real time.

[0064] S104: Obtain a specified message topic in the message queue to obtain a first data stream.

[0065] Specifically, the user can select one or more message subjects to be detected in the message queue, and multiple message bodies form a first data stream. It is understandable that the first data stream may include data uploaded in real time by multiple input sources.

[0066] Specifically, the specified message topic can be the data uploaded by the input source corresponding to the warning rule specified by the user. In actual applications, the indicators in the warning rule can be traversed to obtain the input source product list. The stream computing engine obtains the real-time data of the input source by creating a message listener and forms the first data stream.

[0067] S106, obtaining a pre-built warning rule corresponding to the first data stream;

[0068] Specifically, the first data stream may include message topics corresponding to multiple different input sources, and each input source may have multiple devices.

[0069] In an alternative embodiment, see Figure 2 , the warning rule is established in the following way:

[0070] S202, selecting a target input source in a product list, wherein the product list includes input sources corresponding to the message subject, each of the input sources including at least one device;

[0071] S204, selecting a specified number of devices from the target input source;

[0072] S206, setting a time window for the statistics of indicators corresponding to each device according to the selected device;

[0073] S208, establishing an indicator expression corresponding to each device warning rule based on the time window;

[0074] S210, selecting the next input source in the product list as the target input source;

[0075] S212, repeat the following steps: select a specified number of devices from the target input source; set a time window for the indicator statistics corresponding to each device according to the selected devices; and establish an indicator expression corresponding to the early warning rule of each device based on the time window until the creation of indicator expressions is completed for all input sources in the product list.

[0076] Specifically, the time window can be understood as calculating the maximum value, minimum value, sum and / or average value of the attribute within the window period. The calculated content can be the data corresponding to the corresponding device in the data stream, which can be the message subject or the data generated by a specific device.

[0077] When establishing corresponding warning rules for each device, you can set time windows for each device of the input source in turn, and then build corresponding indicator expressions, which are used to generate warnings when data non-compliance is detected. It is understandable that different devices can have the same indicator expression or different indicator expressions. There can be multiple indicators in the indicator expression, and different indicators are used to indicate different calculation rules.

[0078] Specifically, the warning rule design method of the present invention includes warning indicator design and warning indicator rule design. The purpose of the layered design is to achieve a clearer architecture and reuse of warning indicators.

[0079] The user first needs to define one or more early warning indicators, which include input source products, equipment list, time window, product attributes, and early warning indicator expressions; the user selects a product from the product list, then selects some devices from the existing devices corresponding to the product as the equipment list, then determines the calculation time window and product attributes, and finally enters the expression of the early warning indicator. The expression operators include four aggregation functions: maximum value MAX, minimum value MIN, average AVG, and sum SUM; five size comparison operators: greater than >, less than <, equal to =, greater than or equal to > =, less than or equal to < =; and &&, or || logical operators and brackets () operators.

[0080] It should be noted that different devices may correspond to different time windows. The specific time of the time window can be set according to actual needs, specifically, according to the flow of the data flow. For example, if the flow of the data flow is large, the corresponding time window can be relatively short. Similarly, if the flow of the data flow is small, the corresponding time window can be relatively long.

[0081] In an optional embodiment, the obtaining of a pre-built warning rule corresponding to the first data stream includes:

[0082] Obtaining an indicator expression for each device in each input source according to the input source corresponding to the first data stream;

[0083] Specifically, each input source may include multiple devices, each device is capable of generating data, and each device may have a corresponding indicator expression, which is used to monitor whether the data of the device generates an early warning.

[0084] A logical combination expression of early warning indicators is created based on the association relationship between each device in each of the input sources, and the logical combination expression of the early warning indicators includes indicator expressions of multiple devices.

[0085] Specifically, there will be corresponding associations between different devices, and the associations can be dependencies. Accordingly, the logical combination expressions of warning indicators can be created based on the dependencies of each device. For example, after the user completes the design of warning indicators, the warning indicators need to be combined to form warning indicator rules. The rules support &&, or || logical operators and bracket () operators. For example, the logical combination expression is MAX>200&&AVG>100, which means the traffic data with a maximum value greater than 200 and an average value greater than 100 in a time window.

[0086] S108: Monitor the first data flow, and issue a warning message when the first data flow does not comply with the warning rule.

[0087] Correspondingly, the monitoring of the first data flow and issuing a warning message when the first data flow does not comply with the warning rule includes:

[0088] The first data stream is monitored, and when the first data stream does not conform to the logical combination expression, an early warning message is issued.

[0089] In an optional embodiment, the method further comprises: monitoring the first data stream, and before issuing a warning message when the first data stream does not conform to the logical combination expression:

[0090] Verify whether the Boolean value of the logical combination expression meets the preset requirements;

[0091] Correspondingly, the monitoring of the first data stream and issuing of an early warning message when the first data stream does not conform to the logical combination expression is performed when the Boolean value of the logical combination expression conforms to a preset requirement.

[0092] Specifically, the various indicator expressions in the created logical combination expression may not be able to jointly warn of the data. The embodiment of this specification verifies the Boolean value of each indicator expression of the logical combination expression, and only monitors the first data stream when the logical combination expression meets the preset requirements. When the first data stream does not meet the logical combination expression, a warning message is issued.

[0093] In an optional embodiment, the warning rule includes a plurality of logical combination expressions; the monitoring the first data stream and issuing a warning message when the first data stream does not comply with the warning rule includes:

[0094] Extract the first data stream based on the pre-built filter function, window function and aggregate function to obtain a second data stream of each logical combination expression;

[0095] Returning the union of all non-Null values ​​calculated in the second data stream and specified by the expression based on the union function, to obtain a third data stream;

[0096] When each of the third data flows does not comply with the corresponding warning rule, a warning message is issued.

[0097] Specifically, the stream computing engine obtains the second data stream of each logical combination expression or indicator expression from the real-time data stream through the filter function, the window function and the aggregate function.

[0098] Calculate the Boolean value of the attribute expression corresponding to the indicator expression: Each indicator data stream calculates the Boolean value of each warning indicator expression. Then combine the second data stream: the calculation engine combines the aggregation results of each indicator through the union function to obtain the third data stream.

[0099] Indicator combination logic result: The data stream is combined to update the calculation result of the indicator in real time through the map function. If the result of the indicator combination logic is true, an early warning message is sent.

[0100] A data warning method provided in an embodiment of this specification obtains a message queue through a stream computing engine, wherein the message queue includes multiple message topics, each of which corresponds to an input source, and the message topic is data uploaded by the input source in real time; a specified message topic is obtained in the message queue to obtain a first data stream; a pre-built warning rule corresponding to the first data stream is obtained by traversing the indicators of the warning rule; the first data stream can then be monitored in real time, and a warning message is issued when the first data stream does not comply with the warning rule. The data warning method provided in this specification can solve the problem of multiple input sources, realize real-time monitoring of data from multiple input sources, improve the accuracy of data warnings from multiple input sources, and improve the application scenarios of data warnings.

[0101] In addition, the implementation of this paper solves the problem of user-defined rule design. The rule design needs to support bracket operators, AND or OR logical operators, and time window aggregation calculations. The established function can parse the rules and generate corresponding stream computing tasks. It further verifies whether the warning rules are accurate and ensures the accuracy of the warning.

[0102] In another aspect, the present disclosure provides a data early warning device, Figure 3 is a block diagram of a data early warning device according to an exemplary embodiment, referring to Figure 3 , the device comprises:

[0103] The message queue acquisition module 301 is used to acquire a message queue, wherein the message queue includes a plurality of message topics, each of which corresponds to an input source, and the message topic is data uploaded by the input source in real time;

[0104] A first data stream determining module 302, configured to obtain a specified message topic in the message queue to obtain a first data stream;

[0105] An early warning rule acquisition module 303 is used to acquire a pre-built early warning rule corresponding to the first data stream;

[0106] The warning module 304 is used to monitor the first data flow and issue a warning message when the first data flow does not comply with the warning rule.

[0107] Based on the above embodiment, in one embodiment of this specification, the warning rule is established in the following manner:

[0108] Selecting a target input source from a product list, wherein the product list includes input sources corresponding to the message subject, each of the input sources including at least one device;

[0109] Select a specified number of devices from the target input source;

[0110] Set the time window for the metric statistics of each device according to the selected device;

[0111] Establishing indicator expressions corresponding to warning rules for each device based on the time window;

[0112] Selecting the next input source in the product list as the target input source;

[0113] Repeat the following steps: select a specified number of devices from the target input source; set a time window for indicator statistics corresponding to each device according to the selected devices; and establish an indicator expression corresponding to each device warning rule based on the time window until the creation of indicator expressions is completed for all input sources in the product list.

[0114] Based on the above embodiment, in one embodiment of this specification, the warning rule acquisition module includes:

[0115] An indicator expression acquisition unit, used to acquire an indicator expression for each device in each input source according to the input source corresponding to the first data stream;

[0116] A logical combination expression creation unit, used to create a logical combination expression of the early warning indicator based on the association relationship between each device in each of the input sources, wherein the logical combination expression of the early warning indicator includes indicator expressions of multiple devices;

[0117] Correspondingly, the early warning module is specifically used to monitor the first data flow, and issue an early warning message when the first data flow does not conform to the logical combination expression.

[0118] A data warning device provided in an embodiment of this specification obtains a message queue through a stream computing engine, wherein the message queue includes multiple message topics, each of which corresponds to an input source, and the message topic is data uploaded by the input source in real time; a specified message topic is obtained in the message queue to obtain a first data stream; a pre-built warning rule corresponding to the first data stream is obtained by traversing the indicators of the warning rule; the first data stream can then be monitored in real time, and a warning message is issued when the first data stream does not comply with the warning rule. The data warning method provided in this specification can solve the problem of multiple input sources, realize real-time monitoring of data from multiple input sources, improve the accuracy of data warnings from multiple input sources, and improve the application scenarios of data warnings.

[0119] In addition, the implementation of this paper solves the problem of user-defined rule design. The rule design needs to support bracket operators, AND or OR logical operators, and time window aggregation calculations. The established function can parse the rules and generate corresponding stream computing tasks. It further verifies whether the warning rules are accurate and ensures the accuracy of the warning.

[0120] Figure 4 is a block diagram of an electronic device for data early warning according to an exemplary embodiment. The electronic device may be a terminal or a monitoring system. The internal structure diagram thereof may be as shown in FIG. Figure 4 As shown. The electronic device includes a processor, a memory, a network interface, a display screen and an input device connected via a system bus. Among them, the processor of the electronic device is used to provide computing and control capabilities. The memory of the electronic device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the electronic device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, a method for data early warning is implemented. The display screen of the electronic device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the electronic device can be a touch layer covering the display screen, or a key, trackball or touchpad provided on the housing of the electronic device, or an external keyboard, touchpad or mouse, etc.

[0121] Those skilled in the art will understand that Figure 4 The structure shown in the figure is merely a block diagram of a partial structure related to the scheme of the present disclosure, and does not constitute a limitation on the electronic device to which the scheme of the present disclosure is applied. The specific electronic device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0122] In an exemplary embodiment, an electronic device is also provided, comprising: a processor; and a memory for storing instructions executable by the processor; wherein the processor is configured to execute the instructions to implement the data early warning method as in the embodiment of the present disclosure.

[0123] In an exemplary embodiment, a computer-readable storage medium is also provided, and when the instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the data early warning method in the embodiment of the present disclosure. The computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.

[0124] In an exemplary embodiment, a computer program product containing instructions is also provided. When the computer program product is run on a computer, the computer is caused to execute the data early warning method in the embodiment of the present disclosure.

[0125] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0126] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.

[0127] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims

1. A data early warning method, characterized in that: The method comprises: Obtain a message queue, the message queue including a plurality of message topics, each of the message topics corresponds to an input source, and the message topic is data uploaded by the input source in real time; Obtaining a specified message topic in the message queue to obtain a first data stream; Acquire a pre-built warning rule corresponding to the first data stream; monitoring the first data flow, and issuing a warning message when the first data flow does not comply with the warning rule; The warning rules are established in the following way: Selecting a target input source from a product list, wherein the product list includes input sources corresponding to the message subject, each of the input sources including at least one device; Select a specified number of devices from the target input source; Set the time window for the metric statistics of each device according to the selected device; Establishing indicator expressions corresponding to warning rules for each device based on the time window; Selecting the next input source in the product list as the target input source; Repeat the following steps: select a specified number of devices from the target input source; set a time window for indicator statistics corresponding to each device according to the selected devices; and establish an indicator expression corresponding to each device warning rule based on the time window until the creation of indicator expressions is completed for all input sources in the product list.

2. The data early warning method according to claim 1, characterized in that: The obtaining of a pre-built warning rule corresponding to the first data stream includes: Obtaining an indicator expression for each device in each input source according to the input source corresponding to the first data stream; Creating a logical combination expression of early warning indicators based on the association relationship between each device in each of the input sources, wherein the logical combination expression of the early warning indicators includes indicator expressions of multiple devices; Correspondingly, the monitoring of the first data flow and issuing a warning message when the first data flow does not comply with the warning rule includes: The first data stream is monitored, and when the first data stream does not conform to the logical combination expression, an early warning message is issued.

3. The data early warning method according to claim 2, characterized in that: The method further comprises: monitoring the first data stream, and before issuing a warning message when the first data stream does not conform to the logical combination expression: Verify whether the Boolean value of the logical combination expression meets the preset requirements; Correspondingly, the monitoring of the first data stream and issuing of an early warning message when the first data stream does not conform to the logical combination expression is performed when the Boolean value of the logical combination expression conforms to a preset requirement.

4. The data early warning method according to claim 1, characterized in that: The warning rule includes a plurality of logical combination expressions; the monitoring of the first data stream and issuing a warning message when the first data stream does not comply with the warning rule includes: Extract the first data stream based on the pre-built filter function, window function and aggregate function to obtain a second data stream of each logical combination expression; Returning the union of all non-Null values ​​calculated in the second data stream and specified by the expression based on the union function, to obtain a third data stream; When each of the third data flows does not comply with the corresponding warning rule, a warning message is issued.

5. A data early warning device, characterized in that: The device comprises: A message queue acquisition module is used to acquire a message queue, wherein the message queue includes a plurality of message topics, each of which corresponds to an input source, and the message topic is data uploaded by the input source in real time; A first data stream determining module, configured to obtain a specified message topic in the message queue to obtain a first data stream; An early warning rule acquisition module, used to acquire a pre-built early warning rule corresponding to the first data stream; An early warning module, used for monitoring the first data flow, and issuing an early warning message when the first data flow does not comply with the early warning rule; The warning rules are established in the following way: Selecting a target input source from a product list, wherein the product list includes input sources corresponding to the message subject, each of the input sources including at least one device; Select a specified number of devices from the target input source; Set the time window for the metric statistics of each device according to the selected device; Establishing indicator expressions corresponding to warning rules for each device based on the time window; Selecting the next input source in the product list as the target input source; Repeat the following steps: select a specified number of devices from the target input source; set a time window for indicator statistics corresponding to each device according to the selected devices; and establish an indicator expression corresponding to each device warning rule based on the time window until the creation of indicator expressions is completed for all input sources in the product list.

6. The data early warning device according to claim 5, characterized in that: The warning rule acquisition module includes: An indicator expression acquisition unit, used to acquire an indicator expression for each device in each input source according to the input source corresponding to the first data stream; A logical combination expression creation unit, used to create a logical combination expression of the early warning indicator based on the association relationship between each device in each of the input sources, wherein the logical combination expression of the early warning indicator includes indicator expressions of multiple devices; Correspondingly, the early warning module is specifically used to monitor the first data flow, and issue an early warning message when the first data flow does not conform to the logical combination expression.

7. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores at least one instruction or at least one program, and the at least one instruction or at least one program is loaded and executed by a processor to implement the data early warning method as described in any one of claims 1-4.

8. An electronic device, characterized in that: It includes at least one processor and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the at least one processor implements the data warning method as described in any one of claims 1 to 4 by executing the instructions stored in the memory.

Citation Information

Patent Citations

  • Storm-based real-time data comparison early warning method and system

    CN110750562A

  • Alarm analysis method and device for time window

    CN113297183A

  • Operation and maintenance early warning method and device, electronic equipment and storage medium

    CN113672467A