A Reservoir Flood Forecasting Method Integrating Empirical Models and AI Algorithms

By integrating empirical models and AI algorithms into reservoir flood forecasting, abrupt changes in reservoir discharge rules can be identified and corrected in real time. This solves the problem of non-stationary jumps in model errors in existing technologies and enables rapid adaptive correction and stable forecasting in cascade reservoir groups.

CN122414734BActive Publication Date: 2026-11-17JIANGXI ACAD OF WATER RESOURCES (JIANGXI PROVINCE DAM SAFETY MANAGEMENT CENT JIANGXI PROVINCE WATER RESOURCES MANAGEMENT CENT)
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202610855889.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-06-15
Publication Date
2026-11-17
Estimated Expiration
2046-06-15

AI Technical Summary

Technical Problem

Existing technologies, under conditions of abrupt changes in the discharge rules upstream of a cascade reservoir group, are unable to suppress non-stationary jumps in empirical model errors and achieve rapid online adaptive correction of error prediction models without relying on a large number of historical abrupt change samples and long-term complete data.

Method used

By integrating empirical models and AI algorithms, response units are divided using watershed topography and soil type, establishing storage and discharge empirical relationships. Combining online change point detection algorithms and error mapping networks, the system identifies statistical abrupt change moments in real time, updates the output layer weights of the error mapping network online, adjusts the observation noise covariance matrix, and performs filtering updates to correct flood forecast results.

Benefits of technology

It enables rapid adjustment of the error prediction model in non-stationary scheduling scenarios, avoiding continuous increase in forecast error and filter oscillation, improving the stability and accuracy of flood forecasting, and reducing dependence on long-sequence complete data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122414734B_ABST
    Figure CN122414734B_ABST
Patent Text Reader

Abstract

This invention relates to the field of hydrological forecasting technology, specifically disclosing a reservoir flood forecasting method and system that integrates empirical models and AI algorithms. The method acquires upstream rainfall, upstream outflow, and downstream measured flow; divides response units based on watershed topography and soil type to construct an initial flood forecasting model, outputting simulated flow and state variables; calculates the error sequence between simulated and measured flow, and uses a sliding window based on posterior probability of runtime to detect statistical mutations online; responds to mutation markers, using only new data after the mutation to update the output layer weights of the error mapping network online, outputting the predicted error value and prediction variance; uses the prediction variance as a dynamic prior to adjust the observation noise covariance matrix, increasing the observation noise in the early stages of mutations; uses random sample set filtering to update state variables and feeds them back to the initial model, recalculating subsequent outflows, and outputting the corrected forecast results; this invention improves forecast stability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of hydrological forecasting technology, specifically to a reservoir flood forecasting method that integrates empirical models and AI algorithms. Background Technology

[0002] Reservoir flood forecasting is a key technical aspect of watershed flood control, disaster reduction, and water resource allocation. Traditional flood forecasting methods mainly employ conceptual hydrological models based on physical mechanisms, such as the Xin'anjiang model, tank models, and Muskingen calculations. These empirical models establish storage and discharge relationships based on static underlying surface characteristics such as watershed topography, soil type, and vegetation cover, and can effectively describe the basic physical processes of rainfall and runoff.

[0003] In recent years, with the continuous advancement of small reservoir monitoring capabilities, people can obtain a wealth of measured hydrological and rainfall information in real time, such as reservoir water levels, rainfall, and outflow. Data-driven models have become possible in reservoir flood forecasting. These models deduce the system response function based on the statistical relationships between historical input and output data, without directly describing the hydrological mechanisms within the watershed. Essentially, they treat the watershed as a nonlinear system to be modeled, constructing a mapping function using input (e.g., rainfall) and output (e.g., maximum peak flow) data to predict the hydrological response. This model is independent of physical mechanisms and is suitable for areas with abundant data but lacking physical information. Common models include Artificial Neural Networks (ANNs), Total Runoff Linear Response (TLR), and Linear Perturbation Models (LPM).

[0004] The existing technology has the following shortcomings: under the condition of artificially abrupt changes in the discharge rules of the upstream of the cascade reservoir group, it is impossible to simultaneously suppress the filtering oscillations caused by non-stationary jumps in empirical model errors and achieve rapid online adaptive correction of the error prediction model without relying on a large number of historical abrupt change samples and long-sequence complete data. Summary of the Invention

[0005] The purpose of this invention is to provide a reservoir flood forecasting method that integrates empirical models and AI algorithms to solve the problems mentioned above.

[0006] The objective of this invention can be achieved through the following technical solutions: A reservoir flood forecasting method integrating empirical models and AI algorithms includes the following steps: Obtain real-time rainfall data of the upstream basin, discharge flow from upstream reservoirs, and measured flow at downstream sections; Based on the topography and soil type of the watershed, response units are divided. Within each response unit, storage and discharge experience relationships are established. An initial flood forecast model is formed by combining the confluence of river segments, and the simulated flow sequence of downstream sections and watershed state variables are output. The difference between the simulated flow sequence and the measured flow is calculated time-by-time to form an error sequence. Based on the sliding window online change point detection algorithm of the posterior probability of the run length, the mean and variance of the error sequence are monitored. When the posterior probability exceeds the threshold, a statistical change is determined to have occurred, and the change time and change marker are output. Based on the mutation marker, only the newly acquired continuous rainfall, watershed state variables and upstream discharge flow after the mutation time are used as training samples to update the output layer weights of the error mapping network online. The error mapping network takes the current rainfall, watershed state variables and upstream discharge flow as input and outputs the error prediction value and its prediction variance. The prediction variance is used as a dynamic prior. The observation noise covariance matrix used for state assimilation is adjusted, and the value of the observation noise covariance matrix is ​​increased in the early stage of the mutation to reduce the correction weight of the error prediction value. The adjusted observation noise matrix is ​​then output. The adjusted observation noise matrix and error prediction values ​​are used to filter and update the current watershed state variables based on a random sample set. The updated watershed state variables are then fed back to the initial flood forecast model, driving the initial flood forecast model to recalculate the outflow for subsequent periods and output the corrected flood forecast results.

