Karst underground water level prediction method based on PSA-CNN-LSTM-Attention deep learning algorithm

Through the PSA-CNN-LSTM-Attention deep learning algorithm, combining convolutional neural networks and long-term memory networks, and introducing a global average pooling layer and SE attention mechanism, the problem of difficulty in predicting groundwater levels in the existing technology is solved, and high-precision groundwater levels prediction in karst areas is achieved.

CN119918578AInactive Publication Date: 2025-05-02GUIZHOU GEOLOGICAL & MINERAL EXPLORATION & DEV BUREAU 111 GEOLOGICAL BRIGADE

Patent Information

Application Number
CN202411272720.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-11
Publication Date
2025-05-02
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

It is difficult for the prior art to accurately predict complex and nonlinear changes in groundwater levels, especially in karst areas. Traditional physical models are difficult to provide high-precision predictions due to high data demand and limitations of model assumptions.

Method used

A karst groundwater level prediction method based on PSA-CNN-LSTM-Attention deep learning algorithm is adopted to build a high-precision groundwater level prediction model by combining convolutional neural network (CNN) and long and short-term memory network (LSTM), and introducing a global average pooling layer and SE attention mechanism.

Benefits of technology

This method can effectively capture the complex patterns and long-term dependencies in groundwater level changes, improve the accuracy and adaptability of predictions, and is especially suitable for dynamic change prediction in karst areas.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119918578A_ABST
    Figure CN119918578A_ABST
Patent Text Reader

Abstract

The invention provides a karst underground water level prediction method based on a PSA-CNN-LSTM-Attention deep learning algorithm. The karst underground water level prediction method based on the PSA-CNN-LSTM-Attention deep learning algorithm comprises the steps that 1, data and input indexes are obtained; 2, data processing; 3, model selection and construction; and 4, verifying the model. According to the method, a large amount of underground water level data is processed and analyzed by comprehensively applying a convolutional neural network (CNN), a long short-term memory (LSTM) network, an attention mechanism and a PID search optimization algorithm (PSA). A high-precision underground water level prediction model is constructed by coupling a convolutional neural network (CNN) and a long short-term memory (LSTM) network technology and integrating a global average pooling layer and an SE attention mechanism, and the method is particularly suitable for dynamic change prediction of the underground water level in a karst area. Besides, model parameters are adjusted by adopting a PSA global optimization algorithm to ensure that the model can exert optimal performance under different environments and data conditions, so that not only is the adaptability of the model enhanced, but also the prediction accuracy of the model under a complex geological background is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of groundwater level prediction, and more specifically, particularly relates to a karst groundwater level prediction method based on a PSA-CNN-LSTM-Attention deep learning algorithm. Background Art

[0002] Groundwater is one of the important water resources and plays a key role in all aspects of human life, including direct drinking, agricultural irrigation, industrial development, and ecosystem maintenance. Affected by climate change and human activities, groundwater reserves are uncertain, and corresponding policy management usually does not pay enough attention to groundwater, which leads to the depletion of global groundwater resources. At present, some studies have shown that when the recovery rate of underground aquifers cannot meet the growth of human water demand, it may lead to food crises and a series of environmental geological problems, including ground subsidence, reduced river flow, and saltwater intrusion.

[0003] The groundwater level is a direct indicator of groundwater availability and quantity. Understanding the past, present, and future state of the groundwater level can provide better insights for decision makers in the water resources sector to develop water resources planning and management strategies. However, the response of groundwater levels to hydrogeological (such as groundwater recharge and discharge), meteorological (such as precipitation and temperature), and anthropogenic (such as urbanization and climate change) factors is highly nonlinear and complex, making the simulation of groundwater levels a challenging task. In urban areas, water resources management is particularly important due to rapid population growth, increasing per capita water consumption, and limited surface water from distant sources, especially the increasing dependence on groundwater, which requires more groundwater to meet residential and industrial water needs. Therefore, a deeper understanding of the complex groundwater level response mechanism is crucial for the sustainable planning and management of urban water supply.

[0004] Numerical simulation methods can simulate complex groundwater flow processes, thereby simulating and predicting groundwater levels. In many studies, physics-based numerical models have been used to simulate groundwater level fluctuations. These numerical simulation models include finite difference models, finite element models, and analytical element models. However, such methods have the following problems. First, in order to represent all physical processes, a large number of hydrological, geological, topographic, environmental, and climatic parameters are required as a basis, which makes physics-based groundwater simulation complicated, and the calibration and verification of its models are a major challenge. Second, the limited availability of data and the associated high costs and long time requirements increase the uncertainty of groundwater level prediction models and affect model performance. The lack of high-quality data makes it difficult for the model to accurately reflect the complexity of groundwater flow and water level changes. Third, the performance of physics-based modeling methods to predict water levels by solving the assumptions involved in the equations is often weak because most variables (such as groundwater level, evaporation, rainfall) have low predictability. Therefore, despite the successful simulation of water flow processes, these models often fail to produce good results. In contrast, machine learning models use their nonlinear characteristics to handle complex dependencies without the need to accurately describe physical properties or parameters. Such characteristics enable machine learning models to perform effective simulation and prediction without detailed knowledge of groundwater physical processes. In the past few decades, due to its advantages over numerical models, machine learning-based models have been widely used in multiple groundwater research fields, such as water quality prediction, nitrogen pollution prediction, potential prediction, pollution risk assessment, and groundwater level prediction. Although the starting points of physical-based models and data-based machine learning models are different, their respective advantages and limitations complement each other. The important hydrological processes involved in physical models are usually regarded as "black boxes" in machine learning models, and the difficulties encountered in accurate physical modeling can be alleviated by powerful machine learning models. At present, the development of new machine learning models is becoming an emerging hotspot in the field of groundwater. These advanced models use big data technology and complex algorithms to improve the accuracy of groundwater level and water quality predictions, thereby providing more effective decision support tools for groundwater management.

[0005] Because machine learning models can handle complex and nonlinear data patterns, they show great potential in predicting and simulating groundwater level dynamics. There has been an exponential growth in the number of articles on groundwater level prediction. For example, in the past 20 years, artificial neural networks (ANNs) have shown significant results in the field of groundwater research due to their ability to handle complex nonlinear relationships. Coulibaly et al. compared three types of artificial neural network (ANN) models to simulate the average monthly groundwater level in multiple aquifers in Burkina Faso using time series data of groundwater level, rainfall, and temperature as input, and found that recurrent neural network (RNN) was the more efficient model. Mohammadi tested the performance of MODFLOW and multilayer perceptron (MLP) and recurrent neural network (RNN) in groundwater level prediction. The results showed that the ANN model required less input data and had a shorter running time than MODFLOW. Jha and Sahoo simulated and developed five hybrid artificial neural network-genetic algorithm (ANN-GA) models, considering relevant input variables such as rainfall, maximum and minimum temperature, river water level and groundwater level, and demonstrated the superiority of GA technology in determining the optimal ANN structure and input. However, its high sensitivity to training data, overfitting problems and reliance on hidden neurons are the main disadvantages of the ANN model. Similarly, a machine learning model called support vector machine (SVM) has also been used to predict groundwater levels under different conditions and is considered to have better predictive ability. For example, Yoon et al. used a weighted error function method to improve the performance of ANN and SVM models in predicting the response of groundwater levels to rainfall in South Korea.

[0006] daily prediction performance, and found that SVM performed better. Nie et al. used precipitation, evaporation, and temperature as input variables to predict monthly groundwater levels in Jilin Province, China through SVM and RBF-ANN models. The results showed that the SVM model had more accurate predictions and less uncertainty caused by input and output measurement errors. In addition, some new machine learning models have also been applied in groundwater level prediction, including adaptive neuro-fuzzy inference system (ANFIS), decision tree (DT), random forest (RF), and long short-term memory network (LSTM). For more details, please refer to the review study based on learning models and groundwater levels. At present, groundwater level prediction through machine learning is still an important and hot field.

[0007] However, simple machine learning models still have some limitations in dealing with nonlinear and non-stationary processes. Many studies are committed to further improving the performance of models by building more complex hybrid models and fine-tuning parameters. For example: Kisi and Shiri studied a hybrid model based on Wavelet-ANFIS, which used historical daily groundwater level data from wells in Illinois, USA to predict groundwater levels one, two, and three days in advance. The results showed that this hybrid model performed better than the ANFIS model alone, especially when making predictions two and three days in advance. Hosseini et al. combined ANN and ant colony optimization (ACO) algorithms to simulate groundwater levels in the Shabestar Plain of Iran. They used back-propagation artificial neural networks (BP) to process input variables, including rainfall, mean flow, temperature, evaporation, and some annual time series. Then, ant colony optimization (ACO) was used in the training phase to optimize and find the initial connection weights and biases of the BP algorithm). Yang et al. proposed a hybrid deep learning model CNN-LSTM-ML, which effectively predicted the groundwater level of 66 observation wells in the middle and lower reaches of the Heihe River in the arid area by combining convolutional neural network (CNN) and long short-term memory network (LSTM) and meta-learning (ML) algorithm, showing superiority over other data-driven models in short-term and long-term prediction accuracy. Similarly, Chen et al. used generative adversarial network (GAN) for data interpolation, combined with single variable and sequence to value (Seq2val) deep learning methods to estimate groundwater level, and explored the advantages and limitations of these methods in hydrological simulation. Amiri et al. predicted the groundwater level changes in Shazand Plain by using PSO-ANN, ACA-ANN hybrid method and deep learning methods (LSTM, LS-SVM, ORELM), and compared with the GMS numerical model. The results showed that the ORELM model performed best in the test phase, and it is recommended to use deep learning methods with less data requirements and high accuracy to predict groundwater levels. Chen et al. proposed a new deep learning algorithm based on spatiotemporal attention mechanism (Attention) for groundwater level prediction in the middle reaches of Heihe River. The results showed that the model has significantly improved the prediction accuracy compared with the basic model. Ehteram and Ghanbari-Adivi proposed a new model, the SATCN-LSTM model of self-attention (SA) spatiotemporal convolutional network (SATCN) combined with LSTM, for groundwater level prediction. By integrating the short-term dependency capture ability of SATCN and the long-term dependency capture ability of LSTM, the prediction accuracy is effectively improved. It can be seen that compared with simple machine learning models, deep learning models can more effectively process large-scale and high-dimensional data through their complex network structure, thereby improving the model's expression ability and prediction accuracy.The introduction of parameter optimization and attention mechanisms further optimizes the performance of these models. Parameter optimization makes the model more adaptable to specific data characteristics through refined configuration and hyperparameter optimization. At the same time, the attention mechanism enhances the model's ability to capture key features by prioritizing more informative parts of the data, which not only improves the accuracy of the prediction, but also enhances the applicability and efficiency of the model in various application scenarios. However, in the field of groundwater level prediction, the overall exploration of this aspect is not deep enough, and further research is needed to fully understand and utilize the potential of these technologies. Summary of the invention

[0008] In order to solve the above technical problems, the present invention provides a karst groundwater level prediction method based on the PSA-CNN-LSTM-Attention deep learning algorithm. The method couples two deep learning models of CNN and LSTM for the first time, and introduces a global average pooling layer (Average Pooling Layer) and an SE attention mechanism (Squeeze-and-ExcitationAttention Mechanism) to construct a groundwater level prediction model, meeting the demand for accurate prediction of the dynamic changes of karst groundwater levels. By combining the powerful spatial feature extraction capability of CNN and the time series data processing advantage of LSTM, this model can effectively capture the complex patterns and long-term dependencies in groundwater level changes. The global average pooling layer will be used to reduce the feature dimension and extract more global information, while the SE channel attention mechanism can make the model pay more attention to the feature channels that have a greater impact on the prediction results. At the same time, the inventor will use the PSA global optimization algorithm to adjust parameters to ensure that the model can achieve optimal performance under different environmental and data conditions, which not only enhances the adaptability of the model to the dynamic changes of groundwater, but also improves its prediction accuracy under complex geological backgrounds.

[0009] The purpose and efficacy of the karst groundwater level prediction method based on the PSA-CNN-LSTM-Attention deep learning algorithm of the present invention are achieved by the following specific technical means:

[0010] A karst groundwater level prediction method based on the PSA-CNN-LSTM-Attention deep learning algorithm, the method steps are: 1. Data and input indicators; 2. Data processing; 3. Model selection and construction: through the comprehensive application of convolutional neural network (CNN), long short-term memory network (LSTM), attention mechanism (Attention) and PID search optimization algorithm (PSA) to process and analyze groundwater level data; 4. Model verification.

[0011] In step 1, the input indicators include rainfall, air pressure, air temperature, air temperature, relative humidity, evaporation, water level of the previous day and ground temperature.

[0012] The second step includes: data cleaning, missing value processing, data set division, data normalization and data format conversion.

[0013] In step 4, the root mean square error (RMSE), mean absolute error (MAE), mean absolute percentage error (MAPE) and coefficient of determination (R 2 ) is used to measure the prediction performance of different runoff prediction models.

[0014] In step 3, the convolutional neural network architecture consists of an input layer, a convolutional layer, a fully connected layer, and an output layer. The convolution operation is expressed as:

[0015]

[0016] Among them, f ij is an element of the output feature map, w mn is the weight in the convolution kernel (filter), x (i+m)(j+n) is the element at the corresponding position in the input data, and k is the size of the filter.

[0017] In step three, the information transfer process in the long short-term memory model is as follows:

[0018] First is the previous output The sigmoid unit in the forget gate will determine which information in the cell state of Ct-1 is forgotten or retained. At this time, a vector between 0 and 1 will be output; 0 means discarding all information in Ct-1, and 1 means retaining all information. See the expression:

[0019]

[0020] Second, the input gate uses the previous output The current input xt determines what information needs to be updated; then, the tanh layer will receive and xt information to obtain candidate cell information It is possible to update the information in to the cell state; see the following expression:

[0021]

[0022] The operation of the forget gate above forgets the old cell information, and the input gate selects and increases the candidate cells. This series of operations will eventually The information is updated to obtain the new cell state C t ; See the following formula:

