A hydrological RTU monitoring method capable of operating under harsh working conditions

CN119105630A8Pending Publication Date: 2025-01-03XINJIANG HERUN TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411223150.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-03
Publication Date
2025-01-03

AI Technical Summary

Technical Problem

Traditional hydrological RTUs face challenges in operating stably under harsh conditions, experiencing unstable data collection, transmission delays, and low data quality, which affect their reliability and real-time performance.

Method used

A hydrological RTU monitoring method that includes real-time data acquisition, data denoising using moving average and Kalman filters, standardization, feature vector generation, sensor relationship graph construction, and predictive anomaly detection using RNNs and LSTMs.

Benefits of technology

Enhances the stability and accuracy of data processing under harsh conditions, ensuring reliable real-time operation and timely detection of anomalies.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119105630A8_ABST
    Figure CN119105630A8_ABST
Patent Text Reader

Abstract

The present invention discloses a hydrological RTU monitoring method that can operate under harsh working conditions, specifically related to the field of environmental monitoring, and the fault prediction method steps are as follows: S1: real-time collection of sensor data, use of moving average method and Kalman filter denoising to process data, and standardization of data using standard score and minimum-maximum standardization; S2: vectorization of data of each sensor, and generation of feature vectors using pre-trained embedding model and autoencoder; data prediction and anomaly detection predict data changes through RNN or LSTM, calculate prediction deviation and perform normalization, and use maximum deviation value for anomaly detection, which can monitor the system operation status in real time, timely discover and handle abnormal situations, and ensure stable operation of the system. In summary, this method significantly improves the operation stability and data processing accuracy of hydrological RTU under harsh working conditions through the combination of multiple technical means, and has significant practical value.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of environmental monitoring, and more specifically to a hydrological RTU monitoring method capable of operating under adverse working conditions. Background Art

[0002] Hydrological RTUs are usually deployed in field environments to monitor key hydrological data such as water level, flow, water quality, and rainfall. These devices must be able to operate stably under harsh working conditions, including extreme temperature, humidity, and other environmental factors that may affect equipment performance. They send the collected data to the Water Conservancy Bureau and flood control headquarters through a wireless network system for decision-making. However, under harsh working conditions, traditional hydrological monitoring systems face problems such as unstable data collection, transmission delays, and low data quality. It is difficult to meet the requirements of high reliability and real-time performance, which affects the normal operation of hydrological RTUs. To this end, we propose a hydrological RTU monitoring method that can operate under harsh working conditions. Summary of the invention

[0003] In order to overcome the above-mentioned defects of the prior art, the present invention provides a hydrological RTU monitoring method that can operate under harsh working conditions, S1: real-time acquisition of sensor data, use of moving average method and Kalman filter denoising to process the data, and standardization of the data using standard score and minimum-maximum standardization;

[0004] S2: vectorize the data of each sensor, generate feature vectors using pre-trained embedding models and autoencoders, calculate the similarity between sensors using cosine similarity, Euclidean distance, and Pearson correlation coefficient, and construct a sensor relationship graph;

[0005] S3: Use the sliding window method to split the time series data into subsequences, and use the weighted moving average method to process the data to capture the short-term change characteristics of the data;

[0006] S4: Use graph attention mechanism and multi-head attention mechanism to perform weighted learning on sensor features, and learn the dependency between sensors by calculating attention coefficient and weighted sum;

[0007] S5: Use recursive neural networks and long short-term memory networks to predict historical time series data, calculate the deviation between the predicted value and the observed value, normalize the deviation, use the maximum deviation value to determine whether the data is abnormal, and trigger the alarm mechanism.

[0008] In a preferred embodiment, the specific steps of real-time data collection of each sensor are as follows: S101, using multi-threading and asynchronous processing technology to collect data from each sensor in real time; S102, using moving average method and Kalman filter method to perform data smoothing: Among them, MAt is the moving average at time t, n is the size of the sliding window, x t-i is the original data value at time ti; Kalman filter: in, is the state estimate at time k, K k is the Kalman gain at time k, z k is the measured value at time k, P k =(IK k H)P k-1 , where P k is the estimated error covariance matrix at time k; S103, use standard score and minimum-maximum standardization to standardize the data, standard score: Among them, z is the standardized data value, x is the original data value, μ is the mean of the data, and σ is the standard deviation of the data; minimum-maximum standardization: Among them, x ′ is the normalized data value, x is the original data value, and x min and x max are the minimum and maximum values ​​of the data respectively.