[0007] As a further aspect of the present invention: the generation process of the initial flood forecasting model is as follows: The runoff path is extracted based on topographic slope aspect and runoff accumulation. The topographic moisture index of each grid is calculated in combination with the effective depth of the soil profile. The watershed is divided into several response units according to the quantile of the topographic moisture index. Within each response unit, net rainfall is converted into the response unit outflow process; The outflows of each unit along the river channel are superimposed in the order of confluence time, and the segmented Muskingan method is used to calculate segment by segment to the downstream section to generate an initial flood forecast model.

[0008] As a further aspect of the present invention: the outflow process of the response unit specifically includes: The product of the average topographic index of the response unit and the soil saturated hydraulic conductivity is calculated, and the product is defined as the characteristic water storage capacity. An exponential storage-discharge relationship is adopted, and the outflow of the response unit is set to be equal to the square of the ratio obtained by dividing the current water storage by the characteristic water storage capacity, and then multiplied by the basic outflow coefficient; The net rainfall is added to the current water storage of the unit, and the outflow rate is calculated based on the exponential storage-discharge relationship to obtain the outflow process of the unit.

[0009] As a further aspect of the present invention: the output mutation time and mutation marker specifically include: Initialize the posterior probability vector for each runtime length, and assign an initial probability value to each runtime length; For each new error value obtained, the likelihood value of each running length is calculated based on the prediction distribution of the error value under the corresponding running length, and the posterior probability vector of the running length is updated according to the likelihood value. At the same time, the running length is incremented and reset. Extract the maximum value from the updated runtime posterior probability vector. When the maximum value exceeds a preset threshold, determine that a statistical mutation has occurred at the current time and output the mutation time and mutation marker.

[0010] As a further aspect of the present invention: the calculation process of the likelihood value is as follows: A prediction distribution parameter set is maintained for each running length. The prediction distribution parameter set includes the cumulative error sum, the cumulative error sum of squares, and the sample count. When a new error value is obtained, the probability density value of the error value under the assumption of normal distribution is calculated based on the cumulative statistics corresponding to the current running length, and used as the likelihood value of the running length.

[0011] As a further aspect of the present invention: the online updating of the output layer weights of the error mapping network specifically includes: Initialize an error covariance matrix for the output layer weight matrix. The dimension of the error covariance matrix is ​​equal to the number of hidden layer nodes. For each training sample obtained, consisting of continuous rainfall, watershed state variables, and upstream outflow, the output vector of the sample in the hidden layer is calculated. Based on the output vector, the output layer weights of the previous time step, and the error covariance matrix, the gain vector used to update the weights is calculated. The difference between the current true error and the prediction error is multiplied by the gain vector and accumulated into the output layer weights. At the same time, the error covariance matrix is ​​updated in sequence. The online update of the output layer weights continues until all newly acquired samples have been processed.

[0012] As a further aspect of the present invention: the adjustment of the observation noise covariance matrix used for state assimilation specifically includes: The number of time steps between the current forecast time and the mutation time is recorded based on the mutation marker. The number of time steps is substituted into the exponential decay function to calculate the decay weight value. The product of the prediction variance and the attenuation weight is used as the covariance scaling factor, which is then superimposed on the diagonal elements of the observation noise baseline matrix. At the first forecast time after the mutation occurs, all elements of the observation noise baseline matrix are multiplied by a preset inflation factor. From the second forecast time onwards, the inflation factor is removed, and the adjusted observation noise matrix is ​​output.

[0013] As a further aspect of the present invention: the calculation process of the expansion factor is as follows: Obtain the maximum value of the posterior probability of the runtime at the mutation detection time, calculate the difference between the maximum value and the preset threshold, and divide the difference by a fixed scaling parameter to obtain the first coefficient; The variance of the error sequence within the last sliding window before the mutation occurs is statistically analyzed, and the absolute value of the deviation between the first error value after the mutation and the mean error before the mutation is calculated. The ratio of the absolute value of the deviation to the variance is limited to between 0 and 5 to obtain the second coefficient. Add one to the product of the first coefficient and the second coefficient to obtain the expansion factor.

[0014] As a further aspect of the present invention: the filter update based on the random sample set specifically includes: Several random samples are generated based on the probability distribution of the current watershed state variables, with each sample representing a set of possible state variable values. For each sample, the predicted observation value is calculated based on the error prediction value, and the likelihood of the sample is calculated in combination with the adjusted observation noise matrix; The likelihood of all samples is normalized to obtain the weight of each sample, and the sample set is systematically resampled according to these weights, so that high-weight samples are copied and low-weight samples are discarded. The arithmetic mean of the resampled sample set is taken as the updated watershed state variable and output to the initial flood forecast model.

[0015] A reservoir flood forecasting system integrating empirical models and AI algorithms includes: The data acquisition module acquires real-time rainfall in the upstream basin, discharge from upstream reservoirs, and measured flow at downstream sections. The initial model building module divides response units according to the watershed topography and soil type, establishes storage and discharge empirical relationships in each response unit, and forms an initial flood forecast model through the combination of segmented confluence of the river channel, outputting the simulated flow sequence of the downstream section and watershed state variables. The change point detection module calculates the difference between the simulated flow sequence and the measured flow at each time step to form an error sequence. Based on the sliding window online change point detection algorithm with the posterior probability of the run length, it monitors the changes in the mean and variance of the error sequence. When the posterior probability exceeds the threshold, it determines that a statistical change has occurred and outputs the time of the change and the change marker. The online update module of the error mapping network updates the output layer weights of the error mapping network online by using only the newly acquired continuous rainfall, watershed state variables and upstream discharge flow as training samples according to the mutation marker. The error mapping network takes the current rainfall, watershed state variables and upstream discharge flow as input and outputs the error prediction value and its prediction variance. The observation noise adaptive adjustment module uses the prediction variance as a dynamic prior to adjust the observation noise covariance matrix used for state assimilation. It also increases the value of the observation noise covariance matrix in the early stage of abrupt change to reduce the correction weight of the error prediction value and outputs the adjusted observation noise matrix. The filtering update and feedback module uses the adjusted observation noise matrix and error prediction values ​​to perform filtering updates on the current watershed state variables based on a random sample set. The updated watershed state variables are then fed back to the initial flood forecast model, driving the initial flood forecast model to recalculate the outflow for subsequent periods and output the corrected flood forecast results.