[0023]

[0024] Finally, the sigmoid unit in the output gate will determine which cell features are output. At this time, the tanh layer will output a vector between -1 and 1. The output vector and the control condition of the output gate jointly determine the output of the LSTM module unit; the following formula:

[0025]

[0026] h t =o t *tanh(C t )

[0027] LSTM controls the deletion and update transmission of information through these special gate switches, and realizes the nonlinear accumulation of historical information through cyclic operations, so it can effectively solve the long-term dependency problem of time series.

[0028] In step 3, the application process of the SE attention mechanism is as follows:

[0029] A: Perform a global average pooling operation on the input feature map to obtain a channel descriptor; the purpose of global average pooling is to capture the global information of each channel; this step can be expressed as

[0030]

[0031] Among them, H and W represent the height and width of the feature map respectively, and x i (h,w) represents the pixel value of the i-th channel at (h,w) on the feature map;

[0032] B: The channel descriptor is input into two fully connected layers and activated with the Sigmoid activation function; the first fully connected layer compresses the dimension of the channel descriptor to 1 / 4 or other proportion of the original number of channels, which can reduce the amount of calculation and the number of parameters; then, the descriptor dimension is restored to the original number of channels through the second fully connected layer; the purpose of these two fully connected layers is to learn a weight for each channel, which can be expressed as:

[0033] w i =F fc2 (σ(F fc1 (c)))

[0034] Among them, F fc 、F fc2 Respectively represent the mapping functions of the first and second fully connected layers, σSigmoid activation function, wi is the weight of the i-th channel;

[0035] C: Multiply the calculated channel weights by the original feature map channel by channel to achieve channel attention. This step can be expressed as:

[0036] y i (h,w)=w i x i (h,w)

[0037] where y i (h,w) is the value of the i-th channel of the feature map at position (h,w) after attention weighting;

[0038] In this way, the SE attention mechanism enables the network to focus on key channels in the input feature map, thereby improving network performance. The SE attention mechanism can be easily integrated with various convolutional neural network structures because it only relies on channel descriptors and has relatively small computational and parameter overhead.

[0039] In step 3, in the PID search optimization algorithm (PSA), a regulation factor called zero output is added to the original Δu(t) to prevent the algorithm from falling into a local optimum:

[0040]

[0041] Among them, r5 is a random number vector with n rows and d columns, ranging from 0 to 1; λ is an adjustment coefficient, calculated as follows:

[0042]

[0043] The present invention has at least the following beneficial effects:

[0044] The present invention constructs a high-precision groundwater level prediction model by coupling convolutional neural network (CNN) and long short-term memory network (LSTM) technology, and integrating global average pooling layer and SE attention mechanism, which is particularly suitable for predicting the dynamic change of groundwater level in karst areas. In addition, the PSA global optimization algorithm is used to adjust the model parameters to ensure that the model can perform optimally under different environments and data conditions, which not only enhances the adaptability of the model, but also improves its prediction accuracy under complex geological backgrounds. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] Figure 1 It is a schematic diagram of the basic framework of the model construction of the present invention;

[0046] Figure 2 1 is a diagram showing the locations and coordinates of five typical boreholes in an embodiment of the present invention;

[0047] Figure 3It is a CNN network structure diagram of the present invention;

[0048] Figure 4 It is a conceptual diagram of the LSTM model of the present invention;

[0049] Figure 5 1 is the RNN structure diagram (a) and the LSTM structure diagram (b) of the present invention;

[0050] Figure 6 It is a structural diagram of the self-attention mechanism of the present invention;

[0051] Figure 7 It is a daily rainfall time series diagram of the present invention;

[0052] Figure 8 It is a monthly cumulative rainfall time series diagram of the present invention;

[0053] Fig. 9 It is the monthly cumulative rainfall seasonal analysis diagram of the present invention;

[0054] Fig.10 It is a daily time series barometric chart of the present invention;

[0055] Fig.11 It is a time series diagram of monthly average air pressure of the present invention;

[0056] Fig.12 It is the monthly average air pressure seasonal analysis diagram of the present invention;

[0057] Fig.13 It is a daily temperature time series diagram of the present invention;

[0058] Fig.14 It is a time series diagram of monthly average temperature of the present invention;

[0059] Fig.15 It is the monthly average temperature seasonal analysis diagram of the present invention;

[0060] Fig.16 is a daily relative humidity graph of the present invention;

[0061] Fig.17 It is a time series diagram of monthly average relative humidity of the present invention;

[0062] Fig.18 It is the monthly average relative humidity seasonal analysis diagram of the present invention;

[0063] Fig.19 It is a daily evaporation time series diagram of the present invention;

[0064] Fig. 20 It is the monthly cumulative evaporation time series diagram of the present invention;

[0065] Fig.21It is the seasonal analysis diagram of monthly cumulative evaporation of the present invention;

[0066] Fig. 22 It is a daily ground temperature time series diagram of the present invention;

[0067] Fig.23 It is a time series diagram of monthly average ground temperature of the present invention;

[0068] Fig.24 It is the monthly average ground temperature seasonal analysis diagram of the present invention;

[0069] Fig.25 It is a ZK1 groundwater level time series diagram of the present invention;

[0070] Fig.26 It is the ZK1 groundwater level data distribution map of the present invention;

[0071] Fig. 27 It is the seasonal analysis diagram of groundwater level ZK1 of the present invention;

[0072] Fig.28 It is a ZK1 fitness change curve diagram of the present invention;

[0073] Fig.29 It is a comparison chart and effect chart of the prediction results of the ZK1 training set of the present invention;

[0074] Fig.30 It is a time series comparison diagram and effect diagram of the prediction results of the ZK1 test set of the present invention;

[0075] Fig.31 is the ZK1 error histogram of the present invention;

[0076] Fig.32 It is the ZK1 all sample fitting prediction graph of the present invention;

[0077] Fig.33 It is the linear regression fitting diagram of ZK1 of the present invention;

[0078] Fig.34 is the ZK2 groundwater level time series of the present invention;

[0079] Fig.35 It is the ZK2 groundwater level data distribution map of the present invention;

[0080] Fig.36 It is the seasonal analysis of groundwater level of ZK2 of the present invention;

[0081] Fig.37 is the ZK2 fitness change curve of the present invention;

[0082] Fig.38 It is a comparison chart and effect chart of the prediction results of the ZK2 training set of the present invention;

[0083] Fig.39 It is the ZK2 test set prediction result time series and effect diagram of the present invention;

[0084] Fig.40 is the ZK2 error map of the present invention;

[0085] Fig.41 It is the ZK2 all sample fitting prediction graph of the present invention;

[0086] Fig.42 It is the ZK2 linear regression fitting diagram of the present invention;

[0087] Fig.43 It is a ZK3 groundwater level time series diagram of the present invention;

[0088] Fig.44 It is the ZK3 groundwater level data distribution map of the present invention;

[0089] Fig.45 It is the ZK3 groundwater level seasonal analysis of the present invention;

[0090] Fig.46 is the ZK3 fitness change curve of the present invention;

[0091] Fig.47 It is a comparison chart and effect chart of the prediction results of the ZK3 training set of the present invention;

[0092] Fig.48 It is a time series comparison chart and effect chart of the prediction results of the ZK3 test set of the present invention;

[0093] Fig.49 is the ZK3 error map of the present invention;

[0094] Fig.50 It is the ZK3 all sample fitting prediction graph of the present invention;

[0095] Fig.51 It is the ZK3 linear regression fitting diagram of the present invention;

[0096] Fig.52 It is a ZK8 groundwater level time series diagram of the present invention;

[0097] Fig.53 It is the ZK8 groundwater level data distribution map of the present invention;

[0098] Fig.54 It is the ZK8 groundwater level seasonal analysis of the present invention;

[0099] Fig.55 is the ZK8 fitness change curve of the present invention;

[0100] Fig.56 It is a comparison chart and effect chart of the prediction results of the ZK8 training set of the present invention;

[0101] Fig.57 It is a time series comparison chart of the prediction results of the ZK8 test set of the present invention;

[0102] Fig.58 is the ZK8 error map of the present invention;

[0103] Fig.59 It is the ZK8 all sample fitting prediction graph of the present invention;

[0104] Fig.60 It is the linear regression graph of ZK8 of the present invention;

[0105] Fig.61 It is a ZK10 groundwater level time series diagram of the present invention;

[0106] Fig.62 It is the ZK10 groundwater level data distribution map of the present invention;

[0107] Fig.63 It is the ZK10 groundwater level seasonal analysis of the present invention;

[0108] Fig.64 is the ZK10 fitness change curve of the present invention;

[0109] Fig.65 It is a comparison chart of the prediction results of the ZK10 training set of the present invention;

[0110] Fig.66 It is a time series diagram and effect diagram of the prediction results of the ZK10 test set of the present invention;

[0111] Fig.67 is the ZK10 error histogram of the present invention;

[0112] Fig.68 It is the ZK10 all sample fitting prediction graph of the present invention;

[0113] Fig.69 It is the linear regression fitting diagram of ZK10 of the present invention;

[0114] Fig.70 It is the future water level prediction result of the present invention. DETAILED DESCRIPTION

[0115] The following examples are used to further describe the embodiments of the present invention. The following examples are used to illustrate the present invention, but are not intended to limit the scope of the present invention.

[0116] In the description of the present invention, unless otherwise specified, "multiple" means two or more; the terms "coaxial", "bottom", "one end", "top", "middle", "other end", "upper", "one side", "top", "inside", "front", "center", "two ends", etc. indicate the orientation or position relationship based on the orientation or position relationship shown in the drawings, which is only for the convenience of describing the present invention and simplifying the description, and does not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operate in a specific orientation, and therefore cannot be understood as limiting the present invention. In addition, the terms "first", "second", "third", etc. are used for descriptive purposes only and cannot be understood as indicating or implying relative importance.

[0117] In the description of the present invention, it should be noted that, unless otherwise clearly stipulated and limited, terms such as "installation", "setting", "connection", "fixation", "rotation", "inner diameter", "outer diameter" and the like should be understood in a broad sense. For example, it can be a fixed connection, a detachable connection, or an integral one; it can be a mechanical connection or an electrical connection; it can be directly connected or indirectly connected through an intermediate medium; it can be the internal connection of two elements or the interaction relationship between two elements; it can be a smaller diameter or an enlarged diameter; unless otherwise clearly defined, for ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to the specific circumstances.

[0118] Example:

[0119] 1. Overview of the implementation area:

[0120] Guiyang is located in the central part of Guizhou Province and is the political, economic, cultural and transportation center of the province. Its geographical coordinates are 106°07′-107°13′ east longitude and 26°12′-27°22′ north latitude, and its land area is 8,034 square kilometers. Guiyang is located on the Yunnan-Guizhou Plateau at low latitude and high altitude. It has a subtropical humid and mild climate and is affected by the westerly belt. The average annual temperature in the region is 15.3℃, and the extreme temperature range is -9.5℃ to 39.5℃. The average annual sunshine hours are 1,148.3 hours, and the number of snowy days is small, averaging 11.3 days. The average annual rainfall is 1,136.96mm, and 60% of the rainfall is concentrated from May to August. The evaporation in Guiyang is highest in summer and lowest in winter, and the annual evaporation varies between 788.7mm and 1,379.5mm.

[0121] Guiyang City is bounded by the Dangwu-Tongmuling line in Huaxi District. The south belongs to the Pearl River system and the north belongs to the Yangtze River system. The natural runoff depth of the city is 545-640mm, and the total water resources are 4.679 billion cubic meters, accounting for 3.9% of the total water resources in the province. The terrain in Guiyang City is high in the southwest and low in the northeast. The highest peak is Pagoda Mountain in Qingzhen City, with an altitude of 1,762 meters. The lowest point is Xiaohekou, where Wujiang River exits in the northeast of Kaiyang County, with an altitude of 506 meters. The maximum height difference is 1,264 meters. The central part is a gentle slope zone, with a multi-level terrace composed of the Guiyang-Zhongcaosi syncline basin and Baiyun-Huaxi Qingyan. The flat dams include Huaxi, Mengguan, Wudang, Jinhua and Zhuchang. The main river, Nanming River, runs through the urban area from southwest to northeast, and its basin area accounts for 70% of the total urban area.

[0122] Carbonate rocks are widely distributed in Guiyang, and karst is strongly developed. Karst landforms account for more than 86% of the total area. According to the rock construction type and the geological stress that shapes the landform, Guiyang's landforms are divided into five major genetic types: karst landforms, karst-erosion landforms, karst-tectonic landforms, denudation-erosion landforms, and denudation-tectonic landforms. Among them, the karst landform type is dominant. Guiyang's land use is mainly cultivated land and forest land, with a forest coverage rate of 53%. It is rich in mineral resources. In 2019, the total surface water resources were 3.358 billion cubic meters, and the total water supply and total water consumption were both 1.046 billion cubic meters, of which industrial water accounted for 43.2%.

[0123] Guiyang City spans two stratigraphic areas, Qianzhong and Youjiang, and is controlled by the northeast-trending Wudang Fault Zone. To the north of the Wudang Fault is the Qianzhong stratigraphic subdistrict, where Neoproterozoic to Mesozoic strata are mainly developed; to the south is the Youjiang stratigraphic subdistrict, where strata are relatively complete, with Jurassic to Devonian strata mainly exposed. Carbonate rocks such as limestone and dolomite are widely distributed in the area, accounting for about 85%. These rocks are easily dissolved, forming cracks and caves, resulting in strong groundwater mobility. The stratigraphic lithology mainly includes metamorphic sandstone, dolomite, limestone, sandstone and mudstone, and tuffaceous slate. The Quaternary loose sand, mud and gravel are accumulated in low-lying landforms and along rivers.

