Heavy metal pollution tracing method based on artificial intelligence

Through the artificial intelligence-based method, the hierarchical random sampling method and Bayesian reverse modeling method are used to solve the problem that traditional heavy metal pollution source traceability methods lack scientific basis, and the precise traceability of heavy metal pollution sources is achieved and the comprehensive consideration of environmental factors is improved, and the scientificity and systematicity of the traceability results are improved.

CN119293407BActive Publication Date: 2025-03-14GUIZHOU UNIV +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411813071.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-11
Publication Date
2025-03-14
Estimated Expiration
2044-12-11

AI Technical Summary

Technical Problem

Traditional heavy metal pollution source traceability methods lack systematic scientific basis, and it is difficult to comprehensively consider the comprehensive impact of various environmental factors, resulting in the traceability results being not scientific and systematic enough.

Method used

Using an artificial intelligence-based method, data is collected through hierarchical random sampling method, outlier processing and data standardization, features of terrain and rainfall data are extracted, and multi-dimensional feature matrix is ​​constructed, and a prediction model is input to obtain heavy metal concentration and spatial distribution characteristics. Finally, Bayesian reverse modeling is used to infer the location of the pollution source.

Benefits of technology

It realizes accurate traceability of heavy metal pollution sources, improves the accuracy and reliability of traceability results, and comprehensively considers the comprehensive impact of a variety of environmental factors, solving the problem that traceability results in traditional methods are not scientific and systematic enough.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119293407B_ABST
    Figure CN119293407B_ABST
Patent Text Reader

Abstract

The present application belongs to the field of pollution source tracing technology, and more specifically, it relates to a heavy metal pollution tracing method based on artificial intelligence, which uses a stratified random sampling method to conduct multi-layer depth collection in different landform types, and performs outlier processing and standardization on the collected heavy metal concentration detection data, terrain segmentation and feature extraction on terrain data, and spatial interpolation and time matching on rainfall data; by obtaining historical pollution event records and wind speed and direction data, and constructing the interactive characteristics of rainfall and slope, the data dimension is further enriched. Then, the processed multidimensional feature matrix is ​​input into the trained prediction model to obtain accurate heavy metal concentration and spatial distribution characteristics. Finally, the Bayesian inverse modeling method is used to infer the location of the pollution source, thereby realizing the accurate tracing of the heavy metal pollution source, improving the accuracy and reliability of the tracing results, and effectively solving the technical problem that the tracing results in the traditional method are not scientific and systematic enough.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of pollution source tracing technology, and more specifically, to a heavy metal pollution tracing method based on artificial intelligence. Background Art

[0002] Heavy metal pollution is a major issue in environmental science and public health, particularly in regions experiencing rapid industrialization, where it poses a particularly severe threat to ecosystems and human health. Heavy metal pollution refers to the excessive concentrations of heavy metals (such as lead, mercury, cadmium, chromium, and arsenic) in the environment caused by human activities. Because heavy metals are bioaccumulative and non-degradable, once they enter the environment, they persist and spread, causing lasting harm. These metals can accumulate through the food chain and ultimately enter the human body, causing various health problems, such as neurological diseases, cancer, and reproductive disorders. Therefore, accurately locating the sources of heavy metal pollution is crucial for pollution control, environmental remediation, and policy development.

[0003] However, tracing the source of heavy metal pollution involves multiple complex factors, including geospatial characteristics, environmental changes, and historical pollution records, making this process extremely challenging. Geospatial characteristics such as topography, land use type, and hydrological characteristics all affect the migration and diffusion of heavy metals. Environmental changes, such as meteorological factors such as rainfall, wind speed, and wind direction, also have a significant impact on the spatial distribution of heavy metals. In addition, historical pollution records can provide a trajectory of the evolution of heavy metal pollution, but the data is often incomplete or contains errors, which increases the difficulty of tracing the source.

[0004] Traditional methods for tracing the source of heavy metal pollution rely mainly on on-site monitoring and expert judgment, and usually include the following steps:

[0005] On-site sampling and experimental analysis:

[0006] Researchers systematically sample polluted areas and use laboratory analysis to determine the types and concentrations of heavy metals in the samples. This data can provide insights into the pollution situation on site, but is typically limited to the sampling points and has limited spatial coverage.

[0007] Geographic Information System (GIS) Analysis:

[0008] Using GIS technology, the collected heavy metal concentration data is overlaid with geographic spatial data to generate pollution distribution maps. This method can help initially identify the spatial distribution pattern of pollution, but it is difficult to accurately locate the pollution source.

[0009] Expert experience judgment:

[0010] Experts use their experience to infer possible pollution sources by combining on-site investigations, historical pollution records, and GIS analysis results. This method relies on the experts' experience and knowledge, but is highly subjective, susceptible to human factors, and lacks systematicity and scientificity.

[0011] Although these traditional methods can provide information on heavy metal pollution sources to a certain extent, they often lack a systematic scientific basis and find it difficult to fully consider the combined impact of multiple environmental factors, resulting in traceability results that are not scientific and systematic enough. Summary of the Invention

[0012] The present invention provides an artificial intelligence-based heavy metal pollution source tracing method, which aims to solve the technical problem that traditional methods lack a systematic scientific basis and find it difficult to comprehensively consider the combined impact of multiple environmental factors, resulting in tracing results that are not scientific and systematic enough.