[0016] The beneficial effects of this invention are: (1) This invention introduces an online change point detection algorithm based on the posterior probability of the running length, which can identify in real time the occurrence time of sudden changes in the discharge rules of upstream reservoirs (such as switching from power generation to flood control scheduling) and trigger online incremental updates of the error mapping network. Compared with the forecasting method with fixed parameters, this invention can quickly adjust the error prediction model using a small amount of new data after the change in scheduling rules, avoiding the continuous increase in forecast error and filter oscillation caused by sudden changes in human scheduling, and improving the stability of flood forecasting for cascade reservoir groups under non-stationary scheduling scenarios.

[0017] (2) This invention combines a physical mechanism-based initial flood forecasting model with a data-driven error mapping network, adaptive observation noise adjustment, and random sample set filtering. Without relying on a large number of historical training samples, it maintains the water balance constraint of the runoff process by utilizing the storage and discharge empirical relationship constructed from watershed topography and soil type. At the same time, it reduces the interference of unreliable error prediction on state assimilation in the early stage of abrupt changes by dynamically adjusting the observation noise covariance matrix. In watersheds with short measured data sequences or scarce historical flood events, this scheme can still output a continuous and self-consistent corrected flow process, reducing the dependence on long-sequence complete data. Attached Figure Description

[0018] The invention will now be further described with reference to the accompanying drawings.

[0019] Figure 1 This is a flowchart of the method of the present invention; Figure 2 This is a flowchart illustrating the generation process of the initial flood forecasting model in this invention; Figure 3 This is a system flowchart of the present invention. Detailed Implementation

[0020] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0021] Example 1, please refer to Figure 1 As shown, this invention is a reservoir flood forecasting method that integrates empirical models and AI algorithms, comprising the following steps: Obtain real-time rainfall data of the upstream basin, discharge flow from upstream reservoirs, and measured flow at downstream sections; Based on the topography and soil type of the watershed, response units are divided. Within each response unit, storage and discharge experience relationships are established. An initial flood forecast model is formed by combining the confluence of river segments, and the simulated flow sequence of downstream sections and watershed state variables are output. The difference between the simulated flow sequence and the measured flow is calculated time-by-time to form an error sequence. Based on the sliding window online change point detection algorithm of the posterior probability of the run length, the mean and variance of the error sequence are monitored. When the posterior probability exceeds the threshold, a statistical change is determined to have occurred, and the change time and change marker are output. Based on the mutation marker, only the newly acquired continuous rainfall, watershed state variables and upstream discharge flow after the mutation time are used as training samples to update the output layer weights of the error mapping network online. The error mapping network takes the current rainfall, watershed state variables and upstream discharge flow as input and outputs the error prediction value and its prediction variance. The prediction variance is used as a dynamic prior. The observation noise covariance matrix used for state assimilation is adjusted, and the value of the observation noise covariance matrix is ​​increased in the early stage of the mutation to reduce the correction weight of the error prediction value. The adjusted observation noise matrix is ​​then output. The adjusted observation noise matrix and error prediction values ​​are used to filter and update the current watershed state variables based on a random sample set. The updated watershed state variables are then fed back to the initial flood forecast model, driving the initial flood forecast model to recalculate the outflow for subsequent periods and output the corrected flood forecast results.

[0022] Example 2: Obtaining real-time rainfall in the upstream basin, discharge from the upstream reservoir, and measured flow at the downstream section, specifically including: In accordance with the national hydrological station network deployment specifications, tipping bucket remote rain gauges are deployed in different elevation zones and confluence zones within the upstream basin. Rainfall signals are collected every 5 minutes and transmitted to the central station via ultra-shortwave or BeiDou satellite short message after analog-to-digital conversion, forming a real-time rainfall sequence.

[0023] The downstream flow rate of the upstream reservoir is continuously monitored by ultrasonic time-of-flight flow meters installed in the spillway and power generation water diversion pipeline. These flow meters consist of four pairs of transducers arranged in a cross pattern, with a flow velocity measurement range of 0.2 m / s to 12 m / s. In conjunction with the water level-opening signal measured by the gate opening sensor, the instantaneous downstream flow rate is calculated according to the hydraulic structure flow formula. A value is recorded every 10 minutes and transmitted to the reservoir scheduling data acquisition unit via industrial Ethernet.

[0024] The downstream section's measured flow rate was periodically measured using a mobile acoustic Doppler current profiler, and a radar level gauge was installed at the section to continuously record the water level. The real-time water level was converted into hourly flow rate data using the calibrated water level-flow rate relationship curve. For cross-sections lacking a water level-flow curve, a side-scan acoustic Doppler velocity profiler is installed to directly measure the average flow velocity of the cross-section and multiply it by the flow area to obtain the measured flow rate. All three types of data are time-stamped and time-aligned through a data acquisition and monitoring control system. Obvious outliers are removed before being stored in a real-time database as input for subsequent steps.

[0025] Example 3, please refer to Figure 2 As shown, response units are divided based on watershed topography and soil type. Within each response unit, empirical relationships for water storage and discharge are established. An initial flood forecasting model is formed through segmented confluence and combination of river sections, outputting the simulated downstream cross-section flow sequence and watershed state variables, specifically including: Extracting confluence paths based on watershed digital terrain data: The watershed is divided into 100m × 100m grid cells. For each grid cell, the maximum elevation difference in the eight directions around it is calculated. The flow direction is determined along the direction with the largest elevation difference. This process is repeated until all grid cell flow directions converge at the watershed outlet, thus forming a complete confluence path network.

