A groundwater level prediction method and system based on a double-branch network

By adopting a prediction method based on dual-branch networks, the problems of data discontinuity and missing data in groundwater level prediction are solved. By utilizing generative adversarial networks and particle swarm optimization techniques, high-precision groundwater level prediction and early warning are achieved.

CN123158128APending Publication Date: 2026-11-24XINJIANG ACADEMY OF AGRI & RECLAMATION SCI
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611443612.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-17
Publication Date
2026-11-24

AI Technical Summary

Technical Problem

Existing groundwater level prediction methods struggle to balance short-term fluctuations, long-term data gaps, outliers, and differences in accuracy across different forecasting steps when faced with challenges such as discontinuous sampling, long-term data gaps, outliers, and variations in accuracy across different forecasting steps. This results in insufficient prediction accuracy and early warning stability.

Method used

A prediction method based on a dual-branch network is adopted. A missing mask is generated by unifying the time scale and identifying outliers. Generative adversarial networks are used to fill in long missing segments. Features are extracted by combining convolutional and long short-term memory networks. The model parameters are adjusted by particle swarm optimization to generate groundwater level prediction values ​​and early warning results.

Benefits of technology

It improves the accuracy of groundwater level prediction and the reliability of early warning under conditions of missing data, improves the balance between the error of long missing data segments and short-term disturbances and long-term trends, and generates stable early warning results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure REF-OBJ-1789615626117-000002
    Figure REF-OBJ-1789615626117-000002
  • Figure REF-OBJ-1789615626117-000003
    Figure REF-OBJ-1789615626117-000003
  • Figure REF-OBJ-1789615626117-000004
    Figure REF-OBJ-1789615626117-000004
Patent Text Reader

Abstract

This invention discloses a groundwater level prediction method and system based on a dual-branch network, belonging to the field of intelligent prediction and early warning technology for groundwater resources. The method involves collecting historical groundwater level sequences and driving factors from groundwater monitoring wells; performing time-scale unification, anomaly identification, and normalization on the data, and generating a missing mask; using interpolation to complete short missing segments and a generative adversarial completion network to complete long missing segments, generating a missing confidence coefficient; constructing a sliding window sample and inputting it into the dual-branch prediction network; outputting the predicted future groundwater level through a gated fusion layer; and using a particle swarm optimization algorithm for optimization. Based on the predicted groundwater level and a preset control water level or drawdown threshold, a groundwater level early warning result is generated. This invention can improve the stability of groundwater level prediction under conditions of missing data and can generate early warning results based on control water levels or drawdown thresholds.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of intelligent prediction and early warning technology for groundwater resources, and in particular to a groundwater level prediction method and system based on a dual-branch network. Background Technology

[0002] Groundwater level is an important indicator for evaluating the status of regional groundwater resources, formulating water withdrawal and scheduling plans, and identifying the risk of groundwater over-extraction. Groundwater level is affected by multiple factors, including precipitation recharge, evapotranspiration, river and lake recharge, groundwater extraction, irrigation return water, and aquifer conditions, and usually exhibits obvious nonlinearity, lag, and seasonality.

[0003] Among existing groundwater level prediction methods, hybrid models combining support vector regression and particle swarm optimization can improve prediction accuracy by optimizing model parameters; missing data completion methods based on generative adversarial networks can improve data integrity issues caused by missing hydrological data; convolutional neural networks and long short-term memory networks are suitable for extracting local fluctuation features and long-term temporal dependencies, respectively. However, in actual monitoring well networks, groundwater level data often suffers from problems such as discontinuous sampling, long-term missing data, outliers, and differences in accuracy across different forecast step sizes. A single model cannot adequately address short-term fluctuations, long-term trends, and the reliability of missing data. Therefore, a specialized method for groundwater level prediction scenarios is needed, which explicitly inputs the reliability of missing data completion into the prediction model and uses particle swarm optimization to automatically select key model parameters, thereby improving the stability of groundwater level prediction and early warning under missing data conditions. Summary of the Invention

