Genetic algorithm optimizes BP neural network mine groundwater quality early warning method and system

CN122819595APending Publication Date: 2026-09-25XINJIANG UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611280922.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-24
Publication Date
2026-09-25

AI Technical Summary

Benefits of technology

[0052]本申请通过遗传算法对BP网络进行前置全局优化,解决了初始敏感、易陷局部最优的缺陷;再通过测试时域适应在线微调,使模型动态适应目标矿区数据分布,预测精度与稳定性显著优于传统方法。提出的特征级对齐、样本级适应、模型级轻量更新三层机制,有效解决了跨矿区数据分布差异导致的模型性能下降问题,实现了知识的高效迁移。引入基于行业静态硬性标准与节点、用户动态配置的双轨制阈值设定机制,使预警标准兼顾行业水质安全底线与不同矿区本底的差异,显著降低误报率并提高现场实操性。将轻量级多维前端图表引擎与水质预警深度结合,构建清晰的二维时序演变趋势图,配合自动触发的专家库应对方案,实现水质风险可视化,大幅提升日常监测的决策效率。本发明打通了从数据到知识、再到决策的全链条,实现了矿区地下水水质监测预警的自动化、智能化与智慧化升级,具有很高的实用价值和推广前景。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122819595A_ABST
    Figure CN122819595A_ABST
Patent Text Reader

Abstract

The application discloses a genetic algorithm optimized BP neural network mine groundwater quality early warning method and system, and belongs to the technical field of mine groundwater environment monitoring and artificial intelligence early warning. The method comprises the following steps: obtaining mine underground space attribute data and multi-dimensional water quality time sequence monitoring data, performing missing value repair, normalization processing and feature construction, and generating a supervised learning sample sequence; performing global optimization on the weights and thresholds of the BP neural network by using a genetic algorithm, training and generating a basic prediction model based on the optimization result; deploying the basic prediction model to a target mine, performing online fine-tuning based on real-time data flow, and generating a fine-tuning prediction model; performing double-track comparison between an advanced prediction sequence and static safety limits and dynamic statistical thresholds respectively, and generating an early warning judgment result; and publishing early warning information through a front-end chart engine and calling an expert solution library to generate decision suggestions. The application improves the prediction accuracy, realizes cross-domain self-adaptation, and reduces the false alarm rate.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of groundwater environment monitoring and intelligent early warning technology in mining areas, and in particular to a genetic algorithm-optimized BP neural network method and system for early warning of groundwater quality in mining areas. Background Technology

[0002] Groundwater in mining areas is a critical element for the ecological environment and safe production in mines. Coal mining activities can trigger mine water inrush accidents, leading to serious pollution problems such as groundwater acidification and heavy metal contamination, posing a long-term threat to the surrounding ecosystem and the safety of drinking water for residents. Therefore, establishing a real-time monitoring and early warning system for groundwater quality in mining areas is of significant practical importance.

[0003] Currently, data-driven prediction models are widely used in early warning of groundwater quality in mining areas, with backpropagation (BP) neural networks being a commonly used method due to their nonlinear mapping capabilities. However, traditional BP neural networks suffer from drawbacks such as sensitivity to initial weights, susceptibility to local optima, and slow convergence speed, resulting in insufficient prediction accuracy and stability. Due to differences in geological conditions and mining methods, data distribution varies significantly across different mining areas. This causes a substantial performance drop when a general model trained in multiple mining areas is directly deployed to a specific mining area, while retraining the model by collecting large amounts of data from the target mining area is costly and impractical.

[0004] Furthermore, existing early warning systems generally use a single fixed threshold for water quality assessment, failing to consider both industry safety baselines and the differences in baseline conditions across different mining areas, resulting in a high false alarm rate. Test-domain adaptation techniques in transfer learning offer a new approach to solving cross-domain prediction problems, allowing models to adaptively adjust parameters online using real-time data streams after deployment, without additional annotation. How to organically combine genetic algorithm optimization, test-domain adaptation, and multi-dimensional chart visualization techniques to construct a complete early warning system encompassing data perception, intelligent prediction, adaptive fine-tuning, and risk visualization remains a pressing technical challenge in this field.

[0005] Therefore, there is an urgent need for a genetic algorithm-optimized BP neural network method and system for early warning of groundwater quality in mining areas. Summary of the Invention

[0006] This invention provides a genetic algorithm-optimized BP neural network method and system for early warning of groundwater quality in mining areas, in order to solve the above-mentioned problems existing in the prior art.

[0007] To achieve the above objectives, the present invention provides the following technical solution:

[0008] A genetic algorithm-optimized BP neural network method for early warning of groundwater quality in mining areas includes:

[0009] S1: Obtain underground space attribute data and multidimensional water quality time series monitoring data in the mining area, perform missing value repair, normalization processing and feature construction on the monitoring data, and generate supervised learning sample sequences;

[0010] S2: Use a genetic algorithm to globally optimize the weights and thresholds of the BP neural network, and use the optimization results to train and generate a basic prediction model.

[0011] S3: Deploy the basic prediction model to the target mining area and connect to the real-time data stream, and perform online fine-tuning to generate a fine-tuned prediction model;