[0026] The effective depth of the soil profile (in centimeters) for each grid cell is obtained based on the soil type distribution map. Combined with the cumulative number of grid cells along the runoff path, the topographic moisture index for each grid cell is calculated using the formula: the topographic moisture index equals the natural logarithm of the cumulative number of grid cells divided by the tangent of the local slope angle.

[0027] Among them, the cumulative number of merging grids represents the total number of all merging grids upstream of the current grid, and the terrain slope angle is obtained by taking the arctangent of the ratio of the maximum elevation difference of the grid unit to the grid side length.

[0028] The topographic humidity index of all grids in the entire watershed is sorted in ascending order of value. Using the decimal division method, adjacent grids with index values ​​in the same quantile interval are merged into one response unit, resulting in a total of 10 response units. The difference in topographic humidity index within each unit does not exceed 0.3 times the variance of the index in the entire watershed.

[0029] Within each response unit, net rainfall is converted into unit outflow. Net rainfall refers to the effective rainfall after deducting losses due to vegetation interception, depression filling, and evaporation. It is calculated as follows: the evaporation conversion factor is calibrated using the double cumulative curve method; the potential evaporation is multiplied by this factor to obtain the actual evaporation; then, soil water deficit is deducted according to the watershed full-storage runoff generation model to obtain the net rainfall sequence. Net rainfall is expressed in millimeters and accumulated hourly. For each response unit, the following sub-steps are performed: Calculate the product of the average topographic index and the soil saturated hydraulic conductivity of the response cell: Take the arithmetic mean of the topographic moisture indices of all grids within the cell to obtain the average topographic index; the soil saturated hydraulic conductivity is taken as the median of the laboratory measurements of soil samples within the cell, expressed in millimeters per hour. Multiply the two values, and the resulting product is defined as the characteristic water storage capacity of the cell, in millimeters.

[0030] Assuming the response unit adopts an exponential storage-dissipation relationship, the calculation expression is as follows: ; This indicates the outflow rate of the response unit, expressed in cubic meters per second. The basic outflow coefficient is initially set at 0.05, and subsequently calibrated using a trial-and-error method based on historical flood events in the basin, with an adjustment range of 0.02 to 0.20. This indicates the current water storage capacity of the response unit, in millimeters. The initial value is estimated from the soil field capacity and previous moisture conditions within the unit. This represents the characteristic water storage capacity of the unit, in millimeters. This relationship indicates that the outflow rate is proportional to the square of the ratio obtained by dividing the current water storage by the characteristic water storage capacity.

[0031] The net rainfall entering the response unit within a unit of time (1 hour) is added, in millimeters, to the current water storage of the unit. In the process, the updated water storage volume is obtained. ,in This represents the net rainfall over one hour. This indicates the updated water storage capacity.

[0032] Substituting the updated water storage capacity into the exponential storage-discharge relationship calculation expression, the outflow rate for that hour, i.e., the unit outflow rate, is calculated. This outflow rate is multiplied by one hour and then divided by the unit area to convert it into a reduction in depth, which is then subtracted from the water storage capacity to obtain the initial water storage capacity for the next moment. Repeating the above hourly calculations yields the hourly outflow process of the response unit throughout the entire rainfall process.

[0033] Basic outflow coefficient The calibration process is as follows: Select five typical floods from the past 10 years in this basin, and first assume... The value is 0.05. The simulated outflow process is obtained by running the above calculation and compared with the actual outflow process of the unit inferred from the downstream cross-sectional flow rate. The Nash efficiency coefficient is then calculated; then adjusted in steps of 0.01. Repeat the calculation until the Nash efficiency coefficient no longer increases, and then take the value at that point. This value represents the final basic outflow coefficient of the unit. Different response units... The values ​​are independent and do not interfere with each other.

[0034] The outflows of each response unit are superimposed sequentially along the river channel according to their confluence time, and the segmented Muskingen method is used to calculate the flow segment by segment down to the downstream section, generating an initial flood forecast model. Specifically, starting from the watershed outlet, each confluence path is traced backward along the river channel, and the confluence time of each response unit's outflow to the outlet is calculated. This time is equal to the length of the river segment divided by the average velocity (estimated by Manning's formula combined with the hydraulic radius of the cross section). The outflow processes of all response units are aligned by their confluence time and accumulated moment by moment on the same time coordinate to obtain the total inflow process at the watershed outlet. This total inflow process is then sequentially input into the Muskingen calculation model of each segment of the river channel, using a fixed storage coefficient and flow weight coefficient (the sum of the two coefficients is 1). Calculations are performed segment by segment from upstream to downstream, ultimately obtaining the simulated flow sequence at the downstream section. Simultaneously, the current water storage of each response unit and the water storage of the river segment are recorded at each calculation moment as watershed state variables output.

[0035] Example 4: An error sequence is constructed by calculating the difference between the simulated flow sequence and the measured flow sequence time-by-time. An online change point detection algorithm based on a sliding window using the posterior probability of the run length monitors the changes in the mean and variance of the error sequence. When the posterior probability exceeds a threshold, a statistical abrupt change is determined, and the abrupt change time and a change marker are output. Specifically, this includes: Initialize the posterior probability vector for the runtime length. Set the maximum possible runtime length to 200 time steps, and assign an initial probability value to each possible runtime length (from 0 to 200), where the probability of runtime length 0 is set to 1, and the probabilities of all other runtime lengths are set to 0. Here, runtime length represents the number of consecutive time steps elapsed from the most recent mutation to the current time step.

[0036] For each new error value (i.e., the difference between the simulated flow and the measured flow at the current moment), the following operations are performed: For each possible run length, the likelihood value is calculated based on the set of prediction distribution parameters maintained for that run length. Each run length maintains a separate set of prediction distribution parameters, including the cumulative error sum (i.e., the algebraic sum of all error values ​​during the duration of that run length), the cumulative error sum of squares (i.e., the sum of the squares of all error values ​​during the duration of that run length), and the sample count (i.e., the number of moments that the run length has lasted). When a new error value arrives, for each run length, its current sample count is incremented by 1 to obtain the updated sample count under the hypothesis, and the probability density value of that error value under the normal distribution assumption is calculated.