[0013] The artificial intelligence-based heavy metal pollution source tracing method includes the following steps:

[0014] Step 1: Collect heavy metal concentration detection data, topographic data, and rainfall data. The heavy metal concentration detection data adopts the stratified random sampling method. The study area is divided into different landform types. Multiple collection points are randomly selected in each area, and each collection point is collected at multiple depths.

[0015] Step 2: performing outlier processing and data standardization on the heavy metal concentration detection data, performing terrain segmentation on the terrain data and extracting terrain features, and performing spatial interpolation and time pairing on the rainfall data;

[0016] Step 3: Obtain historical pollution event records and wind speed and direction data, and construct the interaction characteristics of rainfall and slope based on rainfall data and terrain data;

[0017] Step 4: Combine the features obtained in steps 2 and 3 into a multidimensional feature matrix, and input the multidimensional feature matrix into the trained prediction model to obtain the heavy metal concentration and spatial distribution characteristics;

[0018] Step 5: Based on the heavy metal concentration and spatial distribution characteristics, topographic data, and rainfall data, the Bayesian inverse modeling method is used to infer the location of the pollution source.

[0019] This invention addresses the problem of traditional heavy metal pollution source tracing, which lacks comprehensive consideration of the combined impact of multiple environmental factors, through a systematic and scientific approach. First, a stratified random sampling method is used to conduct multi-layer, deep data collection across different landform types to ensure data representativeness and comprehensiveness. Second, the collected heavy metal concentration data is processed for outliers and normalized, terrain data is segmented and feature extracted, and rainfall data is spatially interpolated and time-matched to ensure data quality and consistency. Data dimensionality is further enriched by acquiring historical pollution event records and wind speed and direction data, and constructing interactive features between rainfall and slope. The processed multidimensional feature matrix is ​​then input into a trained prediction model to obtain accurate heavy metal concentration and spatial distribution characteristics, fully accounting for the combined impact of multiple environmental factors. Finally, based on these features, Bayesian inverse modeling is used to infer the location of the pollution source, thereby achieving precise tracing of heavy metal pollution sources. This method is not only highly systematic and scientific, but also fully considers the combined impact of multiple environmental factors, improving the accuracy and reliability of tracing results, and effectively addressing the technical problem of traditional tracing methods that often lack scientific and systematic results.

[0020] Preferably, the specific steps of segmenting the terrain data and extracting terrain features are as follows:

[0021] Data preprocessing: remove noise and outliers from the acquired terrain data;

[0022] Terrain segmentation: Apply the SLIC superpixel segmentation algorithm to segment the preprocessed terrain data to generate multiple uniform terrain units;

[0023] Topographic feature data extraction: Extracting topographic features from segmented topographic units, including: calculating slope and aspect using the elevation change rate formula; calculating surface roughness using the standard deviation of local elevation values; and calculating the topographic wetness index using local slope and catchment area.

[0024] Data standardization: Standardize the extracted terrain feature data.

[0025] Preferably, the specific steps of performing spatial difference on the rainfall data are as follows:

[0026] Semivariogram Calculation: Calculate the semivariogram for rainfall data:

[0027] ;

[0028] Where: represents the semivariogram value at distance h; represents the number of pairs of data points with a distance h; Indicates location The rainfall value at Indicates the rainfall value at a distance h;

[0029] Kriging weight calculation: Use the semivariogram function to establish the Kriging weight matrix and solve the weight coefficient;

[0030] Calculate rainfall: Use weight coefficients to calculate rainfall and generate a rainfall distribution map based on the calculated rainfall:

[0031] ;

[0032] Where: represents the calculated rainfall value at location x; Represents the weight coefficient.

[0033] Preferably, the steps of time-matching the rainfall data are as follows:

[0034] Get hourly rainfall data: Based on the collected rainfall data, get hourly rainfall data;

[0035] Time-weighted average: Perform time-weighted average on hourly rainfall data to calculate daily rainfall data:

[0036] ;

[0037] Where: represents daily rainfall; represents the weight of the i-th hour; represents the rainfall in hour i;

[0038] Data synchronization: synchronize the converted daily rainfall data with the heavy metal concentration data.

[0039] Preferably, the specific prediction steps of the prediction model are as follows:

[0040] Convolutional neural networks extract features through multiple convolutional layers and pooling layers;

[0041] Based on the features extracted by the convolutional neural network, the output result of the graph convolutional neural network is obtained by combining the graph convolutional neural network with the adjacency relationship processing;

[0042] The output features of the convolutional neural network and the graph convolutional neural network are concatenated to obtain a shared feature representation;

[0043] The shared feature representation is input into two different task networks, one for heavy metal concentration prediction and the other for spatial distribution feature prediction; finally, the heavy metal concentration and spatial distribution features are obtained.

[0044] Preferably, the structure of the prediction model is as follows:

[0045] Convolutional neural network part: includes input layer, three convolution layers, each convolution layer is followed by a pooling layer, and the last pooling layer is followed by a Flatten layer; the convolution layers all use ReLU activation function;

[0046] Graph convolutional neural network: includes an input layer, three graph convolutional layers, and the last convolutional layer is followed by a Flatten layer; the graph convolutional layers all use the ReLU activation function;

[0047] Feature splicing part: includes two fully connected layers, both of which use ReLU activation function;