[0012] S4: The advanced prediction sequence output by the fine-tuned prediction model is compared with the static safety limit and the dynamic statistical threshold in a dual-track manner to generate the early warning judgment result;

[0013] S5: Based on the early warning judgment results, the early warning information is released through the front-end chart engine and the expert solution library is called to generate decision suggestions.

[0014] Furthermore, S1 includes:

[0015] S11: Obtain spatial attribute data of each monitoring node in the underground pipeline network of the mining area. Through a multi-parameter sensor network deployed at key nodes of the pipeline network, continuously collect multi-dimensional water quality time-series monitoring data online to generate raw water quality data sequences. The multi-dimensional water quality time-series monitoring data includes sampling timestamp, instantaneous water volume, pH value, chloride ion concentration, sulfate ion concentration, calcium ion concentration, magnesium ion concentration and carbonate ion concentration.

[0016] S12: For the original water quality data sequence, the missing segments inside the sequence are smoothly estimated by time series linear interpolation method, and the missing values ​​at the beginning and end boundaries of the sequence are filled in by forward filling and backward filling strategies to generate a continuous time series data sequence.

[0017] S13: For continuous time series data sequences, each water quality characteristic is linearly mapped to a set interval by minimum-maximum normalization, and dimensionless data sequences are generated after eliminating the influence of dimensions.

[0018] S14: For dimensionless data sequences, the sliding window technique is used to convert time series data into supervised learning samples, and derived features including mean, variance, trend and water quality parameter ratios within the window are constructed to generate supervised learning sample sequences.

[0019] Furthermore, S2 includes:

[0020] S21: Determine the number of neurons in the input and output layers of the BP neural network based on the feature dimensions of the supervised learning sample sequence, determine the number of neurons in the hidden layer using empirical formulas, and construct the topology of the BP neural network.

[0021] S22: All connection weights and neuron thresholds of the BP neural network are sequentially concatenated and encoded into real chromosomes. An initial population is randomly generated. The fitness function is constructed using the reciprocal of the mean square error of the prediction. The population is iteratively evolved through selection, crossover, and mutation operations. When the maximum number of iterations is reached or the fitness converges, the optimal individual is decoded to obtain the globally optimal initial parameters of the BP neural network.

[0022] S23: Initialize the BP neural network with globally optimal initial parameters, perform supervised backpropagation training using the Adam optimizer until convergence, and generate the basic prediction model;

[0023] S24: In the prediction inference stage, a rolling advance time series prediction mechanism is adopted, which appends the current prediction value to the end of the input sequence and removes the oldest data, and executes it in a loop to generate an advance prediction sequence.

[0024] Furthermore, S2 also includes:

[0025] S25: When the sample size of historical data is lower than the preset time window threshold or when the training of the basic prediction model is abnormal, linear trend prediction is performed based on the slope of the change in historical data to generate a downgraded prediction sequence as an alternative output.

[0026] Furthermore, S3 includes:

[0027] S31: Extract the most recent sets of real historical monitoring data of the target mining area monitoring nodes from the database in real time, and construct a real-time training set for the current working conditions;

[0028] S32: Using the weights obtained by the genetic algorithm as the initial state, the Adam optimizer is used to perform gradient descent training on the real-time training set to make the model weights slightly migrate and correct towards the current dynamic distribution of the mining area, thus generating a fine-tuned prediction model.

[0029] S33: Immediately put the fine-tuned prediction model into the rolling prediction of the current period to achieve real-time fine-tuning before prediction.

[0030] Furthermore, S3 also includes:

[0031] S34: After the model feature extraction layer, a domain discriminator is introduced. Adversarial training is performed through the gradient reversal layer, so that the feature extraction layer learns domain-invariant feature representations, thereby aligning the source domain and target domain distributions.

[0032] S35: Construct a memory pool with limited capacity to store historical samples of the target domain and their prediction results. Calculate the cosine similarity between the newly arrived sample and each sample in the memory pool. Select the most similar sample and integrate its historical prediction information into the current prediction result by weighting the similarity. Generate a mixed prediction output.

[0033] S36: Only the parameters of the fully connected layers closest to the output layer in the model are updated online and the remaining parameters are frozen. A dynamic regularization loss function containing domain-invariant regularization terms and temporal smoothing regularization terms is introduced to complete the fine-tuning of the prediction model update.

[0034] Furthermore, S4 includes:

[0035] S41: Preset an industry safety limit dictionary for each pollutant indicator as a static safety baseline, perform daily comparisons on the advanced prediction sequence, and generate the first early warning trigger signal when the predicted value of any indicator exceeds the corresponding industry safety limit.

[0036] S42: Based on the fluctuation variance of the historical monitoring sequence of the target mining area, combined with the threshold parameters set by the user in real time on the front-end interactive interface, the deviation of the predicted sequence is calculated. When the deviation exceeds the set deviation threshold, a second track early warning trigger signal is generated.

[0037] S43: When either the first or second warning trigger signal is triggered, a warning judgment result is generated and automatically mapped to the corresponding decision suggestions in the expert solution library.

[0038] Furthermore, S5 includes:

[0039] S51: By using a front-end charting engine, the historical real values, predicted values ​​and warning threshold lines of multiple pollutants are superimposed and plotted on the same time axis to generate a two-dimensional time series evolution curve.