[0004] The purpose of this invention is to solve the above problems by designing a groundwater level prediction method and system based on a dual-branch network.

[0005] The first aspect of this invention provides a groundwater level prediction method based on a dual-branch network, which includes the following steps: Step S1: Collect historical groundwater level sequences from groundwater monitoring wells in the target area, as well as sequences of one or more driving factors from precipitation, evaporation, groundwater extraction, irrigation return water, surface water recharge, and remotely sensed water storage. Step S2: Perform time-scale unification, outlier identification, and normalization on the historical groundwater level sequence and driving factor sequence, and generate a missing mask to mark the data at each time point as valid or missing; Step S3: Identify one or more consecutive missing segments based on the missing mask, and obtain the missing continuity length of each consecutive missing segment; divide each missing segment into short missing segments and long missing segments according to the missing continuity length; use temporal interpolation and adjacent well weighted interpolation to complete the short missing segments, and use a generative adversarial completion network to complete the long missing segments, and generate a missing confidence coefficient for each completed value. Step S4: Construct a sliding window sample based on the completed groundwater level sequence, driving factor sequence, missing mask, and missing confidence coefficient. The sliding window sample satisfies the following: ; in, express The sliding window samples corresponding to each time step. Indicates the groundwater level window. Represents the driving factor window, This indicates a missing mask window. This indicates a missing confidence coefficient window. Indicates the length of the sliding window; Step S5: Input the sliding window sample into the dual-branch prediction network, which includes a convolutional branch for extracting short-term fluctuation features and a long short-term memory branch for extracting long-term memory features, and output the predicted groundwater level for at least one forecast period through a gated fusion layer. Step S6: The particle swarm optimization algorithm is used to optimize the window length, convolution kernel size, number of hidden units, learning rate, and weight matrix and bias vector of the gated fusion layer of the dual-branch prediction network. Step S7: Generate a groundwater level early warning result based on the comparison between the predicted groundwater level and the preset control water level or drawdown threshold. When the predicted value is lower than the preset control water level, the predicted drawdown exceeds the set threshold, or the prediction shows a downward trend for multiple consecutive forecast periods, an early warning of the corresponding level is triggered.

[0006] Furthermore, in the above-mentioned groundwater level prediction method based on a dual-branch network, step S2, the outlier identification includes comparing the value to be detected with three types of consistency conditions: the historical quantile interval of the same monitoring well, the change amplitude at adjacent times, and the synchronous change trend of adjacent monitoring wells. When the value to be detected does not meet at least two of the consistency conditions at the same time, it is marked as an outlier.

[0007] Furthermore, in the aforementioned groundwater level prediction method based on a dual-branch network, in step S3, continuous missing segments... The length and classification satisfy:

[0008] ; in, Indicates the first The length of a consecutive missing segment and These represent the start and end times of the consecutive missing segments, respectively. This indicates the preset missing length threshold. Represents a set of short missing segments. This represents a set of long missing segments.

[0009] Furthermore, in the above-mentioned groundwater level prediction method based on a dual-branch network, in step S3, the generative adversarial completion network includes a generator and a discriminator. The generator takes a missing mask, observations before and after the missing segment, driving factor sequences, and water level sequences of adjacent monitoring wells as inputs and outputs a candidate completion sequence. The discriminator is used to determine the consistency between the candidate completion sequence and the real groundwater level sequence in terms of trend, periodicity, and abrupt change response.

[0010] Furthermore, in the aforementioned groundwater level prediction method based on a dual-branch network, in step S3, the missing confidence coefficient is jointly determined by the missing continuity length, the number of adjacent monitoring wells, the discrimination probability of the generated adversarial completion network, and the local smoothing residual of the completed sequence. The missing confidence coefficient satisfies the following: ; in, This represents the discriminator's confidence probability of the completed value. For missing continuous length, The number of available adjacent monitoring wells. To complete the local smoothing residuals of the sequence, to For parameters.

