Equipment real-time data monitoring and early warning method and device based on Flink

Through the Flink-based device real-time data monitoring and early warning method, the problems of high data transmission time and inflexible early warning rules configuration in the prior art are solved, real-time data push with high throughput and low latency and flexible computing rules configuration are realized, and application requirements with high real-time requirements are met.

CN120144400APending Publication Date: 2025-06-13BEIJING RUISHENGCHENG TECH DEV CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510215992.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-26
Publication Date
2025-06-13

AI Technical Summary

Technical Problem

When processing real-time data from enterprise equipment, the data transmission is time-consuming and cannot meet some application requirements with high real-time requirements. The early warning rules are not configured flexibly, resulting in untimely push results and inefficient data push.

Method used

The real-time data monitoring and early warning method of Flink based equipment is adopted, and the real-time index data is cleaned, calculated and persisted through the calculation engine Flink. Combined with the kafka message queue and websocket protocol, real-time data push with high throughput and low latency is achieved.

Benefits of technology

It realizes a real-time computing process with high throughput, low latency and high performance. The calculation rules can be flexibly configured, and the calculation results can be pushed in real time, meeting the real-time monitoring and response needs of different equipment data or high-frequency changing data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120144400A_ABST
    Figure CN120144400A_ABST
Patent Text Reader

Abstract

The invention relates to an equipment real-time data monitoring and early warning method and device based on Flink. The method comprises the steps that equipment to be subjected to early warning is selected, and a corresponding early warning calculation rule is configured; acquiring real-time index data of equipment to be pre-warned and inputting the real-time index data into a calculation A calculation engine Flink is adopted to clean the obtained real-time index data; calculating the real-time index data by adopting a calculation engine Flink to obtain a calculation result; and carrying out persistence processing on the real-time index data and the calculation result, and storing the processed data into a relational database. And carrying out early warning pushing on different preset scenes based on a calculation result. According to the method, a high-throughput, low-delay and high-performance real-time calculation process can be established, calculation rules can be flexibly configured, calculation results can be pushed in real time, real-time monitoring and response to different equipment data or high-frequency change data are met, and effective services can be provided for different scenes such as real-time alarm monitoring and equipment maintenance.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of big data technology, and particularly relates to a method and device for real-time data monitoring and early warning of devices based on Flink. Background Art

[0002] At present, data of different devices in enterprises are mostly parsed and stored using different protocols, and the service-oriented architecture method is used to split the business into different independent systems. Each system uses its own independent database, but this will cause the device business data to be too scattered in different systems, making it difficult to centrally present and manage the device data. Especially when data analysis and data mining are required within an enterprise, data queries need to be performed from different databases, and then the data is periodically synchronized from the databases to the central data warehouse. The central data warehouse performs data query, transformation, and loading to build a unified data system application for use by the business system. However, the data transmission in the above process is time-consuming and cannot meet the requirements of some applications with high real-time requirements.

[0003] With the rise of big data technology, enterprises can manage and use their business data more flexibly and efficiently, and apply the results of data analysis and mining in application fields such as enterprise decision-making, marketing, and management. However, for some applications with relatively high real-time requirements, such as real-time early warning / alarm, real-time data viewing, real-time report statistics, etc., they have higher requirements for real-time data calculation, storage, and push. However, in the existing process of data calculation, storage, and push, the data that changes within the corresponding time is mostly queried and scanned periodically, combined with the device basic information and alarm rule information, to calculate and provide information push services. In the face of a large amount of device data, due to the inflexible configuration of warning rules and the certain delay in real-time data and alarm push, the push results are not timely and the data push efficiency is low. Summary of the Invention

[0004] To overcome the deficiencies of the above-mentioned prior art, this application provides a method and device for real-time data monitoring and early warning of devices based on Flink, and specifically adopts the following technical solutions:

[0005] A method for real-time data monitoring and early warning of devices based on Flink includes the following steps:

[0006] Select the devices to be warned and configure the corresponding warning calculation rules;

[0007] Obtain the real-time metric data of the devices to be warned and input the real-time metric data into the calculation unit;

[0008] The calculation unit uses the calculation engine Flink to clean the obtained real-time metric data;

[0009] Use the computing engine Flink to calculate the cleaned real-time metric data according to the early warning calculation rules to obtain the calculation results;