[0048] Heavy metal concentration prediction network: consists of two fully connected layers and one output layer. The fully connected layers all use the ReLU activation function, and the output layer uses the linear activation function.

[0049] Spatial distribution feature prediction network: consists of two fully connected layers and one output layer; the fully connected layers all use the ReLU activation function, and the output layer uses the linear activation function.

[0050] Preferably, the loss function of the prediction model is as follows:

[0051] ;

[0052] Where: represents the loss function; represents the actual heavy metal concentration value of the i-th sample; represents the predicted heavy metal concentration value of the i-th sample; Represents the true spatial distribution feature vector of the i-th sample; represents the predicted spatial distribution feature vector of the i-th sample; N represents the total number of samples; Represents the set of samples adjacent to the i-th sample; Value ; Represents the relative error weight of heavy metal concentration; The weight representing the smoothness of the spatial distribution; and They represent the weight coefficients of heavy metal concentration prediction and spatial distribution characteristics prediction in the loss function respectively.

[0053] Preferably, the step 5 comprises the following steps:

[0054] Establish a Bayesian inverse model: Given observational data, find the posterior probability distribution of the pollution source location, where the given observational data are heavy metal concentrations and spatial distribution characteristics, topographic data, and rainfall data. The specific calculation formula is as follows:

[0055] ;

[0056] Where: represents the posterior probability of the pollution source location S given the observation data D; represents the likelihood function of the observed data D at the pollution source location S; represents the prior probability distribution of the pollution source location S; represents the evidence of the observed data D, which is a normalizing constant;

[0057] Define the prior probability distribution : Determination is based on the probability distribution of historical pollution source locations;

[0058] Define the likelihood function : Defined using the Gaussian diffusion model:

[0059] ;

[0060] Where: represents the heavy metal concentration at the i-th observation point; It is expressed as the concentration prediction value of the i-th observation point based on the pollution source location S; represents the observation error; N represents the number of observation points;

[0061] Posterior probability calculation:

[0062] ;

[0063] Use the Markov Chain Monte Carlo method to perform sampling and obtain an initial estimate of the pollution source location;

[0064] Based on the initial estimate, the estimation of the pollution source location is continuously updated through iterative optimization until convergence;

[0065] Determination of the final pollution source location:

[0066] ;

[0067] According to the posterior probability distribution, select the pollution source location with the largest posterior probability As a final estimate.

[0068] The beneficial effects of the present invention include:

[0069] This invention addresses the problem of traditional heavy metal pollution source tracing, which lacks comprehensive consideration of the combined impact of multiple environmental factors, through a systematic and scientific approach. First, a stratified random sampling method is used to conduct multi-layer, deep data collection across different landform types to ensure data representativeness and comprehensiveness. Second, the collected heavy metal concentration data is processed for outliers and normalized, terrain data is segmented and feature extracted, and rainfall data is spatially interpolated and time-matched to ensure data quality and consistency. Data dimensionality is further enriched by acquiring historical pollution event records and wind speed and direction data, and constructing interactive features between rainfall and slope. The processed multidimensional feature matrix is ​​then input into a trained prediction model to obtain accurate heavy metal concentration and spatial distribution characteristics, fully accounting for the combined impact of multiple environmental factors. Finally, based on these features, Bayesian inverse modeling is used to infer the location of the pollution source, thereby achieving precise tracing of heavy metal pollution sources. This method is not only highly systematic and scientific, but also fully considers the combined impact of multiple environmental factors, improving the accuracy and reliability of tracing results, and effectively addressing the technical problem of traditional tracing methods that often lack scientific and systematic results. BRIEF DESCRIPTION OF THE DRAWINGS

[0070] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the embodiments or descriptions of the prior art. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0071] Figure 1 This is a flowchart of the overall steps provided by an embodiment of the present invention.

[0072] Figure 2 A schematic diagram of the prediction model structure provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0073] In order to make the technical problems, technical solutions and beneficial effects to be solved by this application more clearly understood, this application is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.

[0074] See also Figure 1 As shown, the preferred embodiment of the present invention is further described;

[0075] The artificial intelligence-based heavy metal pollution source tracing method includes the following steps:

[0076] Step 1: Collect heavy metal concentration detection data (using atomic absorption spectrometry, X-ray fluorescence spectrometry, and other detection methods to detect and analyze heavy metal concentrations in soil samples), topographic data (such as LiDAR, satellite image data, etc.), and rainfall data (obtained through meteorological stations, satellite remote sensing, etc.). The heavy metal concentration detection data adopts a stratified random sampling method. The study area is divided into different landform types (such as rivers, farmlands, industrial areas, etc.). Multiple collection points are randomly selected in each area, and each collection point is collected at multiple depths (such as surface 0-10 cm, subsurface 10-30 cm, deep 30-50 cm);

[0077] Step 2: performing outlier processing and data standardization on the heavy metal concentration detection data, performing terrain segmentation on the terrain data and extracting terrain features, and performing spatial interpolation and time pairing on the rainfall data;

[0078] Step 3: Obtain historical pollution event records and wind speed and direction data, and construct the interaction characteristics of rainfall and slope based on rainfall data and terrain data;

[0079] Step 4: Combine the features obtained in steps 2 and 3 into a multidimensional feature matrix, and input the multidimensional feature matrix into the trained prediction model to obtain the heavy metal concentration and spatial distribution characteristics;

