Water quality monitoring method and system based on artificial intelligence
Through dynamic sampling algorithms and multi-source data processing, combined with machine learning methods, real-time, accurate and comprehensive data coverage of water quality monitoring is achieved, solving the problems of insufficient data coverage and limited prediction accuracy in traditional water quality monitoring methods, and providing intelligent pollution traceability and early warning support.
Patent Information
- Application Number
- CN202510905045.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-02
- Publication Date
- 2025-08-15
- Estimated Expiration
- 2045-07-02
AI Technical Summary
Traditional water quality monitoring methods rely on single-point sampling and manual analysis, with narrow data coverage and poor timeliness, making it difficult to adapt to complex and changeable water environments, unable to meet real-time, accurate and comprehensive monitoring needs, and lack dynamic early warning and decision-making support mechanisms.
The dynamic sampling algorithm is used to adjust the sampling frequency and position, combine multi-source data for spatiotemporal interpolation processing, and extract key features using principal component analysis. The dimensionality reduction classification is obtained through random forest algorithm, and the pollution concentration prediction results are analyzed in combination with convolutional neural network. Real-time early warning model is constructed using Bayesian network to generate dynamic early warning signals and push them to the decision support system.
It realizes intelligent monitoring, accurate traceability and timely warning of water pollution, provides effective technical support for water environment protection, improves data coverage density and prediction accuracy, and supports dynamic warning and decision-making.
Smart Images