[0010] Input the real-time metric data and its corresponding calculation results into the real-time summary data layer for persistent processing and store them in a relational database;

[0011] Based on the calculation results, perform early warning push for different preset scenarios, which at least include that the calculation results have no change compared with the original real-time metric data, the calculation results have obvious changes compared with the original real-time metric data, the calculation results are updated faster than the original real-time metric data, and the calculation results have a push requirement.

[0012] Optional: Multiple early warning calculation rules are configured for the same device to be warned, and each early warning calculation rule is respectively associated with the data type of the corresponding real-time metric data.

[0013] Optional: The real-time metric data is transmitted between the computing unit and the device to be warned through the kafka message queue method.

[0014] Optional: The steps for the computing unit to use the computing engine Flink to clean the obtained real-time metric data include:

[0015] The computing engine Flink respectively removes duplicate data, processes missing values, converts data formats, and detects and processes outliers from the real-time metric data;

[0016] When the computing engine Flink removes duplicate data from the real-time metric data, group the real-time metric data according to the specified fields, and then perform deduplication processing on each group of real-time metric data;

[0017] When the computing engine Flink processes missing values in the real-time metric data, judge whether there are missing values in the real-time metric data according to the preset conditions, and process the real-time metric data with missing values by means of discarding, filling with default values or filling with statistical values;

[0018] When the computing engine Flink converts the data format of the real-time metric data, convert the real-time metric data according to the data types allowed by the computing engine Flink, and at the same time unify the data formats of the real-time metric data according to the data formats specified by the computing engine Flink;

[0019] When the computing engine Flink detects and processes outliers in the real-time metric data, judge outliers in the real-time metric data according to the preset rules, and process the real-time metric data with outliers by means of removal or correction.

[0020] Optionally, when warning messages are pushed for different preset scenarios based on the calculation results, the WebSocket protocol is used to provide data interaction.

[0021] Optionally, for the preset scenario where the calculation results have no change compared with the original real-time metric data, the calculation results are saved to the storage database and data display is provided externally through the WebSocket protocol.

[0022] Optionally, for the preset scenario where the calculation results have significant changes compared with the original real-time metric data, the calculation results are first saved to the relational database, the calculation results are associated with the metric data in the relational database, and a data query service is provided through the WebSocket protocol.

[0023] Optionally, for the preset scenario where the calculation results are updated faster than the original real-time metric data, the calculation results are saved to the cache database in descending order of data access frequency according to the corresponding calculation results and a data query service is provided.

[0024] Optionally, for the preset scenario where there is a push requirement based on the calculation results, the calculation results are pushed to the target system that receives the warning data through the WebSocket protocol.

[0025] In addition, the present application also discloses a device real-time data monitoring and warning device based on Flink, and the device includes:

[0026] A warning rule configuration module, configured to select the devices to be warned and configure corresponding warning calculation rules for the devices to be warned;

[0027] A real-time data acquisition module, configured to acquire the real-time metric data of the devices to be warned and input the real-time metric data into the calculation unit;

[0028] A real-time data cleaning module, configured to clean the acquired real-time metric data by using the calculation engine Flink in the calculation unit;

[0029] A real-time data calculation module, configured to calculate the cleaned real-time metric data according to the warning calculation rules by using the calculation engine Flink to obtain calculation results;

[0030] A calculation result persistence module, configured to input the real-time metric data and the corresponding calculation results into the real-time summary data layer for persistence and store them in the relational database;

[0031] A calculation result push module, configured to perform warning push according to the calculation results for different preset scenarios, where the preset scenarios include that the calculation results have no change compared with the original real-time metric data, the calculation results have significant changes compared with the original real-time metric data, the calculation results are updated faster than the original real-time metric data, and the calculation results have a push requirement.

[0032] Beneficial effects

[0033] The technical solution of this application has obtained the following beneficial effects:

[0034] (1) The device real-time data monitoring and warning method based on Flink of this application can establish a real-time computing process with high throughput, low latency, and high performance, and the computing rules can be flexibly configured, and the computing results can be pushed in real time, meeting the real-time monitoring and response to different device data or high-frequency changing data, and can provide effective services for different scenarios such as real-time alarm monitoring and device maintenance.