[0124] Guiyang is located in the composite zone of the uplift area in northern Guizhou and the depression area in southern Guizhou. Due to various tectonic actions, it presents complex structural features with dense folds and crisscrossing faults. The main structure is mainly northeast-oriented, and the secondary structures are mostly obliquely connected and reconnected with it. Since the Tertiary System, a large area of ​​the region has intermittently uplifted, accompanied by folds, fault activities and structural folds, forming multiple active faults. In addition, Guiyang is widely distributed with multi-level denudation surfaces and multi-level river valley terraces, which are the products of staged and oscillatory uplift of neotectonic movements, reflecting the multiple pauses and rises during the uplift of the Qianzhong Mountain Plateau.

[0125] Carbonate rocks are widely distributed in the study area, accounting for 85% of the total area of ​​the work area. The large-scale exposure of soluble rocks and the dissolution of groundwater have created a diversity of karst individual forms in the area, with common ones being sinkholes, caves, underground rivers, karst pools, and rock erosion funnels. According to the lithology and water-bearing medium type of groundwater in the area, groundwater can be divided into three categories: carbonate karst water, bedrock fissure water, and loose rock pore water, among which carbonate karst water is further subdivided into carbonate karst cave-fissure water, carbonate rock fissure-karst water, and carbonate karst cave-pipeline water.

[0126] 2. Method introduction

[0127] 1. Data and input indicators

[0128] The groundwater level data includes the daily groundwater level data of five typical boreholes (ZK1, ZK2, ZK3, ZK8 and ZK10) from January 1, 2018 to June 30, 2023. The input indicators include rainfall, air pressure, air temperature, relative humidity, evaporation, water level of the previous day and ground temperature. The inventors selected five typical boreholes for comparative analysis (see attached). Figure 2 The meteorological data comes from the Guiyang Meteorological Bureau. The following is an explanation of how these indicators affect the groundwater level.

[0129] (1) Impact of rainfall on groundwater level

[0130] In karst areas, precipitation has a greater impact on groundwater levels, mainly due to the particularity of karst geological structures. Due to dissolution, karst areas have formed numerous fissures, caves and underground river systems. These geological structures greatly enhance the ability of surface water to quickly convert into groundwater. When rainfall occurs, rainwater not only infiltrates through the soil layer, but also quickly enters the groundwater system through the unique fissures and caves in karst areas, which causes the groundwater level to rise rapidly in a short period of time after the rain. In addition, the precipitation infiltration rate in karst areas is usually higher than that in non-karst areas. This is because the large amount of open space formed by karst action allows more water to pass quickly, reducing surface runoff and increasing the recharge of groundwater. This phenomenon is particularly obvious during continuous rainfall periods, and the groundwater level may fluctuate violently as a result. Compared with other geological areas, the groundwater system in karst areas responds more sensitively and quickly to rainfall. Considering this rapid response characteristic, this study selected rainfall as an important indicator affecting groundwater level prediction.

[0131] (2) Impact of air pressure on groundwater level

[0132] Air pressure is another important factor that affects groundwater level changes. Air pressure changes indirectly affect the recharge and discharge process of groundwater by changing the surface pressure. Specifically, when atmospheric pressure increases, the surface pressure increases accordingly, which exerts additional pressure on the groundwater body, making it more difficult for groundwater to penetrate from the surface into the underground, resulting in a drop in groundwater levels. Conversely, when atmospheric pressure decreases, the surface pressure decreases accordingly, and groundwater is more easily released from the pores of soil and rocks, promoting the upward penetration of groundwater, resulting in a rise in groundwater levels. In addition, changes in air pressure also affect the solubility of dissolved gases in groundwater, such as oxygen and carbon dioxide. Such changes in dissolved gases can affect the chemical properties and flow characteristics of groundwater, further affecting changes in groundwater levels. Although this effect is relatively small, a correlation between changes in air pressure and changes in groundwater levels can still be observed in long-term observations.

[0133] (3) Impact of temperature on groundwater level

[0134] Changes in temperature have direct and indirect effects on groundwater levels. First, rising temperatures accelerate the evaporation of surface water and transpiration of plants, reducing the recharge of surface water to groundwater. Especially in arid and semi-arid regions, high temperatures may cause groundwater levels to drop, thereby increasing pressure on groundwater resources. For example, in the summer months with higher temperatures, groundwater levels usually show a downward trend, while in winter they are relatively stable or rebound. Second, seasonal fluctuations in temperature also affect the chemical composition and biological activity of groundwater. Rising temperatures can increase the solubility of certain dissolved substances in groundwater and change water quality. At the same time, warm climate conditions are conducive to the activity of microorganisms, which may accelerate the decomposition process of organic matter in groundwater and affect water quality safety. In addition, long-term trends in temperature, such as global warming, pose challenges to the sustainable management of groundwater resources. As temperatures continue to rise, some regions may face more frequent drought events, which will further reduce the natural recharge of groundwater and aggravate the problem of water shortage. Therefore, understanding the impact of temperature changes on groundwater levels is key to developing effective groundwater management strategies and adapting to climate change.

[0135] (4) Effect of relative humidity on groundwater level

[0136] Relative humidity is an important indicator to describe the humidity status of air, and it also has a significant impact on the change of groundwater level. When the relative humidity is high, the water vapor content in the air increases, which reduces the evaporation rate of ground water. Due to the reduction of evaporation, more surface water is retained on the surface or infiltrates into the ground, which helps to recharge groundwater and lead to the rise of groundwater level. On the contrary, when the relative humidity is low, the air is dry, the evaporation is enhanced, the surface water evaporates rapidly, and the water recharge to the groundwater system is reduced, which may lead to the decline of groundwater level. In the drought or dry climate season, the low value of relative humidity is an important factor in the decrease of groundwater level. In addition, the change of relative humidity may also affect the water retention capacity of soil and the transpiration of vegetation. These biogeochemical processes indirectly affect the recharge of groundwater and the dynamics of groundwater level. Therefore, relative humidity not only directly affects the groundwater level by controlling the evaporation rate, but also indirectly affects the groundwater system by affecting the water cycle process in the ecosystem.

[0137] (5) Impact of evaporation on groundwater level

[0138] Evaporation is a key process in the water cycle that directly affects the depletion of surface water and soil moisture. In groundwater systems, evaporation regulates groundwater levels primarily by affecting the availability of surface water. When evaporation rates are high, a large amount of water is converted from the surface and soil into water vapor, which reduces the amount of water that can infiltrate the ground, leading to a drop in groundwater levels. Under hot and dry conditions, evaporation intensifies, and the moisture in surface water and near-surface layers decreases rapidly, slowing down the natural recharge process of groundwater. This not only affects groundwater levels, but may also change the direction and speed of groundwater flow, affecting the long-term sustainability of groundwater resources. On the other hand, the evaporation process is relatively weakened under humid conditions, allowing more water to remain on the surface or infiltrate into groundwater layers. This is particularly evident in rainy seasons, when reduced evaporation rates help to restore and raise groundwater levels. Therefore, evaporation, as a dynamically changing meteorological factor, is crucial for monitoring and managing groundwater levels. By accurately measuring and analyzing evaporation data, we can better understand the trends and driving forces of groundwater level changes and provide key information for water resource management.

[0139] (6) Impact of ground temperature on groundwater level

[0140] Ground temperature is another important factor affecting groundwater level changes. High ground temperature usually increases the evaporation rate of soil and surface water, resulting in a decrease in groundwater recharge. The increase in temperature causes water to be converted from the surface layer into water vapor more quickly, thereby reducing the effective amount of water that infiltrates into the ground, leading to a drop in groundwater levels. In addition, the increase in ground temperature will also accelerate the evaporation of surface water bodies (such as lakes, rivers, and wetlands), further reducing the indirect source of groundwater recharge. In the context of climate warming, the frequent occurrence of high temperature events may have a long-term negative impact on groundwater systems, especially in areas where water resources are already scarce. Ground temperature not only affects the evaporation rate, but may also affect the physical properties and biological activity of the soil, which will indirectly affect groundwater recharge. For example, soil may crack under high temperature, which may increase the infiltration capacity in the short term, but may reduce the overall water retention capacity of the soil in the long term. Therefore, monitoring and analyzing ground temperature is crucial to understanding and predicting groundwater level changes, especially in the context of global climate change and regional climate fluctuations. Changes in ground temperature have a direct impact on the formulation and adjustment of groundwater resource management strategies.

[0141] (7) The water level of the previous day is used as a key input indicator

[0142] When studying the change of groundwater level, the water level data of the previous day plays a vital role as a key input indicator. This indicator directly reflects the immediate state of the groundwater system and the trend of change in the short term, providing a basis for predicting future groundwater levels. The daily fluctuation of groundwater level is affected by many factors, including rainfall, evaporation, surface water flow and human extraction. By analyzing the groundwater level data of several consecutive days, the pattern and speed of groundwater response to external changes can be identified. For example, after a heavy rain, the groundwater level may rise rapidly, while continuous dry weather may cause the water level to gradually decrease. The water level data of the previous day provides a direct comparison benchmark for this analysis, helping researchers understand the dynamics of groundwater level changes and its sensitivity to external changes. In addition, the water level data of the previous day is also indispensable in the establishment of groundwater dynamic models. By inputting the water level of the previous day, the model can simulate and predict the response of groundwater more accurately. Considering the inertial characteristics of the groundwater system, this method can improve the accuracy and reliability of the prediction. In actual groundwater management and scheduling, understanding the water level of the previous day can also help to formulate more reasonable and timely water resource allocation strategies, especially when water resources are scarce or the risk of floods is high.

[0143] 2. Data Processing

[0144] Before establishing and training the groundwater level prediction model, it is crucial to ensure the quality and applicability of the data. Data processing includes the following five key steps:

[0145] (1) Data cleaning

[0146] To ensure the accuracy of data analysis, the inventors conducted detailed manual cleaning of the daily groundwater level data collected at each monitoring site from 2019 to 2023. This includes removing data fields that are not relevant to the research objectives to ensure that the analysis focuses on variables that are important for understanding groundwater dynamics; deleting duplicate records in the data set to ensure the validity of the data analysis results; and identifying and processing outliers to help improve the overall quality and reliability of the data set.

[0147] (2) Missing value processing

[0148] For the treatment of missing values, the inventors took a comprehensive approach to ensure data integrity. First, the inventors calculated the average values ​​of the same day in multiple years of data. Then, these average values ​​were floated up and down as a whole (rounded), and then the inventors compared the results of this method with the traditional linear interpolation method. The linear interpolation method estimates the intermediate missing data by connecting two known values ​​with a straight line. The inventors compared the correlation coefficient (Pearson correlation coefficient) of the data after filling the missing values ​​with these two methods, and selected the filling method with the largest correlation coefficient to fill the missing values. This strategy not only improves the consistency of the data, but also maintains the natural fluctuation characteristics of the data in the time series, thereby more accurately reflecting the actual situation.

[0149] (3) Dividing the Dataset

[0150] The window method processes time series data to generate a new data set. In this process, according to the set time step (for example, the past 30 days), each sample contains the historical groundwater level data during this period and the groundwater level of the next day as the prediction target. The entire data set will be divided into a training set and a test set in a ratio of 8:2, of which 80% of the data is used for model training and 20% of the data is used to test the prediction performance of the model.

[0151] (4) Data normalization

[0152] To improve the efficiency and effectiveness of model training, the data will be normalized so that all numerical features are scaled between 0 and 1. This process not only helps to accelerate the convergence of the model, but also prevents some features from having too much impact on model training due to their large numerical range. This paper uses linear normalization (Min-Max Scaling) to normalize the data. The specific formula is:

[0153]

[0154] Among them, x norm is the data after standardization, x is the original data before standardization, and x min and xmax are the minimum and maximum values ​​in the data respectively.

[0155] After the model prediction is completed, the following formula can be used for denormalization:

[0156] x=x norm (x max -x min )+x min (2)

[0157] (5) Data format conversion

[0158] Finally, the data is converted into a format that the model can accept. This includes flattening the data, that is, converting multidimensional data into a one-dimensional array so that the model can process it. This conversion helps the model capture and learn patterns and features in the data more effectively, improving the accuracy of predictions and the performance of the model.

[0159] 3. Model Selection and Construction

[0160] This model structure is designed to accurately analyze and predict groundwater level changes. It processes and analyzes a large amount of groundwater level data by comprehensively applying convolutional neural networks (CNN), long short-term memory networks (LSTM), attention mechanisms (Attention), and PID search optimization algorithms (PSA). This model (PSA-CNN-LSTM-Attention) has the following three advantages:

[0161] First, the model structure forms an efficient sequence data processing architecture by combining CNN and LSTM, which shows significant advantages when processing groundwater level data with complex temporal attributes. Specifically, the CNN part effectively processes the input data through its convolutional layer, and can extract key local features while maintaining the spatial structure of the data. These local features include fluctuations in data in the short term, mutation points, and other important temporal local patterns, which are the basis for understanding the overall behavior of the data. Further, these features extracted by CNN are passed to the LSTM network. LSTM is designed to process sequence data, and its gating mechanism enables it to capture long-term dependencies in time series. This means that in addition to understanding the data features at a single time point, LSTM is able to learn the evolution of these features over time and capture long-term trends and periodic patterns that may affect future groundwater level changes. Through this combination of CNN and LSTM, the model is not only able to parse the complex spatial features in groundwater data, but also understand how these features evolve over time and affect the overall dynamics of the groundwater system.

[0162] Second, by introducing the global average pooling layer and SE channel attention mechanism after CNN processing, the expressiveness of the model has been significantly improved. The global average pooling layer first compresses the global spatial information of the feature map of each channel, thereby highlighting the global average response of each channel, providing a basis for the subsequent attention mechanism. Subsequently, the SE attention module realizes adaptive calibration of channel responses by learning the feature importance of different channels. This mechanism not only enhances the sensitivity of the model to key features, but also enables it to focus more on the features that are most critical to the prediction target, thereby significantly improving the model's ability to capture key information in complex groundwater level data. In this way, the SE attention mechanism not only optimizes the expression of features, but also retains the richness and diversity of sequence features, so that the model can show higher accuracy and robustness when dealing with groundwater level prediction involving complex interactions and variable factors. The application of this strategy greatly improves the effect of the model in practical applications, enabling it to accurately identify and respond to the most influential change factors when predicting groundwater levels.