[0040] S52: When the rendering engine detects that the predicted curve has exceeded the threshold line, a warning message containing the expected date of exceeding the standard, the extreme value of exceeding the standard and the corresponding indicator information will be popped up asynchronously on the front-end interface, and an audio alarm will be triggered simultaneously.

[0041] S53: While displaying the warning message, load a list of recommended solutions generated by the expert solution library on the front-end interface for the on-duty personnel to check, confirm and respond;

[0042] S54: Configure high-level and low-level early warning values ​​independently for each physical monitoring node, and perform differentiated early warning judgments based on the differences in water quality background at different well locations and different strata.

[0043] Furthermore, the multidimensional water quality time-series monitoring data is continuously collected online by an Internet of Things (IoT) multi-parameter sensor network deployed at key nodes of the underground pipeline network in the mining area, with the collection frequency set at the minute or hour level; the spatial attribute data includes the unique identifier and geospatial coordinates of each monitoring node, which is used to establish the spatial geographic mapping basis of the monitoring network.

[0044] Furthermore, a genetic algorithm-optimized BP neural network-based early warning system for groundwater quality in mining areas, applied to the method, includes:

[0045] The data acquisition and fusion module is used to acquire underground spatial attribute data and multidimensional water quality time-series monitoring data of the mining area, and to align the two in time and space to generate the raw data stream.

[0046] The data processing and feature management module is used to perform missing value repair, normalization processing and sliding window feature construction on the original data stream to generate a supervised learning sample sequence;

[0047] The core module of the prediction model is used to globally optimize the weights and thresholds of the BP neural network using a genetic algorithm, train the optimization results to generate a basic prediction model, and perform rolling lead time series prediction.

[0048] The online adaptive fine-tuning module is used to extract historical monitoring data of the target mining area monitoring nodes in real time to build a real-time training set. The model parameters are corrected online through incremental gradient descent training to generate a fine-tuned prediction model.

[0049] The early warning decision module is used to perform a dual-track threshold comparison on the advanced prediction sequence output by the fine-tuned prediction model, generate an early warning judgment result, and automatically call the expert solution library to match decision suggestions.

[0050] The multidimensional visualization and interaction module is used to overlay and plot the predicted values ​​and warning thresholds of various pollutants on the same time axis through the front-end chart engine. When the predicted curve exceeds the threshold, the audiovisual alarm mechanism is triggered asynchronously and a list of expert solutions is displayed.

[0051] Compared with the prior art, the present invention has the following advantages:

[0052] This application utilizes a genetic algorithm for pre-optimization of the BP network, addressing its initial sensitivity and susceptibility to local optima. Furthermore, online fine-tuning through time-domain adaptation allows the model to dynamically adapt to the data distribution of the target mining area, resulting in significantly superior prediction accuracy and stability compared to traditional methods. The proposed three-layer mechanism—feature-level alignment, sample-level adaptation, and model-level lightweight update—effectively solves the performance degradation problem caused by differences in data distribution across mining areas, achieving efficient knowledge transfer. A dual-track threshold setting mechanism based on industry static hard standards and dynamic configuration of nodes and users is introduced, ensuring that early warning standards consider both industry water quality safety baselines and the differences in background conditions across different mining areas, significantly reducing false alarm rates and improving on-site operability. A lightweight multi-dimensional front-end chart engine is deeply integrated with water quality early warning to construct a clear two-dimensional time-series evolution trend chart. Combined with automatically triggered expert database response plans, this achieves water quality risk visualization, significantly improving the decision-making efficiency of daily monitoring. This invention connects the entire chain from data to knowledge to decision-making, realizing the automation, intelligence, and smart upgrade of groundwater quality monitoring and early warning in mining areas, possessing high practical value and promising application prospects. Attached Figure Description

[0053] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings:

[0054] Figure 1 This is a flowchart of a genetic algorithm-optimized BP neural network method for early warning of groundwater quality in mining areas, as described in an embodiment of the present invention.

[0055] Figure 2 This is a schematic diagram illustrating the principle of determining the dual-track early warning threshold in an embodiment of the present invention.

[0056] Figure 3 This is a system modular architecture diagram in an embodiment of the present invention. Detailed Implementation

[0057] The preferred embodiments of the present invention will be described below with reference to the accompanying drawings. It should be understood that the preferred embodiments described herein are for illustration and explanation only and are not intended to limit the present invention.

[0058] The embodiments of the present invention provide, as follows Figure 1 The method for early warning of groundwater quality in mining areas, which is optimized by a genetic algorithm and uses a backpropagation neural network, includes:

[0059] S1: Obtain underground space attribute data and multidimensional water quality time series monitoring data in the mining area, perform missing value repair, normalization processing and feature construction on the monitoring data, and generate supervised learning sample sequences;

[0060] S2: Use a genetic algorithm to globally optimize the weights and thresholds of the BP neural network, and use the optimization results to train and generate a basic prediction model.

[0061] S3: Deploy the basic prediction model to the target mining area and connect to the real-time data stream, and perform online fine-tuning to generate a fine-tuned prediction model;

[0062] S4: The advanced prediction sequence output by the fine-tuned prediction model is compared with the static safety limit and the dynamic statistical threshold in a dual-track manner to generate the early warning judgment result;