[0080] Step 5: Based on the heavy metal concentration and spatial distribution characteristics, topographic data, and rainfall data, the Bayesian inverse modeling method is used to infer the location of the pollution source.

[0081] This invention addresses the problem of traditional heavy metal pollution source tracing, which lacks comprehensive consideration of the combined impact of multiple environmental factors, through a systematic and scientific approach. First, a stratified random sampling method is used to conduct multi-layer, deep data collection across different landform types to ensure data representativeness and comprehensiveness. Second, the collected heavy metal concentration data is processed for outliers and normalized, terrain data is segmented and feature extracted, and rainfall data is spatially interpolated and time-matched to ensure data quality and consistency. Data dimensionality is further enriched by acquiring historical pollution event records and wind speed and direction data, and constructing interactive features between rainfall and slope. The processed multidimensional feature matrix is ​​then input into a trained prediction model to obtain accurate heavy metal concentration and spatial distribution characteristics, fully accounting for the combined impact of multiple environmental factors. Finally, based on these features, Bayesian inverse modeling is used to infer the location of the pollution source, thereby achieving precise tracing of heavy metal pollution sources. This method is not only highly systematic and scientific, but also fully considers the combined impact of multiple environmental factors, improving the accuracy and reliability of tracing results, and effectively addressing the technical problem of traditional tracing methods that often lack scientific and systematic results.

[0082] As a possible implementation of this embodiment, the specific steps of segmenting the terrain data and extracting terrain features are as follows:

[0083] Data preprocessing: remove noise and outliers from the acquired terrain data;

[0084] Terrain segmentation: Apply the SLIC superpixel segmentation algorithm to segment the preprocessed terrain data to generate multiple uniform terrain units;

[0085] A superpixel segmentation algorithm (such as SLIC, Simple Linear Iterative Clustering) is used to segment the terrain. The superpixel segmentation algorithm clusters adjacent pixels with similar characteristics to form superpixels, ensuring that each terrain unit has uniform terrain characteristics. The specific steps are as follows:

[0086] In the initial stage, seed points are evenly distributed in the image, and each seed point represents an initial superpixel;

[0087] Calculate the distance between each pixel and the seed point. The distance metric takes into account both spatial distance and color distance.

[0088] Iteratively update the center point position and redistribute pixels to the nearest seed point until convergence;

[0089] The specific calculation formula of the distance metric is as follows:

[0090]

[0091] Where: D represents the distance between the pixel and the seed point; Represents color distance, using Lab color space; represents the spatial distance; m represents the compactness parameter, balancing the color distance and spatial distance; S represents the desired size of the superpixel (i.e., the side length of the superpixel);

[0092] Topographic feature data extraction: Extracting topographic features from segmented topographic units, including: calculating slope and aspect using the elevation change rate formula; calculating surface roughness using the standard deviation of local elevation values; and calculating the topographic wetness index using local slope and catchment area.

[0093] Slope: Calculate the height transformation of each pixel, that is, the slope:

[0094] ;

[0095] Where: Indicates slope; Indicates the rate of change of height in the x direction; Indicates the rate of change of height in the y direction;

[0096] Slope direction: Calculate the projection direction of the slope on the horizontal plane:

[0097] ;

[0098] Where: A represents the slope direction;

[0099] Surface roughness:

[0100] ;

[0101] Where: R represents the surface roughness, N represents the number of pixels; represents the elevation value of the i-th pixel; Indicates the average elevation value;

[0102] Topographic Wetness Index:

[0103] ;

[0104] Where: represents the topographic wetness index; It represents the catchment area per unit width; Represents the local slope angle.

[0105] Data standardization: Standardize the extracted terrain feature data.

[0106] In this embodiment, since the terrain has a significant impact on the diffusion and accumulation of pollutants during the process of tracing the source of heavy metal pollution; different terrain features (such as valleys, slopes, and plains) will lead to differences in the distribution of pollutants; therefore, it is necessary to carefully segment and analyze the terrain in order to more accurately understand the diffusion path and accumulation area of ​​pollutants.

[0107] In this embodiment, the SLIC superpixel segmentation algorithm is used to segment the terrain data into multiple uniform units, making the terrain features within each unit more consistent. After terrain segmentation, the data becomes more structured, which is conducive to feature extraction and subsequent analysis. The LIC algorithm can maintain the edge details of the terrain data, helping to accurately extract terrain features such as slope and aspect. Moreover, by segmenting the terrain, terrain features can be analyzed at a finer level, improving the model's ability to identify pollutant diffusion paths. The characteristics of the segmented terrain units are more uniform, which helps to construct more accurate and representative feature vectors, thereby improving the learning effect of the model.

[0108] As a possible implementation of this embodiment, the specific steps of performing spatial difference on the rainfall data are as follows:

[0109] Semivariogram Calculation: Calculate the semivariogram for rainfall data:

[0110] ;

[0111] Where: represents the semivariogram value at distance h; represents the number of pairs of data points with a distance h; Indicates location The rainfall value at Indicates the rainfall value at a distance h;

[0112] Kriging weight calculation: Use the semivariogram function to establish the Kriging weight matrix and solve the weight coefficient. The specific steps are as follows:

[0113] Assume that there are N observation points, whose locations are , the observed value is , we want to estimate a location point Value ;

