Analysis method and system for water pumping data of aquifer

Through the LSTM prediction model combined with attention mechanism and loss function of physical constraints, combined with reinforcement learning algorithm to optimize the pumping strategy, the problems of low prediction accuracy and lag in the decision-making in the existing technology are solved, and high-precision and dynamic pumping data analysis and regulation are achieved.

CN120410068APending Publication Date: 2025-08-01GUIYANG ARCHITECTURAL SURVEY & DESIGN CO LTD

Patent Information

Application Number
CN202510497351.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-21
Publication Date
2025-08-01

AI Technical Summary

Technical Problem

The existing aquifer pumping data analysis technology has problems such as low prediction accuracy, lag in decision making and difficulty in dealing with complex dynamic environments.

Method used

The LSTM prediction model is used to combine attention mechanism and loss function of physical constraints, and combined with reinforcement learning algorithm to optimize the pumping strategy. Through data acquisition, preprocessing, feature extraction and model training, a closed-loop control system is built to achieve the tight coupling of water level prediction and pumping strategy.

Benefits of technology

The accuracy of pumping data prediction is improved, decision-making lag is reduced, and critical moment information can be adaptively identified, ensuring that the prediction results are in line with the groundwater flow laws, and dynamic regulation is achieved through reinforcement learning, improving the intelligence level of pumping strategies.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120410068A_ABST
    Figure CN120410068A_ABST
Patent Text Reader

Abstract

The invention discloses an analysis method and system for water pumping data of an aquifer, and relates to the technical field of intelligent water system regulation and control, and the method comprises the steps: collecting water pumping data, and carrying out the preprocessing to obtain a standard input sequence; an LSTM prediction model is constructed, and improvement is carried out in combination with an attention mechanism; updating parameters of the LSTM prediction model by using a physical constraint introduced loss function, and outputting predicted water level data; and using a reinforcement learning algorithm to optimize a water pumping strategy according to the water pumping data and the predicted water level data. According to the method, a state vector containing the current actual water level, the water pumping amount and the environment variable is constructed, so that the RL algorithm dynamically regulates and controls the water pumping operation according to the prospective information. Value learning is carried out on actions by utilizing a deep Q network, and closed-loop collaborative updating of a prediction model and a decision network is realized through joint loss in an online operation process, so that the intelligent level of a water pumping strategy is effectively improved, the risk of too low water level is avoided, and the overall operation efficiency is optimized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of intelligent water system regulation, and particularly to an analysis method and system for aquifer pumping data. Background Art

[0002] With the continuous development of the exploitation and utilization of groundwater resources and hydrological monitoring technologies, the analysis technology of aquifer pumping data has become an important part of the groundwater management field. In the past few decades, traditional pumping data analysis mainly relied on statistical regression, empirical rules, and physical hydrological models. By collecting pumping records and monitoring well water level data, combined with multivariate analysis, the aquifer water level was predicted and regulated. However, with the progress of acquisition equipment and the continuous improvement of the informatization level, the data volume has increased sharply, and the complex non-linear characteristics of the groundwater system have gradually emerged. Single statistical models and experience-based rule methods can no longer meet the needs of modern groundwater resource management in terms of prediction accuracy and response speed. At the same time, although groundwater simulation technology based on physical principles can reflect the system mechanism, its high parameter calibration cost, strict data requirements, and long simulation period make it difficult to achieve real-time pumping regulation. In recent years, the successful application of intelligent algorithms such as machine learning, deep neural networks, and reinforcement learning in various fields has provided new ideas for the accurate prediction and dynamic regulation of aquifer pumping data, showing obvious advantages over traditional methods and becoming a new trend to promote the intelligent processing of hydrological data.

[0003] In the prior art, traditional pumping data analysis methods generally have problems such as large prediction errors, limited applicable ranges, and lagged decision-making responses. Especially in the protection and rational utilization of groundwater resources and the prevention and control of land subsidence and ecological damage caused by excessive pumping, they show relatively prominent deficiencies. At the same time, existing hydrological models cannot fully capture the complex non-linear relationship between pumping volume and water level. Coupled with the lack of effective exploration of time series dependence and uncertainty factors in data processing, the prediction results and regulation strategies are difficult to meet the actual application requirements. Summary of the Invention

[0004] In view of the above problems, the present invention is proposed.

[0005] Therefore, the technical problem solved by the present invention is that the existing aquifer pumping data analysis technology has problems such as low prediction accuracy, lagged decision-making, and difficulty in coping with complex dynamic environments.

[0006] To solve the above technical problems, the present invention provides the following technical solution: An analysis method for aquifer pumping data, comprising:

[0007] Collect pumping data, and obtain a standard input sequence after preprocessing;