[0011] Furthermore, in the above-mentioned groundwater level prediction method based on a dual-branch network, in step S5, the convolutional branch includes a one-dimensional convolutional layer, a normalization layer, and a pooling layer, which are used to extract the short-term local fluctuation characteristics of groundwater level caused by precipitation recharge, mining disturbance, or irrigation return; the long short-term memory branch is a unidirectional long short-term memory network, a bidirectional long short-term memory network, or a combination thereof, which are used to extract the seasonality, lag, and long-term downward or upward trend of the groundwater level sequence.

[0012] Furthermore, in the aforementioned groundwater level prediction method based on a dual-branch network, in step S5, the gated fusion layer automatically adjusts the fusion weights of the convolutional branch output and the long short-term memory branch output based on the prediction step size, the mean of the missing confidence coefficients, the recent fluctuation intensity of the groundwater level, and the change amplitude of the driving factors; the gated fusion layer satisfies: ; ; in, Indicates the gating fusion weights, For the output of the convolution branch, For Long Short-Term Memory branch output, This is the weight matrix of the gated fusion layer. This indicates that the mean confidence coefficient is missing within the window. Indicates the forecast step size. Indicates the future Predicted groundwater level This is the bias vector of the gated fusion layer.

[0013] Furthermore, in the aforementioned groundwater level prediction method based on a dual-branch network, in step S6, the fitness function of the particle swarm optimization algorithm includes a validation set prediction error, a prediction curve continuity penalty term, and a missing low-confidence sample penalty term. The validation set prediction error is one or more of the following: root mean square error, mean absolute error, or Nash efficiency coefficient. The fitness function satisfies: ; in, For the set of candidate parameters, To verify the root mean square error of the set, To predict the continuity penalty term of the curve, This is a penalty term for low-confidence samples. , These are the weighting coefficients.

[0014] Furthermore, in the aforementioned groundwater level prediction method based on a dual-branch network, in step S6, the first... The velocity and position of each particle are updated as follows: ; ; in, No. The particle in the first The speed of the next iteration For the first The particle in the first The position of the next iteration. For inertial weights, and As a learning factor, , It is a random number. For the individual's optimal position, This is the optimal position for the group.

[0015] A second aspect of the present invention provides a groundwater level prediction method system based on a dual-branch network, the groundwater level prediction method system based on a dual-branch network comprising the following sub-modules: The data acquisition module is used to collect historical groundwater level sequences from groundwater monitoring wells in the target area, as well as sequences of one or more driving factors, including precipitation, evaporation, groundwater extraction, irrigation return water, surface water recharge, and remotely sensed water storage. An anomaly identification module is used to perform time-scale unification, outlier identification and normalization on the historical groundwater level sequence and driving factor sequence, and generate a missing mask to mark the data at each time point as valid or missing. The missing confidence completion module is used to identify one or more consecutive missing segments based on the missing mask, obtain the missing continuity length of each consecutive missing segment, divide each missing segment into short missing segments and long missing segments according to the missing continuity length, complete the short missing segments using temporal interpolation and adjacent well weighted interpolation, complete the long missing segments using a generative adversarial completion network, and generate a missing confidence coefficient for each completion value. The sample construction module is used to construct a sliding window sample based on the completed groundwater level sequence, driving factor sequence, missing mask, and missing confidence coefficient. The dual-branch prediction module is used to input the sliding window samples into the dual-branch prediction network. The dual-branch prediction network includes a convolutional branch for extracting short-term fluctuation features and a long short-term memory branch for extracting long-term memory features. It outputs the predicted groundwater level for at least one forecast period in the future through a gated fusion layer. The particle swarm optimization module is used to optimize the window length, kernel size, number of hidden units, learning rate, and weight matrix and bias vector of the gated fusion layer of the dual-branch prediction network using the particle swarm optimization algorithm. The early warning output module is used to generate a groundwater level early warning result based on the comparison between the predicted groundwater level and the preset control water level or drawdown threshold. When the predicted value is lower than the preset control water level, the predicted drawdown exceeds the set threshold, or the prediction shows a downward trend for multiple consecutive forecast periods, the corresponding level of early warning is triggered.