[0063] S5: Based on the early warning judgment results, the early warning information is released through the front-end chart engine and the expert solution library is called to generate decision suggestions.

[0064] The following is a detailed description with reference to specific embodiments.

[0065] Example 1:

[0066] This embodiment provides a genetic algorithm-optimized BP neural network method for early warning of groundwater quality in mining areas, demonstrating the overall technical implementation process of the method. The entire process follows data flow and decision flow, forming a closed loop that collects information from actual engineering projects, models the data, and then provides feedback to guide the actual engineering work.

[0067] S1: Collaborative acquisition and preprocessing of multi-source data.

[0068] S11: Data Acquisition. The data foundation of this invention consists of two collaborative types: static spatial attribute data of monitoring points and dynamic sequence data of water quality and quantity. Spatial attribute data is acquired through device registration and a geographic information system, containing unique identifiers and corresponding geographic coordinates for each monitoring node, used to establish the spatial geographic mapping foundation of the underground monitoring network. Multidimensional water quality time-series monitoring data is continuously acquired online through an Internet of Things (IoT) multi-parameter sensor network deployed at key nodes of the underground pipeline network in the target mining area, with the acquisition frequency set at the minute or hour level. The data vector generated by the acquisition system specifically covers: sampling timestamp, instantaneous water volume, pH value, chloride ion concentration, sulfate ion concentration, calcium ion concentration, magnesium ion concentration, and carbonate ion concentration, thereby generating the original water quality data sequence. The above data system achieves a comprehensive characterization of the spatiotemporal evolution characteristics of the mining area's water environment.

[0069] S12: Data Cleaning and Time Series Restoration. For missing sampling values ​​generated by IoT sensors in complex downhole environments due to anomalies, the system employs an efficient imputation strategy based on univariate time series. First, linear time series interpolation is used to smoothly estimate the missing segments within the sequence: Let the missing time point be... The effective monitoring time points adjacent to each other are respectively and The corresponding water quality index values ​​are as follows: and Then the estimated value of the missing points Derived using the following linear function:

[0070]

[0071] in, For the missing time points to be estimated, and These are the effective monitoring time points adjacent to the missing point. and They are respectively and The corresponding water quality monitoring values ​​at that time for The water quality index values ​​are estimated through linear interpolation at each time step. For missing boundary values ​​at the beginning and end of the sequence, backward and forward filling strategies are used to fill in the boundaries, generating a continuous time-series data sequence. This pure time-series cleaning mechanism has low computational complexity and closely matches the hydrogeological and physical characteristics of water ion concentration changing continuously over time.

[0072] S13: Data Normalization. To eliminate the influence of different feature dimensions and numerical ranges on model training, the minimum-maximum normalization method is used for continuous time-series data sequences to linearly map each water quality feature to the [0,1] interval, generating a dimensionless data sequence. The normalization formula is:

[0073]

[0074] in, These are the original data values ​​for a certain water quality characteristic column. and These are the minimum and maximum values ​​of the feature on the training set, respectively. This is the dimensionless result after normalization.

[0075] S14: Feature Construction and Supervised Learning Sample Generation. Considering the temporal characteristics of groundwater data, a sliding window technique is used to convert the dimensionless data sequence into supervised learning samples. The window length is set to... If the step size is 1, then each sample consists of continuous... The model is composed of feature vectors from each time step, and the corresponding output is the predicted pollutant concentration for the next time step. Based on this, derived features are constructed from the original data, including the mean, variance, trend slope, ratios between different water quality parameters within the sliding window, and theoretically calculated indicators based on physicochemical principles, to enhance the model's nonlinear mapping capability and ultimately generate a supervised learning sample sequence.

[0076] S2: Construction of the GA-BP basic prediction model based on genetic algorithm optimization.

[0077] S21: Backpropagation (BP) neural network architecture design. The number of neurons in the input layer corresponds to the total dimension of the features expanded within the sliding window. The number of neurons in the output layer is set to 1, corresponding to the single-step pollutant concentration prediction value. The number of neurons in the hidden layer is dynamically calculated using the following empirical formula:

[0078]

[0079] in, The number of neurons in the input layer. The number of neurons in the output layer. To adjust the constant, it is set to 5 in this embodiment. This indicates a round-down operation. This represents the number of neurons in the hidden layer. The activation function used for the hidden layer is the Sigmoid function, whose mathematical expression is:

[0080]

[0081] in, The weighted sum of the inputs to the neuron. The function is used to smoothly map the output of the activated neuron to the (0,1) interval, which is adapted to the data distribution characteristics after the previous normalization process, thereby constructing the BP neural network topology.

[0082] S22: Global Optimization Using Genetic Algorithm. All connection weights and neuron thresholds to be optimized in the BP neural network are concatenated layer by layer and encoded into a real-number chromosome, which is then used to randomly generate the initial population. The reciprocal of the network's mean squared error (MSE) is used as the fitness function to guide the population towards higher prediction accuracy. The mathematical expressions for the MSE and fitness function are as follows:

[0083]

[0084]

