Underground water deep burying condition prediction method of time convolutional neural network fusion model under variable mode decomposition
By combining variational modal decomposition and principal component analysis with time convolutional neural network and FEDformer model, the problem of insufficient accuracy and spatial information extraction capabilities in groundwater depth prediction is solved, and a higher accuracy and stable prediction effect is achieved.
Patent Information
- Application Number
- CN202510511849.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-23
- Publication Date
- 2025-08-01
AI Technical Summary
The existing time convolution neural networks have problems such as low prediction accuracy of periodic signals and weak spatial information extraction capabilities in prediction of groundwater depth burial conditions, and the prediction accuracy and stability of traditional methods under high-dimensional complex data are insufficient.
The data is decomposed into trend components and periodic components by using the variational modal decomposition algorithm, and the main features are extracted in combination with the principal component analysis method. The spatial convolution layer and the temporal convolution neural network model are used to extract spatial information, and trained through the FEDformer model, and finally fit and predict through the ridge regression algorithm.
It improves the spatial and temporal prediction accuracy and stability of groundwater deep buried conditions, improves the prediction accuracy and scope of application of the model, and achieves a more accurate and stable prediction effect.
Smart Images

Figure BDA0005371412880000031 
Figure BDA0005371412880000035 
Figure BDA0005371412880000036
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of deep learning algorithms, and specifically relates to a temporal convolutional neural network model algorithm for predicting the depth of groundwater by combining spatio-temporal information. Background Art
[0002] Groundwater is an important fresh water resource in China, and the prediction of the depth of groundwater occupies an important position in the exploration and development of groundwater. The technology for predicting the depth of groundwater is not only the basis of water resource management, but also an important tool for maintaining ecological health, coping with climate change and improving the sustainable development of society and economy. However, due to the complexity of groundwater data, traditional prediction methods have problems such as insufficient consideration of spatial information, low prediction accuracy and limited application scope. Therefore, it is necessary to explore a method with more accurate and stable prediction effect.
[0003] At present, common spatio-temporal prediction methods for groundwater include numerical simulation methods, statistical analysis methods, spatial interpolation methods, machine learning methods, deep learning methods, etc. Among them, the spatio-temporal prediction model for groundwater built by using deep learning algorithms has shown good results.
[0004] Domestic and foreign scholars have conducted many studies on improving the prediction accuracy and stability of deep learning spatio-temporal prediction models for groundwater. Scholars have proposed a series of prediction models. For example, the wavelet decomposition is used to decompose groundwater data and then the non-linear artificial neural network algorithm is used for spatio-temporal prediction of groundwater, realizing the spatio-temporal prediction of the depth of groundwater to a certain extent; the statistical method is used to consider spatial information and combined with the autoregressive integrated moving average model to establish a spatio-temporal prediction model for groundwater, improving the spatio-temporal prediction accuracy of groundwater to a certain extent. The present invention uses a temporal convolutional neural network for spatio-temporal prediction of the depth of groundwater, but the temporal convolutional neural network has disadvantages such as low prediction accuracy for periodic signals and weak ability to extract spatial information.
[0005] Aiming at the problem of low prediction accuracy for periodic signals shown by the temporal convolutional neural network when facing high-dimensional complex prediction problems, a variational mode decomposition method is proposed to decompose the original data and then combined with the Fedformer neural network to predict periodic data. Aiming at the problem of weak ability of the temporal convolutional neural network to extract spatial information, a convolutional neural network is added to the fusion model to extract spatial information. Aiming at the problem that it is difficult to extract main information due to high data dimension, the principal component analysis method is introduced to reduce the dimension of the input data, strengthening the feature extraction effect of the model. Aiming at the problem that the fitting data of the traditional simple addition modal reconstruction has a large error with the original data, the support vector regression algorithm is introduced to perform modal reconstruction on the trend signal and the periodic signal. Improving the prediction accuracy and stability of the spatio-temporal prediction model for the depth of groundwater has become one of the hot research issues.
[0006] In view of the above deficiencies in the prior art, the present invention is proposed. Summary of the Invention
[0007] The present invention discloses a method for a groundwater spatio-temporal prediction algorithm based on a temporal convolutional network model, comprising the following steps:
[0008] Step 1: Based on the variational mode decomposition algorithm, decompose the original data into a trend component and a periodic component;
[0009] Step 2: Based on the principal component analysis algorithm, perform principal component analysis on the trend component and the periodic component respectively to extract the main features;
[0010] Step 3: Set up observation stations, calculate the correlation between each station in the space, and screen out the spatial information that meets the requirements according to the correlation threshold;
[0011] Step 4: Input the trend tensor data and the periodic tensor data of the training set into the convolutional layer, extract the feature information of other highly correlated wells in the space, and after passing through the spatial convolutional layer, combine the trend component of the spatial information and enter the temporal convolutional neural network model for training;
[0012] Step 5: The periodic component enters the FEDformer model for training, and the training effect is tested through the validation set to obtain a trained fusion model;
[0013] Step 6: Input the data to be predicted into the fusion model to obtain the prediction results of the trend component and the periodic component, and fit the prediction results of the trend component and the periodic component through the ridge regression algorithm to output the final prediction result;
[0014] Step 7: And calculate evaluation indexes such as the mean absolute error MAE, the root mean square error RMSE, and the coefficient of determination R 2 and so on.
[0015] In step 1, the input data include: groundwater depth (meter), annual actual evaporation (mm), annual total radiation (megajoules / square meter), total rainfall from April to October (mm), average maximum temperature from April to October (degrees Celsius), average minimum temperature from April to October (degrees Celsius), total evaporation from April to October (mm), total radiation from April to October (megajoules / square meter), total rainfall from May to September (mm), average maximum temperature from May to September (degrees Celsius), average minimum temperature from May to September (degrees Celsius), evaporation from May to September (mm), and total radiation from May to September (megajoules / square meter). Among them, groundwater depth is the predicted variable, and annual actual evaporation, annual total radiation, total rainfall from April to October, average maximum temperature from April to October, average minimum temperature from April to October, total evaporation from April to October, total radiation from April to October, total rainfall from May to September, average maximum temperature from May to September, average minimum temperature from May to September, evaporation from May to September, and total radiation from May to September are environmental variables;
[0016] In addition, the variational mode decomposition algorithm is divided into four steps: step 1: constructing a time series matrix; step 2: constructing a variational problem; step 3: solving the variational problem using the alternating direction multiplier method; and step 4: mode classification.
[0017] The above step 1: construct the time series step, construct the original data into a time series matrix X∈R N×T×M , where T and M represent the number of time steps and environmental characteristics related to groundwater depth, respectively. X can also be expressed as a vector of N feature matrices, expressed as X = {X1(t),X2(t),...,X N (t)}, where X i ∈R T×M Represents the characteristic matrix of the i-th groundwater monitoring station
[0018] Step 2 above: Construct the variational problem step, first set the number of decomposed modes K, and initialize the mode u k (t) and center frequency ω k , construct the variational problem, which is expressed as:
[0019]
[0020] Where δ(t) is the unit pulse function and * is the convolution.
[0021] The above step 3: Alternating direction multiplier method to solve the variational problem, the above variational problem can be solved by alternating direction multiplier method, by alternating update as well as Finding the saddle point of the augmented Lagrangian expression and solving the variational problem is expressed as:
[0022]
[0023] The above step 4: Modal classification step, identifying the modes with low-frequency characteristics and slow-changing trends. By calculating the average frequency F of each mode Ave to determine whether it is a trend mode:
[0024]
[0025] If the average frequency F Ave is lower than the threshold F s , it is regarded as the trend mode u t (t). By analyzing the spectral characteristics of the mode, the periodic mode u s (t) with high-frequency characteristics is identified.
[0026] In step 2, the principal component analysis method mentioned above is divided into three steps. Step 1: Calculate the covariance matrix; Step 2: Eigenvalue decomposition; Step 3: Principal component selection.
[0027] The above step 1: Calculate the covariance matrix, which is expressed as:
[0028]
[0029] where U is the trend mode u t (t) and the periodic mode u s (t) obtained by decomposition in step 1.
[0030] The above step 2: Eigenvalue decomposition, perform eigenvalue decomposition on the covariance matrix S to obtain the eigenvalues λ1, λ1,..., λ p and the corresponding eigenvectors c1, c2,..., c p , which is expressed as:
[0031] S = CΛC T
[0032] The above step 3: Principal component selection, the principal components are those with larger contribution degrees. The contribution degree of each principal component can be measured by its eigenvalue. The larger the eigenvalue, the more variance in the data is explained by the principal component. Calculate the cumulative contribution degree of the first m principal components, indicating how much of the total data variance is explained by these principal components. Set the cumulative contribution degree threshold F cla to determine the value of m, which is expressed as:
[0033]
[0034] where p is the total number of eigenvalues.
[0035] The main trend variables can be obtained through the above principal component analysis method and the main periodic variables
[0036] In step 3, the correlation degree between each site is calculated, and the Pearson correlation coefficient is used to represent the influence degree between two monitoring stations, which is expressed as:
[0037]
[0038] where X * and X i respectively represent the groundwater depths of the target site and the i-th site in a time series; Cov(·) is the covariance function; and are the variances of X * and X i respectively. The correlations between all other monitoring stations and the target monitoring station form a correlation vector, which is expressed as:
[0039] ρ = [ρ(X * , X1), ρ(X * , X i ),..., ρ(X * , X N )]
[0040] Considering that the influence of not all observation points on the target observation point is obvious, it is reasonable to set a correlation threshold to extract the data of the observation points with a greater influence on the target station. Therefore, the final input feature vector is expressed as:
[0041] Y * = {Y i | ρ(X * , X i ) > ρ th , i ∈ 1, 2,..., N}
[0042] where ρ th is the correlation threshold, and Y * is the unfiltered input feature vector, representing the spatio-temporal information of the target site. After determining Y * , this step obtains the trend input modal feature vector group and the periodic input modal feature vector group
[0043] In step 4, the trend prediction sub-model is a three-layer, multi-input temporal convolutional network model. We input the trend input modal feature vector group that combines groundwater depth, annual actual evaporation, annual total radiation, total rainfall from April to October, average maximum temperature from April to October, average minimum temperature from April to October, total evaporation from April to October, total radiation from April to October, total rainfall from May to September, average maximum temperature from May to September, average minimum temperature from May to September, evaporation from May to September, and total radiation from May to September into the network, and finally output a variable, namely groundwater depth. Input it into the network, and finally output a variable, that is, the groundwater depth.
[0044] In the trend prediction sub-model based on TCN, we adopt the structure of one convolutional layer and three TemporalBlocks. The main process is as follows: The trend data group composed of the trend data of twelve environmental variables and the trend data of groundwater depth is first input into the convolutional layer to extract spatial information. The output result of the convolutional layer is input into the first TemporalBlock for prediction, and the predicted result is then input into the second TemporalBlock for prediction. The result predicted by the second layer is then input into the third TemporalBlock for prediction. Finally, the predicted result of the third TemporalBlock is input into the output layer to output the groundwater depth trend data with a dimension of 1.
[0045] Furthermore, in the trend prediction model, the shape of the convolutional kernel in the convolutional layer is 1×1. Multiple 1×1 convolutional kernels are used to expand the input channels from C in to a larger dimension C out (C out > C in ), and then a 1×1 convolutional kernel is used to reduce the input channels from C out to 1. The calculation formula is as follows:
[0046]
[0047] Among them, y c,t,w is the value of the output feature map on the c-th channel, the t-th time step, and the ω-th feature; x c',t,w is the value of the output feature map on the c'-th channel, the t-th time step, and the ω-th feature; w c',c is the weight of the 1×1 convolutional kernel, c' is the input channel index, c is the output channel index; b c is the bias term of the c-th channel; y t,w is the value of the output feature map on the t-th time step and the ω-th feature; x c,t,w is the value of the output feature map on the c-th channel, the t-th time step, and the ω-th feature; w c,0is the weight of the dimensionality reduction convolution kernel; b0 is the bias term for a single output.
[0048] The main calculation formula for each neuron of the TCN is as follows:
[0049]
[0050] where, x t-d·i represents the input value d·i time steps back from the current time point t; w i is the weight of the convolution kernel; d is the dilation rate; b is the bias term; f is the activation function.
[0051] In step 5, mainly the grouped periodic input modal feature vectors are input into the periodic prediction sub-model based on FEDformer for prediction. Similar to the trend sub-model, the input data is time series data combined with twelve environmental variables and one groundwater depth prediction variable, and the output is also periodic groundwater depth data.
[0052] Preferably, the FEDformer model is mainly divided into an encoder and a decoder. The main process is as follows: The periodic data of twelve environmental variables and the periodic data group of groundwater depth are first input into the convolutional layer to extract spatial information. The output result of the convolutional layer is input into the encoder and the decoder, and finally the decoder makes a prediction and outputs periodic groundwater depth data with a dimension of 1.
[0053] Furthermore, in the periodic prediction model, the calculation process of the convolutional layer is the same as in step 4, and the calculation process of the FEDfomrer model is specifically as follows:
[0054] The encoder uses a multi-layer structure to process the input data, specifically:
[0055]
[0056] where, is the output of the l-th encoder layer, l ∈ {1, 2,..., N}, and Encoder(·) represents the entire data processing process of the encoder.
[0057] The MOE Decomp layer in the encoder is responsible for decomposing the input signal into seasonal components and trend components. Among them, the trend component will be discarded, only the season is retained, and this component is passed to the next layer for further processing; the role of the FEB module is to extract the frequency domain information of the input signal. By converting the time series data to the frequency domain, weighting the frequency domain features to ensure that high-frequency signals get greater weights, and finally inputting the processed data into the decoder.
[0058] The main formula of the encoder is as follows:
[0059]
[0060]
[0061]
[0062] Among them, \(l\in\{1,2,\cdots,N\}\) represents the output of the \(l\)-th layer encoder, is the embedded historical sequence, \(i\in\{1,2\}\) represents the seasonal component after the \(i\)-th decomposition block in the \(l\)-th layer.
[0063] The decoder also adopts a multi-layer structure to process the input data, specifically:
[0064]
[0065] Among them, is the output of the \(l\)-th layer decoder, \(l\in\{1,2,\cdots,M\}\).
[0066] Each input in the encoder will pass through three MOE Decomp decomposition layers, which decompose the input signal into seasonal components and trend components, only retain the seasonal components, and pass this component to the next layer for further processing; the role of the FEB module is to extract the frequency domain information of the input signal. By converting the time series data into the frequency domain and weighting the frequency domain features, it ensures that high-frequency signals get greater weights; the FEA module is responsible for information exchange between the decoder and the encoder. By means of the cross-attention mechanism, it learns the relationship between the decoder and the encoder, extracts the signal correlation and similarity between the two modules, so as to realize the adaptive learning and prediction ability of the model.
[0067] The main formula of the decoder is as follows:
[0068]
[0069]
[0070]
[0071]
[0072] Among them, \(l\in\{1,2,\cdots,M\}\) represents the output of the \(l\)-th layer encoder, \(i\in\{1,2,3\}\) respectively represent the seasonal component and trend component after the \(i\)-th decomposition block in the \(l\)-th layer, \(W\) 1,i , \(i\in\{1,2,3\}\) respectively represent the trend extracted for the \(i\)-th time
[0073] The final prediction result is the sum of two components, and its formula is:
[0074]
[0075] where, W S projects the season component after depth transformation onto the target dimension.
[0076] In step 6, the ridge regression algorithm is divided into four links. Link 1: Construct the feature matrix; Link 2: Calculate the weights using the ridge regression algorithm; Link 3: Apply the weights to the prediction result.
[0077] In the above Link 1: According to the above steps, obtain the original groundwater data y H , the original trend mode vector x HT , the original periodic mode vector x HS , the predicted trend result vector x PT , and the predicted periodic result vector x PS . Construct the feature matrix X H , and put the original trend mode vector x HT and the original periodic mode vector x HS into X H as column vectors. Specifically:
[0078] X = [x HT x HS
[0079] In the above Link 2: Use the ridge regression algorithm to calculate the weight vector ω. Specifically:
[0080] ω = (X T X + λI) -1 X T y
[0081] where, X T is the transpose of X, λ is the regularization parameter, and I is the identity matrix.
[0082] In the above Link 3: Apply the weight vector ω calculated in Link 2 to the fitting process of the trend prediction result vector and the periodic prediction result vector to generate the final prediction result Specifically:
[0083]
[0084] In step 7: Evaluate the prediction result, calculate evaluation indicators such as the mean absolute error MAE, the root mean square error RMSE, and the coefficient of determination R 2 . Specifically:
[0085]
[0086]
[0087]
[0088] Among them, is the average value of the actual values.
[0089] These metrics can comprehensively evaluate the accuracy of the prediction results. MAE represents the average of the absolute errors between the predicted values and the actual values, RMSE represents the square root of the average of the squares of the errors between the predicted values and the actual values, and R 2 represents the proportion of the variance of the dependent variable explained by the model, and the closer the R 2 value is to 1, the better the model fitting effect. BRIEF DESCRIPTION OF THE DRAWINGS
[0090] In order to more clearly illustrate the technical solutions in the embodiments of 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 only the embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained according to the provided drawings without creative efforts.
[0091] Figure 1 is the prediction flowchart of the groundwater depth time series prediction model based on TCN-FEDformer proposed by the present invention.
[0092] Figure 2 is the structural diagram of the groundwater depth time series prediction model based on TCN-FEDformer proposed by the present invention.
[0093] Figure 3 is the result diagram of the variational mode decomposition of the trend cycle mode proposed by the present invention.
[0094] Figure 4 is the result diagram of the cumulative curve of the principal component contribution degree of the periodic mode data proposed by the present invention.
[0095] Figure 5 is the result diagram of the cumulative curve of the principal component contribution degree of the trend mode data proposed by the present invention.
[0096] Figure 6 is the result diagram of the correlation analysis proposed by the present invention.
[0097] Figure 7 is the process diagram of extracting spatial information based on the convolution kernel proposed by the present invention.
[0098] Figure 8This is the structural diagram of the prediction model based on the temporal convolutional network of the present invention.
[0099] Figure 9 This is the structural diagram of the prediction model based on the FEDformer model of the present invention.
[0100] Figure 10 This is the comparison chart of the prediction results between the TCN-FEDformer groundwater depth prediction model proposed by the present invention and other comparison models. Detailed implementation manners
[0101] The following further explains the detailed implementation manners of the present invention with reference to the accompanying drawings. It should be noted here that the description of these implementation manners is used to help understand the present invention, but does not constitute a limitation to the present invention. In addition, the technical features involved in the various implementation manners of the present invention described below can be combined with each other as long as they do not conflict with each other.
[0102] In order to solve the deficiencies of existing models in the field of groundwater depth prediction and make full use of the inherent characteristics of the original data to improve the performance of the prediction system, this paper proposes a groundwater depth prediction model based on the TCN-FEDformer model. The model aims to more accurately predict the groundwater depth. The overall idea flow chart of the algorithm is as Figure 1 shown, and the overall framework diagram is as Figure 2 shown. The model structure proposed in this patent includes the following steps:
[0103] Step 1: Perform variational mode decomposition on the original data
[0104] Furthermore, the variational mode decomposition algorithm is divided into four links. Link 1: Construct a time series matrix; Link 2: Construct a variational problem; Link 3: Solve the variational problem by the alternating direction method of multipliers; Link 4: Modal classification.
[0105] The above Link 1: Construct a time series link, construct the original data into a time series matrix X ∈ R N×T×M , where T and M respectively represent the number of time steps and environmental characteristics related to the groundwater depth. X can also be expressed as a vector of N feature matrices, expressed as X = {X1(t), X2(t),..., X N (t)}, where X i ∈ R T×M represents the feature matrix of the i-th groundwater monitoring station
[0106] The above Link 2: Construct a variational problem link, first set the number of decomposed modes K, initialize the mode u k (t) and the central frequency ω k , and construct a variational problem, which is expressed as:
[0107]
[0108] Among them, δ(t) is the unit impulse function, and * is convolution.
[0109] In the above step 3: the alternating direction multiplier method is used to solve the variational problem. The above variational problem can be solved by the alternating direction multiplier method, and by alternately updating and seeking the saddle point of the augmented Lagrangian expression to solve the variational problem, which is expressed as:
[0110]
[0111] In the above step 4: the modal classification step, identify the modes with low-frequency characteristics and slow change trends. By calculating the average frequency F of each mode Ave to judge whether it is a trend mode:
[0112]
[0113] If the average frequency is F Ave lower than the threshold F s , it is regarded as the trend mode u t (t). By analyzing the spectral characteristics of the mode, identify the periodic mode u s (t) with high-frequency characteristics.
[0114] Finally, the decomposed time series data can be obtained. The modal decomposition result is as Figure 3 shown. Among them, the upper subgraph represents the decomposed periodic data, and the lower subgraph represents the decomposed trend data.
[0115] Step 2: Principal component analysis
[0116] For the contribution degrees of the features of the decomposed time series data, select the ones with larger contribution degrees as the principal components. The contribution degree of each principal component can be measured by its eigenvalue. The larger the eigenvalue, the more variance the principal component explains in the data. Calculate the cumulative contribution degree of the first m principal components, which represents how much of the total data variance these principal components explain together. Set the cumulative contribution degree threshold F cla to determine the value of m, which is expressed as:
[0117]
[0118] where p is the total number of features.
[0119] Through the above principal component analysis method, the main trend variable and the main periodic variable The principal component analysis result diagram is as Figure 4 、 Figure 5 shown.Figure 4 It represents the cumulative curve of the contribution degree of the principal components of the periodic modal data. The first 6 principal components are selected to make the cumulative contribution degree of the principal components reach 99.9%. Figure 5 It represents the cumulative curve of the contribution degree of the principal components of the trend modal data. The first 5 principal components are selected to make the cumulative contribution degree of the principal components reach 99.8%
[0120] Step 3: Correlation analysis
[0121] Calculate the correlation degree between each site. The Pearson correlation coefficient is used to represent the influence degree between two monitoring stations, which is expressed as:
[0122]
[0123] where X * and X i respectively represent the groundwater depths of the target site and the i-th site in a time series; Cov(·) is the covariance function; and are the variances of X * and X i respectively. The correlations between all other monitoring stations and the target monitoring station form a correlation vector, which is expressed as:
[0124] ρ = [ρ(X * , X1), ρ(X * , X i ),..., ρ(X * , X N )]
[0125] Considering that the influence of not all observation points on the target observation point is obvious, it is reasonable to set a correlation threshold to extract the data of the observation points with a greater influence on the target station. Therefore, the final input feature vector is expressed as:
[0126] Y * = {Y i | ρ(X * , X i ) > ρ th , i ∈ 1, 2,..., N}
[0127] where ρ th is the correlation threshold, and Y * is the unfiltered input feature vector, representing the spatio-temporal information of the target site. After determining Y * , this step obtains the trend input modal feature vector group and the periodic input modal feature vector group The correlation analysis result diagram is as Figure 6 shown
[0128] Step 4: Use the trend prediction sub-model to predict trend data
[0129] Figure 7 It shows the extraction process of the spatial information of relevant wells in the trend prediction sub-model. We use multiple 1×1 convolutional kernels to reduce the dimension of this multi-channel information, as shown by the feature vectors marked in gray. Then, a 1×1 convolutional kernel is used to reduce the dimension to 1, marked in orange. This strategy can not only improve the feature extraction ability for the information of multiple monitoring stations through dimension increment, but also aggregate the input data into a two-dimensional feature vector, which is compatible with the input of the causal network in the second part. Other studies have also shown that 1×1 convolution can be regarded as a dimension increment or decrement module, which can effectively improve the model capacity and eliminate the computational bottleneck. Figure 8 It shows the basic structure of the time series prediction model of the time convolutional network in the trend prediction sub-model. We adopt a structure of one convolutional layer and three TemporalBlocks. The main process is as follows: The trend data group composed of the trend data of twelve environmental variables and the trend data of groundwater depth is first input into the convolutional layer to extract spatial information. The output result of the convolutional layer is input into the first TemporalBlock for prediction, and the predicted result is then input into the second TemporalBlock for prediction. The result predicted by the second layer is then input into the third TemporalBlock for prediction. Finally, the predicted result of the third TemporalBlock is input into the output layer to output the groundwater depth trend data with a dimension of 1.
[0130] Furthermore, in the trend prediction model, the shape of the convolutional kernel in the convolutional layer is 1×1. Multiple 1×1 convolutional kernels are used to expand the input channels from C in to a larger dimension C out (C out > C in ), and then a 1×1 convolutional kernel is used to reduce the input channels from C out to 1. The calculation formula is as follows:
[0131]
[0132] where y c,t,w is the value of the output feature map at the c-th channel, the t-th time step, and the ω-th feature; x[[ID=2,8]] c',t,w is the value of the output feature map at the c'-th channel, the t-th time step, and the ω-th feature; w c',c is the weight of the 1×1 convolutional kernel, c' is the input channel index, c is the output channel index; b c is the bias term of the c-th channel; y t,w is the value of the output feature map at the t-th time step and the ω-th feature; x c,t,wis the value of the output feature map at the c-th channel, the t-th time step, and the ω-th feature; w c,0 is the weight of the dimensionality reduction convolutional kernel; b0 is the bias term for a single output.
[0133] The main calculation formula for each neuron of the TCN is as follows:
[0134]
[0135] where, x t-d·i represents the input value d·i time steps back from the current time point t; w i is the weight of the convolutional kernel; d is the dilation rate; b is the bias term; f is the activation function.
[0136] Step 5: Use the periodic prediction sub-model to predict periodic data
[0137] Figure 9 The structure diagram of the periodic prediction sub-model we used is shown. From the figure, we can see that the FEDformer model is mainly divided into an encoder and a decoder. In the encoder, the historical data is first input into the frequency enhancement module, the trend separation module, the feed-forward module, and the trend separation module, and then input into the decoder. In the decoder, the periodic data is first input into the frequency enhancement module, the trend separation module, and the frequency enhancement attention mechanism module to fuse the encoder output data. Then, it passes through the trend separation module again, through the feed-forward module, and through the trend separation module again, and finally generates the periodic prediction data.
[0138] The main process is as follows: The periodic data of twelve environmental variables and the periodic data group of the groundwater depth are first input into the convolutional layer to extract spatial information. The output result of the convolutional layer is input into the encoder and the decoder, and finally, the decoder makes a prediction and outputs the periodic data of the groundwater depth with a dimension of 1.
[0139] Furthermore, in the periodic prediction model, the calculation process of the convolutional layer is the same as in Step 4. The calculation process of the FEDfomrer model is specifically as follows:
[0140] The encoder uses a multi-layer structure to process the input data, specifically as follows:
[0141]
[0142] where, is the output of the l-th encoder layer, l ∈ {1, 2,..., N}, and Encoder(·) represents the entire data processing process of the encoder.
[0143] The MOE Decomp layer in the encoder is responsible for decomposing the input signal into seasonal and trend components. Among them, the trend component will be discarded, and only the seasonality is retained and passed to the next layer for further processing; the role of the FEB module is to extract the frequency-domain information of the input signal. By converting the time-series data into the frequency domain, after weighting the frequency-domain features, it ensures that high-frequency signals get greater weights. Finally, the processed data is input into the decoder.
[0144] The main formula of the encoder is as follows:
[0145]
[0146]
[0147]
[0148] Among them, \(l\in\{1,2,\cdots,N\}\) represents the output of the \(l\)-th layer of the encoder, is the embedded historical sequence, \(i\in\{1,2\}\) represents the seasonal component after the \(i\)-th decomposition block in the \(l\)-th layer.
[0149] The decoder also adopts a multi-layer structure to process the input data, specifically:
[0150]
[0151] Among them, is the output of the \(l\)-th layer of the decoder, \(l\in\{1,2,\cdots,M\}\).
[0152] Each input in the encoder will go through three MOE Decomp decomposition layers, which decompose the input signal into seasonal and trend components, retain only the seasonal component, and pass this component to the next layer for further processing; the role of the FEB module is to extract the frequency-domain information of the input signal. By converting the time-series data into the frequency domain, after weighting the frequency-domain features, it ensures that high-frequency signals get greater weights; the FEA module is responsible for information exchange between the decoder and the encoder. By means of the cross-attention mechanism, it learns the relationship between the decoder and the encoder, extracts the signal correlation and similarity between the two modules, so as to realize the adaptive learning and prediction ability of the model.
[0153] The main formula of the decoder is as follows:
[0154]
[0155]
[0156]
[0157]
[0158] Among them, l∈{1,2,...,M} represents the output of the l-th layer encoder, i∈{1,2,3} represents the seasonal component and trend component after the i-th decomposition block in the l-th layer, respectively. 1,i , i∈{1,2,3} represents the trend of the i-th extraction projection;
[0159] The final prediction result is the sum of the two components, and the formula is:
[0160]
[0161] Among them, W S is the seasonal component after depth transformation Project to the target dimension.
[0162] Step 6: Fit the trend component and cycle component prediction results through the ridge regression algorithm and output the final prediction results.
[0163] Furthermore, the dual prediction sub-model based on variational mode decomposition proposed in this patent is applied to the field of groundwater depth prediction.
[0164] The present invention is specifically implemented as follows: a case study is conducted using the groundwater depths of 910 monitoring boreholes in the Murray-Darling Basin of Australia. In order to promote a rational groundwater development plan and better specify environmental protection strategies, we predict the groundwater depth in the region.
[0165] Considering that the groundwater depth at a given moment is not only related to historical depth but also closely related to environmental variables and spatially correlated groundwater depth conditions, for example, ambient temperature can affect groundwater evaporation, causing groundwater levels to drop; increases or decreases in regional precipitation can also cause groundwater levels to fluctuate. Subsequently, we obtained a [51, 13] dataset for each borehole, encompassing 51 years of data from 1971 to 2021 and 13 variables. We selected the first 41 years of data as the training set, the five years of data from 2012 to 2016 as the validation set, and the five years of data from 2017 to 2021 as the test set. Therefore, the dimensions of the validation and test sets can also be expressed as [5, 13] and [5, 13], respectively.
[0166] Preferably, in the experiment, after variational mode decomposition of the original data, the trend mode and the periodic mode are obtained. Principal component analysis is performed on 13 variables of the two modes. For the periodic mode, the first 6 principal component variables are selected, and for the trend mode, the first 5 principal component variables are selected. The correlation analysis is carried out between the periodic mode and the trend mode, and the monitoring boreholes with relatively high correlation are screened out and input into the periodic prediction sub-model and the trend prediction sub-model respectively for prediction. In the two prediction sub-models, 6 principal component variables and the groundwater depth are used as the input of the periodic prediction sub-model, and 5 principal component variables and the groundwater depth are used as the input of the trend prediction sub-model. The concentration data at the next moment is the output of the model.
[0167] Preferably, the number of neurons in the input layer of the trend prediction sub-model is the same as the number of input variables, both of which are 6. In the hidden layer, 4 layers of TCN are selected, and the number of neurons ranges from [32, 128]. Finally, a fully connected layer with 1 output is used. In addition, the time step is selected as 5; gelu is selected as the activation function; the batch size for one-time input into the neural network for training is 46; the learning rate is: 0.001; the number of iterations is: 1000; the dropout rate is: 0.25.
[0168] Preferably, the number of decoders in the periodic prediction sub-model is 3 blocks, the number of encoders is 1 block, the number of input variables of the decoder and the encoder is the same, both of which are 6, and finally a fully connected layer with 1 output is used. The number of multi-head attention heads is 8, the dropout rate is 0.1, the dimension of the fully connected network is 128, the attention factor is 2, and the learning rate is: 0.001.
[0169] Step 7: Calculate the mean absolute error MAE, root mean square error RMSE, coefficient of determination R 2 and other evaluation indicators.
[0170] Furthermore, we select MAE, RMSE, R 2 as the evaluation criteria for the model prediction results. The following is a detailed introduction to each indicator.
[0171] Preferably, the mean absolute error (MAE) is the average of the absolute differences between the predicted values and the measured values, and the calculation formula is as follows:
[0172]
[0173] where P i and O i are the i-th predicted and observed values respectively, and m is the number of variables.
[0174] The root mean square error (RMSE) is the square root of the mean of the sum of the squares of the differences between the predicted values and the measured values, and the calculation formula is as follows:
[0175]
[0176] Among them, P i and O i are the i-th predicted and observed values respectively, and m is the number of variables.
[0177] The coefficient of determination (R 2 ) is the ratio of the sum of squared residuals to the total sum of squares, and the calculation formula is as follows:
[0178]
[0179] Among them, P i and O i are the i-th predicted and observed values respectively, is the mean of the observed values, and m is the number of variables.
[0180] The further prediction results are as Figure 10 shown, demonstrating the accuracy and universality of our model results. At the same time, we compared our model with common time series prediction models such as GRU, RNN, LSTM, transformer, informer, and TCN, and the prediction results are shown in the following table in terms of three metrics:
[0181]
[0182] From the result analysis, it can be seen that the model we proposed shows the best performance, with an R 2 value of 0.9709, an MAE of 0.0705, and an RMSE of 0.076. In this part, compared with the TCN, Informer, transformer, GRU, RNN, and LSTM models, the proposed model has improved the MAE effect by 75.62% - 81.88% and the RMSE effect by 81.69% - 86.29% at the observation sites, and the R 2 has increased by more than 0.8385.
[0183] Furthermore, the prediction system further includes a computer-readable storage medium on which a computer program is stored, and further includes:
[0184] A non-volatile semiconductor storage element for reading the data information collected by the data acquisition module; the data information at least includes the sample data in the training set and the test set, as well as the data to be predicted;
[0185] And a data processing unit that calls the computer program through a processing circuit to execute and implement the steps of the time convolutional neural network fusion prediction model method under variable mode decomposition as described above;
[0186] There is also a data distribution circuit. After the data to be predicted read from the non-volatile semiconductor memory element is processed by the data and processing unit according to the weekly processing unit, the obtained prediction result is sent to one or more CAN buses and sent to an external device through a gateway.
[0187] The embodiments of the present invention have been described in detail above in conjunction with the accompanying drawings, but the present invention is not limited to the described embodiments. For those skilled in the art, without departing from the principle and spirit of the present invention, various changes, modifications, substitutions, and variations of these embodiments still fall within the protection scope of the present invention.
Claims
1. A prediction method for the deep burial situation of groundwater based on a fusion model of variable mode decomposition and temporal convolutional neural network, characterized in that, It includes the following steps: Step 1: Based on the variational mode decomposition algorithm, decompose the original data into a trend component and a periodic component; Step 2: Based on the principal component analysis algorithm, perform principal component analysis on the trend component and the periodic component respectively to extract the main features; Step 3: Set up observation stations, calculate the correlation degree between each station in the space, and screen out the spatial information that meets the requirements according to the correlation degree threshold; Step 4: Input the trend tensor data and the periodic tensor data of the training set into the convolutional layer, extract the feature information of other highly correlated wells in the space, and after passing through the spatial convolutional layer, the trend component combined with the spatial information enters the temporal convolutional neural network model for training; Step 5: The periodic component enters the FEDformer model for training, and the trained fusion model is obtained by testing the training effect through the validation set; Step 6: Input the data to be predicted into the fusion model to obtain the prediction results of the trend component and the periodic component; The prediction results of the trend component and the periodic component are fitted through the ridge regression algorithm and the final prediction result is output; Step 7: Calculate evaluation metrics such as the mean absolute error (MAE), root mean square error (RMSE), and coefficient of determination R 2 and so on.
2. The groundwater depth prediction method based on the time convolutional neural network fusion model under variational mode decomposition according to claim 1, wherein, The specific process of the variational mode decomposition is as follows: The variational mode decomposition algorithm is divided into four links. Link 1: Construct a time series matrix; Link 2: Construct a variational problem; Link 3: Solve the variational problem by the alternating direction multiplier method; Link 4: Modal classification. The above step 1: constructing the time series step, constructing the original data into a time series matrix X ∈ R N×T×M , where T and M respectively represent the number of time steps and environmental characteristics related to the groundwater depth. X can also be expressed as a vector of N feature matrices, denoted as X = {X1(t), X2(t),..., X N (t)}, where X i ∈R T×M represents the feature matrix of the i-th groundwater monitoring station The above step 2: the step of constructing a variational problem. First, set the number of decomposed modes K, and initialize the mode u k (t) and the center frequency ω k , and construct a variational problem, which is expressed as: Among them, δ(t) is the unit impulse function, and * is the convolution. Step 3 above: the step of solving the variational problem by the alternating direction multiplier method. The above variational problem can be solved by the alternating direction multiplier method, and by alternately updating and finding the saddle point of the augmented Lagrangian expression to solve the variational problem, which is expressed as: The above step 4: Modal classification step, identify the modes with low-frequency characteristics and slow-changing trends. By calculating the average frequency F of each mode Ave to determine whether it is a trend mode: If the average frequency is the average frequency F Ave is lower than the threshold F s , it is regarded as the trend mode u t (t). By analyzing the spectral characteristics of the mode, the periodic mode u s (t) with high-frequency characteristics is identified.
3. A method for predicting the deep burial situation of groundwater based on a time convolutional neural network fusion model under variational mode decomposition according to claim 2, characterized in that The specific process of extracting the main features by the principal component analysis method is as follows: The principal component analysis method is divided into three links. Link 1: Calculate the covariance matrix; Link 2: Eigenvalue decomposition; Link 3: Principal component selection. The above Link 1: Calculate the covariance matrix, which is expressed as: where U is the trend mode u decomposed in step 1 t (t) and the periodic mode u s (t). The above step 2: eigenvalue decomposition, perform eigenvalue decomposition on the covariance matrix S to obtain eigenvalues λ1, λ1,..., λ p and the corresponding eigenvectors c1, c2,..., c p , which is expressed as: S = C Λ C T The above step 3: Principal component selection. The principal components are those with relatively large contribution degrees. The contribution degree of each principal component can be measured by its eigenvalue. The larger the eigenvalue, the more variance of the data the principal component explains. Calculate the cumulative contribution degree of the first m principal components, which indicates how much of the total data variance these principal components explain together. Set the cumulative contribution degree threshold F cla Determine the value of m, which is manifested as: Among them, p is the total number of features. The main trend variables can be obtained through the above principal component analysis method and the main periodic variables 4. A method for predicting the deep burial condition of groundwater based on a time convolutional neural network fusion model under variational mode decomposition according to claim 3, characterized in that, The specific process of calculating the correlation degree between each station is as follows: where X * and X i represent the groundwater depths at the target site and the i-th site, respectively, in a time series; Cov(·) is the covariance function; and are the variances of X * and X i respectively. The correlations of all other monitoring stations with the target monitoring station form a correlation vector, expressed as: ρ = [ρ(X * , X1), ρ(X * , X i ),..., ρ(X * , X N )] Considering that the influence of not all observation points on the target observation point is obvious, it is reasonable to set a correlation threshold to extract the data of the observation points that have a greater impact on the target station. Therefore, the final input feature vector is expressed as: Y * = {Y i | ρ(X * , X i ) > ρ th , i ∈ 1, 2,..., N} where ρ th is the correlation threshold, and Y * is the unfiltered input feature vector representing the spatio-temporal information of the target site. After determining Y * , this step yields the trend input modal feature vector group and the periodic input modal feature vector group 5. A prediction method for the groundwater depth based on a time convolutional neural network fusion model under variational mode decomposition according to claim 4, characterized in that, The specific process of inputting the trend sub-modal data into the trend sub-model for trend prediction is as follows: The trend prediction sub-model is a three-layer time convolutional network model with multiple inputs. We will input the trend input modal feature vector group that integrates the groundwater depth, annual actual evaporation, annual total radiation, total rainfall from April to October, average maximum temperature from April to October, average minimum temperature from April to October, total evaporation from April to October, total radiation from April to October, total rainfall from May to September, average maximum temperature from May to September, average minimum temperature from May to September, evaporation from May to September, and total radiation from May to September into the network, and finally output a variable, that is, the groundwater depth. In the trend prediction sub-model based on TCN, we adopt the structure of one convolutional layer and three TemporalBlocks. The main process is as follows: The trend data group composed of the trend data of twelve environmental variables and the trend data of the groundwater depth is first input into the convolutional layer to extract spatial information. The output result of the convolutional layer is input into the first TemporalBlock for prediction, and the predicted result is then input into the second TemporalBlock for prediction. The result predicted by the second layer is then input into the third TemporalBlock for prediction. Finally, the prediction result of the third TemporalBlock is input into the output layer, and the groundwater depth trend data with a dimension of 1 is output. Further, in the trend prediction model, the shape of the convolution kernel in the convolutional layer is 1×1, and multiple 1×1 convolution kernels are used to expand the input channels from C in to a larger dimension C out (C out > C in ), and then a 1×1 convolution kernel is used to reduce the input channels from C out to 1. The calculation formula is as follows: where, y c,t,w is the value of the output feature map at the c-th channel, the t-th time step, and the ω-th feature; x c',t,w is the value of the output feature map at the c'-th channel, the t-th time step, and the ω-th feature; w c',c is the weight of the 1×1 convolutional kernel, c' is the input channel index, and c is the output channel index; b c is the bias term for the c-th channel; y t,w is the value of the output feature map at the t-th time step and the ω-th feature; x c,t,w is the value of the output feature map at the c-th channel, the t-th time step, and the ω-th feature; w c,0 is the weight of the dimensionality reduction convolutional kernel; b0 is the bias term for a single output. The main calculation formula of each TCN neuron is as follows: Among them, x t-d·i represents the input value d·i time steps back from the current time point t; w i is the weight of the convolutional kernel; d is the dilation rate; b is the bias term; f is the activation function.
6. A method for predicting the groundwater depth based on a time convolutional neural network fusion model under variational mode decomposition according to claim 5, characterized in that The specific process of inputting the trend sub-modal data into the trend sub-model for trend prediction is as follows: Input the grouped periodic input modal feature vectors into the periodic prediction sub-model based on FEDformer for prediction. Similar to the trend sub-model, the input data is the time series data combined with twelve environmental variables and a groundwater depth prediction variable, and the output is also the periodic groundwater depth data. Preferably, the FEDformer model is mainly divided into an encoder and a decoder. The main process is as follows: The periodic data of twelve environmental variables and the periodic data group of groundwater depth are first input into the convolutional layer to extract spatial information. The output result of the convolutional layer is input into the encoder and the decoder, and finally the decoder makes a prediction and outputs the periodic data of groundwater depth with a dimension of 1. Furthermore, in the periodic prediction model, the calculation process of the convolutional layer is the same as that in step 4. The calculation process of the FEDfomrer model is specifically as follows: The encoder adopts a multi-layer structure to process the input data. Specifically: Among them, is the output of the l-th encoder layer, where l ∈ {1, 2,..., N}, and Encoder(·) represents the entire data processing process of the encoder. The MOE Decomp layer in the encoder is responsible for decomposing the input signal into a seasonal component and a trend component. Among them, the trend component will be discarded, and only the season is retained and passed to the next layer for further processing. The role of the FEB module is to extract the frequency domain information of the input signal. By converting the time series data into the frequency domain, after weighting the frequency domain features, it ensures that the high-frequency signal gets a greater weight. Finally, the processed data is input into the decoder. The main formula of the encoder is as follows: where \(l\in\{1,2,\cdots,N\}\) represents the output of the \(l\)-th layer encoder, is the embedded historical sequence, represents the seasonal component after the \(i\)-th decomposition block in the \(l\)-th layer. The decoder also adopts a multi-layer structure to process the input data. Specifically: Among them, is the output of the l-th layer decoder, where l ∈ {1, 2,..., M}. Each input in the encoder will pass through three MOE Decomp decomposition layers, which decompose the input signal into a seasonal component and a trend component, and only the seasonal component is retained and passed to the next layer for further processing. The role of the FEB module is to extract the frequency domain information of the input signal. By converting the time series data into the frequency domain, after weighting the frequency domain features, it ensures that the high-frequency signal gets a greater weight. The FEA module is responsible for information exchange between the decoder and the encoder. By means of the cross-attention mechanism, it learns the relationship between the decoder and the encoder, extracts the signal correlation and similarity between the two modules, so as to realize the adaptive learning and prediction ability of the model. The main formula of the decoder is as follows: where \(l\in\{1,2,\cdots,M\}\) represents the output of the \(l\)-th layer encoder, respectively represent the seasonal component and the trend component after the \(i\)-th decomposition block of the \(l\)-th layer, \(W\) 1,i , \(i\in\{1,2,3\}\) respectively represent the projection of the trend extracted for the \(i\)-th time; The final prediction result is the sum of the two components, and its formula is: Among them, W S projects the season component after depth transformation onto the target dimension.
7. A method for predicting the deep burial situation of groundwater based on a time convolutional neural network fusion model under variational mode decomposition, as claimed in claim 6, wherein The application of the ridge regression algorithm for modal reconstruction is specifically as follows: The ridge regression algorithm is divided into four links. Link 1: Construct a feature matrix; Link 2: Calculate the weights using the ridge regression algorithm; Link 3: Apply the weights to the prediction result. The above step 1: Obtain the original groundwater data y according to the above steps H , the original trend mode vector x HT , the original periodic mode vector x HS , the predicted trend result vector x PT , the predicted periodic result vector x PS . Construct the feature matrix X H , and put the original trend mode vector x HT and the original periodic mode vector x HS into X as column vectors H , specifically: X = [x HT x HS The above Link 2: Use the ridge regression algorithm to calculate the weight vector ω, specifically: ω=(X T X + λI) -1 X T y where X T is the transpose of X, λ is the regularization parameter, and I is the identity matrix. Step 3 above: Apply the weight vector ω calculated in Step 2 above to the fitting process of the trend prediction result vector and the period prediction result vector to generate the final prediction result Specifically:
8. A method for predicting the deep burial situation of groundwater based on a time convolutional neural network fusion model under variational mode decomposition according to claim 7, characterized in that, The described calculation evaluation indicators are specifically as follows: evaluate the prediction results, calculate the mean absolute error MAE, the root mean square error RMSE, and the coefficient of determination R 2 and other evaluation indicators, specifically as follows: Among them, is the average value of the actual values. These metrics can comprehensively evaluate the accuracy of the prediction results. MAE represents the average of the absolute errors between the predicted values and the actual values, RMSE represents the square root of the average of the squares of the errors between the predicted values and the actual values, and R 2 represents the proportion of the variance of the dependent variable explained by the model, and R 2 The closer the value is to 1, the better the model fitting effect is. A computer-readable storage medium with a computer program stored thereon; A non-volatile semiconductor storage element for reading the data information collected by the data acquisition module; The data information includes at least the sample data in the training set and the test set, and the data to be predicted; A data processing unit, which calls the computer program through a processing circuit to execute and implement the steps of the improved marine predator algorithm based on multiple strategies according to any one of claims 1-6; A data distribution circuit, after processing the data to be predicted read from the non-volatile semiconductor storage element by each processing unit through the data processing unit, sends the obtained prediction result to one or more CAN buses to be sent to an external device through a gateway.