Multi-factor space-time coupling water environment prediction method

By adopting a multi-factor space-time coupling prediction method in water environment monitoring, using random forest and least squares support vector machine models to screen key factors and build water quality prediction models, the shortcomings of traditional methods that are difficult to deal with multi-factor space-time coupling problems are solved. Achieve high-precision water quality prediction and risk assessment.

CN119493967APending Publication Date: 2025-02-21BEIJING UNIV OF TECH

Patent Information

Application Number
CN202510073648.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-17
Publication Date
2025-02-21

Smart Images

  • Figure CN119493967A_ABST
    Figure CN119493967A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of information, and discloses a multi-factor space-time coupling water environment prediction method, which comprises the following steps: acquiring water environment internal data and water environment external data; preprocessing the water environment internal data and the water environment external data to obtain preprocessed multi-source data; the preprocessed multi-source data serve as a training set to be input into a random forest regression model, importance selection is conducted on the multi-source data, an influence factor set with the minimum error of the random forest regression model is selected, and the influence factor set serves as an optimal feature selection set; and taking the optimal feature selection set as a training set, inputting the training set into a least square support vector machine model, training the least square support vector machine model, obtaining a multi-factor coupled water quality prediction model, and obtaining a water environment prediction result based on the multi-factor coupled water quality prediction model. According to the method, the dimensionality of the least square support vector machine training model is reduced, and the prediction precision is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the field of information technology, and in particular to a water environment prediction method with multi-factor spatiotemporal coupling. Background Art

[0002] In water environment monitoring, it is necessary to consider the impact of multiple spatiotemporal coupling factors on influencing factors. These factors include meteorological conditions, topography, land use type, pollution source distribution, etc., which have complex nonlinear relationships with influencing factors. Traditional monitoring methods usually only consider a single factor or a simple linear relationship, which is difficult to fully reflect the true condition of the water environment. Therefore, there is an urgent need for a monitoring method that can model the complex relationship of multi-factor spatiotemporal coupling.

[0003] However, modeling of multi-factor spatiotemporal coupling faces many technical challenges. First, there may be interactions between various factors, and it is difficult to completely separate their effects. Secondly, the spatiotemporal scales of different factors vary greatly, and how to couple them under a unified framework is a difficult problem. Furthermore, the dynamic characteristics of the water environment make the relationship between factors and influencing factors constantly changing, and the adaptability of the modeling method needs to be considered. Finally, the generalization ability of the model is also critical, and it must be able to be well adapted to different water environment conditions. These challenges have led to the traditional modeling methods often being stretched when dealing with multi-factor spatiotemporal coupling problems, and new breakthroughs are urgently needed. Summary of the invention

[0004] In order to solve the problems existing in the above-mentioned prior art, the purpose of the present invention is to provide a water environment prediction method with multi-factor spatiotemporal coupling, which comprehensively considers the importance of each influencing factor, screens out the key factor combination with the strongest correlation with the influencing factors through a random forest regression model, gives higher weights to the screened key factors in the modeling process, improves the interpretability and computational efficiency of the model, reduces the dimension of the least squares support vector machine training model, improves the prediction accuracy, and obtains prediction results that are closer to reality, so as to solve the problem of rapid prediction of the water environment.

[0005] To achieve the above object, the present invention provides the following solutions:

[0006] A multi-factor spatiotemporal coupled water environment prediction method, comprising:

[0007] Acquire internal water environment data and external water environment data; the internal water environment data are internal influencing factors of the water environment in the water environment monitoring area, including: pH and pollution source distribution data; the external water environment data are external influencing factors of the water environment in the water environment monitoring area, including: environmental factors, topography and land use type;

[0008] Preprocessing the internal data of the water environment and the external data of the water environment, unifying all the data into the same spatiotemporal scale, and obtaining preprocessed multi-source data;

[0009] Input the preprocessed multi-source data as a training set into a random forest regression model, perform importance selection on the multi-source data, select a set of influencing factors with the smallest error of the random forest regression model, and use the set of influencing factors as an optimal feature selection set;

[0010] The optimal feature selection set is input into the least squares support vector machine model as a training set, the least squares support vector machine model is trained to obtain a multi-factor coupled water quality prediction model, and a water environment prediction result is obtained based on the multi-factor coupled water quality prediction model.

[0011] Optionally, the pollution source distribution data include: industrial and domestic sewage discharge; the environmental factors include: water level, water temperature and flow rate of the water environment monitoring section.

[0012] Optionally, obtaining the preprocessed multi-source data includes:

[0013] In view of the differences in spatiotemporal scales of different data sources, the least squares method is used for spatiotemporal interpolation to unify the time scale. The nearest neighbor resampling algorithm is used to resample data with inconsistent spatial resolutions to unify the spatial scale. Through data cleaning and data integration processing operations, the noise data of outliers and missing values ​​are eliminated.

