A method for predicting spatial distribution of groundwater pollution sources based on one-hot encoder
Through the direct forward machine learning method based on One-hot encoding, using artificial neural network model and numerical simulation model, the problem of high computing resource consumption in traditional methods under complex geological conditions is solved, and efficient and accurate identification of groundwater pollution sources is achieved. Reduces prediction uncertainty.
Patent Information
- Application Number
- CN202411067203.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-06
- Publication Date
- 2024-11-05
- Estimated Expiration
- 2044-08-06
AI Technical Summary
Traditional groundwater pollution source identification methods consume a lot of resources, time, and complex operations when dealing with complex geological conditions, and there is uncertainty in the prediction results.
Using a direct forward machine learning method based on One-hot encoding, the artificial neural network model is used to directly output the pollution source attributes to monitor data as input, and the pollutant concentration data is obtained through numerical simulation models for pre-processing, and the pollution source is used to use One-hot encoding. Spatial distribution transforms into classification problems, reducing prediction uncertainty.
It significantly reduces the consumption of computing resources and time costs, improves the efficiency and accuracy of pollution source identification, reduces prediction errors, and provides more reliable pollution source location results.
Smart Images

Figure CN118586321B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of groundwater detection technology, and in particular to a groundwater pollution source spatial distribution prediction method based on a One-hot encoder. Background Art
[0002] Groundwater contamination source identification (GCSI) is crucial for the control and treatment of groundwater pollution. By identifying the temporal and spatial characteristics of pollutants entering the aquifer, groundwater pollution can be effectively prevented and controlled. However, traditional GCSI methods, such as direct methods and simulation / optimization (S / O) methods, usually require a lot of computing resources and time, especially when dealing with complex geological conditions. In addition, these methods rely on the combination of numerical simulation and optimization inversion algorithms, resulting in high computational cost, complex operation, and low application efficiency.
[0003] To address these challenges, researchers have proposed surrogate models to approximate the main features of complex simulations to improve computational efficiency. Commonly used surrogate model methods include Kriging, support vector regression, radial basis function, extreme learning machine, artificial neural network, etc. Although artificial neural network models have shown high accuracy in GCSI, their application method is different from other fields. In GCSI, the expected results (pollution source attributes) are used as input and the output is the observed data. This reverse usage inspired us to propose a new method to apply the artificial neural network model to GCSI in a classical way, that is, using monitoring data as input and directly outputting pollution source attributes, avoiding the complexity and computational cost of the optimization algorithm.
[0004] In practical applications, accurate identification of pollution source locations is crucial. Traditional models usually provide precise coordinates, but due to the complexity of geological and hydrological conditions, the prediction results are often uncertain. To this end, we introduce a new direct forward machine learning method based on One-hot encoding to reduce the uncertainty of prediction and provide more reliable GCSI results by estimating the probability of pollution sources in different spatial regions. Summary of the invention
[0005] In order to solve the technical problems raised in the background technology, the present invention provides a method for predicting the spatial distribution of groundwater pollution sources based on a One-hot encoder.
[0006] The present invention is implemented by the following technical solutions:
[0007] The present invention proposes a method for predicting the spatial distribution of groundwater pollution sources based on a one-hot encoder, comprising the following steps:
[0008] Step 1: Using the groundwater flow and solute transport model, a numerical simulation model of groundwater pollutant transport is established to obtain groundwater pollutant concentration monitoring data;
[0009] Step 2: collecting the groundwater pollutant concentration monitoring data obtained in step 1 and performing preprocessing, the preprocessing including denoising and standardization;
[0010] Step 3: construct an artificial neural network model, which includes an input layer, a hidden layer and an output layer, wherein: the input layer is used to input the pre-processed pollutant concentration monitoring data, the hidden layer is responsible for processing the input data, and the output layer outputs the predicted spatial distribution of pollution sources;
[0011] Step 4: One-hot encoding is used to perform one-hot encoding on the spatial distribution of pollution sources output by the output layer, so as to transform the pollution source spatial prediction task into a classification problem, and the classification standard is whether the area contains actual pollution sources;
[0012] Step 5: Use the constructed artificial neural network model to predict the new monitoring data and finally output the spatial distribution probability of the pollution source.
[0013] As a further improvement of the above scheme, the numerical simulation model in step 1 adopts a two-dimensional EPM model to simulate the flow and solute transport process, and the study area is a two-dimensional rectangle, and the left and right boundaries of the contaminated area have constant hydraulic head values, wherein the left boundary maintains a higher hydraulic head value to induce stable groundwater flow through the hydraulic head difference on the left and right sides, and the upper and lower boundaries of the contaminated area are no-flow boundaries;
[0014] It calculates the groundwater velocity field using Darcy's law and the mass balance equation:
[0015]
[0016]
[0017] Where h is the hydraulic head (L), Qs is the mass source term (M / TL³), T is the hydraulic conductivity (L / T), u is the velocity vector (L / T), ε is the porosity, and ρ is the fluid density (M / L³). The velocity field obtained by the above two equations is used to calculate the transport process of pollutants in the advection-diffusion equation (ADE), as shown below;
[0018]
[0019] Where C is the concentration (M / L³), Dc is the diffusion coefficient (L² / T), R is the source term (M / TL³), and α is the diffusion coefficient (L).
[0020] As a further improvement of the above scheme, the structure of the artificial neural network model is as follows:
[0021] The hidden layer: uses LeakyReLU as an activation function to process input data; and has a total of 7 layers, and the specific configuration of the number of neurons in each hidden layer is as follows: the first hidden layer has 1500 neurons, the second hidden layer has 1200 neurons, the third hidden layer has 1134 neurons, the fourth hidden layer has 1134 neurons, the fifth hidden layer has 1134 neurons, the sixth hidden layer has 1134 neurons, and the seventh hidden layer has 1134 neurons;
[0022] The output layer uses the Sigmoid activation function to output the predicted pollution source attributes and convert the prediction results into probability values between 0 and 1 to represent the existence probability of the pollution source of each grid.
[0023] As a further improvement of the above scheme, the formula of the LeakyReLU activation function used in the hidden layer is:
[0024]
[0025] Among them, x is the input value of the function; if means if;
[0026] The sigmoid function is defined by the following function:
[0027]
[0028] Among them, x is the input value of the function; e represents the natural function.
[0029] As a further improvement of the above solution, in step 4, one-hot encoding is performed on the spatial distribution of pollution sources, and the specific steps include:
[0030] Grid division: Considering the size of the polluted area, the polluted area is divided into several square grids of the same area, and a circle of square grids of the same size is added to the outer boundary of the polluted area to deal with the pollution sources close to the boundary;
[0031] Vector creation: For each simulated pollution leakage scenario, a one-dimensional vector of length n is generated, where the value of n is equal to the number of square grids, and the square grids containing the actual pollution source are marked as "1" and the other square grids are marked as "0";
[0032] Finally, the spatial prediction task is transformed into a classification problem to predict the grids that may contain pollution sources.
[0033] As a further improvement of the above scheme, in step 3, the pre-processed groundwater pollutant concentration monitoring data is input into the artificial neural network model for training, and the network parameters are adjusted by the back propagation algorithm to minimize the mean square error between the predicted value and the actual value, thereby improving the prediction accuracy of the model. The specific steps are as follows:
[0034] Data preprocessing: standardize the input data and divide it into training set and validation set;
[0035] Model training: Use the training set data to input the artificial neural network model for training, adjust the network parameters through the back propagation algorithm, and minimize the mean square error;
[0036] Model validation: Use validation set data to validate the training results and evaluate the prediction accuracy of the model.
[0037] Compared with the prior art, the present invention has the following beneficial effects:
[0038] The present invention adopts an artificial neural network model to directly predict the properties of pollution sources rather than traditional simulation / optimization methods. By eliminating the need for optimization algorithms, it greatly reduces the consumption of computing resources and time costs. Since the prediction of the artificial neural network model only requires one neural network calculation, it greatly improves efficiency compared to multiple iterative optimizations of traditional methods.
[0039] The present invention adopts One-hot encoding technology to transform the spatial distribution task of pollution sources into a classification problem, and uses an artificial neural network model to directly output the location probability of pollution sources, thereby simplifying the operation process and eliminating the need for complex optimization algorithm selection and implementation, so that non-professionals can also quickly master and apply the method.
[0040] The present invention optimizes the number of layers and the number of neurons in each layer of the artificial neural network model to ensure that the model can effectively learn and capture the complex relationship between pollution sources and monitoring data. The results show that the optimized artificial neural network model exhibits high prediction accuracy in the pollution source identification task, can accurately estimate the location and intensity parameters of the pollution source, and reduces the prediction error.
[0041] The present invention uses One-hot coding to represent the existence probability of pollution sources in different spatial regions and converts it into classification problem processing. Therefore, it reduces the uncertainty brought by single location prediction through probabilistic prediction, improves the reliability of identification results, and enables environmental management departments to locate pollution sources more accurately and take corresponding control measures.
[0042] In summary, the present invention has significantly improved the performance and practicality of groundwater pollution source identification through a number of technical improvements, such as reducing computing costs, reducing operational complexity, improving prediction accuracy, handling complex geological conditions, improving data utilization efficiency, and reducing prediction uncertainty. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] Figure 1 A diagram of the pollution leakage and migration process simulated by the two-dimensional EPM model of the present invention;
[0044] Figure 2 This is a schematic diagram of the One-hot encoding method proposed in the present invention;
[0045] Figure 3 The artificial neural network model proposed for the present invention converts the prediction results into a one-dimensional vector to represent the probability of the pollution source existence of each grid, and then outputs a color coding map through a One-hot encoding method. DETAILED DESCRIPTION
[0046] The present invention is further described below in conjunction with the accompanying drawings and specific implementation methods. It should be noted that, under the premise of no conflict, the various embodiments or technical features described below can be arbitrarily combined to form a new embodiment.
[0047] Example 1
[0048] This scheme proposes a groundwater pollution source spatial distribution prediction method based on one-hot encoder, which includes the following steps:
[0049] Step 1: Use the groundwater flow and solute transport model to establish a numerical simulation model of groundwater pollutant transport to obtain groundwater pollutant concentration monitoring data.
[0050] The establishment of a numerical simulation model for groundwater contaminant transport includes the following specific steps and details:
[0051] Step 101, select the model structure: select the two-dimensional effective porous medium (EPM) model, which is suitable for simulating the flow and solute transport of groundwater in homogeneous media. The study area is a two-dimensional rectangle, and the left and right boundaries of the area have constant hydraulic head values. The left boundary maintains a higher hydraulic head value to induce stable groundwater flow through the hydraulic head difference. The upper and lower boundaries are no-flow boundaries.
[0052] Step 102: Determine to establish the model:
[0053] Step 103: Set parameters:
[0054] 1. Hydraulic conductivity (T): It is defined as the product of hydraulic conductivity and aquifer thickness, with the unit of L / T.
[0055] 2. Porosity (ε): It represents the ratio of groundwater volume to total volume, dimensionless.
[0056] 3. Fluid density (ρ): unit is M / L³.
[0057] 4. Diffusion coefficient (Dc): unit is L² / T.
[0058] 5. Diffusion coefficient (α): unit is L.
[0059] Step 104: The numerical model obtains simulation results:
[0060] Groundwater velocity field: Calculate the groundwater velocity distribution in the entire simulation area.
[0061] Pollutant concentration field: simulate the concentration distribution of pollutants at different time steps.
[0062] The types of data obtained include:
[0063] Monitoring data: including groundwater level data, pollutant concentration data, and hydrogeological parameters of aquifers.
[0064] Simulation data: including flow velocity field data and pollutant concentration field data.
[0065] Step 2: collecting the groundwater pollutant concentration monitoring data obtained in step 1 and performing preprocessing, the preprocessing including denoising and standardization;
[0066] Step 3, construct an artificial neural network model, the artificial neural network model includes an input layer, a hidden layer and an output layer, wherein: the input layer is used to input the preprocessed pollutant concentration monitoring data, the hidden layer is responsible for processing the input data, and the output layer outputs the predicted spatial distribution of the pollution source; specifically, the model output is a one-dimensional vector of length n, n is the number of grids, each position in the vector corresponds to a grid, a value of 1 indicates that there is a pollution source in the grid, and a value of 0 indicates that there is no pollution source in the grid.
[0067] Step 4: One-hot encoding is used to perform one-hot encoding on the spatial distribution of pollution sources output by the output layer, so as to transform the pollution source spatial prediction task into a classification problem, and the classification standard is whether the area contains actual pollution sources. Specifically, a neural network model is used for classification training, and the classification results of each grid are predicted by inputting processed monitoring data.
[0068] The numerical simulation model in step 1 uses a two-dimensional EPM model to simulate the flow and solute transport process. The contaminated area studied is a two-dimensional rectangle of 3000×2000 square meters, and the left and right boundaries of the contaminated area have constant hydraulic head values. The left boundary maintains a higher hydraulic head value to induce stable groundwater flow through the hydraulic head difference. At the same time, the upper and lower boundaries of the contaminated area are no-flow boundaries.
[0069] In this scenario, a single-point pollution source leakage event is considered for the groundwater pollution source identification analysis. The pollution source may be located in the potential pollution area of 200 to 700 meters on the X axis and 600 to 1400 meters on the Y axis. Therefore, the size of the pollution area is considered to be 500×800 square meters. It is assumed that the pollutant leakage lasts for 24 months, with a consistent release intensity every 6 months. The simulation lasts for 15 years to monitor the migration of pollutants in the aquifer. It is assumed that the pollutants are conservative, that is, no biological or chemical transformation occurs. The monitoring wells arranged downstream measure the pollutant concentration throughout the simulation process. The measurement data from these observation wells serve as the key data source for groundwater pollution source identification analysis. For details, please refer to Figure 1 , simulated pollution leakage and migration process. Among them, red represents high pollution concentration.
[0070] It calculates the groundwater velocity field using Darcy's law and the mass balance equation:
[0071]
[0072]
[0073] Where h is the hydraulic head (L), Qs is the mass source term (M / TL³), T is the hydraulic conductivity (L / T), u is the velocity vector (L / T), ε is the porosity, and ρ is the fluid density (M / L³). The velocity field obtained by the above two equations is used to calculate the transport process of pollutants in the advection-diffusion equation (ADE) as shown below;
[0074]
[0075] Where C is the concentration (M / L³), Dc is the diffusion coefficient (L² / T), R is the source term (M / TL³), and α is the diffusion coefficient (L).
[0076] The structure of the artificial neural network model is as follows:
[0077] The hidden layer: uses LeakyReLU as an activation function to process input data; and has a total of 7 layers, and the specific configuration of the number of neurons in each hidden layer is as follows: the first hidden layer has 1500 neurons, the second hidden layer has 1200 neurons, the third hidden layer has 1134 neurons, the fourth hidden layer has 1134 neurons, the fifth hidden layer has 1134 neurons, the sixth hidden layer has 1134 neurons, and the seventh hidden layer has 1134 neurons;
[0078] The output layer uses the Sigmoid activation function to output the predicted pollution source attributes and convert the prediction results into probability values between 0 and 1 to represent the existence probability of the pollution source of each grid.
[0079] The formula for the hidden layer using the LeakyReLU activation function is:
[0080]
[0081] Among them, x is the input value of the function; if means if;
[0082] The sigmoid function is defined by the following function:
[0083]
[0084] Among them, x is the input value of the function; e represents the natural function.
[0085] Please refer to Figure 2 In step 4, one-hot encoding is performed on the spatial distribution of pollution sources, and the specific steps include:
[0086] Grid division: Considering that the size of the contaminated area is 500×800 square meters, the potential contaminated area is divided into square grids with a side length of 20 meters, and an additional layer of grids is added to the outer boundary of the potential contaminated area to deal with the pollution sources close to the boundary, forming a total of 1134 grids (27 grids in width and 42 grids in length);
[0087] Vector creation: For each simulated pollution leakage scenario, a one-dimensional vector of length 1134 is generated, in which the square grids containing the actual pollution source are marked as "1" and the other grids are marked as "0", converting the spatial prediction task into a classification problem, and the model predicts the grids that may contain pollution sources.
[0088] In step 3, the pre-processed groundwater pollutant concentration monitoring data is input into the artificial neural network model for training, and the network parameters are adjusted by the back propagation algorithm to minimize the mean square error between the predicted value and the actual value, thereby improving the prediction accuracy of the model. The specific steps are as follows:
[0089] Data preprocessing: The input data is standardized and divided into training set and validation set.
[0090] Model training: Use the training set data to input the artificial neural network model for training, adjust the network parameters through the back propagation algorithm, and minimize the mean square error.
[0091] Model validation: Use validation set data to validate the training results and evaluate the prediction accuracy of the model.
[0092] During the training process of the neural network, the input layer receives the processed pollutant concentration monitoring data and processes it layer by layer through 7 hidden layers. Each hidden layer uses the LeakyReLU activation function to capture the nonlinear relationship in the data. Finally, the output layer uses the Sigmoid activation function to convert the prediction results into probability values between 0 and 1, indicating the probability of the pollution source in each grid. The artificial neural network model after this structural optimization can effectively handle complex pollution source identification problems, improve the accuracy and efficiency of prediction, and reduce computational costs and operational complexity.
[0093] This scheme uses the trained artificial neural network model to predict new monitoring data, output the spatial distribution probability of pollution sources, and compare the prediction results with known data to verify the accuracy and reliability of the model.
[0094] Prediction process: input new monitoring data, use the trained model to make predictions, and output the spatial distribution probability of pollution sources.
[0095] Result display: The prediction results are converted into a one-dimensional vector to represent the probability of the pollution source in each grid, and the prediction results are displayed through a color-coded map.
[0096] Result verification: The predicted results are compared with the actual pollution source locations to evaluate the prediction accuracy and reliability of the model.
[0097] Please refer to Figure 3 , where the color grid represents the predicted results of the possible distribution of pollution source locations. Red represents a higher probability that the pollution source is located in this grid; blue represents a low probability. The yellow five-pointed star represents the actual location of the pollution source in the sample traceability data.
[0098] The above-mentioned embodiments are only preferred embodiments of the present invention and cannot be used to limit the scope of protection of the present invention. Any non-substantial changes and substitutions made by technicians in this field on the basis of the present invention shall fall within the scope of protection required by the present invention.
Claims
1. A method for predicting the spatial distribution of groundwater pollution sources based on a one-hot encoder, characterized in that: The steps include: Step 1: Using the groundwater flow and solute transport model, a numerical simulation model of groundwater pollutant transport is established to obtain groundwater pollutant concentration monitoring data; Step 2: collecting the groundwater pollutant concentration monitoring data obtained in step 1 and performing preprocessing, the preprocessing including denoising and standardization; Step 3: construct an artificial neural network model, which includes an input layer, a hidden layer and an output layer, wherein: the input layer is used to input the pre-processed pollutant concentration monitoring data, the hidden layer is responsible for processing the input data, and the output layer outputs the predicted spatial distribution of pollution sources; Step 4: One-hot encoding is used to perform one-hot encoding on the spatial distribution of pollution sources output by the output layer, so as to transform the pollution source spatial prediction task into a classification problem, and the classification standard is whether the area contains actual pollution sources; Step 5: Use the constructed artificial neural network model to predict the new monitoring data and finally output the spatial distribution probability of the pollution source; In step 4, one-hot encoding is performed on the spatial distribution of pollution sources, and the specific steps include: Grid division: Considering the size of the polluted area, the polluted area is divided into several square grids of the same area, and a circle of square grids of the same size is added to the outer boundary of the polluted area to deal with the pollution sources close to the boundary; Vector creation: For each simulated pollution leakage scenario, a one-dimensional vector of length n is generated, where the value of n is equal to the number of square grids. The square grids containing the actual pollution source are marked as "1" and the other square grids are marked as "0".
2. A method for predicting the spatial distribution of groundwater pollution sources based on a one-hot encoder according to claim 1, characterized in that: The numerical simulation model in step 1 adopts a two-dimensional EPM model to simulate the flow and solute transport process. The contaminated area studied is a two-dimensional rectangle, and the left and right boundaries of the contaminated area have constant hydraulic head values, wherein the left boundary maintains a higher hydraulic head value to induce stable groundwater flow through the hydraulic head difference between the left and right boundaries, and the upper and lower boundaries of the contaminated area are no-flow boundaries; Calculate the groundwater velocity field using Darcy's law and the mass balance equation: ; ; Among them, h is the hydraulic head, Qs is the mass source term, T is the hydraulic conductivity, u is the velocity vector, ε is the porosity, and ρ is the fluid density. The velocity field obtained by the above two equations is used to calculate the transport process of pollutants in the convection-diffusion equation, as shown below; ; Where C is the concentration, Dc is the diffusion coefficient, R is the source term, and α is the diffusion coefficient.
3. The method for predicting the spatial distribution of groundwater pollution sources based on a one-hot encoder according to claim 1, characterized in that: The structure of the artificial neural network model is as follows: The hidden layer: uses LeakyReLU as an activation function to process input data; and the hidden layer has 7 layers in total, and the specific configuration of the number of neurons in each hidden layer is as follows: the first hidden layer has 1500 neurons, the second hidden layer has 1200 neurons, the third hidden layer has 1134 neurons, the fourth hidden layer has 1134 neurons, the fifth hidden layer has 1134 neurons, the sixth hidden layer has 1134 neurons, and the seventh hidden layer has 1134 neurons; The output layer uses a Sigmoid activation function to output predicted pollution source attributes and convert the predicted results into probability values between 0 and 1 to represent the probability of the existence of the pollution source in the area.
4. A method for predicting the spatial distribution of groundwater pollution sources based on a one-hot encoder as claimed in claim 3, characterized in that: The formula for the hidden layer using the LeakyReLU activation function is: ; Among them, x is the input value of the function; if means if; The sigmoid function is defined by the following function: ; Where x is the input value of the function; e represents a natural function.
5. The method for predicting the spatial distribution of groundwater pollution sources based on a one-hot encoder according to claim 1, characterized in that: In step 3, the pre-processed groundwater pollutant concentration monitoring data is input into the artificial neural network model for training, and the network parameters are adjusted by the back propagation algorithm to minimize the mean square error between the predicted value and the actual value, thereby improving the prediction accuracy of the model. The specific steps are as follows: Data preprocessing: standardize the input data and divide it into training set and validation set; Model training: Use the training set data to input the artificial neural network model for training, adjust the network parameters through the back propagation algorithm, and minimize the mean square error; Model validation: Use validation set data to validate the training results and evaluate the prediction accuracy of the model.
Citation Information
Patent Citations
Groundwater contamination source identification method based on a plurality of NHA algorithms
CN102867117A
Underground water organic pollution source inversion method based on hyper-heuristic homotopy algorithm
CN114707395A
Groundwater pollution prediction method coupling space-time diagram convolutional network and mechanism model
CN117520768A
Method for predicting transport of groundwater contamination source
KR101267934B1
Method for heat enhanced reductive bioremediation
US20230272281A1