[0016] Its beneficial effects lie in the following: By analyzing historical groundwater level sequences from groundwater monitoring wells and driving factors such as precipitation, evaporation, extraction, irrigation regression, surface water recharge, and remotely sensed water reserves, the data undergoes time-scale unification, anomaly identification, and normalization, generating a missing mask. Short missing segments are filled using interpolation, while long missing segments are filled using a generative adversarial completion network, generating a missing confidence coefficient. Groundwater level, driving factors, missing mask, and missing confidence coefficients are constructed as sliding window samples, input into a bi-branch prediction network composed of convolutional and long short-term memory branches. A gated fusion layer outputs the predicted future groundwater level, and a particle swarm optimization algorithm is used to optimize the window length, convolutional kernel size, number of hidden units, learning rate, and fusion parameters. This invention effectively improves the problems in groundwater level prediction, such as the difficulty in propagating errors from long missing segments, the difficulty in balancing short-term disturbances and long-term trends, and the reliance on human experience for model hyperparameters. This enhances the accuracy and reliability of groundwater level prediction under missing data conditions and can generate early warning results based on control water level or drawdown thresholds. Attached Figure Description

[0017] Various other advantages and benefits will become apparent to those skilled in the art upon reading the following detailed description of preferred embodiments. The accompanying drawings are for illustrative purposes only and are not intended to limit the invention.

[0018] Figure 1 This is a flowchart illustrating a groundwater level prediction method based on a dual-branch network in an embodiment of the present invention. Figure 2 This is a schematic diagram of the dual-branch prediction network structure of a groundwater level prediction method based on a dual-branch network in an embodiment of the present invention. Figure 3 This is a schematic diagram of the structure of a groundwater level prediction method system based on a dual-branch network in an embodiment of the present invention. Detailed Implementation

[0019] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.

[0020] Those skilled in the art will understand that, unless specifically stated otherwise, the singular forms "one," "an," and "this" used herein may also include the plural forms. It should be further understood that the terminology used in this specification includes the presence of features, integers, steps, operations, elements, and / or components, but does not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof.

[0021] The present invention will now be described in detail with reference to the accompanying drawings. Figure 1 , Figure 2 As shown, a groundwater level prediction method based on a dual-branch network is proposed, which includes the following steps: Step S1: Collect historical groundwater level sequences from groundwater monitoring wells in the target area, as well as sequences of one or more driving factors from precipitation, evaporation, groundwater extraction, irrigation return water, surface water recharge, and remotely sensed water storage. Specifically, in this embodiment, the target area includes multiple groundwater monitoring wells. Historical groundwater level sequences are collected for each monitoring well. At the same time, precipitation data were collected. Evaporation Groundwater extraction volume Irrigation return water Surface water recharge and remote sensing water storage One or more driving factors can be included, and the data can be standardized to a daily, ten-day, or monthly scale according to the forecasting needs.

[0022] Step S2: Perform time-scale unification, outlier identification, and normalization on the historical groundwater level sequence and driving factor sequence, and generate a missing mask to mark the data at each time point as valid or missing; Specifically, in this embodiment, when preprocessing the raw data, time alignment and normalization are first performed; then, outliers are identified based on historical quantile intervals, the magnitude of changes in adjacent time periods, and the synchronous change trends of adjacent monitoring wells. After being marked, outliers are treated as missing values, and a missing value mask is generated. ,in Indicates the measured effective value. This indicates a missing value or an abnormal replacement value.

[0023] Step S3: Identify one or more consecutive missing segments based on the missing mask, and obtain the missing continuity length of each consecutive missing segment; divide each missing segment into short missing segments and long missing segments according to the missing continuity length; use temporal interpolation and adjacent well weighted interpolation to complete the short missing segments, and use a generative adversarial completion network to complete the long missing segments, and generate a missing confidence coefficient for each completed value. Specifically, in this embodiment, the adversarial completion network includes a generator and a discriminator. The generator takes the missing mask, the observations before and after the missing segment, the driving factor sequence, and the water level sequence of adjacent monitoring wells as inputs and outputs a candidate completion sequence. The discriminator is used to determine the consistency between the candidate completion sequence and the real groundwater level sequence in terms of trend, periodicity, and abrupt change response.