[0014] Optionally, acquiring the preprocessed multi-source data further includes:

[0015] According to the geographical scope of the water environment monitoring area, the processed data is spatially cropped to extract the target area data, and the principal component analysis method is further used to extract features and reduce the dimension of the multi-source data to reduce data redundancy and noise, and obtain the pre-processed multi-source data.

[0016] Optionally, obtaining a set of influencing factors with the minimum error of the random forest regression model includes:

[0017] Step 1, inputting the training set into the random forest regression model, and calculating the out-of-bag data error according to the out-of-bag data corresponding to each decision tree in the random forest regression model;

[0018] Step 2, randomly taking a variable of all sample data in the out-of-bag data corresponding to the decision tree as the first feature, adding noise interference to the first feature, and calculating the out-of-bag data error corresponding to the decision tree again, thereby constructing an importance calculation model, and evaluating the importance of the first feature according to the importance calculation model;

[0019] Step 3, repeating step 2 until the importance evaluation of all variables in the training set is output, a visual drawing of the variable importance evaluation is drawn, the variable importance evaluations of all variables are arranged in descending order, and a preliminary screening of the importance measurement of the variables is performed according to the sorting results;

[0020] Step 4: For the variable set obtained after the preliminary screening, use the recursive feature backward elimination method to remove a specified proportion of variables from the variable set one by one, remove one variable each time, and calculate the out-of-bag error rate corresponding to the remaining variables after removing the variable. The variable set with the smallest out-of-bag error rate is used as the optimal feature selection set.

[0021] Optionally, constructing the importance calculation model includes:

[0022] ;

[0023] in, is the out-of-bag error of the out-of-bag data corresponding to the decision tree in the random forest regression model, The out-of-bag error is calculated again after adding noise interference to the first feature in the out-of-bag data. is the number of decision trees in the random forest regression model.

[0024] Optionally, obtaining the multi-factor coupled water quality prediction model includes:

[0025] The optimal feature selection set is input into the least squares support vector machine model, and ten-fold cross validation is used to perform parameter optimization to determine the optimal parameter combination of the penalty parameter of the least squares support vector machine model and the kernel width parameter of the Gaussian kernel function, so as to obtain the multi-factor coupled water quality prediction model.

[0026] Optionally, the Gaussian kernel function kernel width parameter includes:

[0027] ;

[0028] in, and represents two input vectors, Representation vector and The Euclidean distance between Represents the kernel width parameter.

[0029] The beneficial effects of the present invention are:

[0030] The present invention discloses a water environment monitoring method with multi-factor spatiotemporal coupling. The method first obtains multi-source heterogeneous data such as internal data of the water environment and external data of the water environment, performs preprocessing through spatiotemporal interpolation and resampling, unifies the data to the same scale, and uses machine learning algorithms such as support vector machines and random forests to fit complex mapping relationships. In order to adapt to the dynamic changes of the water environment, the random forest regression model is used to screen key influencing factors to improve the model's interpretability and efficiency. Transfer learning is used to improve the model's generalization ability, reduce sample requirements, construct a least squares support vector machine model, predict water quality change trends, evaluate environmental risks under different scenarios, and provide a scientific basis for water environment management decisions.

[0031] The present invention realizes accurate prediction and risk assessment of water quality, and provides strong technical support for water environment protection and pollution control. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0033] Figure 1 The present invention is a flowchart of a multi-factor spatiotemporal coupled water environment monitoring method according to an embodiment of the present invention. DETAILED DESCRIPTION

[0034] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0035] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.

[0036] like Figure 1As shown, this embodiment discloses a water environment prediction method with multi-factor spatiotemporal coupling, including: obtaining internal water environment data and external water environment data; the internal water environment data is the internal influencing factors of the water environment in the water environment monitoring area, including: pH and pollution source distribution data; the external water environment data is the external influencing factors of the water environment in the water environment monitoring area, including: environmental factors, topography and land use type; preprocessing the internal water environment data and the external water environment data, unifying all data to the same spatiotemporal scale, and obtaining preprocessed multi-source data; inputting the preprocessed multi-source data as a training set into a random forest regression model, performing importance selection on the multi-source data, selecting a set of influencing factors with the smallest error in the random forest regression model, and using the set of influencing factors as the optimal feature selection set; inputting the optimal feature selection set as a training set into a least squares support vector machine model, training the least squares support vector machine model, obtaining a multi-factor coupled water quality prediction model, and obtaining a water environment prediction result based on the multi-factor coupled water quality prediction model.

[0037] Furthermore, the pollution source distribution data include: industrial and domestic sewage discharge; environmental factors include: water level, water temperature and flow rate of water environment monitoring sections.