[0035] (2) The device real-time data monitoring and warning method based on Flink of this application constructs kafka, flink, and websocket technologies into a stream computing system. By putting the collected data into the kafka cluster, and then the flink cluster pulls the data for data calculation and data persistence, and finally provides a push service through websocket; this process solves the problem of incomplete processes from native data collection - data calculation - data storage - data push, ensuring both the complete transmission of data and the real-time monitoring and response to business data. Description of the drawings

[0036] Figure 1 It is a flowchart of the device real-time data monitoring and warning method based on Flink in the embodiment of this application.

[0037] Figure 2 It is a system architecture diagram of the stream computing system based on Flink in the embodiment of this application.

[0038] Figure 3 It is a structural diagram of the device real-time data monitoring and warning device based on Flink in the embodiment of this application.

[0039] Figure 4 It is a structural diagram of an electronic device in the embodiment of this application. Detailed implementation manners

[0040] The following further describes this application in conjunction with the drawings. The following embodiments are only used to more clearly illustrate the technical solution of this application, and cannot be used to limit the protection scope of this application. It should be pointed out that the following detailed descriptions are all exemplary and are intended to provide further explanations for this application.

[0041] In conjunction with Figure 1 shown, the embodiment of this application discloses a device real-time data monitoring and warning method based on Flink, which includes the following steps:

[0042] Step 1: Select the device to be pre-warned and configure the corresponding pre-warning calculation rules; multiple pre-warning calculation rules are configured for the same device to be pre-warned, and each pre-warning calculation rule is respectively associated with the data type of the corresponding real-time indicator data. Specifically, in this embodiment, for different types of devices to be pre-warned, such as automated machine tools in industrial production, various ships in ship transportation, power generation equipment in the power system, etc., according to the operating principle of the equipment, historical fault data, and industry standards, the devices that need to be pre-warned can be selected respectively and the corresponding pre-warning calculation rules can be configured. For the same device to be pre-warned, multiple pre-warning calculation rules can be configured according to its complexity and monitoring requirements, and each pre-warning calculation rule is respectively associated with the data type of the corresponding real-time indicator data. For example, temperature data is associated with the floating-point data collected by a temperature sensor, and pressure data is associated with the integer data collected by a pressure sensor. Another example is in the ship transportation scenario, multiple pre-warning calculation rules about oil temperature, oil pressure, rotation speed, etc. can be configured for the ship's engine. The oil temperature pre-warning rule is associated with the floating-point oil temperature data collected by a temperature sensor, the oil pressure pre-warning rule is associated with the integer oil pressure data collected by a pressure sensor, and the rotation speed pre-warning rule is associated with the integer rotation speed data collected by a rotation speed sensor.

[0043] Step 2: Obtain the real-time indicator data of the device to be pre-warned and input the real-time indicator data into the calculation unit; in this step, various sensors, such as temperature sensors, pressure sensors, or flow sensors, can be respectively deployed for different devices to be pre-warned to obtain the real-time indicator data of the device to be pre-warned. Further, the real-time indicator data is transmitted between the calculation unit and the device to be pre-warned through the Kafka message queue method. Among them, Kafka is a distributed message queue based on the publish-subscribe mode, which has the characteristics of high throughput, low latency, persistence, and distribution. In Kafka, the message generation unit is responsible for sending data and sending it to the Kafka topic (i.e., logical classification, used to distinguish different types of data streams). Each topic is divided into multiple partitions, and each partition can be used as an ordered and immutable data sequence, and the data is appended and stored in order in the partition. The data in different partitions can be processed in parallel, which improves the throughput of Kafka. The message processing unit subscribes to and processes the data from the partitions of the topic. Based on the Kafka message queue, it can ensure that the massive real-time indicator data generated by the device can be quickly and stably transmitted to the calculation unit. For example, for an industrial production workshop with hundreds of devices, each device may generate dozens of data per second. Using the Kafka method can process and transmit these data in a short time, ensuring the efficiency and real-time nature of data transmission.

[0044] Step 3: The computing unit uses the computing engine Flink to clean the acquired real-time metric data. Specifically, the process of the computing engine Flink cleaning the real-time metric data includes: removing duplicate data, handling missing values, data format conversion, and outlier detection and handling;