Figure CN120493079A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of water quality monitoring, and in particular discloses a water quality monitoring method and system based on artificial intelligence. Background Art
[0002] Traditional water quality monitoring methods rely on single-point sampling and manual analysis, resulting in limited data coverage and poor timeliness. These methods are difficult to adapt to complex and changing water environments, especially in river basins or groundwater systems where pollution incidents are frequent. Response lags and insufficient accuracy are particularly prominent. These limitations make existing methods unable to meet the needs of real-time, accurate, and comprehensive monitoring.
[0003] In the field of water quality monitoring, the core challenge stems from inefficient and insufficiently intelligent data collection and analysis. Static sampling limits the spatial and temporal coverage of data, making it difficult to capture early signals of pollution events. Furthermore, the high-dimensional heterogeneity of the data further exacerbates processing challenges. Traditional methods struggle to effectively integrate multi-source data, such as sensor data, image data, and meteorological information, resulting in inefficient feature extraction and analysis.
[0004] Furthermore, the model's predictive capabilities are limited. Faced with nonlinear water quality changes and complex pollution diffusion patterns, existing algorithms find it difficult to achieve accurate classification, trend prediction, and pollution tracing.
[0005] Ultimately, the lack of a dynamic early warning and decision-making support mechanism prevents the monitoring system from shifting from passive response to active prevention and control.
[0006] Therefore, how to build a water quality monitoring system that integrates dynamic data collection, multi-source feature fusion, intelligent prediction and real-time warning to overcome the bottlenecks of insufficient data coverage, inefficient feature processing and limited prediction accuracy has become a key issue in promoting the upgrading of water quality monitoring technology paradigm. Summary of the Invention
[0007] The present invention provides a water quality monitoring method and system based on artificial intelligence, aiming to solve at least one of the above-mentioned defects of the prior art.
[0008] Access to comprehensive datasets consisting of sensor data, satellite imagery, and meteorological parameters; According to the water flow rate and pollution concentration gradient in the comprehensive data set, a dynamic sampling algorithm is used to adjust the sampling frequency and position, and the adjusted data is output; Perform spatiotemporal interpolation processing on the adjusted data to obtain a preprocessed dataset with high-density spatiotemporal coverage; The principal component analysis method is used to extract the key features of sensor values, image textures and meteorological parameters from the preprocessed data set, and a weighted feature matrix is constructed to obtain a fusion feature set. Determine whether the dimension of the fused feature set exceeds the preset threshold. If the dimension of the fused feature set exceeds the preset threshold, use the random forest algorithm to reduce the dimension and classify the fused features. Optimize the model parameters through cross-validation to obtain the pollution concentration prediction result. A convolutional neural network is used to analyze the spatial pattern of pollution concentration prediction results, and the pollution migration path is calculated by combining water flow field data. The location of the pollution source is determined through iterative optimization to obtain the pollution source tracing results. Determine whether the confidence level of the pollution source tracing results is higher than the preset threshold. If the confidence level of the pollution source tracing results is higher than the preset threshold, a Bayesian network is used to build a real-time early warning model, which integrates the pollution concentration prediction results with the pollution source tracing results to generate a dynamic early warning signal. The dynamic warning signal is input into the push algorithm to transmit the warning data to the decision support system.
[0009] Furthermore, the steps of obtaining a comprehensive dataset consisting of sensor data, satellite images, and meteorological parameters include: Collect and preprocess multi-source data: Obtain environmental parameters, satellite images, and meteorological parameters through sensor equipment, satellite remote sensing platforms, and weather station databases. Use format conversion tools to standardize multi-source data to obtain standardized data sets. Perform time and space alignment: synchronize the standardized datasets according to their timestamps. If the timestamps are missing, they are supplemented by linear interpolation. Then, the standardized datasets are spatially aligned using geographic coordinate matching to obtain a time and space synchronized dataset. Handling missing and anomalies: For time-space synchronized datasets, if sensor data is missing, it is interpolated and filled using the K-nearest neighbor algorithm. If meteorological parameters exceed the preset threshold, they are marked as anomalies and removed to obtain a cleaned dataset. Fuse data and calculate correlation: Fuse the cleaned data sets using the weighted average method, and calculate the correlation of the fused data using the Pearson correlation coefficient to obtain a comprehensive data set.
[0010] Furthermore, a dynamic sampling algorithm is used to adjust the sampling frequency and position based on the water flow rate and pollution concentration gradient in the comprehensive data set. The steps of outputting the adjusted data include: The water flow rate and pollution concentration data are obtained from the comprehensive data set, and the pollution concentration gradient is calculated using a two-dimensional gradient operator to obtain a concentration gradient distribution data set; the gradient operator is defined as , C represents the pollution concentration, x and y represent the spatial coordinates; According to the concentration gradient distribution data set, if the concentration gradient value is greater than the preset threshold, the high gradient area is divided into sampling positions using the grid division method, and the sampling frequency is calculated using the weighted average method to obtain a preliminary adjusted sampling plan; For the initially adjusted sampling scheme, the K-means clustering algorithm is used to optimize the grouping of sampling locations, and the sampling frequency is synchronized through timestamps to obtain the optimized sampling scheme. The adjusted sampling frequency and position data are obtained from the optimized sampling scheme, and the adjusted sampling frequency and position data are integrated using a data fusion method to output the adjusted data.
[0011] Furthermore, the steps of performing spatiotemporal interpolation processing on the adjusted data to obtain a pre-processed data set with high-density spatiotemporal coverage include: The sampling frequency, sampling position, and timestamp are obtained from the adjustment data. The timestamps are sorted using a time series analysis method. If the timestamp interval is greater than a preset threshold, the time series gaps are filled using a linear interpolation method to obtain the time-synchronized sampling data. Based on the time-synchronized sampling data, the pollution concentration and water flow velocity are obtained. The sampling locations are mapped to a two-dimensional coordinate system using a spatial grid division method. If the pollution concentration gradient within the grid is greater than a preset threshold, spatial interpolation is performed using the Kriging interpolation method to obtain high-density spatial distribution data. Obtain missing data points from high-density spatial distribution data, and use data fusion methods to integrate pollution concentration and water flow rate. If the missing points are located at the spatial grid boundary, the missing points are filled by weighted averaging to obtain a spatiotemporally continuous data set. For the spatiotemporally continuous dataset, the interpolation accuracy index is obtained, and the interpolation parameters are adjusted using the iterative interpolation method. If the interpolation accuracy is lower than the preset threshold, the iterative adjustment is repeated to obtain a preprocessed dataset with high-density spatiotemporal coverage.
[0012] Furthermore, the principal component analysis method is used to extract key features of sensor values, image textures, and meteorological parameters from the preprocessed data set, and a weighted feature matrix is constructed. The steps of obtaining the fused feature set include: Sensor values, image textures, and meteorological parameters are obtained from the preprocessed dataset. Principal component analysis is used to standardize the data dimensions, calculate the covariance matrix, and obtain eigenvalues and eigenvectors. If the cumulative contribution rate of the eigenvalue is greater than a preset threshold, the corresponding eigenvector is selected to obtain the key feature set after dimensionality reduction. Based on the key feature set, the variance contribution rate of each feature is obtained, and the weight is calculated using the entropy method. If the weight is lower than the preset threshold, the weight is reset to zero. The weight and feature are integrated through matrix multiplication to obtain the weighted feature matrix; The feature subsets of sensor values, image textures, and meteorological parameters are obtained from the weighted feature matrix and spliced using the data fusion method. If the dimension after splicing exceeds the preset threshold, it is adjusted using the linear dimensionality reduction method to obtain the preliminary fused feature set. Based on the preliminary fusion feature set, the correlation coefficient matrix between features is obtained, and the features with correlation coefficients higher than the preset threshold are grouped using the clustering method. The features are integrated through the weighted average method within the group to obtain the final fusion feature set.
[0013] Furthermore, it is determined whether the dimension of the fused feature set exceeds a preset threshold. If the dimension of the fused feature set exceeds the preset threshold, a random forest algorithm is used to reduce the dimension and classify the fused features. The model parameters are optimized through cross-validation to obtain the pollution concentration prediction results. The steps include: Obtain feature dimension data from the fused feature set, and use statistical methods to calculate the distribution characteristics of the feature dimension data. If the feature dimension exceeds the preset threshold, the feature dimension data is ranked by importance using the random forest algorithm to obtain a feature subset after dimensionality reduction. Based on the feature subset after dimensionality reduction, the training set and validation set are obtained, and the tree depth and number of trees of the random forest are optimized using the cross-validation method to obtain the optimized model parameter set; Obtain classification labels from the optimized model parameter set, use the random forest algorithm to perform classification training on the training set, evaluate the classification performance on the validation set, and obtain the predicted probability distribution of the classification labels; According to the predicted probability distribution of the classification label, the mapping function of the pollution concentration is obtained, and the predicted probability distribution is fitted using the linear regression method to obtain the predicted result of the pollution concentration.
[0014] Furthermore, a convolutional neural network is used to analyze the spatial pattern of the pollution concentration prediction results. The pollution migration path is calculated by combining water flow field data. The location of the pollution source is determined through iterative optimization. The steps to obtain the pollution source tracing results include: Concentration distribution data is obtained from the pollution concentration prediction results, and a convolutional neural network is used to extract spatial patterns from the concentration distribution data to obtain a spatial pattern feature set; Based on the spatial pattern feature set and combined with the water flow field data, the pollution migration path is calculated using the fluid mechanics algorithm to obtain the pollution migration path set; Determine whether the number of paths in the pollution migration path set exceeds a preset threshold. If the number of paths in the pollution migration path set exceeds the preset threshold, screen and cluster the path set through an iterative optimization algorithm to determine a candidate set of pollution source locations. For the candidate set of pollution source locations, the Bayesian inference method is used to calculate the probability distribution of each candidate location to obtain the tracing result of the pollution source location.
[0015] Furthermore, it is determined whether the confidence level of the pollution source tracing result is higher than a preset threshold. If the confidence level of the pollution source tracing result is higher than the preset threshold, a Bayesian network is used to construct a real-time early warning model. The steps of fusing the pollution concentration prediction result with the pollution source tracing result to generate a dynamic early warning signal include: The concentration distribution data is obtained from the pollution concentration prediction results. The Bayesian network is used to perform probability modeling on the concentration distribution data. The dynamic probability distribution of the pollution migration path is calculated in combination with the flow field data to obtain the pollution migration path set. If the number of paths in the pollution migration path set exceeds the preset threshold, the pollution migration path set is screened through a clustering algorithm, similar migration paths are merged, and a candidate location set is determined; For the candidate location set, the Bayesian inference method is used to calculate the confidence of each candidate location, and the confidence distribution is generated by combining the tracing results to obtain the probability distribution of the pollution source location; According to the probability distribution, a dynamic signal generation algorithm is used to fuse the probability distribution and concentration prediction results to generate a dynamic signal for real-time warning.
[0016] Furthermore, the steps of inputting the dynamic warning signal into the push algorithm and transmitting the warning data to the decision support system include: Acquire signal feature data from dynamic warning signals, prioritize the signal feature data using a classification algorithm, generate a priority queue based on preset push rules, and obtain a push priority sequence; According to the push priority sequence, the dynamic warning signal is converted into standardized warning data using the data encapsulation method, and the formatted data packet is generated in combination with the preset data format specification to determine the content of the transmitted data; For the formatted data packet, the transmission protocol is used to fragment the formatted data packet, and a checksum is generated in combination with a checksum algorithm during fragmentation to obtain a transmission data unit with checksum; The transmission data unit is sent to the decision support system through the data transmission channel, and the received transmission data unit is reorganized and verified using an asynchronous processing method to determine the data integrity and generate a confirmation signal.
[0017] Another aspect of the present invention relates to an artificial intelligence-based water quality monitoring system for implementing the above-mentioned artificial intelligence-based water quality monitoring method. The artificial intelligence-based water quality monitoring system includes: A first acquisition module is used to acquire a comprehensive data set consisting of sensor data, satellite images and meteorological parameters; An adjustment module is used to adjust the sampling frequency and position based on the water flow rate and pollution concentration gradient in the comprehensive data set using a dynamic sampling algorithm and output the adjusted data; The second acquisition module is used to perform spatiotemporal interpolation processing on the adjusted data to obtain a pre-processed data set with high-density spatiotemporal coverage; The third acquisition module is used to extract key features of sensor values, image textures and meteorological parameters from the preprocessed data set using the principal component analysis method, construct a weighted feature matrix, and obtain a fused feature set; The fourth acquisition module is used to determine whether the dimension of the fused feature set exceeds the preset threshold. If the dimension of the fused feature set exceeds the preset threshold, the random forest algorithm is used to reduce the dimension and classify the fused features. The model parameters are optimized through cross-validation to obtain the pollution concentration prediction result; The fifth acquisition module is used to analyze the spatial pattern of pollution concentration prediction results using a convolutional neural network, calculate the pollution migration path based on water flow field data, and determine the location of the pollution source through iterative optimization to obtain the pollution source tracing results; A generation module is used to determine whether the confidence level of the pollution source tracing results is higher than a preset threshold. If the confidence level of the pollution source tracing results is higher than the preset threshold, a real-time early warning model is constructed using a Bayesian network to fuse the pollution concentration prediction results with the pollution source tracing results to generate a dynamic early warning signal. The transmission module is used to input dynamic warning signals into the push algorithm and transmit warning data to the decision support system.
[0018] The beneficial effects achieved by the present invention are: The present invention provides a water quality monitoring method and system based on artificial intelligence. By acquiring multi-source data, a dynamic sampling algorithm is used to optimize data collection, and spatiotemporal interpolation and feature extraction are performed on the data to construct a fusion feature set. The random forest algorithm is used to reduce the dimension of the features and classify them to predict the pollution concentration. The convolutional neural network is combined to analyze the spatial pattern of pollution, calculate the pollution migration path, and determine the location of the pollution source. Finally, a real-time early warning model is constructed based on the Bayesian network, and a dynamic early warning signal is generated and pushed to the decision support system. The present invention realizes intelligent monitoring, precise tracing and timely early warning of water pollution, provides effective technical support for water environment protection, and has important ecological and social benefits. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] Figure 1 The figure is a flow chart of an embodiment of a water quality monitoring method based on artificial intelligence of the present invention. DETAILED DESCRIPTION
[0020] In order to better understand the above technical solution, the above technical solution will be described in detail below with reference to the accompanying drawings and specific implementation methods.
[0021] like Figure 1 As shown, the first embodiment of the present invention proposes a water quality monitoring method based on artificial intelligence, comprising the following steps: Step S100: Acquire a comprehensive data set consisting of sensor data, satellite images, and meteorological parameters.
[0022] A synthetic dataset is a standardized collection of structured data, including sensor data, satellite imagery, and meteorological parameters, typically used for analysis, modeling, or processing.
[0023] Step S200: According to the water flow velocity and pollution concentration gradient in the comprehensive data set, a dynamic sampling algorithm is used to adjust the sampling frequency and position, and the adjusted data is output.
[0024] Water flow velocity refers to the rate of water movement in a specific direction, that is, the distance the water flows per unit time.
[0025] The pollution concentration gradient refers to the rate of change of pollutant concentration in spatial distribution, which characterizes the increase and decrease amplitude and direction of pollutant concentration within unit distance.
[0026] The dynamic sampling algorithm is a sampling technology that performs real-time adjustments based on data streams or dynamic data sets. It aims to approximate global features through local data, thereby reducing resource consumption and improving efficiency in large-scale data processing.
[0027] Adjusting data means changing the distribution, quantity or structure of original data through specific technical means to adapt to model requirements or optimize system performance.
[0028] Step S300: Perform spatiotemporal interpolation processing on the adjusted data to obtain a pre-processed data set with high-density spatiotemporal coverage.
[0029] Spatiotemporal interpolation is a data reconstruction technique that combines spatial and temporal dimensions. It aims to infer values from unobserved areas or time points using data from discrete observation points in known space and time, generating continuous and spatially correlated data distributions. Its core goal is to address the uneven spatiotemporal distribution of monitoring data caused by acquisition limitations and to provide a complete dataset for subsequent analyses, such as environmental modeling and trend forecasting.
[0030] High-density spatiotemporal coverage achieves refined observation of environmental parameters (such as soil moisture, groundwater levels, and pollutant concentrations) in a targeted area, both temporally and spatially, through a dense deployment of monitoring points and high-frequency data collection. The core goal of high-density spatiotemporal coverage is to overcome the limitations of traditional monitoring's limited spatiotemporal resolution and establish a dynamic monitoring network with no blind spots and around-the-clock operation.
[0031] A preprocessed dataset is a structured data set created by systematically cleaning, transforming, and reconstructing raw data to eliminate noise, standardize its format, and adapt it to specific analytical needs. The core goal of preprocessing datasets is to improve data quality and usability, providing reliable input for subsequent modeling or mining tasks.
[0032] Step S400: extract key features of sensor values, image textures and meteorological parameters from the preprocessed data set using principal component analysis, construct a weighted feature matrix, and obtain a fusion feature set.
[0033] Principal Component Analysis (PCA) is a linear dimensionality reduction method that projects high-dimensional data into a low-dimensional space through an orthogonal transformation. Its core goal is to extract the directions of maximum variance (the principal components) in the data, preserving the essential information of the original data in its simplest form while eliminating redundancy and noise. PCA reconstructs data through eigendecomposition of the covariance matrix and is widely used in data compression, feature selection, and visualization.
[0034] A weighted feature matrix usually refers to a matrix representation method that introduces weights in feature analysis to adjust the importance of different features.
[0035] Fusing feature sets refers to the process of systematically integrating multiple feature sets or data sources through specific methods. The goal is to leverage the complementarity between different features to generate a composite feature set with enhanced representational power. This fusion overcomes the limitations of single features and enhances the model's adaptability to complex data. For example, in computer vision, multi-scale feature fusion can combine low-resolution positional information with high-resolution semantic details to form a more complete visual representation.
[0036] Step S500: Determine whether the dimension of the fused feature set exceeds a preset threshold. If the dimension of the fused feature set exceeds the preset threshold, use the random forest algorithm to reduce the dimension and classify the fused features, optimize the model parameters through cross-validation, and obtain the pollution concentration prediction result.
[0037] Random forests build an ensemble of multiple decision trees, combining the bagging (bootstrap aggregating) method with a random feature selection mechanism. The resulting results are then output through voting (for classification tasks) or averaging (for regression tasks). Its core goal is to reduce the risk of overfitting in individual decision trees and improve model generalization.
[0038] Cross-validation is a statistical technique that evaluates the predictive power of a model by splitting the dataset and performing repeated validation. The core goal of cross-validation is to fully utilize limited data, reduce performance bias caused by a single data partition (such as a training / test set split), and effectively detect overfitting and underfitting.
[0039] Pollution concentration forecasts are numerical estimates of the volumetric concentration (e.g., micrograms per cubic meter) of pollutants (such as PM2.5 and SO2) within a specific future time period and region, using mathematical models, statistical methods, or machine learning techniques, combined with meteorological conditions, pollution source emission data, and historical observations. The core goal of pollution concentration forecasts is to predict environmental quality trends in advance and provide a scientific basis for pollution prevention and control decisions.
[0040] Step S600: Use a convolutional neural network to analyze the spatial pattern of the pollution concentration prediction results, combine the water flow field data to calculate the pollution migration path, determine the location of the pollution source through iterative optimization, and obtain the pollution tracing result.
[0041] Convolutional neural networks automatically extract multi-layer features from input data through mechanisms such as local receptive fields, weight sharing, and spatial downsampling, ultimately achieving tasks such as classification, detection, or generation. Their core advantage lies in their robustness to geometric transformations such as translation, scaling, and rotation, making them particularly suitable for image processing.
[0042] Spatial patterns refer to local or global characteristic structures with specific spatial distribution patterns in data (such as images, videos, or geographic information). They are manifested as orderly arrangements of pixels, voxels, or geometric elements. In convolutional neural networks (CNNs), spatial patterns are extracted layer by layer through sliding scans of convolution kernels, forming a hierarchical representation from low-level edges to high-level semantic features.
[0043] Water flow field data refers to a multidimensional set of parameters describing the flow state of a body of water, obtained through observation or numerical simulation. Core elements include velocity, direction, flow pattern, and their spatial and temporal distribution. This data characterizes the dynamics of water movement, such as the stratification of laminar and turbulent flow or the dynamic evolution of vortex structures. It forms the scientific foundation for hydrological analysis, environmental assessment, and engineering design.
[0044] Pollution migration pathways refer to the specific channels or trajectories driven by physical, chemical, or biological processes that pollutants follow as they move through the environment. This concept encompasses the routes of pollutant migration across different media (such as the atmosphere, water, and soil), as well as the direction and extent of diffusion within the same medium. Its core focus is on how pollutants change position through the dynamic movement of environmental media, accompanied by changes in concentration distribution (such as enrichment or dilution).
[0045] Iterative optimization is a dynamic process of incremental improvement, using repeated adjustments and feedback mechanisms to gradually approach the optimal solution. Its core approach is to leverage the computational results of an initial solution to modify parameters or strategies to improve performance metrics (such as efficiency, cost, and accuracy) until pre-defined convergence conditions or constraints are met. This process is widely used in areas such as path planning, model calibration, and policy decision-making.
[0046] Pollution source tracing results refer to a collection of conclusive data, derived from systematic analysis and verification of pollutant sources, diffusion pathways, emission intensity, and impact areas through scientific methods and technical means. Its core goal is to identify responsible entities (e.g., industrial enterprises, agricultural activities, etc.) and to reveal the spatial and temporal migration patterns of pollutants (e.g., through water bodies, the atmosphere, or the food chain), thereby providing quantifiable evidence for environmental governance and judicial accountability.
[0047] Step S700: Determine whether the confidence level of the pollution source tracing result is higher than a preset threshold. If the confidence level of the pollution source tracing result is higher than the preset threshold, a Bayesian network is used to construct a real-time early warning model, and the pollution concentration prediction result and the pollution source tracing result are integrated to generate a dynamic early warning signal.
[0048] A Bayesian network is a statistical model based on probability theory and graph theory. It represents the dependencies between random variables using a directed acyclic graph (DAG) and quantifies the strength of associations between variables using a conditional probability table (CPT). Its core function is to process uncertain information through probabilistic reasoning (such as prediction, diagnosis, or causal inference). It is widely used in fields such as environmental risk assessment, pollution source identification, and complex system modeling.
[0049] A real-time early warning model is a computational framework based on dynamic data collection and real-time analysis. It aims to rapidly identify abnormal emissions or pollution spread risks by continuously monitoring environmental parameters (such as pollutant concentrations, water flow rates, and meteorological conditions) and combining them with predictive algorithms (such as AI models and diffusion simulations). It then generates graded warning signals when thresholds are triggered. Its core function is to provide decision-making support for emergency response to pollution incidents through real-time feedback and adaptive adjustments.
[0050] Dynamic early warning signals are multi-level risk alerts generated by real-time monitoring data and predictive models. Through dynamic threshold determination and spatiotemporal correlation analysis, they reflect the real-time evolution and potential severity of environmental risks (such as pollution spread, meteorological disasters, and ecological anomalies). Key features include automatic upgrade / downgrade of warning levels (e.g., transitioning from "yellow" to "red") as risks evolve, and support multimodal output (such as map heatmaps, SMS push notifications, and audio and visual alarms) to adapt to different emergency scenarios.
[0051] Step S800: Input the dynamic warning signal into the push algorithm and transmit the warning data to the decision support system.
[0052] The push algorithm is an intelligent decision-making model based on multimodal data integration and real-time analysis. It aims to dynamically collect, integrate, and analyze multi-source information such as user behavior, environmental parameters, and device status. It then combines pre-set rules or machine learning models to generate personalized instruction distribution strategies, achieving targeted, hierarchical, and precise information delivery through multiple channels (such as SMS, app push, and audio and visual signals). Its core value lies in optimizing the timeliness, accuracy, and user response efficiency of information delivery through data-driven and scenario-specific adaptation.
[0053] A Decision Support System (DSS) is an intelligent information system that integrates data analysis, model deduction, and human-computer interaction. It aims to provide dynamic risk assessment, scenario simulation, and strategy recommendations for complex decision-making scenarios by fusing multi-source data (such as historical data, real-time sensor signals, and expert knowledge bases) with probabilistic models (such as Bayesian networks) and optimization algorithms. Its core function is to enhance decision-makers' judgment in environments with incomplete information or dynamic situations through uncertainty reasoning and interpretable output.
[0054] Furthermore, in the water quality monitoring method based on artificial intelligence proposed in this embodiment, step S100 includes: Step S110, collecting multi-source data and preprocessing: obtaining environmental parameters, satellite images and meteorological parameters through sensor equipment, satellite remote sensing platforms and weather station databases, and using format conversion tools to standardize the multi-source data to obtain a standardized data set.
[0055] Collecting and preprocessing multi-source data involves acquiring environmental data from various sources and unifying their formats. For example, air quality monitoring using sensor devices can capture PM2.5 and temperature data; satellite remote sensing platforms can capture vegetation cover images of urban areas; and weather station databases can capture rainfall and wind speed data.
[0056] These data formats may vary, such as sensor data in CSV format, satellite imagery in GeoTIFF format, and meteorological data in JSON format. We use format conversion tools, such as GDAL, to process satellite imagery and convert it to a uniform grid resolution. We also use the Pandas library to convert CSV and JSON data into a unified table structure, generating standardized datasets. This preprocessing ensures data compatibility and facilitates subsequent analysis.
[0057] Step S120 , perform time and space alignment: perform time synchronization on the standardized dataset according to the timestamp. If the timestamp is missing, it is supplemented by linear interpolation. The standardized dataset is spatially aligned using the geographic coordinate matching method to obtain a time and space synchronized dataset.
[0058] In one possible implementation, performing time and space alignment requires solving the time and space inconsistency issues of multi-source data.
[0059] Time synchronization is based on timestamps. For example, sensors record data every 10 minutes, and weather stations record data every hour. If weather data for a particular point in time is missing, it can be estimated through linear interpolation, such as using rainfall from the two hours before and after to calculate the intermediate value.
[0060] Spatial alignment is based on geographic coordinates, such as aligning sensor locations with grid points of satellite images, and using the nearest neighbor matching method to unify the coordinates of different data sources into the same projection system, such as WGS84.
[0061] The time-space synchronized dataset provides a unified spatiotemporal framework for subsequent analysis and improves data consistency.
[0062] Step S130, processing data missing and anomalies: For the time-space synchronization data set, if there is any missing sensor data, it is interpolated and filled using the K-nearest neighbor algorithm. If the meteorological parameters exceed the preset threshold, it is marked as anomaly and removed to obtain a cleaned data set.
[0063] Specifically, data missing and anomalies are handled to further clean the time-space synchronized dataset.
[0064] If a sensor malfunction causes missing PM2.5 data, the K-nearest neighbor algorithm can be used to interpolate values based on values from nearby time points or sensors. For example, if a sensor is missing data at a certain moment, the data from three nearby sensors at the same time can be used to calculate a weighted average to fill in the gaps.
[0065] If a meteorological parameter is abnormal, such as a wind speed exceeding 50m / s, which is outside the physically reasonable range, it is marked as an anomaly and removed. This cleaning ensures data quality and reduces noise interference in analysis.
[0066] Step S140 , fusing data and calculating correlation: fusing the cleaned data sets by a weighted average method, and calculating the correlation of the fused data using the Pearson correlation coefficient to obtain a comprehensive data set.
[0067] Preferably, fusing data and calculating correlation is a step of integrating multi-source data and mining relationships.
[0068] The data are fused using the weighted averaging method. For example, for PM2.5 data, the sensor weight is set to 0.6 and the satellite estimation weight is set to 0.4. After fusion, a comprehensive PM2.5 distribution is generated.
[0069] The Pearson correlation coefficient was used to analyze the relationships between the fused data. For example, the correlation between PM2.5 and rainfall was calculated, and a negative correlation was found, indicating that rainfall may reduce particulate matter concentrations. This fusion and analysis reveals the interactions between environmental factors and provides data support for pollution control.
[0070] It's no surprise that the implementation of these methods has significantly improved the accuracy and reliability of environmental monitoring. For example, standardization facilitates the integration of multi-source data, spatial and temporal alignment eliminates data bias, cleaning improves data quality, and fusion and correlation analysis uncover hidden patterns. These technical results support precise environmental management, such as optimizing air quality early warning systems or guiding urban greening planning.
[0071] Preferably, in the water quality monitoring method based on artificial intelligence proposed in this embodiment, step S200 includes: Step S210: Obtain water flow rate and pollution concentration data from the comprehensive data set, calculate the pollution concentration gradient using a two-dimensional gradient operator, and obtain a concentration gradient distribution data set; wherein the gradient operator is defined as , C represents the pollution concentration, and x and y represent the spatial coordinates.
[0072] For example, when obtaining water flow rate and pollution concentration data from a comprehensive data set, relevant fields can be filtered through database query. For example, water flow rate data comes from a river sensor that records a flow rate of 0.5 m / s per second; Pollution concentration data comes from water quality monitoring stations, which record chemical oxygen demand (COD) concentrations such as 20 mg / L.
[0073] It should be noted that data extraction needs to ensure consistent timestamps, such as recording once every hour, to avoid time deviations affecting subsequent analysis.
[0074] In one possible implementation, data can be stored in a relational database. SQL queries can be used to extract flow rate and concentration fields by time and location, generating a data table containing time, coordinates, flow rate, and concentration. This extraction method facilitates rapid location of target data.
[0075] Specifically, when using a two-dimensional gradient operator to calculate the pollution concentration gradient, the gradient reflects the rate of change of concentration in space. For example, in a certain river section, the pollution concentration changes from 20 mg / L to 25 mg / L in the x-direction and from 20 mg / L to 22 mg / L in the y-direction. Using the gradient operator, we can generate a concentration gradient distribution map.
[0076] Preferably, numerical methods such as finite difference approximation can be used to calculate the gradient, generating a gradient vector field based on the gridded concentration data. This method can intuitively reflect the pollution diffusion trend and facilitate the identification of high-variability areas.
[0077] Step S220: Based on the concentration gradient distribution data set, if the concentration gradient value is greater than a preset threshold, a grid division method is used to divide the high gradient area into sampling positions, and the sampling frequency is calculated by a weighted average method to obtain a preliminarily adjusted sampling scheme.
[0078] In one embodiment, when determining a high gradient region based on a concentration gradient distribution data set, a threshold value such as 0.5 mg / L / m can be set.
[0079] Assuming an area's gradient reaches 0.7 mg / L / m, exceeding the threshold, it is then divided into a grid. For example, the area is divided into a 5×5 grid, with each grid 10 meters long. The sampling frequency is calculated using a weighted average method. Weights are based on the gradient value, such that higher-gradient grids are assigned higher weights, resulting in a sampling frequency of, for example, once every two hours per grid. This division and frequency adjustment ensures that sampling points cover areas experiencing significant pollution fluctuations.
[0080] Step S230: For the preliminarily adjusted sampling scheme, the K-means clustering algorithm is used to optimize the grouping of sampling positions, and the sampling frequency is synchronized by time stamp to obtain an optimized sampling scheme.
[0081] For example, a K-means clustering algorithm was used to optimize the grouping of sampling locations within the initially adjusted sampling plan. For example, assuming 100 sampling points, these were clustered into five groups, each representing an area with similar pollution characteristics. Clustering was based on location coordinates and gradient values. After optimization, sampling points within each group were more concentrated, reducing redundancy.
[0082] Time synchronization is based on timestamps, for example, unifying the sampling frequency to the hour, such as 8:00 and 10:00. This optimization makes the sampling solution more efficient, covering key areas while reducing costs.
[0083] Step S240: Obtain the adjusted sampling frequency and position data from the optimized sampling scheme, integrate the adjusted sampling frequency and position data using a data fusion method, and output the adjusted data.
[0084] As you can understand, after obtaining sampling frequency and location data from the optimized sampling scheme, data fusion is used to integrate them. For example, multi-source data, such as sensor concentration data and model-predicted concentration data, are fused with weights of 0.7 and 0.3, respectively, to generate a composite concentration distribution. The fused data can be output as a table containing fields for time, location, frequency, and concentration. This integration improves data consistency and facilitates subsequent pollution dynamics analysis.
[0085] Furthermore, in the water quality monitoring method based on artificial intelligence proposed in this embodiment, step S300 includes: Step S310: Obtain the sampling frequency, sampling position and timestamp from the adjustment data, sort the timestamps using a time series analysis method, and fill in the gaps in the time series using a linear interpolation method if the timestamp interval is greater than a preset threshold to obtain time-synchronized sampling data.
[0086] For example, when obtaining the sampling frequency, sampling location, and timestamp from the adjustment data, the relevant fields can be extracted through a database query. For example, the sampling frequency is recorded as once every 2 hours, the sampling location is expressed in latitude and longitude, such as (120.5, 30.2), and the timestamp is 2025-04-30 08:00:00.
[0087] It should be noted that timestamp sorting is necessary to ensure that the data is arranged in chronological order to avoid errors in subsequent analysis.
[0088] One possible implementation uses time series analysis to examine timestamp intervals. If the preset threshold is 1 hour and a timestamp interval is 2 hours, linear interpolation is used to fill in the gaps. For example, if the concentrations at 8:00 and 10:00 are 20 mg / L and 24 mg / L, respectively, the interpolated concentration at 9:00 is approximately 22 mg / L. This method ensures time series continuity and facilitates subsequent analysis.
[0089] Step S320: Based on the time-synchronized sampling data, the pollution concentration and water flow rate are obtained, and the sampling locations are mapped to a two-dimensional coordinate system using a spatial grid division method. If the pollution concentration gradient within the grid is greater than a preset threshold, spatial interpolation is performed using the Kriging interpolation method to obtain high-density spatial distribution data.
[0090] Specifically, based on the time-synchronized data, pollution concentrations and water flow rates are obtained and mapped to a two-dimensional coordinate system using a spatial gridding method. For example, the sampling area can be divided into a 10×10 grid, with each grid having a side length of 100 meters.
[0091] For example, if the pollution concentration gradient within a grid is 0.6 mg / L / m, exceeding the preset threshold of 0.5 mg / L / m, kriging interpolation is used to generate high-density distribution data. Kriging interpolation is based on spatial autocorrelation and preferentially uses concentration values at surrounding sampling points, such as 20 mg / L and 25 mg / L, to infer concentration values at unsampled points within the grid. This method improves spatial resolution and is suitable for analyzing pollution distribution trends.
[0092] Step S330: Obtain missing data points from the high-density spatial distribution data, and use data fusion methods to integrate pollution concentration and water flow rate. If the missing points are located at the spatial grid boundary, the missing points are filled by weighted averaging method to obtain a spatiotemporally continuous data set.
[0093] In one embodiment, missing data points are identified from high-density spatially distributed data, and data fusion methods are used to integrate pollution concentrations and water flow rates. For example, a missing point is located at a grid boundary, where concentration data is missing but flow rate data is 0.4 m / s. A weighted average method can be used to combine the concentration values of adjacent grids, such as 22 mg / L and 23 mg / L, with weights of 0.6 and 0.4, respectively, to fill the missing point with a concentration of 22.4 mg / L. This method ensures the spatiotemporal continuity of the dataset and is suitable for dynamic pollution analysis.
[0094] Step S340: For the spatiotemporally continuous dataset, obtain an interpolation accuracy index, and use an iterative interpolation method to adjust the interpolation parameters. If the interpolation accuracy is lower than a preset threshold, repeat the iterative adjustment to obtain a preprocessed dataset with high-density spatiotemporal coverage.
[0095] It's understandable that when obtaining interpolation accuracy metrics for spatiotemporally continuous datasets, the root mean square error (RMS) can be calculated. For example, if the interpolated concentration deviates from the actual concentration by 0.3 mg / L, which is below the preset threshold of 0.5 mg / L, it indicates high accuracy. If accuracy is insufficient, an iterative interpolation method can be used to adjust parameters, such as increasing the kriging interpolation search radius from 100 m to 150 m, and repeating the calculation until the threshold is met.
[0096] Preferably, this iterative approach improves data reliability, and the generated preprocessed dataset covers the entire spatiotemporal domain, making it suitable for dynamic pollution monitoring.
[0097] Furthermore, in the water quality monitoring method based on artificial intelligence proposed in this embodiment, step S400 includes: Step S410: Obtain sensor values, image textures, and meteorological parameters from the preprocessed data set, standardize the data dimensions using the principal component analysis method, calculate the covariance matrix, obtain eigenvalues and eigenvectors, and if the cumulative contribution rate of the eigenvalues is greater than the preset threshold, select the corresponding eigenvector to obtain the key feature set after dimensionality reduction.
[0098] For example, when obtaining sensor values, image textures, and meteorological parameters from a preprocessed dataset, relevant fields can be extracted through database queries. For example, the sensor value record is a pollution concentration of 10 mg / L, the image texture is a water surface reflectivity of 0.8, and the meteorological parameter is a wind speed of 2 m / s.
[0099] It should be noted that the data must be in a uniform format, such as standardizing all values to the same dimension to avoid deviations in subsequent analysis.
[0100] In one possible implementation, principal component analysis (PCA) is used to reduce the data's dimensionality. PCA calculates the covariance matrix to extract the principal component directions of the data. For example, the covariance matrix of sensor values, image texture, and meteorological parameters shows a high correlation between pollution concentration and wind speed, generating eigenvalues of 3.2, 1.5, and 0.8, respectively. If the preset cumulative contribution threshold is 85%, the eigenvectors corresponding to the first two eigenvalues are selected to retain the key feature set. This method effectively reduces the data's dimensionality while preserving key information.
[0101] Step S420: Based on the key feature set, obtain the variance contribution rate of each feature, calculate the weight using the entropy method, and reset the weight to zero if the weight is lower than the preset threshold. Integrate the weight and feature through matrix multiplication to obtain a weighted feature matrix.
[0102] Specifically, the variance contribution of each feature is calculated based on the key feature set, and the entropy method is used to determine the weight. For example, the variance contribution of pollution concentration is 0.6, that of image texture is 0.3, and that of wind speed is 0.1. If the preset weight threshold is 0.2, the wind speed weight is below the threshold and is set to zero. Finally, through matrix multiplication, the weights of pollution concentration and image texture (0.6 and 0.3) are multiplied by the eigenvalues to generate a weighted feature matrix. This weight distribution highlights key features and improves the targeted nature of subsequent analysis.
[0103] Step S430: Obtain feature subsets of sensor values, image textures, and meteorological parameters from the weighted feature matrix, and splice them using a data fusion method. If the dimension after splicing exceeds a preset threshold, adjust it using a linear dimensionality reduction method to obtain a preliminary fused feature set.
[0104] In one embodiment, feature subsets are extracted from the weighted feature matrix and concatenated using data fusion. For example, pollution concentration and image texture are concatenated into a feature vector with a dimension of 10. If the preset dimension threshold is 8, further compression is performed using linear dimensionality reduction methods such as principal component analysis to obtain a preliminary fused feature set. This concatenation and fusion enhances feature integrity.
[0105] Step S440: Based on the preliminary fusion feature set, obtain the correlation coefficient matrix between features, use the clustering method to group the features with correlation coefficients higher than the preset threshold, and integrate them through the weighted average method within the group to obtain the final fusion feature set.
[0106] Preferably, a correlation coefficient matrix is calculated based on the preliminary fusion feature set to analyze the correlation between features. For example, if the correlation coefficient between pollution concentration and image texture is 0.7, which is higher than the preset threshold of 0.6, clustering is required.
[0107] In one embodiment, a K-means clustering method is used to group features with high correlation coefficients. Within each group, features are then integrated using a weighted average method. For example, if the weights for pollution concentration and image texture are 0.5 and 0.5, respectively, the final fused feature value after integration is 0.75. This clustering and integration reduces redundant features and improves the representativeness of the feature set.
[0108] As you can understand, correlation coefficient analysis and clustering ensure independence between features and avoid information overlap. For example, the correlation coefficient between wind speed and pollution concentration is 0.3, which is below the threshold and is retained as an independent feature. This method generates an efficient feature set through multi-dimensional analysis, which is suitable for dynamic analysis of pollution monitoring scenarios.
[0109] Furthermore, the water quality monitoring method based on artificial intelligence proposed in this embodiment includes step S500: Step S510: obtain feature dimension data from the fused feature set, and use statistical methods to calculate the distribution characteristics of the feature dimension data. If the feature dimension exceeds a preset threshold, the feature dimension data is sorted by importance using a random forest algorithm to obtain a feature subset after dimensionality reduction.
[0110] When obtaining feature dimension data from a fused feature set, feature vectors can be extracted through database queries. For example, a fused feature set containing pollution concentration, image texture, and humidity has a dimension of 15.
[0111] It should be noted that the feature dimension data must ensure consistent format, such as normalizing all values to the range of 0 to 1 to avoid distribution bias.
[0112] In one possible implementation, statistical methods are used to calculate the distribution characteristics of feature dimension data. Specifically, the mean and standard deviation of each feature are calculated. For example, the mean of pollution concentration is 0.5 and the standard deviation is 0.2; the mean of image texture is 0.6 and the standard deviation is 0.15. This distribution characteristic analysis helps understand the range of data fluctuation.
[0113] If the feature dimension exceeds a preset threshold, such as 10, a random forest algorithm is used to rank the features by importance. For example, the random forest algorithm calculates the Gini index for each feature, with pollution concentration having an importance score of 0.4, image texture having an importance score of 0.3, and humidity having an importance score of 0.1. The top 10 features are selected to form the feature subset after dimensionality reduction.
[0114] Step S520: Based on the feature subset after dimensionality reduction, a training set and a validation set are obtained, and a cross-validation method is used to optimize the parameters of the random forest tree depth and the number of trees to obtain an optimized model parameter set.
[0115] Based on the feature subset after dimensionality reduction, obtain the training set and validation set. For example, if the feature subset contains 8 dimensions, the dataset is divided into 80% training set and 20% validation set.
[0116] Preferably, a 5-fold cross-validation method is used to optimize the tree depth and number of trees of the random forest.
[0117] In one embodiment, the test tree depth ranges from 5 to 15, and the number of trees ranges from 50 to 200, and the final optimized tree depth is 10 and the number of trees is 100. This parameter optimization ensures the generalization ability of the model.
[0118] Step S530: Obtain classification labels from the optimized model parameter set, use the random forest algorithm to perform classification training on the training set, evaluate the classification performance through the validation set, and obtain the predicted probability distribution of the classification labels.
[0119] Based on the optimized model parameter set, classification labels are obtained. For example, the classification labels are high, medium, and low pollution levels.
[0120] The random forest algorithm is used to classify the training set, and the classification performance is evaluated on the validation set to obtain the predicted probability distribution of the classification labels. For example, the probability of a sample being predicted as highly contaminated is 0.7, moderately contaminated is 0.2, and lowly contaminated is 0.1.
[0121] Step S540: According to the predicted probability distribution of the classification label, a mapping function of the pollution concentration is obtained, and the predicted probability distribution is fitted using a linear regression method to obtain a predicted result of the pollution concentration.
[0122] It is understood that the predicted probability distribution reflects the model's confidence in the pollution level.
[0123] Based on this distribution, a mapping function for pollution concentration is obtained. For example, high pollution probability is mapped to a concentration range of 8-10 mg / L, and medium pollution is mapped to a concentration range of 4-8 mg / L.
[0124] Linear regression is used to fit the predicted probability distribution to the actual concentration. For example, the linear regression fit shows that a probability of 0.7 corresponds to a concentration of 9 mg / L. This fitting method converts classification results into continuous concentration predictions, facilitating dynamic analysis of pollution monitoring.
[0125] It should be noted that the mapping function needs to be updated regularly to adapt to changes in data distribution.
[0126] In one embodiment, if the contribution of humidity features to concentration prediction is low, feature selection can be used to further streamline the model to improve prediction efficiency.
[0127] This method generates efficient prediction results through multi-dimensional analysis and is suitable for real-time applications in pollution monitoring scenarios.
[0128] Furthermore, in the water quality monitoring method based on artificial intelligence proposed in this embodiment, step S600 includes: Step S610: Acquire concentration distribution data from the pollution concentration prediction result, use a convolutional neural network to extract spatial patterns from the concentration distribution data, and obtain a spatial pattern feature set.
[0129] For example, when obtaining concentration distribution data from the pollution concentration prediction results, the monitoring area can be divided into multiple sub-areas using a gridding method, and each sub-area corresponds to a concentration value.
[0130] Assume the monitoring area is a 100-square-kilometer lake, divided into 1,000 1-square-kilometer grids, with pollution concentrations recorded in each grid. For example, the concentration in one grid might be 5 mg / L, while the concentration in the adjacent grid might be 4.8 mg / L. This gridding approach facilitates capturing spatial variations in concentration distribution, providing a data foundation for subsequent analysis.
[0131] In one possible implementation, a convolutional neural network is used to extract the spatial pattern features of the concentration distribution. The convolutional neural network identifies local correlations in the concentration distribution through multi-layer convolution operations.
[0132] Assuming the input is a 100×100 concentration grid, the network consists of three convolutional layers, each using a 3×3 convolution kernel. The first layer extracts edge features, such as concentration gradients; the second layer captures regional patterns, such as high-concentration clusters; and the third layer integrates global features to form a spatial pattern feature set. For example, the output feature set includes the geometry and diffusion trend of high-concentration areas.
[0133] Step S620: Based on the spatial pattern feature set and in combination with the water flow field data, a fluid mechanics algorithm is used to calculate the pollution migration path to obtain a pollution migration path set.
[0134] It should be noted that when calculating the pollution migration path in combination with water flow field data, the fluid mechanics algorithm can simulate the trajectory of pollutants moving with the water flow.
[0135] Flow field data includes flow velocity and flow direction. For example, the flow velocity in a certain area is 0.2 m / s and the flow direction is northeast.
[0136] Based on this, the algorithm calculates the migration path of pollutants from high-concentration grids to low-concentration grids. For example, a pollutant migrates from a grid with a concentration of 5 mg / L to a grid with a concentration of 3 mg / L. The path is 2 kilometers long and takes approximately 10,000 seconds. This path simulation reflects the dynamic propagation of pollutants.
[0137] Step S630: Determine whether the number of paths in the pollution migration path set exceeds a preset threshold. If the number of paths in the pollution migration path set exceeds the preset threshold, screen and cluster the path set through an iterative optimization algorithm to determine a candidate set of pollution source locations.
[0138] Specifically, if the number of paths in the pollution migration path set exceeds a preset threshold, such as 100, the paths are screened and clustered using an iterative optimization algorithm.
[0139] The iterative optimization algorithm sorts paths based on their length and concentration gradient, retaining those with high confidence. For example, after screening 50 paths, K-means clustering is used to classify the paths into three categories, each representing a possible pollution source area.
[0140] The clustering results show that a certain type of path is concentrated in the northwest corner of the lake, indicating the possible location of the pollution source.
[0141] Step S640: For the pollution source location candidate set, a Bayesian inference method is used to calculate the probability distribution of each candidate location to obtain the pollution source location tracing result.
[0142] In one embodiment, a Bayesian inference method calculates the probability of each candidate location for a set of pollution source locations. Assume that the candidate set contains three locations: the northwest corner, the central area, and the southeast corner. Bayesian inference combines path density and flow field data to calculate the probability of each location being a pollution source. For example, the probability of the northwest corner is 0.6, the central area is 0.3, and the southeast corner is 0.1. The northwest corner, which has the highest probability, is determined as the source tracing result. This method quantifies uncertainty through probability distribution and improves the reliability of source tracing.
[0143] Optimally, this method forms a complete pollution monitoring chain through multi-dimensional analysis, from concentration distribution to source tracing. For example, spatial pattern feature sets reveal the distribution patterns of high-concentration areas, migration pathways reflect the dynamics of pollutant transmission, and source tracing results pinpoint pollution sources. This information can provide data support for pollution control, such as prioritizing pollution sources in the northwest corner.
[0144] As you can imagine, the probability distributions generated by Bayesian inference can be regularly updated to adapt to changes in flow or concentration data. For example, if lake flow rates change due to seasonal variations, the paths and probabilities must be recalculated. This dynamic updating ensures the timeliness of traceability results, making it suitable for real-time monitoring scenarios.
[0145] Furthermore, in the water quality monitoring method based on artificial intelligence proposed in this embodiment, step S700 includes: Step S710: Acquire concentration distribution data from the pollution concentration prediction result, use Bayesian network to perform probability modeling on the concentration distribution data, calculate the dynamic probability distribution of the pollution migration path in combination with the flow field data, and obtain the pollution migration path set.
[0146] For example, when obtaining concentration distribution data from the pollution concentration prediction results, the discrete concentration values of the monitoring area can be converted into a continuous concentration distribution map through a spatial interpolation method.
[0147] Assume that the monitoring area is a 50 square kilometer river basin, and the monitoring station provides concentration data for 100 points. For example, the concentration at one point is 3.2 mg / L, and the concentration at the adjacent point is 3.0 mg / L.
[0148] The spatial interpolation method generates a 1000×1000 concentration grid through weighted averaging to capture the continuity of concentration changes and provide a data basis for Bayesian network modeling.
[0149] In one possible implementation, a Bayesian network performs probabilistic modeling on the concentration distribution data to identify conditional dependencies of the concentration distribution.
[0150] A Bayesian network divides a concentration grid into nodes, each representing the concentration value of a subregion, and edges representing the probabilistic dependencies between nodes. For example, the concentration of a particular grid is affected by neighboring grids and the flow field. The network learns from historical data and outputs a probability distribution for each grid's concentration. For example, the probability that a grid's concentration is 3.5 mg / L is 0.7. This modeling approach reflects the uncertainty of the concentration distribution.
[0151] It should be noted that when calculating the dynamic probability distribution of pollution migration paths in conjunction with flow field data, a particle tracking algorithm can be used to simulate the spread of pollutants along the water flow. Flow field data includes flow velocity and direction. For example, in a certain area, the flow velocity is 0.3 m / s and the flow direction is southeast.
[0152] The algorithm generates multiple possible migration paths and calculates the probability of each path. For example, if a pollutant migrates from a grid with a concentration of 3.5 mg / L to a grid with a concentration of 2.8 mg / L, the path probability is 0.6. This dynamic probability distribution reflects the random nature of pollutant propagation.
[0153] Step S720: If the number of paths in the contaminated migration path set exceeds a preset threshold, the contaminated migration path set is screened by a clustering algorithm, similar migration paths are merged, and a candidate position set is determined.
[0154] Specifically, if the number of paths in the pollution migration path set exceeds a preset threshold, such as 200, the DBSCAN (Density-Based Spatial Clustering of Applications with Noise) clustering algorithm is used to screen and merge similar paths.
[0155] DBSCAN clusters paths based on their start and end points, as well as their length, merging spatially adjacent paths. For example, after clustering, 100 paths are retained, generating three candidate location sets: upstream, midstream, and downstream of a river. This screening method reduces redundant paths and improves the efficiency of subsequent analysis.
[0156] Step S730: For the candidate location set, the Bayesian reasoning method is used to calculate the confidence of each candidate location, and the confidence distribution is generated in combination with the tracing results to obtain the probability distribution of the pollution source location.
[0157] In one embodiment, for a set of candidate locations, a Bayesian inference method calculates the confidence score of each candidate location.
[0158] Assuming candidate locations are upstream, midstream, and downstream, Bayesian inference combines path probabilities with flow field data to calculate a confidence distribution. For example, the confidence level for an upstream location is 0.65, for a midstream location is 0.25, and for a downstream location is 0.1. The confidence distribution quantifies the likelihood that each location is a pollution source.
[0159] Step S740: Based on the probability distribution, a dynamic signal generation algorithm is used to fuse the probability distribution and the concentration prediction result to generate a dynamic signal for real-time warning.
[0160] Preferably, a dynamic signal generation algorithm is used to fuse probability distributions with concentration predictions to generate a dynamic, real-time warning signal. This algorithm combines the confidence distribution with real-time concentration data through weighted fusion to generate a warning signal. For example, if the confidence level at an upstream location is 0.65 and the concentration is abnormally elevated, the algorithm generates a high-priority warning signal, indicating that the pollution source may be located upstream. This dynamic signal supports real-time monitoring and rapid response.
[0161] As you can understand, the dynamic signal generation algorithm can periodically update the warning signal based on changes in the flow field. For example, if river flow velocity increases due to rainfall, the algorithm recalculates the path probability and confidence level and updates the warning signal. This dynamic update mechanism ensures timely warnings and is suitable for complex water monitoring scenarios.
[0162] Furthermore, in the water quality monitoring method based on artificial intelligence proposed in this embodiment, step S800 includes: Step S810: Acquire signal feature data from the dynamic warning signal, prioritize the signal feature data using a classification algorithm, generate a priority queue based on preset push rules, and obtain a push priority sequence.
[0163] For example, when acquiring signal feature data from dynamic warning signals, key signal attributes can be identified through feature extraction methods. For example, in a river pollution monitoring scenario, a dynamic warning signal may include features such as the concentration anomaly amplitude, occurrence time, and geographic location.
[0164] Consider a signal showing a sudden increase in concentration from 2.5 mg / L to 4.0 mg / L in a certain area, lasting two hours and located in the middle reaches of a river. Feature extraction methods quantify these attributes into feature vectors. This feature extraction method provides standardized input for subsequent classification, ensuring comprehensive signal characteristics.
[0165] In one possible implementation, a decision tree algorithm can be used to prioritize signal feature data using a classification algorithm. The decision tree determines the urgency of the signal based on the feature vector. For example, a signal with a concentration change greater than 1.0 mg / L and a duration exceeding one hour is marked as high priority.
[0166] Assume that a signal's feature vector is . The decision tree uses rules to determine that it is high priority, while another signal is marked as low priority. Combined with pre-set push rules, such as high-priority signals must be pushed immediately, and low-priority signals are pushed hourly, a priority queue is generated. This approach ensures that urgent signals are handled first.
[0167] Step S820: According to the push priority sequence, a data encapsulation method is used to convert the dynamic warning signal into standardized warning data, and a formatted data packet is generated in combination with a preset data format specification to determine the content of the transmitted data.
[0168] It should be noted that after generating the push priority sequence, when using data encapsulation methods to convert dynamic warning signals into standardized warning data, JSON format can be used for encapsulation. For example, high-priority signals are encapsulated as JSON objects containing fields such as timestamp, location, and concentration change, such as {"timestamp":"2025-04-3010:00","location":"midstream","concentration_change":1.5}. Combined with preset data format specifications, such as a field length limit of 32 bytes, a formatted data packet is generated. This encapsulation method facilitates system parsing and transmission.
[0169] Step S830: Segment the formatted data packet using the transmission protocol, generate a check code in combination with the check algorithm during the segmentation, and obtain a transmission data unit with check.
[0170] Specifically, the TCP protocol combined with a fragmentation algorithm can be used to fragment formatted data packets. If a 2KB packet exceeds the 1KB upper limit for a single transmission, it is split into two 1KB fragments. A checksum is added to each fragment, such as a 32-bit checksum generated using the CRC32 algorithm. For example, the checksum for a fragment might be 0xA1B2C3D4, ensuring error detection during transmission. This approach improves transmission reliability.
[0171] Step S840: Send the transmission data unit to the decision support system through the data transmission channel, reorganize and verify the received transmission data unit using an asynchronous processing method, determine the data integrity and generate a confirmation signal.
[0172] In one embodiment, the MQTT protocol can be used to transmit data units to the decision support system via a data transmission channel. MQTT supports a lightweight publish / subscribe model, making it suitable for real-time monitoring. For example, a data unit can be published to the topic "pollution_alert," and the decision support system can subscribe to this topic to receive data.
[0173] When asynchronous processing reassembles received data units, it first sorts them by fragment sequence number and then verifies integrity using a checksum. If the checksum fails, the system requests a retransmission. This asynchronous processing method reduces congestion and improves efficiency.
[0174] Preferably, the integrity of the reassembled data is determined by comparing the hash value of the received data packet. For example, the sender generates the data packet hash value 0xF1E2D3C4, and the receiver calculates and compares the hash value. If the hash value matches, a confirmation signal is generated. This mechanism ensures lossless data transmission and provides a reliable basis for decision support systems.
[0175] As you can understand, once a confirmation signal is generated, the decision support system can trigger a response mechanism based on the warning data. For example, a high-priority signal triggers immediate investigation of the pollution source, while a low-priority signal triggers logging. This hierarchical response mechanism optimizes resource allocation and improves monitoring efficiency.
[0176] The present invention relates to an artificial intelligence-based water quality monitoring system, which is used to implement the above-mentioned artificial intelligence-based water quality monitoring method. The artificial intelligence-based water quality monitoring system includes a first acquisition module, an adjustment module, a second acquisition module, a third acquisition module, a fourth acquisition module, a fifth acquisition module, a generation module and a transmission module, wherein the first acquisition module is used to acquire a comprehensive data set consisting of sensor data, satellite images and meteorological parameters; the adjustment module is used to adjust the sampling frequency and position using a dynamic sampling algorithm according to the water flow rate and pollution concentration gradient in the comprehensive data set, and output the adjusted data; the second acquisition module is used to perform spatiotemporal interpolation processing on the adjusted data to obtain a preprocessed data set with high-density spatiotemporal coverage; the third acquisition module is used to extract key features of sensor values, image textures and meteorological parameters from the preprocessed data set using a principal component analysis method, and construct a weighted feature matrix , and obtain a fusion feature set; the fourth acquisition module is used to determine whether the dimension of the fusion feature set exceeds the preset threshold. If the dimension of the fusion feature set exceeds the preset threshold, the random forest algorithm is used to reduce the dimension and classify the fusion features, and the model parameters are optimized through cross-validation to obtain the pollution concentration prediction result; the fifth acquisition module is used to use a convolutional neural network to analyze the spatial pattern of the pollution concentration prediction result, combine the water flow field data to calculate the pollution migration path, determine the location of the pollution source through iterative optimization, and obtain the pollution tracing result; the generation module is used to determine whether the confidence of the pollution tracing result is higher than the preset threshold. If the confidence of the pollution tracing result is higher than the preset threshold, the Bayesian network is used to construct a real-time early warning model, and the pollution concentration prediction result and the pollution tracing result are integrated to generate a dynamic early warning signal; the transmission module is used to input the dynamic early warning signal into the push algorithm and transmit the early warning data to the decision support system.
[0177] Compared with the existing technology, the artificial intelligence-based water quality monitoring method and system provided in this embodiment obtains multi-source data, adopts a dynamic sampling algorithm to optimize data collection, performs spatiotemporal interpolation and feature extraction on the data, and constructs a fusion feature set. The random forest algorithm is used to reduce the dimension of the features and classify them to predict the pollution concentration. The convolutional neural network is combined to analyze the spatial pattern of pollution, calculate the pollution migration path, and determine the location of the pollution source. Finally, a real-time early warning model is constructed based on the Bayesian network, and a dynamic early warning signal is generated and pushed to the decision support system. This embodiment realizes intelligent monitoring, precise tracing and timely early warning of water pollution, provides effective technical support for water environment protection, and has important ecological and social benefits.
[0178] Although preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they are aware of the basic inventive concepts. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the invention. Obviously, those skilled in the art may make various changes and modifications to the present invention without departing from the spirit and scope of the invention. Thus, the present invention is intended to include such changes and modifications as fall within the scope of the claims and their equivalents.
Claims
1. A water quality monitoring method based on artificial intelligence, characterized in that: The following steps are involved: Access to comprehensive datasets consisting of sensor data, satellite imagery, and meteorological parameters; According to the water flow velocity and pollution concentration gradient in the comprehensive data set, a dynamic sampling algorithm is used to adjust the sampling frequency and position, and the adjusted data is output; Performing spatiotemporal interpolation processing on the adjusted data to obtain a preprocessed data set with high-density spatiotemporal coverage; The principal component analysis method is used to extract key features of sensor values, image textures and meteorological parameters from the preprocessed data set, and a weighted feature matrix is constructed to obtain a fusion feature set; Determine whether the dimension of the fused feature set exceeds a preset threshold. If the dimension of the fused feature set exceeds the preset threshold, use a random forest algorithm to reduce the dimension and classify the fused features, optimize the model parameters through cross-validation, and obtain a pollution concentration prediction result. A convolutional neural network is used to analyze the spatial pattern of the pollution concentration prediction results, and the pollution migration path is calculated in combination with water flow field data. The location of the pollution source is determined through iterative optimization to obtain the pollution source tracing results; Determine whether the confidence level of the pollution source tracing result is higher than a preset threshold. If the confidence level of the pollution source tracing result is higher than the preset threshold, use a Bayesian network to build a real-time early warning model, and fuse the pollution concentration prediction result with the pollution source tracing result to generate a dynamic early warning signal. The dynamic warning signal is input into a push algorithm to transmit warning data to a decision support system.
2. The water quality monitoring method based on artificial intelligence according to claim 1, characterized in that: The step of obtaining a comprehensive data set consisting of sensor data, satellite images and meteorological parameters includes: Collect and preprocess multi-source data: Obtain environmental parameters, satellite images, and meteorological parameters through sensor equipment, satellite remote sensing platforms, and weather station databases, and standardize the multi-source data using format conversion tools to obtain a standardized data set; Performing time and space alignment: Time synchronization of the standardized dataset is performed according to the timestamp. If the timestamp is missing, it is supplemented by linear interpolation. The standardized dataset is spatially aligned using the geographic coordinate matching method to obtain a time and space synchronized dataset; Processing missing and anomalies of data: For the time-space synchronized dataset, if there is any missing sensor data, it is interpolated and filled using the K-nearest neighbor algorithm. If the meteorological parameters exceed the preset threshold, it is marked as an anomaly and removed to obtain a cleaned dataset. Fusing data and calculating correlation: fusing the cleaned data sets by a weighted average method, calculating the correlation of the fused data using the Pearson correlation coefficient, and obtaining a comprehensive data set.
3. The water quality monitoring method based on artificial intelligence according to claim 1, characterized in that: According to the water flow velocity and pollution concentration gradient in the comprehensive data set, a dynamic sampling algorithm is used to adjust the sampling frequency and position, and the steps of outputting the adjusted data include: The water flow rate and pollution concentration data are obtained from the comprehensive data set, and the pollution concentration gradient is calculated using a two-dimensional gradient operator to obtain a concentration gradient distribution data set; wherein the gradient operator is defined as , C represents the pollution concentration, x and y represent the spatial coordinates; According to the concentration gradient distribution data set, if the concentration gradient value is greater than a preset threshold, the high gradient area is divided into sampling positions using a grid division method, and the sampling frequency is calculated using a weighted average method to obtain a preliminarily adjusted sampling plan; For the sampling scheme that was initially adjusted, the K-means clustering algorithm was used to group and optimize the sampling positions, and the sampling frequencies were synchronized by timestamps to obtain an optimized sampling scheme. The adjusted sampling frequency and position data are obtained from the optimized sampling scheme, and the adjusted sampling frequency and position data are integrated using a data fusion method to output the adjusted data.
4. The water quality monitoring method based on artificial intelligence according to claim 1, characterized in that: The step of performing spatiotemporal interpolation processing on the adjusted data to obtain a pre-processed data set with high-density spatiotemporal coverage includes: Obtaining the sampling frequency, sampling position, and timestamp from the adjustment data, sorting the timestamps using a time series analysis method, and filling the gaps in the time series using a linear interpolation method if the timestamp interval is greater than a preset threshold, thereby obtaining time-synchronized sampling data; Based on the time-synchronized sampling data, the pollution concentration and water flow velocity are obtained. The sampling locations are mapped to a two-dimensional coordinate system using a spatial grid division method. If the pollution concentration gradient within the grid is greater than a preset threshold, spatial interpolation is performed using the Kriging interpolation method to obtain high-density spatial distribution data. Obtaining missing data points from the high-density spatial distribution data, integrating pollution concentration and water flow rate using a data fusion method, and filling in missing points if they are located at the boundaries of the spatial grid using a weighted average method to obtain a spatiotemporally continuous data set; For the spatiotemporally continuous dataset, the interpolation accuracy index is obtained, and the interpolation parameters are adjusted using the iterative interpolation method. If the interpolation accuracy is lower than the preset threshold, the iterative adjustment is repeated to obtain a preprocessed dataset with high-density spatiotemporal coverage.
5. The water quality monitoring method based on artificial intelligence according to claim 1, characterized in that: The steps of extracting key features of sensor values, image textures, and meteorological parameters from the preprocessed data set using the principal component analysis method, constructing a weighted feature matrix, and obtaining a fused feature set include: Obtain sensor values, image textures, and meteorological parameters from the preprocessed data set, standardize the data dimensions using principal component analysis, calculate the covariance matrix, obtain eigenvalues and eigenvectors, and select the corresponding eigenvector if the cumulative contribution rate of the eigenvalue is greater than a preset threshold to obtain a key feature set after dimensionality reduction; According to the key feature set, the variance contribution rate of each feature is obtained, and the weight is calculated using the entropy method. If the weight is lower than the preset threshold, the weight is reset to zero, and the weight and feature are integrated through matrix multiplication to obtain a weighted feature matrix; Obtaining feature subsets of sensor values, image textures, and meteorological parameters from the weighted feature matrix, and splicing them using a data fusion method. If the dimension after splicing exceeds a preset threshold, adjusting it using a linear dimensionality reduction method to obtain a preliminary fused feature set; According to the preliminary fusion feature set, a correlation coefficient matrix between features is obtained, a clustering method is used to group features with correlation coefficients higher than a preset threshold, and the features are integrated through a weighted average method within the group to obtain a final fusion feature set.
6. The water quality monitoring method based on artificial intelligence according to claim 1, characterized in that: The steps of determining whether the dimension of the fused feature set exceeds a preset threshold, and if so, using a random forest algorithm to reduce the dimension and classify the fused features, optimizing model parameters through cross-validation, and obtaining a pollution concentration prediction result include: Obtain feature dimension data from the fused feature set, calculate the distribution characteristics of the feature dimension data using statistical methods, and if the feature dimension exceeds a preset threshold, sort the feature dimension data by importance using a random forest algorithm to obtain a feature subset after dimensionality reduction; According to the feature subset after dimensionality reduction, a training set and a validation set are obtained, and a cross-validation method is used to optimize the parameters of the tree depth and the number of trees of the random forest to obtain an optimized model parameter set; Obtaining classification labels from the optimized model parameter set, performing classification training on the training set using a random forest algorithm, evaluating classification performance using the validation set, and obtaining a predicted probability distribution of the classification labels; According to the predicted probability distribution of the classification label, a mapping function of the pollution concentration is obtained, and the predicted probability distribution is fitted using a linear regression method to obtain a predicted result of the pollution concentration.
7. The water quality monitoring method based on artificial intelligence according to claim 1, characterized in that: The steps of using a convolutional neural network to analyze the spatial pattern of the pollution concentration prediction result, combining water flow field data to calculate the pollution migration path, and determining the location of the pollution source through iterative optimization to obtain the pollution source tracing result include: Acquiring concentration distribution data from the pollution concentration prediction results, and performing spatial pattern extraction on the concentration distribution data using a convolutional neural network to obtain a spatial pattern feature set; According to the spatial pattern feature set, combined with water flow field data, a fluid mechanics algorithm is used to calculate the pollution migration path to obtain a pollution migration path set; Determining whether the number of paths in the pollution migration path set exceeds a preset threshold; if the number of paths in the pollution migration path set exceeds the preset threshold, screening and clustering the path set using an iterative optimization algorithm to determine a candidate set of pollution source locations; For the candidate set of pollution source locations, the Bayesian reasoning method is used to calculate the probability distribution of each candidate location to obtain the tracing result of the pollution source location.
8. The water quality monitoring method based on artificial intelligence according to claim 1, characterized in that: Determining whether the confidence level of the pollution source tracing result is higher than a preset threshold; if the confidence level of the pollution source tracing result is higher than the preset threshold, constructing a real-time early warning model using a Bayesian network, and fusing the pollution concentration prediction result with the pollution source tracing result to generate a dynamic early warning signal includes the following steps: Acquiring concentration distribution data from the pollution concentration prediction results, performing probability modeling on the concentration distribution data using a Bayesian network, and calculating the dynamic probability distribution of pollution migration paths in combination with flow field data to obtain a pollution migration path set; If the number of paths in the pollution migration path set exceeds a preset threshold, the pollution migration path set is screened by a clustering algorithm, similar migration paths are merged, and a candidate location set is determined; For the candidate location set, the Bayesian inference method is used to calculate the confidence of each candidate location, and the confidence distribution is generated in combination with the tracing results to obtain the probability distribution of the pollution source location; According to the probability distribution, a dynamic signal generation algorithm is adopted to fuse the probability distribution with the concentration prediction result to generate a dynamic signal for real-time warning.
9. The water quality monitoring method based on artificial intelligence according to claim 1, characterized in that: The steps of inputting the dynamic warning signal into a push algorithm and transmitting the warning data to a decision support system include: Acquire signal feature data from dynamic warning signals, prioritize the signal feature data using a classification algorithm, generate a priority queue based on preset push rules, and obtain a push priority sequence; According to the push priority sequence, the dynamic warning signal is converted into standardized warning data using a data encapsulation method, and a formatted data packet is generated in combination with a preset data format specification to determine the content of the transmitted data; For the formatted data packet, the formatted data packet is fragmented using a transmission protocol, and a verification code is generated in combination with a verification algorithm during the fragmentation to obtain a transmission data unit with verification; The transmission data unit is sent to a decision support system through a data transmission channel, and an asynchronous processing method is used to reorganize and verify the received transmission data unit, determine the data integrity and generate a confirmation signal.
10. An artificial intelligence-based water quality monitoring system, used to implement the artificial intelligence-based water quality monitoring method according to any one of claims 1 to 9, characterized in that: The artificial intelligence-based water quality monitoring system includes: A first acquisition module is used to acquire a comprehensive data set consisting of sensor data, satellite images and meteorological parameters; an adjustment module for adjusting the sampling frequency and position using a dynamic sampling algorithm according to the water flow velocity and pollution concentration gradient in the comprehensive data set, and outputting the adjusted data; A second acquisition module is used to perform spatiotemporal interpolation processing on the adjusted data to obtain a pre-processed data set with high-density spatiotemporal coverage; A third acquisition module is used to extract key features of sensor values, image textures and meteorological parameters from the preprocessed data set using a principal component analysis method, construct a weighted feature matrix, and obtain a fused feature set; The fourth acquisition module is used to determine whether the dimension of the fused feature set exceeds a preset threshold. If the dimension of the fused feature set exceeds the preset threshold, a random forest algorithm is used to reduce the dimension and classify the fused features, and the model parameters are optimized through cross-validation to obtain the pollution concentration prediction result; A fifth acquisition module is used to analyze the spatial pattern of the pollution concentration prediction results using a convolutional neural network, calculate the pollution migration path based on water flow field data, determine the location of the pollution source through iterative optimization, and obtain the pollution source tracing results; A generation module is used to determine whether the confidence level of the pollution source tracing result is higher than a preset threshold. If the confidence level of the pollution source tracing result is higher than the preset threshold, a real-time early warning model is constructed using a Bayesian network to fuse the pollution concentration prediction result with the pollution source tracing result to generate a dynamic early warning signal; The transmission module is used to input the dynamic warning signal into the push algorithm and transmit the warning data to the decision support system.
Citation Information
Patent Citations
Marine pollution tracing and monitoring method based on satellite remote sensing and unmanned aerial vehicle
CN119313532A
Efficient and accurate pollution source monitoring quality control system and method
CN119443922A
Method and system for evaluating water quality of rain source type river
CN119667103A
Fusion traceability algorithm based on water environment multi-source monitoring data
CN120067994A
Underground water pollution source traceability identification method and system
CN120105789A
Cited By
Intelligent conductivity pollution diagnosis method based on multi-modal feature fusion and adaptive density clustering
CN120763767A
Water body pollution tracing method and system based on multi-source heterogeneous data analysis
CN121141986A
Water conservancy project water quality detection method and system based on artificial intelligence
CN121191645A
Method for flattening and fixing pressurizing frame type water sample plate with pressing rib and related device
CN121453692A
Ultra-deep underground space remote monitoring method and system based on multi-source data fusion
CN121524916A