[0163] Third, as attached Figure 1 As shown in the figure, in the optimization process of this model, the inventor introduced the latest PSA optimization algorithm, namely the PID-based Search Algorithm (PSA), to automatically adjust and optimize hyperparameters. This algorithm is inspired by the traditional incremental PID control algorithm. It realizes continuous optimization of algorithm parameters by dynamically adjusting the system deviation, so that the population in the entire algorithm search process can effectively converge to the optimal state. The effectiveness of the PSA algorithm has been verified in the top SCI journal "Expert Systems With Applications" published in December 2023 in the first zone of the Chinese Academy of Sciences. The original author used the CEC2017 benchmark test function and six constrained optimization problems as test objects, and deeply analyzed the performance of PSA by comparing with seven advanced meta-heuristic algorithms proposed in recent years. The experimental results show that the PSA algorithm achieves optimal performance on most test functions, showing its excellent ability in dealing with complex optimization problems. In the inventor's model, the application of the PSA algorithm not only improves the overall performance of the model, but also greatly improves the efficiency and accuracy of parameter tuning. This automated hyperparameter optimization method greatly reduces model debugging time and improves the flexibility and adaptability of the model in practical applications.

[0164] The following is a detailed explanation of the various components of the model and their functions:

[0165] Input layer: The first layer of the model, whose main function is to receive and initialize input data. In this model, the input data includes historical records of groundwater levels, meteorological conditions (such as temperature, humidity, precipitation), etc. These data are appropriately preprocessed (such as normalization) to ensure the uniformity and applicability of the model input.

[0166] Sequence folding layer: In order to enable traditional convolutional neural networks (CNNs) to effectively process time series data, this layer folds the input time series data into shorter sequences. This process maintains the continuity of the time dimension, allowing subsequent convolution operations to capture local patterns of the time series.

[0167] Convolutional layer: By applying multiple convolutional filters, this layer extracts local features of the input data, such as short-term data fluctuations and outliers. The convolution operation slides a window over the input data to extract features at different locations, providing the model with rich spatial feature information.

[0168] Activation layer: ReLU activation function is usually used to introduce nonlinear processing, which helps solve complex pattern recognition problems. This activation function is often used after the convolution layer to increase the nonlinear ability of the model and help the network capture more complex data features.

[0169] Global average pooling layer: This layer performs global average pooling on each convolutional feature map. Its purpose is to reduce the spatial dimension of each feature map and compress the multi-dimensional data into a scalar while retaining key information.

[0170] Fully connected layer: This layer is used to deeply fuse the output of the previous layer. It processes features through a fully connected neural network structure, providing the model with the ability to perform more complex tasks.

[0171] Sigmoid activation layer: In classification tasks, the Sigmoid activation function is used to map the output of the fully connected layer to the (0,1) interval and is often used for the final decision output. In this model, it helps to smooth the results and is suitable for continuous outputs such as prediction probabilities.

[0172] Point product attention layer (SE attention mechanism): Through the SE attention mechanism, the model can focus more on those features that are more critical to predicting groundwater level changes, enhancing the model's ability to express important information in the data.

[0173] Sequence expansion layer: The main function of this layer is to expand the feature sequence processed by the attention mechanism to restore its original time series format, ensure the integrity of the data is not destroyed, and prepare for the next recurrent neural network layer.

[0174] Network flattening layer: Before the features enter the recurrent network, the flattening layer organizes all features into a continuous vector, which helps the GRU layer process sequence data more efficiently.

[0175] GRU layer: The gated recurrent unit (GRU) layer is used to capture long-term dependencies in the data. Compared with traditional recurrent neural networks, GRU is more effective in processing long sequence data and can avoid the gradient vanishing problem.

[0176] Regression layer: This is the output layer of the model, which usually uses a linear activation function to directly output the predicted groundwater level value. This layer simply converts the output of the GRU layer into the final prediction result, enabling the model to predict the continuous change of the groundwater level.

[0177] 3.1 Convolutional Neural Network (CNN)

[0178] Convolutional Neural Networks (CNN) is a deep learning model. Figure 3 As shown in the figure, the concept can be traced back to the 1980s, and its theoretical basis comes from the visual cortex in biology. It attempts to simulate the working principle of the human visual system and extracts features through operations such as convolution and pooling. The convolution operation can capture local features and retain spatial information, while the pooling operation reduces the dimension of the features and reduces the computational complexity. CNN mainly enhances the prediction ability of the model by extracting local features of the input sequence. For time series data, when CNN is used for processing, the sequence data can be converted into two-dimensional image data, and the convolution operation in CNN can be used to extract local features of the sequence. At the same time, CNN can also capture deep features in the input sequence through multi-layer convolution and pooling operations, thereby improving the accuracy and robustness of the model. In recent years, more and more papers and practices have shown that CNN has achieved good performance in time series prediction and has been widely used and studied in the field of time series prediction.

[0179] The architecture of the CNN network mainly consists of an input layer, a convolutional layer, a fully connected layer, and an output layer.

[0180] The functions of each layer in the convolutional neural network are as follows:

[0181] (1) Convolutional Layer:

[0182] The input data first passes through one or more convolutional layers. The convolutional layer uses filters (convolution kernels) to slide and convolve on the input data to extract local features. Each convolutional layer can capture different levels of abstract features. The convolution operation is expressed as:

[0183]

[0184] Among them, f ij is an element of the output feature map, w mn is the weight in the convolution kernel (filter), x (i+m)(j+n) is the element at the corresponding position in the input data, and k is the size of the filter.

[0185] (2) Activation Function:

[0186] The output of the convolutional layer goes through an activation function (such as ReLU, tanh, etc.) to introduce nonlinear characteristics. This helps the model learn complex data patterns. The activation function is usually expressed as:

[0187] y i =g(f i ) (4)

[0188] Among them, y i is the output of the activation function, f i is the output of the convolutional layer, and g(*) is the activation function. The ReLU activation function is defined as follows:

[0189] g(f i )=max(0,f i ) (5)

[0190] (3) Pooling Layer

[0191] After the convolutional layer, one or more pooling layers are usually added. The pooling layer can be a maximum pooling (MaxPooling) or an average pooling (Average Pooling), which aims to reduce the spatial dimension of the data, reduce the amount of computation, and prevent overfitting. The maximum pooling operation is expressed as:

[0192]

[0193] Among them, yij is the output of the pooling layer, x(i+m)(j+n) is the element at the corresponding position in the input data, and p is the size of the pooling window.

[0194] (4) Integrate multiple features:

[0195] After the convolutional neural network part is completed, the features of the multivariate time series data are integrated. The outputs of different features are concatenated in the time dimension to form a comprehensive feature matrix. This matrix has the shape (batch_size, time_steps, num_features), where num_features is the number of integrated features.

[0196] 3.2 Long Short-Term Memory Model (LSTM)

[0197] Long short-term memory network (LSTM) is a special type of recurrent neural network (RNN). Figure 4 As shown in the figure, it was developed by Hochreiter and Schmidhuber in 1997 to address the shortcomings of traditional RNN. Research on RNN began in the 1980s, and in the early 21st century, RNN developed into one of the deep learning algorithms. Figure 3 As shown in the figure, RNN has a chain structure of repeated modules. This chain structure can help RNN "remember" previous information, and this information will affect the output of subsequent nodes, which is conducive to processing arbitrary sequence signal data. Therefore, RNN can successfully learn the nonlinear characteristics of sequence signals.

[0198] LSTM has three types of gate units and memory cells: forget gate, input gate and output gate. The model network diagram is shown in the attached figure. Figure 4 The LSTM model also has a chain structure similar to that of the RNN, but its internal repetitive modules are different from those of the RNN model because the LSTM has four repetitive units, not a single tanh layer, and different units interact with each other in a very special way. Figure 5 (b) shows the schematic diagram of the internal storage block of LSTM, which includes input gate, forget gate, output gate and a CEC unit. LSTM effectively preserves long-term memory through these special gated switches and updates of cell states. Therefore, LSTM has been proven to be easier to learn long-term dependencies than RNN because information can easily flow along the cell without changing.

[0199] The information transmission process in LSTM is as follows:

[0200] First is the previous output The sigmoid unit in the forget gate will determine which information in the cell state of Ct-1 is forgotten or retained. At this time, a vector between 0 and 1 will be output. 0 means discarding all information in Ct-1, and 1 means retaining all information. See expression (7).

[0201]

[0202] Second, the input gate uses the previous output The current input xt determines what information needs to be updated. Then, the tanh layer will receive and xt information to obtain candidate cell information It is possible to update the information in to the cell state. See expressions (8) and (9).

[0203]

[0204] The operation of the forget gate above forgets the old cell information, and the input gate selects and increases the candidate cells. This series of operations will eventually The information is updated to obtain the new cell state C t See formula (10).

[0205]

[0206] Finally, the sigmoid unit in the output gate will determine which cell features to output. At this time, the tanh layer will output a vector between -1 and 1. The output vector and the control condition of the output gate jointly determine the output of the LSTM module unit, as shown in equations (11) and (12).

[0207]

[0208] h t =o t *tanh(C t )(12)

[0209] LSTM controls the deletion and update transmission of information through these special gate switches, and realizes the nonlinear accumulation of historical information through cyclic operations, so it can effectively solve the long-term dependency problem of time series.

[0210] 3.3 Attention

[0211] The attention mechanism first appeared in the field of natural language processing (NLP). Figure 6 As shown in Figure 2, it is used to solve the sequence-to-sequence (Seq2Seq) problem. In this type of problem, the encoder encodes the input sequence into a fixed-length vector, and the decoder decodes this vector into an output sequence. However, when the input sequence is long, using only a fixed-length vector may not be able to represent all the information well. To solve this problem, the attention mechanism dynamically assigns weights to each element in the input sequence, thereby focusing on the important parts of the input sequence during the decoding phase. This concept was later extended to various applications such as computer vision, speech recognition, etc. The core idea of ​​the attention mechanism is that when processing the input sequence, the model can selectively focus on different parts of the input sequence, thereby better capturing the long-term dependencies in the sequence. This concept is inspired by the attention phenomenon in biology, that is, when processing information, organisms can selectively focus on certain features of the external environment in order to better learn and make decisions.

[0212] The SE (Squeeze-and-Excitation) attention mechanism is an innovative channel attention method specifically designed to enhance the feature expression ability of convolutional neural networks (CNNs). The SE attention mechanism was first proposed in the 2017 paper "Squeeze-and-Excitation Networks" (Hu et al., 2018). The mechanism significantly improves the network's ability to identify and respond to important features by dynamically adjusting the weights of the features of each channel, thereby improving the overall model performance. The mechanism consists of two main operations: Squeeze and Excitation. The Squeeze step is a global average pooling process that aims to compress the feature map of each channel into a single real number. This process is achieved by calculating the average of all spatial locations in the feature map to obtain a channel descriptor with global information. This compression method summarizes the spatial information of the entire feature map and simplifies it into channel-level global features, providing a clear signal for the next step. The subsequent excitation step uses these channel descriptors to learn the importance weights of each channel. This step involves a series of fully connected layers (usually including a compression layer to reduce the number of parameters and complexity, and an expansion layer to restore the dimension), which output the weights of each channel by using the sigmoid activation function. Ultimately, these learned weights are used to scale the original feature map, that is, dynamically adjust the response of the channel by multiplying it with the weight of each channel. The elegance of the SE attention mechanism lies in its simplicity and effectiveness. By focusing on channel-level feature recalibration, it can be easily integrated into any standard CNN architecture without introducing too much computational burden. Practical applications have shown that the addition of the SE module can significantly improve the accuracy of the network in multiple visual recognition tasks, especially in fine-grained image recognition and image classification tasks. In addition, this attention mechanism has also been shown to improve the network's robustness to noise and deformation, making the model more suitable for handling various complex visual environments in practical applications.

[0213] The application process of SE attention mechanism is as follows:

[0214] ① Perform a global average pooling operation on the input feature map to obtain a channel descriptor. The purpose of global average pooling is to capture the global information of each channel. This step can be expressed as

[0215]

[0216] Among them, H and W represent the height and width of the feature map respectively, and x i(h,w) represents the pixel value of the i-th channel at (h,w) on the feature map.

[0217] ② Input the channel descriptor into two fully connected layers and activate it with the Sigmoid activation function. The first fully connected layer compresses the dimension of the channel descriptor to 1 / 4 of the original number of channels (or other proportions), which can reduce the amount of calculation and the number of parameters. Then, the descriptor dimension is restored to the original number of channels through the second fully connected layer. The purpose of these two fully connected layers is to learn a weight for each channel, which can be expressed as:

[0218] w i =F fc (σ(F fc1 (c)))(14)

[0219] Among them, F fc1 、F fc They represent the mapping functions of the first and second fully connected layers, σSigmoid activation function, and wi is the weight of the i-th channel.

[0220] ③Multiply the calculated channel weights by the original feature map channel by channel to achieve channel attention. This step can be expressed as:

[0221] y i (h,w)=w i x i (h,w)(15)

[0222] where y i (h,w) is the value of the i-th channel of the feature map at position (h,w) after attention weighting.

[0223] In this way, the SE attention mechanism enables the network to focus on key channels in the input feature map, thereby improving network performance. The SE attention mechanism can be easily integrated with various convolutional neural network structures (such as ResNet, DenseNet, etc.) because it only relies on channel descriptors and has relatively small computational and parameter overhead. In many computer vision tasks, such as image classification, object detection, and semantic segmentation, the SE attention mechanism has been shown to significantly improve network performance.

[0224] 3.4PID Search Algorithm (PSA)