[0037] The specific calculation process is as follows: First, the mean error is calculated using the sum of cumulative errors and the sample count. Then, the variance of the error is calculated using the sum of squared cumulative errors and the sample count. Next, the absolute value of the deviation of the current error value from the mean is calculated. The square of this deviation is divided by twice the variance, and the negative exponent is taken. Then, it is divided by the product of the standard deviation and the square root of twice pi. The resulting value is the likelihood value for this running length. In the initial stage, when the sample count is less than 2, the variance adopts a preset initial variance value, which is determined by the sample variance of the first 50 time points of the historical error sequence.

[0038] Based on the calculated likelihood value for each running length, the posterior probability vector for each running length is updated. Specifically, the update method is as follows: the posterior probability of each running length at the previous time step is multiplied by the likelihood value corresponding to that length to obtain the unnormalized probability value; then, the unnormalized probability values ​​of all running lengths are summed, and the sum is divided by each unnormalized probability value to obtain the normalized posterior probability.

[0039] The runtime length is incremented and reset: the probability value corresponding to the runtime length plus 1 (indicating that the length continues) in the updated posterior probability is assigned to the new runtime length, and an independent reset item (i.e., the posterior probability of all runtime lengths is multiplied by a fixed growth probability of 0.05) is added to the probability value of runtime length 1 to allow the occurrence of new mutations.

[0040] The maximum value in the updated runtime posterior probability vector is extracted and compared with a preset threshold. The preset threshold is 0.75, determined through multiple offline tests using a 5-year historical error sequence. The threshold is adjusted to achieve an optimal balance between mutation detection accuracy and false positive rate. If the maximum value exceeds 0.75, a statistical mutation is determined to have occurred at the current time, the current time is recorded as the mutation time, and a mutation marker of 1 is output; otherwise, a mutation marker of 0 is output. The mutation time and mutation marker serve as inputs for subsequent steps. Throughout the process, the length of the sliding window is implicitly determined by the maximum runtime of 200, and no separate window boundary needs to be set. After each time step, only the current runtime posterior probability vector and the cumulative statistics (cumulative error sum, cumulative error sum of squares, sample count) corresponding to each runtime length are retained, and updates continue when the next time step arrives.

[0041] Example 5: Based on the mutation marker, only the newly acquired continuous rainfall, watershed state variables, and upstream discharge flow after the mutation time are used as training samples to update the output layer weights of the error mapping network online. The error mapping network takes the current rainfall, watershed state variables, and upstream discharge flow as input and outputs the error prediction value and its prediction variance, specifically including: Initialize an error covariance matrix for the output layer weight matrix. This error covariance matrix has dimensions of 50 rows by 50 columns, consistent with the number of hidden layer nodes. During initialization, this matrix is ​​set to a diagonal matrix, with all diagonal elements set to 1000 and off-diagonal elements set to 0. This initial value indicates a lower level of confidence in the initial output layer weights, allowing for larger adjustments in subsequent updates.

[0042] When a new training sample is acquired (this sample consists of three values: continuous rainfall after the abrupt change, watershed state variables, and upstream discharge, while also recording the actual error at that moment, i.e., the difference between simulated and measured discharge), the following online update steps are performed: Calculate the output vector of this sample in the hidden layer, with a length of 50. Specifically, the calculation method is as follows: multiply the three values ​​of the input sample by the corresponding connection weights from the input layer to the hidden layer, sum them, subtract the bias of the corresponding hidden layer node, and then substitute the result into the tangent hyperbolic function to obtain the activation value of that node. Repeat the above process for all 50 hidden layer nodes to obtain an output vector consisting of 50 activation values.

[0043] Based on the output vector, the output layer weights from the previous time step, and the current error covariance matrix, a gain vector is calculated to update the weights. The calculation process for the gain vector is as follows: First, multiply the current error covariance matrix by the hidden layer output vector to obtain an intermediate vector; then, calculate the product of the transpose of the hidden layer output vector and the intermediate vector to obtain a scalar value, and add this scalar value to the value 1; finally, divide each component of the intermediate vector by the scalar value to obtain the gain vector. The length of this gain vector is 50.

[0044] Subtract the prediction error obtained by multiplying the current output layer weights by the hidden layer output vector from the current true error (i.e., the difference between the simulated flow and the measured flow corresponding to the sample), to obtain a scalar difference. Multiply this scalar difference by each component of the gain vector to obtain the update value. Add the update value to the current output layer weights to obtain the updated output layer weights.

[0045] The error covariance matrix is ​​updated sequentially. The update method is as follows: first, calculate the product of the gain vector and the transpose of the hidden layer output vector to obtain a 50x50 square matrix; then, subtract this square matrix from the identity matrix; finally, right-multiply the current error covariance matrix by the aforementioned difference matrix to obtain the updated error covariance matrix. This update process ensures the symmetric positive definiteness of the matrix.

[0046] Repeat the process of updating the weights and covariance matrix for each acquired sample until all newly acquired training samples after the mutation time (usually samples from the first 50 time steps after the mutation; if there are fewer than 50 samples, all available samples are used) have been processed, completing the online update of the output layer weights. The updated output layer weights are used to calculate the error prediction value and its prediction variance for subsequent time steps. The prediction variance is calculated as follows: multiply the current hidden layer output vector by the updated error covariance matrix, then multiply by the transpose of the hidden layer output vector. Add a preset noise basis (with a value of 0.01) to the resulting scalar value to obtain the prediction variance.