[0045] (1) Removing duplicate data: When the computing engine Flink removes duplicate data from the real-time metric data, it groups the real-time metric data according to specified fields (such as timestamp, device ID, etc.), and then performs deduplication processing on each group of real-time metric data. For example, through data structures such as hash tables or bitmaps, the processed data can be recorded. When new data arrives, by comparing the hash values or bitmap identifiers, it is determined whether the data is duplicate, thus avoiding the interference of duplicate data on subsequent calculations.

[0046] (2) Handling missing values: When the computing engine Flink handles missing values in the real-time metric data, it determines whether there are missing values in the real-time metric data according to preset conditions, such as the number of consecutive missing data exceeding a certain threshold, data missing within a specific time period, etc. For the real-time metric data with missing values, it can be processed by discarding, filling with default values, or filling with statistical values. For example, for temperature data, if the number of missing values is small and has little impact on the overall analysis, it can be selected to be discarded; if the number of missing values is large, the historical average temperature can be used as the default value for filling; or according to the temperature statistical values in a recent period of time, combined with the current device operating status, more reasonable statistical value filling can be performed.

[0047] (3) Data format conversion: When the computing engine Flink performs data format conversion on the real-time metric data, it converts the real-time metric data according to the data types allowed by the computing engine Flink; at the same time, it unifies the format of the real-time metric data according to the data formats specified by the computing engine Flink; for example, converting the string-type temperature data output by the sensor to a floating-point type, and unifying different formats of time data to the timestamp format to ensure that Flink can correctly identify and process the data.

[0048] (4) Outlier detection and handling: When the computing engine Flink performs outlier detection and handling on the real-time metric data, it determines outliers in the real-time metric data according to preset rules, such as the 3σ principle based on statistics, outlier detection algorithms based on machine learning, etc. For the real-time metric data with outliers, it is processed by removal or correction. For example, when the device temperature data exceeds the range of the mean plus or minus 3 times the standard deviation, it is determined as an outlier. If it is an outlier caused by a sensor failure, it can be selected to be removed; if it is an outlier caused by abnormal device operation, it can be corrected by combining historical data and device operation characteristics.

[0049] Step 4: Use the computing engine Flink to calculate the cleaned real-time indicator data according to the early warning calculation rules to obtain the calculation results. Flink uses its distributed stream-batch integrated computing framework to efficiently process large-scale real-time data through parallel computing, pipeline execution and other technologies. For example, when calculating the failure probability of a device, Flink can combine the device's historical operating data, real-time indicator data and the preset failure prediction model to quickly calculate the current failure probability of the device.

[0050] Step 5: Input the real-time indicator data and its corresponding calculation results into the real-time summary data layer for persistence processing and store them in the relational database. The real-time summary data layer manages and stores the data in a unified manner, and the relational database ensures the security and queryability of the data with its structured storage and powerful query functions. For example, the real-time temperature, pressure and other indicator data of the equipment and the corresponding failure probability calculation results are stored in the relational database to facilitate subsequent data analysis and query.

[0051] Step 6: Push warnings for different preset scenarios based on calculation results. These preset scenarios at least include the calculation results being unchanged from the original real-time indicator data, the calculation results being significantly different from the original real-time indicator data, the calculation results being updated faster than the original real-time indicator data, and the calculation results having push requirements. When warnings are pushed for different preset scenarios based on calculation results, the websocket protocol is used to provide data interaction. The specific process is as follows:

[0052] (1) Based on the preset scenario where the calculation result and the original real-time indicator data do not change, the calculation result is saved to the storage database and displayed externally through the websocket protocol. For example, when a new device has just started to operate or the device has not shown obvious performance changes or potential faults in a short period of time, the real-time indicator data and calculation results may not change. For example, in the initial stage of operation of a newly installed and debugged power transformer, its oil temperature, winding temperature, oil level and other indicators are all within the normal range and have no obvious fluctuations. The calculation result is consistent with the original data, indicating that the transformer is in good initial operation. Or when a ship is sailing at a constant speed on a predetermined route in open waters, the operating parameters of the main engine remain stable. For example, the main engine speed is stable at 120 rpm, and the fuel consumption rate is maintained at about 3 tons per hour. After being processed by the Flink computing engine according to the pre-set rules, the calculation result is basically consistent with the original real-time indicator data, which indicates that the ship's power system is running smoothly, there are no abnormal conditions, and it can continue to provide stable propulsion for the ship. At this time, the data can be saved to the storage database.