[0009] In a preferred embodiment, the specific steps of vectorizing the data of each sensor are as follows: S201, using a pre-trained embedding model and an autoencoder to generate a sensor feature vector, in, is the loss function, which represents the difference between the original data x and the reconstructed data S202, using cosine similarity, Euclidean distance and Pearson correlation coefficient to calculate the similarity between sensors Cosine similarity: Among them, e ji is the cosine similarity between sensor i and sensor j, v i and v j are the feature vectors of sensors i and j, respectively, ∥v i ∥ and ∥v j ∥ are the modulus and Euclidean distance of the eigenvectors: d ji =∥v i -v j ∥, where d ji is the Euclidean distance between sensor i and sensor j, v i and v j are the feature vectors of sensors i and j, respectively, ∥v i -v j ∥ is the distance between two vectors, Pearson correlation coefficient: Among them, r ji is the Pearson correlation coefficient between sensor i and sensor j, vik and v jk are the eigenvalues ​​of sensor i and sensor j in the kth dimension, and are the feature means of sensors i and j respectively.

[0010] In a preferred embodiment, the specific steps of dividing the time series data into subsequences are as follows, and the weighted moving average method is used for processing: (t) =[s (t-w) ,s (t-w+1) ,…,s (t-1) ], where x (t) is a subsequence at time t, s (t-w) to (t-1) It is the data from time tw to time t-1, w is the size of the sliding window; weighted sliding average method: Among them, WMA t is the weighted sliding average at time t, x t-1 is the original data value at time ti, w i is the weight coefficient.

[0011] In a preferred embodiment: a graph attention mechanism and a multi-head attention mechanism are used to perform weighted learning on feature data. The graph attention mechanism: in, is the feature vector of sensor i at time t, α ii and α ij are the attention coefficients of sensor i to itself and neighbor sensor j, respectively, W is a trainable weight matrix, and are the feature vectors of sensors i and j at time t, and the attention coefficient Among them, α ij is the attention coefficient of sensor i to sensor j, and π(i,j) is the similarity score between sensors i and j; multi-head attention mechanism: Among them, MultiHead(h i ) is the output of the multi-head attention mechanism, Head m (h i ) is the output of the mth attention head, and M is the number of attention heads.

[0012] In a preferred embodiment: the specific method of using recursive neural network and long short-term memory network to predict historical time series data is as follows: S501, using RNN and LSTM to predict current sensor data: RNN: b t =σ(W h h t-1 +W x xt ), where h t is the hidden state at time t, σ is the activation function, W h and W x are the weight matrices of hidden state and input data, respectively, x t is the input data at time t; y t =W y h t , where y t is the output data at time t; LSTM:f t =σ(W f [h t-1 ,x t ]+b f ), where f t is the output of the forget gate, W f is the weight matrix of the forget gate, b f is the bias vector of the forget gate; i t =σ(W i [h t-1 ,x t ]+b i ) where i t is the output of the input gate, W i is the weight matrix of the input gate, b i is the bias vector of the input gate, in, is the state of the candidate memory cell, W C is the weight matrix of the candidate memory unit, b C is the bias vector of the candidate memory unit; Among them, C t is the state of the memory cell, f t is the output of the forget gate, C t-1 is the memory cell state at the previous moment, i t is the output of the input gate, is the state of the candidate memory unit; o t =σ(W o [h t-1 ,x t ]+b o ) Among them, o t is the output of the output gate, W o is the weight matrix of the output gate, b o is the bias vector of the output gate; h t =o t *tanh(C t ) where h t is the hidden state, o t is the output of the output gate, C tis the state of the memory unit; S502, calculate the deviation Err between the predicted value and the observed value i (t), deviation calculation formula: Among them, Err i (t) is the prediction error of sensor i at time t, is the observation value of sensor i at time t, is the predicted value of sensor i at time t; S503, deviation normalization processing: normalize the deviation: Among them, a i (t) is the normalized error of sensor i at time t, Err i (t) is the prediction error of sensor i at time t, is the median error of sensor i, is the error interquartile range of sensor i; S504, data anomaly detection: use the maximum deviation value to determine whether the data is abnormal: A(t) = maxa i (t), where A(t) is the maximum normalized error at time t, and a i (t) is the normalized error of sensor i at time t. If A(t) exceeds the preset threshold, the data is judged to be abnormal.