[0047] Example 6 uses the prediction variance as a dynamic prior, adjusts the observation noise covariance matrix used for state assimilation, and increases the value of the observation noise covariance matrix in the early stage of abrupt changes to reduce the correction weight of the error prediction value. The adjusted observation noise matrix is ​​then output, specifically including: The mutation marker is used to determine whether the current forecast time is in the post-mutation stage. When the mutation marker is 1, the number of time steps between the current forecast time and the mutation time is recorded (i.e., the number of forecast times elapsed since the mutation occurred, with the first time step recorded as 1). This number of time steps is substituted into an exponential decay function to calculate the decay weight value. The specific form of this exponential decay function is: the decay weight value is equal to the number of time steps with the exponent negative divided by a decay half-life parameter (this parameter is taken as 10 time steps). That is, the decay weight value gradually decreases from close to 1 to close to 0 as the number of time steps increases. For example, the decay weight value is approximately 0.9 when the time step is 1, approximately 0.61 when the time step is 5, and approximately 0.37 when the time step is 10.

[0048] The predicted variance output by the error mapping network is multiplied by the aforementioned attenuation weight values ​​to obtain the covariance scaling. The observation noise baseline matrix is ​​a diagonal matrix with the same dimension as the number of watershed state variables (in this scheme, state variables include the current water storage of each response unit and the water storage of each channel segment, totaling approximately 20). The diagonal elements of the baseline matrix have a value of 0.01, while the off-diagonal elements have a value of 0. The covariance scaling is added to each diagonal element of the observation noise baseline matrix, i.e., each diagonal element is increased by this scaling factor from its original value of 0.01. Due to the large attenuation weight values ​​and scaling factor in the early stages of abrupt changes, the diagonal elements of the observation noise matrix increase significantly. As the time step increases, the attenuation weight values ​​decrease, the scaling factor gradually decreases, and the observation noise matrix gradually recovers to the baseline value.

[0049] At the first forecast time after a mutation occurs (i.e., when the number of time steps is 1), all elements of the observation noise matrix after scaling are multiplied by an inflation factor. The specific calculation method for the inflation factor is described below. From the second forecast time onwards, the inflation factor is removed, meaning only the observation noise matrix after scaling is used as the adjusted observation noise matrix output. If the mutation flag is 0 (i.e., no mutation occurred), the observation noise covariance matrix remains unchanged as the baseline matrix, without any adjustment.

[0050] The calculation process for the inflation factor is as follows: Obtain the maximum value of the posterior probability of the runtime at the mutation detection time (this maximum value is the posterior probability value exceeding the threshold of 0.75 when a mutation is determined). Calculate the difference between this maximum value and the preset threshold of 0.75, and divide this difference by a fixed scaling parameter (which is 0.2) to obtain the first coefficient. For example, if the maximum value is 0.85, the difference is 0.1, and dividing by 0.2 gives 0.5; if the maximum value is 0.95, the difference is 0.2, and dividing by 0.2 gives 1.0. The value of the first coefficient ranges from 0 to 1.25.

[0051] The variance of the error sequence within the last sliding window before the mutation occurs is calculated. The sliding window length is 50 time points. The variance of the error sequence within the window is calculated using unbiased sample variance: the arithmetic mean of all error values ​​within the window is calculated, then the average is subtracted from each error value, the squares are summed, and the result is divided by the window length minus 1. The absolute value of the deviation between the first error value after the mutation (i.e., the difference between the simulated and measured flow rates at the time of the mutation) and the arithmetic mean of the errors within the window before the mutation is calculated. This absolute value of deviation is divided by the aforementioned variance to obtain a ratio; if this ratio is greater than 5, it is set to 5; if it is less than 0, it is set to 0, resulting in the second coefficient.

[0052] The product of the first and second coefficients, plus 1, yields the inflation factor. For example, if the first coefficient is 0.5 and the second coefficient is 2, the product is 1.0, and adding 1 results in 2.0, indicating that all elements of the observation noise matrix are amplified by a factor of 2. If both the first and second coefficients are 0, the inflation factor is 1, meaning no amplification. This inflation factor is applied only to the first forecast time after a sudden change to minimize the correction weight of the initial unreliable error prediction and avoid filter oscillations. The adjusted observation noise matrix is ​​output for subsequent filter updates.

[0053] Example 7 uses the adjusted observation noise matrix and error prediction values ​​to filter and update the current watershed state variables based on a random sample set. The updated watershed state variables are then fed back to the initial flood forecast model, driving the model to recalculate the outflow for subsequent periods and output the corrected flood forecast results. Specifically, this includes: Random samples are generated based on the probability distribution of the current watershed state variables. The current watershed state variables include the current water storage of all response units (10 values) and the water storage of different river segments (10 values), totaling 20 state variables. It is assumed that each state variable follows a normal distribution, with its mean being the current state variable value output by the initial flood forecast model, and its variance being a preset initial variance (25 square millimeters for water storage and 1000 cubic meters per second squared for river storage). Using a standard normal random number generation algorithm, 200 random numbers following this normal distribution are independently generated for each state variable, resulting in 200 random samples, each containing a set of 20 state variable values.

[0054] For each random sample, the predicted observation is calculated based on the error prediction value. The predicted observation value is equal to the simulated downstream cross-section flow corresponding to that sample (calculated by the initial flood forecast model based on this set of state variables) plus the error prediction value at the current time.

[0055] The likelihood of the sample is calculated using the adjusted observation noise matrix. The specific calculation process is as follows: Subtract the predicted observation value from the measured flow at the downstream section to obtain the observation bias; divide the square of this observation bias by twice the corresponding diagonal element of the observation noise matrix (since the observation noise matrix is ​​diagonal, only the diagonal element corresponding to the downstream section observation is needed), take the negative exponent, and finally divide by the product of the square root of twice pi and the standard deviation of the observation noise to obtain the likelihood of the sample. The standard deviation of the observation noise is the square root of the corresponding diagonal element in the observation noise matrix.

[0056] The likelihoods of all 200 samples are summed, and the likelihood of each sample is divided by this sum to obtain the normalized weight of each sample. The sample set is then systematically resampled based on these weights. The specific method of systematic resampling is as follows: all weights are accumulated sequentially according to the sample order to obtain the cumulative distribution function; then, a random starting point is uniformly generated between 0 and 1, and 200 equally spaced points are selected sequentially with a step size of 1 / 200. For each point, the index of the first sample with a weight greater than that point is found in the cumulative distribution function, and the sample corresponding to that index is copied to the new sample set. In this way, high-weight samples are copied multiple times, while low-weight samples are discarded.