[0038] Furthermore, obtaining preprocessed multi-source data includes: using the least squares method to perform spatiotemporal interpolation to unify the time scale in view of the differences in spatiotemporal scales of different data sources, using the nearest neighbor resampling algorithm to resample data with inconsistent spatial resolutions, unifying the spatial scale, and eliminating noise data such as outliers and missing values ​​through data cleaning and data integration processing operations.

[0039] Furthermore, obtaining the preprocessed multi-source data also includes: spatially cropping the processed data according to the geographical scope of the water environment monitoring area, extracting the target area data, and further using the principal component analysis method to extract features and reduce the dimension of the multi-source data to reduce data redundancy and noise, and obtain the preprocessed multi-source data.

[0040] Specifically:

[0041] Obtain meteorological conditions, topography, land use type and pollution source distribution data of the water environment monitoring area. In view of the differences in spatiotemporal scales of different data sources, spatiotemporal interpolation and resampling methods are used for data preprocessing to unify all data to the same spatiotemporal scale.

[0042] Acquire multi-source heterogeneous data such as meteorology, topography, land use and pollution source distribution in the water environment monitoring area; use the least squares method to perform spatiotemporal interpolation to unify the time scale in view of the differences in spatiotemporal scales of different data sources; use the nearest neighbor resampling algorithm to resample data with inconsistent spatial resolution to unify the spatial scale; eliminate noise data such as outliers and missing values ​​through preprocessing operations such as data cleaning and data integration; spatially crop the preprocessed data according to the geographical scope of the water environment monitoring area to extract the data of the study area; use the principal component analysis method to extract features and reduce the dimension of multi-source data to reduce data redundancy and noise; input the processed meteorology, topography, land use and pollution source distribution data into the water environment model to simulate and analyze water quality changes.

[0043] Specifically, obtaining multi-source heterogeneous data is the basis of water environment monitoring. Taking a river basin as an example, data such as temperature and precipitation from meteorological stations, terrain data such as digital elevation models, land use data such as remote sensing image classification results, and distribution information of pollution sources such as industrial enterprises and agricultural non-point sources can be collected. These data have differences in temporal and spatial scales and need to be processed uniformly. For the problem of inconsistent time scales, the least squares method can be used for interpolation. For example, meteorological data may be observed once an hour, while water quality data is sampled once a day. By fitting the changing trend of meteorological data by the least squares method, it can be interpolated to the same daily scale as water quality data. This method can maintain the overall trend of data and reduce interpolation errors. The unification of spatial resolution can be achieved through nearest neighbor resampling. For example, the resolution of terrain data may be 30 meters, while that of land use data is 100 meters. Using nearest neighbor resampling, land use data can be resampled to a resolution of 30 meters to keep consistent with terrain data. This method is simple and fast and is suitable for resampling of categorical data. Data preprocessing is a key step to ensure data quality. Through data cleaning, outliers can be identified and processed. For example, the pH value of a monitoring point suddenly jumped from 7 to 14, which is obviously inconsistent with the actual situation. It may be an outlier caused by instrument failure and needs to be eliminated or corrected. For missing values, different filling methods can be used according to data characteristics, such as interpolation for time series data and kriging for spatial data. Spatial clipping can extract valid data in the study area. Taking a certain river basin as an example, various types of data can be clipped according to the river basin boundary, and only the data within the river basin is retained. This can not only reduce the amount of data and improve processing efficiency, but also avoid the interference of data outside the boundary on the model. Principal component analysis is an effective dimensionality reduction method. In water environment monitoring, a large number of indicators are often involved, such as dissolved oxygen, chemical oxygen demand, total nitrogen, total phosphorus, etc. There may be correlations between these indicators, resulting in information redundancy. Through principal component analysis, the original multidimensional indicators can be converted into several principal components, which not only retains most of the information but also reduces the data dimension. For example, it may be found that the first three principal components can explain more than 90% of the variance, so these three principal components can be used to replace the original multiple indicators. Finally, the processed multi-source data is input into the water environment model to comprehensively simulate and analyze water quality changes. Taking the SWAT model as an example, it can comprehensively consider the impact of factors such as meteorology, topography, land use and pollution sources on water quality. Through model simulation, the trend of water quality changes under different scenarios can be predicted, providing a scientific basis for water environment management. The significance of this series of data processing and analysis steps is: first, by unifying the time and space scales, data from different sources can be integrated and analyzed, which improves the comparability and consistency of the data. Secondly, data preprocessing and spatial cropping improve data quality and reduce interference from irrelevant data. Thirdly, dimensionality reduction methods such as principal component analysis can extract key information and reduce computational complexity.Finally, the processed data is input into the water environment model to achieve comprehensive simulation and prediction of water quality changes, providing scientific support for water environment management decisions. This multi-source data fusion method is not only applicable to water environment monitoring, but can also be extended to other environmental monitoring fields. For example, in air pollution monitoring, it is also necessary to integrate multi-source data such as meteorology, topography, land use and pollution sources. Through similar processing steps, comprehensive analysis and prediction of air quality can be achieved. The core advantage of this method is that it can comprehensively consider various influencing factors, improve the accuracy and reliability of the model, and provide more comprehensive and accurate decision support for environmental management.