[0114] For each position and , defining the semivariogram , indicating the location and The semivariogram values ​​between ;

[0115] The i-th equation of the Kriging system (for ) is represented as follows:

[0116] ;

[0117] Where: represents the weight coefficient; represents the Lagrange multiplier, which is used to ensure the unbiased condition (that is, the sum of the weights is 1); Indicates an unknown point;

[0118] Solve the kriging equations:

[0119] We get N+1 equations:

[0120] ;

[0121] By solving the above equations, we can get the weight coefficients and Lagrange multipliers ;

[0122] Calculate rainfall: Use weight coefficients to calculate rainfall and generate a rainfall distribution map based on the calculated rainfall:

[0123] ;

[0124] Where: represents the calculated rainfall value at location x; Represents the weight coefficient.

[0125] In this embodiment, by calculating the semivariogram and Kriging weights, the rainfall data is spatially interpolated. The generated rainfall distribution map can more accurately reflect the spatial variation of rainfall, providing an important basis for pollutant diffusion analysis.

[0126] As a possible implementation of this embodiment, the steps of time-matching the rainfall data are as follows:

[0127] Get hourly rainfall data: Based on the collected rainfall data, get hourly rainfall data;

[0128] Time-weighted average: Perform time-weighted average on hourly rainfall data to calculate daily rainfall data:

[0129] ;

[0130] Where: represents daily rainfall; represents the weight of the i-th hour; represents the rainfall in hour i;

[0131] Data synchronization: synchronize the converted daily rainfall data with the heavy metal concentration data.

[0132] In this embodiment, daily rainfall data is calculated by taking the time-weighted average of hourly rainfall data, making the rainfall data more continuous and representative in the time dimension, which helps to improve the time synchronization performance and prediction accuracy of the model.

[0133] As a possible implementation of this embodiment, the specific prediction steps of the prediction model are as follows:

[0134] Convolutional neural networks extract features through multiple convolutional layers and pooling layers;

[0135] Based on the features extracted by the convolutional neural network, the output result of the graph convolutional neural network is obtained by combining the graph convolutional neural network with the adjacency relationship processing;

[0136] The output features of the convolutional neural network and the graph convolutional neural network are concatenated to obtain a shared feature representation;

[0137] The shared feature representation is input into two different task networks, one for heavy metal concentration prediction and the other for spatial distribution feature prediction; finally, the heavy metal concentration and spatial distribution features are obtained.

[0138] As a possible implementation of this embodiment, the constructed feature combination is as follows:

[0139] Feature matrix construction: All features are combined into a multidimensional feature matrix X as the input of the prediction model:

[0140] ;

[0141] in: Indicates the concentration of heavy metals; represents slope; A represents slope direction; R represents rainfall; represents the topographic wetness index; represents the interaction characteristics between rainfall and slope, ; Indicates wind speed and direction data;

[0142] See also Figure 2 As shown, the structure of the prediction model is as follows:

[0143] Convolutional neural network part: includes input layer, three convolution layers, each convolution layer is followed by a pooling layer, and the last pooling layer is followed by a Flatten layer; the convolution layers all use ReLU activation function;

[0144] Graph convolutional neural network: includes an input layer, three graph convolutional layers, and the last convolutional layer is followed by a Flatten layer; the graph convolutional layers all use the ReLU activation function;

[0145] Feature splicing part: includes two fully connected layers, both of which use ReLU activation function;

[0146] Heavy metal concentration prediction network: consists of two fully connected layers and one output layer. The fully connected layers all use the ReLU activation function, and the output layer uses the linear activation function.

[0147] Spatial distribution feature prediction network: consists of two fully connected layers and one output layer; the fully connected layers all use the ReLU activation function, and the output layer uses the linear activation function.

[0148] The specific structure is as follows:

[0149] Convolutional neural network part:

[0150] Input layer, used to input the data obtained in steps 2 and 3;

[0151] Convolutional layer 1: The convolution kernel size is 3*3, the number of convolution kernels is 32, and the ReLU activation function is used; padding: same means adding extra pixels to the edge of the input data to control the spatial dimension of the output feature map and ensure that the spatial dimension of the output feature map is the same as the spatial dimension of the input feature map. The specific calculation method is as follows:

[0152] ;

[0153] Where: Indicates the size of the convolution kernel; P indicates the amount of padding;

[0154] Calculation of the size of the output feature map:

[0155] ;

[0156] Where: H represents the height of the feature map; P represents the amount of padding; k represents the size of the convolution kernel; s represents the stride;

[0157] Pooling layer 1: type is Max Pooling, and the pooling window size is 2*2;

[0158] Convolutional layer 2: The convolution kernel size is 3*3, the number of convolution kernels is 64; ReLU activation function is used; padding: same;

[0159] Pooling layer 2: type is Max Pooling, and the pooling window size is 2*2;

[0160] Convolution layer 3: The convolution kernel size is 3*3, the number of convolution kernels is 128, and the ReLU activation function is used; padding: same;

[0161] Pooling layer 3: type is Max Pooling, and the pooling window size is 2*2;

[0162] Flatten layer: flattens the 3D feature map into a 1D feature vector;

[0163] Graph convolutional neural network part:

[0164] Input layer: used to input the output and adjacency of the convolutional neural network;

[0165] Graph convolution layer 1: The number of output channels is 64, and the ReLU activation function is used;