[0085] in, The total number of samples in the validation set, For the first The actual water quality monitoring value of each sample For the BP neural network to the first The predicted value output for each sample. To prevent extremely small positive numbers with a denominator of zero, Mean square error, The fitness value is used. The population is iteratively evolved using roulette wheel selection, crossover, and mutation operations. The crossover probability is set to 0.8, the mutation probability to 0.2, and the maximum number of generations to 50. When the maximum number of iterations is reached or the fitness converges, the optimal individual is decoded to obtain the globally optimal initial parameters of the BP neural network.

[0086] S23: Basic Model Training. The BP neural network is initialized with globally optimal initial parameters, and supervised backpropagation training is performed on the network using the Adam optimizer until convergence, generating the basic prediction model.

[0087] S24: Rolling Leading Time Series Forecasting. In the forecasting inference phase, a rolling leading time series forecasting mechanism is adopted: the predicted value output by the basic forecasting model at the current time step is appended to the end of the input sequence as known data, while the oldest time step data in the sequence is removed, and the updated sequence is input into the model again. The above process is repeated to generate a leading forecast sequence for the next few days.

[0088] S25: Model Degradation Fault Tolerance Mechanism. When the amount of historical data samples is lower than the preset time window threshold, or when anomalies such as loss divergence or parameter overflow occur during the training of the basic prediction model, the system automatically switches to the linear trend prediction mode based on the slope of historical data changes, generating a degraded prediction sequence as an alternative output of the basic prediction model, ensuring the continuous and stable operation of the system under conditions of data scarcity or model anomalies.

[0089] S3: Online fine-tuning of the model based on test time-domain adaptation.

[0090] To address the performance degradation issue caused by data distribution offset after the basic prediction model is deployed to a specific target mining area, this system utilizes real-time monitoring data streams to dynamically update the model. The test time-domain adaptation framework is designed with the following three-layer mechanism operating collaboratively:

[0091] S31: Incremental Sample Capture and Real-Time Training Set Construction. The system extracts the most recent sets of real historical monitoring data from the database for the target mining area monitoring nodes in real time, and constructs a real-time training set reflecting the current operating conditions.

[0092] S32: Parameter Dynamic Adjustment and Fine-tuning Prediction Model Generation. Using the weights obtained through global optimization via a genetic algorithm as the initial state, the Adam optimizer is used to perform gradient descent training on the real-time training set. By setting a minimal training objective error and learning rate, the model weights are slightly shifted and adjusted towards the current dynamic data distribution of the mining area, generating a fine-tuned prediction model.

[0093] S33: Real-time Fine-tuning before prediction. The fine-tuned prediction model is immediately put into the rolling prediction of the current period. The "real-time fine-tuning before prediction" mechanism ensures that the model always captures the latest water quality evolution characteristics of the target mining area, effectively solving the problem of accuracy decay when deploying across regions.

[0094] S34: Feature-level distribution alignment. A domain discriminator is introduced after the model's feature extraction layer, and adversarial training is performed through a gradient inversion layer. The domain discriminator attempts to distinguish whether features come from the source domain or the target domain, while the feature extractor is trained to confuse the domain discriminator, thereby forcing the feature extraction layer to learn domain-invariant feature representations. The adversarial loss function adopts the form of cross-entropy, and the gradient inversion coefficient increases linearly with the training epochs to dynamically control the adversarial strength, ultimately achieving alignment of the feature distributions of the source and target domains.

[0095] S35: Sample-level Adaptation. To address the issue of scarce initial samples in the target mining area, a limited-capacity memory pool is constructed to store historical samples from the target domain and their corresponding prediction results. For newly arriving samples, the cosine similarity between their feature vectors and the feature vectors of each sample in the memory pool is calculated. The most similar samples are selected, and their historical prediction information is weighted according to cosine similarity and fused into the current prediction result to generate a hybrid prediction output. This mechanism provides a reference for historically similar working conditions for the current prediction, significantly enhancing the prediction stability under small sample conditions.

[0096] S36: Lightweight Model-Level Update. To balance the model's adaptability to the target domain with the preservation of knowledge from the source domain, only the parameters of the fully connected layers closest to the output layer are updated online, while the remaining parameters are frozen. This ensures that the number of parameters to be updated is only a very small proportion of the total parameters, reducing the risk of overfitting and computational overhead. Simultaneously, a dynamic regularization loss function is introduced, which includes two regularization terms: a domain-invariant regularization term forces the updated parameters to be close to the source domain parameters, preventing catastrophic forgetting; and a temporal smoothing regularization term constrains the fluctuation range between predicted values ​​at adjacent time steps, enhancing the temporal continuity of the prediction results. The weights of these regularization terms are adaptively adjusted based on the statistical characteristics of the target domain data, completing the fine-tuning of the prediction model update.

[0097] S4: Dual-track determination of early warning thresholds and mapping of expert schemes.

[0098] like Figure 2 As shown, the system adopts a highly flexible dual-track collaborative early warning mechanism in the early warning decision module.