[0057] The arithmetic mean of the new sample set after resampling is obtained: the summation of the values ​​of each state variable in all 200 samples is divided by 200 to obtain 20 averages, which are used as the updated watershed state variables. These updated state variables are then output to the initial flood forecast model, replacing the original state variables. This drives the initial flood forecast model to recalculate the outflow process for subsequent time periods starting from the current time, ultimately outputting the corrected flood forecast results (i.e., the simulated flow sequence of downstream sections for each time period).

[0058] Example 8, please refer to Figure 3 As shown, a reservoir flood forecasting system that integrates empirical models and AI algorithms includes: The data acquisition module acquires real-time rainfall in the upstream basin, discharge from upstream reservoirs, and measured flow at downstream sections. The initial model building module divides response units according to the watershed topography and soil type, establishes storage and discharge empirical relationships in each response unit, and forms an initial flood forecast model through the combination of segmented confluence of the river channel, outputting the simulated flow sequence of the downstream section and watershed state variables. The change point detection module calculates the difference between the simulated flow sequence and the measured flow at each time step to form an error sequence. Based on the sliding window online change point detection algorithm with the posterior probability of the run length, it monitors the changes in the mean and variance of the error sequence. When the posterior probability exceeds the threshold, it determines that a statistical change has occurred and outputs the time of the change and the change marker. The online update module of the error mapping network updates the output layer weights of the error mapping network online by using only the newly acquired continuous rainfall, watershed state variables and upstream discharge flow as training samples according to the mutation marker. The error mapping network takes the current rainfall, watershed state variables and upstream discharge flow as input and outputs the error prediction value and its prediction variance. The observation noise adaptive adjustment module uses the prediction variance as a dynamic prior to adjust the observation noise covariance matrix used for state assimilation. It also increases the value of the observation noise covariance matrix in the early stage of abrupt change to reduce the correction weight of the error prediction value and outputs the adjusted observation noise matrix. The filtering update and feedback module uses the adjusted observation noise matrix and error prediction values ​​to perform filtering updates on the current watershed state variables based on a random sample set. The updated watershed state variables are then fed back to the initial flood forecast model, driving the initial flood forecast model to recalculate the outflow for subsequent periods and output the corrected flood forecast results.

[0059] The working principle of this invention is as follows: Upstream rainfall, upstream discharge, and downstream measured flow are acquired. Response units are divided based on watershed topography and soil type. Within each unit, a nonlinear storage-discharge curve based on topographic index and soil saturated hydraulic conductivity is established. An initial flood forecast model is formed through piecewise Muskingen calculus, outputting simulated flow and watershed state variables. The difference between simulated and measured flow constitutes an error sequence. An online change point detection algorithm based on posterior probability of runtime is used to monitor changes in the mean and variance of the error in real time. When the posterior probability exceeds a threshold, a statistical mutation is determined. In response to the mutation marker, only newly acquired rainfall, state variables, and discharge after the mutation are used as training samples. The output layer weights of the error mapping network are updated online through recursive least squares. This network outputs the predicted error value and its predicted variance. The predicted variance is used as a dynamic prior. Combined with exponential decay weights and an expansion factor, the observation noise covariance matrix is ​​adjusted to increase observation noise in the early stages of the mutation, thereby reducing the weight of unreliable error correction. The adjusted observation noise matrix and error prediction values ​​are used to filter and update the state variables based on a random sample set. The updated state variables are then fed back to the initial flood forecast model to recalculate subsequent outflows and output the corrected flood forecast results.

[0060] The foregoing has provided a detailed description of one embodiment of the present invention, but this description is merely a preferred embodiment and should not be construed as limiting the scope of the invention. All equivalent variations and modifications made within the scope of the claims of this invention should still fall within the patent coverage of this invention.

Claims

1. A reservoir flood forecasting method fusing empirical model and AI algorithm, characterized in that, Includes the following steps: Obtain real-time rainfall data of the upstream basin, discharge flow from upstream reservoirs, and measured flow at downstream sections; Based on the topography and soil type of the watershed, response units are divided. Within each response unit, storage and discharge experience relationships are established. An initial flood forecast model is formed by combining the confluence of different river segments. The simulated flow sequence of downstream sections and watershed state variables are output. The difference between the simulated flow sequence and the measured flow is calculated time-by-time to form an error sequence. Based on the sliding window online change point detection algorithm of the posterior probability of the run length, the mean and variance of the error sequence are monitored. When the posterior probability exceeds the threshold, a statistical change is determined to have occurred, and the change time and change marker are output. Based on the mutation marker, only the newly acquired continuous rainfall, watershed state variables and upstream discharge flow after the mutation time are used as training samples to update the output layer weights of the error mapping network online. The error mapping network takes the current rainfall, watershed state variables and upstream discharge flow as input and outputs the error prediction value and its prediction variance. Specifically, only the output layer weights are updated, and the error covariance matrix is ​​initialized for the output layer weight matrix. The dimension of the error covariance matrix is ​​equal to the number of hidden layer nodes. For each training sample, the output vector of the sample in the hidden layer is calculated. Based on the output vector, the output layer weights of the previous time step, and the error covariance matrix, the gain vector is calculated. The difference between the current true error and the prediction error is multiplied by the gain vector and accumulated into the output layer weights. The error covariance matrix is ​​updated sequentially. The prediction variance is the product of the current hidden layer output vector and the updated error covariance matrix, then multiplied by its transpose and added to a preset noise basis. The prediction variance is used as a dynamic prior. The observation noise covariance matrix used for state assimilation is adjusted, and the value of the observation noise covariance matrix is ​​increased in the early stage of the mutation to reduce the correction weight of the error prediction value. The adjusted observation noise matrix is ​​then output. Specifically, based on the number of time steps between the current forecast time and the abrupt change time, the decay weight value is calculated by substituting it into the exponential decay function. The product of the prediction variance and the decay weight value is used as the covariance scaling factor and superimposed on the diagonal elements of the observation noise reference matrix. At the first forecast time after the mutation occurs, all elements of the observation noise baseline matrix are multiplied by an inflation factor, and the inflation factor is removed from the second forecast time onwards. The expansion factor is the product of the first coefficient and the second coefficient plus one. The first coefficient is the difference between the maximum posterior probability of the running length at the mutation detection time and the preset threshold divided by the fixed scaling parameter. The second coefficient is the ratio of the absolute value of the deviation between the first error value after the mutation and the mean error in the last sliding window before the mutation to the variance of the error in the sliding window before the mutation, and is limited to between 0 and 5. The adjusted observation noise matrix and error prediction values ​​are used to filter and update the current watershed state variables based on a random sample set. The updated watershed state variables are then fed back to the initial flood forecast model, driving the initial flood forecast model to recalculate the outflow for subsequent periods and output the corrected flood forecast results.