[0053] (2) Based on the preset scenario where there are significant changes between the calculation results and the original real-time metric data, the calculation results are first saved to a relational database. In the relational database, the calculation results are associated with the metric data, and a data query service is provided through the websocket protocol. For example, when collecting and calculating the fuel consumption of a ship's main engine, it is found that the fuel consumption rate suddenly increases by 20%-30%, which is because a faulty component has caused a decrease in the engine's combustion efficiency; the vibration amplitude of the ship's main engine may increase by 5-10 times, which is due to mechanical imbalance caused by component failure. At this time, after calculating these metrics through the Flink computing engine, there will be significant changes in the calculation results compared with the original real-time metric data. The system will promptly save the calculation results to the relational database, associate them with other metric data of the ship's main engine, and provide a data query service through the websocket protocol, facilitating technicians to retrieve the parameters of the ship's main engine and deeply analyze the cause of the failure.

[0054] (3) Based on the preset scenario where the calculation results are updated faster than the original real-time metric data, the calculation results are saved to the cache database in order of decreasing data access frequency and a data query service is provided. For example, during the navigation of a ship, the operation data of some key equipment and the navigation status data of the ship are updated frequently. For instance, when a ship enters or exits a port, due to the narrow channel and high ship density, it is necessary to frequently adjust the course and speed. At this time, data such as the rudder angle and the throttle opening of the main engine will change rapidly. In addition, when a ship encounters bad weather, such as strong winds and huge waves, data such as the roll and pitch angles and acceleration of the ship will also be updated in real time and rapidly. These rapidly updated data are crucial for the crew and the dispatching center to timely understand the ship's status and make correct decisions. Therefore, it is necessary to store and manage them reasonably according to their data access frequency to meet the efficient data query requirements. Among them, the cache database can respond to data query requests in an extremely short time, greatly improving the data access efficiency. And according to the order of decreasing data access frequency, the calculation results are saved to the cache database in turn. When querying relevant data, the system quickly searches and returns it to the user from the cache database, greatly shortening the response time of data query and further improving the data access efficiency.

[0055] (4) Based on the preset scenarios with push requirements according to the calculation results, push the calculation results to the target system that receives the alarm data through the websocket protocol. For example, during the navigation of a ship, if the calculation results indicate that the ship faces navigation safety risks, such as approaching a dangerous water area or having a collision risk with other ships, it will trigger the need to push warning data. When the ship approaches dangerous areas such as reefs and shoals, based on the ship's real-time position, navigation speed, and the boundary data of the dangerous area, for example, Flink calculates that there is more than a 50% probability that the ship will enter the dangerous area within the next 15 minutes, then the system will push the calculation results such as the ship's current position, heading, the expected time to enter the dangerous area, and the detailed information of the dangerous area to the monitoring system on the ship's bridge and the captain's mobile device through the WebSocket protocol to remind to adjust the ship's heading in time or take other risk avoidance measures to ensure the safety of ship navigation.

[0056] Combined with Figure 2 As shown, the device real-time data monitoring and warning method according to this embodiment receives the data collected by each device through the kafka message queue. For example, the data sources for ship equipment include AIS detection units, radar detection sources, optical transmission units, four-way power supply units, shore-based power supply units, etc. Based on the stream computing architecture of kafka and flink, this application puts the real-time data into the kafka message queue, and then the flink cluster performs data parsing, rule calculation, and data persistence and provides a unified query service. Finally, combined with the websocket communication technology, it pushes the real-time data to the user. It realizes high-throughput, low-latency, and high-performance real-time computing, meets the real-time monitoring and response to changes in business data, and provides services for different scenarios such as real-time collection of device data, real-time rule calculation, and real-time risk monitoring.

[0057] Combined with Figure 3 As shown, in addition, this application also discloses a device real-time data monitoring and warning device based on Flink. The device includes:

[0058] An early warning rule configuration module, which is used to select the devices to be warned and configure corresponding early warning calculation rules for the devices to be warned;

[0059] A real-time data acquisition module, which is used to acquire the real-time index data of the devices to be warned and input the real-time index data into the calculation unit;

[0060] A real-time data cleaning module, which is used for the calculation unit to clean the acquired real-time index data by using the calculation engine Flink;

[0061] A real-time data calculation module, which is used to calculate the cleaned real-time index data according to the early warning calculation rules by using the calculation engine Flink to obtain the calculation results;

