A reservoir real-time water level monitoring abnormal change intelligent early warning method
By constructing a reservoir water level monitoring system using a box plot-isolated forest model, the problem of intelligent identification of water level anomalies was solved, enabling rapid and efficient early warning and emergency response, and improving the efficiency and safety of reservoir management.
Patent Information
- Application Number
- CN202510903360.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-01
- Publication Date
- 2025-12-09
- Estimated Expiration
- 2045-07-01
AI Technical Summary
Existing technologies cannot intelligently identify abnormal changes in reservoir water levels. Furthermore, in the event of instrument malfunctions or blockages, manual inspections are time-consuming, labor-intensive, and untimely, which affects reservoir safety.
A box plot-isolation forest model was adopted, which was combined with multiple influencing factors to construct an isolation forest model. Anomalies were detected in the water level monitoring data. The data was initially screened by box plots and the isolation forest model was trained to identify water level anomalies and issue early warnings.
It enables intelligent anomaly identification in reservoir water level monitoring, improving monitoring efficiency and safety. It can promptly identify and respond to problems such as instrument malfunctions or reservoir blockages, thus avoiding the threat of floods.
Smart Images

Figure CN120763806B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of water conservancy data intelligent analysis and processing, and particularly relates to a real-time water level monitoring abnormal change intelligent early warning method for a reservoir. BACKGROUND
[0002] Real-time water level monitoring is crucial for flood control and disaster reduction of a river basin. Real-time monitoring of reservoir water level can quickly grasp the incoming water situation, provide early warning of possible floods, reasonably control the flood discharge, prevent dam break or downstream floods, avoid disasters, and the water level monitoring plays a crucial role in navigation safety. When the reservoir water level monitoring value shows abnormal change, it means that there are problems such as sudden water regime, instrument failure or local damage, and accurate and rapid identification of the cause of water level abnormality can avoid a series of consequences such as flood threat and reservoir safety hazards.
[0003] At present, domestic and foreign scholars mainly focus on the research of automatic early warning method for reservoir water level monitoring. Xue Junjie (2020) and Song Fengquan (2020) obtain reservoir water level monitoring information based on Beidou positioning or ultrasonic sensor, and use neural network technology to build a reservoir water level automatic early warning model to complete the design of the reservoir water level automatic early warning method. Pan (2020) et al. build a coupling model based on GRU and CN to consider the time and position factors of data acquisition sensors for reservoir water level prediction and early warning. However, the above methods are based on whether the reservoir water level reaches the characteristic water level for monitoring and early warning, and cannot intelligently identify the abnormal rise or fall of the water level monitoring, and if the instrument is damaged, the drainage system is blocked or the dam body is damaged, manual patrol is time-consuming and laborious and not timely.
[0004] Therefore, how to automatically identify the abnormal change of water level monitoring based on real-time water level monitoring data of the sensor, and accurately identify the abnormal reason under the condition of ensuring the normal flood control of the reservoir, start the emergency response, take rapid and efficient means to cope with, and improve the management efficiency and safety of the reservoir. SUMMARY
[0005] In view of the problems in the prior art, the purpose of the present application is to provide a real-time water level monitoring abnormal change intelligent early warning method for a reservoir, which can effectively improve the intelligent level of the water level monitoring early warning system based on the combination of box chart and isolated forest model, and more quickly and efficiently handle the safety problems of the reservoir.
[0006] The application is based on a box plot-isolation forest unsupervised clustering model, and selects a plurality of influence factors related to reservoir water level changes for source reservoirs and interval reservoirs to construct an isolation forest model. First, data preprocessing and screening are performed, and then the box plot is used to preliminarily detect the cleaned historical data, the processed data are subjected to isolation forest model training, the trained model is used for abnormality detection of the measured water level data, if only a few monitoring points in the reservoir area are marked as abnormal, the monitoring points are located, and the abnormal monitoring instruments are checked, and if all the monitoring points are abnormal, the water level change abnormality is alarmed.
[0007] The object of the application is achieved by the following technical solutions.
[0008] The first aspect of the application provides a real-time water level monitoring abnormal change intelligent early warning method for reservoirs, comprising the following steps:
[0009] Step 1, screening and preprocessing of historical data
[0010] First, collect hydrological and meteorological station observation data and historical water level observation data that affect the water level change of the reservoir, and use the Z-score normalization method to arrange all the data to the same time resolution;
[0011] The conversion formula of the Z-score normalization method is:
[0012] x * =(x-μ) / σ
[0013] In the formula, x * is the input value of the normalized model; x is the initial reservoir sample data; μ is the mean of all sample data; and σ is the standard deviation of all sample data.
[0014] Subsequently, abnormal value screening and elimination: exclude the water level rise abnormality caused by instrument failure from the historical water level observation of each water level monitoring point, and divide the training set and the test set.
[0015] Step 2, construction of box plot-isolation forest model
[0016] The box plot-isolation forest model is constructed for each monitoring point in the reservoir area, and the overall structure of the model is divided into four modules: input layer, box plot sampling layer, base classifier combination layer and detection layer, each module realizes the functions of data sampling, isolation tree training, classifier screening and final classification discrimination in turn;
[0017] Randomly extract the training period samples of the water level data of the reservoir monitoring point based on the box plot to generate a sub-sample set, draw a box plot according to the sub-sample set, and see if there is data outside the upper and lower limits, otherwise if the maximum sampling number is not reached, resample, use the set with a greater probability of abnormal value for training the isolation forest model, optimize the model based on the classifier, use the trained isolation forest to perform abnormal detection on the input test data set, and output the final classification result.
[0018] Step 3, abnormal data detection
[0019] The isolation forest model trained in step 2 is used for abnormal detection of the actual monitoring point water level data, the path length and abnormal score of each sample isolation tree are calculated, and whether the monitoring water level data belongs to an abnormal point is judged based on the model classifier, and if it is abnormal, it is marked.
[0020] Step 4, abnormal early warning judgment
[0021] If only a small number of monitoring points appear abnormal early warning, it is judged that the detection instrument has a problem, and positioning and troubleshooting are performed; if all monitoring points show early warning, it is judged that there is a problem of reservoir upstream and downstream blockage or damage.
[0022] The second aspect of the present application provides a reservoir real-time monitoring water level change abnormal intelligent early warning system based on a machine learning model, comprising:
[0023] A data processing module is used for instrument fault abnormal value preliminary screening of water level monitoring site measured data, and normalizing operation is performed on the processed data samples, and then the model training set and the test set are divided;
[0024] The box plot preliminary detection module performs preliminary detection on the sub-sample set, and the sub-sample set determined to have an abnormality after detection is used for isolation tree training, otherwise resampling is performed until an abnormality is detected in the sub-sample set or the maximum sampling number is reached.
[0025] The base classifier module calculates the fitness of each isolation tree on the training set for training the isolation tree, obtains a more optimal previous part of the tree according to the fitness, and constitutes a final integrated model.
[0026] The abnormality detection module uses the normal threshold value obtained by the quantile regression as the isolation forest model judgment normal and abnormal point demarcation value, calculates the abnormal score of each node of the isolation tree, and the score closer to 1 is more likely to be an abnormal point.
[0027] The beneficial effects of the present application compared with the prior art are:
[0028] 1. The reservoir real-time water level monitoring abnormal change intelligent early warning method provided by the application is a new method in the field of reservoir water level monitoring and early warning, can intelligently identify the abnormal reasons of reservoir water level monitoring, solves the data abnormal reasons caused by monitoring instrument failure, and saves the time of manually finding problems and troubleshooting. If problems such as blockage of the upstream and downstream of the reservoir or damage to the dam body occur, timely early warning and response can be made.
[0029] 2. The application can effectively detect anomalies for some high-dimensional and sparse data sets based on the isolated forest model. Compared with box plots and K-neighbor algorithms: traditional anomaly detection methods such as statistical-based methods (such as Z-Tcotf and MSEAD), distance-based methods (such as k-neighbor algorithms), and clustering methods (such as DBTCSEAN) often face efficiency and accuracy problems when processing high-dimensional and large-scale data. Especially when the data distribution is non-uniform, contains noise or has complex structure, the performance of these methods will decrease significantly.
[0030] 3. The traditional isolated forest randomly samples the original training set with replacement when constructing the isolated tree, however, there may be no outliers in the subsample set, and using the subsample set without outliers to construct the isolated tree will reduce the detection ability of the isolated tree, and cannot well detect the abnormal samples. The application combines box plot sampling to preliminarily screen the collected subsample set, solves the problem of low stability of the isolated forest, avoids the randomness of the judgment threshold set by experience in the isolated forest model, improves the accuracy of the model anomaly detection, and solves the problem of processing fuzzy boundaries. BRIEF DESCRIPTION OF DRAWINGS
[0031] The application will be further described below in combination with the drawings and embodiments:
[0032] Figure 1 The flowchart of the reservoir real-time water level monitoring abnormal change intelligent early warning method provided by the application is shown in the figure.
[0033] Figure 2 The technical roadmap of the reservoir real-time monitoring water level change abnormal intelligent early warning system provided by the application is shown in the figure.
[0034] Figure 3 The structure diagram of the box plot-isolated forest model is shown in the figure. DETAILED DESCRIPTION
[0035] In order to make the purpose, technical scheme and advantages of the application clearer, the disclosed embodiments will be further described in combination with the drawings. It should be understood that the specific embodiments described herein are only used to explain the application, and are not used to limit the application.
[0036] Example 1
[0037] like Figure 1 , Figure 2 As shown in the figure, this embodiment provides an intelligent early warning system and method for real-time monitoring of abnormal changes in reservoir water levels, such as... Figure 3 As shown, the system includes:
[0038] The data processing module is used to perform initial screening of instrument malfunction anomalies in the measured data from water level monitoring stations, normalize the processed data samples, and then divide the data into a model training set and a test set.
[0039] The box plot preliminary detection module performs preliminary detection on the sub-sample set. Sub-sample sets that are determined to be abnormal after detection are used for isolation tree training. Otherwise, sampling is performed again until an abnormality is detected in the sub-sample set or the maximum number of sampling times is reached.
[0040] The base classifier module calculates the fitness of each isolated tree on the training set for the generated isolated trees, obtains the better first part of the trees based on the fitness, and forms the final ensemble model.
[0041] The anomaly detection module uses the normal threshold obtained from quantile regression as the boundary value for judging normal and abnormal points in the isolated forest model, and calculates the anomaly score of each node in the isolated tree. The closer the score is to 1, the more likely it is to be an anomaly.
[0042] The intelligent early warning method for abnormal changes in real-time water level monitoring of reservoirs includes the following steps:
[0043] Step 1: Filtering and preprocessing historical data
[0044] First, we collected hydrological and meteorological station observation data that affect reservoir water level changes, as well as historical water level observation data. We then performed data normalization operations on different types of variables and used the Z-score normalization method to organize all the data to the same time resolution.
[0045] Specifically, the selected data includes hydrological information such as the theoretical outflow of the reservoir under the scheduling rules and the monitoring of reservoir water level changes over time periods; two different reservoir types are considered: 1) Type 1 reservoir: source reservoir, with no upstream reservoir; 2) Type 2 reservoir: interval reservoir, with upstream reservoir discharge. Different data are selected for each type.
[0046] For Type 1 reservoirs, the data used to train the isolated forest model includes meteorological elements such as the time-period average precipitation over the reservoir's catchment area, antecedent rainfall, maximum temperature, and minimum temperature.
[0047] For Type 2 reservoirs, the data for training the isolation forest model is based on Type 1 input data, and the discharge of the upstream reservoir of the reservoir is added. The collected reservoir-related data can be obtained from the relevant department database, reservoir operation and scheduling records, and historical hydrological yearbook, etc.
[0048] The conversion formula of the Z-score normalization method is:
[0049] x * =(x-μ) / σ
[0050] In the formula, x * is the input value of the normalized model; x is the initial reservoir sample data of various types; μ is the mean of all sample data; σ is the standard deviation of all sample data;
[0051] Subsequently, abnormal value screening and elimination is performed: the abnormal water level rise caused by instrument failure is excluded from the historical water level observation of each water level monitoring point, and the training set and the test set are divided.
[0052] The abnormal value screening and elimination specifically includes: instrument failure usually shows mutation or extreme value, if the monitoring water level of a certain water level monitoring site jumps greatly in a short time, but then quickly recovers to normal, and checking the observation data, there is no flood discharge of the reservoir and the upstream reservoir, and there is an obvious inconsistent relationship with precipitation, then the data at that time is excluded from the historical data.
[0053] Step 2, construction of box plot-isolation forest model
[0054] The box plot-isolation forest model is constructed for each monitoring point in the reservoir area, and the overall structure of the model is divided into four modules: input layer, box plot sampling layer, base classifier combination layer and detection layer. Each module realizes the functions of data sampling, isolation tree training, classifier screening and final classification judgment in turn; the model is based on historical water level monitoring data, the training set contains labeled information of water level anomaly, the test set does not contain labels, and the final output is the classification judgment result of the test data.
[0055] Based on the box plot, the training period samples of the water level data of the monitoring points in the reservoir area are randomly extracted to generate a sub-sample set. According to the sub-sample set, a box plot is drawn to see if there is data outside the upper and lower limits. If not, if the maximum sampling number is not reached, resample, and use the set with higher probability of abnormal values to train the isolation forest model. Based on the classifier, the model is optimized, the isolation forest obtained by training is used for abnormal detection of the input test data set, and the final classification result is output.
[0056] The specific structure of the box plot-isolation forest model includes:
[0057] (1) Input layer
[0058] Input and process historical water level data, divide the data into labeled training set and test set to be classified, according to the preset sub-sample set capacity, randomly sample from the training set with replacement, generate multiple candidate sub-sample sets, provide data basis for subsequent anomaly screening and model construction;
[0059] (2) Box plot sampling layer
[0060] For each sub-sample set, perform anomaly analysis by box plot method, calculate its upper and lower quartiles and inter-quartile range, and identify whether it contains potential outliers according to the discrimination criteria; if abnormal samples are detected, the subset is retained for training isolated trees; if no abnormality is found, resample; if multiple sampling is still unable to obtain a sample set containing abnormal values, discard the subset and enter the next sampling attempt or end the sampling process;
[0061] (3) Base classification period combination layer
[0062] Train isolated tree models using the screened sample set, and evaluate their performance based on the training set, record the accuracy of each tree in classifying samples as its classification performance score;
[0063] Then, calculate the correlation between the output results of each tree and the rest of the trees, and take the average as the similarity index;
[0064] Finally, by fusing the classification performance and similarity into fitness score, select the best performing isolated trees to form the final isolated forest model;
[0065] (4) Detection layer
[0066] Use the trained isolated forest for data prediction: first, input the training set and test set samples into the isolated forest, count the path depth of each sample in each tree, and calculate the average depth value, and then convert it to an anomaly score; Use the anomaly score distribution of normal and abnormal samples in the training set to determine the abnormal value interval of each type of sample. Test samples obtain anomaly scores in the same way, if the score is in the normal interval, it is judged as normal; if it is in the abnormal interval, it is classified as abnormal; if the score falls in the overlap area, refer to the most similar training sample set, and use the voting mechanism to determine its final classification.
[0067] The box plot preliminary detection step of water level data includes:
[0068] The box plot anomaly detection first calculates the upper quartile Q3 and the lower quartile Q1 of the sample, then calculates the inter-quartile range (IQR), and judges the abnormality according to the relationship between the observed value and the quartile, inter-quartile range;
[0069] The calculation formula of IQR is as follows:
[0070] IQR = Q3 - Q1 = Q 75 - Q 25
[0071] In the formula, Q 75 is the 75% value of all sample values arranged in descending order, and Q 25 is the 25% value of all sample values arranged in descending order.
[0072] The observation situation is divided into the following types:
[0073] (1) If abs(observation-Q3>1.5*IQR), the observation value is slightly abnormal;
[0074] (2) If abs(observation-Q3>3.0*IQR), the observation value is extremely abnormal;
[0075] (3) If abs(observation-Q1<1.5*IQR), the observation value is slightly abnormal;
[0076] (4) If abs(observation-Q1>1.5*IQR), the observation value is extremely abnormal.
[0077] The box plot is used for preliminary detection of the sub-sample set, and the sub-sample set determined to have an anomaly after detection is used for isolation tree training, otherwise resampling is performed until an anomaly is detected in the sub-sample set or the maximum number of samplings is reached.
[0078] Step 3, anomaly data detection
[0079] The isolation forest model trained in step 2 is used for anomaly detection of the actual monitoring point water level data, the path length and anomaly score of each sample isolation tree are calculated, and whether the monitoring water level data belongs to an abnormal point is judged based on the model classifier. If it is abnormal, it is marked.
[0080] The step of detecting the actual monitoring point water level data using the isolation forest model includes:
[0081] (1) Constructing an isolation tree: randomly selecting a feature, randomly selecting a split point, and recursively dividing the sample until the sample is 1 or the maximum depth is reached;
[0082] (2) Recording the path length: for each sample, record the path length required to be isolated in each isolation tree;
[0083] (3) Calculate the anomaly score: calculate the average path length, path length, and anomaly score of each sample;
[0084] (4) Abnormal value judgment: high score indicates that the point is easy to be isolated, and is judged as an abnormal point; low score indicates that the point is difficult to isolate, and is judged as a normal point;
[0085] (5) Abnormal detection: model output -1 is an abnormal point, and 1 is a normal point.
[0086] The abnormal score is the average path length of the data object on all isolated trees, and the higher the value, the more likely the data object is abnormal data; the path length is the number of edges that a given data x passes through from the root node to the leaf node it is in on a certain isolated tree;
[0087] The calculation formula of the abnormal score is:
[0088]
[0089] In the formula, s(x, n) is an abnormal value function used to record whether x is an abnormal point. n is the size of the test data set, E(h(x)) is the average path length of each data object in all isolated trees, and c(n) is a normalization factor defined by the average path length of unsuccessful search in a binary search tree when the size of the given data set is n, which is used to standardize the path length of record x.
[0090] The calculation formula of c(n) is:
[0091]
[0092] H(i) = ln(i) + ξ
[0093] In the formula, c(n) is the average path length of a tree containing n samples of a data set, which is used to standardize the path length of record x, H(i) is the harmonic number, and ξ is the Euler constant, which is about 0.5772156649.
[0094] The relationship between s(x, n) and E(h(x)) is:
[0095] (1) When E(h(x))→c(n), s→0.5;
[0096] (2) When E(h(x))→0, s→1;
[0097] (3) When E(h(x))→n-1, s→0.
[0098] Step 4, abnormal early warning judgment
[0099] If only a few monitoring points show abnormal early warning, it is judged that the detection instrument has a problem, which is located and investigated; if all monitoring points show early warning, it is judged that there is a problem of blockage or damage of the reservoir upstream and downstream.
[0100] The optimization of the base classifier to the isolation forest is that the greater the residual value of the isolation forest is, the more reliable the classification prediction is. At present, it has been proved by research that when there are a large number of decision trees in the isolation forest, the overall variance and prediction error are reduced, and the generalization error of the isolation forest depends on the correlation and strength of each decision tree. The upper bound of the generalization error is calculated as follows:
[0101]
[0102] In the formula, PE * is the generalization error value of the isolation forest model, is the average value of the correlation between each base classifier, and s is the classification strength of each base classifier. It can be known that the isolation forest can be optimized by reducing the correlation between the classifiers and improving the classifier strength of each base classifier.
[0103] Finally, it should be noted that the above is only used to illustrate the technical solutions of the present application and is not limited. Although the present application has been described in detail with reference to the preferred arrangement, it should be understood by those skilled in the art that the technical solutions of the present application (such as the use of various formulas, the order of steps, etc.) can be modified or replaced equivalently without departing from the spirit and scope of the technical solutions of the present application.
Claims
1. A real-time water level monitoring abnormal change intelligent early warning method for a reservoir, characterized in that, The method comprises the following steps: Step 1, screening and preprocessing of historical data Firstly, collect hydrological and meteorological station observation data that affect the water level change of the reservoir, and historical water level observation data, and use the Z-score normalization method to arrange all the data into the same time resolution; The conversion formula of the Z-score normalization method is: ; In the formula, is the input value of the normalized model; is the initial reservoir sample data of each type; is the mean of all sample data; is the standard deviation of all sample data; Subsequently, abnormal value screening is performed: exclude the water level rise abnormality caused by instrument failure from the historical water level observation of each water level monitoring point, and divide the training set and the test set; Step 2, construction of box plot-isolation forest model A box plot-isolation forest model is constructed for each monitoring point in the reservoir area, and the overall structure of the model comprises four modules: an input layer, a box plot sampling layer, a base classifier combination layer and a detection layer, which realize data sampling, isolation tree training, classifier screening and final classification and discrimination functions in sequence; Randomly extract training period samples of the water level data of the monitoring points in the reservoir area based on the box plot to generate a sub-sample set, draw a box plot according to the sub-sample set, and see whether there is data outside the upper and lower limits, otherwise if the maximum sampling number is not reached, resample, use the set with greater probability of abnormal values for training the isolation forest model, optimize the model based on the classifier, use the trained isolation forest to perform abnormality detection on the input test data set, and output the final classification result; Step 3, abnormal data detection Use the isolation forest model trained in step 2 to perform abnormality detection on the actual monitoring point water level data, calculate the path length and abnormal score of each sample isolation tree, and judge whether the monitoring water level data belongs to an abnormal point based on the model classifier, and if it is abnormal, mark it; Step 4, abnormal early warning judgment If only a small number of monitoring points appear abnormal early warning, it is judged that the detection instrument has a problem, and positioning and troubleshooting are performed; if all the monitoring points show early warning, it is judged that there is a blockage or damage problem in the upstream and downstream of the reservoir.
2. The intelligent early warning method for real-time water level monitoring abnormal variation of reservoir according to claim 1, characterized in that, In step 1, the selected data includes hydrological information such as reservoir theoretical outflow under the dispatching rule and hourly water level change monitoring; two different types of reservoirs are considered: 1) Type 1 reservoir: source reservoir, no upstream reservoir; 2) Type 2 reservoir: interval reservoir, with upstream reservoir discharge, different data are selected respectively, specifically: For Type 1 reservoir, the data for training the isolation forest model includes hourly surface average precipitation, previous influencing rainfall, maximum temperature and minimum temperature of the catchment area of the reservoir; For Type 2 reservoir, the data for training the isolation forest model adds the discharge of the upstream reservoir of the reservoir based on the Type 1 input data.
3. The intelligent early warning method for real-time water level monitoring abnormal variation of reservoir according to claim 1, characterized in that, In step 1, the abnormal value screening and elimination specifically includes: If the monitoring water level of a certain water level monitoring station jumps greatly in a short time, but then quickly returns to normal, and after checking the observation data, there is no flood discharge of the reservoir and the upstream reservoir, and there is an obvious inconsistency with the precipitation, then the data at that time is excluded from the historical data.
4. The intelligent early warning method for real-time water level monitoring abnormal variation of reservoir according to claim 1, characterized in that, In step 2, the specific structure of the box plot-isolation forest model comprises: (1) Input layer The historical water level data is input and processed, the data is divided into a labeled training set and a test set to be classified, a plurality of candidate sub-sample sets are generated from the training set by random sampling with replacement according to a preset sub-sample set capacity, and data basis is provided for subsequent anomaly screening and model construction; (2) Box plot sampling layer For each sub-sample set, the box plot method is used for anomaly analysis, the upper and lower quartiles and the interquartile range are calculated, and whether it contains potential outliers is identified according to the discrimination criterion; if an abnormal sample is detected, the sub-sample set is retained for training the isolation tree; if no anomaly is found, resampling is performed; if the sample set containing abnormal values cannot be obtained after continuous sampling for multiple times, the sub-sample set is discarded, and the next sampling attempt or the sampling process is ended; (3) Base classification period combination layer The isolated tree model is trained using the screened sample set, and its performance is evaluated based on the training set, and the accuracy of each tree in classifying samples is recorded as its classification performance score; Then, the correlation between the output results of each tree and the remaining trees is calculated, and the average value is taken as the similarity index; Finally, the classification performance and similarity are fused into the fitness score to select the best isolated trees to form the final isolated forest model; (4) Detection layer The trained isolated forest is used for data prediction: first, the training set and test set samples are input into the isolated forest, the path depth of each sample in each tree is counted, and the average depth value is calculated to convert it into an anomaly score; the anomaly score distribution of normal and abnormal samples in the training set is used to determine the abnormal value interval of each type of sample; the test sample obtains the anomaly score in the same way, if the score is in the normal interval, it is judged as normal; if it is in the abnormal interval, it is classified as abnormal; if the score falls in the overlapping area, the most similar training sample set is referred to, and a voting mechanism is used to determine the final classification.
5. The intelligent early warning method for real-time water level monitoring abnormal variation of reservoir according to claim 1, characterized in that, In step 2, the box plot performs preliminary detection on the water level data of the reservoir monitoring point, which includes the following steps: The box plot anomaly detection first calculates the upper quartile Q3 and the lower quartile Q1 of the sample, then calculates the interquartile range IQR, and judges the abnormal situation according to the relationship between the observation value and the quartile and the interquartile range; The calculation formula of IQR is as follows: ; wherein Q75 is the 75th percentile of all values in the sample arranged in descending order, Q25 is the 25th percentile of all values in the sample arranged in descending order. The observation situation can be divided into the following types: (1) If abs( ), the observation is slightly abnormal; (2) If abs( ), then the observation is extremely abnormal; (3) if abs( ), then the observation is mildly abnormal; (4) If abs( ), then the observation is extremely abnormal.
6. The intelligent early warning method for real-time water level monitoring abnormal variation of reservoir according to claim 1, characterized in that, In step 3, the steps for using the isolated forest model to detect anomalies in the actual monitoring point water level data include: (1) Build an isolated tree: randomly select a feature, randomly select a split point, and recursively divide the sample until the sample is 1 or the maximum depth is reached; (2) Record the path length: for each sample, record the path length required to isolate it in each isolated tree; (3) Calculate the anomaly score: calculate the average path length, path length and anomaly score of each sample; (4) Abnormal value judgment: a high score indicates that the point is easy to isolate, and is judged as an abnormal point; a low score indicates that the point is difficult to isolate, and is judged as a normal point; (5) Anomaly detection: the model outputs -1 as an abnormal point and 1 as a normal point.
7. The intelligent early warning method for abnormal variation of real-time water level of reservoir according to claim 1 or 6, characterized in that, In step 3, the anomaly score is the average path length of the data object on all isolated trees; the path length is the number of edges from the root node to the leaf node where the data x is located on a given isolated tree; The formula for calculating the anomaly score is: ; wherein is the outlier function, n is the size of the test dataset, is the average of the path lengths of each data object in all isolated trees, is the normalization factor defined by the average path length of unsuccessful searches in a binary search tree for a given dataset size n, The calculation formula is: ; ; where c(n) is a data set containing n samples, the average path length of the tree, used to normalize the path length of record x, is the harmonic number, and ξ is the Euler constant. The relationship between the values of the parameters of the two equations is: The relationship between the values of the parameters of the (1) when ; (2) time, ; (3) when , .
8. The method according to claim 1 or 6, characterized in that, In step 4, the isolated forest model needs to be optimized based on the model classifier, and the upper bound of the generalization error is calculated as follows: ; where PE * is the isolated forest model generalization error value, is the average of the correlation between each base classifier, s is the classification strength of each base classifier.
Citation Information
Patent Citations
Pipe network operation situation analysis method based on pipe network hydrodynamic model and data driving model
CN114818221A
Converter steelmaking endpoint carbon temperature prediction method and device based on adaptive data enhancement
CN119514379A