[0044] According to the geographical scope of the water environment monitoring area, the preprocessed data were spatially clipped to extract the study area data.

[0045] Obtain the geographical scope information of the water environment monitoring area and determine the spatial boundary of the study area; use spatial indexing technology to quickly locate the data within the study area for the preprocessed data; perform spatial clipping on the located data according to the determined spatial boundary of the study area; remove irrelevant data outside the study area through spatial clipping to obtain the target data within the study area; reconstruct the spatial topological relationship of the clipped study area data to ensure the integrity of the data; use spatial statistical methods to analyze the distribution characteristics of the data in the study area to provide support for subsequent analysis; store the clipped and extracted study area data to form a special regional data set for subsequent application.

[0046] Specifically, obtaining geographical information about the water environment monitoring area is the basis for conducting research. Taking a certain river basin as an example, the coordinates of the river basin boundary can be determined through remote sensing images and topographic maps, such as 110°-112° east longitude and 30°-32° north latitude. After determining the boundary, spatial indexing technologies such as R-tree can be used to quickly locate the data in the study area. R-tree organizes spatial objects according to the minimum enclosing rectangle, and can efficiently query the data falling into the study area. Spatial clipping is a key step in extracting data in the target area. Taking ArcGIS as an example, the Clip tool can be used to clip vector data, and the Extraction tool can be used to clip raster data. After clipping, the data outside the study area is removed, and only the target data in the area is retained. This step can greatly reduce the amount of data and improve the efficiency of subsequent analysis. Spatial topological relationship reconstruction ensures data integrity. For example, for river network data, clipping may cause the river section to be disconnected. Through topological reconstruction, the connectivity of the river section can be restored to ensure the accuracy of water system analysis. This can be achieved using the ArcGIS Topology toolset. Spatial statistical analysis helps to reveal the distribution characteristics of data. Taking land use type as an example, the area proportion of each type can be calculated, such as 30% forest land, 25% cultivated land, 20% water area, etc. The spatial aggregation can also be analyzed, such as using the Moran's I index to evaluate the spatial autocorrelation of land use types. These statistical results provide important parameters for subsequent water environment simulation. Finally, the processed data is stored as a special regional dataset. The file geodatabase format can be used, such as ESRI's FileGeodatabase, which supports the storage of multiple data types for easy management and access. Spatial databases such as PostGIS can also be considered to support efficient spatial query and analysis. The significance of this series of operations is: first, by clarifying the scope of the study area, the pertinence of the analysis is ensured; second, spatial indexing and clipping improve data processing efficiency; third, topological reconstruction and spatial statistical analysis ensure data quality and in-depth understanding; finally, a special dataset is formed to facilitate subsequent continuous research. These steps together constitute the spatial processing flow of water environment monitoring data, laying a solid foundation for subsequent water quality simulation and evaluation.

[0047] Furthermore, obtaining a set of influencing factors with the smallest error of the random forest regression model includes: step 1, inputting the training set into the random forest regression model, and calculating the out-of-bag data error according to the out-of-bag data corresponding to each decision tree in the random forest regression model; step 2, randomly taking a variable of all sample data in the out-of-bag data corresponding to the decision tree as the first feature, adding noise interference to the first feature, and calculating the out-of-bag data error corresponding to the decision tree again, thereby constructing an importance calculation model, and evaluating the importance of the first feature according to the importance calculation model; step 3, repeating step 2 until the importance evaluation of all variables in the training set is output, drawing a visual drawing of the variable importance evaluation, arranging the variable importance evaluations of all variables in descending order, and performing a preliminary screening of the importance measurement of the variables according to the sorting results; step 4, for the variable set obtained after the preliminary screening, using the recursive feature backward elimination method to successively remove a specified proportion of variables from the variable set, removing one variable each time, and calculating the out-of-bag error rate corresponding to the remaining variables after the variable is removed, and taking the variable set with the smallest out-of-bag error rate as the optimal feature selection set.

[0048] Furthermore, constructing the importance calculation model includes:

[0049] ;

[0050] in, is the out-of-bag error of the out-of-bag data corresponding to the decision tree in the random forest regression model, The out-of-bag error is calculated again after adding noise interference to the first feature in the out-of-bag data. is the number of decision trees in the random forest regression model.