[0062] A calculation result persistence module, which is used to input real-time metric data and corresponding calculation results into the real-time summary data layer for persistence and store them in a relational database;

[0063] A calculation result push module, which is used to perform warning push according to different preset scenarios based on the calculation results. The preset scenarios include that the calculation results have no change compared with the original real-time metric data, the calculation results have obvious changes compared with the original real-time metric data, the calculation results are updated faster than the original real-time metric data, and the calculation results have a push requirement.

[0064] The device provided by the embodiment of the present application can implement Figure 1 each process implemented by the method embodiment. To avoid repetition, it will not be elaborated here.

[0065] As Figure 4 shown, the embodiment of the present application also provides an electronic device, including a processor and a memory, a program or instruction stored on the memory and executable on the processor. When the program or instruction is executed by the processor, it implements each process of the method embodiment as shown in Figure 1 and can achieve the same technical effect. To avoid repetition, it will not be elaborated here.

[0066] The embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by the processor, it implements each process of the above-mentioned Figure 1 method embodiment and can achieve the same technical effect. To avoid repetition, it will not be elaborated here.

[0067] The embodiment of the present application also provides a computer program product, including computer instructions. When the computer instructions are executed by the processor, they implement each process of the above-mentioned Figure 1 method embodiment and can achieve the same technical effect. To avoid repetition, it will not be elaborated here.

[0068] It should be understood that "one embodiment" or "an embodiment" mentioned throughout the specification means that a specific feature, structure, or characteristic related to the embodiment is included in at least one embodiment of the present application. Therefore, the appearances of "in one embodiment" or "in an embodiment" throughout the specification do not necessarily refer to the same embodiment. In addition, these specific features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. It should be understood that in various embodiments of the present application, the order numbers of the above processes do not mean the order of execution. The order of execution of each process should be determined by its function and internal logic, and should not constitute any limitation to the implementation process of the embodiment of the present application. The serial numbers of the embodiments of the present application above are only for description and do not represent the advantages and disadvantages of the embodiments.

[0069] It should be noted that in this article, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, such that a process, method, article or device comprising a series of elements not only includes those elements but also other elements not expressly listed, or elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "comprising an..." does not exclude the presence of additional identical elements in the process, method, article or device comprising such element.

[0070] In several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely illustrative. For example, the division of the units is only a logical function division, and there can be other division methods in actual implementation. For example, multiple units or components can be combined, or can be integrated into another device, or some features can be ignored or not executed. Additionally, the couplings, direct couplings, or communication connections between the various components shown or discussed can be through some interfaces. The indirect couplings or communication connections of devices or units can be electrical, mechanical, or in other forms.

[0071] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units; they can be located in one place or distributed to multiple network units; some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0072] In addition, in each embodiment of this application, the various functional units can all be integrated in one processing unit, or each unit can be separately a unit alone, or two or more units can be integrated in one unit; the above integrated units can be implemented in the form of hardware, or in the form of a combination of hardware and software functional units.

[0073] Those of ordinary skill in the art can understand that all or part of the steps of implementing the above method embodiments can be completed by hardware related to program instructions. The foregoing program can be stored in a computer-readable storage medium. When the program is executed, it performs the steps including the above method embodiments; and the foregoing storage medium includes: various media such as removable storage devices, read-only memory (ROM), magnetic disks, or optical discs that can store program codes.

[0074] Alternatively, if the above integrated units of the present application are implemented in the form of software functional modules and sold or used as independent products, they can also be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the embodiments of the present application, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for causing a device (which can be a terminal or a platform, etc.) to execute all or part of the methods described in the various embodiments of the present application. The foregoing storage medium includes: various media that can store program codes, such as removable storage devices, ROMs, magnetic disks, or optical discs.

[0075] The foregoing are only the preferred embodiments of the present application. It should be noted that for those of ordinary skill in the art, without departing from the technical principle of the present application, several improvements and modifications can be made, and these improvements and modifications should also be regarded as the protection scope of the present application.

Claims