[0166] Graph convolutional layer 2: The number of output channels is 128, and the ReLU activation function is used;

[0167] Graph convolution layer 3: The number of output channels is 256, and the ReLU activation function is used;

[0168] Flatten layer: flattens the features after graph convolution into a 1D feature vector;

[0169] Feature splicing layer: splicing the 1D feature vectors extracted by CNN and GCN;

[0170] Fully connected layer 1: The number of units is 512, and the ReLU activation function is used;

[0171] Fully connected layer 2: The number of units is 256, and the ReLU activation function is used;

[0172] Heavy metal concentration prediction network:

[0173] Fully connected layer 1: The number of units is 128, and the ReLU activation function is used;

[0174] Fully connected layer 2: The number of units is 64, and the ReLU activation function is used;

[0175] Output layer: The number of units is 1 (predicting heavy metal concentration values), and the activation function uses a linear activation function;

[0176] Spatial distribution feature prediction network:

[0177] Fully connected layer 1: The number of units is 128, and the ReLU activation function is used;

[0178] Fully connected layer 2: The number of units is 64, and the ReLU activation function is used;

[0179] Output layer: The number of units is 1, and a linear activation function is used.

[0180] It should be noted that in the above technical solution, since the convolutional neural network (CNN) outputs a 1D feature vector, and the graph convolutional neural network (GCN) usually processes graph structured data, in which the node feature vector and adjacency matrix are the basic input; therefore, it is inappropriate to directly input the CNN's 1D feature vector into the GCN. Therefore, the CNN input needs to be processed as follows:

[0181] The output data of CNN is converted into a data format suitable for GCN input through a conversion layer;

[0182] Method 1:

[0183] Reorganize the 1D feature vector of CNN into node features:

[0184] Stack the 1D feature vectors of all data points into a matrix , where M represents the number of data points and F represents the feature dimension of the data points;

[0185] Construct an adjacency matrix , represents the relationship between data points, where the adjacency matrix can be constructed in many ways, such as based on the distance, similarity or predefined topological structure between data points.

[0186] Method 2:

[0187] Use fully connected layer conversion: Add one or more fully connected layers between CNN and GCN to convert 1D features into a format suitable for GCN input; through the transformation of the fully connected layer, generate the node feature matrix required by GCN; this method also requires the construction of the adjacency matrix A, and the construction method is the same as method 1.

[0188] In this embodiment, CNN extracts features through multiple convolutional layers and pooling layers, which can effectively capture the local features and spatial correlations in heavy metal pollution data. GCN processes data in combination with adjacency relationships, further mining the structural information in the data, and improving the model's ability to understand complex terrain and spatial relationships. By splicing the output features of CNN and GCN and using shared feature representations to predict heavy metal concentrations and spatial distribution characteristics, the comprehensive prediction ability and accuracy of the model are improved.

[0189] As a possible implementation of this embodiment, the loss function of the prediction model is as follows:

[0190] ;

[0191] Where: represents the loss function; represents the actual heavy metal concentration value of the i-th sample; represents the predicted heavy metal concentration value of the i-th sample; Represents the true spatial distribution feature vector of the i-th sample; represents the predicted spatial distribution feature vector of the i-th sample; N represents the total number of samples; Represents the set of samples adjacent to the i-th sample; Value ; Represents the relative error weight of heavy metal concentration; The weight representing the smoothness of the spatial distribution; and They represent the weight coefficients of heavy metal concentration prediction and spatial distribution characteristics prediction in the loss function respectively.

[0192] In this embodiment, since the environmental data has spatial correlation, the prediction results should also be spatially coherent and smooth. Therefore, the loss function integrates the heavy metal concentration prediction error, spatial distribution feature prediction error, relative error and spatial distribution smoothness, which can balance the optimization objectives of different tasks and improve the generalization ability of the overall model. By constraining the smoothness of the spatial distribution characteristics, the spatial consistency and coherence of the prediction results are guaranteed, the prediction fluctuation is reduced, and the stability of the model is improved.

[0193] As a possible implementation of this embodiment, step 5 includes the following steps:

[0194] Establish a Bayesian inverse model: Given observational data, find the posterior probability distribution of the pollution source location, where the given observational data are heavy metal concentrations and spatial distribution characteristics, topographic data, and rainfall data. The specific calculation formula is as follows:

[0195] ;

[0196] Where: represents the posterior probability of the pollution source location S given the observation data D; represents the likelihood function of the observed data D at the pollution source location S; represents the prior probability distribution of the pollution source location S; represents the evidence of the observed data D, which is a normalizing constant;

[0197] Define the prior probability distribution : Determination is based on the probability distribution of historical pollution source locations;

[0198] Define the likelihood function : Defined using the Gaussian diffusion model:

[0199] ;

[0200] Where: represents the heavy metal concentration at the i-th observation point; It is expressed as the concentration prediction value of the i-th observation point based on the pollution source location S; represents the observation error; N represents the number of observation points;

[0201] in Based on the following formula:

[0202] ;

[0203] Where: Indicates the release intensity of the pollution source; represents the baseline diffusion coefficient; represents the influence coefficient of terrain characteristics on the diffusion coefficient; Represents terrain features (such as slope, elevation, etc.) obtained based on terrain data represents the distance from the i-th observation point to the pollution source; t represents the diffusion time; The coefficient representing the effect of topographic characteristics on heavy metal concentrations; The coefficient representing the effect of rainfall on heavy metal concentrations; represents the rainfall at the i-th observation point; represents the heavy metal concentration value at the i-th observation point;