[0051] Furthermore, obtaining a water quality prediction model with multiple factors coupled includes: inputting the optimal feature selection set into the least squares support vector machine model, using ten-fold cross validation to perform parameter optimization to determine the optimal parameter combination of the penalty parameter of the least squares support vector machine model and the kernel width parameter of the Gaussian kernel function, and obtaining a water quality prediction model with multiple factors coupled.

[0052] Furthermore, the Gaussian kernel function kernel width parameters include:

[0053] ;

[0054] in, and represents two input vectors, Representation vector and The Euclidean distance between Represents the kernel width parameter.

[0055] This embodiment also discloses that the water quality prediction model is updated in real time using an online learning strategy in view of the dynamic change characteristics of the water environment, and the model parameters are continuously optimized according to the newly collected monitoring data to improve the adaptability of the model to dynamic changes and ensure the stability of the prediction performance.

[0056] Real-time monitoring data of the water environment is obtained, and the data is preprocessed to remove outliers and noise interference to obtain a standardized monitoring data set. Based on the preprocessed monitoring data, the incremental learning algorithm is used to update the existing water quality prediction model online, and the parameters and weights of the model are adjusted in real time. During the model update process, the prediction performance of the model is evaluated by cross-validation and other methods to determine whether the model can adapt to the dynamic changes of the water environment. If the prediction performance of the model decreases, the adaptive optimization mechanism of the model is triggered to improve the adaptability of the model by fine-tuning parameters or adjusting the model structure. The optimized water quality prediction model is applied to the newly collected monitoring data to obtain real-time water quality prediction results. Reliability analysis is performed on the prediction results, the confidence interval of the prediction value is calculated, and the stability and reliability of the prediction results are determined. According to the reliability evaluation of the prediction results, the update frequency and learning rate of the model are dynamically adjusted to ensure that the model can continue to adapt to changes in the water environment and provide stable and reliable prediction services.

[0057] Specifically, the acquisition of real-time monitoring data of the water environment is the basis for the dynamic update of the water quality prediction model. Taking a river in a certain city as an example, the water temperature, pH value, dissolved oxygen and other indicator data can be collected in real time through the automatic water quality monitoring stations. These raw data often contain outliers and noise, and need to be preprocessed. For example, the median filter method can be used to remove the mutation points in the dissolved oxygen data, and the wavelet transform can be used to eliminate the high-frequency noise in the pH signal, so as to obtain a standardized monitoring data set. The incremental learning algorithm can continuously update the existing model with the newly collected data to adapt to the dynamic changes of the water environment. Taking the support vector machine as an example, the online sequence minimum optimization algorithm can be used to adjust the support vector and weight coefficient according to the new samples to achieve real-time update of the model. During the update process, the model performance is evaluated by k-fold cross validation. If the mean square error of the model on the new data is found to increase significantly, the adaptive optimization mechanism is triggered. The adaptive optimization of the model can be achieved by fine-tuning parameters or adjusting the structure. For example, for the random forest model, the number and depth of trees can be dynamically adjusted, or the feature importance weight can be updated. If it is found that some newly emerging pollutants have a significant impact on water quality, it is also possible to consider adding corresponding input features to improve the adaptability of the model. When the optimized model is applied to new data, reliability analysis is required. Taking dissolved oxygen prediction as an example, the 95% confidence interval of the predicted value can be calculated to determine the stability of the prediction result. If the confidence interval is too wide, it means that the reliability of the prediction result is low, and the model needs to be further optimized or the data sampling frequency needs to be increased. According to the reliability of the prediction result, the model update strategy can be dynamically adjusted. For example, when the water quality is relatively stable, the model update frequency can be reduced to reduce the consumption of computing resources; while during the flood season or sudden pollution incidents, the update frequency needs to be increased to ensure that the model can capture the trend of water quality changes in a timely manner. At the same time, different learning rates can be used according to the changing characteristics of different influencing factors. For indicators that change rapidly, such as ammonia nitrogen, a larger learning rate is used; for relatively stable indicators such as total phosphorus, a smaller learning rate is used to balance the stability and adaptability of the model. Through this dynamic update and adaptive optimization mechanism, the water quality prediction model can continuously adapt to changes in the water environment and provide timely and accurate decision-making support for water resources management and pollution prevention and control. For example, when an abnormal increase in ammonia nitrogen concentration is detected in the upper reaches of a river, the model can quickly adjust parameters to predict the trend of downstream water quality changes, providing a scientific basis for emergency response. This intelligent prediction method based on real-time data not only improves the efficiency of water environment supervision, but also provides strong support for ecological civilization construction and sustainable development.