[0013] Through the above steps, the operation stability of the hydrological RTU under harsh working conditions has been significantly improved by this method. First, multi-threading and Kafka message queue system are used for data collection and processing to ensure the real-time and integrity of the data, and improve the response speed and data transmission efficiency of the system. Secondly, the moving average method and Kalman filter are used to denoise the data, and the standard score and minimum-maximum standardization are used to standardize the data, which significantly improves the quality and consistency of the data. Thirdly, the high-quality feature vector generated by the sensor feature embedding step can accurately capture the characteristics of the sensor data, calculate the similarity between sensors, and construct a reliable sensor relationship graph. The graph feature extraction can effectively extract the short-term change characteristics of time series data through the sliding window method and the weighted sliding average method, providing high-quality feature input. The graph attention mechanism learning captures the dependency between sensors by weighted learning sensor features, and improves the accuracy and stability of feature representation. Finally, data prediction and anomaly detection predict data changes through RNN or LSTM, calculate the prediction deviation and perform normalization, and use the maximum deviation value for anomaly detection. It can monitor the system operation status in real time, detect and handle abnormal situations in time, and ensure the stable operation of the system. In summary, this method significantly improves the operating stability and data processing accuracy of hydrological RTU under harsh working conditions through the combination of multiple technical means, and has significant practical value. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] Figure 1 The figure is a flow chart of the monitoring method of the present invention. DETAILED DESCRIPTION

[0015] The technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments; based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0016] A hydrological RTU monitoring method that can operate under harsh working conditions has the following steps: S1: collect data from each sensor in real time, use moving average method and Kalman filter to denoise the data, and use standard score and minimum-maximum standardization to standardize the data; S2: vectorize the data of each sensor, use pre-trained embedding model and autoencoder to generate feature vectors, use cosine similarity, Euclidean distance and Pearson correlation coefficient to calculate the similarity between sensors, and construct a sensor relationship graph; S3: use sliding window method to split time series data into subsequences, and use weighted sliding average method to process the data to capture short-term changes in the data. features; S4: Use graph attention mechanism and multi-head attention mechanism to perform weighted learning on sensor features, and learn the dependency between sensors by calculating attention coefficient and weighted sum; S5: Use recursive neural network and long short-term memory network to predict historical time series data, calculate the deviation between predicted value and observed value, and normalize the deviation, use the maximum deviation value to judge whether the data is abnormal, and trigger the alarm mechanism; The specific steps of real-time collection of sensor data are as follows: S101, use multi-threading and asynchronous processing technology to collect data from each sensor in real time; S102, use moving average method and Kalman filter method to smooth data: Among them, MA t is the moving average at time t, n is the size of the sliding window, x t-i is the original data value at time ti; Kalman filter: in, is the state estimate at time k, K k is the Kalman gain at time k, z k is the measured value at time k, P k =(IK k H)P k-1 , where P k is the estimated error covariance matrix at time k; S103, use standard score and minimum-maximum standardization to standardize the data, standard score: Among them, z is the standardized data value, x is the original data value, μ is the mean of the data, and σ is the standard deviation of the data; minimum-maximum standardization: Among them, x ′ is the normalized data value, x is the original data value, and x min and x max are the minimum and maximum values ​​of the data respectively; in this method, data collection and preprocessing are important steps to ensure that the system can run efficiently. First, data is collected from each sensor in real time. The key to this step is the real-time and integrity of data collection. To achieve this goal, multi-threading or asynchronous processing technology is used to ensure high-frequency data collection. Multi-threading processing technology can collect data from multiple sensors at the same time without affecting the data collection efficiency of the entire system due to the data delay of a single sensor. At the same time, the Kafka message queue system is used for data stream processing. Kafka is a high-throughput, low-latency distributed messaging system that can efficiently manage and transmit large amounts of data. In the Kafka system, the producer sends sensor data to the Kafka topic, and each Broker in the Kafka cluster is responsible for storing and managing the data. Consumers read data from the Kafka topic in real time for processing, thereby achieving efficient data transmission and management. In order to ensure the quality of the data, data preprocessing is performed after data collection, including data denoising and standardization. First, the moving average method is used to smooth the data. By calculating the average value of the data within a fixed window, short-term fluctuations and noise can be effectively eliminated. Secondly, the Kalman filter method is used for further denoising. Kalman filtering is a recursive filtering method that can optimize data by minimizing the error between predicted values ​​and observed values. Finally, the processed data is standardized using the standard score (Z-score) and minimum-maximum standardization method. The standard score makes the data conform to the standard normal distribution by subtracting the mean and dividing by the standard deviation, while the minimum-maximum standardization scales the data to the range of [0,1] to ensure comparability between different data sets. Through the above steps, the data collection and preprocessing process can effectively improve the quality and consistency of the data, laying a solid foundation for subsequent analysis and processing.