[0225] The PID algorithm is a classic algorithm in the field of control. It aims to effectively correct the deviation of the controlled object and make the system reach a stable state. It is divided into incremental PID control and position PID control. In process control, the PID controller controls the proportion (P), integral (I) and differential (D) of the deviation and is one of the most widely used automatic controllers. PSA is a meta-heuristic algorithm based on incremental PID control newly proposed by Yuansheng Gao. Its core lies in the introduction of a feedback loop that simulates the control system. By continuously adjusting the search direction and step size of the population, it effectively balances the exploration and development process and improves the optimization ability and efficiency of the algorithm.

[0226] In practical problems, the proportional, integral and differential coefficients are adjusted according to different situations and problems. Then, when the number of iterations is t, the output value Δu(t) of PID regulation is:

[0227] Δu(t)=K p ·r2[e k (t)-e k-1 (t)]+K i ·r3·e k (t)+K d ·r4[e k (t)-2e k-1 (t)+e k-2 (t)]

[0228] Among them, r2, r3 and r4 are random number vectors of n rows and 1 column, with values ​​ranging from 0 to 1; Kp, Ki and Kd are the adjustment coefficients of proportion, integration and differentiation, which are set to 1, 0.5 and 1.2 respectively.

[0229] In the traditional PID algorithm, an output regulation value of 0 means that the actual value has reached the value set by the user at a certain moment. However, as time goes by, if the control object is not adjusted, the actual value will soon no longer be equal to the set value. Therefore, in order to prevent this phenomenon from happening, a constant is usually added to the original regulation value. In the early iterations, it may cause the algorithm to fall into a local optimum. Therefore, a regulation factor called zero output is also added to the original Δu(t) to prevent the algorithm from falling into a local optimum:

[0230]

[0231] Among them, r5 is a random number vector with n rows and d columns, ranging from 0 to 1; λ is an adjustment coefficient, calculated as follows:

[0232]

[0233] The main advantages of the PSA algorithm are its strong adaptability and efficient global search performance. By simulating the PID control mechanism, the algorithm can dynamically adjust between exploration (finding new possible areas) and development (refining the search in known good areas) to respond to complex and changing optimization environments. In addition, the PSA algorithm has simple parameter adjustment, is easy to implement and easy to integrate with other optimization techniques, and is suitable for various continuous or discrete optimization problems. PSA has been successfully applied to the benchmark function of CEC2017 and multiple constrained optimization problems. By comparing with other modern metaheuristic algorithms, it shows its excellent performance and efficient global search capabilities.

[0234] 3.5 Parameter settings

[0235] In this study, a hybrid model integrating convolutional neural network (CNN), long short-term time series (LSTM) and attention mechanism (Attention) is proposed. In each part of the model, the main parameters are: for the CNN part, the parameters of concern are the convolution kernel size, step size and number of channels of the convolution layer; for the LSTM part, the parameters of concern are the number of input layer nodes, the number of output layer nodes, the number of hidden layer nodes, batch size, maximum number of training iterations, learning rate, etc.; and in the attention mechanism part, the main focus is on the number of channels of the fully connected layer; in the PSA optimization algorithm process, the parameters mainly include the learning rate, the number of hidden layer nodes and the regularization coefficient.

[0236] According to the data and prediction objectives of this study, the following parameters and structure settings are used in the hybrid model: two convolutional layers are used in the CNN part. The convolution kernel size of the first convolution layer is [3,1], the step size is [1,1], and the number of channels is 32. The convolution kernel size of the second convolution layer is [3,1], the step size is [1,1], and the number of channels is 64. In the attention mechanism part, a fully connected layer is used. The number of channels is first reduced to 1 / 4 of the original number of channels, and then restored to the original number of channels, and the sigmoid activation function is used. The Adam optimizer is used in the GRU model, the learning step size is 12, the maximum number of iterations is 200, and the initial learning rate is 0.001. The parameters of GRU are manually adjusted based on the literature of related field research and the actual data in the basin. In the PSA optimization algorithm, the learning rate parameter space is [1e-5, 1e-2], the hidden layer node parameter space is [5, 100], and the regularization coefficient parameter space is [1e-6, 1e-2]. The setting of these parameters and structures is designed to enable the model to fully capture the relationship between groundwater level and hydrological and meteorological factors, thereby achieving accurate groundwater level prediction in karst areas.

[0237] 4 Model Validation

[0238] 4.1 Fitness Change

[0239] The fitness variation curve is a graph used to visualize the performance of an optimization algorithm, especially in evolutionary algorithms or other meta-heuristic algorithms. This curve shows the change in the fitness (or "health", "optimization target value") of the algorithm during the iteration process, and is used to evaluate the efficiency and ability of the algorithm to find the optimal solution. The fitness variation curve can be used to intuitively monitor the performance of the algorithm throughout the search process. The curve usually shows the best fitness value for each generation or each step from the initial population to the termination of the algorithm. At the same time, the curve provides important information about the convergence speed and stability of the algorithm. An ideal fitness variation curve should show that the fitness value gradually approaches the optimal value as the number of iterations increases.

[0240] 4.2 Error Visualization

[0241] In order to evaluate the accuracy of the groundwater level prediction model, the inventor calculated the error between the predicted water level value and the actual observed value at each monitoring point, that is, the error value was obtained by subtracting the true value from the predicted value. Next, in order to more intuitively show the distribution of these errors, the inventor used histograms and discount charts for visualization. In the histogram, these error values ​​are distributed in a histogram with 20 bins, each bin representing an error interval. In this way, the inventor can analyze in detail the overall performance of the model and its deviation characteristics under specific conditions, thereby providing visual evidence and quantitative basis for the optimization of the model.

[0242] 4.3 Model Validation

[0243] This paper selects four commonly used evaluation indicators, namely root mean square error (RMSE), mean absolute error (MAE), mean absolute percentage error (MAPE) and determination coefficient (R 2 ) to measure the prediction performance of different runoff prediction models. The following is a detailed introduction and calculation formula of these indicators:

[0244] (1) Mean Square Error (MSE) and Root Mean Square Error (RMSE)

[0245] Mean square error (MSE) and root mean square error (RMSE) are commonly used indicators to measure the prediction accuracy of a model. They calculate the average square difference between the predicted value and the actual value. The smaller the MSE and RMSE values, the higher the prediction accuracy of the model. The formula is as follows:

[0246]

[0247] where y i is the actual value, is the predicted value and n is the total number of data points.

[0248] (2) Mean Absolute Error (MAE)

[0249] The Mean Absolute Error (MAE) is the average of the absolute errors between the predicted values and the actual values. Compared with RMSE, MAE is less sensitive to outliers.

[0250]

[0251] (3) Mean Absolute Percentage Error (MAPE)

[0252] The Mean Absolute Percentage Error (MAPE) is the average of the ratios of the absolute errors between the predicted values and the actual values to the actual values. MAPE is used to measure the percentage of the prediction error relative to the actual value and is usually used to compare time - series data of different scales.

[0253]

[0254] (4) Coefficient of Determination (R 2 )

[0255] The Coefficient of Determination (R 2 ) is an index to measure the prediction ability of the model, and its value ranges from 0 to 1. The closer R 2 is to 1, the higher the degree of fitting of the model to the data and the better the prediction performance.

[0256]

[0257] where, is the average of the actual values.

[0258] (5) Relative Deviation

[0259] The Relative Prediction Deviation (RPD) is an index commonly used to evaluate the accuracy of a prediction model, mainly used to compare the differences between the model's predicted values and the actual observed values.

[0260]

[0261] When RPD > 2.0, it indicates that the model prediction has very good accuracy, usually meaning that the model is very suitable for prediction; when 1.4 < RPD < 2.0, it means that the model prediction has moderate accuracy and is applicable to some prediction tasks; when RPD < 1.4, it indicates that the model prediction accuracy is low and may require further improvement or is only suitable for preliminary analysis.

[0262] 5. Time - series Decomposition

[0263] Time series decomposition is a statistical method that can reveal the basic patterns and structures in the data, such as long-term trends, seasonal changes, and irregular fluctuations. The inventors use the Additive Model to perform the decomposition, which assumes that the time series is the sum of the following three components:

[0264] Y t =T t +S t +R t (twenty four)

[0265] Among them, T t is the original observation at time point t; T t is the trend component, showing the long-term trend of the data; S t is the seasonal component, reflecting the changes within a fixed seasonal cycle; R t is the residual component, which includes random variation in the data that cannot be explained by the model.

[0266] (1) Trend component T t

[0267] The trend component can be estimated by moving average or more complex filtering techniques to represent the long-term trend of data. In this study, the inventors used the Local Weighted Regression Technique (LOESS) to estimate the trend in a smooth manner, thereby more accurately capturing the potential changes in the data.

[0268] (2) Seasonal component S t

[0269] The seasonal component is identified by calculating the average change in the data over repeated time intervals, such as the change over the four seasons of a year. The estimation of this component helps the inventors understand how the data varies systematically over seasonal cycles.

[0270] (3) Residual component R t

[0271] The residual component is the remaining part obtained by removing the trend and seasonal components from the original data. It represents the random fluctuations in the data that are not explained by the trend and seasonal components, and is important for evaluating the fit of the model and discovering outliers in the data.

[0272] By decomposing time series data, the inventors can not only see the inherent patterns and trends in the data more clearly, but also assess the relative importance of these components.

[0273] 6. Results and Discussion

[0274] 6.1 Single factor analysis of climate conditions

[0275] i. Rainfall

[0276] Based on the analysis of daily and monthly precipitation data from January 1, 2019 to August 31, 2023, the inventors found that seasonal changes in precipitation are crucial to the recharge and prediction of groundwater levels in karst areas. Figure 7 With attached Figure 8 ), significant seasonal differences and extreme changes in daily precipitation are highlighted. In particular, on May 25, 2019 and June 19, 2023, extreme precipitation events of 154.3 mm and 128.1 mm were recorded, respectively. These events not only led to a significant increase in the groundwater level in multiple monitoring boreholes in the study area, but also provided key data for the dynamic prediction of karst groundwater levels. In addition, according to the time series decomposition results (Appendix Fig. 9 ), the overall rainfall trend shows a slight downward trend, especially starting from 2022. At the same time, the rainfall shows obvious seasonal changes. May to September is the main rainy season in the region, and the precipitation during this period accounts for more than 70% of the total annual precipitation, which is particularly important for the development and verification of groundwater level prediction models.

[0277] ii. Air pressure

[0278] Attached Fig.10 and attached Fig.11 The daily pressure change graph and the monthly average pressure graph for the period from 2019.01.01 to 2023.08.31 are shown. It can be seen that the daily pressure graph shows the daily volatility of air pressure, with peaks and troughs revealing drastic changes in air pressure in a short period of time. The monthly average graph shows the overall trend of air pressure with the seasons. Through this graph, the inventor can see the cyclical pattern of air pressure every year, reflecting the impact of seasonal changes on air pressure. Summer may show lower air pressure values, while winter is relatively high, which is closely related to the global atmospheric circulation patterns and regional climate characteristics. This seasonal change can also be reflected by the time series decomposition graph (attached Fig.12 ).

[0279] iii. Temperature

[0280] Attached Fig.13 , Attachment Fig.14 and attached Fig.15The results of daily temperature changes, monthly average changes and seasonal analysis of monthly average temperature are shown respectively. In the bar chart of monthly average temperature, the temperature in winter (December to February) is significantly lower than that in other months. The lowest average temperature usually occurs in January, while the temperature in summer (June to August) is the highest. For example, the average temperature in August 2022 reached 25.29℃. The results of time series decomposition further reveal the three main components of temperature data: trend, seasonality and residual. The trend part shows that the temperature has a slight upward trend. The seasonal part clearly shows the periodic changes in temperature every year, accurately reflecting the alternation of the four seasons and climate characteristics. The residual part contains random fluctuations in addition to trend and seasonal factors.

[0281] iv.Relative humidity

[0282] After analyzing the daily time series of relative humidity in the study area, calculating the monthly average, and performing time series decomposition, the inventors obtained some key information, which provided a corresponding basis for groundwater level prediction. Fig.16 ) shows the daily fluctuations in relative humidity over the year, with 18 days reaching 100% relative humidity. From the monthly averages, it can be seen (see Appendix Fig.17 ), humidity varies significantly in different months, reflecting a typical seasonal pattern. Fig.18 ), relative humidity also shows obvious seasonality, being lower in summer and higher in winter, while the overall trend is decreasing year by year. The residual components reveal irregular changes in addition to the regular seasonality and trend.

[0283] v. Evaporation

[0284] By comprehensively analyzing the daily evaporation time series (Appendix Fig.19 ), monthly cumulative evaporation bar chart (attached Fig. 20 ) and time series decomposition results (Appendix Fig.21 ), the inventors can draw the following conclusions: daily evaporation shows obvious seasonal changes. During the observation period, the minimum daily evaporation was 0 mm, while the maximum daily evaporation reached 8.70 mm, indicating that evaporation increased significantly on hot days. The monthly cumulative evaporation bar chart shows the total evaporation for each month, with the highest monthly cumulative evaporation reaching 203.9 mm (summer) and the lowest being less than 40 mm (winter). This further emphasizes the impact of temperature on evaporation. The time series decomposition illustrates the trend of increasing evaporation year by year, while the seasonal component clearly shows the annual cyclical changes.

[0285] vi. Ground temperature

[0286] Considering the daily ground temperature time series (see Appendix Fig. 22), coarse histogram and time series of monthly average ground temperature (Appendix Fig. 22 ) decomposition results show that the ground temperature is lower in winter and higher in summer, with the highest record reaching 37.6℃ and the lowest being -0.7℃. This fluctuation reflects the obvious seasonality and the influence of daily changes. The monthly average ground temperature bar chart shows the obvious changes in ground temperature with the seasons. The average ground temperature in summer is significantly higher than that in winter, which echoes the daily ground temperature data. For example, the highest monthly average ground temperature usually occurs in July or August, while the lowest is in January or December. Time series decomposition provides detailed seasonality and trend analysis for ground temperature data (see Appendix). Fig.23 ). The trend component reveals the possible gradual increase or decrease in ground temperature over time, while the seasonal component clearly shows the periodic fluctuations within the year.