[0058] This embodiment also discloses the construction of a water quality prediction model system at multiple time and space scales. The evolution of water quality is described from the short-term, medium-term, and long-term time scales, as well as the local, regional, and river basin spatial scales. Through hierarchical structure design, sub-models of different time and space scales are integrated into a complete prediction system to achieve the coordination and complementarity of multi-scale prediction results.

[0059] Based on the historical water quality monitoring data, the time series analysis method is used to construct water quality prediction sub-models at three time scales: short-term, medium-term and long-term, and the water quality change trends in the next 1 day, 7 days and 30 days are predicted respectively. Based on the basin geographic information data, the spatial interpolation method is used to construct water quality prediction sub-models at three spatial scales: local, regional and basin, and the spatial distribution of water quality in different regions is predicted respectively. Through hierarchical structure design, the sub-models of time scale and space scale are combined to form a water quality prediction model system with multiple time and space scales. In the model training stage, the cross-validation method is used to optimize the hyperparameters of each sub-model and improve the prediction accuracy. At the same time, the fusion of prediction results of different sub-models is achieved by weighted averaging. In the model prediction stage, the weight coefficients of each sub-model are dynamically adjusted according to the real-time monitoring data to achieve dynamic update and adaptive correction of the prediction results. The prediction results are visualized to generate water quality spatiotemporal evolution trend diagrams and water quality early warning maps, providing intuitive decision support for water environment management. Through the construction and application of a multi-temporal and spatial scale water quality prediction model system, comprehensive monitoring, early warning and precise control of river basin water quality can be achieved, providing scientific and technological support for the construction of water ecological civilization.

[0060] Specifically, the construction of a multi-spatiotemporal scale water quality prediction model system involves several key technologies. Time series analysis methods are used to construct short-, medium- and long-term prediction sub-models. For example, for short-term 1-day predictions, the autoregressive moving average model (ARIMA) can be used. This model takes into account historical observations and error terms and can effectively capture short-term fluctuations in influencing factors. For medium-term 7-day predictions, the long short-term memory network (LSTM) can be used, and its cyclic structure is suitable for processing longer time dependencies. For long-term 30-day predictions, the seasonal ARIMA model can be used to take cyclical changes into account. Spatial interpolation methods are used to construct prediction sub-models at different spatial scales. The inverse distance weighting method (IDW) can be used at the local scale, assuming that the closer the distance, the stronger the correlation. The kriging method can be used at the regional scale, taking into account spatial autocorrelation and providing the best linear unbiased estimate. The geographically weighted regression (GWR) can be used at the watershed scale, introducing geographic location as a weight to capture spatial heterogeneity. The hierarchical structure design combines the spatiotemporal sub-models into a unified system. A tree structure can be used, with the top layer being the overall prediction, the middle layer being the time and space dimensions, and the bottom layer being the specific sub-model. This structure facilitates model management and result fusion. When cross-validating and optimizing hyperparameters, a grid search method can be used. For example, the p, d, and q parameters of the ARIMA model are traversed in the range of [0,5] to select the combination with the smallest root mean square error. The sub-model results are fused using a weighted average method. The initial weight can be determined based on the performance of each model on the validation set. For example, for three models with an accuracy of 80%, 85%, and 90%, the initial weights can be set to 0.31, 0.33, and 0.36. Dynamic adjustment of weights can be based on the most recent prediction error. The better the model, the greater the weight. For example, if the average error of a model's last five predictions decreases by 10%, its weight can be increased by 5% accordingly. Visual display is essential for decision support. The temporal and spatial evolution trend chart can be in the form of a heat map, with the horizontal axis being time and the vertical axis being spatial location. The depth of color indicates the quality of water. The early warning map can use GIS technology to overlay the prediction results on the geographic base map, use different colors to identify the water quality level, and set thresholds to trigger early warning signals. The advantages of this multi-temporal and spatial scale model system are its comprehensiveness and flexibility. It can simultaneously consider the temporal law and spatial distribution characteristics of water quality changes and adapt to management needs at different scales. Through the combination and dynamic adjustment of sub-models, the prediction accuracy can be continuously improved, providing a more reliable decision-making basis for water environment management. This is of great significance for achieving precise and intelligent water ecological civilization construction.

[0061] This embodiment also discloses a water quality prediction model based on the established multi-factor spatiotemporal coupling to predict the changing trend of future influencing factors. It evaluates water environment risks under different scenarios, including normal scenarios, extreme weather scenarios, pollution accident scenarios, etc., to provide a scientific basis for water environment management decisions and guide the formulation and optimization of pollution prevention and control measures.