[0017] In addition, the specific steps of vectorizing the data of each sensor are as follows: S201, using the pre-trained embedding model and the autoencoder to generate a sensor feature vector, in, is the loss function, which represents the difference between the original data x and the reconstructed data S202, using cosine similarity, Euclidean distance and Pearson correlation coefficient to calculate the similarity between sensors Cosine similarity: Among them, e ji is the cosine similarity between sensor i and sensor j, vi and v j are the feature vectors of sensors i and j, respectively, ||v i || and ||v j || are the modulus and Euclidean distance of the eigenvector respectively: d ji =||v i -v j ||, where d ji is the Euclidean distance between sensor i and sensor j, v i and v j are the feature vectors of sensors i and j, respectively, ||v i -v j || is the distance between two vectors, Pearson correlation coefficient: Among them, r ji is the Pearson correlation coefficient between sensor i and sensor j, v ik and v jk are the eigenvalues ​​of sensor i and sensor j in the kth dimension, and are the feature means of sensors i and j respectively; after data collection and preprocessing, the next step is sensor feature embedding. The purpose of this step is to vectorize the data of each sensor and generate a feature vector that can be used for machine learning and data analysis. First, the sensor embedding vector is generated using a pre-trained embedding model (such as Word2Vec). This method can capture the high-dimensional features of sensor data and generate a low-dimensional feature vector, thereby simplifying the data processing process. In order to further improve the expressive power of the feature vector, an autoencoder can also be used for unsupervised learning. The autoencoder learns the feature representation of the data by minimizing the difference between the input data and the reconstructed data. After generating the feature vector, the similarity between each sensor is calculated based on the sensor's features and historical data. In this step, the commonly used similarity calculation methods include cosine similarity, Euclidean distance, and Pearson correlation coefficient. Cosine similarity measures the similarity by calculating the cosine value of the angle between two vectors, which is suitable for similarity calculation of high-dimensional sparse data. Euclidean distance measures the similarity by calculating the straight-line distance between two vectors, which is suitable for similarity calculation of low-dimensional dense data. The Pearson correlation coefficient measures similarity by calculating the ratio of the covariance of two vectors to the standard deviation, which is suitable for measuring linear correlation. Through these methods, a relationship graph between sensors can be constructed to capture the interdependence between sensors, providing a basis for subsequent graph feature extraction and attention mechanism learning.

[0018] Next, the specific steps of splitting the time series data into subsequences are as follows, using the weighted moving average method: (t) =[s (t-w) ,s(t-w+1) ,…,s (t-1) ], where x (t) is a subsequence at time t, s (t-w) to (t-1) It is the data from time tw to time t-1, w is the size of the sliding window; weighted sliding average method: Among them, WMA t is the weighted sliding average at time t, x t-i is the original data value at time ti, w i is the weight coefficient; graph feature extraction is to process time series data to capture the short-term change characteristics of the data. In this method, the sliding window method is used to divide the time series data into multiple overlapping subsequences. The sliding window method is a commonly used time series analysis method. It generates multiple overlapping subsequences by sliding a fixed-size window on the time series. This method can capture the short-term change characteristics in the time series data and improve the prediction accuracy of the model. In order to further optimize the data characteristics, the weighted sliding average method is also used to process the data. The weighted sliding average method calculates the weighted average by assigning different weights to data at different time points. The weight can be set according to the importance of the data or the time distance. Generally, newer data points are assigned greater weights. This method can better reflect the impact of recent data and improve the accuracy of data features. By combining the sliding window method and the weighted sliding average method, the features in the time series data can be effectively extracted, the short-term changes and trends of the data can be captured, and a solid foundation can be laid for the subsequent graph attention mechanism learning and data prediction.

