Water environment dynamic pollution monitoring and atmospheric diffusion prediction method based on deep learning
Through the intelligent modeling process constructed by the variational autoencoder and hermit crab optimization algorithm, the technical difficulties of dynamic monitoring of water environment pollution status and atmospheric diffusion prediction are solved, high-precision pollutant diffusion prediction and early warning are achieved, and the intelligence and automation level of environmental monitoring are improved.
Patent Information
- Application Number
- CN202510508977.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-22
- Publication Date
- 2025-07-25
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
It is difficult for the prior art to achieve dynamic monitoring of water environment pollution status and accurate prediction of pollutants in the atmosphere. Traditional methods have problems such as insufficient modeling accuracy, limited parameter optimization capabilities, and weak diffusion process simulation capabilities.
The variational autoencoder model combined with the hermit crab optimization algorithm is used to construct an intelligent modeling process for deep characterization of pollution states and cross-media diffusion prediction. By collecting multi-source monitoring data, the potential variable characteristics of the pollution state are extracted, and a diffusion modeling network is constructed to predict the diffusion behavior of pollutants from water to atmosphere.
It has improved the accuracy of pollution modeling and cross-media information fusion capabilities, achieved high-accuracy prediction of pollution spread, supported environmental monitoring, pollution warning and ecological risk assessment, and had intelligent and automated technical support.
Smart Images