[0062] Obtain historical water quality monitoring data, meteorological data, pollution source emission data, etc., and construct a multi-factor spatiotemporal coupling water quality prediction model. The model considers the spatiotemporal dynamic changes and interaction relationships of multiple factors such as hydrology, meteorology, and pollution sources. Use machine learning algorithms such as support vector machines and random forests to train water quality prediction models, and improve prediction accuracy and robustness through model verification and optimization. Use the established water quality prediction model to predict the changing trends of influencing factors at different time scales in the future, such as the spatiotemporal distribution and evolution laws of key indicators such as internal data of the water environment and external data of the water environment. Set different model boundary conditions and parameters for normal scenarios, extreme weather scenarios, and pollution accident scenarios, simulate the water quality change process under different scenarios, and evaluate the water environment risk level. According to the water quality prediction results and risk assessment results, identify high-risk areas and key periods of the water environment, analyze the main influencing factors of water quality deterioration, and provide a scientific basis for water environment management decisions. Combined with the water quality prediction and risk assessment results, optimize pollution prevention and control measures, such as adjusting pollution source emission control strategies, strengthening non-point source pollution control, optimizing water environment capacity allocation, etc., and formulate targeted water quality improvement plans. Develop a water environment management decision support system that integrates functions such as water quality prediction, risk assessment, and pollution prevention and control optimization to achieve scientific and refined water environment management and improve management efficiency and effectiveness.

[0063] Specifically, the construction of a multi-factor spatiotemporal coupling water quality prediction model requires comprehensive consideration of multiple factors such as hydrology, meteorology and pollution sources. Taking a river as an example, the daily average water quality monitoring data, meteorological station data and main sewage outlet discharge data for the past five years were collected. Meteorological factors include rainfall, temperature, wind speed, etc., and pollution source data include industrial and domestic sewage discharge. Through correlation analysis, factors with significant impact on water quality were screened out, such as rainfall and ammonia nitrogen concentration are negatively correlated, and temperature and dissolved oxygen are negatively correlated. The support vector machine algorithm was used to construct a water quality prediction model. Taking dissolved oxygen as an example, upstream water quality, temperature, rainfall and sewage discharge were selected as input variables to predict the dissolved oxygen concentration in the next 7 days. The model parameters, such as kernel function type and penalty factor, were optimized through cross-validation. The model validation results show that the prediction accuracy reached 85% and the root mean square error was 0.5 mg / L. The trained model was used to predict the trend of dissolved oxygen changes in the next month. The results show that under normal meteorological conditions, the dissolved oxygen concentration fluctuates periodically, and the lowest value occurs every Friday, which coincides with the peak period of industrial sewage discharge. For extreme weather scenarios, the impact of continuous high temperature on water quality is simulated. If the temperature is set 5℃ higher than the normal value, the model predicts that the dissolved oxygen concentration will drop by 20%, and some river sections may face the risk of hypoxia. For the sudden pollution accident scenario, it is assumed that a chemical plant has a leakage accident, and the daily discharge will increase by 50%. The model predicts that within 3 days after the accident, the chemical oxygen demand within 10 kilometers downstream will exceed the standard by 50%. Based on this result, the high-risk areas and key periods affected by the accident are identified to provide decision support for emergency management. Combined with the water quality prediction results, the pollution prevention and control measures are optimized. In view of the problem of periodic reduction of dissolved oxygen, it is recommended to adjust the pollution discharge period of industrial enterprises and stagger the peak of discharge to the weekend. For non-point source pollution, according to the predicted spatial distribution of ammonia nitrogen, an ecological buffer zone is added around the agricultural planting area to reduce agricultural non-point source pollution. The development of the water environment management decision support system integrates the above functions. The system interface displays the spatiotemporal distribution map of the water quality prediction results, and uses different colors to mark the water quality level. Users can select different scenarios, and the system automatically adjusts the model parameters and outputs the prediction results and risk assessment reports in real time. Managers can achieve refined and intelligent water environment management based on decision suggestions provided by the system, such as adjusting discharge permits, adding online water quality monitoring points, etc.

[0064] The embodiments described above are only descriptions of the preferred embodiments of the present invention and are not intended to limit the scope of the present invention. Without departing from the design spirit of the present invention, various modifications and improvements made to the technical solutions of the present invention by ordinary technicians in this field should all fall within the protection scope determined by the claims of the present invention.

Claims

1. A multi-factor spatiotemporal coupled water environment prediction method, characterized in that: include: Obtain internal and external data of water environment; The internal water environment data refers to the internal influencing factors of the water environment in the water environment monitoring area, including: pH and pollution source distribution data; the external water environment data refers to the external influencing factors of the water environment in the water environment monitoring area, including: environmental factors, topography and land use type; Preprocessing the internal data of the water environment and the external data of the water environment, unifying all the data into the same spatiotemporal scale, and obtaining preprocessed multi-source data; Input the preprocessed multi-source data as a training set into a random forest regression model, perform importance selection on the multi-source data, select a set of influencing factors with the smallest error of the random forest regression model, and use the set of influencing factors as an optimal feature selection set; The optimal feature selection set is input into the least squares support vector machine model as a training set, the least squares support vector machine model is trained to obtain a multi-factor coupled water quality prediction model, and a water environment prediction result is obtained based on the multi-factor coupled water quality prediction model.