[0019] Then, the graph attention mechanism and multi-head attention mechanism are used to perform weighted learning on the feature data. The graph attention mechanism: in, is the feature vector of sensor i at time t, α ii and α ij are the attention coefficients of sensor i to itself and neighbor sensor j, respectively, W is a trainable weight matrix, and are the feature vectors of sensors i and j at time t, and the attention coefficient Among them, α ij is the attention coefficient of sensor i to sensor j, and π(i,j) is the similarity score between sensors i and j; multi-head attention mechanism: Among them, MultiHead(h i ) is the output of the multi-head attention mechanism, Head m (h i) is the output of the mth attention head, M is the number of attention heads; graph attention mechanism learning is to capture the dependency between sensors by weighted learning of sensor features. In this method, the graph attention mechanism (GAT) and multi-head attention mechanism are used to perform weighted learning of sensor features. First, the graph attention mechanism learns the dependency between sensors by calculating the attention coefficient and weighted summation. The attention coefficient represents the degree of mutual attention between sensors, and can be normalized by the Softmax function to ensure that the sum of the coefficients is 1. Through weighted summation, the features of multiple sensors can be fused together to improve the accuracy of feature representation. Secondly, the multi-head attention mechanism introduces multiple attention heads to learn features from different subspaces to improve the stability and expression ability of the model. Each attention head learns features in different subspaces, and then the outputs of all attention heads are spliced ​​to obtain the final feature representation. The multi-head attention mechanism can capture the diversity and complexity of data and improve the generalization ability of the model. Through the combination of graph attention mechanism and multi-head attention mechanism, the dependency between sensors can be effectively learned, the accuracy and stability of feature representation can be improved, and high-quality feature input can be provided for subsequent data prediction and anomaly detection.

[0020] Finally, it should be noted that the specific method of using recurrent neural networks and long short-term memory networks to predict historical time series data is as follows: S501, using RNN and LSTM to predict current sensor data: RNN:b t =σ(W h h t-1 +W x x t ), where h t is the hidden state at time t, σ is the activation function, W h and W x are the weight matrices of hidden state and input data, respectively, x t is the input data at time t; y t =W y h t , where y t is the output data at time t; LSTM:f t =σ(W f [h t-1 ,x t ]+b f ), where f t is the output of the forget gate, W f is the weight matrix of the forget gate, b f is the bias vector of the forget gate; i t =σ(W i [ht-1 ,x t ]+b i ) where i t is the output of the input gate, W i is the weight matrix of the input gate, b i is the bias vector of the input gate, in, is the state of the candidate memory cell, W C is the weight matrix of the candidate memory unit, b C is the bias vector of the candidate memory unit; Among them, C t is the state of the memory cell, f t is the output of the forget gate, C t-1 is the state of the memory cell at the previous moment, i is the output of the input gate, is the state of the candidate memory unit; o t =σ(W o [h t-1 ,x t ]+b o ) Among them, o t is the output of the output gate, W o is the weight matrix of the output gate, b o is the bias vector of the output gate; h t =o t *tanh(C t ) where h t is the hidden state, o t is the output of the output gate, C t is the state of the memory unit; S502, calculate the deviation Err between the predicted value and the observed value i (t), deviation calculation formula: Among them, Err i (t) is the prediction error of sensor i at time t, is the observation value of sensor i at time t, is the predicted value of sensor i at time t; S503, deviation normalization processing: normalize the deviation: Among them, a i (t) is the normalized error of sensor i at time t, Err i (t) is the prediction error of sensor i at time t, is the median error of sensor i, is the error interquartile range of sensor i; S504, data anomaly detection: use the maximum deviation value to determine whether the data is abnormal: A(t) = maxa i (t), where A(t) is the maximum normalized error at time t, and a i(t) is the normalized error of sensor i at time t. If A(t) exceeds the preset threshold, the data is judged to be abnormal. Data prediction and anomaly detection are the core steps of this method. By predicting sensor data and detecting anomalies, the normal operation of the system is ensured. First, the historical time series data is predicted using a recurrent neural network (RNN) or a long short-term memory network (LSTM) to obtain the predicted value of the current sensor data. RNN can capture the long-term dependency of time series data by recursively calculating the hidden state, while LSTM solves the gradient vanishing problem of RNN by introducing forget gates, input gates, and output gates, and better captures long-term dependencies. The prediction model can predict future data changes based on historical data and provide a reference for anomaly detection. Then, the deviation between the predicted value and the observed value of the sensor is calculated. By comparing the predicted value and the observed value, the accuracy of the prediction model can be evaluated and anomalies in the data can be identified. Next, the deviation is normalized to ensure that the analysis is performed on the same scale. Normalization can eliminate the scale differences between different sensors and improve the accuracy of anomaly detection. Finally, the maximum deviation value is used to determine whether the data is abnormal. By calculating the maximum normalized deviation value of all sensors, if the maximum value exceeds the preset threshold, the data is judged to be abnormal and the alarm mechanism is triggered. Through the data prediction and anomaly detection steps, the operating status of the system can be monitored in real time, abnormal situations can be discovered and handled in time, and the stable operation of the system can be ensured.