[0024] Continuous missing segments The length and classification can be represented as:

[0025] ; in, Indicates the first The length of a consecutive missing segment and These represent the start and end times of the consecutive missing segments, respectively. This indicates the preset missing length threshold. Represents a set of short missing segments. This represents a set of long missing segments.

[0026] For short missing segments with a continuous length less than a preset threshold, linear interpolation, spline interpolation, or weighted interpolation based on adjacent monitoring wells can be used for completion. For long missing segments with a continuous length not less than the preset threshold, a generative adversarial completion network is used for completion. The generator outputs candidate water level sequences, and the discriminator judges the consistency between the candidate water level sequences and the actual groundwater level sequences in terms of trend, periodicity, and abrupt change response. The missing confidence coefficient is calculated based on the continuous length of the missing segment, the number of available adjacent monitoring wells, the discrimination probability, and the local smoothing residual. Its calculation form can be expressed as: ; in, This represents the discriminator's confidence probability of the completed value. For missing continuous length, The number of available adjacent monitoring wells. To complete the local smoothing residuals of the sequence, to For parameters.

[0027] Step S4: Construct a sliding window sample based on the completed groundwater level sequence, driving factor sequence, missing mask, and missing confidence coefficient. The sliding window sample satisfies the following: ; in, express The sliding window samples corresponding to each time step. Indicates the groundwater level window. Represents the driving factor window, This indicates a missing mask window. This indicates a missing confidence coefficient window. Indicates the length of the sliding window; Specifically, in this embodiment, when constructing the sliding window sample, the historical groundwater level window, driving factor window, missing mask window, and missing confidence coefficient window of length L are spliced ​​together as the input sample, and the groundwater level of the next time period or multiple future time periods is used as the prediction target.

[0028] Step S5: Input the sliding window sample into the dual-branch prediction network. The dual-branch prediction network includes a convolutional branch for extracting short-term fluctuation features and a long short-term memory branch for extracting long-term memory features. The groundwater level prediction value for at least one forecast period is output through the gated fusion layer. Specifically, in this embodiment, the convolutional branch includes a one-dimensional convolutional layer, a normalization layer, and a pooling layer, which are used to extract the short-term local fluctuation characteristics of groundwater level caused by precipitation recharge, mining disturbance, or irrigation return; the long short-term memory branch is a one-way long short-term memory network, a two-way long short-term memory network, or a combination thereof, which are used to extract the seasonality, lag, and long-term downward or upward trend of groundwater level sequence.

[0029] The gated fusion layer automatically adjusts the fusion weights of the convolutional branch output and the long short-term memory branch output based on the forecast step size, the mean of the missing confidence coefficient, the recent fluctuation intensity of the groundwater level, and the change amplitude of the driving factors; the gated fusion layer satisfies: ; ; in, Indicates the gating fusion weights, For the output of the convolution branch, For Long Short-Term Memory branch output, This is the weight matrix of the gated fusion layer. This indicates that the mean confidence coefficient is missing within the window. Indicates the forecast step size. Indicates the future Predicted groundwater level This is the bias vector of the gated fusion layer.

[0030] The dual-branch prediction network comprises a convolutional branch, a long short-term memory branch, and a gated fusion layer. The convolutional branch extracts local fluctuations in groundwater level and responses to recharge and extraction disturbances within a short window using one-dimensional convolution. The long short-term memory branch extracts the seasonality, lag, and long-term trend of groundwater level changes. The gated fusion layer automatically adjusts the fusion weights of the two branch outputs based on the forecast step size, the mean of the missing confidence coefficients, the intensity of recent fluctuations, and the magnitude of changes in driving factors.