[0287] 6.2 Prediction Performance Analysis

[0288] This study uses five boreholes, ZK1, ZK2, ZK3, ZK8 and ZK10, as cases to discuss the prediction performance of the model from six perspectives: overall water level analysis, fitness change, training set, test set, error distribution, overall evaluation and regression analysis. Table 1 shows the basic information of the groundwater level in the five boreholes and the verification results of each indicator model. In general, the PSA-CNN-LSTM-Attention model is accurate in predicting both the training set and the test set. The groundwater level at ZK2 has the largest fluctuation, reaching 20.01 meters. This may be due to the high degree of karst development in the area, strong groundwater mobility, and the impact of surface water recharge and human activities, which makes the water level fluctuate greatly. In comparison, the water level fluctuations of ZK8 and ZK10 are 7.796 meters and 8.983 meters, respectively. Although the fluctuations are large, they are still smaller than those of ZK2, indicating that these areas may have relatively stable karst structures and relatively balanced groundwater mobility and recharge conditions. The water level fluctuations at ZK1 and ZK3 are relatively small, at 3.296 meters and 1.909 meters respectively, which may indicate that the karst development at these locations is incomplete, the groundwater system is relatively closed, and the water level is less affected by external factors. In addition, these locations may be at the edge of the karst zone, where the hydrogeological conditions are relatively stable and the water level fluctuations are small. The following are the details of each borehole

[0289] Table 4-15 Basic information of typical borehole water levels and model verification results

[0290]

[0291]

[0292] vii.ZK1

[0293] (1) Overall analysis of water level

[0294] Attached Fig.25 , Attachment Fig.26 and attached Fig. 27 The time series diagram, data distribution diagram and seasonal analysis diagram of ZK1 groundwater level are shown respectively. After removing the trend and error, the groundwater level of ZK1 shows obvious seasonal distribution characteristics: the water level rises in summer and drops in winter. Fig.26 Compared with the previous seasonal analysis of meteorological conditions, it can be found that the ZK1 groundwater level has a significant positive or negative correlation with some meteorological factors, which further verifies the rationality of the data. The specific results are shown in Table 4-2.

[0295] Table 4-2 Seasonal correlation analysis between ZK1 and climate conditions

[0296]

[0297] (2) Fitness change curve

[0298] Attached Fig.28 is the fitness change curve of ZK1. In the early stage of iteration, the fitness value remained relatively stable from 1 to 3.5, indicating that the algorithm may be conducting preliminary exploration or has located a good local optimal solution. Subsequently, in the stage from 3.5 to 4.5, the fitness value increased slightly, indicating that the algorithm found a better solution through effective search or parameter adjustment. The most critical change occurred in the time period from 4.5 to 6. The significant decrease in fitness value may indicate that the algorithm has found a global optimal solution or a significantly low fitness area, marking a major breakthrough in the optimization process. Overall, the fitness change of the optimization algorithm indicates a transition from stability to significant improvement, which may ultimately achieve significant optimization of the solution.

[0299] (2) Training set analysis

[0300] Attached Fig.29 The training set results of the PSA-CNN-LSTM-Attention hybrid model in ZK1 are shown in the discount graph. The red line represents the actual observed water level, and the blue line represents the model prediction value (optimal learning rate = 0.0075, optimal number of hidden layer nodes = 41, and optimal regularization coefficient = 0.0023). By comparison, it can be seen that the fluctuation trend of the predicted curve and the actual water level curve is highly consistent, indicating that the model can effectively capture the main dynamics of water level changes. The performance of the model is evaluated by several key indicators: the coefficient of determination (R 2 =0.98117), root mean square error (RMSE=0.085607) and mean square error (MSE=0.0073285), as well as relative prediction deviation (RPD=7.3241>2), these indicators confirm the prediction accuracy and reliability of the model. As shown in the scatter plot (Attached Fig.10), the predicted values ​​are highly consistent with the actual values ​​and are evenly distributed around the ideal line close to 45 degrees. Therefore, for the groundwater level change results of ZK1, the fitting effect of the training set is very good.

[0301] (2) Test set analysis

[0302] For the test set, the inventors further verified the effectiveness of the PSA-CNN-LSTM-Attention model in groundwater level prediction (ZK1). Fig.30 As shown in the left figure, the water level predicted by the model (blue line) is very close to the actual observed value (red line), reflecting that the model accurately captures the water level fluctuation. The scatter plot on the right shows the consistency between the predicted value and the actual value. The data points are compactly distributed close to the ideal diagonal position, showing a high degree of linear consistency. The performance of the model on the test set is measured by the coefficient of determination (R 2 =0.95238), root mean square error (RMSE=0.15566) and mean square error (MSE=0.15566), the indicators show that the model has high prediction accuracy and low error, and the relative prediction deviation (RPD=4.7331>2) also confirms the reliability of the model in practical applications.

[0303] (5) Error visualization

[0304] Attached Fig.31 The performance of the PSA-CNN-LSTM-Attention model is shown in two error visualization charts. The left figure is an error distribution histogram, which shows the frequency distribution of prediction errors in different ranges. As can be seen from the figure, the errors are mainly concentrated in the area close to 0, indicating that the model's predictions are very close to the actual values. The largest frequency occurs in small errors that are slightly positive, indicating that the model slightly overestimates the water level in some cases. The right figure is an error time series chart, showing the trend of the prediction error during the test period. As can be seen from the figure, the error remains at a low level for most of the time, but there are several significant error peaks, which may be caused by data anomalies or atypical water level changes that the model fails to capture. These results show that although the model performs well most of the time and accurately predicts groundwater levels, there is still room for improvement when dealing with extreme or sudden events. Future work can try to reduce these error peaks by increasing the complexity of the model or introducing more features, thereby further improving the robustness and prediction accuracy of the model.

[0305] (6) Overall evaluation

[0306] Attached Fig.32 and attached Fig.33 The prediction graphs and linear regression results of the fit using all the data sets are shown in the Appendix. Fig.32Its scatter points are closely distributed around the ideal diagonal line, showing a high accuracy, which is shown by the determination coefficient R 2 =0.9667 and RMSE =0.12063. This shows that the model performs well overall in predicting groundwater levels with small errors. Fig.33 The highly linear relationship of the model is further emphasized by linear regression, and the correlation coefficient R = 0.9826 indicates that there is an extremely strong positive correlation between the predicted values ​​and the actual values. This high consistency shows that the model can not only accurately capture the trends in the data, but also that its predictions are almost perfectly aligned with the actual observed values.

[0307] i.ZK2

[0308] (1) Overall analysis of water level

[0309] Similar to ZK1, with Fig.34 , Attachment Fig.35 and attached Fig.36 The time series diagram, data distribution diagram and seasonal analysis diagram of groundwater level in ZK1 are shown respectively. It can be seen that the water level in ZK2 varies greatly, but the seasonal fluctuation is consistent with that in ZK1, and the seasonal correlation with climate conditions conforms to the general law (Table 4-3).

[0310] Table 4-3 Seasonal correlation analysis between ZK2 and climate conditions

[0311]

[0312] (2) Fitness change curve

[0313] From the fitness change curve (attached Fig.37 ) It can be seen that the fitness value of ZK2 gradually decreases under multiple iterations, which reflects that the model's fit to the data is gradually improved during the optimization process. The initial fitness value is high, indicating that the model fits poorly in the initial stage, and as the number of iterations increases, the fitness value gradually decreases, and by the sixth iteration it has dropped below 0.7. This trend shows that the model's fit to the data gradually improves in the process of continuously adjusting parameters, and the model becomes more accurate and effective. This shows that through multiple iterations, the model can better capture the characteristics of groundwater level changes at the ZK2 location and improve prediction accuracy.

[0314] (3) Training set analysis

[0315] The groundwater level simulation results of ZK2 were predicted by using the PSA-CNN-LSTM-Attention model. From the performance indicators of the training set model, the determination coefficient (R 2) is 0.97494, indicating that the model can explain nearly 97.5% of the variation, which is a very high degree of fit. In addition, the root mean square error (RMSE) is 0.71799, the mean square error (MSE) is 0.51551, and the relative prediction deviation (RPD) is 6.5201, all of which indicate that the prediction accuracy and stability of the model on the training set are very good. In the scatter plot on the right, the predicted values ​​and observed values ​​are closely distributed around the 1:1 line, further verifying the consistency and accuracy of the model prediction. The scatter points are dense and close to the straight line, indicating that the prediction error is small. Even if the water level fluctuates greatly, the model has a strong ability to capture complex groundwater dynamics.

[0316] (4) Test set analysis

[0317] On the prediction set, the PSA-CNN-LSTM-Attention model still shows good performance. In the left time series simulation, the coefficient of determination (R 2 ) is 0.97962, the root mean square error (RMSE) is 0.33352, the mean square error (MSE) is 0.11124, and the relative prediction deviation (RPD) is 7.3258. However, the inventors noticed that the model predicted the smooth water level into a fluctuating pattern at some stages. This phenomenon may indicate that the model is over-adapted to the noise in the training data on specific data features, or that some parameter settings of the model are not sufficient to cope with certain changes in real-world data, resulting in increased volatility in the prediction. In the scatter plot on the right, the predicted values ​​and the actual values ​​are mostly closely distributed around the 1:1 line, but there are still a few points that show deviations, which may be due to the lack of adaptability of the model when encountering extreme values ​​or patterns that are not fully represented in the training data. In summary, the PSA-CNN-LSTM-Attention model showed a high degree of accuracy and adaptability in predicting groundwater level changes in the ZK2 area, but it still needs to be optimized to reduce excessive sensitivity to noise and improve prediction capabilities in extreme cases.

[0318] (5) Error visualization

[0319] (6) Overall evaluation

[0320] In the overall model evaluation including training set and validation set, the PSA-CNN-LSTM-Attention model has better performance simulation. Fig.41 The coefficient of determination (R 2 ) is 0.97728, and RMSE is 0.52575, but the inventors noticed that the prediction for high values ​​is too small (with the attached Fig.38 Similar). Fig.42It is the regression curve of the water level, and the R value is 0.99065, which shows that there is a very high correlation between the model prediction value and the actual observation value, and it can predict the change of groundwater level very accurately.

[0321] ii.ZK3

[0322] (1) Overall analysis of water level

[0323] Table 4-4 Seasonal correlation analysis between ZK3 and climate conditions

[0324]

[0325] Attached Fig.43 , Attachment Fig.44 and attached Fig.45 The time series diagram, data distribution diagram and seasonal analysis diagram of the groundwater level in ZK3 are shown respectively. It can be seen that the water level in ZK3 does not fluctuate much, with a water level difference of 1.909 meters, but the overall seasonal fluctuation is consistent with that in ZK1 and ZK2, and the seasonal correlation with climate conditions conforms to the general law (Table 4-4).

[0326] (2) Fitness change curve

[0327] Attached Fig.46 The curve of the model's fitness change for ZK3 is shown, reflecting the performance changes of the model at different iteration stages. As can be seen from the figure, with the increase in the number of iterations, the fitness of the model improves significantly, especially at iterations 3.5 and 5.5, the fitness decreases significantly, indicating that the optimization of model parameters and structure significantly improves the prediction accuracy. In the ZK3 case, the continuous decline in fitness indicates that the model can predict groundwater levels more and more accurately during the learning and adjustment process. The "step" shape of the curve may indicate that parameter adjustments or data redistributions were made at specific iteration stages, which led to significant performance improvements. In addition, the sharp decline in fitness in the last stage may indicate that the model has found a more effective feature combination or learning strategy, thereby achieving optimization in predicting groundwater levels.

[0328] (3) Training set analysis

[0329] Attached Fig.47 The training set results of the PSA-CNN-LSTM-Attention hybrid model in ZK3 show a high degree of fitting performance. The left figure shows the time series comparison between the actual water level and the predicted water level. It can be observed that the blue predicted curve closely follows the red actual curve. Although there are slight deviations at some peak values, the two are very close overall. The performance indicators of the model are as follows: 2=0.96036, root mean square error (RMSE=0.059267), and relative prediction deviation (RPD=5.0736) all indicate the high accuracy and reliability of the model in prediction. The right figure further verifies this high degree of fit, and all data points are distributed along the ideal fitting line (purple line), which shows that there is a strong consistency between the predicted value and the actual value. In addition, the coefficient of determination and RMSE value also reaffirm the high efficiency of the model in processing this type of data.

[0330] (4) Test set analysis

[0331] Similar to the results of ZK1 and ZK2, Fig.48 This shows the excellent performance of the PSA-CNN-LSTM-Attention model in predicting the groundwater level in the ZK3 borehole. The first figure is a time series prediction graph, which shows the comparison between the model prediction value (blue line) and the actual observation value (red line). As can be seen from the figure, the predicted curve closely follows the actual curve. Although there are slight deviations at the extreme points, the model can accurately capture the trend of water level changes overall. The statistical indicators of the model, such as the determination coefficient R 2 =0.96189 and RMSE =0.046754 both indicate high accuracy and low error in prediction, while RPD =5.1463 further demonstrates the reliability and practicality of the model. The second figure is a scatter plot showing the linear relationship between the predicted and actual values ​​of the test data. The data points are compactly distributed around the purple ideal fit line, indicating that there is a very high consistency between the predicted and actual values. The coefficient of determination R 2 =0.96189 and root mean square error RMSE =0.046754 both show that the model has excellent explanatory power and prediction accuracy for the test data.

[0332] (5) Error visualization

[0333] Attached Fig.49Visualizations of the errors for the ZK3 borehole are shown, showing the error distribution and specific error points of the PSA-CNN-LSTM-Attention model in predicting groundwater levels. The first figure shows a distribution histogram of the prediction errors, where most of the errors are concentrated in the area close to 0, indicating that the model's predictions are usually very close to the actual values. The error distribution mainly presents a symmetrical shape, and the errors of most data points fall in the range of -0.05 to +0.05, which highlights the high accuracy of the model in most cases. The second figure is a time series graph of the errors, showing the changes in the prediction errors throughout the test period. As can be seen in the figure, although the errors remain at a low level most of the time, there are some significant error spikes. These spikes may be caused by insufficient response of the model to some extreme or atypical data points, or due to sudden and large changes in the actual water level. Combining these two figures, the inventor can see that the PSA-CNN-LSTM-Attention model has high accuracy and reliability in predicting groundwater levels.