1. A device real-time data monitoring and early warning method based on Flink, characterized in that: The steps include: Select the equipment to be warned and configure the corresponding warning calculation rules; Obtain real-time indicator data of the equipment to be warned, and input the real-time indicator data into the calculation unit; The computing unit uses the computing engine Flink to clean the acquired real-time indicator data; The computing engine Flink is used to calculate the cleaned real-time indicator data according to the early warning calculation rules to obtain the calculation results; Input the real-time indicator data and the corresponding calculation results into the real-time summary data layer for persistence processing and store them in the relational database; Based on the calculation results, early warnings are pushed for different preset scenarios. These preset scenarios at least include that the calculation results are unchanged from the original real-time indicator data, the calculation results are significantly changed from the original real-time indicator data, the calculation results are updated faster than the original real-time indicator data, and the calculation results have a push requirement.

2. The device real-time data monitoring and early warning method based on Flink according to claim 1 is characterized in that: The same device to be warned is configured with multiple warning calculation rules, and each warning calculation rule is respectively associated with the data type of the corresponding real-time indicator data.

3. The device real-time data monitoring and early warning method based on Flink according to claim 1 is characterized in that: The computing unit and the device to be warned perform real-time indicator data transmission via the Kafka message queue.

4. The device real-time data monitoring and early warning method based on Flink according to claim 1 is characterized in that: The step of the computing unit using the computing engine Flink to clean the acquired real-time indicator data includes: The computing engine Flink removes duplicate data, processes missing values, converts data formats, and detects and processes outliers on real-time indicator data; When the computing engine Flink removes duplicate data from real-time indicator data, it groups the real-time indicator data according to the specified fields and then removes duplicates from each group of real-time indicator data. When the computing engine Flink processes missing values ​​for real-time indicator data, it determines whether there are missing values ​​in the real-time indicator data according to the preset conditions, and processes the real-time indicator data with missing values ​​by discarding, filling with default values, or filling with statistical values; When the computing engine Flink converts the data format of the real-time indicator data, the real-time indicator data is converted according to the data type allowed by the computing engine Flink, and the format of the real-time indicator data is unified according to the data format specified by the computing engine Flink; When the computing engine Flink detects and processes outliers on real-time indicator data, it determines outliers on the real-time indicator data according to preset rules, and removes or corrects the real-time indicator data that contains outliers.

5. The device real-time data monitoring and early warning method based on Flink according to claim 1 is characterized in that: When warnings are pushed for different preset scenarios based on calculation results, the websocket protocol is used to provide data interaction.

6. The device real-time data monitoring and early warning method based on Flink according to claim 5 is characterized in that: Based on a preset scenario where the calculation result and the original real-time indicator data do not change, the calculation result is saved to a storage database and the data is displayed externally through the websocket protocol.

7. The device real-time data monitoring and early warning method based on Flink according to claim 5 is characterized in that: Based on a preset scenario where the calculation results and the original real-time indicator data change significantly, the calculation results are first saved to a relational database, where the calculation results and the indicator data are associated with each other, and a data query service is provided through the websocket protocol.

8. The device real-time data monitoring and early warning method based on Flink according to claim 5 is characterized in that: Based on the preset scenario where the calculation results are updated faster than the original real-time indicator data, the data access frequency of the corresponding calculation results is saved in the cache database in descending order and data query services are provided.

9. The device real-time data monitoring and early warning method based on Flink according to claim 5 is characterized in that: Based on the preset scenario where the calculation results have the need to be pushed, the calculation results are pushed to the target system that receives the alarm data through the websocket protocol.

10. A real-time data monitoring and early warning device for equipment based on Flink, characterized in that: The device comprises: The warning rule configuration module is used to select the equipment to be warned and configure the corresponding warning calculation rules; A real-time data acquisition module is used to acquire real-time indicator data of the equipment to be warned and input the real-time indicator data into the calculation unit; The real-time data cleaning module is used by the computing unit to clean the acquired real-time indicator data using the computing engine Flink; The real-time data calculation module is used to use the calculation engine Flink to calculate the cleaned real-time indicator data according to the early warning calculation rules to obtain the calculation results; The calculation result persistence module is used to input the real-time indicator data and the corresponding calculation results into the real-time summary data layer for persistence processing and store them in the relational database; The calculation result push module is used to push warnings based on the calculation results according to different preset scenarios. The preset scenarios include that the calculation results are unchanged from the original real-time indicator data, the calculation results are significantly changed from the original real-time indicator data, the calculation results are updated faster than the original real-time indicator data, and the calculation results have a push requirement.