[0021] The above embodiments can be implemented in whole or in part by software, hardware, firmware and any other combination. When implemented by software, the above embodiments can be implemented in whole or in part in the form of a computer program product; the computer program product includes one or more computer instructions and computer programs; when the computer instructions and computer programs are loaded and executed on a computer, the processes and functions described in the embodiments of the present application are generated in whole or in part; the computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices; the computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions can be transmitted from one website, computer, server and data center to another website, computer, server and data center by wired means (such as infrared, wireless, microwave, etc.); the computer-readable storage medium can be any available medium accessed by a computer or a data storage device such as a server or data center that includes one or more available media sets; the available medium can be a magnetic medium (such as a floppy disk, a hard disk, a tape), an optical medium (such as a DVD), or a semiconductor medium; the semiconductor medium can be a solid-state hard disk;

[0022] It should be understood that in various embodiments of the present application, the order of the sequence numbers of the above processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0023] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here;

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

[0025] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit;

[0026] If the functions are implemented in the form of software functional units and sold and used as independent products, they can be stored in a computer-readable storage medium; based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in the various embodiments of the present application; and the aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk;

[0027] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes and substitutions within the technical scope disclosed in the present application, which should be covered by the protection scope of the present application.

Claims

1. A hydrological RTU monitoring method that can operate under harsh working conditions, characterized in that: The monitoring method steps are as follows: S1: Collect data from each sensor in real time, use moving average method and Kalman filter to denoise the data, and use standard score and minimum-maximum standardization to standardize the data; S2: vectorize the data of each sensor, generate feature vectors using pre-trained embedding models and autoencoders, calculate the similarity between sensors using cosine similarity, Euclidean distance, and Pearson correlation coefficient, and construct a sensor relationship graph; S3: Use the sliding window method to split the time series data into subsequences, and use the weighted moving average method to process the data to capture the short-term change characteristics of the data; S4: Use graph attention mechanism and multi-head attention mechanism to perform weighted learning on sensor features, and learn the dependency between sensors by calculating attention coefficient and weighted sum; S5: Use recursive neural networks and long short-term memory networks to predict historical time series data, calculate the deviation between the predicted value and the observed value, normalize the deviation, use the maximum deviation value to determine whether the data is abnormal, and trigger the alarm mechanism.

2. A hydrological RTU monitoring method capable of operating under harsh working conditions according to claim 1, characterized in that: The specific steps of real-time data collection of each sensor are as follows: S101, using multi-threading and asynchronous processing technology to collect data from each sensor in real time; S102, using moving average method and Kalman filter method to perform data smoothing: Among them, MA t is the moving average at time t, n is the size of the sliding window, x t-i is the original data value at time ti; Kalman filter: in, is the state estimate at time k, K k is the Kalman gain at time k, z k is the measured value at time k, P k =(IK k H)P k-1 , where P k is the estimated error covariance matrix at time k; S103, use standard score and minimum-maximum standardization to standardize the data, standard score: Among them, z is the standardized data value, x is the original data value, μ is the mean of the data, and σ is the standard deviation of the data; minimum-maximum standardization: Among them, x ′ is the normalized data value, x is the original data value, and x min and x max are the minimum and maximum values ​​of the data respectively.

