Data model dual-drive-based water pollution prediction method and device
Through the dual-driven method of data model, combining water quality, spectral and spatiotemporal feature information, and using particle swarm optimization algorithm and cellular automata simulation method, the multi-source data comprehensive analysis problem of water pollution prediction in the existing technology is solved, and high-precision pollutant diffusion prediction is achieved.
Patent Information
- Application Number
- CN202510573929.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-06
- Publication Date
- 2025-08-01
AI Technical Summary
The existing water pollution prediction methods are difficult to comprehensively analyze multi-source and high-dimensional data, cannot fully reflect the complex spatial and temporal changes in the waters, and cannot achieve real-time and accurate prediction of pollutant diffusion.
The dual-driven method based on the data model is adopted to obtain water quality, spectral and spatiotemporal feature information, and a random forest regression model is trained using particle swarm optimization algorithm, and a one-dimensional and two-dimensional pollutant diffusion model is constructed in combination with the cellular automata simulation method. Considering environmental factors such as wind and water flow, we generate water pollution diffusion prediction results.
It realizes all-weather, all-round, dynamic, and high spatial and temporal resolution pollutant traceability and diffusion prediction, improves prediction accuracy and efficiency, and can accurately obtain the location and diffusion path of pollution sources.
Smart Images

Figure CN120409265A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of water pollution monitoring, and particularly to a water pollution prediction method and device based on dual driving of data models. Background Art
[0002] With the continuous development of industrialization and urbanization, water pollution has become one of the prominent challenges in global environmental problems. The existing water pollution prediction methods can generally be classified into two types: one is to predict according to the source specificity of pollutants and their persistence in the environment; the other is to comprehensively analyze the pollution characteristics of pollution sources and predict through multivariate statistical methods. According to different principles, the prediction methods can be divided into water quality parameter analysis method, tracer method, water pattern recognition method, etc. These prediction methods often only target specific pollutants or parameters, and it is difficult to comprehensively analyze multi-source and high-dimensional data. Moreover, they usually rely on limited monitoring stations and periodic sampling, making it difficult to comprehensively reflect the complex spatio-temporal variation laws of water areas and unable to accurately predict the real-time diffusion of water pollution. Summary of the Invention
[0003] In view of this, the present invention provides a water pollution prediction method and device based on dual driving of data models.
[0004] The technical solution of the present invention is realized as follows: In the first aspect of the present invention, a water pollution prediction method based on dual driving of data models is provided, including:
[0005] Obtaining multi-source information reflecting the correlation between the location of pollution sources and water quality anomalies; the multi-source information includes water quality characteristic information, spectral characteristic information, and spatio-temporal characteristic information;
[0006] Training a preset random forest regression model by using the multi-source information and a particle swarm optimization algorithm to obtain a target random forest regression model, and inputting real-time data of the same type as the multi-source information into the target random forest regression model to determine the pollution source location information;
[0007] Constructing a one-dimensional pollutant diffusion model based on the spatio-temporal characteristic information, and combining the cellular automata simulation method to extend the one-dimensional pollutant diffusion model to a two-dimensional cellular model;
[0008] Inputting the pollution source location information and environmental impact information into the two-dimensional cellular model to generate a water pollution diffusion prediction result; the environmental impact information includes the current wind speed, wind direction, and water flow.
[0009] Based on the above technical solutions, preferably, the obtaining of multi-source information reflecting the correlation between the location of pollution sources and water quality anomalies includes:
[0010] The water quality meter is used to collect the water quality data of the area to be measured in real time, and the water quality data is subjected to piecewise interpolation processing to obtain water quality characteristic information;
[0011] The multi-spectral image of the area to be measured is obtained by using a spectral imaging device. After radiometric correction of the multi-spectral image, sampling points are located according to the longitude and latitude coordinates. An area of interest is determined from the multi-spectral image with the sampling point as the center, and the average spectral reflectance of all points within the area of interest is obtained. The average spectral reflectance is determined as the spectral characteristic information of the sampling point;
[0012] By integrating and processing the spatial information related to the water area of the area to be measured in the geographical and meteorological databases, spatio-temporal characteristic information is obtained.
[0013] On the basis of the above technical solutions, preferably, the preset random forest regression model is trained by using the multi-source information and the particle swarm optimization algorithm to obtain a target random forest regression model, and real-time data of the same type as the multi-source information is input into the target random forest regression model to determine the pollution source location information, including:
[0014] Multiple particles are initialized by using the multi-source information; each particle represents a combination of hyperparameters of a random forest regression model, including the number of trees;
[0015] The current position and velocity of the particle are updated according to the current velocity, historical optimal position and global optimal position of each particle to obtain an expected particle;
[0016] Taking the fitness as a basis, the preset random forest regression model is trained by using the parameter combination of the expected particle to obtain a target random forest regression model.
[0017] On the basis of the above technical solutions, preferably, after obtaining the target random forest regression model, the method further includes:
[0018] The test set features are input into the target random forest regression model to obtain the predicted coordinates of the pollution source;
[0019] If the mean square error and coefficient of determination between the predicted coordinates and the actual coordinates are both within the preset threshold range, it is determined that the target random forest regression model meets the requirements.
[0020] On the basis of the above technical solutions, preferably, a one-dimensional pollutant diffusion model is constructed based on the spatio-temporal characteristic information, and the one-dimensional pollutant diffusion model is extended to a two-dimensional cellular model by combining the cellular automata simulation method, including:
[0021] Divide the basin characteristics based on the spatio-temporal characteristic information to determine the hydrological unit; the basin characteristics include the water flow direction, river network, and basin boundary; the hydrological unit represents a sub-unit with consistent hydrological characteristics.
[0022] Construct a one-dimensional pollutant diffusion model related to the longitudinal river section using the hydrological unit.
[0023] Adopt the cellular automaton simulation method to simulate the lateral diffusion of water pollution and extend the one-dimensional pollutant diffusion model to a two-dimensional cellular model.
[0024] On the basis of the above technical solutions, preferably, the adoption of the cellular automaton simulation method to simulate the lateral diffusion of water pollution and extend the one-dimensional pollutant diffusion model to a two-dimensional cellular model includes:
[0025] Divide the area to be measured into multiple grid cells; each grid cell is represented as a cell.
[0026] Adopt Moore-type neighbors to exchange the pollutant concentration between each cell and its surrounding 8 adjacent cells to simulate the diffusion of pollutants from the center to the surroundings and obtain a two-dimensional cellular model.
[0027] On the basis of the above technical solutions, preferably, the input of the pollution source location information and environmental impact information into the two-dimensional cellular model to generate a water pollution diffusion prediction result includes:
[0028] Modify the model parameters of the two-dimensional cellular model based on the environmental impact information to obtain a modified cellular model.
[0029] Input the pollution source location information into the two-dimensional cellular model to generate a water pollution diffusion prediction result.
[0030] Even more preferably, a water pollution prediction device based on dual driving of data models is provided in the second aspect of the present invention, including: an information acquisition module, a location determination module, an extension module, and a generation module; wherein,
[0031] The information acquisition module is configured to acquire multi-source information reflecting the correlation between the pollution source location and water quality anomalies; the multi-source information includes water quality characteristic information, spectral characteristic information, and spatio-temporal characteristic information.
[0032] The location determination module is configured to train a preset random forest regression model using the multi-source information and the particle swarm optimization algorithm to obtain a target random forest regression model, and input real-time data of the same type as the multi-source information into the target random forest regression model to determine the pollution source location information.
[0033] The extension module is configured to construct a one-dimensional pollutant diffusion model based on the spatio-temporal characteristic information, and extend the one-dimensional pollutant diffusion model to a two-dimensional cell model by combining the cellular automaton simulation method;
[0034] The generation module is configured to input the pollution source location information and the environmental impact information into the two-dimensional cell model to generate a water pollution diffusion prediction result; the environmental impact information includes the current wind speed, wind direction, and water flow.
[0035] More preferably, in the third aspect of the present invention, an electronic device is provided, including a processor and a memory; the memory stores a computer program, wherein the computer program, when executed by the processor, implements the water pollution prediction method based on dual driving of data models in the first aspect.
[0036] More preferably, in the fourth aspect of the present invention, a computer storage medium is provided, on which a computer program is stored, wherein the computer program, when executed by a processor, implements the water pollution prediction method based on dual driving of data models in the first aspect.
[0037] A water pollution prediction method based on dual driving of data models according to the present invention has the following beneficial effects compared with the prior art:
[0038] 1. Using multi-source information such as water quality characteristic information, spectral characteristic information, and spatio-temporal characteristic information and the particle swarm optimization algorithm to train the random forest regression model to accurately obtain the pollution source location information. On this basis, the one-dimensional pollutant diffusion model is extended to a two-dimensional cell model by combining the cellular automaton simulation method to simulate the spatio-temporal evolution process of water pollution in the basin, and the influence of environmental factors such as wind and water flow is considered, realizing all-weather, all-round, dynamic, and high spatio-temporal resolution tracing and diffusion prediction of pollutants.
[0039] 2. By constructing an optimized particle swarm - random forest (PSO-RF) model, a multi-dimensional feature set is constructed by integrating multi-source information, integrating various features such as water quality, spectrum, and spatio-temporal, capturing non-linear relationships in complex environments, and at the same time automatically adjusting the hyperparameters of the random forest through global optimization techniques, improving the prediction accuracy and prediction efficiency of pollution source location tracing and pollutant diffusion. Description of the Drawings
[0040] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the following drawings are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0041] Figure 1 Schematic flow chart of a water pollution prediction method based on dual driving of data model provided by an embodiment of the present invention;
[0042] Figure 2 Schematic diagram of a multi - spectral image provided by an embodiment of the present invention;
[0043] Figure 3 Schematic diagram of the spectral reflectance of sampling points provided by an embodiment of the present invention;
[0044] Figure 4 Schematic flow chart of constructing a particle swarm - random forest model provided by an embodiment of the present invention;
[0045] Figure 5 Schematic diagram of one - dimensional longitudinal diffusion provided by an embodiment of the present invention;
[0046] Figure 6 Schematic structural diagram of a water pollution prediction device based on dual driving of data model provided by an embodiment of the present invention;
[0047] Figure 7 Schematic structural diagram of an electronic device provided by an embodiment of the present invention. Detailed implementation manners
[0048] Next, in combination with the embodiments of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
[0049] In some embodiments, as Figure 1 shown, Figure 1 Schematic flow chart of a water pollution prediction method based on dual driving of data model provided by an embodiment of the present invention; A water pollution prediction method based on dual driving of data model provided by the present invention includes:
[0050] S110, obtaining multi - source information reflecting the correlation between the source location and water quality anomalies; the multi - source information includes water quality characteristic information, spectral characteristic information, and spatio - temporal characteristic information.
[0051] By observing the change information of water quality anomaly parameters near the pollution source, the influence range and degree of the pollution source on water quality can be intuitively obtained. Specifically, it can be reflected by water quality characteristic information, spectral characteristic information, and spatio - temporal characteristic information.
[0052] In some embodiments, S110, obtaining multi - source information reflecting the correlation between the source location and water quality anomalies, includes:
[0053] The water quality instrument is used to collect the water quality data of the area to be measured in real time, and the water quality data is processed by piecewise interpolation to obtain the water quality characteristic information;
[0054] The multi-spectral image of the area to be measured is obtained by using a spectral imaging device. After radiometric correction of the multi-spectral image, the sampling points are located according to the longitude and latitude coordinates. The region of interest is determined from the multi-spectral image with the sampling points as the center, and the average spectral reflectance of all points within the region of interest is obtained. The average spectral reflectance is determined as the spectral characteristic information of the sampling points;
[0055] The spatio-temporal characteristic information is obtained by integrating and processing the spatial information related to the water area of the area to be measured in the geographical and meteorological databases.
[0056] In one example, a portable multi-parameter water quality instrument is used to collect water quality monitoring data in real time, including parameters such as pH, dissolved oxygen, permanganate index, total phosphorus, total nitrogen, redox potential, fecal coliform, and turbidity. These water quality characteristic information directly reflects the water quality status and is closely related to the spatial distribution of pollution sources. After obtaining these data, the water quality characteristic information can be processed by piecewise cubic Hermite interpolation (PCHIP) using Matlab software to fill in the missing values and smooth the data, generating high-quality water quality characteristic information.
[0057] In another example, a high-precision multi-spectral imaging device is carried by an unmanned aerial vehicle (UAV) for aerial photography to obtain the multi-spectral image of the research area. The flight altitude of the unmanned aerial vehicle is set at 400 meters, and the flight speed is 5 m / s. A clear and breezy day without cloud cover is selected for photography to ensure the high quality of the image data. As Figure 2 shown, Figure 2 is the schematic diagram of the multi-spectral image provided by the embodiment of the present invention. After obtaining the multi-spectral image, the professional image processing software Pix4Dfields is used to import the multi-spectral image and calibration plate data, and the radiometric correction is completed through the built-in tool to output a high-precision reflectance image, providing a reliable data basis for subsequent analysis. On this basis, the reflectance image is selected, and the image covering the area directly above the sampling point is chosen. Import the remote sensing image analysis software ENVI5.3, locate the water surface sampling points according to the longitude and latitude coordinates, and construct a matrix with a size of 6 (pixel) centered on the sampling points as the region of interest (ROI). Calculate the average spectral reflectance of all points within the ROI as the spectral characteristic information of the sampling points. The spectral reflectance of the sampling points is as Figure 3 shown.
[0058] In yet another example, relevant spatial information of the research water area is collected and integrated to obtain spatio-temporal characteristic information, including soil properties, land use and vegetation cover, meteorological data (such as wind speed, wind direction, rainfall), and high-resolution digital elevation model (DEM) data. Here, the data is sourced from the land use monitoring data of Tsinghua University, the DEM data in GDEM format from the Geospatial Data Cloud, and the Chinese soil dataset of the Global Soil Database. These data are integrated and processed through Geographic Information System (GIS) and mathematical statistics methods to construct the spatio-temporal characteristic database required for the model.
[0059] After obtaining the above multi-source information, for the convenience of calculation and analysis, the acquisition time can be converted to Unix timestamp, and the longitude and latitude coordinates can be converted to the UTM plane coordinate system. The research area is divided into grids of 100m×100m, and the grid ID is used for data alignment. The exact coordinates of the sampling points are retained and aligned with the water quality, spectral, and spatio-temporal characteristic data.
[0060] S120. Use the multi-source information and the particle swarm optimization algorithm to train the preset random forest regression model to obtain the target random forest regression model, and input the real-time data of the same type as the multi-source information into the target random forest regression model to determine the location information of the pollution source.
[0061] In some embodiments, S120. Use the multi-source information and the particle swarm optimization algorithm to train the preset random forest regression model to obtain the target random forest regression model, and input the real-time data of the same type as the multi-source information into the target random forest regression model to determine the location information of the pollution source, including:
[0062] Initialize multiple particles using the multi-source information; each particle represents a set of hyperparameter combinations of the number of trees in the random forest regression model;
[0063] Update the current position and velocity of the particle according to the current velocity, historical optimal position, and global optimal position of each particle to obtain the expected particle;
[0064] Using the fitness as the basis, train the preset random forest regression model with the parameter combination of the expected particle to obtain the target random forest regression model.
[0065] In this embodiment, the features that can reflect the relationship between the pollution source location and water quality anomalies are divided into three categories: water quality-related features, namely pH, dissolved oxygen, permanganate index, total phosphorus, total nitrogen, redox potential, fecal coliforms, turbidity, which directly characterize water quality changes. Spectral features, namely the average spectral reflectance of the extracted ROI, which can provide the optical characteristics of the water surface and assist in identifying the distribution of pollutants. Spatiotemporal features, including the latitude and longitude of the sampling point, timestamp, wind speed, wind direction, rainfall, terrain height, land use type, and soil properties, which can capture the dynamic characteristics of environmental factors and pollution diffusion. Integrate the above features to construct a multi-dimensional input dataset to provide comprehensive information support for the model. The label is defined as the exact coordinates (latitude, longitude) of the pollution source and is used as a continuous value for the regression task. The dataset is divided into a training set (70%), a validation set (15%), and a test set (15%). The stratified sampling method is used for division according to the timestamp and grid coordinates to ensure the balance of each subset in terms of time distribution and spatial coverage and avoid data bias.
[0066] In one example, the particle swarm optimization (PSO) algorithm is used to adjust the hyperparameters of the random forest regression model to improve the prediction performance. Specifically, it can include the following steps: Step 1, PSO initialization; initialize multiple particles, each particle representing a combination of hyperparameters of a random forest regression model: the number of trees: [50, 500], the maximum depth: [5, 30], the minimum number of leaf nodes: [1, 10]. The model is set to the regression mode, and the exact coordinates (latitude, longitude) of the pollution source are output. The fitness function is defined as the regression evaluation index on the validation set, the mean square error (MSE) or the coefficient of determination (R 2 )
[0067] Step 2, position and velocity update: Each particle updates its position according to the current velocity, the historical best position (pbest), and the global best position (gbest), and drives the particle to move in the parameter space through the velocity to improve the regression performance. The velocity update formula is
[0068]
[0069] is the velocity of particle i in the next iteration t + 1, w is the inertia weight, which controls the retention degree of the particle velocity and affects the global search ability of the algorithm. is the velocity of particle i in the current iteration t, c1 and c2 are acceleration coefficients, representing the individual learning factor and the social learning factor respectively, which control the degree of the particle approaching the individual optimal and the global optimal, r1 and r2 are random numbers in the interval [0, 1], which add randomness to the algorithm, pbest i is the individual optimal position found by particle i so far, and gbest is the global optimal position found by the entire particle swarm so far. is the position of particle i at the current iteration t. The position update formula is as follows: is the position of the particle at the next iteration t + 1, and are the current iteration position and the next iteration velocity of the particle respectively. If the position exceeds the range, it is truncated to the boundary value, and the integer parameters are rounded.
[0070] Step 3: For each parameter combination of the particles, use the training set to train a regression random forest model, and calculate the MSE or R on the validation set 2 as the fitness, where SSR is the sum of squared residuals and SST is the total sum of squares. If the current fitness is better than the particle's historical best (pbest), then update pbest; if it is better than the global best (gbest), then update gbest.
[0071] Step 4: Iteration control and parameter output. The number of iterations is set to 100 times. If the global best fitness has not improved for 10 consecutive iterations, stop in advance. After the iteration ends, select the parameters corresponding to the global best position as the optimal hyperparameters of the random forest.
[0072] In some embodiments, after obtaining the target random forest regression model, it further includes:
[0073] Input the test set features into the target random forest regression model to obtain the predicted coordinates of the pollution source;
[0074] If both the mean squared error and the coefficient of determination between the predicted coordinates and the actual coordinates are within the preset threshold range, it is determined that the target random forest regression model meets the requirements.
[0075] In this embodiment, the training set is used to train a regression random forest model with the parameters optimized by PSO. Each tree is constructed by bootstrap sampling and a random subset of features. The final prediction result is the average value of the coordinates. Inputting the test set features into the model can predict the exact coordinates (latitude, longitude) of the pollution source. The mean squared error (MSE) is used for the average squared difference between the predicted coordinates and the actual coordinates, and the coefficient of determination (R 2 ) is used to measure the degree to which the model explains the data variation. Finally, use the test set or the real-time collected data, including water quality feature information, spectral feature information, and spatio-temporal feature information, input them into the target random forest regression model, and output the exact coordinates of the pollution source.
[0076] S130: Construct a one-dimensional pollutant diffusion model based on spatio-temporal feature information, and combine the cellular automata simulation method to extend the one-dimensional pollutant diffusion model to a two-dimensional cellular model.
[0077] In some embodiments, in S130, a one-dimensional pollutant diffusion model is constructed based on spatio-temporal feature information, and the one-dimensional pollutant diffusion model is extended to a two-dimensional cellular model in combination with the cellular automata simulation method, including:
[0078] The basin characteristics are divided based on spatio-temporal feature information to determine hydrological units; the basin characteristics include water flow direction, river network, and basin boundary; the hydrological unit represents a sub-unit with consistent hydrological characteristics.
[0079] A one-dimensional pollutant diffusion model related to the longitudinal river section is constructed using the hydrological unit.
[0080] The cellular automata simulation method is used to simulate the lateral diffusion of water pollution, and the one-dimensional pollutant diffusion model is extended to a two-dimensional cellular model.
[0081] In this embodiment, a comprehensive hydrological model SWAT is constructed to simulate the hydrological process and provide a physical basis for pollution diffusion prediction. The basin characteristics are divided based on spatio-temporal feature information to determine hydrological units. In the basin division module of the SWAT hydrological model, hydrometeorological data, land use, soil data, and DEM data are input, and the study basin can be divided into multiple sub-basins. By setting thresholds, hydrological units are divided, and then based on the hydrological model, a one-dimensional pollutant diffusion equation along the flow is constructed to simulate the longitudinal diffusion process of pollutants. The composition process of the one-dimensional pollutant diffusion equation along the flow can include the following steps:
[0082] Step 1: For a certain point, the migration flux of pollutants along the flow direction x is F x = u'C, where: F x is the pollutant migration flux at a certain point on the cross-section along the x direction, with the unit of mg / (m 2 ·s); u is the time-averaged flow velocity at a certain point along the x direction, with the unit of m / s; C is the time-averaged concentration of pollutants at a certain point, with the unit of mg / m 3 .
[0083] Step 2: For the entire cross-section, the pollutant migration rate is where: F A is the pollutant migration rate, with the unit of mg / s; is the cross-section average flow velocity, with the unit of m / s, is the cross-section average concentration, with the unit of mg / m 3 , A is the cross-section area, with the unit of m 2 ; Q is the flow rate, with the unit of m 3 / s.
[0084] Step 3: In the longitudinal mixing section, the water quality concentration mainly changes significantly longitudinally. Therefore, the mathematical expression of the one-dimensional water body pollutant diffusion effect is used for the longitudinal mixing section to construct a one-dimensional water pollution longitudinal diffusion equation. According to Fick's first law, that is, the mass of the dissolved substance passing through a unit area per unit time is proportional to the gradient of the dissolved substance concentration in the normal direction of this area, but the flow direction is opposite to the gradient direction, the mathematical expression of the one-dimensional water body pollutant diffusion effect is obtained:
[0085]
[0086] In the formula: M x is the diffusion flux, that is, the mass of pollutants passing through in the x direction per unit time per unit area due to diffusion, with the unit of mg / (m 2 ·s); E mx is the molecular diffusion coefficient, with the unit of m 2 / s; E tx is the turbulent diffusion coefficient in the x direction, with the unit of m 2 / s; E d is the longitudinal dispersion coefficient, with the unit of m 2 / s; C is the water body pollutant concentration, with the unit of mg / m 3 ; is the concentration gradient along the x direction.
[0087] The molecular diffusion coefficient is mainly affected by temperature, solute, and pressure, and has nothing to do with the water flow characteristics. Its value is between 10 -9 and 10 -8 m 2 / s. Under the condition of permission, select an appropriate position in the river channel to instantaneously release the tracer in the form of a point source, and observe the time process line of the tracer concentration downstream to deduce the longitudinal dispersion coefficient; in the case of lack of conditions, use the empirical formula: Fischer formula (1975): Liu Henry formula (1980): In the formula: is the friction velocity; J is the hydraulic gradient; g is the acceleration of gravity; u is the cross-sectional average velocity; B is the average water surface width of the river section; γ is the empirical coefficient; H is the water depth. As Figure 6 shown is the one-dimensional diffusion diagram. On the basis of the one-dimensional model, the cellular automata simulation method is adopted to construct a two-dimensional water pollution lateral diffusion model.
[0088] In some embodiments, S130, the cellular automata simulation method is used to simulate the lateral diffusion of water pollution, and the one-dimensional pollutant diffusion model is extended to a two-dimensional cellular model, including:
[0089] The area to be measured is divided into multiple grid cells; each grid cell is characterized as a cell;
[0090] Using Moore - type neighbors, the pollutant concentration of each cell is exchanged with its surrounding 8 adjacent cells to simulate the diffusion of pollutants from the center to the surrounding, and a two - dimensional cellular model is obtained.
[0091] In this embodiment, the area to be measured (covering the water surface and the land surface) is divided into a grid matrix of size R×C, where R and C represent the number of rows and columns respectively. Each grid unit is defined as a cell, jointly constituting a two - dimensional cellular space. The cell state is a discrete integer set of the set S = {0, 1, 2, …, k}, where 0 represents non - polluted, and the increasing state value reflects the increase in pollutant concentration. In practical applications, thresholds can be set according to the pollutant properties to correspond to different states. The continuous space is discretized into multiple cells, and the size of each cell is consistent with the spatial data resolution. Using Moore - type neighbors, each cell exchanges pollutant concentration with its surrounding 8 adjacent cells to simulate the diffusion of pollutants from the center to the surrounding. In a static water body, pollutants follow the law of conservation of mass and diffuse from high - concentration areas to low - concentration areas. In each time step t, the cell (i, j) exchanges pollutants with its 8 neighbors, and the diffusion coefficient is discretized into the pollutant transfer coefficient between cells. The formula is
[0092]
[0093] where, is the state of cell (i, j) at time t + 1; D is the pollutant transfer coefficient; N i,j is the set of Moore neighbors; (m, n) represents the coordinates of the neighbor cell. Time is represented as discrete time steps T, and the cell state changes with time according to the evolution rule N. The combination of all cell states constitutes the evolution process of the system.
[0094] S140, input the source location information and environmental impact information into the two - dimensional cellular model to generate a water pollution diffusion prediction result; the environmental impact information includes the current wind speed, wind direction, and water flow.
[0095] In some embodiments, S140, input the source location information and environmental impact information into the two - dimensional cellular model to generate a water pollution diffusion prediction result, including:
[0096] Correct the model parameters of the two - dimensional cellular model based on the environmental impact information to obtain a corrected cellular model;
[0097] Input the source location information into the two - dimensional cellular model to generate a water pollution diffusion prediction result.
[0098] In this embodiment, considering the influence of wind, water flow, and water body edge, the model parameters of the two - dimensional cellular model are corrected. The pollutant mass of cell (i, j) within a unit time step is calculated by the following formula:
[0099]
[0100] In the formula: and respectively represent the pollutant mass of the cell at times t + 1 and t; LF i,j is the land - water identifier, which is 0 when the cell represents a land area and 1 otherwise; m is the pollutant transfer coefficient in the four positive directions; d is the diagonal coefficient in the four diagonal directions; respectively represent the correction coefficients of the wind and water flow in the north, south, east, northwest, southwest, northeast, and southeast directions of the cell. Without considering the chemical reaction between the pollutant and the water body, that is, when the diffusion of the pollutant is only affected by factors such as wind, water flow, and water - body edge, the influencing factors of the state of the cell (i, j) can be expressed by the following formula:
[0101]
[0102] In the formula: represents the state of the cell at time t; LF is the land - water identifier; represents the mass of the pollutant contained in the cell at time t; and respectively represent the wind direction and wind speed of the cell at time t; and respectively represent the water - flow direction and water - flow speed of the cell at time t. By considering the influence of environmental factors such as wind and water flow, the prediction accuracy of the source - location tracing of the pollution source and the pollutant diffusion is improved.
[0103] In some embodiments, please refer to Figure 6 , Figure 6 which is a schematic structural diagram of a water - pollution prediction device based on dual - drive of data models provided by an embodiment of the present invention. The present invention provides a water - pollution prediction device 600 based on dual - drive of data models, including: an information acquisition module 610, a location determination module 620, an expansion module 630, and a generation module 640; wherein,
[0104] The information acquisition module 610 is configured to acquire multi - source information reflecting the correlation between the pollution - source location and water - quality anomalies; the multi - source information includes water - quality characteristic information, spectral characteristic information, and spatio - temporal characteristic information;
[0105] The location determination module 620 is configured to train a preset random - forest regression model using the multi - source information and the particle - swarm optimization algorithm to obtain a target random - forest regression model, and input real - time data of the same type as the multi - source information into the target random - forest regression model to determine the pollution - source location information;
[0106] An expansion module 630, configured to construct a one-dimensional pollutant diffusion model based on spatio-temporal feature information, and extend the one-dimensional pollutant diffusion model to a two-dimensional cellular model in combination with a cellular automaton simulation method;
[0107] A generation module 640, configured to input the pollution source location information and environmental impact information into the two-dimensional cellular model to generate a water pollution diffusion prediction result; the environmental impact information includes the current wind speed, wind direction, and water flow.
[0108] In some embodiments, the information acquisition module 610 is specifically configured to:
[0109] Use a water quality meter to collect water quality data of the area to be measured in real time, and perform piecewise interpolation processing on the water quality data to obtain water quality feature information;
[0110] Use a spectral imaging device to obtain a multi-spectral image of the area to be measured. After performing radiometric correction on the multi-spectral image, locate the sampling points according to the longitude and latitude coordinates, determine the region of interest from the multi-spectral image with the sampling points as the center, and obtain the average spectral reflectance of all points in the region of interest, and determine the average spectral reflectance as the spectral feature information of the sampling points;
[0111] By integrating and processing the spatial information related to the water area of the area to be measured in the geographical and meteorological databases, spatio-temporal feature information is obtained.
[0112] In some embodiments, the position determination module 620 is specifically configured to:
[0113] Initialize multiple particles using multi-source information; each particle represents the number of trees in a set of hyperparameter combination trees of a random forest regression model;
[0114] Update the current position and velocity of each particle according to the current velocity, historical optimal position, and global optimal position of each particle to obtain expected particles;
[0115] Using the fitness as a basis, train a preset random forest regression model with the parameter combination of the expected particles to obtain a target random forest regression model.
[0116] In some embodiments, the position determination module 620 is further specifically configured to:
[0117] Input the test set features into the target random forest regression model to obtain the predicted coordinates of the pollution source;
[0118] If the mean square error and coefficient of determination between the predicted coordinates and the actual coordinates are both within the preset threshold range, it is determined that the target random forest regression model meets the requirements.
[0119] In some embodiments, the expansion module 630 is specifically configured to:
[0120] Divide the basin characteristics based on spatio-temporal characteristic information to determine hydrological units; the basin characteristics include flow direction, river network, and basin boundary; the hydrological units represent sub-units with consistent hydrological characteristics.
[0121] Use the hydrological units to construct a one-dimensional pollutant diffusion model related to the longitudinal river section.
[0122] Adopt the cellular automaton simulation method to simulate the lateral diffusion of water pollution, and extend the one-dimensional pollutant diffusion model to a two-dimensional cellular model.
[0123] In some embodiments, the extension module 630 is specifically configured as follows:
[0124] Divide the area to be measured into multiple grid cells; each grid cell is represented as a cell.
[0125] Adopt Moore-type neighbors to exchange the pollutant concentration between each cell and its surrounding 8 adjacent cells, simulate the diffusion of pollutants from the center to the surrounding, and obtain a two-dimensional cellular model.
[0126] In some embodiments, the generation module 640 is specifically configured as follows:
[0127] Modify the model parameters of the two-dimensional cellular model based on the environmental impact information to obtain a modified cellular model.
[0128] Input the pollution source location information into the two-dimensional cellular model to generate a water pollution diffusion prediction result.
[0129] It should be noted that the water pollution prediction device based on dual-driving of data models provided in the embodiments of the present application and the water pollution prediction method based on dual-driving of data models provided in the embodiments of the present application are based on the same application concept. Therefore, the specific implementation of this embodiment can refer to the implementation of the aforementioned water pollution prediction method based on dual-driving of data models, and the repeated parts will not be elaborated.
[0130] In some embodiments, please refer to Figure 7 , Figure 7 is a schematic structural diagram of an electronic device provided in an embodiment of the present application. An electronic device 700 provided in an embodiment of the present application includes a processor 710 and a memory 720; the memory 720 stores a computer program, and when the computer program is executed by the processor, it implements the above-mentioned water pollution prediction method based on dual-driving of data models.
[0131] Specifically, the processor 710 may include, for example, a general - purpose microprocessor, an instruction - set processor, and / or a related chipset, and / or a dedicated microprocessor (e.g., an application - specific integrated circuit (ASIC)), etc. The processor 710 may also include on - board memory for caching purposes. The processor 710 may be a single processing unit or multiple processing units for performing different actions of the method flow according to the embodiments of the present application.
[0132] The memory 720 may be, for example, any medium capable of containing, storing, transmitting, propagating, or transporting instructions. For example, the memory 720 may include, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, components, or propagation media. Specific examples of the memory 720 include: magnetic storage devices, such as magnetic tapes or hard disk drives (HDDs); optical storage devices, such as compact discs (CD - ROMs); may also be, such as random access memory (RAM) or flash memory; and / or wired / wireless communication links.
[0133] The present application also provides a computer - readable medium, on which a computer program is stored. When the program is executed by a processor, it implements the above - mentioned water pollution prediction method based on dual - drive of data models. The computer - readable medium may be included in the device / device / system described in the above - mentioned embodiments; or may exist separately without being assembled into the device / device / system. The above - mentioned computer - readable medium carries one or more programs, and when the above - mentioned one or more programs are executed, they implement the method according to the embodiments of the present application.
[0134] According to an embodiment of the present application, a computer-readable medium may be a computer-readable signal medium, a computer-readable storage medium, or any combination of the two above. A computer-readable storage medium may, for example, but not be limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples of the computer-readable storage medium may include, but not be limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable storage medium may be any tangible medium that contains or stores a program, and this program can be used by or in combination with an instruction execution system, apparatus, or device. And in the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which computer-readable program code is carried. Such a propagated data signal may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, and this computer-readable medium can send, propagate, or transmit a program for use by or in combination with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted by any suitable medium, including but not limited to: wireless, wired, optical fiber cable, radio frequency signal, etc., or any suitable combination of the above.
[0135] Those skilled in the art can understand that the features recited in the various embodiments and / or claims of the present application can be combined and / or combined in various ways, even if such combinations or combinations are not explicitly recited in the present application. In particular, without departing from the spirit and teachings of the present application, the features recited in the various embodiments and / or claims of the present application can be combined and / or combined in various ways. All such combinations and / or combinations fall within the scope of the present application. Therefore, the scope of the present application should not be limited to the above embodiments, but should be determined not only by the appended claims, but also by the equivalents of the appended claims. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.
Claims
1. A water pollution prediction method based on dual-driving of data models, characterized in that, Including: Obtain multi-source information reflecting the correlation between the location of pollution sources and water quality anomalies; the multi-source information includes water quality characteristic information, spectral characteristic information, and spatio-temporal characteristic information; Use the multi-source information and the particle swarm optimization algorithm to train a preset random forest regression model to obtain a target random forest regression model, and input real-time data of the same type as the multi-source information into the target random forest regression model to determine the pollution source location information; Construct a one-dimensional pollutant diffusion model based on the spatio-temporal characteristic information, and combine the cellular automata simulation method to expand the one-dimensional pollutant diffusion model to a two-dimensional cellular model; Input the pollution source location information and environmental impact information into the two-dimensional cellular model to generate a water pollution diffusion prediction result; the environmental impact information includes the current wind speed, wind direction, and water flow.
2. The water pollution prediction method based on dual-driving of data models according to claim 1, wherein, The obtaining of the multi-source information reflecting the correlation between the location of pollution sources and water quality anomalies includes: Use a water quality instrument to collect water quality data of the area to be measured in real time, and perform piecewise interpolation processing on the water quality data to obtain water quality characteristic information; Use a spectral imaging device to obtain a multi-spectral image of the area to be measured. After performing radiometric correction on the multi-spectral image, locate sampling points according to longitude and latitude coordinates, determine an area of interest from the multi-spectral image with the sampling point as the center, and obtain the average spectral reflectance of all points within the area of interest. Determine the average spectral reflectance as the spectral characteristic information of the sampling point; Through the integration and processing of spatial information related to the water area of the area to be measured in the geographic and meteorological databases, spatio-temporal characteristic information is obtained.
3. The water pollution prediction method based on dual-driving of data models according to claim 1, wherein, The using of the multi-source information and the particle swarm optimization algorithm to train a preset random forest regression model to obtain a target random forest regression model, and inputting real-time data of the same type as the multi-source information into the target random forest regression model to determine the pollution source location information includes: Use the multi-source information to initialize multiple particles; each particle represents a combination of the number of trees in a set of hyperparameters of the random forest regression model; Update the current position and velocity of the particle according to the current velocity, historical optimal position, and global optimal position of each particle to obtain an expected particle; Using the fitness as a basis, train the preset random forest regression model with the parameter combination of the expected particle to obtain a target random forest regression model.
4. The water pollution prediction method based on dual-driving of data models according to claim 3, characterized in that After obtaining the target random forest regression model, the method further includes: Input the test set features into the target random forest regression model to obtain the predicted coordinates of the pollution source; If the mean square error and coefficient of determination between the predicted coordinates and the actual coordinates are both within the preset threshold range, determine that the target random forest regression model meets the requirements.
5. The water pollution prediction method based on dual driving of data models according to claim 1, characterized in that The constructing of a one-dimensional pollutant diffusion model based on the spatio-temporal characteristic information and combining the cellular automata simulation method to expand the one-dimensional pollutant diffusion model to a two-dimensional cellular model includes: Based on the spatio-temporal characteristic information, divide the basin characteristics to determine hydrological units; the basin characteristics include water flow direction, river network, and basin boundary; the hydrological unit represents a sub-unit with consistent hydrological characteristics; Construct a one-dimensional pollutant diffusion model related to the longitudinal river section by using the hydrological units; Adopt the cellular automaton simulation method to simulate the lateral diffusion of water pollution, and extend the one-dimensional pollutant diffusion model to a two-dimensional cellular model.
6. The water pollution prediction method based on dual-driving of data models as claimed in claim 5, wherein, The adopting the cellular automaton simulation method to simulate the lateral diffusion of water pollution and extending the one-dimensional pollutant diffusion model to a two-dimensional cellular model includes: Divide the area to be measured into multiple grid cells; each grid cell is characterized as a cell; Adopt Moore-type neighbors, exchange the pollutant concentrations between each cell and its surrounding 8 adjacent cells, simulate the diffusion of pollutants from the center to the surroundings, and obtain a two-dimensional cellular model.
7. The water pollution prediction method based on dual driving of data models according to claim 1, characterized in that, The inputting the pollution source location information and environmental impact information into the two-dimensional cellular model to generate a water pollution diffusion prediction result includes: Correct the model parameters of the two-dimensional cellular model based on the environmental impact information to obtain a corrected cellular model; Input the pollution source location information into the two-dimensional cellular model to generate a water pollution diffusion prediction result.
8. A water pollution prediction device based on dual-drive of data models, characterized in that, Includes: An information acquisition module, a location determination module, an extension module, and a generation module; wherein, The information acquisition module is configured to acquire multi-source information reflecting the correlation between the pollution source location and water quality anomalies; the multi-source information includes water quality characteristic information, spectral characteristic information, and spatio-temporal characteristic information; The location determination module is configured to use the multi-source information and the particle swarm optimization algorithm to train a preset random forest regression model to obtain a target random forest regression model, and input real-time data of the same type as the multi-source information into the target random forest regression model to determine the pollution source location information; The extension module is configured to construct a one-dimensional pollutant diffusion model based on the spatio-temporal characteristic information, and extend the one-dimensional pollutant diffusion model to a two-dimensional cellular model by combining the cellular automaton simulation method; The generation module is configured to input the pollution source location information and environmental impact information into the two-dimensional cellular model to generate a water pollution diffusion prediction result; the environmental impact information includes the current wind speed, wind direction, and water flow.
9. An electronic device, comprising a processor and a memory; the memory stores a computer program, wherein, The computer program, when executed by the processor, implements the data model dual-driven water pollution prediction method according to any one of claims 1 to 7.
10. A computer storage medium, characterized in that, A computer program is stored thereon, wherein the computer program, when executed by the processor, implements the data model dual-driven water pollution prediction method according to any one of claims 1 to 7.
Citation Information
Cited By
Water quality monitoring method and system based on multi-source data
CN121068868A