[0008] Construct an LSTM prediction model and improve it by combining the attention mechanism;

[0009] Update the parameters of the LSTM prediction model using a loss function with physical constraints introduced, and output the predicted water level data;

[0010] Use a reinforcement learning algorithm to optimize the pumping strategy based on the pumping data and the predicted water level data.

[0011] As a preferred solution of the analysis method for aquifer pumping data according to the present invention, wherein: the preprocessing includes collecting water level time series data, pumping records, and other environmental data obtained from groundwater level sensors, and performing cleaning, time series alignment, and feature extraction;

[0012] The cleaning includes removing abnormal data, filling in missing values, and using differences and filling based on historical data;

[0013] The time series alignment includes aligning the data according to a unified timestamp to form a multi-dimensional input data sequence in a standard format;

[0014] The feature extraction includes extracting features from the pumping data, water level data, and environmental data.

[0015] As a preferred solution of the analysis method for aquifer pumping data according to the present invention, wherein: the LSTM prediction model includes splitting and constructing features from the original data, and inputting the original data matrix X, where represents a real number; T represents the time step; n represents the number of each feature, including the historical water level y, pumping volume Q, and other environmental variables;

[0016] Cut the data sequence into sample pairs (X t-T+1:t , y t ) using a sliding window method, where X t-T+1:t represents the input sequence data from time t - T + 1 to time t; t represents the index of the current time step; y t represents the output target, i.e., the water level value at time point t; each input sample is multi-variable data for the past T time points, and the output target is the water level at the t-th moment;

[0017] Design an LSTM model, calculate for each time step t, use an input gate, combine the current input and the previous hidden state, and process through learnable weights and biases to determine the current information;

[0018] The forget gate determines the retention degree of the memory at the previous moment; the candidate memory unit generates a candidate memory value through the weighted sum of the input data and the hidden state at the previous moment; the updated memory unit adjusts the state of the current memory unit according to the outputs of the input gate and the forget gate; the hidden state update and the output gate output the hidden state at the current moment according to the processing result; extract the features of long-term dependencies in the standard input sequence.

[0019] As a preferred scheme of the analysis method for the aquifer pumping data described in the present invention, wherein: the combined attention mechanism includes calculating the attention weights after obtaining the entire LSTM output sequence {h1, h2, …, h T}, where h i represents the feature representation at the time step, i = 1, …, T; after obtaining all the hidden states corresponding to the entire sliding window, calculate the attention weights for the hidden state at each time step, score each hidden state through a set of trainable linear mappings, and then normalize using the Softmax operation to obtain the importance weights at each moment;

[0020] Weightedly sum all the hidden states according to their attention weights to form a context vector c, a t represents the proportion of importance in the output prediction at the moment;

[0021] The output context vector c captures the importance at each moment in the time series, and inputs the context vector into a fully connected layer, and uses the linear transformation within the layer to generate the predicted water level value at the next moment

[0022] By introducing a random Dropout operation in the test or prediction stage, calculate the distribution of the outputs through multiple forward inferences to obtain the prediction uncertainty

[0023] As a preferred scheme of the analysis method for the aquifer pumping data described in the present invention, wherein: the loss function introducing physical constraints includes integrating physical constraints into the loss function to ensure that the model prediction conforms to the physical conduction law of groundwater, that is, the relationship between the pumping volume and the water level drop; introducing a physical constraint term to define the physical loss, and according to the groundwater flow theory, multiplying the pumping volume by the water temperature coefficient to estimate the water level change;

[0024] During the training process, calculate the error between the difference between the current water level and the water level at the previous moment and the theoretical water level change at each time step; take the mean square of the error as the physical constraint loss;

[0025] Define the overall loss function as L total , dynamically adjust the parameters, initially set λ0 to represent the importance of controlling the physical constraints. If the mean square error loss L MSEIf it deviates from the preset empirical threshold, update λ according to the rule new = λ0×(1 + ρ), so that the physical constraint obtains a greater weight in gradient descent;

[0026] Update all parameters using the backpropagation algorithm, including the weights of the LSTM, the parameters of the attention layer, the parameters of the fully connected layer, and the physical constraint coefficient λ. Use the Adam optimizer, set the learning rate η, and the LSTM model combined with the attention mechanism minimizes L total Iteratively update until convergence.

[0027] As a preferred solution of the analysis method for aquifer pumping data described in the present invention, wherein: the reinforcement learning algorithm includes, to achieve tight coupling with the water level prediction module, directly integrating the prediction result into the state vector of the reinforcement learning wherein, y t represents the current actual water level; Q t represents the current pumping volume; and respectively represent the predicted mean and uncertainty; E t represents other environmental variables;