[0099] S41: First-track static industry safety limit comparison. The system has a pre-set rigid safety limit table with a dictionary structure, assigning corresponding industry safety limits to each pollutant indicator, such as pH, chloride ion concentration, sulfate ion concentration, calcium ion concentration, magnesium ion concentration, and carbonate ion concentration. These serve as the system's static safety baseline, which cannot be exceeded. When executing an early warning judgment, the system iterates through the advanced prediction sequence output by the fine-tuning prediction model, comparing the predicted values ​​of each indicator with the preset industry safety limits daily. When the predicted value of any indicator in the advanced prediction sequence exceeds the corresponding industry safety limit, the system immediately generates the first-track early warning trigger signal.

[0100] S42: Second-track dynamic statistical threshold deviation comparison. The system independently configures specific high-level and low-level early warning values ​​for each physical monitoring node through the underlying database to adapt to the differences in water quality background at different well locations and strata. Simultaneously, an interactive interface is provided on the front-end platform, allowing business personnel to input dynamic threshold parameters in real time based on current production scheduling instructions. Based on the variance of historical monitoring sequences in the target mining area, combined with the threshold parameters set by the user in real time on the front-end interface, the system calculates the deviation of the advanced prediction sequence. When the deviation of the predicted value exceeds the set deviation threshold, a second-track early warning trigger signal is generated.

[0101] S43: Dual-track linkage early warning judgment and expert solution mapping. After the advanced prediction sequence is generated, the decision rule engine performs a dual-track comparison on the data for each future time step daily. When either the first track early warning trigger signal or the second track early warning trigger signal is triggered, the system generates an early warning judgment result and automatically maps the corresponding decision suggestions in the expert solution library, outputting a response plan for on-site personnel to refer to.

[0102] S5: Real-time alerts and front-end multi-dimensional chart visualization.

[0103] During the online monitoring phase, real-time data streams are preprocessed and then input into an online fine-tuned prediction model to obtain advanced prediction sequences. The visualization module uses a lightweight, high-response HTML5 Canvas front-end chart engine for multi-dimensional rendering, replacing the heavy-duty 3D rendering solution.

[0104] S51: Two-dimensional time-series evolution curve plotting. Through the front-end chart engine, the historical real values, predicted values, and warning threshold lines of various pollutants are superimposed and plotted on the same time axis. The continuous predicted values ​​output by the algorithm are connected by a smooth curve, and the warning threshold lines are fixedly marked on the same coordinate axis in the form of dashed lines, generating an intuitive two-dimensional time-series evolution curve.

[0105] S52: Asynchronous warning pop-up and audio alarm. When the rendering engine detects that the predicted curve exceeds the threshold dotted line, the system determines that there is a risk of exceeding the standard in the future. Then, a highlighted warning modal pops up asynchronously on the front-end interface, listing the expected date of exceeding the standard, the extreme value of exceeding the standard and the corresponding indicator information. Simultaneously, a preset audio file is triggered to provide an audible alarm prompt, forming an audio-visual linkage alarm mechanism.

[0106] S53: Loading the expert solution recommendation list. While the warning message is displayed, the front-end interface automatically loads a list of recommended solutions generated from the expert solution library in phase S4, allowing on-duty personnel to quickly select, confirm, and respond, achieving an integrated closed loop from warning information perception to decision-making.

[0107] S54: Differentiated Node Early Warning Judgment. High-level and low-level early warning values ​​are independently configured for each physical monitoring node. Based on these node-specific values, differentiated early warning judgments are performed for differences in water quality background at different well locations and strata, further improving the targeting and accuracy of early warnings. The above-mentioned intuitive chart overlay and audiovisual linkage design greatly enhances the response efficiency of early warnings and the decision-making efficiency of daily monitoring.

[0108] Example 2:

[0109] This embodiment provides a genetic algorithm-optimized BP neural network-based early warning system for groundwater quality in mining areas, such as... Figure 3 The diagram illustrates the software system architecture for implementing the above method. The system employs a layered, modular design and includes the following functional modules:

[0110] The data acquisition and fusion module consists of water quality sensors, a data receiving service, and a spatiotemporal alignment algorithm. This module is used to acquire underground spatial attribute data and multidimensional water quality time-series monitoring data from the mining area, and to perform spatiotemporal alignment between the spatial attribute data and the water quality time-series data to generate a raw data stream, providing a unified data foundation for subsequent processing.

[0111] The data processing and feature management module includes microservices for data cleaning, normalization, and feature construction. This module performs missing value repair, normalization, and sliding window feature construction on the raw data stream, generating supervised learning sample sequences and providing standardized input data to the core module of the prediction model.

[0112] The core module of the prediction model encapsulates the entire training and optimization algorithm of the GA-BP basic model. This module uses a genetic algorithm to globally optimize the connection weights and neuron thresholds of the BP neural network, trains the basic prediction model with the globally optimal initial parameters obtained through optimization, and performs rolling lead time series prediction during the inference phase, outputting the lead prediction sequence.

[0113] The online adaptive fine-tuning module comprises a real-time sample capture submodule, a parameter incremental correction submodule, and an adaptive inference output submodule. This module extracts historical monitoring data from target mining area monitoring nodes in real time to construct a real-time training set. Through incremental gradient descent training, it achieves online correction of model parameters, generating a fine-tuned prediction model and addressing the performance degradation issue caused by data distribution differences when deploying across mining areas.