[0031] Step S6: Use the particle swarm optimization algorithm to optimize the window length, convolution kernel size, number of hidden units, learning rate, and weight matrix and bias vector of the gated fusion layer of the dual-branch prediction network; Specifically, in this embodiment, the fitness function of the particle swarm optimization algorithm includes the validation set prediction error, the prediction curve continuity penalty term, and the missing low-confidence sample penalty term. The validation set prediction error is one or more of the following: root mean square error, mean absolute error, or Nash efficiency coefficient. The fitness function satisfies: ; in, For the set of candidate parameters, To verify the root mean square error of the set, To predict the continuity penalty term of the curve, This is a penalty term for low-confidence samples. , These are the weighting coefficients.

[0032] In the particle swarm The velocity and position of each particle are updated as follows: ; ; in, No. The particle in the first The speed of the next iteration For the first The particle in the first The position of the next iteration. For inertial weights, and As a learning factor, , It is a random number. For the individual's optimal position, This is the optimal position for the group.

[0033] Particle swarm optimization (PSO) is used to automatically determine key model parameters. Each particle represents a set of candidate parameters, including sliding window length, kernel size, number of convolution channels, number of long short-term memory hidden units, learning rate, batch size, and gating fusion initial weights.

[0034] Step S7: Generate groundwater level early warning results based on the comparison between the predicted groundwater level and the preset control water level or drawdown threshold. When the predicted value is lower than the preset control water level, the predicted drawdown exceeds the set threshold, or the prediction shows a downward trend for multiple consecutive forecast periods, the corresponding level of early warning is triggered.

[0035] Specifically, in this embodiment, the prediction output includes the predicted value of the future groundwater level and the evaluation result of the prediction error. When the predicted groundwater level is lower than the preset control level, the predicted drawdown exceeds the set threshold, or the groundwater level shows a downward trend for multiple consecutive forecast periods, the early warning module generates a corresponding level of groundwater level early warning and outputs the main driving factors that cause the early warning, such as less precipitation, increased mining, or decreased recharge.

[0036] The above describes an embodiment of the groundwater level prediction method based on a dual-branch network according to the present invention. Please refer to [link / reference]. Figure 3 In a groundwater level prediction method system based on a dual-branch network, the system includes the following modules: The data acquisition module is used to collect historical groundwater level sequences from groundwater monitoring wells in the target area, as well as sequences of one or more driving factors, including precipitation, evaporation, groundwater extraction, irrigation return water, surface water recharge, and remotely sensed water storage. The anomaly identification module is used to perform time-scale unification, outlier identification and normalization on historical groundwater level sequences and driving factor sequences, and to generate a missing mask to mark the data at each time point as valid or missing. The missing confidence completion module is used to identify one or more consecutive missing segments based on the missing mask, obtain the missing continuity length of each consecutive missing segment, divide each missing segment into short missing segments and long missing segments according to the missing continuity length, complete the short missing segments using temporal interpolation and adjacent well weighted interpolation, complete the long missing segments using a generative adversarial completion network, and generate a missing confidence coefficient for each completion value. The sample construction module is used to construct a sliding window sample based on the completed groundwater level sequence, driving factor sequence, missing mask, and missing confidence coefficient. The dual-branch prediction module is used to input sliding window samples into the dual-branch prediction network. The dual-branch prediction network includes a convolutional branch for extracting short-term fluctuation features and a long short-term memory branch for extracting long-term memory features. It outputs the predicted groundwater level for at least one forecast period in the future through a gated fusion layer. The particle swarm optimization module is used to optimize the window length, kernel size, number of hidden units, learning rate, and weight matrix and bias vector of the gated fusion layer of the bi-branch prediction network using the particle swarm optimization algorithm. The early warning output module is used to generate groundwater level early warning results based on the comparison between the predicted groundwater level and the preset control water level or drawdown threshold. When the predicted value is lower than the preset control water level, the predicted drawdown exceeds the set threshold, or the prediction shows a downward trend for multiple consecutive forecast periods, the corresponding level of early warning is triggered.

[0037] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The embodiments and descriptions in the specification are merely preferred examples and are not intended to limit the invention. Various changes and modifications can be made to the invention without departing from its spirit and scope, and all such changes and modifications fall within the scope of the present invention as claimed. The scope of protection of the present invention is defined by the appended technical solutions and equivalents.