[0028] Define the action space, set three discrete operations. If a t = 0, then maintain the existing pumping volume; if a t = +ΔQ, then increase pumping; if a t = -ΔQ, then reduce pumping;

[0029] Construct the reward function r t , the reward function r t considers economic benefits and water level safety, and integrates the prediction uncertainty to obtain the weighted sum of the economic benefit term, the water level safety penalty, the operation adjustment cost, and the uncertainty penalty term; wherein, B(Q t ) represents the economic benefit brought by pumping; represents the penalty for the predicted water level being lower than the safety lower limit L min ; C(a t ) represents the operation adjustment cost; α, β, γ, δ represent adjustment coefficients.

[0030] As a preferred solution of the analysis method for aquifer pumping data described in the present invention, wherein: the optimized pumping strategy includes constructing a deep Q network for optimizing the pumping strategy, using DQN to learn the state-action value function Q(s, a), and its update rule is to record the transitions of each state, action, reward, and next state into the experience pool; randomly draw a small batch of samples from the experience pool, and use the TD temporal difference error to update the Q network;

[0031] During the online update process, as the pumping operation is executed, the actual feedback data and prediction errors accumulate continuously. If it is found that RL receives poor feedback and the actual water level remains lower than the prediction, the parameters of both the water level prediction module and the RL policy network will be jointly fine-tuned to construct a joint loss L total ,; The joint update forms a globally optimal control strategy to simultaneously correct and optimize the water level prediction and pumping strategy in the parameter space;

[0032] Based on experience replay sampling and state feedback, an ε-greedy exploration strategy is adopted to adaptively reduce the exploration rate to ensure convergence to the optimal solution after the system state stabilizes.

[0033] As a preferred embodiment of the analysis system for aquifer pumping data described in the present invention, it includes a data acquisition module, a water level prediction module, a pumping strategy optimization module, and an online update module;

[0034] The data acquisition module is used to collect pumping records, water level monitoring data, and other environmental variables in real time, and form a standard input sequence after cleaning, time series alignment, and feature extraction;

[0035] The water level prediction module constructs a time series model using historical data to generate the water level prediction value and uncertainty index for the next time step;

[0036] The pumping strategy optimization module uses the output of the water level prediction module, combines the current actual water level, pumping volume, and environmental variables to form a state vector, and adopts a deep Q-network to learn the optimal pumping action;

[0037] The online update module trains the water level prediction model and the reinforcement learning strategy separately in the offline stage; updates the parameters of both modules simultaneously according to the actual operation feedback to achieve closed-loop correction and joint optimization.

[0038] A computer device includes a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, the steps of the analysis method for aquifer pumping data are implemented.

[0039] A computer-readable storage medium stores a computer program thereon, and when the computer program is executed by a processor, the steps of the analysis method for aquifer pumping data are implemented.

[0040] Advantages of the present invention: The analysis method for aquifer pumping data provided by the present invention can adaptively identify critical moment information in the sequence based on data segmentation and feature construction. At the same time, physical constraints are used to ensure that the prediction conforms to the groundwater flow law. Further, the predicted mean and uncertainty are directly fed back to the reinforcement learning module to construct a state vector including the current actual water level, pumping volume, and environmental variables, enabling the RL algorithm to dynamically regulate pumping operations according to forward-looking information. The deep Q-network is used to learn the value of actions, and during online operation, the closed-loop collaborative update of the prediction model and the decision network is achieved through the joint loss, thereby effectively improving the intelligence level of pumping strategies, avoiding the risk of too low water levels, and optimizing the overall operation efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] To more clearly illustrate the technical solutions of the embodiments of the present invention, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.

[0042] Figure 1 It is the overall flowchart of an analysis method for aquifer pumping data provided by the first embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0043] To make the above objects, features, and advantages of the present invention more obvious and understandable, the following will describe the specific embodiments of the present invention in detail with reference to the drawings of the specification. Obviously, the described embodiments are some, but not all, of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the scope of protection of the present invention.

[0044] Example 1, referring to Figure 1 , which is an embodiment of the present invention, provides an analysis method for aquifer pumping data, including:

[0045] S1: Collect pumping data and obtain a standard input sequence after preprocessing.

[0046] Furthermore, the preprocessing includes collecting water level time series data, pumping records, and other environmental data obtained from groundwater level sensors, and performing cleaning, time series alignment, and feature extraction;

[0047] The cleaning includes removing abnormal data, filling missing values, using differences, and filling based on historical data.

[0048] The time alignment described above includes aligning the data according to a unified timestamp to form a multi-dimensional input data sequence in a standard format.

[0049] The feature extraction described above includes extracting features from the pumping data, water level data, and environmental data.