[0204] function Used to predict the location of the hypothetical pollution source S, the i-th observation point The heavy metal concentrations are predicted based on the diffusion model, taking into account the process of pollutants spreading from the source point to each observation point;

[0205] Through the predicted value With the observed value (i.e. heavy metal concentration prediction and spatial distribution characteristics prediction) to construct the likelihood function , that is, the probability of the observation data D appearing under the assumption that the pollution source is located at S.

[0206] The observation error is confirmed by the historical data method: the observation error is estimated by using historical measurement data and its fluctuations;

[0207] Collect heavy metal concentration measurement data over a period of time; perform statistical analysis on the data, calculate the mean and standard deviation of each measurement point, and use the standard deviation as the observation error;

[0208] Posterior probability calculation:

[0209] ;

[0210] Using the Markov Chain Monte Carlo (MCMC) method for sampling, we obtain an initial estimate of the pollution source location.

[0211] Randomly select an initial estimate within the range of possible pollution source locations. The specific steps are as follows:

[0212] Determine scope: Determine the scope of possible pollution source locations based on geographic information and historical data.

[0213] Random Selection: Randomly select an initial estimate within this range .

[0214] By setting a reasonable initial estimate to start the MCMC process, convergence can be accelerated, the number of required iterations can be reduced, and computational efficiency can be improved. MCMC methods construct a Markov chain to sample the target distribution. However, starting from the initial position, the Markov chain takes a certain amount of time to reach a stable distribution. This process is called "mixing." If the initial estimate is close to the high-probability region of the target distribution, the chain will reach a stable state more quickly, thereby reducing convergence time.

[0215] Based on the initial estimate, the estimation of the pollution source location is continuously updated through iterative optimization until convergence;

[0216] The convergence criteria are as follows:

[0217] Monitor the change of the posterior probability P(S|D). When the change is less than the set threshold, it is considered to have converged. The specific steps are as follows:

[0218] Calculate the posterior probability: Calculate the posterior probability P(S|D) in each iteration;

[0219] Change monitoring: Calculate the change ΔP of the posterior probability between two adjacent iterations;

[0220] Convergence judgment: When ΔP is less than the preset threshold ε, the algorithm is considered to have converged.

[0221] Determination of the final pollution source location:

[0222] ;

[0223] According to the posterior probability distribution, select the pollution source location with the largest posterior probability As a final estimate.

[0224] In this example, a multi-dimensional Bayesian inverse model was established using heavy metal concentration and spatial distribution characteristics, terrain data, and rainfall data. These data sources provide rich information that can fully describe the diffusion behavior and influencing factors of pollutants, thereby improving the accuracy of pollution source location; by calculating In the Bayesian inverse model, the observed data are compared with the predicted data to evaluate the rationality of the assumed pollution source location S. By constructing and optimizing this prediction function, the location of the pollution source is finally determined. .

[0225] The above are only preferred embodiments of the present application and are not intended to limit the present application. Any modifications, equivalent replacements, and improvements made within the spirit and principles of the present application should be included in the scope of protection of the present application.

Claims

1. A heavy metal pollution tracing method based on artificial intelligence, characterized in that: The following steps are involved: Step 1: Collect heavy metal concentration detection data, terrain data and rainfall data. The heavy metal concentration detection data adopts stratified random sampling method. The study area is divided into different landform types. Multiple collection points are randomly selected in each area, and each collection point is collected at multiple depths. Step 2: Perform outlier processing and data standardization on the heavy metal concentration detection data, perform terrain segmentation on the terrain data, extract terrain features, and perform spatial interpolation and time pairing on the rainfall data; Step 3: Obtain historical pollution event records and wind speed and direction data, and construct the interactive characteristics of rainfall and slope based on rainfall data and terrain data; Step 4: Combine the features obtained in step 2 and step 3 into a multidimensional feature matrix, and input the multidimensional feature matrix into the trained prediction model to obtain the heavy metal concentration and spatial distribution characteristics; Step 5: Based on the heavy metal concentration and spatial distribution characteristics, terrain data and rainfall data, a Bayesian inverse model and related likelihood function are established, and the Markov Chain Monte Carlo method is used for initial estimation. Based on the initial estimation, the estimation of the pollution source location is continuously updated through iterative optimization until convergence, and the location of the pollution source is finally determined.

2. The artificial intelligence-based heavy metal pollution source tracing method according to claim 1 is characterized in that: The specific steps of segmenting the terrain data and extracting terrain features are as follows: Data preprocessing: remove noise and outliers from the acquired terrain data; Terrain segmentation: SLIC superpixel segmentation algorithm is used to segment the preprocessed terrain data to generate multiple uniform terrain units; Extraction of terrain feature data: Extract terrain features from segmented terrain units, including: calculating slope and aspect using the elevation change rate formula; calculating surface roughness using the standard deviation of local elevation values; calculating terrain moisture index using local slope and catchment area; Data standardization: Standardize the extracted terrain feature data.