Figure CN120373778A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of deep learning, and particularly to a method for dynamic pollution monitoring of water environment and atmospheric diffusion prediction based on deep learning. Background Art
[0002] With the continuous advancement of the global industrialization process and the continuous increase in urban population density, the problem of water pollution has become increasingly serious and has become one of the key factors restricting regional ecological security and sustainable development. Frequent occurrences of phenomena such as excessive ammonia nitrogen, water eutrophication, and accumulation of toxic substances pose a direct threat to the water ecosystem and human health. At the same time, the accumulation of pollutants in water bodies is not limited to the liquid medium itself. Under certain meteorological conditions, they may transfer to the atmospheric environment through mechanisms such as evaporation and diffusion, leading to a decline in air quality and even the formation of compound pollution. Therefore, how to achieve dynamic monitoring of the pollution status in the water environment and further accurately predict the diffusion trend of pollutants in the atmosphere has become an important research direction in the current field of ecological environment monitoring and pollution prevention and control.
[0003] In the traditional technical system, water environmental pollution monitoring mostly relies on sensor nodes deployed at fixed positions to periodically collect basic parameters such as ammonia nitrogen concentration, dissolved oxygen, pH, and water temperature, and evaluate the pollution status through static rules or linear models. Although these methods have achieved preliminary pollution monitoring functions, they have obvious limitations. On the one hand, due to the strong nonlinear, temporal, and multi-source heterogeneous characteristics of environmental data, traditional rules and linear models are difficult to effectively model the dynamic evolution process of pollutants, resulting in low accuracy and poor timeliness of prediction results. On the other hand, most existing monitoring models ignore the deep latent characteristics of the pollution status and cannot extract latent variables with strong representational ability from high-dimensional data, making it difficult to support stable modeling of future pollution trends.
[0004] In addition, the cross-media diffusion process of pollutants, that is, the transfer and redistribution behavior from water to the atmosphere, is affected by multiple factors, including pollutant source release characteristics, hydrometeorological conditions, wind speed and direction, temperature gradient, etc. Its dynamic evolution process has strong spatio-temporal coupling and uncertainty. Currently, the research on this process mainly focuses on models based on physical diffusion equations, such as the Gaussian plume model and the Lagrangian particle model. Although these physical models have a good theoretical basis, they are highly dependent on initial boundary conditions and input variables and are difficult to be generalized in a changing and complex natural environment. Especially in the case of inconsistent pollution monitoring data frequencies and sparse spatial sampling points, traditional diffusion models are difficult to accurately reconstruct the pollution migration path, thus unable to meet the needs of actual pollution early warning and dispatching response.
[0005] In recent years, with the rapid development of artificial intelligence technology, the application of deep learning in environmental science has gradually received attention. Methods such as convolutional neural networks (CNNs) and long short-term memory networks (LSTMs) have been tried in water quality prediction and air quality modeling, achieving certain progress. However, the existing research generally has the following problems: First, most methods only rely on the historical data of pollutants themselves for prediction, lacking the integrated modeling of environmental influencing factors (such as meteorological information), and unable to achieve global modeling of pollution migration. Second, there is a lack of systematic optimization of network structures and hyperparameters during model training, resulting in overfitting or unstable performance of the network and weak generalization ability. Third, although some deep learning methods introduce automatic feature extraction mechanisms, they lack a clear latent variable modeling framework and are difficult to explain the deep dynamic behavior of pollution states. In addition, existing pollution diffusion modeling technologies rarely achieve the linkage coupling of water environment monitoring and atmospheric diffusion prediction, resulting in system fragmentation and incomplete prediction information, and it is difficult to provide continuous support for pollution warning and emergency dispatching.
[0006] Therefore, how to provide a deep learning-based method for dynamic pollution monitoring of water environment and atmospheric diffusion prediction is an urgent problem for those skilled in the art. Summary of the Invention
[0007] An object of the present invention is to propose a deep learning-based method for dynamic pollution monitoring of water environment and atmospheric diffusion prediction. The present invention fully integrates a variational autoencoder model, a hermit crab optimization algorithm, and a pollution diffusion modeling network, and constructs a complete intelligent modeling process from the deep characterization of pollution states to cross-media diffusion prediction. Specifically, the present invention collects time-series data of pollutants such as ammonia nitrogen concentration, dissolved oxygen, pH, and water temperature in water bodies, combines with atmospheric meteorological data, uses a variational autoencoder optimized by a hermit crab to extract the latent variable features of pollution states, constructs a dynamic diffusion modeling network, and realizes the prediction of the diffusion behavior of pollutants from water bodies to the atmosphere and the estimation of concentration distribution. This method has the advantages of high pollution modeling accuracy, self-adaptive model structure, strong cross-media information fusion ability, and high accuracy of pollution diffusion prediction, providing more intelligent and automated technical support for environmental monitoring, pollution warning, and ecological risk assessment.
[0008] The deep learning-based method for dynamic pollution monitoring of water environment and atmospheric diffusion prediction according to an embodiment of the present invention includes the following steps:
[0009] S1. Collect multi-source monitoring data of the water environment and the atmospheric environment, preprocess the multi-source monitoring data, and respectively construct a pollution time-series data set and an atmospheric meteorological data set;
[0010] S2. Construct a variational autoencoder model. The encoder module receives the contaminated time-series dataset and outputs the mean vector and standard deviation vector. The latent space sampling module performs latent vector sampling, and the decoder module reconstructs the original contaminated time-series data;
[0011] S3. Apply the hermit crab optimization algorithm to the joint optimization of the variational autoencoder model structure and hyperparameters. A hermit crab individual represents a combination of hyperparameters. The shell exchange mechanism, simulated search, and random perturbation strategy are used for global search iteration to obtain the optimal variational autoencoder model structure and hyperparameter configuration;
[0012] S4. Use the variational autoencoder model optimized by the hermit crab optimization algorithm to train the contaminated time-series dataset and extract the latent variables of the contamination state;
[0013] S5. Based on the latent variables and the atmospheric meteorological dataset, construct a diffusion modeling network to simulate the dynamic diffusion behavior of pollutants from the water body to the atmospheric medium and output the diffusion prediction results;
[0014] S6. Compare and analyze the diffusion prediction results with the preset pollution level threshold. When the predicted pollution concentration exceeds the set threshold, trigger the pollution warning module to output a warning message.
[0015] Optionally, the multi-source monitoring data specifically includes water pollutant concentrations, hydrological parameters, and atmospheric meteorological indicators, which are used to construct the contaminated time-series dataset and the atmospheric meteorological dataset.
[0016] Optionally, the preprocessing of the multi-source monitoring data specifically includes missing value filling, outlier removal, and normalization processing, which are used to improve the accuracy and stability of pollution modeling and prediction.
[0017] Optionally, S2 specifically includes:
[0018] S21. Build the variational autoencoder model structure. The variational autoencoder model consists of an encoder module, a latent space sampling module, and a decoder module. The encoder module is used to perform feature compression and generate latent space parameters for the contaminated time-series dataset. The latent space sampling module is used to perform random sampling based on the parameter distribution, and the decoder module is used to restore the structural information of the original contaminated data;
[0019] S22. Input the contaminated time-series dataset into the encoder module. The contaminated time-series dataset contains water environment pollutant monitoring data at multiple time steps;
[0020] S23. The encoder module performs a multi-layer neural network feature extraction process on the input contaminated time-series dataset and outputs the mean vector and standard deviation vector representing the latent space distribution characteristics, which are used to construct the normal distribution parameters that the latent variables follow;
[0021] S24. Input the mean vector and standard deviation vector output by the encoder module into the latent space sampling module, and perform a random sampling operation on the latent variables through the reparameterization technique to generate a latent variable representation with a fixed dimension, which is used to compactly characterize the latent dynamic features of the contaminated time series data;
[0022] S25. Input the sampled latent variables into the decoder module. The decoder module performs non - linear mapping and reconstruction operations on the latent variables and outputs reconstructed data with the same dimension as the original contaminated time series data, retaining the pollutant concentration change trend and time dependence during the reconstruction process;
[0023] S26. Obtain the reconstructed contaminated time series data output by the decoder module as the expression result of the variational auto - encoder model's modeling ability for the input contaminated time series dataset.
[0024] Optionally, the water environment pollutant monitoring data specifically includes ammonia nitrogen concentration, dissolved oxygen, pH, and water temperature, which are used to reflect the water pollution status and its change trend.
[0025] Optionally, S3 specifically includes:
[0026] S31. Initialize multiple heterogeneous sub - populations. Each sub - population consists of multiple hermit crab individuals. Different sub - populations respectively perform global perturbation search, local fine - tuning search, and memory - driven search behaviors to form a heterogeneous search system;
[0027] S32. Represent each hermit crab individual as a combination of a variational auto - encoder model structure and hyperparameters, and construct an individual position vector:
[0028] H i ={h i1 ,h i2 ,…,h id};
[0029] where H i represents the i - th individual, and h ij represents the structure or hyperparameter value of its j - th dimension, j ∈ {1, 2, …, d}, and d is the dimension to be optimized;
[0030] S33. Construct multiple populations:
[0031]
[0032] where k ∈ {1, 2, 3} is the heterogeneous sub - population index, and each hermit crab individual represents a combination of a set of variational auto - encoder model structure parameters and hyperparameters, i ∈ {1, 2, …, n}, and n is the number of individuals in each sub - population;
[0033] S34. Train the variational autoencoder model represented by each hermit crab individual, and calculate the true fitness value f(H i ):
[0034] f(H i ) = μ·E temporal (H i ) + ν·E structure (H i ) + ξ·E pred (H i );
[0035] Among them, E temporal (H i ) represents the fitting consistency error of the latent variable in the time dimension, E structure (H i ) represents the error of the ability to maintain the structural characteristics of the pollution state, E pred (H i ) represents the error of predicting the pollution concentration after the latent variable drives the diffusion modeling network, and μ, ν, and ξ are non - negative weight factors;
[0036] S35. Sort the hermit crab individuals within each sub - population in descending order according to the true fitness value f(H i ), and select the top k hermit crab individuals to form the shell preference set S top , and the remaining individuals form the shell competition pool S comp ;
[0037] S36. Based on the true fitness values of all obtained hermit crab individuals, construct a Gaussian process regression model With the hermit crab individual position vector H i as the input, and output the predicted fitness value The training objective function is:[[]]
[0038]
[0039] Among them, represents the predicted fitness value vector, f is the true fitness value vector, K is the covariance matrix constructed by the kernel function κ(H i , H j ), C is a constant term, and log2 is the logarithmic function;
[0040] S37. Within the shell competition pool S comp , each hermit crab individual randomly selects a target hermit crab individual H top from the shell preference set S j as the reference shell, and generates a candidate new solution through the structural perturbation method
[0041]
[0042] Among them, γ is the perturbation factor, represents the perturbation term subject to the normal distribution, and calculates the new hermit crab individual through the Gaussian process model and the original hermit crab individual of the predicted fitness. If then replace the original hermit crab individual H i , otherwise retain the original solution;
[0043] S38. Periodically perform shell cross-migration operations between heterogeneous subpopulations. Let the hermit crab individual of the a-th subpopulation cross with the hermit crab individual of the b-th subpopulation to generate a new hermit crab individual
[0044]
[0045] Among them, λ is the cross ratio factor; compare the generated new hermit crab individual with the hermit crab individual with the lowest fitness in the subpopulation where it is located. If the former has a better fitness, replace the latter and enter the next round of search, otherwise do not retain the generated new hermit crab individual;
[0046] S39. Perform boundary control on all updated hermit crab individuals. For the j-th dimensional hyperparameter, adopt the following correction method:
[0047]
[0048] Among them, h ij represents the parameter value of the i-th individual in the j-th dimension, represents the minimum value allowed for the j-th parameter dimension, represents the maximum value allowed for the j-th parameter dimension;
[0049] S310. Repeat steps S34 to S39 until the maximum iteration number T max or the global fitness convergence condition is satisfied, and finally output the hermit crab individual with the optimal fitness as the optimal variational autoencoder model structure and hyperparameter configuration.
[0050] Optionally, the specific content of S4 includes:
[0051] S41. Based on the obtained optimal hermit crab individual, construct an optimized variational autoencoder model structure and set the corresponding structure parameters and hyperparameters;
[0052] S42. Use the polluted time series dataset Input into the optimized variational autoencoder model, where x t represents the pollution observation vector at the t-th moment, t ∈ {1, 2, …, T}, and T represents the time series length;
[0053] S43. Nonlinearly encode the input pollution time series dataset through the encoder module to generate the mean vector and standard deviation vector corresponding to the pollution state at each moment;
[0054] S44. Based on the generated mean vector and standard deviation vector, perform a random sampling operation in the latent space to generate the latent variable corresponding to the pollution state;
[0055] S45. Extract the latent variables at all time steps in sequence as the dynamic feature representation of the pollution time series data in the latent space.
[0056] Optionally, the structural parameters and hyperparameters specifically include the encoder depth, latent space dimension, activation function, and learning rate, which are used to construct and optimize the network structure and training process of the variational autoencoder model.
[0057] Optionally, the S5 specifically includes:
[0058] S51. Fuse the latent variable sequence of the pollution state and the atmospheric meteorological dataset at the corresponding moment to construct a time-synchronized multimodal input sample. Each multimodal input sample contains pollution source features and environmental factor features, which are used to describe the driving conditions of pollution diffusion;
[0059] S52. Based on the spatio-temporal characteristics of pollution diffusion, design the structural framework of the diffusion modeling network, and determine the number of nodes, hierarchical connection methods, and types of time series processing units in the input layer, multiple hidden layers, and output layer;
[0060] S53. Configure the model parameters and training strategy of the diffusion modeling network, including the type of activation function, type of optimizer, learning rate, form of loss function, number of training epochs, batch size, and early stopping judgment conditions;
[0061] S54. Input the constructed pollution state - meteorology joint input sample into the diffusion modeling network, perform forward propagation calculation, and simulate the dynamic evolution process of pollutants diffusing into the atmosphere driven by meteorological factors after being released on the water surface;
[0062] S55. Compare the predicted output of the diffusion modeling network with the spatial distribution and concentration values of pollutants recorded in the historical pollution monitoring data, compare the differences between the predicted diffusion trajectory and the actual observed trajectory, execute the error feedback mechanism, update the weight parameters of the diffusion modeling network, and continuously iterate the training;
[0063] S56. After the diffusion modeling network is trained, the diffusion modeling network is used to input and predict new latent variables and the atmospheric meteorological data set, and the diffusion paths and concentration prediction values of pollutants in each spatial region of the atmospheric medium within multiple future time steps are output.
[0064] The beneficial effects of the present invention are:
[0065] By constructing a method for dynamic water environment pollution monitoring and atmospheric diffusion prediction based on deep learning, the present invention breaks through the technical bottlenecks of traditional methods in aspects such as insufficient accuracy in pollution state modeling, limited parameter optimization ability, and weak diffusion process simulation ability. First, a variational autoencoder model is used to deeply extract features from pollution time series data, which can automatically learn the potential dynamic laws of pollution evolution from multi-dimensional water quality monitoring data, making up for the problem that traditional linear models are difficult to capture non-linear change trends. By introducing the hermit crab optimization algorithm to jointly optimize the structural parameters and hyperparameters of the variational autoencoder, the dynamic adaptation of the structure and performance is realized, the reconstruction ability and generalization effect of the model are improved, and the manual dependence and parameter tuning cost are significantly reduced. At the same time, the present invention fuses and inputs latent variables and atmospheric meteorological data to construct a diffusion modeling network to simulate the spatio-temporal diffusion process of pollutants from water bodies to the atmospheric medium, establishing a deep coupling mechanism between pollution monitoring and diffusion prediction, and effectively improving the integrity and forward-looking of the pollution warning system.
[0066] In the entire method architecture, the present invention realizes the integrated integration of pollution state representation learning, model adaptive structure optimization, multi-modal data fusion, and cross-media dynamic diffusion modeling, which not only improves the accuracy and timeliness of water environment pollutant monitoring, but also enhances the prediction ability of pollution diffusion paths and concentration distributions under complex meteorological conditions. Compared with the prior art, the present invention has higher information expression ability, stronger model stability, and better cross-media prediction performance, providing reliable technical support for the digital supervision of water environment pollution and the response to pollution diffusion risks, and having important engineering application value and promotion prospects. Description of the Drawings
[0067] The drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation to the present invention. In the drawings:
[0068] Figure 1 is a flowchart of the method for dynamic water environment pollution monitoring and atmospheric diffusion prediction based on deep learning proposed by the present invention;
[0069] Figure 2 is a schematic diagram of the diffusion modeling network outputting the predicted results of the future spatial distribution of pollutants of the method for dynamic water environment pollution monitoring and atmospheric diffusion prediction based on deep learning proposed by the present invention. Detailed implementation manners
[0070] The present invention will now be described in further detail with reference to the accompanying drawings. These drawings are all simplified schematic diagrams, only illustrating the basic structure of the present invention in a schematic manner, so they only show the components related to the present invention.
[0071] Referring to Figure 1 and Figure 2 , a method for dynamic pollution monitoring of water environment and atmospheric diffusion prediction based on deep learning includes the following steps:
[0072] S1. Collect multi-source monitoring data of water environment and atmospheric environment, and preprocess the multi-source monitoring data to respectively construct a pollution time series dataset and an atmospheric meteorological dataset;
[0073] S2. Construct a variational autoencoder model. The encoder module receives the pollution time series dataset and outputs a mean vector and a standard deviation vector. The latent space sampling module performs latent vector sampling, and the decoder module reconstructs the original pollution time series data;
[0074] S3. Apply the hermit crab optimization algorithm to the joint optimization of the variational autoencoder model structure and hyperparameters. A hermit crab individual represents a hyperparameter combination, and a global search iteration is performed using a shell exchange mechanism, a simulated search, and a random perturbation strategy to obtain the optimal variational autoencoder model structure and hyperparameter configuration;
[0075] S4. Use the variational autoencoder model optimized by the hermit crab optimization algorithm to train the pollution time series dataset and extract the latent variables of the pollution state;
[0076] S5. Based on the latent variables and the atmospheric meteorological dataset, construct a diffusion modeling network for simulating the dynamic diffusion behavior of pollutants from water to atmospheric media and outputting diffusion prediction results;
[0077] S6. Compare and analyze the diffusion prediction results with a preset pollution level threshold. When the predicted pollution concentration exceeds the set threshold, trigger the pollution warning module to output a warning message.
[0078] The present invention constructs a pollution monitoring and diffusion prediction method based on deep learning, significantly improving the accuracy of water environmental pollution modeling and the response ability of cross-media diffusion prediction. Compared with traditional methods that rely on linear models or static threshold judgments, the present invention uses a variational autoencoder to automatically learn the latent feature expressions of pollution time-series data, and combines a hermit crab optimization algorithm to dynamically optimize the model structure and hyperparameters, achieving high-precision and highly adaptive pollution state modeling. On this basis, atmospheric meteorological data is introduced to construct a diffusion modeling network, accurately simulating the migration path and concentration change trend of pollutants from water to the atmosphere under complex meteorological conditions, and outputting pollution diffusion prediction results at multiple moments. By comparing the prediction results with pollution level thresholds, an intelligent trigger mechanism for exceeding the standard warning is realized. The overall solution has the advantages of high prediction accuracy, fast response speed, strong data adaptability, etc., and can be widely applied to scenarios such as water environment monitoring, pollution diffusion risk control, and environmental protection emergency response, with good engineering practicability and promotion value.
[0079] In this embodiment, the multi-source monitoring data specifically includes water pollutant concentrations, hydrological parameters, and atmospheric meteorological indicators, and is used to construct a pollution time-series dataset and an atmospheric meteorological dataset.
[0080] In this embodiment, the preprocessing of the multi-source monitoring data specifically includes missing value filling, outlier removal, and normalization processing, which are used to improve the accuracy and stability of pollution modeling and prediction.
[0081] In this embodiment, S2 specifically includes:
[0082] S21. Build the variational autoencoder model structure. The variational autoencoder model consists of an encoder module, a latent space sampling module, and a decoder module. The encoder module is used to compress the features of the pollution time-series dataset and generate latent space parameters. The latent space sampling module is used to perform random sampling based on the parameter distribution. The decoder module is used to restore the structural information of the original pollution data;
[0083] S22. Input the pollution time-series dataset into the encoder module. The pollution time-series dataset contains water environment pollutant monitoring data at multiple time steps;
[0084] S23. The encoder module performs a multi-layer neural network feature extraction process on the input pollution time-series dataset, and outputs a mean vector and a standard deviation vector representing the latent space distribution features, which are used to construct the normal distribution parameters that the latent variables follow;
[0085] S24. Input the mean vector and the standard deviation vector output by the encoder module into the latent space sampling module, and perform a random sampling operation on the latent variables through the reparameterization technique to generate a fixed-dimensional latent variable representation, which is used to compactly characterize the latent dynamic features of the pollution time-series data;
[0086] S25. Input the sampled latent variables into the decoder module. The decoder module performs non - linear mapping and reconstruction operations on the latent variables, and outputs reconstructed data with the same dimension as the original contaminated time - series data, while preserving the pollutant concentration change trend and time dependence during the reconstruction process;
[0087] S26. Obtain the reconstructed contaminated time - series data output by the decoder module as the expression result of the variational auto - encoder model's modeling ability for the input contaminated time - series dataset.
[0088] The present invention proposes a pollution time - series modeling method based on variational auto - encoder. By constructing a structure composed of an encoder, a latent space sampling module, and a decoder, it can effectively extract deep - level dynamic features in water environment pollutant monitoring data. This method uses the encoder module to compress and represent high - dimensional and redundant pollution time - series data, generating latent space distribution parameters, thereby reducing data complexity while preserving the pollutant concentration change trend. Sampling latent variables through the re - parameterization technique enables the model to have differentiability and generative ability, enhancing the abstract expression effect of the pollution state change law. The decoder module then performs non - linear reconstruction based on the latent variables, effectively restoring the time - dependent structure and change trend of the pollution data. This model not only has good data reconstruction ability but also can maintain stability and generalization in the case of insufficient or severely changing pollution time - series samples. Through a complete end - to - end training mechanism, the model has strong self - learning and self - adaptation abilities, providing a more representative latent pollution characterization for subsequent pollution diffusion modeling and prediction, and significantly improving the expression efficiency and prediction basis of pollution modeling.
[0089] In this embodiment, the water environment pollutant monitoring data specifically includes ammonia nitrogen concentration, dissolved oxygen, pH, and water temperature, which are used to reflect the water body pollution state and its change trend.
[0090] In this embodiment, the specific content of S3 includes:
[0091] S31. Initialize multiple heterogeneous sub - populations. Each sub - population consists of multiple hermit crab individuals. Different sub - populations respectively perform global perturbation search, local fine - tuning search, and memory - driven search behaviors to form a heterogeneous search system;
[0092] S32. Represent each hermit crab individual as a combination of a variational auto - encoder model structure and hyperparameters, and construct an individual position vector:
[0093] H i ={h i1 ,h i2 ,…,h id};
[0094] where Hi Denote the \(i\)-th individual as \(h\) ij and \(h_j\) represents the structure or hyperparameter value of its \(j\)-th dimension, where \(j\in\{1,2,\ldots,d\}\) and \(d\) is the dimension to be optimized;
[0095] S33. Construct multiple populations:
[0096]
[0097] where \(k\in\{1,2,3\}\) is the index of heterogeneous subpopulations, and each hermit crab individual represents a combination of variational autoencoder model structure parameters and hyperparameters, where \(i\in\{1,2,\ldots,n\}\) and \(n\) is the number of individuals in each subpopulation;
[0098] S34. Train the variational autoencoder model represented by each hermit crab individual, and calculate the true fitness value \(f(H i )\):
[0099] \(f(H i )=\mu\cdot E temporal (H i )+\nu\cdot E structure (H i )+\xi\cdot E pred (H i )\);
[0100] where \(E temporal (H i )\) represents the fitting consistency error of the latent variable in the time dimension, \(E structure (H i )\) represents the error of the ability to maintain the structural characteristics of the pollution state, \(E pred (H i )\) represents the error of predicting the pollution concentration after the latent variable drives the diffusion modeling network, and \(\mu\), \(\nu\), \(\xi\) are non-negative weight factors;
[0101] S35. Sort the hermit crab individuals within each subpopulation in descending order according to the true fitness value \(f(H i )\), select the top \(k\) hermit crab individuals to form the shell preferred set \(S top \), and the remaining individuals form the shell competition pool \(S comp \);
[0102] S36. Based on the true fitness values of all obtained hermit crab individuals, construct a Gaussian process regression model with the position vector \(H\) of the hermit crab individual i as the input and the predicted fitness value as the output to train the objective function which is:
[0103]
[0104] Among them, represents the predicted fitness value vector, f is the true fitness value vector, and K is the covariance matrix constructed by the kernel function κ(H i , H j ), C is a constant term, and log2 is the logarithmic function;
[0105] S37. In the shell competition pool S comp , each hermit crab individual randomly selects a target hermit crab individual H top from the shell preference set S j as a reference shell, and generates a candidate new solution through the structural perturbation method
[0106]
[0107] where γ is the perturbation factor, represents the perturbation term obeying the normal distribution, and calculates the predicted fitness of the new hermit crab individual through the Gaussian process model and the original hermit crab individual . If , then replace the original hermit crab individual H i , otherwise retain the original solution;
[0108] S38. Periodically perform shell cross-migration operations between heterogeneous subpopulations. Let the hermit crab individual of the a-th subpopulation cross with the hermit crab individual of the b-th subpopulation to generate a new hermit crab individual
[0109]
[0110] where λ is the cross ratio factor; compare the generated new hermit crab individual with the hermit crab individual with the lowest fitness in the subpopulation where it is located. If the former has a better fitness, then replace the latter and enter the next round of search, otherwise do not retain the generated new hermit crab individual;
[0111] S39. Perform boundary control on all updated hermit crab individuals. For the j-th dimensional hyperparameter, adopt the following correction method:
[0112]
[0113] where h ij represents the parameter value of the i-th individual in the j-th dimension, represents the minimum value allowed for the j-th parameter dimension, represents the maximum value allowed for the j-th parameter dimension;
[0114] S310. Repeat steps S34 to S39 until the maximum number of iterations T max or the global fitness convergence condition is met, and finally output the hermit crab individual with the optimal fitness as the optimal variational autoencoder model structure and hyperparameter configuration.
[0115] The present invention proposes a hermit crab optimization algorithm combining multiple population heterogeneous mechanisms and intelligent optimization strategies for jointly optimizing the structural parameters and hyperparameters of a variational autoencoder model, effectively improving the model's expression ability and generalization performance. By introducing multiple heterogeneous subpopulations that perform global perturbation, local fine-tuning, and memory-driven behaviors, the coordinated cooperation of diverse search strategies is achieved, enhancing the exploration ability and convergence stability of the solution space. Each hermit crab individual represents a specific model configuration and continuously evolves through a shell competition mechanism based on structural perturbation and fitness feedback to ensure that the optimization process is goal-oriented. At the same time, a Gaussian process regression model is used to predict and model the fitness, and structural perturbation and cross-migration operations are introduced to improve the search efficiency while maintaining search diversity. Through periodic boundary control and iterative update mechanisms, problems such as individual parameter out-of-bounds and getting stuck in local optima are avoided. The overall optimization process combines global search ability and local convergence, and can automatically generate a variational autoencoder model configuration with excellent performance and reasonable structure, providing stronger structural support and performance guarantee for subsequent pollution modeling.
[0116] In this embodiment, S4 specifically includes:
[0117] S41. Based on the obtained optimal hermit crab individual, construct an optimized variational autoencoder model structure and set the corresponding structural parameters and hyperparameters;
[0118] S42. Input the pollution time series dataset into the optimized variational autoencoder model, where x t represents the pollution observation vector at the t-th moment, t ∈ {1, 2,..., T}, and T represents the time series length;
[0119] S43. Non-linearly encode the input pollution time series dataset through the encoder module to generate the mean vector and standard deviation vector corresponding to the pollution state at each moment;
[0120] S44. Based on the generated mean vector and standard deviation vector, perform a random sampling operation in the latent space to generate the latent variable corresponding to the pollution state;
[0121] S45. Extract the latent variables at all time steps in sequence as the dynamic feature representation of the pollution time series data in the latent space.
[0122] The present invention proposes a process for training and latent variable extraction of polluted time series data based on an optimized variational autoencoder model, further improving the modeling ability of the dynamic changes in water environmental pollution states. The optimal model structure and hyperparameter configuration obtained through the hermit crab optimization algorithm enable the constructed variational autoencoder to achieve an optimal balance in terms of encoding ability, stability, and reconstruction effect. On this basis, the actual polluted time series data is input into the model, and the encoder performs non-linear compression processing on the pollution observation vectors at each time step, effectively capturing the high-order feature relationships in pollution evolution. The mean and standard deviation vectors constitute the distribution parameters of the latent space, and the sampling operation endows the model with stronger generativity and adaptability, enhancing its expression ability for non-stationary pollution sequences. The finally extracted latent variables not only compress redundant information but also retain the main dynamic patterns of the pollution data, providing more discriminative and transferable feature inputs for the diffusion modeling network. This step significantly improves the abstraction level and expression ability of data-driven pollution modeling, provides a high-quality semantic feature basis for subsequent pollution diffusion prediction, and has good practicality and engineering value.
[0123] In this embodiment, the structural parameters and hyperparameters specifically include the encoder depth, latent space dimension, activation function, and learning rate, which are used to construct and optimize the network structure and training process of the variational autoencoder model.
[0124] In this embodiment, the S5 specifically includes:
[0125] S51. Fuse the latent variable sequence of the pollution state and the atmospheric meteorological data set at the corresponding moment to construct a time-synchronized multi-modal input sample. Each multi-modal input sample contains pollution source characteristics and environmental factor characteristics, which are used to describe the driving conditions of pollution diffusion;
[0126] S52. Based on the spatio-temporal characteristics of pollution diffusion, design the structural framework of the diffusion modeling network, and determine the number of nodes, hierarchical connection methods, and types of time series processing units in the input layer, multiple hidden layers, and output layer;
[0127] S53. Configure the model parameters and training strategies of the diffusion modeling network, including the type of activation function, the type of optimizer, the learning rate, the form of the loss function, the number of training epochs, the batch size, and the early stopping judgment conditions;
[0128] S54. Input the constructed pollution state - meteorology joint input sample into the diffusion modeling network, perform forward propagation calculations, and simulate the dynamic evolution process of pollutants diffusing into the atmosphere after being released on the water surface under the drive of meteorological factors;
[0129] S55. Compare the predicted output of the diffusion modeling network with the spatial distribution and concentration values of pollutants recorded in the historical pollution monitoring data, compare the differences between the predicted diffusion trajectories and the actual observed trajectories, execute the error feedback mechanism, update the weight parameters of the diffusion modeling network, and continuously iterate the training;
[0130] S56. After the diffusion modeling network is trained, use the diffusion modeling network to input and predict new latent variables and the atmospheric meteorological data set, and output the diffusion paths and concentration prediction values of pollutants in each spatial region of the atmospheric medium within multiple future time steps.
[0131] The present invention proposes a method for constructing and predicting a diffusion modeling network based on the fusion of pollution state latent variables and atmospheric meteorological data in claim 5, effectively solving the problems of high complexity and insufficient prediction accuracy in the cross-media diffusion process of pollutants. By synchronously fusing the latent variables extracted by the optimized variational autoencoder with the meteorological environmental factors in time, multi-modal input samples are constructed to comprehensively reflect the dynamic characteristics of pollution sources and diffusion driving conditions. Combining the spatio-temporal characteristics of pollution diffusion, the present invention designs a diffusion modeling network with a deep structure, which supports multi-layer non-linear modeling and time series processing, and improves the modeling expression ability of pollution diffusion paths. During the training process, the system compares with the real pollutant concentration distribution data, executes the error feedback mechanism, and dynamically optimizes the network parameters to ensure that the prediction results are highly consistent in both spatial accuracy and time trend. After training, the model can realize the input prediction of the potential pollution state and meteorological conditions at any time, and output the diffusion paths and concentration values of pollutants in the atmospheric medium, supporting accurate predictions at multiple times and multiple spatial nodes. This method significantly improves the accuracy and stability of pollution diffusion simulation, and provides a reliable and deployable intelligent prediction tool for pollution diffusion risk assessment and emergency response.
[0132] Example 1:
[0133] To verify the feasibility of the present invention in implementation, the present invention is applied to a typical urban water environment pollution monitoring area, which is a typical closed or semi-closed surface water body. The water body is affected by a combination of domestic sewage, agricultural runoff and industrial wastewater from the surrounding areas. Under high temperature and high humidity meteorological conditions, pollutants may volatilize or enter the atmosphere through water-vapor exchange after accumulating in the water body, forming a water-air coupled pollution situation. Environmental management units urgently need an intelligent method that can dynamically perceive the evolution trend of water body pollution and predict the diffusion path of pollutants into the atmospheric medium in advance, so as to replace the current traditional means that rely on static monitoring and empirical rules.
[0134] The system first deployed automated water quality monitoring nodes to collect multi-dimensional parameters related to pollutants, including ammonia nitrogen concentration, dissolved oxygen, pH, water temperature, etc. Data was obtained once per hour and continuously collected for about two months, with a total data volume exceeding 5000 records. At the same time, environmental variables including wind speed, wind direction, air temperature, humidity, atmospheric pressure, etc. were accessed in real-time from the meteorological database to form synchronous multi-source time-series data of pollution and meteorology. Subsequently, according to the method described in the present invention, the variational autoencoder model was used to model and learn the pollution time-series data to extract pollution state variables in the latent space. The model structure parameters and training hyperparameters were dynamically searched by the hermit crab optimization algorithm. Finally, a structure combination with a latent dimension of 8, 3 encoder layers, a ReLU activation function, and a learning rate of 0.001 was selected, which showed the best performance on the validation set.
[0135] After the extraction of the latent variables, they were fused with the atmospheric meteorological data at the corresponding time to construct input samples, which were then input into the diffusion modeling network. The network structure adopted a combination of a time-series feature extraction module and multiple fully connected layers to output the predicted values of the pollutant concentration in the downwind area within several future time steps. After the system was trained, during an event of a rapid increase in ammonia nitrogen concentration, it successfully predicted 36 hours in advance that the pollutant might spread to two auxiliary stations outside the upstream observation point, and accurately judged that the high-concentration impact area would shrink below the safety threshold within 72 hours, assisting the regulatory department to initiate regional ventilation and drainage strategies and intervene in risk disposal in advance.
[0136] To verify the performance of the method of the present invention, a comparative experiment was carried out compared with traditional methods (such as the LSTM model and the linear interpolation model). During the 5-day period of a typical pollution event, the actual pollution concentrations at multiple key measurement points were recorded, and the prediction results of the three methods were evaluated for errors. The results showed that the method of the present invention had smaller prediction errors at most measurement points, more accurate fitting of the change trend, and earlier response time, and could more effectively support early warning issuance and dynamic management.
[0137] Table 1 Comparison table of pollution diffusion concentration prediction effects
[0138]
[0139] It can be seen from the data in Table 1 that the method proposed in the present invention has significant advantages in pollutant concentration prediction. Taking five typical observation points as an example, the actual pollution concentration range is distributed between 5.42 mg / L and 6.48 mg / L, showing an obvious fluctuation trend. Compared with the traditional LSTM model and interpolation method, the predicted values of the method of the present invention at all measurement points are closer to the actual measurement results, showing higher fitting accuracy and trend tracking ability.
[0140] Specifically, within the continuous time period from the 1st day to the 5th day, the error of the predicted value of the method of the present invention is always controlled within ±0.2 mg / L, while the errors of the LSTM method and the interpolation method mostly exceed ±0.3 mg / L, and even reach ±0.6 mg / L at individual points, with a significant increase in the prediction deviation. Taking the 3rd day as an example, the measured value is 6.25 mg / L, the prediction of the present invention is 5.97 mg / L, and the error is only 0.28 mg / L. While the predicted values of the LSTM and interpolation methods are 6.51 mg / L and 6.91 mg / L respectively, and the errors reach 0.26 and 0.66 mg / L, significantly deviating from the actual pollution level, indicating that the model of the present invention has a better response ability in the scenario of rapid change of pollution concentration.
[0141] From the overall evaluation, the mean absolute error of the method of the present invention within five days is 0.26 mg / L, far lower than 0.41 mg / L of the LSTM model and 0.62 mg / L of the interpolation model, proving its advantage in modeling the dynamic trend of pollution diffusion. It should be noted that the model of the present invention not only performs well in numerical error control, but also the predicted output is more smooth and physically reasonable, avoiding the common prediction oscillation and discontinuity problems in traditional models.
[0142] In summary, the data in the table fully illustrate that the pollution diffusion modeling network constructed by the present invention combines a variational autoencoder and a hermit crab optimization structure, can more effectively learn the complex association between pollution state latent variables and meteorological factors, has strong dynamic modeling ability, generalization ability and prediction accuracy, and is applicable to the deployment of pollution monitoring and early warning systems in actual water-air coupled pollution scenarios.
[0143] The above is only the preferred specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art within the technical scope disclosed by the present invention, according to the technical solution and inventive concept of the present invention, makes equivalent substitutions or changes, and should be covered by the protection scope of the present invention.
Claims
1. A method for dynamic pollution monitoring of water environment and atmospheric diffusion prediction based on deep learning, characterized in that, It includes the following steps: S1. Collect multi-source monitoring data of water environment and atmospheric environment, preprocess the multi-source monitoring data, and respectively construct a pollution time-series dataset and an atmospheric meteorological dataset; S2. Construct a variational autoencoder model. The encoder module receives the pollution time-series dataset and outputs a mean vector and a standard deviation vector. The latent space sampling module performs latent vector sampling, and the decoder module reconstructs the original pollution time-series data; S3. Apply the hermit crab optimization algorithm to the joint optimization of the variational autoencoder model structure and hyperparameters. A hermit crab individual represents a hyperparameter combination, and a global search iteration is carried out using a shell exchange mechanism, a simulated search, and a random perturbation strategy to obtain the optimal variational autoencoder model structure and hyperparameter configuration; S4. Use the variational autoencoder model optimized by the hermit crab optimization algorithm to train the pollution time-series dataset and extract the latent variables of the pollution state; S5. Based on the latent variables and the atmospheric meteorological dataset, construct a diffusion modeling network to simulate the dynamic diffusion behavior of pollutants from the water body to the atmospheric medium and output the diffusion prediction result; S6. Compare and analyze the diffusion prediction result with a preset pollution level threshold. When the predicted pollution concentration exceeds the set threshold, trigger the pollution warning module to output a warning message.
2. The method for dynamic pollution monitoring of water environment and atmospheric diffusion prediction based on deep learning according to claim 1, characterized in that, The multi-source monitoring data specifically includes water body pollutant concentration, hydrological parameters, and atmospheric meteorological indicators, and is used to construct a pollution time-series dataset and an atmospheric meteorological dataset.
3. The method for dynamic pollution monitoring of water environment and atmospheric diffusion prediction based on deep learning according to claim 1, wherein The preprocessing of the multi-source monitoring data specifically includes missing value filling, outlier removal, and normalization processing, which are used to improve the accuracy and stability of pollution modeling and prediction.
4. The method for dynamic pollution monitoring of water environment and atmospheric diffusion prediction based on deep learning according to claim 1, characterized in that, The S2 specifically includes: S21. Build the variational autoencoder model structure. The variational autoencoder model consists of an encoder module, a latent space sampling module, and a decoder module. The encoder module is used to perform feature compression and generate latent space parameters for the pollution time-series dataset. The latent space sampling module is used to perform random sampling based on the parameter distribution. The decoder module is used to restore the structural information of the original pollution data; S22. Input the pollution time-series dataset into the encoder module. The pollution time-series dataset contains water environment pollutant monitoring data at multiple time steps; S23. The encoder module performs a multi-layer neural network feature extraction process on the input pollution time-series dataset and outputs a mean vector and a standard deviation vector representing the latent space distribution characteristics, which are used to construct the normal distribution parameters that the latent variables follow; S24. Input the mean vector and the standard deviation vector output by the encoder module into the latent space sampling module, and perform a random sampling operation on the latent variables through the reparameterization technique to generate a latent variable representation with a fixed dimension, which is used to compactly represent the latent dynamic characteristics of the pollution time-series data; S25. Input the sampled latent variables into the decoder module. The decoder module performs a non-linear mapping and reconstruction operation on the latent variables and outputs reconstructed data with the same dimension as the original pollution time-series data, and retains the pollutant concentration change trend and time dependence during the reconstruction process; S26. Obtain the reconstructed contaminated time-series data output by the decoder module as the expression result of the variational autoencoder model's modeling ability for the input contaminated time-series dataset.
5. The method for dynamic pollution monitoring of water environment and atmospheric diffusion prediction based on deep learning according to claim 4, wherein, The water environment pollutant monitoring data specifically includes ammonia nitrogen concentration, dissolved oxygen, pH, and water temperature, which are used to reflect the water pollution status and its changing trend.
6. The method for dynamic pollution monitoring of water environment and atmospheric diffusion prediction based on deep learning according to claim 1, wherein The S3 specifically includes: S31. Initialize multiple heterogeneous subpopulations, each subpopulation consisting of multiple hermit crab individuals. Different subpopulations respectively perform global perturbation search, local fine-tuning search, and memory-driven search behaviors to form a heterogeneous search system. S32. Represent each hermit crab individual as a combination of a variational autoencoder model structure and hyperparameters, and construct an individual position vector. H i = {h i1 , h i2 , …, h id}; Among them, H i represents the i-th individual, and h ij represents the structure or hyperparameter value of its j-th dimension, where j ∈ {1, 2, …, d}, and d is the dimension to be optimized; S33. Construct multiple populations. Among them, \(k\in\{1,2,3\}\) is the index of the heterogeneous sub-population, and each hermit crab individual represents a combination of variational autoencoder model structure parameters and hyperparameters, \(i\in\{1,2,\ldots,n\}\), and \(n\) is the number of individuals in each sub-population; S34. Train the variational autoencoder model represented by each hermit crab individual, and calculate the true fitness value f(H i ): f(H i ) = μ·E temporal (H i ) + ν·E structure (H i ) + ξ·E pred (H i ); Among them, E temporal (H i ) represents the fitting consistency error of the latent variable in the time dimension, and E structure (H i ) represents the error of the ability to maintain the structural characteristics of the pollution state, and E pred (H i ) represents the error of predicting the pollution concentration after the latent variable drives the diffusion modeling network. μ, ν, and ξ are non-negative weight factors; S35. For the hermit crab individuals within each sub-population, sort them in descending order according to the true fitness value f(H i ), select the top k hermit crab individuals to form the shell optimization set S top , and the remaining individuals form the shell competition pool S comp ; S36. Based on the true fitness values of all hermit crab individuals obtained, construct a Gaussian process regression model Using the hermit crab individual position vector H i as the input, and output the predicted fitness value Train the objective function as follows: Among them, represents the predicted fitness value vector, f is the true fitness value vector, and K is the covariance matrix constructed by the kernel function κ(H i ,H j ), C is a constant term, and log2 is the logarithmic function; S37. In the shell competition pool S comp each hermit crab individual randomly selects a target hermit crab individual H top from the shell preference set S j as a reference shell, and generates a candidate new solution by means of structural perturbation where γ is the perturbation factor, denotes the perturbation term subject to a normal distribution, and calculates the new hermit crab individuals through the Gaussian process model and the predicted fitness of the original hermit crab individuals . If then replace the original hermit crab individual H i , otherwise retain the original solution; S38. Periodically perform shell cross-migration operations between heterogeneous sub-populations. Let the hermit crab individual of the a-th sub-population cross with the hermit crab individual of the b-th sub-population to generate a new hermit crab individual Among them, λ is the crossover ratio factor; the newly generated hermit crab individuals are compared with the hermit crab individuals with the lowest fitness in the corresponding sub-population. If the former has better fitness, it replaces the latter and enters the next round of search; otherwise, the newly generated hermit crab individuals are not retained. S39. Perform boundary control on all updated hermit crab individuals. For the j-th dimensional hyperparameter, adopt the following correction method: where h ij represents the parameter value of the i-th individual in the j-th dimension, represents the minimum value allowed for the j-th parameter dimension, represents the maximum value allowed for the j-th parameter dimension; S310. Repeat steps S34 to S39 until the maximum number of iterations T max or the global fitness convergence condition is met, and finally output the hermit crab individual with the optimal fitness as the optimal variational autoencoder model structure and hyperparameter configuration.
7. The method for dynamic pollution monitoring of water environment and atmospheric diffusion prediction based on deep learning according to claim 1, wherein The S4 specifically includes: S41. Based on the obtained optimal hermit crab individual, construct an optimized variational autoencoder model structure, and set the corresponding structure parameters and hyperparameters. S42. Input the contaminated time-series dataset X = {x1, x2, …, x T} into the optimized variational autoencoder model, where x t represents the contaminated observation vector at the t-th moment, t ∈ {1, 2, …, T}, and T represents the time-series length; S43. Nonlinearly encode the input contaminated time-series dataset through the encoder module to generate a mean vector and a standard deviation vector corresponding to the pollution state at each moment. S44. Based on the generated mean vector and standard deviation vector, perform a random sampling operation in the latent space to generate latent variables corresponding to the pollution state. S45. Extract all the latent variables at all time steps in sequence as the dynamic feature representation of the contaminated time-series data in the latent space.
8. The method for dynamic pollution monitoring of water environment and atmospheric diffusion prediction based on deep learning according to claim 7, characterized in that, The structure parameters and hyperparameters specifically include the encoder depth, latent space dimension, activation function, and learning rate, which are used to construct and optimize the network structure and training process of the variational autoencoder model.
9. The method for dynamic pollution monitoring of water environment and atmospheric diffusion prediction based on deep learning according to claim 1, characterized in that, The S5 specifically includes: S51. Fuse the latent variable sequence of the pollution state and the atmospheric meteorological dataset at the corresponding moment to construct a time-synchronized multimodal input sample. Each multimodal input sample contains pollution source characteristics and environmental factor characteristics, which are used to describe the driving conditions of pollution diffusion. S52. Based on the spatio-temporal characteristics of pollution diffusion, design the structural framework of the diffusion modeling network, and determine the number of nodes, hierarchical connection methods, and the type of time series processing unit in the input layer, multiple hidden layers, and output layer. S53. Configure the model parameters and training strategies of the diffusion modeling network, including the type of activation function, the type of optimizer, the learning rate, the form of the loss function, the number of training epochs, the batch size, and the early stopping judgment condition. S54. Input the constructed pollution state - meteorology joint input sample into the diffusion modeling network, perform forward propagation calculation, and simulate the dynamic evolution process of pollutants diffusing into the atmosphere driven by meteorological factors after being released on the water surface. S55. Compare the predicted output of the diffusion modeling network with the pollutant spatial distribution and concentration values recorded in the historical pollution monitoring data, compare the differences between the predicted diffusion trajectory and the actual observed trajectory, execute the error feedback mechanism, update the weight parameters of the diffusion modeling network, and continuously iterate the training. S56. After the diffusion modeling network is trained, use the diffusion modeling network to input and predict new latent variables and the atmospheric meteorological data set, and output the diffusion paths and concentration prediction values of pollutants in each spatial region of the atmospheric medium within multiple future time steps.
Citation Information
Cited By
Lining cloth dyeing control method and system based on artificial intelligence
CN121095851A
An artificial intelligence-based lining cloth dyeing control method and system
CN121095851B
Submarine pipeline leakage source searching method and system based on manned submersible
CN121613919A
Pollution diffusion path modeling method and system based on multiple sensors
CN122065640A
Multi-sensor based pollution dispersion path modeling method and system
CN122065640B