2. The reservoir flood forecasting method of fusing empirical model and AI algorithm according to claim 1, characterized in that, The process of generating the initial flood forecasting model is as follows: The runoff path is extracted based on topographic slope aspect and runoff accumulation. The topographic moisture index of each grid is calculated in combination with the effective depth of the soil profile. The watershed is divided into several response units according to the quantile of the topographic moisture index. Within each response unit, net rainfall is converted into the response unit outflow process; The outflows of each unit along the river channel are superimposed in the order of confluence time, and the segmented Muskingan method is used to calculate segment by segment to the downstream section to generate an initial flood forecast model.

3. The reservoir flood forecasting method of fusing empirical model and AI algorithm according to claim 2, characterized in that, The outflow process of the response unit specifically includes: The product of the average topographic index of the response unit and the soil saturated hydraulic conductivity is calculated, and the product is defined as the characteristic water storage capacity. An exponential storage-discharge relationship is adopted, and the outflow of the response unit is set to be equal to the square of the ratio obtained by dividing the current water storage by the characteristic water storage capacity, and then multiplied by the basic outflow coefficient; The net rainfall is added to the current water storage of the unit, and the outflow rate is calculated based on the exponential storage-discharge relationship to obtain the outflow process of the unit.

4. The reservoir flood forecasting method integrating empirical models and AI algorithms according to claim 1, characterized in that, The output mutation time and mutation marker specifically include: Initialize the posterior probability vector for each runtime length, and assign an initial probability value to each runtime length; For each new error value obtained, the likelihood value of each running length is calculated based on the prediction distribution of the error value under the corresponding running length, and the posterior probability vector of the running length is updated according to the likelihood value. At the same time, the running length is incremented and reset. Extract the maximum value from the updated runtime posterior probability vector. When the maximum value exceeds a preset threshold, determine that a statistical mutation has occurred at the current time and output the mutation time and mutation marker.

5. The reservoir flood forecasting method integrating empirical models and AI algorithms according to claim 4, characterized in that, The calculation process for the likelihood value is as follows: A prediction distribution parameter set is maintained for each running length. The prediction distribution parameter set includes the cumulative error sum, the cumulative error sum of squares, and the sample count. When a new error value is obtained, the probability density value of the error value under the assumption of normal distribution is calculated based on the cumulative statistics corresponding to the current running length, and used as the likelihood value of the running length.

6. The reservoir flood forecasting method integrating empirical models and AI algorithms according to claim 1, characterized in that, The filter update based on the random sample set specifically includes: Several random samples are generated based on the probability distribution of the current watershed state variables, with each sample representing a set of possible state variable values. For each sample, the predicted observation value is calculated based on the error prediction value, and the likelihood of the sample is calculated in combination with the adjusted observation noise matrix; The likelihood of all samples is normalized to obtain the weight of each sample, and the sample set is systematically resampled according to these weights, so that high-weight samples are copied and low-weight samples are discarded. The arithmetic mean of the resampled sample set is taken as the updated watershed state variable and output to the initial flood forecast model.

7. A reservoir flood forecasting system integrating empirical models and AI algorithms, characterized in that, A reservoir flood forecasting method for implementing any one of claims 1-6, which integrates an empirical model and an AI algorithm, includes: The data acquisition module acquires real-time rainfall in the upstream basin, discharge from upstream reservoirs, and measured flow at downstream sections. The initial model building module divides response units according to the watershed topography and soil type, establishes storage and discharge empirical relationships in each response unit, and forms an initial flood forecast model through the combination of segmented confluence of the river channel, outputting the simulated flow sequence of the downstream section and watershed state variables. The change point detection module calculates the difference between the simulated flow sequence and the measured flow at each time step to form an error sequence. Based on the sliding window online change point detection algorithm with the posterior probability of the run length, it monitors the changes in the mean and variance of the error sequence. When the posterior probability exceeds the threshold, it determines that a statistical change has occurred and outputs the time of the change and the change marker. The online update module of the error mapping network updates the output layer weights of the error mapping network online by using only the newly acquired continuous rainfall, watershed state variables and upstream discharge flow as training samples according to the mutation marker. The error mapping network takes the current rainfall, watershed state variables and upstream discharge flow as input and outputs the error prediction value and its prediction variance. The observation noise adaptive adjustment module uses the prediction variance as a dynamic prior to adjust the observation noise covariance matrix used for state assimilation. It also increases the value of the observation noise covariance matrix in the early stage of abrupt change to reduce the correction weight of the error prediction value and outputs the adjusted observation noise matrix. The filtering update and feedback module uses the adjusted observation noise matrix and error prediction values ​​to perform filtering updates on the current watershed state variables based on a random sample set. The updated watershed state variables are then fed back to the initial flood forecast model, driving the initial flood forecast model to recalculate the outflow for subsequent periods and output the corrected flood forecast results.

Citation Information

Patent Citations

  • A flood forecasting method based on depth learning model and BP neural network correction

    CN109272146A