Claims

1. A groundwater level prediction method based on a dual-branch network, characterized in that, The groundwater level prediction method based on a dual-branch network includes the following steps: Step S1: Collect historical groundwater level sequences from groundwater monitoring wells in the target area, as well as sequences of one or more driving factors from precipitation, evaporation, groundwater extraction, irrigation return water, surface water recharge, and remotely sensed water storage. Step S2: Perform time-scale unification, outlier identification, and normalization on the historical groundwater level sequence and driving factor sequence, and generate a missing mask to mark the data at each time point as valid or missing; Step S3: Identify one or more consecutive missing segments based on the missing mask, and obtain the missing continuity length of each consecutive missing segment; divide each missing segment into short missing segments and long missing segments according to the missing continuity length; use temporal interpolation and adjacent well weighted interpolation to complete the short missing segments, and use a generative adversarial completion network to complete the long missing segments, and generate a missing confidence coefficient for each completed value. Step S4: Construct a sliding window sample based on the completed groundwater level sequence, driving factor sequence, missing mask, and missing confidence coefficient. The sliding window sample satisfies the following: ; in, express The sliding window samples corresponding to each time step. Indicates the groundwater level window. Represents the driving factor window, This indicates a missing mask window. This indicates a missing confidence coefficient window. Indicates the length of the sliding window; Step S5: Input the sliding window sample into the dual-branch prediction network, which includes a convolutional branch for extracting short-term fluctuation features and a long short-term memory branch for extracting long-term memory features, and output the predicted groundwater level for at least one forecast period through a gated fusion layer. Step S6: The particle swarm optimization algorithm is used to optimize the window length, convolution kernel size, number of hidden units, learning rate, and weight matrix and bias vector of the gated fusion layer of the dual-branch prediction network. Step S7: Generate a groundwater level early warning result based on the comparison between the predicted groundwater level and the preset control water level or drawdown threshold. When the predicted value is lower than the preset control water level, the predicted drawdown exceeds the set threshold, or the prediction shows a downward trend for multiple consecutive forecast periods, an early warning of the corresponding level is triggered.

2. The groundwater level prediction method based on a dual-branch network as described in claim 1, characterized in that, In step S2, the outlier identification includes comparing the value to be detected with three types of consistency conditions: the historical quantile interval of the same monitoring well, the change amplitude at adjacent times, and the synchronous change trend of adjacent monitoring wells. When the value to be detected does not meet at least two of the consistency conditions at the same time, it is marked as an outlier.

3. The groundwater level prediction method based on a dual-branch network as described in claim 1, characterized in that, In step S3, consecutive missing segments The length and classification satisfy: ; in, Indicates the first The length of a consecutive missing segment and These represent the start and end times of the consecutive missing segments, respectively. This indicates the preset missing length threshold. Represents a set of short missing segments. This represents a set of long missing segments.

4. The groundwater level prediction method based on a dual-branch network as described in claim 1, characterized in that, In step S3, the generative adversarial completion network includes a generator and a discriminator. The generator takes a missing mask, observations before and after the missing segment, driving factor sequences, and adjacent monitoring well water level sequences as inputs and outputs a candidate completion sequence. The discriminator is used to determine the consistency between the candidate completion sequence and the real groundwater level sequence in terms of trend, periodicity, and abrupt change response.

5. The groundwater level prediction method based on a dual-branch network as described in claim 1, characterized in that, In step S3, the missing confidence coefficient is jointly determined by the missing continuity length, the number of adjacent monitoring wells, the discrimination probability of the generated adversarial completion network, and the local smoothing residual of the completed sequence. The missing confidence coefficient satisfies the following: ; in, This represents the discriminator's confidence probability of the completed value. For missing continuous length, The number of available adjacent monitoring wells. To complete the local smoothing residuals of the sequence, to For parameters.