[0334] (3) Overall evaluation

[0335] Attached Fig.50 and attached Fig.51 The fitting results and linear regression results of all data points are shown. The first figure is a scatter plot of the fitting results, which shows the relationship between the predicted values ​​and the actual values, indicating that the predicted results are highly consistent with the actual observed values. 2 = 0.96113 and RMSE = 0.053011 both indicate that the model has a high prediction accuracy. The second figure is a linear regression analysis, which further emphasizes the prediction ability of the model. In this figure, the correlation coefficient of the linear relationship R = 0.9819 shows a strong positive correlation between the predicted value and the actual value.

[0336] iii.ZK8

[0337] (1) Overall analysis of water level

[0338] Attached Fig.52 , Attachment Fig.53 and attached Fig.54 The time series diagram of groundwater level in ZK3, the distribution diagram of data and the seasonal analysis diagram are shown respectively. It can be seen that the overall seasonal fluctuation is consistent with that in ZK1, ZK2 and ZK3, and the seasonal correlation with climatic conditions conforms to the general law (Table 4-5).

[0339] Table 4-5 Seasonal correlation analysis between ZK3 and climate conditions

[0340]

[0341] (2) Fitness change curve

[0342] Attached Fig.55 The fitness change curve of ZK8 is shown to evaluate the performance of the model during the iteration process. It can be observed from the figure that the fitness drops rapidly in the early stage of the iteration, indicating that the model parameters are rapidly optimized in the first few iterations, and the fitness drops from close to 0.3 to about 0.12. After 2.5 iterations, the fitness reaches a plateau, indicating that the model has stabilized. This rapid decline in fitness and subsequent stability indicates that the model quickly converges to a better solution after adjusting the initial parameters, and the further improvement of the model in subsequent iterations is limited. This observation suggests that the early adjustments to the model may have captured the main features of the data, while adjustments in later iterations failed to significantly affect the overall performance of the model.

[0343] (3) Training set analysis

[0344] Attached Fig.56 The training set results of the borehole data are shown. The PSA-CNN-LSTM-Attention model is used to predict the groundwater level and the fitting effect of the model during the training phase is shown. A figure shows the time series comparison between the model prediction value (blue line) and the actual observation value (red line). It can be seen that, like the first two boreholes, the model can effectively capture the main trend of water level changes. 2 , RMSE, MSE and RPD and other model indicators further prove the high accuracy and reliability of the model. Fig.33 Shows the relationship between the predicted values ​​and the actual values ​​in the training set. The coefficient of determination R 2 =0.9767 shows that the model has a high ability to explain the data.

[0345] (4) Test set analysis

[0346] Attached Fig.57 The figure shows the prediction results of ZK8 using the PSA-CNN-LSTM-Attention model on the test set. The left figure shows the relationship between the water level predicted by the model (blue line) and the actual observed water level (red line). As can be seen from the figure, the model successfully captures the main trend of water level changes, although there are slight deviations in some spikes. Nevertheless, the overall model prediction maintains a high consistency with the actual data, with specific indicators including R 2 =0.86757, RMSE = 0.34415, MSE = 0.11844, RPD = 3.1309>2. Similar to the previous figure, the right figure shows the linear relationship between the predicted value and the actual value of the test data point. The higher coefficient of determination R 2 =0.86757 indicates that the model can explain most of the variance of water level changes, while the relatively low RMSE (0.34415) shows the accuracy of the prediction.

[0347] (5) Error visualization

[0348] Attached Fig.58 The figure below shows the error visualization results when using the PSA-CNN-LSTM-Attention model to predict groundwater levels in ZK8. It can be observed that the vast majority of errors are concentrated in a range close to zero, indicating that the model's predictions are very close to the actual values. Specifically, the main distribution of errors is between -0.5 and 0.5, which shows that the model can predict groundwater levels with high accuracy in most cases. The figure on the right shows the time series trend of ZK8 prediction errors. It can be seen that although the errors are small most of the time, there are several spikes, which are likely to correspond to the performance of the model when dealing with rapid water level changes or poor input data quality. Combining the information from these two figures, it can be shown that the PSA-CNN-LSTM-Attention model performs well overall in predicting groundwater levels in ZK8, with high accuracy and reliability. However, the model still needs to be optimized in terms of how to deal with extreme events.

[0349] (6) Overall evaluation

[0350] Attached Fig.59 and attached Fig.60 The fitting results and regression analysis results of all data points are shown. Fig.59 It is a scatter plot showing the relationship between the predicted value and the actual value, the coefficient of determination R 2 =0.95434 indicates that the model can explain most of the variability, while the root mean square error prediction (RMSE=0.25207) indicates that the average error level of the model prediction is very low, reflecting the high performance and stability of the model.

[0351] iv.ZK10

[0352] (1) Overall analysis of water level

[0353] Attached Fig.61 , Attachment Fig.62 and attached Fig.63 The time series diagram of groundwater level in ZK3, the distribution diagram of data and the seasonal analysis diagram are shown respectively. It can be seen that the overall seasonal fluctuation is consistent with that in ZK1, ZK2 and ZK3, and the seasonal correlation with climatic conditions conforms to the general law (Table 4-6).

[0354] Table 4-6 Seasonal correlation analysis between ZK3 and climate conditions

[0355]

[0356] (2) Fitness change curve

[0357] Attached Fig.64 The fitness change curve of the ZK10 borehole is shown, in which the fitness value shows a gradual downward trend with the increase in the number of iterations, especially in the fifth iteration, the fitness value shows a significant decline. As can be seen from the figure, the fitness value gradually decreases from about 0.32 at the beginning to about 0.28 at the fourth iteration, and then drops sharply to about 0.18 at the fifth iteration. This change may indicate that after the initial parameter adjustment and learning process, the model gradually approaches a better solution, resulting in a significant decrease in fitness, reflecting the model's better fit to the data structure and underlying laws.

[0358] (3) Training set analysis

[0359] In the groundwater level prediction of ZK10, the PSA-CNN-LSTM-Attention model showed extremely high accuracy and precision on the training set. Fig.65 As shown in the time series simulation diagram on the left, the water level predicted by the model is highly consistent with the actual observed value, and can accurately capture the fluctuation pattern of the water level. In addition, the determination coefficient R 2 The average value of the model is 0.99052, the root mean square error (RMSE) is 0.20015, the mean square error (MSE) is 0.040059, and the relative prediction deviation (RPD) is 10.3821, all of which indicate that the model has excellent prediction ability and data fitting quality. In the scatter plot on the right, the correspondence between the predicted values ​​and the actual values ​​is closely distributed around the 1:1 line, further verifying the high consistency and accuracy of the model in predicting water level changes. This dense and almost perfect linear distribution shows that the model can simulate the actual dynamics of groundwater levels very effectively, and the very few outliers are also within the acceptable error range.

[0360] (4) Test set analysis

[0361] On the ZK10 test set, the PSA-CNN-LSTM-Attention model also shows good performance, although there are slight fluctuations in some aspects. Fig.66 As shown in the time series simulation diagram on the left, it can be seen that there is a certain degree of synchronization between the model's predicted values ​​and the actual observed values, especially in capturing the main trends and fluctuation patterns of water levels. 2The root mean square error (RMSE) is 0.21667 and the mean square error (MSE) is 0.04694, which shows a good fit. These indicators reflect that the model has a high prediction accuracy on the test set, but the error is slightly higher than the results of the training set. In the scatter plot on the right, the distribution of the predicted values ​​and the actual values ​​is relatively close, but compared with the results of the training set, the scatter plot shows a slight dispersion trend, especially in the prediction of higher water level values. This may indicate that the fit of the high water level is slightly insufficient during the model training process, or that the generalization ability of the model when processing test data needs to be improved. In general, although the performance on the test set is slightly lower than that on the training set, the PSA-CNN-LSTM-Attention model still shows good performance in practical applications.

[0362] (5) Error visualization

[0363] From the error distribution histogram (attached Fig.67 ) can be seen that the vast majority of errors are concentrated in a smaller range, showing that the model can achieve fairly accurate predictions in most cases. Especially in the error range of ±0.1, the frequency is quite high, indicating that the model has a high accuracy for water level prediction at the ZK10 location. However, there are also some cases of larger errors, especially in certain specific bins, as shown by the blue peak in the figure, which may indicate the lack of predictive ability of the model in certain specific cases. From the error fluctuation diagram of the time series, the inventor can see that the error remains at a low level at most time points, but there are some significant peaks.

[0364] (6) Overall evaluation

[0365] For the groundwater level prediction of ZK10, the overall analysis shows that the PSA-CNN-LSTM-Attention model shows high accuracy and consistency in both the training set and the validation set. Fig.68 , Attachment Fig.69 As shown in the figure, for the fitting results of all samples, R 2 is 0.96306, and RMSE is 0.20841. Scatter plot (attached Fig.68 ), the predicted values ​​and actual values ​​are closely distributed around the 1:1 line, which further proves that the model can maintain its prediction accuracy and stability on various data points. Overall, the PSA-CNN-LSTM-Attention model not only shows excellent performance in the training set, but also proves its efficient generalization ability in the application of the validation set.

[0366] 4. Applicability of the model to karst areas

[0367] In karst areas, groundwater level prediction faces great challenges, which stems from the extreme complexity of karst terrain and the uncertainty of groundwater flow. Among the five boreholes selected by the inventor, there are boreholes with water level fluctuations of more than 20 meters, and there are also boreholes that remain stable. The hydrogeological conditions in karst areas usually show a high degree of spatial heterogeneity, which is caused by the complex network of caves and fissures within the karst system. The irregularity of these geological structures makes it difficult to predict the flow path and rate of groundwater, and the openness of groundwater flow channels may cause the water level to fluctuate violently in a very short time. For example, at the ZK2 borehole observation point, monitoring data showed that the water level can rise by more than 10 meters after heavy rainfall, reflecting the sensitivity of groundwater in karst areas to rainfall and the rapid response ability of groundwater systems. In addition, there is a close interaction between groundwater and surface water in karst areas, and this connection makes the groundwater level react particularly quickly and violently to changes in surface water bodies. This dynamic interaction between groundwater and surface water complicates the prediction model of water level changes, especially in karst areas around river basins or lakes.

[0368] In these areas, groundwater levels are not only affected by rainfall, but also directly affected by changes in the levels of surface water bodies, such as fluctuations during floods and droughts. Faced with these challenges, traditional hydrological models often have difficulty providing accurate water level forecasts due to their lack of ability to handle complex inputs and capture nonlinear dynamic relationships in groundwater systems. These models are usually based on simplified assumptions, such as homogeneous hydrogeological conditions and stable flow patterns, and are difficult to adapt to the complexity and variability of groundwater systems in karst areas. Therefore, in order to improve the accuracy and reliability of predictions, it is particularly important to develop advanced models that can capture these complex dynamics. This requires the use of advanced machine learning techniques that can process large amounts of nonlinear data and learn their inherent patterns, such as the PSA-CNN-LSTM-Attention model proposed in this project. This model effectively solves the problems faced by traditional models by integrating multiple deep learning techniques, and provides new possibilities for accurate prediction of groundwater levels in karst areas.

[0369] The PSA-CNN-LSTM-Attention model demonstrates superior performance by integrating multiple advanced machine learning techniques. The core strength of the model is its ability to integrate and analyze rich information from multiple data sources to provide accurate water level forecasts. First, the convolutional neural network (CNN) portion of the model is dedicated to extracting key features from spatial and temporal data. CNNs are able to effectively identify patterns in complex input data through their multi-layered filters, which enables CNNs to not only identify the impact of single events, but also understand how these events interact in complex karst terrain to cause changes in water levels. Long short-term memory networks enable the model to process time series data and capture long-term dependencies. In karst areas, changes in groundwater levels depend not only on current hydrological conditions, but also on previous events, such as the cumulative effect of rainfall and its impact on groundwater flow. By memorizing past water level changes, LSTM can predict the possible response of water levels after specific rainfall events, thereby providing more accurate support for water resource management. Finally, the attention mechanism added to the model further enhances its prediction capabilities. By weighting the factors that affect groundwater level changes, such as rainfall intensity, duration, and the interaction between groundwater and surface water, the attention mechanism ensures that the model can focus resources on the variables that have the greatest impact on the prediction results. This not only improves the accuracy of the prediction, but also improves the flexibility and responsiveness of the model in dealing with sudden hydrological events. As an advanced global parameter adjustment method, PSA plays a key role in improving the performance of the PSA-CNN-LSTM-Attention model. By systematically exploring and optimizing in a wide range of parameter spaces, PSA not only enhances the generalization ability of the model, but also ensures excellent prediction accuracy under different hydrogeological conditions. This method is particularly valuable when dealing with complex hydrological models in karst areas, because the groundwater dynamics in these areas are extremely sensitive and changeable, and conventional parameter adjustment methods often fail to capture the impact of all key factors. PSA helps model developers adjust and set the optimal parameter configuration by comprehensively analyzing the impact of parameters such as the number of network layers, the number of neurons, the learning rate, and the batch size on prediction accuracy.

[0370] In summary, the PSA-CNN-LSTM-Attention model effectively solves the limitations of traditional hydrological models when applied in karst areas through the collaborative work of these four core components. The PSA-CNN-LSTM-Attention model can not only capture the complexity of groundwater level changes in karst areas, but also adapt to its dynamics and suddenness, thereby significantly improving the accuracy of predictions. Through practical application verification, the model has demonstrated excellent performance in dealing with complex hydrological scenarios in karst areas. Therefore, such a complex coupling model is worthy of promotion in groundwater level prediction in karst areas and has universal significance.