[0050] By tightly coupling the water level prediction and the pumping strategy optimization in data acquisition, feature extraction, model output, and state definition, a continuous closed-loop control system is achieved. Specifically, the water level prediction model not only outputs the predicted mean of the future water level, but also combines the measurement results of uncertainty (such as prediction variance or confidence interval), and uses these data as part of the state of the reinforcement learning decision-making module.

[0051] It should be noted that this coupling ensures that the decision-making module can promptly reflect the information changes of the prediction module, anticipate future risks, so that the entire system can automatically correct, dynamically optimize, and continuously improve during operation, effectively reducing the risks caused by prediction errors or data noise.

[0052] S2: Construct an LSTM prediction model and improve it by combining the attention mechanism.

[0053] Furthermore, the LSTM prediction model includes splitting and constructing features from the original data, and inputting the original data matrix where T represents the time step; n represents the number of each feature, including the historical water level y, pumping volume Q, and other environmental variables.

[0054] Using the sliding window method to cut the data sequence into sample pairs, (X t-T+1:t , y t ), each input sample is multi-variable data of the past T time points, and the target is the water level at the t-th moment.

[0055] Design the LSTM model structure and calculate for each time step t, including the input gate, which combines the current input and the previous hidden state, and processes through learnable weights and biases to determine the current information; the calculation formula for each time step t is as follows:

[0056] i t = σ(W xi x t + W hi h t-1 + b i )

[0057] f t = σ(W xf x t + W hf h t-1 + b f )

[0058]

[0059] o t = σ(W xo x t + W ho h t-1 + b o )

[0060]

[0061] where σ(·) represents the sigmoid function, and ⊙ is the element-wise product. x t represents the input feature vector at time t, and y t represents the actual water level value at time t, and i t represents the input gate activation value, and W xi represents the weight matrix input to the input gate, and W hi represents the weight matrix from the hidden state to the input gate, and b i represents the input gate bias, and σ(·) is the sigmoid activation function. f t represents the forget gate activation value, and the corresponding weight matrices W xf , W hf and the bias b f are the same by analogy. represents the candidate cell state, and c t represents the cell state. o t represents the output gate activation value, and h t represents the hidden state. Each weight and bias W xi , W hi ,,W xf , W hf , W xc , W hc , W xo , W ho represent the weight matrices from each input and hidden state to each gate. b i ,b f ,b c ,b o are the corresponding bias terms respectively.

[0062] The forget gate determines the degree of retention of the previous moment's memory; as the target output candidate memory unit of the prediction model, it generates a candidate memory value through the weighted sum of the input data and the previous moment's hidden state; the updated memory unit adjusts the state of the current memory unit according to the outputs of the input gate and the forget gate; the hidden state update and the output gate output the hidden state at the current moment according to the processing result; and it extracts the features of long-term dependencies in the standard input sequence.

[0063] The combined attention mechanism includes obtaining the context vector using the self-attention mechanism after obtaining the entire LSTM output sequence {h1, h2, …, h T}, which is expressed by the formula:

[0064]

[0065] The output context vector c captures the importance of each moment in the time series. Finally, the water level prediction is obtained through the fully connected layer:

[0066]

[0067] Adding a physical constraint term (i.e., restricting the relationship between the pumping volume and the water level change using hydrological physical laws) can make the model output more conform to the actual law of groundwater flow. This innovation not only improves the robustness of the model in the face of non-linear and complex dynamic environments, but also combines the advantages of data-driven models and domain physical knowledge, making the prediction results more credible and interpretable.

[0068] It should be noted that by introducing the attention mechanism into the traditional LSTM time series model, the system can autonomously identify and focus on the data features of key time nodes, enhancing the model's ability to capture important information, thereby improving the prediction accuracy.

[0069] S3: Update the parameters of the LSTM prediction model using the loss function with physical constraints and output the predicted water level data.

[0070] Furthermore, the loss function with physical constraints includes the physical constraint integrated loss function.

[0071] To ensure that the model prediction conforms to the physical conduction law of groundwater (such as the relationship between the pumping volume and the water level drop), a physical constraint term is introduced. Define the physical loss:

[0072]

