Karst underground water level prediction and optimization method
By combining multi-scale prediction models of CNN and LSTM and a regulatory strategy of reinforcement learning, the complexity of karst groundwater level prediction and regulation is solved, efficient and accurate water level prediction and regulation are achieved, meeting the needs of multiple time scales and reducing costs.
Patent Information
- Application Number
- CN202510050120.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-13
- Publication Date
- 2025-05-30
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The prior art is difficult to effectively predict and regulate karst groundwater levels, especially when dealing with nonlinear, multi-scale and spatiotemporal variability groundwater systems.
A multi-scale groundwater level prediction model combining convolutional neural network (CNN) and long and short-term memory network (LSTM) is used to achieve accurate prediction and regulation of groundwater level through data acquisition and preprocessing, feature selection and dimensionality reduction, prediction model construction and reinforcement learning-based regulatory strategy generation.
It significantly improves the accuracy and robustness of groundwater level prediction, can meet the needs of short-term, medium-term and long-term multi-time scale prediction, and reduces regulation costs through dynamic regulatory strategies to achieve efficient management and sustainable utilization of water resources.
Smart Images

Figure CN120067567A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of water level prediction, and particularly to a method for predicting and optimizing karst groundwater levels. Background Art
[0002] Karst groundwater is one of the important water resources globally, widely distributed in karst areas, and plays a crucial role in agricultural irrigation, industrial water use, and domestic water supply for residents. However, due to the complexity of the groundwater system in karst areas, its hydrogeological characteristics exhibit significant nonlinearity, multi-scale, spatio-temporal variability, etc., making groundwater level prediction and regulation face great challenges.
[0003] As an important global groundwater resource, the dynamic prediction of karst groundwater is crucial for water resource management and sustainable utilization. Currently, the prediction techniques for groundwater levels mainly fall into the following categories:
[0004] Common methods include time series analysis (such as the ARIMA model), linear regression models, etc. These methods rely on the assumption of data stationarity and predict by modeling the changing trends of historical data.
[0005] It is difficult to handle the nonlinear characteristics of the karst groundwater system;
[0006] It cannot effectively capture complex multi-scale dynamics (such as seasonal fluctuations and sudden random changes).
[0007] Numerical models based on groundwater dynamics (such as MODFLOW, FEFLOW) are widely used to simulate the flow and solute transport processes of groundwater systems. These models rely on groundwater dynamics equations and are simulated by combining regional geological parameters.
[0008] Model establishment and parameter calibration rely on a large amount of measured data, with high time costs;
[0009] It cannot cope with the changes of multi-source influencing factors in complex coupled systems (such as climate change, sudden drought).
[0010] The computational efficiency is relatively low, and it is difficult to meet the requirements of real-time prediction.
[0011] In recent years, data-driven models based on neural networks (such as BP neural networks, RNN) have been gradually introduced into the field of groundwater level prediction. These models use historical monitoring data to establish prediction models and have strong nonlinear modeling capabilities.
[0012] When a single machine learning model processes the complex dynamic characteristics of karst groundwater, it is prone to fitting problems;
[0013] It lacks the ability to co-model long-time scale trends and short-time scale fluctuations;
[0014] It is difficult to directly process high-dimensional data, and the feature selection and dimensionality reduction processes often rely on manual labor.
[0015] The regulation of karst groundwater involves the dynamic regulation of pumping and recharge to achieve the efficient utilization of groundwater resources. The current regulation technologies are mainly divided into the following categories:
[0016] Empirical method: Determine the pumping and recharge plans through historical data and expert experience. This method is usually based on simple empirical rules, such as fixed pumping ratios or recharge intensities.
[0017] Disadvantages: The regulation strategies are static and inflexible, unable to cope with emergencies (such as floods and droughts);
[0018] Rely on expert experience, lack quantitative index guidance, and have low decision-making efficiency.
[0019] Optimization method: Use optimization algorithms such as linear programming (LP), nonlinear programming (NLP), or genetic algorithms (GA) to solve the optimal regulation strategy under certain constraints.
[0020] Disadvantages: Assume that the system is linear or quasi-linear, making it difficult to describe the complex nonlinear dynamics of karst groundwater; The optimization objectives are single (such as minimizing costs or maximizing pumping volumes), lacking comprehensive regulation objectives (such as the balance between water level stability and resource utilization efficiency); Unable to adjust the strategy by combining real-time data, lacking dynamism.
[0021] Disadvantages of intelligent regulation methods: Although reinforcement learning (such as Q-learning) has been tried for groundwater regulation, traditional reinforcement learning methods require discretizing the state space and action space, resulting in reduced accuracy; Most existing methods fail to combine the advantages of deep learning and reinforcement learning to achieve full-chain intelligence from prediction to regulation.
[0022] Therefore, we urgently need to design a method for predicting and optimizing karst groundwater levels to solve the above problems. Summary of the Invention
[0023] The present invention provides a method for predicting and optimizing karst groundwater levels to solve the defects in the prior art.
[0024] A method for predicting and optimizing karst groundwater levels, the method comprising the following steps:
[0025] Data collection and preprocessing: Collect data on groundwater levels and related influencing factors, denoise and normalize them to generate a dimensionless dataset D′;
[0026] Feature selection and dimensionality reduction: Extract key variables from the dimensionless dataset to construct a reduced-dimensional feature matrix
[0027] Construction of Multi-scale Groundwater Level Prediction Model: Based on Convolutional Neural Network (CNN) and Long Short-Term Memory Network (LSTM), input the feature matrix Output the predicted groundwater level
[0028] Optimization and Regulation Strategy: Based on the reinforcement learning method, combined with the prediction results Generate groundwater regulation plan
[0029] As a preferred technical solution of the present invention, the data collection and preprocessing include:
[0030] Data collection: Collect data from groundwater monitoring stations and meteorological stations to form a dataset D = {W t , P t , T t , E t , Q t , G t},
[0031] where: W t : Observed value of groundwater level at time t; P t : Observed value of rainfall at time t; T t : Observed value of temperature at time t; E t : Observed value of evaporation at time t; Q t : Observed value of pumping volume at time t; G t : Observed value of groundwater recharge at time t.
[0032] Data denoising: Apply wavelet decomposition to the groundwater level W t , and the formula is:
[0033]
[0034] where: W t : Original groundwater level time series; Long-term trend part of the groundwater level; Periodic fluctuation of the groundwater level; Random error and noise of the groundwater level.
[0035] Normalization processing: Perform Z-score standardization on each variable in the dataset to generate a dimensionless dataset D′ = {W′ t , P′ t , T′ t , E′ t , Q′ t , G′t}, and the formula is:
[0036]
[0037] Where: x t : The original value of variable x at time t; μ x : The mean value of variable x; σ x : The standard deviation of variable x; x′ t : The dimensionless value of variable x t ; W′ t , P′ t , T′ t , E′ t , Q′ t , G′ t : Dimensionless groundwater level, rainfall, temperature, evaporation, pumping volume and recharge volume.
[0038] As a preferred technical solution of the present invention, the feature selection and dimensionality reduction include: Feature selection: Calculate the mutual information I(x′ t and the target variable W′ t ), and the formula is: t , W′ t ), the formula is:
[0039]
[0040] Where: x′ t : Dimensionless feature variable; W′ t : Dimensionless groundwater level; p(x′ t , W′ t ): The joint probability distribution of variables x′ t and W′ t ; p(x′ t ): The marginal probability distribution of variable x t ; p(W′ t ): The marginal probability distribution of variable W′ t ; I(x′ t , W′ t ): The correlation size between variable x t and W t ;
[0041] Dimensionality reduction processing: Apply principal component analysis (PCA) to the feature matrix X t , and the formula is:
[0042]
[0043] Where: X t : Feature matrix, composed of the selected highly correlated variables {x′ 1 , x′ 2 , …, x′ k}; W PCA: PCA dimensionality reduction transformation matrix; Feature matrix after dimensionality reduction, containing principal component information.
[0044] As a preferred technical solution of the present invention, the multi-scale groundwater level prediction model includes: Convolution operation: Using a convolutional neural network to extract spatial features, the formula is:
[0045]
[0046] Where: Input feature matrix; K: Convolution kernel; b: Bias term of the convolutional layer; *: Convolution operator; ReLU: Activation function for non-linear transformation; F t : Feature map output by the convolutional layer.
[0047] Time series modeling: Using a long short-term memory network to capture time dynamic features, the hidden state update formula is:
[0048] h t = σ(W hh h t-1 + W xh F t + b h ),
[0049] Where: h t : Hidden state at the current moment; h t-1 : Hidden state at the previous moment; W hh : Weight matrix from hidden state to hidden state; W xh : Weight matrix from input to hidden state; b h : Bias term; σ: Activation function.
[0050] Output prediction: The final prediction output is:
[0051]
[0052] Where: Groundwater level predicted for the next moment; g: Output layer function.
[0053] As a preferred technical solution of the present invention, the prediction model is optimized by the following loss function:
[0054] L = λ 1 · L MAE + λ 2 · L RMSE + λ 3 · L SMAPE ,
[0055] Where: Mean absolute error;
[0056] Root mean square error;
[0057] Symmetric mean absolute percentage error;
[0058] λ 1 , λ 2 , λ 3 : Weight of the loss function.
[0059] As a preferred technical solution of the present invention, the optimization and regulation strategy is based on reinforcement learning and modeled as a Markov decision process
[0060] Among them, The state space includes the groundwater level W′ t and the feature matrix The set of regulation actions includes the pumping volume and the recharge volume; The state transition probability; the reward function R t is defined as:
[0061]
[0062] Among them: W′ opt : The target groundwater level; The regulation action cost; α, β: The weight parameters of the reward function.
[0063] As a preferred technical solution of the present invention, the goal of the optimization and regulation strategy is to maximize the long-term cumulative reward:
[0064]
[0065] Among them: π: The policy function; γ: The discount factor.
[0066] As a preferred technical solution of the present invention, the reinforcement learning is based on the Deep Deterministic Policy Gradient algorithm (DDPG) and includes: The optimization formula of the policy network:
[0067]
[0068] Among them: The gradient of the policy network; π θ (s): The output action a of the policy network in state s, with parameters θ; Q(s, a): The action value function in state s and action a; s: The current state of the system; a: The action selected by the current policy network; The gradient of the action value function with respect to action a;
[0069] The value network is optimized using the mean square error, and the formula is:
[0070]
[0071] Where: L Q : The loss function of the value network; N: The number of training samples; Q(s i , a i ): The predicted value of the value network in state s i and action a i ; y i = R i + γQ(s i+1 , π θ (s i+1 )): The target value, where: R i : The reward value of the current state; γ: The discount factor, used to control the weight of future rewards, γ ∈ [0, 1]; Q(s i+1 , π θ (s i+1 )): The action-value function value output by the policy network in the next state s i+1 .
[0072] As a preferred technical solution of the present invention, the evaluation of the groundwater level prediction model includes: using the root mean square error as the evaluation index, and the formula is:
[0073]
[0074] Where: RMSE: The root mean square error, used to measure the deviation between the predicted value and the true value; N: The number of samples in the test data set;
[0075] The predicted groundwater level value of the iii-th sample (dimensionless)
[0076] W′ i The true groundwater level value of the iii-th sample (dimensionless)
[0077] The squared error between the predicted value and the true value.
[0078] Beneficial effects:
[0079] By combining the convolutional neural network (CNN) and the long short-term memory network (LSTM), the present invention realizes accurate modeling of the long-term trend, seasonal fluctuations, and short-term random changes of the groundwater level. At the same time, the principal component analysis (PCA) dimensionality reduction and mutual information method are used for feature selection to automatically extract key variables from high-dimensional data, significantly improving the robustness and generalization ability of the prediction model, and meeting the multi-time scale prediction requirements such as short-term (1 day), medium-term (7 days), and long-term (30 days).
[0080] Based on the Deep Deterministic Policy Gradient (DDPG) algorithm, the present invention can generate a high-precision regulation strategy for the continuous action space, dynamically adjust the pumping volume and recharge volume, and balance the water level stability and regulation cost. By comprehensively considering the water level deviation and operation cost, the regulation cost is reduced by about 20% compared with the traditional method, realizing the efficient management and sustainable utilization of water resources.
[0081] The present invention integrates data-driven and intelligent optimization technologies, significantly improving the real-time performance and automation level of the prediction and regulation processes. By accelerating the prediction calculation through an efficient neural network architecture and adjusting the regulation scheme in combination with real-time monitoring data, it can quickly respond to emergencies (such as droughts or floods), solving the problems of insufficient real-time performance and dependence on manual decision-making in traditional methods. Brief Description of the Drawings
[0082] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the drawings in the following description are some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.
[0083] Figure 1 It is a method flow chart of a karst groundwater level prediction and optimization method. Detailed Embodiments
[0084] To make the objectives, technical solutions, and advantages of the present invention clearer, the following will clearly and completely describe the technical solutions in the present invention in conjunction with the drawings in the present invention. Obviously, the described embodiments are some, but not all, of the embodiments of the present invention. Based on the embodiments in the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts fall within the scope of protection of the present invention.
[0085] The following combines the attached Figure 1 and multiple embodiments to describe the detailed embodiments of the present invention in detail.
[0086] A karst groundwater level prediction and optimization method, the method includes the following steps:
[0087] Data collection and preprocessing: Collect data on groundwater levels and related influencing factors, denoise and normalize them to generate a dimensionless data set D ′ ; The data collection and preprocessing include:
[0088] Data collection: Collect data from groundwater monitoring stations and meteorological stations to form a data set D = {W t , P t , T t , E t , Qt ,G t},
[0089] Where: W t : Observed value of the groundwater level at time t; P t : Observed value of the rainfall at time t; T t : Observed value of the air temperature at time t; E t : Observed value of the evaporation at time t; Q t : Observed value of the pumping volume at time t; G t : Observed value of the groundwater recharge at time t.
[0090] Data denoising: Apply wavelet decomposition to the groundwater level W t The formula is:
[0091]
[0092] Where: W t : Original groundwater level time series; Long-term trend part of the groundwater level; Periodic fluctuation of the groundwater level; Random error and noise of the groundwater level.
[0093] Normalization: Perform Z-score standardization on each variable in the dataset to generate a dimensionless dataset D′ = {W′ t ,P′ t ,T′ t ,E′ t ,Q′ t ,G′ t}, and the formula is:
[0094]
[0095] Where: x t : Original value of variable x at time t; μ x : Mean value of variable x; σ x : Standard deviation of variable x; x′ t : Dimensionless value of variable x t ; W′ t ,P′ t ,T′ t ,E′ t ,Q′ t ,G′ t : Dimensionless groundwater level, rainfall, air temperature, evaporation, pumping volume and recharge.
[0096] Feature selection and dimensionality reduction: Extract key variables from the dimensionless dataset to construct a dimensionality-reduced feature matrix
[0097] Feature selection and dimensionality reduction include: Feature selection: Calculate the mutual information I(x′ t and the target variable w t ), with the formula: t ,W′ t ), the formula is:
[0098]
[0099] where: x′ t : dimensionless feature variable; W′ t : dimensionless groundwater level; p(x′ t ,W′ t ): joint probability distribution of variables x′ t and W′ t ; p(x′ t ): marginal probability distribution of variable x t ; p(W′ t ): marginal probability distribution of variable W′ t ; I(x′ t ,W′ t ): correlation magnitude between variables x′ t and W′ t ;
[0100] Dimensionality reduction processing: Apply principal component analysis (PCA) to the feature matrix X t , with the formula:
[0101]
[0102] where: X t : feature matrix, composed of the selected highly correlated variables {x′ 1 ,x′ 2 ,…,x′ k}; W PCA : PCA dimensionality reduction transformation matrix; Dimensionality-reduced feature matrix, containing principal component information.
[0103] Construction of multi-scale groundwater level prediction model: Based on convolutional neural network (CNN) and long short-term memory network (LSTM), input the feature matrix Output the predicted groundwater level
[0104] The multi-scale groundwater level prediction model includes: Convolution operation: Use the convolutional neural network to extract spatial features, with the formula:
[0105]
[0106] where: Input feature matrix; K: Convolution kernel; b: Bias term of the convolutional layer; *: Convolution operator; ReLU: Activation function for non-linear transformation; F t : Feature map output by the convolutional layer.
[0107] Time series modeling: Using long short-term memory network to capture time dynamic features, the hidden state update formula is:
[0108] h t =σ(W hh h t-1 +W xh F t +b h ),
[0109] where: h t : Hidden state at the current moment; h t-1 : Hidden state at the previous moment; W hh : Weight matrix from hidden state to hidden state; W xh : Weight matrix from input to hidden state; b h : Bias term; σ: Activation function.
[0110] Output prediction: The final predicted output is:
[0111]
[0112] where: Groundwater level predicted at the next moment; g: Output layer function.
[0113] The prediction model is optimized through the following loss function:
[0114] L=λ 1 ·L MAE +λ 2 ·L RMSE +λ 3 ·L SMAPE ,
[0115] where: Mean absolute error;
[0116] Root mean square error;
[0117] Symmetric mean percentage error;
[0118] λ 1 , λ 2 , λ 3 : Weights of the loss function.
[0119] Optimization and regulation strategy: Based on the reinforcement learning method, combined with the prediction results Generate a groundwater regulation plan
[0120] The optimized regulation strategy is based on reinforcement learning and is modeled as a Markov decision process
[0121] Among them, The state space includes the groundwater level W′ t and the feature matrix The set of regulation actions includes the pumping volume and the recharge volume; The state transition probability; the reward function R t is defined as:
[0122]
[0123] Among them: W′ opt : The target groundwater level; The cost of regulation actions; α, β: The weight parameters of the reward function;
[0124] The goal of the optimized regulation strategy is to maximize the long-term cumulative reward:
[0125]
[0126] Among them: π: The policy function; γ: The discount factor;
[0127] Reinforcement learning is based on the Deep Deterministic Policy Gradient algorithm (DDPG), including: The optimization formula of the policy network:
[0128]
[0129] Among them: The gradient of the policy network; π θ (s): The action a output by the policy network in state s, with parameters θ; Q(s,a): The action value function in state s and action a; s: The current state of the system; a: The action selected by the current policy network; The gradient of the action value function with respect to action a;
[0130] The value network is optimized using the mean squared error, and the formula is:
[0131]
[0132] Among them: L Q : The loss function of the value network; N: The number of training samples; Q(s i ,a i ): In state s i and action a iUnder the following circumstances, the predicted value of the value network; y i = R i + γQ(s i+1 , π θ (s i+1 )): The target value, where: R i : The reward value of the current state; γ: The discount factor, used to control the weight of future rewards, γ ∈ [0, 1]; Q(s i+1 , π θ (s i+1 )): The action value function value output by the policy network for the next state s i+1 under.
[0133] The evaluation of the multi-scale groundwater level prediction model includes: using the root mean square error as the evaluation index, and the formula is:
[0134]
[0135] where: RMSE: Root mean square error, used to measure the deviation between the predicted value and the true value; N: The number of samples in the test data set;
[0136] The predicted groundwater level value (dimensionless) of the iii-th sample;
[0137] W′ i The true groundwater level value (dimensionless) of the iii-th sample;
[0138] The squared error between the predicted value and the true value.
[0139] The following is an illustration with specific embodiments:
[0140] Embodiment 1: Karst groundwater level prediction;
[0141] Data collection and preprocessing: Obtain multi-source data from 2010 to 2020 from the karst groundwater monitoring station. The data includes: groundwater level W t : A total of 3650 samples in 10 years;
[0142] Rainfall P t : Daily rainfall, ranging from [0, 200] mm; air temperature T t : Daily average air temperature, ranging from [5, 35] °C; evaporation E t : Daily evaporation, ranging from [0, 10] mm;
[0143] Pumping volume Q t : Daily pumping volume, ranging from [0, 1000] m 3 , groundwater recharge G t : Ranging from [0, 800] m3 .
[0144] Data denoising: For the groundwater level W t Apply wavelet decomposition, and the decomposition results are as follows:
[0145] Trend term Extracted by low-frequency wavelet, showing a slow downward trend, reflecting the long-term change of the groundwater level;
[0146] Periodic term Extracted by high-frequency wavelet, with a period of 12 months, reflecting seasonal changes;
[0147] Random term Represents abnormal fluctuations and noise.
[0148] Normalization processing: Perform Z-score normalization on all data:
[0149]
[0150] Where: μ x and σ x Are the mean and standard deviation of the variable x respectively;
[0151] For example: The mean of the groundwater level W t Standard deviation After normalization, the range of W′ Is [-1.8 1.9]. t
[0152] Feature selection and dimensionality reduction: Feature selection calculates the mutual information I(x′ t Of each variable in the dimensionless data with W′ t : t ,W′ t ):
[0153] I(P′ t ,W′ t ) = 0.85: The highest correlation with rainfall;
[0154] I(Q′ t ,W′ t ) = 0.72: The second highest correlation with pumping volume;
[0155] I(T′ t ,W′ t ) = 0.65: The third highest correlation with temperature.
[0156] Select P′ t , Q′ t And T′ t As input features to construct a feature matrix:
[0157]
[0157] Xt ={P′ t ,Q′ t ,T′ t}.
[0158] Dimensionality reduction processing on X t Apply PCA:
[0159]
[0160] Where: W PCA is the transformation matrix, explaining 95% of the total variance; Dimensionality reduction result: 2 principal components PC 1 and PC 2 .
[0161] Multi-scale groundwater level prediction model: The convolutional layer extracts spatial features, and the input feature matrix Extracts spatial features through convolutional operations:
[0162]
[0163] Where: The convolutional kernel K: size is 2×2, and the values are initialized to a normal distribution; Bias b = 0.1.
[0164] The feature matrix F after convolution t The size reduces from 3650×2 to 3648×16.
[0165] Time series modeling inputs F t into LSTM to capture time dynamic features:
[0166] h t =σ(W hh h t-1 +W xh F T +b h ),
[0167] Where: W hh and W xh : Weight matrices, initialized in the range [-0.1,0.1]; b h =0.05; The output h t is used as the time series feature.
[0168] Prediction output: The groundwater level prediction value is output through the fully connected layer:
[0169]
[0170] After the prediction result is de-normalized, the true value is obtained.
[0171] Result evaluation: Error evaluation index
[0172] Using Root Mean Square Error (RMSE):
[0173]
[0174] Where: N = 3650 (number of test samples); and W i are the predicted value and the true value respectively.
[0175] RMSE result: 0.32.
[0176] Other evaluation metrics: Mean Absolute Error (MAE): 0.28;
[0177] Symmetric Mean Absolute Percentage Error (SMAPE): 12.5%.
[0178] Example 2: Optimization of groundwater regulation based on reinforcement learning;
[0179] Set the regulation target: the target groundwater level W opt = 1.5 (dimensionless value), and the regulation actions include:
[0180] Adjust the pumping volume ΔQ t ; Adjust the recharge volume ΔG t .
[0181] The optimization objective of the reward function is to minimize the water level deviation and cost:
[0182]
[0183] Where: α = 1.0, β = 0.5; The regulation cost, with a value range of [0, 500].[[]]END]]
[0184] Reinforcement learning process: Policy network optimization:
[0185]
[0186] After 200 training iterations, the policy network stably selects the optimal action
[0187] Value network optimization:
[0188]
[0189] Where y i = R i + γQ(s i+1 , π θ (s i+1 ))). The discount factor γ = 0.9, and the loss function converges to 0.02.
[0190] After optimization by reinforcement learning, the following results are obtained: the groundwater level W t is maintained in [1.45, 1.55]; the regulation cost is reduced by 18% compared with the traditional method.
[0191] Example 3: Multi-time scale prediction;
[0192] Data collection and preprocessing: Obtain the following data (from 2010 to 2020) from the karst groundwater monitoring station: the groundwater level W t ; daily rainfall P t ; daily temperature T t ; daily evaporation E t ; daily pumping volume Q t ; daily groundwater recharge G t .
[0193] Perform the following processing on the dataset D = {W t , P t , T t , E t , Q t , G t}: Denoise the data. Perform wavelet decomposition on W t to extract the trend, periodic, and random components:
[0194]
[0195] The trend and periodic parts are used for prediction, and the random part is smoothed.
[0196] Normalization processing: Perform Z-score standardization on all variables:
[0197]
[0198] Result: The dimensionless dataset D' = {W' t , P' t , T' t , E' t , Q' t , G' t}, range [-2.0, 2.0].
[0199] Model training: Build a multi-scale groundwater level prediction model based on CNN-LSTM to predict the groundwater level in the short term (1 day), medium term (7 days), and long term (30 days) respectively.
[0200] The convolutional layer extracts spatial features: The input feature matrix has a dimension of 3650×2. Extract spatial features through the convolutional layer:
[0201]
[0202] Among them: K: The convolution kernel size is 3×3, extracting local patterns; b = 0.1: Convolution bias; Output F t The dimension of is 3648×16.
[0203] LSTM captures temporal features: Input convolution feature F t , processed by LSTM:
[0204] h t = σ(W hh h t-1 + W xh F t + b h ),
[0205] Among them: W hh and W xh Are initialized to a normal distribution;
[0206] b h = 0.05;
[0207] Output h t Represents temporal dynamic features.
[0208] Multi-time scale prediction output: The prediction results for the short term (1 day), medium term (7 days), and long term (30 days) are output through the fully connected layer respectively:
[0209]
[0210] Among them k = 1, 7, 30.
[0211] Result analysis: Short-term prediction RMSE = 0.25; MAE = 0.20;
[0212] The fitting degree between the predicted value and the true value is relatively high, and the error is controlled within ±2%.
[0213] Medium-term prediction RMSE = 0.40; MAE = 0.35;
[0214] The prediction error increases slightly, and the fitting accuracy is relatively high, which is suitable for water resource regulation in weekly plans.
[0215] Long-term prediction RMSE = 0.60; MAE = 0.50;
[0216] The long-term prediction is greatly affected by random factors, and the error is controlled within ±5%.
[0217] Example 4: Underground water resource regulation based on reinforcement learning;
[0218] Data and scenario setting: Data source: Karst groundwater monitoring station (from 2015 to 2020).
[0219] Objective: Maintain the groundwater level W′ t at the target value W′ opt = 1.5.
[0220] Action space: Adjust the pumping volume ΔQ t and the recharge volume ΔG t .
[0221] State space: Include the current groundwater level W′ t and the feature matrix
[0222] Reward function: Define the reward function as:
[0223]
[0224] where: α = 1.0, β = 0.5 are weight coefficients; is the action cost, and the costs of pumping and recharge are 0.5 and 0.8 units / cubic meter respectively.
[0225] Reinforcement learning training process: Policy network optimization:
[0226]
[0227] Use the DDPG algorithm for optimization. After 200 iterations, the policy network converges to generate the optimal regulation strategy.
[0228] Value network optimization:
[0229]
[0230] where y i = R i + γQ(s i+1 , π θ (s i+1 ))), and the discount factor γ = 0.95.
[0231] The loss function converges to 0.01 after 300 iterations.
[0232] Regulation result: The groundwater level W′ t is stably maintained in [1.45, 1.55];
[0233] The regulation cost is reduced by 20% compared with the traditional method;
[0234] Achieve efficient water resource management and adapt to seasonal fluctuations and sudden droughts.
[0235] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements on some of the technical features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A karst groundwater level prediction and optimization method, characterized in that: The method comprises the following steps: Data collection and preprocessing: Collect groundwater level and related influencing factors data, denoise and normalize them, and generate dimensionless data set D′; Feature selection and dimensionality reduction: extract key variables from dimensionless data sets and construct a feature matrix after dimensionality reduction Construction of multi-scale groundwater level prediction model: Based on convolutional neural network (CNN) and long short-term memory network (LSTM), input feature matrix Output predicted groundwater level Optimizing control strategies: Based on reinforcement learning methods, combined with prediction results Generate groundwater regulation plans 2. The karst groundwater level prediction and optimization method according to claim 1, characterized in that: The data collection and preprocessing include: Data collection: Data are collected from groundwater monitoring stations and meteorological stations to form a data set D = {W t ,P t ,T t ,E t ,Q t ,G t }, Where: W t : observed value of groundwater level at time t; P t : observed value of rainfall at time t; T t : Observed value of temperature at time t; E t : observed value of evaporation at time t; Q t : observed value of pumping volume at time t; G t : observed value of groundwater recharge at time t; Data denoising: groundwater level W t Apply wavelet decomposition, the formula is: Where: W t : Time series of original groundwater level; Long-term trends in groundwater levels; Periodic fluctuations in groundwater levels; Random errors and noise in groundwater levels; Normalization: Perform Z-score normalization on each variable in the data set to generate a dimensionless data set D′={W′ t ,P′ t ,T′ t ,E′ t ,Q′ t ,G′ t }, the formula is: Where: x t : the original value of variable x at time t; μ x : the mean of variable x; σ x : standard deviation of variable x; x′ t :variable x t The dimensionless value of W′ t ,P′ t ,T′ t ,E′ t ,Q′ t ,G′ t : Dimensionless groundwater level, rainfall, air temperature, evaporation, pumping and recharge.
3. The karst groundwater level prediction and optimization method according to claim 1, characterized in that: The feature selection and dimensionality reduction include: Feature selection: Calculate each variable x' in the dimensionless data set t and the target variable W′ t The mutual information I(x′ t ,W′ t ), the formula is: Where: x′ t : dimensionless characteristic variable; W′ t : dimensionless groundwater level; p(x′ t ,W′ t ):variable x' t and W′ t The joint probability distribution of t ):variable x' t The marginal probability distribution of p(W′ t ):Variable W′ t The marginal probability distribution of I(x′ t ,W′ t ):variable x' t and W′ t The size of the correlation; Dimensionality reduction: feature matrix X t Applying principal component analysis (PCA), the formula is: Where: X t : Feature matrix, composed of the selected highly correlated variables {x′1,x′2,…,x′ k }Constitute; W PCA : PCA dimension reduction transformation matrix; : The feature matrix after dimensionality reduction, containing the principal component information.
4. The karst groundwater level prediction and optimization method according to claim 1, characterized in that: The multi-scale groundwater level prediction model includes: convolution operation: using convolutional neural network to extract spatial features, the formula is: in: Input feature matrix; K: convolution kernel; b: bias term of convolution layer; *: convolution operator; ReLU: activation function for nonlinear transformation; F t : Feature map output by the convolutional layer; Time series modeling: Long short-term memory networks are used to capture temporal dynamic features. The hidden state update formula is: h t =σ(W hh h t-1 +W xh F t +b h ), Where: h t : The hidden state at the current moment; h t-1 : The hidden state of the previous moment; W hh : The weight matrix from hidden state to hidden state; W xh : weight matrix input to the hidden state; b h : bias term; σ: activation function; Output prediction: The final prediction output is: in: The predicted groundwater level at the next moment; g: output layer function.
5. The karst groundwater level prediction and optimization method according to claim 1, characterized in that: The multi-scale groundwater level prediction model is optimized by the following loss function: L=λ1·L MAE +λ2·L RMSE +λ3·L SMAPE , in: Mean absolute error; Root mean square error; Symmetric mean percentage error; λ1,λ2,λ3: weights of the loss function.
6. The karst groundwater level prediction and optimization method according to claim 1, characterized in that: The optimization control strategy is based on reinforcement learning and is modeled as a Markov decision process. in, State space, including groundwater level W′ t and the feature matrix Control action set Includes both pumping and recharge volumes; State transition probability; reward function R t is defined as: Where: W′ opt : Target groundwater level; Regulate action cost; α, β: weight parameters of reward function.
7. The karst groundwater level prediction and optimization method according to claim 6, characterized in that: The goal of the optimization control strategy is to maximize the long-term cumulative reward: Where: π: strategy function; γ: discount factor.
8. The karst groundwater level prediction and optimization method according to claim 1, characterized in that: The reinforcement learning is based on the deep deterministic policy gradient algorithm (DDPG), including: the optimization formula of the policy network: in: Gradient of the policy network; π θ (s): The policy network outputs action a in state s, with parameter θ; Q(s,a): The action value function in state s and action a; s: The current state of the system; a: The action selected by the current policy network; The gradient of the action-value function with respect to action a; The value network is optimized using mean square error, the formula is: Where: L Q : the loss function of the value network; N: the number of training samples; Q(s i ,a i ): In state s i and action a i Next, the predicted value of the value network; y i =R i +γQ(s i+1 ,π θ (s i+1 )): target value, where: R i : The reward value of the current state; γ: Discount factor, used to control the weight of future rewards, γ∈[0,1]; Q(s i+1 ,π θ (s i+1 )):Next state s i+1 The action value function value output by the next policy network.
9. The method for predicting and optimizing karst groundwater level according to claim 4, characterized in that: The evaluation of the groundwater level prediction model includes: using the root mean square error as an evaluation index, the formula is: Where: RMSE: root mean square error, used to measure the deviation between the predicted value and the true value; N: the number of samples in the test data set; Predicted groundwater level value for the iiith sample (dimensionless) W′ i The actual groundwater level value of the iiith sample (dimensionless) The squared error between the predicted value and the true value.
Citation Information
Cited By
Underground water level prediction method and system based on multi-source data
CN120875178A
A groundwater level prediction method and system based on multi-source data
CN120875178B
Mountain area building underground structure water control anti-floating system based on intelligent monitoring
CN121254911A
Construction method and application of regional scale slope loose accumulation layer underground water level prediction model series
CN121834089A