[0371] V. Future Groundwater Level Forecast and Management Measures

[0372] Since the water level fluctuation of ZK2 borehole exceeds 20 meters, the inventor selected this borehole as a case to predict the groundwater level change in the next month. Fig.70 The water level showed a decreasing trend from 1098.75 meters to 1096.305 meters in September 2023. This observation is consistent with the usual water level change trend of this borehole in September.

[0373] The decreasing trend in the water level forecast not only reflects natural climate change with reduced seasonal precipitation and increased evaporation, but also highlights the importance of real-time water level monitoring. The acquisition of real-time water level data allows the inventors to make timely adjustments to groundwater management strategies to address potential water shortages or risks of excessive water accumulation.

[0374] Based on the prediction results, the inventor can take a variety of management measures to optimize water resource utilization and protection, including but not limited to adjusting the amount of water pumped, increasing water storage measures, and strengthening monitoring and early warning systems. The following is a detailed introduction to these three measures:

[0375] (1) Adjust the pumping volume

[0376] In the face of water level forecasts showing a downward trend, adjusting the amount of water pumped becomes a critical management decision. The continued decline in groundwater levels not only threatens the sustainable supply of water resources, but may also have long-term negative impacts on underground ecosystems, such as degradation of underground biological habitats, surface subsidence, and reduced self-purification capacity of water bodies. In addition, too low water levels may exacerbate regional water disputes and affect the stability of agricultural, industrial and residential water use. By reducing the amount of water pumped, the rate of water level decline can be slowed down, thereby protecting and restoring the natural balance of the groundwater system. Specific measures include limiting the amount of water pumped during peak pumping periods, setting reasonable pumping quotas, and introducing advanced water resource management technologies, such as variable frequency pumping technology, which can automatically adjust the pumping rate based on real-time monitored water level data to ensure the rational development and utilization of groundwater resources. In addition, it is also very important to establish a management strategy linked to meteorological conditions. The adjustment strategy of water pumping should be different in the rainy and non-rainy seasons to adapt to the cyclical changes in natural precipitation. In the rainy season, the amount of water pumped can be appropriately increased to take advantage of the abundant precipitation supply; in the dry season, pumping activities should be strictly limited to avoid the water level from dropping too quickly.

[0377] (2) Increase water storage measures

[0378] With groundwater levels declining, increasing water storage measures has become a key countermeasure to ensure the sustainability of water resources and alleviate water stress caused by seasonal or prolonged droughts. By increasing water storage capacity, inventors can manage water resources more effectively and ensure sufficient water supply during peak demand or drought periods.

[0379] Strategies for implementing water storage measures may include:

[0380] Improve existing reservoirs and build new water storage facilities to increase the region's total water storage capacity. This includes increasing the depth and width of reservoirs to increase their water storage capacity. At the same time, by optimizing reservoir design, rainwater collection and utilization can be maximized.

[0381] Reduce evaporation losses.

[0382] Improve existing reservoirs and build new water storage facilities to increase the region's total water storage capacity. This includes increasing the depth and width of reservoirs to increase their water storage capacity. At the same time, by optimizing reservoir design, rainwater collection and utilization can be maximized.

[0383] Reduce evaporation losses.

[0384] In areas where water resources are scarce, artificial rainfall enhancement technology is used to increase precipitation, thereby increasing the recharge of surface water and groundwater. At the same time, hydrological regulation technologies, such as the development of storage ponds and wetland systems, can effectively control floods and increase groundwater recharge.

[0385] Improving soil water-holding capacity and rainfall infiltration rates through improved land management practices such as reforestation and wetland restoration.

[0386] These measures will not only help increase the natural recharge of groundwater, but also improve the ecological environment and enhance biodiversity.

[0387] Introduce smart water management technologies, such as water resource monitoring and management systems based on the Internet of Things. Through real-time data analysis, reservoir water release and pumping operations can be accurately controlled to optimize the allocation and utilization of water resources.

[0388] (3) Strengthening monitoring and early warning systems

[0389] Strengthening the monitoring and early warning system is a key link in groundwater management. By establishing a comprehensive monitoring network and using advanced sensors and remote sensing technology to monitor water levels, water quality and other environmental parameters in real time, it is possible to effectively provide real-time data on water resources and identify long-term trends and seasonal changes. At the same time, integrating multi-source monitoring data with big data and cloud computing technologies, and using machine learning and artificial intelligence algorithms for in-depth analysis, not only enhances the ability to predict future water resource trends, but also improves the timely detection rate of abnormal situations. In addition, a hierarchical early warning system is established to trigger early warning signals of corresponding levels based on monitoring data, from primary warning to emergency warning, to ensure that managers and the public have sufficient time to respond to potential water resource problems, thereby greatly improving the efficiency and effectiveness of responding to water resource crises. This comprehensive monitoring and early warning mechanism not only ensures the safety and sustainable use of water resources, but also enhances the ability to respond to extreme weather events, and supports the sustainable development of regional water security and ecological balance.

[0390] (7) Conclusion

[0391] As one of the important water resources, the change of groundwater level directly reflects the availability and total amount of groundwater. Understanding the history, current status and future changes of groundwater level is crucial for water resource management decision makers, which can help them better formulate water resource planning and management strategies. This study constructed a high-precision groundwater level prediction model by coupling convolutional neural network (CNN) and long short-term memory network (LSTM) technology, and integrating global average pooling layer and SE attention mechanism, which is particularly suitable for predicting the dynamic changes of groundwater level in karst areas. In addition, the PSA global optimization algorithm is used to adjust the model parameters to ensure that the model can perform optimally under different environments and data conditions, which not only enhances the adaptability of the model, but also improves its prediction accuracy under complex geological backgrounds.

[0392] In this study, the inventors selected five typical karst boreholes (ZK1, ZK2, ZK3, ZK8 and ZK10) in Guiyang as cases for in-depth analysis. These boreholes were used to test the PSA-CNN-LSTM-Attention model constructed by the inventors, which integrates a variety of advanced deep learning techniques to accurately predict the dynamic changes of groundwater levels under complex geological conditions. The inventors comprehensively evaluated the predictive performance of the model from multiple angles, including the overall performance of the water level, changes in model fitness, and performance on training and test sets. In order to achieve effective model training and validation, the data set was allocated 80% for the training set and 20% for the validation set. The results show that the PSA-CNN-LSTM-Attention model can provide highly accurate water level predictions regardless of whether it is a borehole with large water level fluctuations or a borehole with relatively stable fluctuations. In the training set, the model's R 2The values ​​range from 0.96036 to 0.99052, the RMSE values ​​range from 0.059267 to 0.71799, the MSE values ​​range from 0.0073285 to 0.51551, and the RPD values ​​range from 5.0736 to 10.3821, showing the strong ability of the model in capturing the variability in the data. For the test set, the model also performs well, with R 2 The values ​​are between 0.86757 and 0.97962, the RMSE values ​​are between 0.046754 and 0.34415, the MSE values ​​are between 0.034874 and 0.26021, the MAE values ​​are also between 0.034874 and 0.26021, and the MAPE value is 3.314×10 -5 The values ​​of RPD are between 3.1309 and 7.3258. These results not only verify the robustness of the model, but also highlight its wide applicability in practical applications.

[0393] The hydrogeological conditions in karst areas show a high degree of spatial heterogeneity due to the complex network of caves and fractures inside, which makes the prediction of groundwater flow paths and rates challenging. However, the PSA-CNN-LSTM-Attention model effectively overcomes this problem and can accurately predict water level changes even when the openness of groundwater flow channels may cause drastic fluctuations in water levels in a short period of time. The successful application of this model not only provides a new way to accurately predict groundwater levels in karst areas, but also proves its universality and promotion value in complex geological backgrounds.

[0394] According to the model prediction, the water level in September 2023 will show a decreasing trend, from 1098.75 meters to 1096.305 meters, which is consistent with the normal water level change trend of ZK2 borehole in September. The accuracy of this prediction result provides the inventor with reliable data support, based on which the inventor can take a variety of management measures to optimize water resource utilization and protection, including adjusting the amount of water pumped to adapt to the drop in water levels, adding water storage facilities to cope with possible drought periods, and strengthening water level monitoring and early warning systems to warn of potential water resource problems in advance, thereby ensuring the effective management and sustainable use of water resources.

[0395] The matters not described in detail in the present invention are all known technologies to those skilled in the art.

[0396] The embodiments of the present invention are given for the purpose of illustration and description, and are not intended to be exhaustive or to limit the invention to the disclosed forms. Many modifications and variations will be apparent to those of ordinary skill in the art. The embodiments are selected and described in order to better illustrate the principles and practical applications of the present invention and to enable those of ordinary skill in the art to understand the present invention and thereby design various embodiments with various modifications suitable for specific uses.

Claims

1. A karst groundwater level prediction method based on the PSA-CNN-LSTM-Attention deep learning algorithm is characterized by: The method steps are:

1. Data and input indicators; 2. Data processing; 3. Model selection and construction: processing and analyzing groundwater level data by comprehensively applying convolutional neural network (CNN), long short-term memory network (LSTM), attention mechanism (Attention) and PID search optimization algorithm (PSA); 4. Model verification.

2. The karst groundwater level prediction method based on the PSA-CNN-LSTM-Attention deep learning algorithm according to claim 1 is characterized in that: In step 1, the input indicators include rainfall, air pressure, air temperature, air temperature, relative humidity, evaporation, water level of the previous day and ground temperature.

3. The karst groundwater level prediction method based on the PSA-CNN-LSTM-Attention deep learning algorithm according to claim 1 is characterized in that: The second step includes: data cleaning, missing value processing, data set division, data normalization and data format conversion.

4. The karst groundwater level prediction method based on the PSA-CNN-LSTM-Attention deep learning algorithm according to claim 1 is characterized in that: In the step 4, the root mean square error (RMSE), mean absolute error (MAE), mean absolute percentage error (MAPE) and determination coefficient (R2) are used to measure the prediction performance of different runoff prediction models.

5. The karst groundwater level prediction method based on the PSA-CNN-LSTM-Attention deep learning algorithm according to claim 1 is characterized in that: In step 3, the convolutional neural network architecture consists of an input layer, a convolutional layer, a fully connected layer, and an output layer. The convolution operation is expressed as: Among them, f ij is an element of the output feature map, w mn is the weight in the convolution kernel, x (i+m)(j+n) is the element at the corresponding position in the input data, and k is the size of the filter.

6. The karst groundwater level prediction method based on the PSA-CNN-LSTM-Attention deep learning algorithm according to claim 1 is characterized in that: In step three, the information transfer process in the long short-term memory model is as follows: First is the previous output The sigmoid unit in the forget gate will determine which information in the cell state of Ct-1 is forgotten or retained. At this time, a vector between 0 and 1 will be output; 0 means discarding all information in Ct-1, and 1 means retaining all information. See the expression: Second, the input gate uses the previous output The current input xt determines what information needs to be updated; then, the tanh layer will receive and xt information to obtain candidate cell information It is possible to update the information in to the cell state; see the following expression: The operation of the forget gate above forgets the old cell information, and the input gate selects and increases the candidate cells. This series of operations will eventually The information is updated to obtain the new cell state C t ; See the following formula: Finally, the sigmoid unit in the output gate will determine which cell features are output. At this time, the tanh layer will output a vector between -1 and 1. The output vector and the control condition of the output gate jointly determine the output of the LSTM module unit; the following formula: h t =o t *tanh(C t ) LSTM controls the deletion and update transmission of information through these special gate switches, and realizes the nonlinear accumulation of historical information through cyclic operations, so it can effectively solve the long-term dependency problem of time series.

7. The karst groundwater level prediction method based on the PSA-CNN-LSTM-Attention deep learning algorithm according to claim 1 is characterized in that: In step 3, the application process of the SE attention mechanism is as follows: A: Perform a global average pooling operation on the input feature map to obtain a channel descriptor; the purpose of global average pooling is to capture the global information of each channel; this step can be expressed as Among them, H and W represent the height and width of the feature map respectively, and x i (h,w) represents the pixel value of the i-th channel at (h,w) on the feature map; B: The channel descriptor is input into two fully connected layers and activated with the Sigmoid activation function; the first fully connected layer compresses the dimension of the channel descriptor to 1 / 4 or other proportion of the original number of channels, which can reduce the amount of calculation and the number of parameters; then, the descriptor dimension is restored to the original number of channels through the second fully connected layer; the purpose of these two fully connected layers is to learn a weight for each channel, which can be expressed as: w i =F fc2 (σ(F fc (c))) Among them, F fc 、F fc2 Respectively represent the mapping functions of the first and second fully connected layers, σSigmoid activation function, wi is the weight of the i-th channel; C: Multiply the calculated channel weights by the original feature map channel by channel to achieve channel attention. This step can be expressed as: y i (h,w)=w i x i (h,w) where y i (h,w) is the value of the i-th channel of the feature map at position (h,w) after attention weighting; In this way, the SE attention mechanism enables the network to focus on key channels in the input feature map, thereby improving network performance. The SE attention mechanism can be easily integrated with various convolutional neural network structures because it only relies on channel descriptors and has relatively small computational and parameter overhead.

8. The karst groundwater level prediction method based on the PSA-CNN-LSTM-Attention deep learning algorithm according to claim 1 is characterized in that: In step 3, in the PID search optimization algorithm (PSA), a regulation factor called zero output is added to the original Δu(t) to prevent the algorithm from falling into a local optimum: Among them, r5 is a random number vector with n rows and d columns, ranging from 0 to 1; λ is an adjustment coefficient, calculated as follows:

Citation Information

Patent Citations

  • Underground water level multi-step prediction method based on convolutional attention long-short term neural network

    CN117520784A

  • Method and device for evaluating active voltage supporting capability of energy storage power station

    CN118505037A

  • Imminent precipitation forecast method and apparatus

    WO2023103587A1

Cited By

  • Underground water level prediction method and system based on multi-source data

    CN120875178A