[0073] Where: Δy t = y t - y t-1 represents the actual water level change; φ(Q t ) is the theoretical water level change function set according to physical principles (such as the simplified form of Darcy's law), and a linear relationship φ(Q t ) = kQ t can be taken, where k is the hydrological coefficient (obtained by fitting experimental data).

[0074] The overall loss function is:

[0075] L total = L MSE + λLphysics

[0076] Among them: The parameter λ controls the importance of physical constraints.

[0077] Dynamically adjust the parameter. Initially, set λ0 = 0.1. If L on the validation set MSE is large, it indicates that the model deviates from the physical law and can be updated according to the rule:

[0078] λ new = λ old × (1 + ρ), where ρ = 0.05,

[0079] so that the physical constraint obtains a greater weight in gradient descent, which helps to improve the rationality of prediction.

[0080] Use the backpropagation algorithm to update all parameters, including the weights of LSTM, the parameters of the attention layer, the parameters of the fully connected layer, and the physical constraint coefficient λ. Use the Adam optimizer and set the learning rate η = 0.001. The entire model is iteratively updated by minimizing L total until convergence.

[0081] The optimization of the pumping strategy part completes the active adjustment of risks by introducing the uncertainty of water level prediction into the state vector and the reward function. When the prediction module outputs high uncertainty (indicating large fluctuations or uncertainties in future water levels), the penalty term added to the reward function will make the agent automatically tend to adopt a more conservative pumping strategy.

[0082] It should be noted that the innovation of this method lies in not only considering the current data and states, but also preventing possible future risks, so as to achieve the goal of balancing economic benefits and safety management and avoid overly aggressive or inappropriate pumping operations due to prediction errors.

[0083] S4: Use the reinforcement learning algorithm to optimize the pumping strategy according to the pumping data and the predicted water level data.

[0084] Furthermore, the reinforcement learning algorithm includes directly integrating the prediction result into the state vector of the reinforcement learning to achieve tight coupling with the water level prediction module:

[0085]

[0086] where y t is the current actual water level; Q t is the current pumping volume; and are the prediction mean and uncertainty respectively; E t includes other environmental variables.

[0087] In this way, the status not only contains real-time information, but also integrates forward-looking predictive data, making strategic decisions more risk-predictive.

[0088] Action and reward design, defining the action space and setting three discrete operations:

[0089] If a t =0, then maintain the existing pumping volume; if a t =+ΔQ, then increase pumping; if a t =-ΔQ, then reduce pumping;

[0090] Construct a reward function that not only considers economic benefits and water level safety, but also integrates prediction uncertainty. The formula is expressed as:

[0091]

[0092] Among them, B(Q t )=k1Q t It represents the economic benefits brought by water pumping; To predict the water level is lower than the safety limit L min Punishment; C(a t )=|a t | represents the operation adjustment cost; α, β, γ, and δ represent adjustment coefficients. The recommended initial values are: α=1.0, β=2.0, γ=0.5, and δ=0.2.

[0093] Here, additional The item makes the agent tend to choose more conservative pumping actions to ensure water resource security when the prediction uncertainty is high.

[0094] The current real water level, the current pumping volume, the predicted water level obtained from the LSTM model and its uncertainty (the uncertainty index of the prediction) are integrated into a complete state description.

[0095] The algorithm is designed to take three actions: maintain current pumping, increase pumping, or decrease pumping. The reward function comprehensively considers the economic benefits of pumping, penalties if the predicted water level falls below a safe lower limit, operational costs, and the risks associated with forecast uncertainty, thus incentivizing the algorithm to take conservative measures in high-risk situations.

[0096] The Deep Q-Network (DQN) learns the optimal pumping strategy through trial and error, while employing techniques such as experience replay and target networks to ensure training stability. Furthermore, during online operation, if poor performance is detected, the system will adjust the parameters of both the water level prediction and the pumping strategy for joint optimization.

[0097] The optimized pumping strategy includes a Deep Q-Network (DQN). The DQN is used to learn the state-action value function Q(s,a), and its update rule is as follows:

[0098] Q(st,at)←Q(st,at)+ηRL(r t +γRLmax a′ Q(st+1,a′)-Q(st,at)).

[0099] The prioritized experience replay and target network mechanisms ensure training stability.

[0100] During the online update process, as the pumping operation is executed, the actual feedback data and prediction errors accumulate continuously. If it is found that RL receives poor feedback and the actual water level continues to be lower than the prediction, the parameters of the water level prediction module and the RL policy network will be jointly fine-tuned, and a joint loss will be constructed:

[0101] L total =L pred +μL RL

[0102] where L RL is the TD error of DQN, and μ represents the weight controlling the two. The joint update helps to form a globally optimal control strategy, enabling the water level prediction and the pumping strategy to be corrected and optimized simultaneously in the parameter space.

[0103] The exploration strategy is adaptively adjusted. Based on experience replay sampling and state feedback, the ε-greedy exploration strategy is adopted to adaptively reduce the exploration rate, ensuring convergence to the optimal solution after the system state stabilizes:

[0104] εnew=max(εmin,εold×decay r ate)

[0105] Let the initial ε = 0.9, the minimum value εmin = 0.05, and the decay rate decay_rate = 0.99.

[0106] It should be noted that by constructing a joint loss function (combining the mean square error of water level prediction with physical loss and the TD error of reinforcement learning), the parameters of the two modules are complementary and co-optimized during the offline training and online update processes. This joint training method enables the water level prediction and pumping decision to synchronously adjust the model parameters after receiving the actual operation feedback, ensuring that the overall system continuously self-corrects and improves as the environment changes, and thus achieving more stable, efficient, and intelligent groundwater resource management.

[0107] Example 2 is an embodiment of the present invention, which provides an analysis method for aquifer pumping data. In order to verify the beneficial effects of the present invention, scientific demonstration is carried out through economic benefit calculation and simulation experiments.

[0108] First, a groundwater management area was used as the test object. Groundwater level sensors, pumping equipment, and meteorological monitoring instruments were deployed in the area to realize the real-time collection of multi-source data. First, the collected water level time series data, pumping records, and related environmental data (including rainfall, temperature, humidity, etc.) were preliminarily cleaned to remove outliers and noise generated during the detection process, and missing values were filled with historical data. Subsequently, various types of data were normalized according to a unified timestamp through time series alignment technology to form a standard multi-dimensional input data sequence. In the feature extraction stage, key features such as flow rate, cumulative pumping volume, and rate of change in water level data were extracted and normalized to ensure that the data can reflect both the pumping dynamics and the changing trend of the groundwater level.

[0109] An LSTM model was used to extract the intrinsic relationships in the time series. The importance weights of the hidden states at each time step were calculated through an attention mechanism. The weighted summation of these weights formed a context vector, and the predicted water level for the next moment was output through a fully connected layer. Furthermore, a physical constraint term based on groundwater flow theory was incorporated into the model's loss function to form a total loss function. A pumping strategy optimization model based on a deep Q-network (DQN) was constructed, integrating the predicted mean and uncertainty output by the water level prediction module. Throughout the experimental process, data collection, model training, and decision feedback formed a closed-loop control system, ensuring that in practical applications, it could dynamically respond to groundwater changes and adjust pumping operations.

[0110] The improved solution proposed in this embodiment shows significant advantages in many key indicators. First, observing the average prediction error parameter, the traditional old technology test objects A and B have prediction errors of 0.50m and 0.48m respectively. After the improvement, their average prediction errors are reduced to 0.30m and 0.28m respectively, which is at least 40% lower than the old technology. This shows that by introducing the attention mechanism and physical constraints, the LSTM model can better capture the temporal characteristics of aquifer pumping data, thereby significantly improving the prediction accuracy. Secondly, the prediction uncertainty indicator shows that the prediction uncertainty of the old technology is above 0.35m, while this indicator of the improved system gradually decreases, and the test object G is only 0.18m. This shows that with the addition of random dropout and multiple forward inference methods, the uncertainty estimate is more accurate, providing a more reliable risk reference for subsequent decision-making, thereby helping the reinforcement learning module to fully utilize the prediction information in the state space and make more reasonable pumping adjustments.

[0111] In terms of the economic benefit coefficient data, during the optimization process of the pumping strategy in the improved system, by comprehensively weighing factors such as economic benefits, pumping costs, and safety water levels in the reward function, higher benefits can be obtained in actual operation. The economic benefit coefficient of the prior art is about 70% at 1.25 m, while the improved system, by predicting water level changes in advance and effectively reflecting the uncertainty of the prediction in the strategy, ensures more cautious pumping decisions, increasing the water level safety margin to 1.75 m, fully demonstrating a higher level of protection for groundwater safety by the system.

[0112] In addition, the pumping strategy adjustment rate, an indicator, reflects the stability and continuity of the system's pumping strategy. The strategy adjustment rate of the prior art is 14%, decreasing from 120 iterations to 650.97. Compared with 0.85 - 0.86 of the prior art, it shows that with the support of a large number of training samples and data feedback, the stability and generalization ability of the model have been greatly improved.

[0113] Embodiment 3, an embodiment of the present invention, provides an analysis system for aquifer pumping data, including a data acquisition module, a water level prediction module, a pumping strategy optimization module, and an online update module.

[0114] The data acquisition module is used to collect pumping records, water level monitoring data, and other environmental variables in real time, and form a standard input sequence after cleaning, time series alignment, and feature extraction.

[0115] The water level prediction module constructs a time series model using historical data to generate the water level prediction value and uncertainty index for the next time step.

[0116] The pumping strategy optimization module uses the output of the water level prediction module, combines the current actual water level, pumping volume, and environmental variables to form a state vector, and adopts a deep Q - network to learn the optimal pumping action.

[0117] The online update module trains the water level prediction model and the reinforcement learning strategy separately in the offline stage; updates the parameters of the two modules simultaneously according to the actual operation feedback to achieve closed - loop correction and joint optimization.

[0118] If a function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods according to various embodiments of the present invention. The aforementioned storage medium includes: USB flash drives, mobile hard disks, read-only memories (ROMs), random access memories (RAMs), magnetic disks, or optical discs, etc., which are all media that can store program codes.

[0119] The logic and / or steps represented in the flowchart or described in other ways herein, for example, can be considered as a definite sequence list of executable instructions for implementing logical functions, and can be specifically implemented in any computer-readable medium for use by an instruction execution system, apparatus, or device (such as a computer-based system, a system including a processor, or other systems that can fetch instructions from the instruction execution system, apparatus, or device and execute the instructions), or used in combination with these instruction execution systems, apparatus, or devices. For the purposes of this specification, a "computer-readable medium" can be any device that can contain, store, communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.

[0120] More specific examples (non-exhaustive list) of computer-readable media include the following: electrical connection parts with one or more wirings (electronic devices), portable computer disk cartridges (magnetic devices), random access memories (RAMs), read-only memories (ROMs), erasable programmable read-only memories (EPROMs or flash memories), optical fiber devices, and portable compact disc read-only memories (CDROMs). Additionally, a computer-readable medium can even be paper or other suitable media on which a program can be printed, because the program can be obtained electronically, for example, by optically scanning the paper or other media, then editing, interpreting, or otherwise processing it as appropriate, and then storing it in a computer memory.

[0121] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, any one or a combination of the following techniques well known in the art can be used: discrete logic circuits having logic gate circuits for implementing logical functions on data signals, application specific integrated circuits having appropriate combinational logic gate circuits, programmable gate arrays (PGAs), field programmable gate arrays (FPGAs), etc. It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit them. Although the present invention has been described in detail with reference to the preferred embodiments, those of ordinary skill in the art should understand that the technical solutions of the present invention can be modified or equivalently replaced without departing from the spirit and scope of the technical solutions of the present invention, and they should all be covered within the scope of the claims of the present invention.

[0122] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit them. Although the present invention has been described in detail with reference to the preferred embodiments, those of ordinary skill in the art should understand that the technical solutions of the present invention can be modified or equivalently replaced without departing from the spirit and scope of the technical solutions of the present invention, and they should all be covered within the scope of the claims of the present invention.

Claims

1. A method for analyzing aquifer pumping data, characterized in that, It includes: Collect pumping data and obtain a standard input sequence after preprocessing; Construct an LSTM prediction model and improve it by combining an attention mechanism; Use a loss function introducing physical constraints to update the parameters of the LSTM prediction model and output the predicted water level data; Use a reinforcement learning algorithm to optimize the pumping strategy according to the pumping data and the predicted water level data.

2. The analysis method of aquifer pumping data according to claim 1, wherein: The preprocessing includes collecting the water level time series data, pumping records and other environmental data obtained from the groundwater level sensor, and performing cleaning, time series alignment and feature extraction; The cleaning includes removing abnormal data, filling in missing values, using differences and filling based on historical data; The time series alignment includes aligning the data according to a unified timestamp to form a multi-dimensional input data sequence in a standard format; the feature extraction includes extracting features from the pumping data, water level data and environmental data.

3. The analysis method of aquifer pumping data according to claim 2, wherein: The LSTM prediction model includes splitting the original data and constructing features, and inputting the original data matrix X, where represents a real number; T represents the time step; n represents the number of each feature, including the historical water level y, the pumping volume Q, and other environmental variables; The data sequence is sliced into sample pairs (X t-T+1:t , y t ) using a sliding window method, where X t-T+1:t represents the input sequence data from time t - T + 1 to time t; t represents the index of the current time step; y t represents the output target, i.e., the water level value at time point t; each input sample is multivariate data of the past T time points, and the output target is the water level at the t-th moment; Design an LSTM model, calculate for each time step t, use an input gate, combine the current input and the previous hidden state, and determine the current information through learnable weights and biases; The forget gate determines the retention degree of the previous memory; the candidate memory unit generates a candidate memory value through the weighted sum of the input data and the previous hidden state; the updated memory unit adjusts the state of the current memory unit according to the outputs of the input gate and the forget gate; the hidden state update and the output gate output the hidden state at the current moment according to the processing result; extract the long-term dependence features in the standard input sequence.

4. The analysis method of aquifer pumping data according to claim 3, characterized in that: The combined attention mechanism includes calculating attention weights after obtaining the entire LSTM output sequence {h1, h2, …, h T}, where h i represents the feature representation at the time step, i = 1, ..., T; after obtaining all the hidden states corresponding to the entire sliding window, calculate the attention weights for the hidden state at each time step, score each hidden state through a set of trainable linear mappings, and then normalize using the Softmax operation to obtain the importance weights at each moment; Weighted sum all the hidden states according to their attention weights to form a context vector c, a t indicating the proportion of importance in the output prediction at the moment; The output context vector c captures the importance of each moment in the time series. The context vector is input into a fully connected layer, and the linear transformation within the layer is used to generate the predicted water level value for the next moment. By introducing a random Dropout operation during the testing or prediction phase and calculating the distribution of the outputs through multiple forward inferences, the prediction uncertainty is obtained.

5. The analysis method of aquifer pumping data according to claim 4, wherein: The loss function introducing physical constraints includes introducing a physical constraint term, multiplying the pumping volume by the hydrological coefficient k to estimate the water level change; taking the relationship between the pumping volume and the water level drop as a physical constraint and integrating it into the loss function; During the training process, calculate the error between the difference between the current water level and the previous water level and the theoretical water level change at each time step; take the mean square of the error as the physical constraint loss; Define the overall loss function as L total , dynamically adjust the parameter. Initially, set λ0 to represent the importance of controlling physical constraints. If the mean square error loss L MSE deviates from the preset empirical threshold, then update λ according to the rule new = λ0×(1 + ρ), where ρ represents the dynamic adjustment parameter; Update all parameters using the backpropagation algorithm, including the weights of the LSTM, the parameters of the attention layer, the parameters of the fully connected layer, and the physical constraint coefficient λ. Use the Adam optimizer, set the learning rate η, and the LSTM model combined with the attention mechanism minimizes L total Iteratively update until convergence.

6. The analysis method of aquifer pumping data according to claim 5, wherein: The reinforcement learning algorithm includes directly integrating the prediction result into the state vector of the reinforcement learning to achieve tight coupling with the water level prediction module. Among them, y t represents the current actual water level; Q t represents the current pumping volume; and respectively represent the prediction mean and uncertainty; E t represents other environmental variables; Define the action space and set three discrete operations. If a t = 0, then maintain the existing pumping volume; if a t = +ΔQ, then increase pumping; if a t = -ΔQ, then decrease pumping; Construct the reward function r t , the reward function r t considers economic benefits and water levels safety, and integrates prediction uncertainty is obtained by weighted summation of the economic benefit term, water level safety penalty, operation adjustment cost, and uncertainty penalty term; where B(Q t ) represents the economic benefits brought by pumping; represents the penalty for the predicted water level being lower than the safety lower limit L min ; C(a t ) represents the operation adjustment cost; α, β, γ, δ represent adjustment coefficients.

7. The analysis method of aquifer pumping data according to claim 6, characterized in that: The optimization of the pumping strategy includes constructing a deep Q network for optimizing the pumping strategy, using DQN to learn the state-action value function Q, and its update rule is to store the conversion records of each state, action, reward and the next state in the experience pool; randomly extract a small batch of samples from the experience pool and use the TD time difference error to update the Q network; During the online update process, as the pumping operation is executed, the actual feedback data and prediction errors continuously accumulate. If it is found that RL receives poor feedback and the actual water level continues to be lower than the prediction, the parameters of the water level prediction module and the RL policy network will be jointly fine-tuned to construct a joint loss L total ; The joint update forms a globally optimal control strategy to simultaneously correct and optimize the water level prediction and pumping strategy in the parameter space; Based on experience replay sampling and state feedback, adopt an ε-greedy exploration strategy to adaptively reduce the exploration rate and ensure convergence to the optimal solution after the system state is stable.

8. A system using the analysis method of aquifer pumping data as described in any one of claims 1 to 7, characterized in that: It includes a data acquisition module, a water level prediction module, a pumping strategy optimization module, and an online update module; The data acquisition module is used to collect pumping records, water level monitoring data and other environmental variables in real time, and form a standard input sequence after cleaning, time series alignment and feature extraction; The water level prediction module uses historical data to construct a time series model and generate the water level prediction value and uncertainty index for the next time step; The pumping strategy optimization module uses the output of the water level prediction module, combines the current actual water level, pumping volume and environmental variables to form a state vector, and adopts a deep Q network to learn the optimal pumping action; The online update module trains the water level prediction model and the reinforcement learning strategy separately during the offline stage, and updates the parameters of both modules simultaneously according to the actual operation feedback to achieve closed-loop correction and joint optimization.

9. A computer device, comprising a memory and a processor, the memory storing a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the analysis method of the aquifer pumping data according to any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the analysis method of the aquifer pumping data according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Intelligent adjusting method for technical water supply system in pumped storage power station

    CN117666339A

  • Well and canal combined irrigation area water distribution optimization method and system based on deep reinforcement learning

    CN118940918A

  • Optimization method for dynamic monitoring of underground water level

    CN119416114A

Cited By

  • Fault detection method and system based on intelligent electric meter

    CN121500226A