[0114] The early warning decision-making module includes a dual-track threshold management submodule, an early warning rule engine, and information formatting and distribution services. This module performs a dual-track threshold comparison on the advanced prediction sequence output by the fine-tuned prediction model, generates early warning judgment results, and automatically calls the expert solution library to match corresponding decision suggestions, realizing automated mapping from prediction results to decision output.

[0115] Multi-dimensional visualization and interaction module: Built on a lightweight HTML5 Canvas charting engine and UI interactive components. This module is used to overlay and plot the historical real values, predicted values, and warning thresholds of various pollutants on the same time axis. When the predicted curve exceeds the threshold, an audio-visual alarm mechanism is triggered asynchronously and a list of expert solutions is displayed. It also provides time-series curve rendering and a human-computer interactive chart interface, allowing on-duty personnel to set threshold parameters in real time on the front-end interactive interface.

[0116] System support layer: This includes database, user access control, and log monitoring services. The various functional modules communicate through well-defined interfaces or message queues, ensuring the overall loose coupling, scalability, and maintainability of the system.

[0117] In summary, this invention, through in-depth technological innovation and system integration, provides a complete intelligent early warning solution for groundwater quality in mining areas, encompassing data perception, intelligent prediction, adaptive fine-tuning, and risk decision-making. At the algorithmic level, the BP neural network fusion optimized by a genetic algorithm improves prediction accuracy; at the decision-making level, a dual-track threshold system ensures both rigor and flexibility in the early warning logic; at the application level, cross-domain adaptive deployment is achieved through time-domain testing; and at the presentation level, multi-dimensional time-series charts provide a more intuitive understanding of risk. This invention represents a systematic upgrade to traditional monitoring and early warning models, possessing significant theoretical importance and broad engineering application prospects.

[0118] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from the spirit and scope of this invention.

Claims

1. A genetic algorithm-optimized BP neural network method for early warning of groundwater quality in mining areas, characterized in that, include: S1: Obtain underground space attribute data and multidimensional water quality time series monitoring data in the mining area, perform missing value repair, normalization processing and feature construction on the monitoring data, and generate supervised learning sample sequences; S2: Use a genetic algorithm to globally optimize the weights and thresholds of the BP neural network, and use the optimization results to train and generate a basic prediction model. S3: Deploy the basic prediction model to the target mining area and connect to the real-time data stream, and perform online fine-tuning to generate a fine-tuned prediction model; S4: The advanced prediction sequence output by the fine-tuned prediction model is compared with the static safety limit and the dynamic statistical threshold in a dual-track manner to generate the early warning judgment result; S5: Based on the early warning judgment results, the early warning information is released through the front-end chart engine and the expert solution library is called to generate decision suggestions.

2. The genetic algorithm-optimized BP neural network method for early warning of groundwater quality in mining areas according to claim 1, characterized in that, S1 includes: S11: Obtain spatial attribute data of each monitoring node in the underground pipeline network of the mining area. Through a multi-parameter sensor network deployed at key nodes of the pipeline network, continuously collect multi-dimensional water quality time-series monitoring data online to generate raw water quality data sequences. The multi-dimensional water quality time-series monitoring data includes sampling timestamp, instantaneous water volume, pH value, chloride ion concentration, sulfate ion concentration, calcium ion concentration, magnesium ion concentration and carbonate ion concentration. S12: For the original water quality data sequence, the missing segments inside the sequence are smoothly estimated by time series linear interpolation method, and the missing values ​​at the beginning and end boundaries of the sequence are filled in by forward filling and backward filling strategies to generate a continuous time series data sequence. S13: For continuous time series data sequences, each water quality characteristic is linearly mapped to a set interval by minimum-maximum normalization, and dimensionless data sequences are generated after eliminating the influence of dimensions. S14: For dimensionless data sequences, the sliding window technique is used to convert time series data into supervised learning samples, and derived features including mean, variance, trend and water quality parameter ratios within the window are constructed to generate supervised learning sample sequences.

3. The genetic algorithm-optimized BP neural network method for early warning of groundwater quality in mining areas according to claim 1, characterized in that, S2 include: S21: Determine the number of neurons in the input and output layers of the BP neural network based on the feature dimensions of the supervised learning sample sequence, determine the number of neurons in the hidden layer using empirical formulas, and construct the topology of the BP neural network. S22: All connection weights and neuron thresholds of the BP neural network are sequentially concatenated and encoded into real chromosomes. An initial population is randomly generated. The fitness function is constructed using the reciprocal of the mean square error of the prediction. The population is iteratively evolved through selection, crossover, and mutation operations. When the maximum number of iterations is reached or the fitness converges, the optimal individual is decoded to obtain the globally optimal initial parameters of the BP neural network. S23: Initialize the BP neural network with globally optimal initial parameters, perform supervised backpropagation training using the Adam optimizer until convergence, and generate the basic prediction model; S24: In the prediction inference stage, a rolling advance time series prediction mechanism is adopted, which appends the current prediction value to the end of the input sequence and removes the oldest data, and executes it in a loop to generate an advance prediction sequence.

4. The genetic algorithm-optimized BP neural network method for early warning of groundwater quality in mining areas according to claim 1, characterized in that, S2 also includes: S25: When the sample size of historical data is lower than the preset time window threshold or when the training of the basic prediction model is abnormal, linear trend prediction is performed based on the slope of the change in historical data to generate a downgraded prediction sequence as an alternative output.