6. The groundwater level prediction method based on a dual-branch network as described in claim 1, characterized in that, In step S5, the convolutional branch includes a one-dimensional convolutional layer, a normalization layer, and a pooling layer, which are used to extract the short-term local fluctuation characteristics of groundwater level caused by precipitation recharge, mining disturbance, or irrigation return; the long short-term memory branch is a one-way long short-term memory network, a two-way long short-term memory network, or a combination thereof, which are used to extract the seasonality, lag, and long-term downward or upward trend of groundwater level sequence.

7. The groundwater level prediction method based on a dual-branch network as described in claim 1, characterized in that, In step S5, the gated fusion layer automatically adjusts the fusion weights of the convolutional branch output and the long short-term memory branch output based on the prediction step size, the mean of the missing confidence coefficient, the recent fluctuation intensity of the groundwater level, and the change amplitude of the driving factor; the gated fusion layer satisfies: ; ; in, Indicates the gating fusion weights, For the output of the convolution branch, For Long Short-Term Memory branch output, This is the weight matrix of the gated fusion layer. This indicates that the mean confidence coefficient is missing within the window. Indicates the forecast step size. This is the bias vector of the gated fusion layer. Indicates the future Predicted groundwater level.

8. The groundwater level prediction method based on a dual-branch network as described in claim 1, characterized in that, In step S6, the fitness function of the particle swarm optimization algorithm includes a validation set prediction error, a prediction curve continuity penalty term, and a missing low-confidence sample penalty term. The validation set prediction error is one or more of the following: root mean square error, mean absolute error, or Nash efficiency coefficient. The fitness function satisfies: ; in, For the set of candidate parameters, To verify the root mean square error of the set, To predict the continuity penalty term of the curve, This is a penalty term for low-confidence samples. , These are the weighting coefficients.

9. The groundwater level prediction method based on a dual-branch network as described in claim 1, characterized in that, In step S6, the first particle in the swarm... The velocity and position of each particle are updated as follows: ; ; in, No. The particle in the first The speed of the next iteration For the first The particle in the first The position of the next iteration. For inertial weights, and As a learning factor, , It is a random number. For the individual's optimal position, This is the optimal position for the group.

10. A groundwater level prediction method system based on a dual-branch network, characterized in that, The groundwater level prediction method system based on dual-branch networks includes the following sub-modules: The data acquisition module is used to collect historical groundwater level sequences from groundwater monitoring wells in the target area, as well as sequences of one or more driving factors, including precipitation, evaporation, groundwater extraction, irrigation return water, surface water recharge, and remotely sensed water storage. An anomaly identification module is used to perform time-scale unification, outlier identification and normalization on the historical groundwater level sequence and driving factor sequence, and generate a missing mask to mark the data at each time point as valid or missing. The missing confidence completion module is used to identify one or more consecutive missing segments based on the missing mask, obtain the missing continuity length of each consecutive missing segment, divide each missing segment into short missing segments and long missing segments according to the missing continuity length, complete the short missing segments using temporal interpolation and adjacent well weighted interpolation, complete the long missing segments using a generative adversarial completion network, and generate a missing confidence coefficient for each completion value. The sample construction module is used to construct a sliding window sample based on the completed groundwater level sequence, driving factor sequence, missing mask, and missing confidence coefficient. The dual-branch prediction module is used to input the sliding window samples into the dual-branch prediction network. The dual-branch prediction network includes a convolutional branch for extracting short-term fluctuation features and a long short-term memory branch for extracting long-term memory features. It outputs the predicted groundwater level for at least one forecast period in the future through a gated fusion layer. The particle swarm optimization module is used to optimize the window length, kernel size, number of hidden units, learning rate, and weight matrix and bias vector of the gated fusion layer of the dual-branch prediction network using the particle swarm optimization algorithm. The early warning output module is used to generate a groundwater level early warning result based on the comparison between the predicted groundwater level and the preset control water level or drawdown threshold. When the predicted value is lower than the preset control water level, the predicted drawdown exceeds the set threshold, or the prediction shows a downward trend for multiple consecutive forecast periods, the corresponding level of early warning is triggered.