2. The water environment prediction method of multi-factor spatiotemporal coupling according to claim 1 is characterized in that: The pollution source distribution data include: industrial and domestic sewage discharge; the environmental factors include: water level, water temperature and flow rate of the water environment monitoring section.

3. The water environment prediction method of multi-factor spatiotemporal coupling according to claim 1 is characterized in that: Acquiring the preprocessed multi-source data includes: In view of the differences in spatiotemporal scales of different data sources, the least squares method is used for spatiotemporal interpolation to unify the time scale. The nearest neighbor resampling algorithm is used to resample data with inconsistent spatial resolutions to unify the spatial scale. Through data cleaning and data integration processing operations, the noise data of outliers and missing values ​​are eliminated.

4. The water environment prediction method of multi-factor spatiotemporal coupling according to claim 3 is characterized in that: Acquiring the preprocessed multi-source data further includes: According to the geographical scope of the water environment monitoring area, the processed data is spatially cropped to extract the target area data, and the principal component analysis method is further used to extract features and reduce the dimension of the multi-source data to reduce data redundancy and noise, and obtain the pre-processed multi-source data.

5. The water environment prediction method of multi-factor spatiotemporal coupling according to claim 1 is characterized in that: The set of influencing factors for obtaining the minimum error of the random forest regression model includes: Step 1, inputting the training set into the random forest regression model, and calculating the out-of-bag data error according to the out-of-bag data corresponding to each decision tree in the random forest regression model; Step 2, randomly taking a variable of all sample data in the out-of-bag data corresponding to the decision tree as the first feature, adding noise interference to the first feature, and calculating the out-of-bag data error corresponding to the decision tree again, thereby constructing an importance calculation model, and evaluating the importance of the first feature according to the importance calculation model; Step 3, repeating step 2 until the importance evaluation of all variables in the training set is output, a visual drawing of the variable importance evaluation is drawn, the variable importance evaluations of all variables are arranged in descending order, and a preliminary screening of the importance measurement of the variables is performed according to the sorting results; Step 4: For the variable set obtained after the preliminary screening, use the recursive feature backward elimination method to remove a specified proportion of variables from the variable set one by one, remove one variable each time, and calculate the out-of-bag error rate corresponding to the remaining variables after removing the variable. The variable set with the smallest out-of-bag error rate is used as the optimal feature selection set.

6. The multi-factor spatiotemporal coupled water environment prediction method according to claim 5 is characterized in that: Constructing the importance calculation model includes: ; in, is the out-of-bag error of the out-of-bag data corresponding to the decision tree in the random forest regression model, The out-of-bag error is calculated again after adding noise interference to the first feature in the out-of-bag data. is the number of decision trees in the random forest regression model.

7. The multi-factor spatiotemporal coupled water environment prediction method according to claim 1 is characterized in that: Obtaining the multi-factor coupled water quality prediction model includes: The optimal feature selection set is input into the least squares support vector machine model, and ten-fold cross validation is used to perform parameter optimization to determine the optimal parameter combination of the penalty parameter of the least squares support vector machine model and the kernel width parameter of the Gaussian kernel function, so as to obtain the multi-factor coupled water quality prediction model.

8. The multi-factor spatiotemporal coupled water environment prediction method according to claim 7 is characterized in that: The Gaussian kernel function kernel width parameters include: ; in, and represents two input vectors, Representation vector and The Euclidean distance between Represents the kernel width parameter.

Citation Information

Patent Citations

  • Concrete structure durability prediction method based on random forest and intelligent algorithm

    CN111985796A

  • Method and system for fine estimation and analysis of basin water environment quality

    CN117009887A

  • Water environment monitoring data processing method and system based on Internet of Things and big data

    CN118350678A

Cited By

  • Method for predicting and analyzing extreme rainstorm event in hilly region based on multi-factor coupling

    CN120633905A

  • A method for predicting and analyzing extreme rainstorm events in hilly areas based on multi-factor coupling

    CN120633905B

  • Method and system for identifying sediment flux evolution attribution in cold and cold mountainous area

    CN120804639A

  • A method and system for attribution identification of sediment flux evolution in high-altitude and cold mountainous areas

    CN120804639B

  • Key soil monitoring point screening method based on multiple machine learning methods

    CN121030287A