Equipment state real-time calculation method and system based on Flink
By introducing a Flink-based real-time computing method in the device status monitoring system, combining deep learning, nonlinear dynamics model and Kalman filtering, the alarm strategy is optimized, and the problems of fixed alarm thresholds, frequent false alarms and missed reports in the existing technology are solved, and more accurate and flexible alarms and more efficient equipment management are achieved.
Patent Information
- Application Number
- CN202510315158.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-18
- Publication Date
- 2025-04-18
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In the prior art, there are problems such as fixed alarm threshold, frequent false alarms and missed reports, and the inability to effectively predict equipment failures.
The real-time calculation method of device state is adopted based on Flink, and state prediction and modeling is performed by acquiring the real-time data of the device, using deep learning models and nonlinear dynamic models, combining extended Kalman filtering and deep reinforcement learning optimization alarm strategy.
It improves the accuracy and flexibility of alarms, reduces false alarms and missed reports, can identify potential problems in advance, and improves operation and maintenance response efficiency and equipment management reliability.
Smart Images

Figure CN119847876A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of equipment status monitoring and management, and in particular to a Flink-based equipment status real-time calculation method and system. Background Art
[0002] In modern life, with the popularity of smart devices, especially in battery management, energy monitoring and industrial equipment management, the monitoring of equipment status and timely alarms are becoming more and more important. If an abnormality occurs during the operation of the equipment and is not discovered and handled in time, it may cause equipment damage, reduced production efficiency and even safety accidents. Therefore, being able to monitor the status of the equipment in real time and accurately and issue alarms in time when the equipment is abnormal is crucial to ensure stable operation of the equipment, extend equipment life and improve work efficiency.
[0003] In the prior art, the equipment status monitoring system usually determines whether the equipment is in normal working condition based on real-time data analysis and fixed thresholds. By setting the safety range of various equipment parameters (such as temperature, pressure, battery power, etc.), once the real-time status of the equipment exceeds the set range, the system triggers an alarm. This technical solution is simple and easy to use, and can effectively monitor the status of the equipment at a certain moment and promptly remind the operation and maintenance personnel to intervene. In addition, most of these traditional systems can operate stably and provide a basic response mechanism for the immediate abnormality of the equipment, thereby effectively avoiding equipment damage or the spread of faults.
[0004] However, the existing technology has some shortcomings. First, the fixed threshold alarm mechanism lacks the ability to predict the trend of equipment status changes, and is prone to false alarms or missed alarms when the equipment ages or the environment changes, resulting in inaccurate alarms. Second, these systems usually rely on statically set rules and data, and fail to dynamically adjust the alarm threshold according to changes in the historical status of the equipment or environmental factors, and cannot adapt to the gradual changes in the equipment status. More importantly, traditional systems cannot provide early warnings before equipment failures occur, and cannot effectively predict potential failures, affecting the response efficiency of operation and maintenance and the timeliness of problem handling. Summary of the invention
[0005] In view of the shortcomings of the prior art, the present invention provides a method and system for real-time calculation of device status based on Flink, which solves the problems in the prior art of fixed alarm thresholds, frequent false alarms and missed alarms, and inability to effectively predict device failures.
[0006] To achieve the above objectives, the present invention is implemented by the following technical solutions: A real-time calculation method for device status based on Flink, comprising the following steps: S1. Acquire real-time data of the device, where the real-time data of the device includes operating parameters of the device and external environment data; S2, transmitting the real-time data of the device to the Flink cluster for streaming data processing; S3. Use the deep learning model to predict the current state of the device and obtain an estimate of the future state of the device; S4. Modeling the state of the device using a nonlinear dynamic model, wherein the modeling includes calculating a law of device state change; S5, real-time estimation of the state of the device through extended Kalman filtering; S6. Based on the prediction results of the equipment status, use deep reinforcement learning to optimize the alarm strategy; S7. According to the alarm strategy, an alarm is triggered when the equipment status is abnormal, and the alarm information is fed back to the operation and maintenance personnel.
[0007] Preferably, the real-time data of the acquisition device includes: Obtain the voltage data of the device through the voltage sensor; Obtain current data of the device through a current sensor; Obtain the temperature data of the device through the temperature sensor; Acquire the temperature data of the external environment through the ambient temperature sensor; Obtain humidity data of the external environment through the environmental humidity sensor; The voltage, current and temperature data of the device are integrated with the temperature and humidity data of the external environment and transmitted to the data processing system.
[0008] Preferably, the deep learning model includes: Train the historical status data of the equipment through the neural network model; The current state information of the input device is used as input features, and the prediction result of the future state of the device is output; The model parameters are adjusted using the back-propagation algorithm using the training data to minimize the prediction error.
[0009] Preferably, the nonlinear dynamic model includes: The change of the device state is described by a nonlinear equation, which includes the device charging and discharging process and the external environment influence; Calculating the law of change of the device state, the law taking into account the electrochemical process of the device and environmental change factors; An estimation of future states is performed based on the equipment state model, wherein the estimation is based on equipment historical data and control inputs.
[0010] Preferably, the extended Kalman filter comprises: Predict the next state of the device based on the device's historical state and control input; Update the equipment state estimate based on the difference between the actual observed data and the predicted data; Kalman gain is used to update the state to ensure the accuracy of device state estimation.
[0011] Preferably, the deep reinforcement learning optimization alarm strategy includes: Define the action space and state space of device state changes; Optimize the alarm strategy through deep reinforcement learning model to decide whether to trigger an alarm when the device status is abnormal; Use reward functions to optimize the model's strategy and improve the timeliness and accuracy of alerts.
[0012] Preferably, the present invention also provides a Flink-based device status real-time computing system, comprising: Data acquisition module, used to obtain real-time data of the equipment, including voltage, current and temperature data of the equipment and external environment data; A data transmission module, used to transmit the real-time data of the device to the Flink cluster for streaming data processing; The state prediction module is used to predict the state of the device using a deep learning model to obtain an estimated value of the future state of the device; A nonlinear dynamics modeling module is used to model the state of the device, wherein the modeling includes calculating the law of device state change; A state estimation module is used to estimate the state of the device in real time through an extended Kalman filter; The alarm module is used to optimize the alarm strategy based on the prediction results of the device status, using deep reinforcement learning, and trigger an alarm when the device status is abnormal.
[0013] Preferably, the data acquisition module includes: Equipment sensor module, used to collect real-time data of voltage, current and State of Charge of the equipment; Environmental sensor module, used to collect external environmental data; Data integration module, used to combine the equipment's operating data with environmental data to form comprehensive equipment status data; The data transmission module is used to transmit the collected data to the data processing system in real time.
[0014] Preferably, the state prediction module includes: A deep learning model module, used to train and implement the prediction of device status, wherein the deep learning model uses a neural network to regress the device status; LSTM module, used to process device status time series data and capture the time-varying characteristics of device status changes; The model optimization module is used to adjust the model parameters and optimize the prediction ability of the neural network through the training set.
[0015] Preferably, the alarm module includes: Reinforcement learning module, used to optimize the alarm triggering strategy through deep reinforcement learning model; Status monitoring module, used to monitor device status changes in real time and determine whether to trigger an alarm; The alarm trigger module is used to trigger an alarm when the device status is abnormal, and send the alarm information to the operation and maintenance personnel through the message notification system; The threshold adjustment module dynamically adjusts the alarm threshold according to changes in device status and optimizes the alarm strategy.
[0016] The present invention provides a method and system for real-time calculation of device status based on Flink. It has the following beneficial effects: 1. The present invention combines deep learning and extended Kalman filtering (EKF) to predict device status, ensuring the accuracy of alarm triggering. Compared with traditional methods, the introduction of the prediction model allows the system to identify potential problems in advance, avoiding false alarms and missed alarms caused by fluctuations in device status. In this way, the triggering of alarms is not only more intelligent, but also more targeted, reducing unnecessary intervention.
[0017] 2. By optimizing the alarm strategy through deep reinforcement learning (DRL), the present invention can automatically adjust the trigger threshold of the alarm according to the real-time status and predicted data of the equipment. Unlike the existing technology, the system can adaptively adjust the threshold according to the aging of the equipment and environmental changes, and no longer rely on fixed settings, which greatly improves the flexibility of the alarm and the long-term stability of the system.
[0018] 3. The present invention has made innovations in the feedback mechanism of alarm information, and uses an intelligent message notification system to accurately and promptly convey alarms to operation and maintenance personnel. Compared with traditional systems, alarm information is not only fast, but also more comprehensive, reducing the risk of information delays and omissions, thereby improving the response efficiency of operation and maintenance personnel and the reliability of equipment management.
[0019] 4. Through the alarm trigger mechanism optimized by reinforcement learning, the present invention improves the accuracy of alarms while reducing false alarms and missed alarms. Compared with traditional static alarm rules, the system dynamically adjusts the alarm strategy according to the equipment status and historical data, which not only reduces resource waste but also enhances the intelligence level of equipment status monitoring. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] Figure 1 is a flow chart of the method of the present invention; Figure 2 It is a system structure diagram of the present invention. DETAILED DESCRIPTION
[0021] The following will be combined with the drawings in the specification of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0022] Please refer to the attached Figure 1 , an embodiment of the present invention provides a method and system for real-time calculation of device status based on Flink, comprising the following steps: S1. Obtain real-time data of the device, which includes operating parameters of the device and external environment data; S1 collects real-time data from the equipment through the equipment sensors and transmits the data to the data processing system for subsequent processing. In order to ensure the accuracy of real-time prediction and alarm of equipment status, the implementation details of this step are crucial. The following is a detailed supplement to this step, including technical details, formulas and parameter definitions.
[0023] The real-time data collection of the equipment includes the operating parameters of the equipment and the external environment data. Specifically, the voltage, current, temperature of the equipment and the temperature and humidity data of the external environment are obtained through a variety of sensors.
[0024] Voltage sensor: This sensor obtains the voltage data of the device in real time ,Equipment voltage is an important parameter for evaluating the operating status of the equipment. For example, for a battery, voltage fluctuations usually reflect the charging and discharging status of the battery.
[0025] Current sensor: Get the current data of the device through the current sensor Current data is usually used to determine the load condition of the device, power consumption, and current changes during battery charging and discharging.
[0026] Temperature sensor: This sensor is used to obtain the temperature data of the device , to monitor the operating status of the device itself. Fluctuations in device temperature may indicate that the device is overheating or has other performance issues.
[0027] External environment temperature sensor: the temperature of the external environment Affects the working efficiency of the equipment, especially in devices such as batteries, where temperature has a significant impact on equipment performance. Therefore, the external ambient temperature is also an important parameter that must be monitored.
[0028] External environment humidity sensor: Get the humidity data of the external environment through the humidity sensor ,Humidity data can be used to evaluate the impact of the environment on the device, especially under extreme humidity, the electronic components of the device may be affected.
[0029] After these sensors are deployed on the equipment, they collect equipment status data in real time and transmit the data to the data processing system through the transmission module. During the data transmission process, high accuracy and high frequency of the data must be ensured to ensure the accuracy of prediction and alarm.
[0030] Once the real-time data of the equipment such as voltage, current, temperature, and the temperature and humidity data of the external environment are collected, these data will be integrated into a unified time series data set. The integration of this data set ensures that there is a clear time correlation between the data and provides complete input for subsequent state prediction.
[0031] The integration of real-time equipment data and environmental data can be expressed as: ; in: For at the moment Integrated data, including voltage, current, temperature of the equipment and temperature, humidity and other parameters of the external environment; For the device at time Voltage value; For the device at time The current value; For the device at time The working temperature value; For the external environment at all times Temperature value; For the external environment at all times Humidity value.
[0032] The integrated data will be used as input data for subsequent steps and transmitted to the data processing system for streaming computing.
[0033] After data integration, it is transmitted to the Flink cluster through Kafka or other message middleware. After receiving the data, the Flink cluster performs stream processing and performs device status prediction and alarm processing. Efficient transmission and real-time performance of data streams are crucial, so the transmission process must ensure data integrity and reliability and minimize latency.
[0034] Data transmission protocol: In the process of data transmission, in order to ensure real-time performance, high-speed protocols such as TCP / IP or MQTT are usually used for data transmission. Each record of data will carry a timestamp to ensure the accuracy of data timing.
[0035] In order to improve the accuracy and efficiency of subsequent streaming computing processes, data needs to be preprocessed and time-synchronized before being transmitted to the Flink cluster. Data preprocessing includes operations such as removing abnormal data and filling missing values to ensure the quality of incoming data.
[0036] Time synchronization: In order to avoid errors in data collected by different devices due to inconsistent timestamps, the data acquisition module and the data transmission module need to maintain strict time synchronization to ensure the consistency of all data points in the time dimension.
[0037] Equipment state prediction is one of the key links in step S1. Through accurate real-time equipment data (such as voltage, current, temperature, etc.), combined with deep learning models and nonlinear dynamic models, it is possible to provide accurate future state predictions for the equipment during real-time calculations.
[0038] In the above steps, the device data enters the deep learning module after Flink streaming calculation. Specifically, the deep learning model (such as LSTM) is used to capture the time series characteristics of the device status and predict the status of the device in the future.
[0039] In the present invention, the formula in the device state prediction model involves the input and output data of deep learning and its related parameters. The parameters of the related formula will be defined in detail below.
[0040] Deep learning model input and output: The input of the equipment status prediction model is the historical data of the equipment and external environment data. The output of the model is the predicted value of the future state of the equipment : ; in: The current input data for the device status; and Temperature and humidity data of the external environment; are the parameters of the neural network, including weights and biases; It is a deep learning model or other nonlinear model used to map the input device status data, external environment temperature, humidity and model parameters to the predicted value of the future state of the device; The future state of the device predicted by the model (such as SOC, voltage, etc. at k time points in the future).
[0041] This formula describes how the state prediction model of a device predicts the future state of the device based on the input data.
[0042] When modeling the device state, nonlinear equations describe the dynamic changes of the device state. Specifically, for devices such as batteries, their charging and discharging processes are described by the following nonlinear equations: ; in: For the device at time The state of charge; is the charge and discharge efficiency of the battery; For the device at time Current input; is the sampling time interval; The device at the previous moment The state of charge.
[0043] This formula describes the variation rule of battery SOC, taking into account the current input and the charge and discharge efficiency of the battery.
[0044] Real-time data collection, data integration and time synchronization of sensors ensure the accuracy of equipment status calculation and alarm strategy optimization.
[0045] S2, transmit the real-time data of the device to the Flink cluster for streaming data processing; The key to S2 is the reliable transmission of data and the efficient execution of streaming computing capabilities. The voltage, current, temperature and other parameters collected by the equipment must be transmitted to the data processing system through the Kafka message middleware and stream-computed in the Flink cluster. Through real-time data stream processing, accurate data support can be provided for subsequent state prediction, state estimation and alarm generation.
[0046] In this embodiment, data is obtained from the device through the sensor module and transmitted to the Kafka system through a suitable transmission protocol (such as MQTT or TCP / IP). As a message middleware, Kafka can effectively process high-throughput data from multiple devices and ensure that data is not lost. Then, the Flink cluster consumes these messages in real time and processes the data stream.
[0047] In this embodiment, step S2 is implemented as follows: First, the device collects data through multiple sensors, each of which monitors different parts of the device to obtain real-time status data of the device. The temperature data of the device status is provided by the temperature sensor, and the data of the external environment, such as temperature and humidity, is obtained by the environmental sensor.
[0048] The data from all these sensors will be transmitted to the data transmission module through the interface of the data acquisition module, and then enter the Kafka message queue system. At this time, each record of the data will contain a timestamp and device identifier to ensure the timeliness and source of the data.
[0049] When data is transmitted to the Flink cluster through the Kafka message queue, the Flink consumer module reads the data stream in chronological order. The Flink cluster efficiently processes the real-time data stream from Kafka through a parallel computing architecture. The data stream of each device is regarded as an independent real-time data stream, and the system assigns corresponding processing tasks to each data stream to ensure that the data of large-scale devices can be processed efficiently and accurately.
[0050] Each task node in the Flink cluster will clean, convert and extract features of the data, and prepare to pass the processed data to subsequent computing modules such as the device status prediction module and the Kalman filter module. The task of these processing modules is to predict and estimate the device status in real time in order to generate alarms.
[0051] After the data is transmitted from the device to the Flink system, it enters the stream processing module. The input formula of the data stream can be expressed as: ; in: For the moment The real-time data stream of the device is transmitted to the Flink cluster; For the device at time The voltage value of the battery is in volts (V). Voltage is an important indicator for judging the battery charge status and battery health status; For the device at time The current value is in amperes (A). The current value can help determine the charging and discharging status of the battery; For the device at time The temperature value of the device is in degrees Celsius (℃). The temperature data of the device reflects whether the working environment of the device is suitable; is the external environment temperature data, at time The temperature value is in degrees Celsius (℃); is the external environment humidity data at time Humidity value in percentage (%).
[0052] After being passed into Flink, the data will first go through the data preprocessing module, including removing abnormal data and filling missing values. Then, the data will be passed to the subsequent modules for prediction calculation.
[0053] After the data stream is stream processed in the Flink cluster, the output data stream can be expressed as: ; in: Represents the output data stream after being processed by the Flink cluster, which usually contains the prediction results of the device status and the processed device status data; The input data stream is the original real-time data transmitted from the device to the Flink cluster; Parameters of the processing module, usually the weights or configuration items of the model, are used to adjust the data calculation results during stream processing.
[0054] Output data It will be further transmitted to the state prediction module, Kalman filter module, etc. for further calculation of the device status.
[0055] In the process of data transmission, in order to ensure high efficiency and real-time performance, the system should effectively manage latency control and throughput. In Kafka, each data record has a timestamp to ensure that the data can be processed correctly in chronological order. Flink controls the latency of stream processing through window mechanisms and event time semantics, avoids data latency backlogs, and ensures the real-time performance of device status prediction.
[0056] As a message middleware, Kafka ensures efficient transmission of device data. It supports high-throughput and low-latency data transmission, ensuring that device data can be delivered to the Flink cluster in real time for stream processing.
[0057] When processing real-time data streams, Flink uses a distributed computing architecture to divide tasks into multiple computing nodes for parallel processing. This parallel processing method effectively ensures the real-time data stream computing capabilities of large-scale devices.
[0058] The data stream undergoes preprocessing steps in the Flink cluster, such as data cleaning (removing outliers and filling missing values) and feature extraction (extracting key information about device status from raw sensor data). This process provides high-quality input for subsequent device status prediction and estimation.
[0059] Through the streaming computing architecture of Kafka and Flink, the system can process data streams from multiple devices in real time, ensuring the timeliness and accuracy of device status prediction and alarm generation.
[0060] S3. Use the deep learning model to predict the current state of the device and obtain an estimate of the future state of the device; The deep learning model (especially the LSTM network) predicts the future state changes of the device through the historical state data of the device and the external environment data. The importance of this step is that the device state prediction provides data support for the subsequent alarm system, helping to identify potential problems in advance and trigger alarms.
[0061] In this embodiment, the device state prediction uses a long short-term memory network (LSTM). LSTM is a deep learning model for time series data, which is particularly suitable for processing sequence data in which the device state changes over time. Through LSTM, the system can capture the time series relationship between the device state and the external environment data, thereby accurately predicting the state of the device in the future.
[0062] The input of the equipment status prediction model is the equipment status data and external environment data collected in real time. These data are used as the input of the LSTM network after preprocessing and feature extraction.
[0063] Processing through neural networks and predicting the future state of the device , such as predicting the battery’s state of charge (SOC) or voltage.
[0064] The LSTM model predicts device status by learning historical status data and current device status data.
[0065] The LSTM model is trained on the historical data of the device, so that the model can learn the change pattern of the device status over time. The training process uses the back propagation algorithm to update the parameters in the model. , optimize the model by minimizing the prediction error. The training loss function usually uses the mean square error (MSE) as the optimization target, and the formula is as follows: ;in: is the loss function of the LSTM model, which is used to measure the gap between the predicted value and the actual value; For the device at time The actual state value, such as the actual measured battery SOC; The device status value predicted by the LSTM model; is the total number of training samples.
[0066] By continuously optimizing the loss function ,The LSTM model can effectively learn the complex relationship between device status and environmental factors, and improve the accuracy of prediction.
[0067] The trained LSTM model can predict the future state of the device. In step S3, the model will be based on the real-time data input and environmental data and , the output device will be at the next moment The prediction results , usually battery SOC, voltage or other key information.
[0068] The output results will be used for subsequent equipment status estimation, alarm processing or equipment management decisions.
[0069] High-precision device state prediction: The LSTM model can accurately capture the law of device state changes over time, especially in the charging and discharging process of devices such as batteries, power consumption, etc. By combining historical data and external environment input, LSTM can provide high-precision predictions for the future state of the device (such as SOC, voltage, etc.).
[0070] Time series data processing capability: The LSTM model is very suitable for processing time series data of device status and can identify the long-term dependencies between devices at different time steps. Therefore, it has obvious advantages in predicting battery charging and discharging processes, device health status, etc.
[0071] Real-time and high efficiency: By accessing device status data and environmental data in real time, the LSTM model can quickly calculate the predicted value of the device's future state and provide a fast response for the alarm system. This real-time performance meets the requirements for low latency and high throughput in large-scale device monitoring systems.
[0072] Alarm support: Through accurate equipment status prediction, the LSTM model provides reliable basic data for the alarm system. The prediction results can be used as the basis for alarm triggering, helping the system to detect equipment failures or abnormal conditions in a timely manner, thereby achieving rapid response and maintenance.
[0073] Through the application of deep learning models (LSTM), equipment status prediction becomes more accurate and efficient, providing reliable technical support for subsequent equipment management, alarm generation and health monitoring.
[0074] S4. Modeling the state of the equipment using a nonlinear dynamic model, including calculating the law of equipment state change; The core of S4 is to use nonlinear dynamic models to model the state of the equipment based on the prediction of the equipment state, so as to accurately estimate the law of change of the equipment state. The nonlinear dynamic model can fully consider the impact of the equipment's charging and discharging process, internal electrochemical reactions and external environmental factors on the equipment state, and thus establish a more accurate model.
[0075] In this embodiment, the nonlinear dynamic model uses a mathematical model based on the battery charging and discharging process to simulate the dynamic state changes of the device. By combining the real-time collected device data with the influencing factors of the external environment, the nonlinear model can provide an accurate estimate of the future state of the device. Specifically, the modeling in step S4 includes the calculation of the change of the device state and the prediction of the device state under specific control input.
[0076] In this embodiment, the detailed implementation of step S4 is as follows: In step S4, a nonlinear dynamic model is used to simulate the change of the device state. The device state (such as battery SOC, voltage, capacity, etc.) is a highly nonlinear process affected by multiple factors. The traditional linear model cannot accurately describe this complex relationship. Therefore, the present invention chooses to use nonlinear equations to describe the state change of the device, especially during the charging and discharging process, the state change of the device often shows nonlinear characteristics.
[0077] In devices such as batteries, the charging and discharging process is nonlinear. The process of the battery's SOC (state of charge) changing over time is affected by both internal and external factors of the battery and is expressed using the aforementioned disclosed "nonlinear equation."
[0078] This nonlinear equation describes the change in charge of a device (such as a battery) during charging or discharging. The SOC will change at each time step. An update occurs on the device, resulting in a change in the device status.
[0079] During the operation of devices such as batteries, external environmental factors (such as temperature, humidity, etc.) will have a significant impact on the performance of the device. In this embodiment, external environmental factors are incorporated into the calculation of the model to more accurately simulate the state changes of the device. For example, in an environment where the temperature is too high or too low, the battery's charge and discharge efficiency will be will be affected. Therefore, the equations of the nonlinear model can be adjusted by To consider the influence of ambient temperature: ; in: is the battery charge and discharge efficiency under standard environmental conditions; It represents the sensitivity coefficient of temperature to battery efficiency, which is usually a constant less than 1 and is used to describe the effect of temperature change on battery efficiency. is the temperature data of the external environment at time The value of is in degrees Celsius (℃); is the temperature under standard environment.
[0080] In this way, the temperature effect of the external environment will be reflected in the efficiency factor of the battery. , which in turn affects the change of device status.
[0081] Through this nonlinear dynamic model, we can further consider the impact of the external environment on the performance of the device on the basis of considering the internal electrochemical process of the device. For batteries, as factors such as ambient temperature and humidity change, the battery's charge and discharge efficiency will change accordingly, which in turn affects the battery's charge and discharge process, SOC changes, and battery life.
[0082] In general, the parameters of nonlinear models (such as current input , Battery efficiency , Temperature influence coefficient In this way, the nonlinear dynamic model can accurately describe the state changes of the equipment and provide a reliable basis for subsequent equipment state prediction, estimation and alarm.
[0083] The nonlinear dynamic model in this embodiment is not limited to describing the changes in battery SOC, but can also be extended to changes in other device states. For example, key parameters such as battery charging efficiency and energy output can also be modeled using similar nonlinear equations. These equations can be adjusted according to the actual application scenarios of the device, so that the model can be more accurately adapted to different device types and working environments.
[0084] In general, the parameters of the nonlinear model need to be calibrated through experimental data or historical records. In this way, the nonlinear dynamic model can accurately describe the state changes of the equipment and provide a reliable basis for subsequent equipment state prediction, estimation and alarm.
[0085] By introducing a nonlinear dynamic model, the changing process of the device state (such as battery SOC) can be accurately described, especially the nonlinear change of the battery state during charging and discharging.
[0086] Incorporating external environmental factors (such as temperature, humidity, etc.) into the model can more accurately simulate the operating status of the equipment under different environmental conditions, providing more detailed data support for equipment management and fault prediction.
[0087] Nonlinear dynamic models are not only applicable to devices such as batteries, but can also be extended to other device state modeling that needs to consider timing changes and environmental influences, such as smart grids, sensor networks, etc.
[0088] S5, real-time estimation of the state of the device through extended Kalman filtering; The S5 uses an extended Kalman filter (EKF) to estimate the state of the equipment in real time. In this way, the system can use the observed data to correct the equipment state prediction, thereby improving the accuracy and reliability of the prediction.
[0089] In this embodiment, EKF is a key step in accurately estimating the device state, and can correct the state prediction based on the device's historical state and real-time observation data. This method is particularly suitable for nonlinear state estimation in dynamic systems and can effectively improve the system's real-time response capability to device states.
[0090] In this embodiment, the detailed implementation of step S5 is as follows: In step S5, the state of the device is estimated in real time by using the extended Kalman filter. EKF is a filtering method for nonlinear systems. It can update the device state through actual observation data based on the prediction of the device state, thereby improving the accuracy of the system. The EKF process includes a prediction phase and an update phase. Specifically, the device state is first predicted through the historical data of the device, and then the prediction result is corrected through real-time observation data.
[0091] The Extended Kalman Filter (EKF) relies on a prediction phase and an update phase to recursively update the state estimate of the device. Below is the basic formula of the EKF, which first performs the prediction phase and then corrects the prediction results through the update phase.
[0092] Prediction stage: ; in: For the moment Predicted equipment status; It is a dynamic model function of the device state, describing the law of device state change over time. This function can be nonlinear, representing the change process of the device state; : The previous moment Equipment state estimation; is the control input, at time The control input is usually an external force or signal acting on the device, such as charging current, environmental changes, etc.
[0093] Update phase: ; in: is the updated device state estimate at time The device status value; The predicted equipment status comes from the calculation results of the prediction stage; is the Kalman gain, which determines the weight between prediction and observation. Kalman gain is a key parameter in EKF, which determines the ratio of observed data to predicted data in the update process; For the moment Observation data, usually from sensors or other observation devices. For example, it can be the actual voltage and temperature of the battery; The predicted equipment state is Mapped to the observation space. This model is used to compare the state estimate of the device with the actual observation data.
[0094] Kalman Gain It is an important parameter in EKF, which is used to determine the balance between the predicted value and the observed data. The size of the Kalman gain determines the weight of the predicted results and the observed data when the model is updated. The calculation formula of the Kalman gain is: ; The parameters are defined as follows: The state covariance matrix in the prediction phase represents the uncertainty of the device state prediction; is the observation matrix, which is used to map the state value to the observation space. For example, for a battery, the observation matrix may convert the actual voltage of the battery into measurable current or voltage data; is the observation noise covariance matrix, which represents the uncertainty of the observation data. The sources of observation noise include sensor error, measurement error and other factors; is the transpose operator, which represents the transpose operation of the matrix; It is the inverse operation of the matrix, which is used to calculate the gain weights and correct the predicted values according to the observed data.
[0095] By calculating the Kalman gain , the system is able to find the best balance between predicted values and observed data, thereby effectively updating the state estimate of the equipment.
[0096] After each EKF update, the device state estimate will be corrected, and with each update of the observation data, the estimate of the device state will become more and more accurate. Finally, after many iterations, the estimated value of the device state Can accurately reflect the actual status of the equipment.
[0097] Improve the accuracy of equipment state estimation: By introducing the extended Kalman filter, the system can combine the predicted value with the real-time observation data, effectively correct the estimation error of the equipment state, and thus improve the accuracy of the state estimation.
[0098] Real-time response and correction: EKF's real-time update mechanism can quickly respond to changes in device status and promptly correct prediction results to ensure that the device's status estimation remains accurate at all times.
[0099] Strong robustness: EKF can effectively handle uncertainty and noise, and has strong adaptability to nonlinear problems in device state estimation. Especially in complex dynamic environments, EKF exhibits good robustness.
[0100] Through the prediction and update process of EKF, the system can effectively eliminate the uncertainty caused by equipment model errors or observation errors, thereby improving the accuracy and robustness of equipment state estimation, while facilitating subsequent alarm generation and equipment management, and providing reliable data support for equipment health monitoring and maintenance.
[0101] S6. Based on the prediction results of the equipment status, use deep reinforcement learning to optimize the alarm strategy; Deep reinforcement learning (DRL) is used to optimize the alarm strategy in device status management. Alarms are triggered by learning intelligent decisions based on the device status prediction results (such as battery SOC, temperature, voltage, etc.). In order to ensure that the strategy in the reinforcement learning process can be adjusted dynamically, the reward function and action space in reinforcement learning are used to feedback the system performance and optimize the strategy. The following is the expansion of the reinforcement learning formula and detailed parameter definitions.
[0102] In deep reinforcement learning, the reinforcement learning model optimizes the alarm strategy through the feedback signal (reward) of the environment. The design of the reward function is crucial to the learning process of reinforcement learning. For the optimization of the alarm strategy in the device status management system, the reward function should be able to be calculated based on factors such as the accuracy, timeliness, false alarm rate and missed alarm rate of the alarm.
[0103] ; in: time The reward value is used to evaluate the quality of the alarm strategy; , , : Weight coefficient, used to adjust the impact of false positives, false negatives and delays on rewards; Indicates at time False alarm rate; Indicates at time The underreporting rate; Indicates the alarm trigger delay.
[0104] When optimizing the warning strategy, the reinforcement learning model needs to define the action space and state space so that the model can make decisions and update its strategy based on the reward function.
[0105] The action space represents the different actions that the model can take. In alert strategy optimization, the action space usually includes the following actions: Trigger an alarm: When the device status reaches a preset threshold, an alarm is triggered.
[0106] Do not trigger an alarm: When the device status is normal or does not change much, no alarm is triggered.
[0107] The choice of action space affects the accuracy and timeliness of the alert, and the deep reinforcement learning model determines when to take these actions by optimizing the strategy.
[0108] The state space represents the input data of the reinforcement learning model, which contains the real-time state information of the device and the prediction results. The specific state space can include: Real-time status data of the device: including battery SOC (state of charge), voltage, current, temperature, etc.
[0109] External environment data: such as ambient temperature, humidity, etc. These factors will affect the operating status of the equipment.
[0110] Prediction result: The predicted value of the equipment status obtained by the equipment status prediction model in the previous steps.
[0111] The design of the state space enables the deep reinforcement learning model to make decisions based on the current state of the device, thereby optimizing the alarm strategy.
[0112] The deep reinforcement learning model continuously learns how to optimize the alarm strategy through interaction with the environment. The system adjusts the alarm trigger mechanism by receiving feedback information about the device status (such as false alarms, missed alarms, delays, etc.). As the training process progresses, the model's strategy will gradually converge to the optimal solution.
[0113] Policy optimization in deep reinforcement learning is usually achieved through Q learning or policy gradient method. In Q learning, the formula for updating the policy is: ; in: For the moment Device status and actions Q value; is the learning rate, which indicates the importance of the newly learned reward information at each update; For at the moment The immediate reward is the actual feedback after the device status triggers an alarm; is the discount factor, which indicates the degree of attenuation of future rewards; Indicates at time When the current device status Choose the action that achieves the maximum Q value.
[0114] In the policy gradient method, the goal is to maximize the cumulative reward, that is, to obtain the optimal warning strategy by optimizing the policy function.
[0115] Optimize alarm triggering strategies: Through deep reinforcement learning, the system can adaptively adjust alarm strategies, dynamically determine when and how to trigger alarms, and improve the accuracy and timeliness of alarms.
[0116] Intelligent alarm mechanism: The system can intelligently adjust the alarm trigger threshold according to changes in equipment status, external environmental impact and historical data to avoid false alarms and missed alarms.
[0117] Improve system responsiveness: Through the optimization of deep reinforcement learning models, the system can respond to changes in device status in a timely manner and achieve fast and accurate alarm processing.
[0118] By designing reward functions, action spaces, and state spaces, the reinforcement learning model can adaptively adjust the alarm strategy in a dynamically changing environment, thereby improving the accuracy, timeliness, and stability of the alarm. Through continuous learning and strategy optimization, the system can provide an efficient and intelligent alarm mechanism for device status management, ensuring that the device can respond in a timely manner when the status is abnormal.
[0119] S7. According to the alarm strategy, an alarm is triggered when the device status is abnormal, and the alarm information is fed back to the operation and maintenance personnel; S7 further details the specific conditions for alarm triggering and how alarm information is transmitted to operation and maintenance personnel through the message notification system. Alarm triggering not only considers the current status of the device, but also combines the prediction results of the aforementioned EKF and deep learning models. The system determines whether to trigger an alarm by calculating the comprehensive evaluation value of the device status and comparing it with the dynamic threshold.
[0120] The specific conditions for triggering the alarm can be described by the following formula: ; in: For the device at time The predicted status of Comprehensive evaluation function of equipment status; The alarm trigger threshold indicates the standard for triggering an alarm when the device status reaches a certain value; It is the alarm trigger flag. When the value exceeds the set threshold Threshold(t)\text{Threshold}(t)Threshold(t), the alarm is triggered and the flag is 1; otherwise, the alarm is not triggered and the flag is 0.
[0121] When an alarm is triggered, the system will send the alarm information to the operation and maintenance personnel to ensure that the problem can be responded to as soon as possible. The transmission of alarm information is carried out through a message notification system (such as WeChat for Enterprise), which can send alarm information to the operation and maintenance personnel in real time, including detailed information such as device status, forecast data, and alarm level.
[0122] The transmission process of alarm information can be expressed as the following formula: ; in: Sending alarm information means sending alarm information at time When an alarm is triggered, the system transmits the alarm information to the operation and maintenance personnel; Detailed information about the alarm, including alarm type, alarm level, triggering reason, etc. Information about the maintenance personnel who receive the alarm. Usually includes the name and contact information of the maintenance personnel to ensure timely response to the alarm; The current real-time status information of the device; The prediction result of the future state of the equipment is based on the prediction value of the EKF or deep learning model.
[0123] Dynamic adjustment of alarm thresholds is an important aspect of system optimization. Based on the long-term operation data of the equipment and historical alarm records, the system can adaptively adjust the triggering conditions of the alarm. This adjustment is based on multiple factors such as the health of the equipment and changes in the external environment. For example, as the battery ages, the system will automatically adjust the alarm threshold of the battery SOC to ensure that the alarm can be triggered in time when the battery performance deteriorates.
[0124] The alarm trigger threshold can be dynamically adjusted according to the change of device status. The specific adjustment formula can be expressed as: ; in: For the moment The alarm trigger threshold indicates that the alarm is triggered when the device status reaches this value. The threshold is adjusted dynamically with time and device status changes; is the initial alarm trigger threshold, which indicates the default threshold of the device under normal working conditions; Represents the weight coefficient related to the battery SOC change, which is used to adjust the impact of the SOC change on the threshold; For the device at time The SOC change is used to reflect the change in the device's power state; Represents the weight coefficient related to the external environment temperature change, which is used to adjust the impact of temperature change on the threshold; is the external ambient temperature at time The change in temperature reflects the impact of ambient temperature fluctuations on the equipment.
[0125] By dynamically adjusting the alarm trigger threshold, the system can respond to changes in device status more accurately and reduce false alarms and missed alarms. Alarm information is promptly delivered to operation and maintenance personnel through the message notification system to ensure that problems can be quickly handled and the system can run stably.
[0126] The device status real-time calculation system based on Flink described below and the device status real-time calculation method based on Flink described above can refer to each other.
[0127] Please refer to the attached Figure 2 The present invention also provides a device status real-time computing system based on Flink, including: Data acquisition module, used to obtain real-time data of the equipment, including voltage, current and temperature data of the equipment and external environment data; The data transmission module is used to transmit the real-time data of the device to the Flink cluster for streaming data processing; The state prediction module is used to predict the state of the device using a deep learning model to obtain an estimated value of the future state of the device; Nonlinear dynamics modeling module, used to model the state of the equipment, including calculating the law of equipment state change; A state estimation module is used to estimate the state of the device in real time through an extended Kalman filter; The alarm module is used to optimize the alarm strategy based on the prediction results of the device status, using deep reinforcement learning, and trigger an alarm when the device status is abnormal.
[0128] The system of this embodiment can be used to execute the above method embodiments, and its principles and technical effects are similar, which will not be repeated here.
[0129] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.
Claims
1. A real-time calculation method for device status based on Flink, characterized in that: The following steps are involved: S1. Acquire real-time data of the device, where the real-time data of the device includes operating parameters of the device and external environment data; S2, transmitting the real-time data of the device to the Flink cluster for streaming data processing; S3. Use the deep learning model to predict the current state of the device and obtain an estimate of the future state of the device; S4. Modeling the state of the device using a nonlinear dynamic model, wherein the modeling includes calculating a law of device state change; S5, real-time estimation of the state of the device through extended Kalman filtering; S6. Based on the prediction results of the equipment status, use deep reinforcement learning to optimize the alarm strategy; S7. According to the alarm strategy, an alarm is triggered when the equipment status is abnormal, and the alarm information is fed back to the operation and maintenance personnel.
2. According to the Flink-based device status real-time calculation method of claim 1, it is characterized in that: The real-time data acquisition device includes: Obtain the voltage data of the device through the voltage sensor; Obtain current data of the device through a current sensor; Obtain the temperature data of the device through the temperature sensor; Acquire the temperature data of the external environment through the ambient temperature sensor; Obtain humidity data of the external environment through the environmental humidity sensor; The voltage, current and temperature data of the device are integrated with the temperature and humidity data of the external environment and transmitted to the data processing system.
3. According to the Flink-based device status real-time calculation method of claim 1, it is characterized in that: The deep learning model includes: Train the historical status data of the equipment through the neural network model; The current state information of the input device is used as input features, and the prediction result of the future state of the device is output; The model parameters are adjusted using the back-propagation algorithm using the training data to minimize the prediction error.
4. According to the Flink-based device status real-time calculation method of claim 1, it is characterized in that: The nonlinear dynamics model includes: The change of the device state is described by a nonlinear equation, which includes the device charging and discharging process and the external environment influence; Calculating the law of change of the device state, the law taking into account the electrochemical process of the device and environmental change factors; An estimation of future states is performed based on the equipment state model, wherein the estimation is based on equipment historical data and control inputs.
5. According to the Flink-based device status real-time calculation method of claim 1, it is characterized in that: The extended Kalman filter comprises: Predict the next state of the device based on the device's historical state and control input; Update the equipment state estimate based on the difference between the actual observed data and the predicted data; Kalman gain is used to update the state to ensure the accuracy of device state estimation.
6. A method for real-time calculation of device status based on Flink according to claim 1, characterized in that: The deep reinforcement learning optimization alarm strategy includes: Define the action space and state space of device state changes; Optimize the alarm strategy through deep reinforcement learning model to decide whether to trigger an alarm when the device status is abnormal; Use reward functions to optimize the model's strategy and improve the timeliness and accuracy of alerts.
7. A real-time computing system for device status based on Flink, characterized in that: A method for real-time calculation of device status based on Flink according to any one of claims 1 to 6, comprising: Data acquisition module, used to obtain real-time data of the equipment, including voltage, current and temperature data of the equipment and external environment data; A data transmission module, used to transmit the real-time data of the device to the Flink cluster for streaming data processing; The state prediction module is used to predict the state of the device using a deep learning model to obtain an estimated value of the future state of the device; A nonlinear dynamics modeling module is used to model the state of the device, wherein the modeling includes calculating the law of device state change; A state estimation module is used to estimate the state of the device in real time through an extended Kalman filter; The alarm module is used to optimize the alarm strategy based on the prediction results of the device status, using deep reinforcement learning, and trigger an alarm when the device status is abnormal.
8. The device status real-time computing system based on Flink according to claim 7 is characterized in that: The data acquisition module comprises: Equipment sensor module, used to collect real-time data of voltage, current and State of Charge of the equipment; Environmental sensor module, used to collect external environmental data; Data integration module, used to combine the equipment's operating data with environmental data to form comprehensive equipment status data; The data transmission module is used to transmit the collected data to the data processing system in real time.
9. The device status real-time computing system based on Flink according to claim 7 is characterized in that: The state prediction module comprises: A deep learning model module, used to train and implement the prediction of device status, wherein the deep learning model uses a neural network to regress the device status; LSTM module, used to process device status time series data and capture the time-varying characteristics of device status changes; The model optimization module is used to adjust the model parameters and optimize the prediction ability of the neural network through the training set.
10. The device status real-time computing system based on Flink according to claim 7, characterized in that: The alarm module comprises: Reinforcement learning module, used to optimize the alarm triggering strategy through deep reinforcement learning model; The status monitoring module is used to monitor the changes in equipment status in real time and determine whether to trigger an alarm; The alarm trigger module is used to trigger an alarm when the device status is abnormal, and send the alarm information to the operation and maintenance personnel through the message notification system; The threshold adjustment module dynamically adjusts the alarm threshold according to changes in device status and optimizes the alarm strategy.
Citation Information
Patent Citations
Prediction model fusion-based battery life prediction method and storage medium
CN111680848A
Health prediction method of energy power generation equipment based on real-time data stream processing
CN116384592A
Intelligent control system for solid-state lithium ion battery power supply
CN118137618A
Method and system for estimating health state value of battery system
CN118566770A
Cited By
Smart station SCADA data early warning method and system based on long convolution and data control gate
CN120597123A