3. The artificial intelligence-based heavy metal pollution source tracing method according to claim 1 is characterized in that: The specific steps of performing spatial difference on the rainfall data are as follows: Semivariogram Calculation: Calculate the semivariogram for the rainfall data: ; Where: Represents the semivariogram value at distance h; represents the number of pairs of data points with a distance h; Indicates location The rainfall value at Indicates the rainfall value at a distance h; Kriging weight calculation: Use the semivariogram function to establish the Kriging weight matrix and solve the weight coefficient; Calculate rainfall: Use weight coefficients to calculate rainfall and generate a rainfall distribution map based on the calculated rainfall: ; Where: represents the calculated rainfall value at location x; Represents the weight coefficient.

4. The artificial intelligence-based heavy metal pollution source tracing method according to claim 1 is characterized in that: The steps for time matching the rainfall data are as follows: Obtain hourly rainfall data: Based on the collected rainfall data, obtain hourly rainfall data; Time-weighted average: Perform time-weighted average on hourly rainfall data to calculate daily rainfall data: ; Where: represents daily rainfall; represents the weight of the i-th hour; represents the rainfall in the i-th hour; Data synchronization: Time-synchronize the converted daily rainfall data with the heavy metal concentration data.

5. The artificial intelligence-based heavy metal pollution source tracing method according to claim 1 is characterized in that: The specific prediction steps of the prediction model are as follows: Convolutional neural networks extract features through multiple convolutional layers and pooling layers; Based on the features extracted by the convolutional neural network, the output result of the graph convolutional neural network is obtained by combining the graph convolutional neural network with the adjacency relationship processing; The output features of the convolutional neural network and the graph convolutional neural network are concatenated to obtain a shared feature representation; The shared feature representation is input into two different task networks, one for heavy metal concentration prediction and the other for spatial distribution feature prediction; finally, the heavy metal concentration and spatial distribution features are obtained.

6. The artificial intelligence-based heavy metal pollution source tracing method according to claim 5 is characterized in that: The structure of the prediction model is as follows: Convolutional neural network part: includes input layer, three convolution layers, each convolution layer is followed by a pooling layer, and the last pooling layer is followed by a Flatten layer; the convolution layers all use ReLU activation function; Graph convolutional neural network part: includes input layer, three graph convolution layers, and the last convolution layer is followed by a Flatten layer; the graph convolution layers all use ReLU activation function; Feature concatenation part: includes two fully connected layers, both of which use ReLU activation function; Heavy metal concentration prediction network: It includes two fully connected layers and one output layer. The fully connected layers all use ReLU activation function, and the output layer uses linear activation function. Spatial distribution feature prediction network: includes two fully connected layers and one output layer; the fully connected layers all use ReLU activation function, and the output layer uses linear activation function.

7. The artificial intelligence-based heavy metal pollution source tracing method according to claim 6 is characterized in that: The loss function of the prediction model is as follows: ; Where: represents the loss function; represents the actual heavy metal concentration value of the i-th sample; represents the predicted heavy metal concentration value of the i-th sample; Represents the true spatial distribution feature vector of the i-th sample; represents the predicted spatial distribution feature vector of the i-th sample; N represents the total number of samples; Represents the set of samples adjacent to the i-th sample; Value ; Relative error weights representing heavy metal concentrations; The weight representing the smoothness of the spatial distribution; and They represent the weight coefficients of heavy metal concentration prediction and spatial distribution characteristics prediction in the loss function respectively.

8. The artificial intelligence-based heavy metal pollution source tracing method according to claim 1 is characterized in that: The step 5 comprises the following steps: Establish a Bayesian inverse model: Find the posterior probability distribution of the pollution source location given the observation data, where the given observation data are heavy metal concentration and spatial distribution characteristics, terrain data, and rainfall data. The specific calculation formula is as follows: ; Where: Represents the posterior probability of the pollution source location S given the observation data D; represents the likelihood function of the observed data D at the pollution source location S; represents the prior probability distribution of the pollution source location S; represents the evidence of the observed data D, which is a normalization constant; Defining the prior probability distribution : Determination based on the probability distribution of historical pollution source locations; Define the likelihood function : Defined using the Gaussian diffusion model: ; Where: represents the heavy metal concentration at the i-th observation point; It is expressed as the concentration prediction value of the i-th observation point based on the pollution source location S; represents the observation error; N represents the number of observation points; in Based on the following formula: ; Where: Indicates the release intensity of the pollution source; represents the base diffusion coefficient; represents the influence coefficient of terrain characteristics on the diffusion coefficient; Indicates terrain features obtained based on terrain data; represents the distance from the i-th observation point to the pollution source; t represents the diffusion time; The coefficient representing the effect of topographic features on heavy metal concentrations; The coefficient representing the effect of rainfall on heavy metal concentration; represents the rainfall at the i-th observation point; represents the heavy metal concentration value at the i-th observation point; Posterior probability calculation: ; Use the Markov Chain Monte Carlo method to sample and obtain an initial estimate of the pollution source location; Based on the initial estimate, the estimate of the pollution source location is continuously updated through iterative optimization until convergence; Determination of the final pollution source location: ; According to the posterior probability distribution, select the pollution source location with the largest posterior probability As a final estimate.

Citation Information

Patent Citations

  • Docking station for environmental monitoring instruments

    AU2001295183A1

  • Mining and metallurgy area deep soil heavy metal pollution risk prediction method based on surface environment

    CN117151954A