5. The genetic algorithm-optimized BP neural network method for early warning of groundwater quality in mining areas according to claim 1, characterized in that, S3 include: S31: Extract the most recent sets of real historical monitoring data of the target mining area monitoring nodes from the database in real time, and construct a real-time training set for the current working conditions; S32: Using the weights obtained by the genetic algorithm as the initial state, the Adam optimizer is used to perform gradient descent training on the real-time training set to make the model weights slightly migrate and correct towards the current dynamic distribution of the mining area, thus generating a fine-tuned prediction model. S33: Immediately put the fine-tuned prediction model into the rolling prediction of the current period to achieve real-time fine-tuning before prediction.

6. The genetic algorithm-optimized BP neural network method for early warning of groundwater quality in mining areas according to claim 5, characterized in that, S3 also includes: S34: After the model feature extraction layer, a domain discriminator is introduced. Adversarial training is performed through the gradient reversal layer, so that the feature extraction layer learns domain-invariant feature representations, thereby aligning the source domain and target domain distributions. S35: Construct a memory pool with limited capacity to store historical samples of the target domain and their prediction results. Calculate the cosine similarity between the newly arrived sample and each sample in the memory pool. Select the most similar sample and integrate its historical prediction information into the current prediction result by weighting the similarity. Generate a mixed prediction output. S36: Only the parameters of the fully connected layers closest to the output layer in the model are updated online and the remaining parameters are frozen. A dynamic regularization loss function containing domain-invariant regularization terms and temporal smoothing regularization terms is introduced to complete the fine-tuning of the prediction model update.

7. The genetic algorithm-optimized BP neural network method for early warning of groundwater quality in mining areas according to claim 1, characterized in that, S4 include: S41: Preset an industry safety limit dictionary for each pollutant indicator as a static safety baseline, perform daily comparisons on the advanced prediction sequence, and generate the first early warning trigger signal when the predicted value of any indicator exceeds the corresponding industry safety limit. S42: Based on the fluctuation variance of the historical monitoring sequence of the target mining area, combined with the threshold parameters set by the user in real time on the front-end interactive interface, the deviation of the predicted sequence is calculated. When the deviation exceeds the set deviation threshold, a second track early warning trigger signal is generated. S43: When either the first or second warning trigger signal is triggered, a warning judgment result is generated and automatically mapped to the corresponding decision suggestions in the expert solution library.

8. The genetic algorithm-optimized BP neural network method for early warning of groundwater quality in mining areas according to claim 1, characterized in that, S5 include: S51: By using a front-end charting engine, the historical real values, predicted values ​​and warning threshold lines of multiple pollutants are superimposed and plotted on the same time axis to generate a two-dimensional time series evolution curve. S52: When the rendering engine detects that the predicted curve has exceeded the threshold line, a warning message containing the expected date of exceeding the standard, the extreme value of exceeding the standard and the corresponding indicator information will be popped up asynchronously on the front-end interface, and an audio alarm will be triggered simultaneously. S53: While displaying the warning message, load a list of recommended solutions generated by the expert solution library into the front-end interface for the on-duty personnel to select, confirm, and respond to. S54: Configure high-level and low-level early warning values ​​independently for each physical monitoring node, and perform differentiated early warning judgments based on the differences in water quality background at different well locations and different strata.

9. The genetic algorithm-optimized BP neural network method for early warning of groundwater quality in mining areas according to claim 1, characterized in that, Multidimensional water quality time-series monitoring data is continuously collected online by an Internet of Things (IoT) multi-parameter sensor network deployed at key nodes of the underground pipeline network in the mining area, with the collection frequency set at the minute or hour level; spatial attribute data includes the unique identifier and geospatial coordinates of each monitoring node, which is used to establish the spatial geographic mapping basis of the monitoring network.

10. A genetic algorithm-optimized BP neural network-based early warning system for groundwater quality in mining areas, applied to the method described in claim 1, characterized in that, include: The data acquisition and fusion module is used to acquire underground spatial attribute data and multidimensional water quality time-series monitoring data of the mining area, and to align the two in time and space to generate the raw data stream. The data processing and feature management module is used to perform missing value repair, normalization processing and sliding window feature construction on the original data stream to generate a supervised learning sample sequence; The core module of the prediction model is used to globally optimize the weights and thresholds of the BP neural network using a genetic algorithm, train the optimization results to generate a basic prediction model, and perform rolling lead time series prediction. The online adaptive fine-tuning module is used to extract historical monitoring data of the target mining area monitoring nodes in real time to build a real-time training set. The model parameters are corrected online through incremental gradient descent training to generate a fine-tuned prediction model. The early warning decision module is used to perform a dual-track threshold comparison on the advanced prediction sequence output by the fine-tuned prediction model, generate an early warning judgment result, and automatically call the expert solution library to match decision suggestions. The multidimensional visualization and interaction module is used to overlay and plot the predicted values ​​and warning thresholds of various pollutants on the same time axis through the front-end chart engine. When the predicted curve exceeds the threshold, the audiovisual alarm mechanism is triggered asynchronously and a list of expert solutions is displayed.