3. A hydrological RTU monitoring method capable of operating under harsh working conditions according to claim 1, characterized in that: The specific steps of vectorizing the data of each sensor are as follows: S201, using the pre-trained embedding model and autoencoder to generate a sensor feature vector, in, is the loss function, which represents the difference between the original data x and the reconstructed data S202, using cosine similarity, Euclidean distance and Pearson correlation coefficient to calculate the similarity between sensors Cosine similarity: Among them, e ji is the cosine similarity between sensor i and sensor j, v i and v j are the feature vectors of sensors i and j, respectively, ||v i || and ||v j || are the modulus and Euclidean distance of the eigenvector respectively: d ji =||v i -v j ||, where d ji is the Euclidean distance between sensor i and sensor j, v i and v j are the feature vectors of sensors i and j, respectively, ||v i -v j || is the distance between two vectors, Pearson correlation coefficient: Among them, r ji is the Pearson correlation coefficient between sensor i and sensor j, v ik and v jk are the eigenvalues ​​of sensor i and sensor j in the kth dimension, and are the feature means of sensors i and j respectively.

4. A hydrological RTU monitoring method capable of operating under harsh working conditions according to claim 1, characterized in that: The specific steps of step 3 are as follows. The specific steps of splitting time series data into subsequences are as follows, and the weighted moving average method is used for processing: (t) =[s (t-w) ,s (t-w+1) ,…,s (t-1) ], where x (t) is a subsequence at time t, s (t-w) to (t-1) It is the data from time tw to time t-1, w is the size of the sliding window; weighted sliding average method: Among them, WMA t is the weighted sliding average at time t, x t-i is the original data value at time ti, w i is the weight coefficient.

5. The hydrological RTU monitoring method capable of operating under severe working conditions according to claim 1, characterized in that: The specific steps in step 4 are as follows: Use the graph attention mechanism and multi-head attention mechanism to perform weighted learning on feature data. Graph attention mechanism: in, is the feature vector of sensor i at time t, α ii and α ij are the attention coefficients of sensor i to itself and neighbor sensor j, respectively, W is a trainable weight matrix, and are the feature vectors of sensors i and j at time t, and the attention coefficient Among them, α ij is the attention coefficient of sensor i to sensor j, and π(i,j) is the similarity score between sensors i and j; Multi-head attention mechanism: Among them, MultiHead(h i ) is the output of the multi-head attention mechanism, Head m (h i ) is the output of the mth attention head, and M is the number of attention heads.

6. A hydrological RTU monitoring method capable of operating under severe working conditions according to claim 1, characterized in that: The specific method of using recurrent neural network and long short-term memory network to predict historical time series data is as follows: S501, using RNN and LSTM to predict current sensor data: RNN:b t =σ(W h h t-1 +W x x t ), where h t is the hidden state at time t, σ is the activation function, W h and W x are the weight matrices of hidden state and input data, respectively, x t is the input data at time t; y t =W y h t , where y t is the output data at time t; LSTM:f t =σ(W f [h t-1 ,x t ]+b f ), where f t is the output of the forget gate, W f is the weight matrix of the forget gate, b f is the bias vector of the forget gate; i t =σ(W i [h t-1 ,x t ]+b i ) where i t is the output of the input gate, W i is the weight matrix of the input gate, b i is the bias vector of the input gate, in, is the state of the candidate memory cell, W C is the weight matrix of the candidate memory unit, b C is the bias vector of the candidate memory unit; Among them, C t is the state of the memory cell, f t is the output of the forget gate, C t-1 is the state of the memory cell at the previous moment, i is the output of the input gate, is the state of the candidate memory unit; o t =σ(W o [h t-1 ,x t ]+b o ) Among them, o t is the output of the output gate, W o is the weight matrix of the output gate, b o is the bias vector of the output gate; h t =o t *tanh(C t ) where h t is the hidden state, o t is the output of the output gate, C t is the state of the memory unit; S502, calculate the deviation Err between the predicted value and the observed value i (t), deviation calculation formula: Among them, Err i (t) is the prediction error of sensor i at time t, is the observation value of sensor i at time t, is the predicted value of sensor i at time t; S503, deviation normalization processing: normalize the deviation: Among them, a i (t) is the normalized error of sensor i at time t, Err i (t) is the prediction error of sensor i at time t, is the median error of sensor i, is the error interquartile range of sensor i; S504, data anomaly detection: use the maximum deviation value to determine whether the data is abnormal: A(t) = maxa i (t), where A(t) is the maximum normalized error at time t, and a i (t) is the normalized error of sensor i at time t. If A(t) exceeds the preset threshold, the data is judged to be abnormal.