Intelligent environment monitoring system for water quality sampling
The intelligent environmental monitoring system combines autoencoders and adversarial generative network technology to solve the problems of poor timeliness and insufficient data accuracy of traditional water quality monitoring methods, achieve efficient expansion and optimization of water quality parameter data, and provide fast and accurate reflection of water quality changes and Pollution source identification improves the ecological environment management level of urban rivers.
Patent Information
- Application Number
- CN202411146803.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-21
- Publication Date
- 2024-09-17
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Traditional water quality monitoring methods rely on manual sampling and laboratory analysis, which have poor timeliness and cannot reflect water quality changes in real time. Data accuracy and completeness are insufficient, making it difficult to comprehensively cover the entire water body. They are also costly, time-consuming and labor-intensive, and cannot provide a scientific data basis. Insufficient data are provided on the operation and regulation of urban river pollution prevention equipment.
Adopt an intelligent environmental monitoring system, combined with autoencoder and adversarial generative network technology, to expand and optimize water quality parameter data, capture complex nonlinear characteristics, improve data diversity and quality, and achieve rapid and accurate performance through data processing, feature extraction, analysis and prediction. Reflection of water quality changes and identification of pollution sources.
Significantly improve the efficiency of data collection and processing, reduce costs, improve data accuracy and completeness, provide scientific data support, promote ecological sustainable development, improve residents' quality of life, and ensure the timeliness and comprehensiveness of water quality monitoring coverage, enhancing the effectiveness and scientific nature of environmental protection.
Smart Images

Figure CN118656584A
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of water quality monitoring, and more specifically, to an intelligent environment monitoring system for water quality sampling. Background Art
[0002] Urban rivers are usually affected by various pollution sources such as domestic sewage, industrial wastewater, and agricultural runoff, and the water quality is complex and changeable. Due to the influence of multiple factors such as upstream water volume and rainfall, the water quality of urban rivers has relatively large changes in time and space. As an important part of the urban ecosystem, its water quality directly affects the living environment and ecological health of urban residents, and is directly related to the sustainable development of the city and the quality of life of residents. With the continuous improvement of environmental protection awareness, water quality monitoring, as an important part of environmental protection, has received widespread attention. It provides key data for evaluating the health of water bodies, can help identify pollution sources, and formulate environmental protection policies and measures. Traditional water quality monitoring The method relies on manual sampling and laboratory analysis, which takes hours or even days to produce results. It cannot reflect water quality changes in real time and has poor timeliness. The number and distribution of manual sampling points are limited, making it difficult to fully cover the entire water body. The data accuracy and integrity are insufficient, and professional personnel are required for sampling and analysis, which is costly, time-consuming and labor-intensive. Key pollution events or water quality changes are highly random and uneven in time and space, resulting in an insufficient number of samples included in the monitoring data. In terms of high-dimensional data processing and analysis, traditional methods are difficult to effectively expand and extract features in high-dimensional space, and cannot provide a scientific data basis for the operation and regulation of urban river pollution prevention and control equipment. Summary of the invention
[0003] In order to overcome the above-mentioned defects of the prior art, the present invention provides an intelligent environmental monitoring system for water quality sampling, which effectively expands and optimizes water quality parameter data, captures complex nonlinear characteristics, and improves data diversity and quality through autoencoders and adversarial generative network technology. Compared with traditional methods, the efficiency of data acquisition and processing is significantly improved, costs are reduced, and data accuracy and integrity are enhanced. Through comprehensive analysis, spatiotemporal distribution analysis, parameter correlation analysis, water quality trend prediction and pollution source identification, the system quickly and accurately reflects water quality changes, provides a scientific basis, promotes ecological sustainable development, improves the quality of life of residents, and provides a scientific data basis for the operation of pollution prevention and control equipment.
[0004] To achieve the above object, the present invention provides the following technical solutions: An intelligent environmental monitoring system for water quality sampling includes a data acquisition module, a data processing module, a feature extraction module, a key indicator amplification module, a data analysis module and a display warning module. The data processing module cleans the water quality data collected by the data acquisition module, calculates the total change of pH, dissolved oxygen, turbidity, temperature and conductivity within a preset observation time window, determines the maximum and minimum values of each water quality data within the observation time window, counts the number of times each water quality data appears within different amplitude ranges, forms a distribution function of each data, and forms a water quality time series data stream with the processed data, manually marks the data to be amplified in the water quality time series data stream, and then transmits the water quality time series data stream to the feature extraction module. The feature extraction module receives the pre-processed water quality time series data stream , based on the encoder in the autoencoder, the input data is compressed into a low-dimensional latent feature space, and then the decoder is used to reconstruct the low-dimensional feature representation of the latent feature space back to the original data dimension. By training the autoencoder, the latent features of the water quality time series data stream are extracted. The key indicator amplification module is iteratively trained through an adversarial mechanism to expand the corresponding parameters in the water quality data stream manually marked by the encoder part in the feature extraction module. The data analysis module receives the latent feature representation and performs data standardization. Then, the standardized parameters are subjected to comprehensive water quality analysis, spatiotemporal distribution analysis, parameter correlation analysis, water quality change trend prediction and pollution source identification analysis, and automatically generate analysis data charts, time series charts, spatial distribution charts and water quality parameter correlation charts. The display warning module is used to display the data generated by the data analysis module.
[0005] As a further solution of the present invention, the data acquisition module includes a pH sensor, a dissolved oxygen sensor, a turbidity sensor, a temperature sensor, a conductivity sensor, a local storage module, a wireless communication module and a cloud platform. The pH sensor, the dissolved oxygen sensor, the turbidity sensor, the temperature sensor and the conductivity sensor collect the pH, dissolved oxygen, turbidity, temperature and conductivity of the deployment points in the urban river in real time within a preset time interval, and store the real-time data in the local storage module. At the same time, the data is transmitted to the cloud platform for cloud backup through the wireless communication module, and the data is transmitted to the data processing module for data processing.
[0006] As a further solution of the present invention, the data processing module uses a box plot method to detect outliers in water quality data. For outliers, the interpolation method is used to interpolate, and the sum of water quality parameters in all data points in a preset time window is calculated. The maximum and minimum values of each water quality parameter in the time window are counted, and the values of each water quality parameter are divided into several amplitude ranges. The number of occurrences of each water quality parameter data point in each range is counted, and the ratio of the number of occurrences of each water quality parameter data point in each amplitude range to the total number of data points is used as the distribution function value of the amplitude range to form a distribution function of each water quality parameter data. The obtained total change sum, maximum value, minimum value and distribution function of the water quality data are combined to form a water quality time series data stream, and the data that needs to be amplified in the time series data stream is manually marked. The standard for manual marking is that the scale of the corresponding water quality parameter in the water quality time series data stream is smaller than the preset scale, and then the processed water quality data stream is transmitted to the feature extraction module.
[0007] As a further solution of the present invention, the feature extraction module includes an encoder network and a decoder network, and the encoder network and the decoder network both include an input layer, a hidden layer 1, a hidden layer 2, a hidden layer 3, a potential feature layer and an output layer.
[0008] At the input layer of the encoder, we accept Time series data , represents a matrix, where is the length of the time window, is the feature dimension for each time point.
[0009] As a further solution of the present invention, in the encoder network of the feature extraction module, the activation function of the hidden layer 1 is: ; Where: is the output of hidden layer 1, is the weight matrix of hidden layer 1, is the input vector of the input layer, is the bias vector of hidden layer 1, , , ; At this layer, using The input data are linearly combined and offset to retain the linear characteristics of the original water quality parameters, effectively capture the water quality parameters that are linearly related in the original feature space, and then use The input data is smoothly compressed to between (0,1). The extreme values in the data can be compressed to reduce their impact on subsequent layers. The combination of the two can capture both linear and nonlinear relationships in the data at this layer, which helps to process those parts of the data that show linear trends and subtle linear changes. It can amplify small changes and compress large changes, and is suitable for capturing subtle changes and trends in water quality parameters.
[0010] The activation function of hidden layer 2 is: ; Where: is the output of hidden layer 2, is the weight matrix of hidden layer 2, is the bias matrix of hidden layer 2, , , ; The output of the previous layer is further linearly combined and offset to enhance the capture of the linear relationship of water quality parameters. The function can compress data in both directions, handling both positive and negative values, and The symmetry of the function makes it very effective in capturing symmetry and bidirectional variations in the data. It can smoothly capture nonlinear changes in water quality parameter data, avoid the problem of "dead zone", and adapt to the dynamic changes of water quality parameters under different times and conditions.
[0011] The activation function of hidden layer 3 is: ; Where: is the output of hidden layer 3, is the weight matrix of hidden layer 3, is the bias matrix of hidden layer 3, , , ; Some of them can continue to perform linear transformation to further extract the linear relationship in the water quality parameter data. It avoids the "dead zone" problem of zero output in the negative area, ensures the gradient flow in the negative area, can smoothly capture the non-negative characteristics of water quality parameters, and is suitable for processing essentially positive water quality parameters (turbidity and conductivity).
[0012] The nonlinear mapping function of the potential feature layer is: ; Where: is the potential feature representation of the water quality time series data stream, is the weight matrix of the potential feature layer, is the bias matrix of the latent feature layer, , , .
[0013] The linear transformation of the latent feature layer compresses high-dimensional features into a low-dimensional latent space, extracts the main features in the data, and maintains the linear properties of the latent feature space, which facilitates subsequent decoding and reconstruction. Through compression and offset, the latent feature layer can effectively remove redundant information in the input data and retain only the most important feature information in the water quality parameters.
[0014] As a further solution of the present invention, in the decoder network of the feature extraction module, the activation function of the hidden layer 1 is: ; Where: is the output of hidden layer 1, is the weight matrix of hidden layer 1, is the bias vector of hidden layer 1, , , ; The output range of this function is The exponential decay characteristic can smooth the potential features of the encoder, making the output data gradually decrease, which is convenient for processing features that gradually decrease over time. It is suitable for processing non-negative water quality parameters such as conductivity and turbidity. The trend of water quality parameters gradually decaying under certain conditions (dissolved oxygen, turbidity), this exponential decay function can capture this natural change trend, which helps to reduce the impact of noise and make the reconstructed data smoother and more natural.
[0015] The activation function of hidden layer 2 is: ; Where: is the output of hidden layer 2, is the weight matrix of hidden layer 2, is the bias matrix of hidden layer 2, , , ; The sine function is a periodic function that can capture and process periodic changes in water quality parameters (temperature). The temperature varies periodically between day and night and between seasons. The sine function can well capture and describe such oscillations and fluctuations, allowing the reconstructed data to reflect these natural phenomena.
[0016] The activation function of hidden layer 3 is: ; Where: is the output of hidden layer 3, is the weight matrix of hidden layer 3, is the bias matrix of hidden layer 3, , , ; It is a smooth mathematical function that can handle non-negative data and avoid the problem of gradient vanishing. It not only retains the nonlinear characteristics, but also avoids the "dead zone" problem through smoothing. It can handle and capture the non-negative values of conductivity and turbidity well, ensuring that the gradient will not disappear during the training process, thereby enhancing the stability of the model and the training effect.
[0017] The nonlinear mapping function of the potential feature layer is: ; Where: is the reconstructed water quality time series data stream, is the weight matrix of the potential feature layer, is the bias matrix of the latent feature layer, , .
[0018] The linear transformation of the output layer maps the output of the upper layer back to the original data space, which can effectively reconstruct the original data and ensure that the potential features can be correctly decoded and restored.
[0019] As a further solution of the present invention, in the data analysis module, the weighted sum of the standardized water quality parameters is used as the output result of the comprehensive water quality analysis, the potential characteristic representation of each water quality parameter is standardized, the statistics of each water quality parameter in each time window are calculated, the monitored urban river area is divided into several grids, each grid is a spatial unit, the statistics of each water quality parameter in each network are obtained, the time distribution and spatial distribution data are fused into spatiotemporal data to form a spatiotemporal data set, and the statistics of each spatiotemporal unit are obtained as the result of the spatiotemporal distribution analysis.
[0020] As a further solution of the present invention, the key indicator expansion module includes a generator network and a discriminator network, which obtains the manually marked water quality parameters from all water quality parameters and performs normalization operations. The encoder network in the feature extraction module is used as the generator network of the adversarial generation network, and random noise data within the same data range as the manually marked water quality parameters is added and imported into the generator network to obtain the potential feature distribution of this set of data, obtain the reconstructed data of this set of data, and map it to the same position. A discriminator network is added to the potential feature layer of the encoder network to punish the reconstructed data whose potential feature space position distribution deviation exceeds a set threshold. The generator network and the discriminator network are combined to construct an adversarial generation network. Through adversarial training of the generator network and the discriminator network, the generator network is continuously optimized to generate high-quality expanded water quality parameters. When the scale of the generated water quality parameters reaches a preset scale, the iteration is stopped, and the potential feature representation of the expanded water quality parameters is output and used as the input of the decoder network of the feature extraction module.
[0021] New water quality parameter data is generated through the generator network, which increases the diversity and scale of the data set and helps to improve the generalization ability of the model. The discriminator network in the adversarial training process continuously evaluates and optimizes the generator network, making the generated data closer to the real data and improving the data quality. The encoder network obtains the potential feature distribution of the data and generates new feature data through the generator network, which can capture the complex nonlinear relationships and dynamic changes in water quality parameters. The discriminator network is used to punish the reconstructed data with large deviations in the spatial position distribution of the potential features to ensure that the generated data maintains the diversity and consistency of the original features. In data collection, some water quality parameters may have scarce data. Through the adversarial generative network, additional data of these scarce parameters can be generated to supplement the data set. The data generated by random noise and the generator network can balance the distribution of different categories and ranges in the data set, making the model training more stable and reliable. The expanded data set is richer and more representative, which helps to improve the generalization ability of the model and enhance the prediction accuracy of the model in different scenarios. By increasing the diversity of training data, the risk of model overfitting can be effectively reduced, making the model perform better in practical applications. Through the continuous optimization of the adversarial generative network, the generated water quality parameter data is of high quality and closer to the data in the real environment, providing a high-quality data foundation. The generated data maintains consistency in the feature space and has good interpretability, which is helpful for subsequent analysis and decision-making.
[0022] As a further solution of the present invention, in the data analysis module, the Pearson correlation coefficient method is used to calculate the correlation between various water quality parameters, generate a correlation matrix, screen out parameters with absolute values of correlation coefficients higher than a set threshold, and perform weak correlation analysis and negative correlation analysis on parameters with correlation coefficients lower than the set threshold and parameters with negative correlation coefficients, respectively.
[0023] As a further solution of the present invention, a trained long short-term memory network model is used to predict water quality change trends, the Z-score method is used to detect outliers in tracking parameters and identify potential pollution times, a clustering algorithm is used to cluster abnormal data and identify potential locations of pollution sources, and a reverse flow model is used to reversely track the source of pollutants based on water flow direction and speed data.
[0024] Compared with the prior art, the technical effect of the system proposed in the present invention is as follows: the present invention effectively expands and optimizes water quality parameter data by utilizing autoencoders and adversarial generative network technology, captures complex nonlinear characteristics, and improves the diversity and quality of data. Compared with traditional manual sampling and laboratory analysis methods, the system significantly improves the efficiency of data collection and processing, reduces manpower and time costs, and improves the accuracy and integrity of data. Through comprehensive analysis of water quality parameters, spatiotemporal distribution analysis, parameter correlation analysis, water quality change trend prediction and pollution source identification, the system can quickly and accurately reflect the spatiotemporal changes of water quality and the distribution of pollution sources, provide reliable data support, provide a scientific basis for the formulation of environmental protection policies and measures, promote the sustainable development of urban ecological environment, improve the quality of life of residents, ensure the timeliness and comprehensive coverage of water quality monitoring, enhance the effectiveness and scientificity of environmental protection, and provide a scientific data basis for the operation and regulation of urban river pollution prevention and control equipment. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] Figure 1 It is a system block diagram of the present invention. DETAILED DESCRIPTION
[0026] The following will be combined with the drawings in the present invention to clearly and completely describe the technical solutions in the present invention. Obviously, the described technical solutions are only part of the present invention but not all of it. Based on the content of the present invention, all other technical solutions obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0027] like Figure 1As shown, the present invention proposes an intelligent environmental monitoring system for water quality sampling, including a data acquisition module, a data processing module, a feature extraction module, a key indicator amplification module, a data analysis module and a display warning module. The data processing module cleans the water quality data collected by the data acquisition module, calculates the total change of pH, dissolved oxygen, turbidity, temperature, and conductivity within a preset observation time window, determines the maximum and minimum values of each water quality data within the observation time window, counts the number of times each water quality data appears within different amplitude ranges, forms a distribution function of each data, and forms a water quality time series data stream with the processed data, manually marks the data to be amplified in the water quality time series data stream, and then transmits the water quality time series data stream to the feature extraction module. The feature extraction module receives the pre-processed water quality data. The time series data stream is based on the encoder in the autoencoder to compress the input data into a low-dimensional potential feature space, and then the decoder is used to reconstruct the low-dimensional feature representation of the potential feature space back to the original data dimension. By training the autoencoder, the potential features of the water quality time series data stream are extracted. The key indicator amplification module is iteratively trained through an adversarial mechanism to expand the corresponding parameters in the water quality data stream manually marked by the encoder part in the feature extraction module. The data analysis module receives the potential feature representation and performs data standardization. Then, the standardized parameters are subjected to comprehensive water quality analysis, spatiotemporal distribution analysis, parameter correlation analysis, water quality change trend prediction and pollution source identification analysis, and automatically generate analysis data charts, time series charts, spatial distribution charts and water quality parameter correlation charts. The display warning module is used to display the data generated by the data analysis module.
[0028] The present invention utilizes autoencoders and generative adversarial network technologies to effectively expand and optimize water quality parameter data, capture complex nonlinear features, and improve data diversity and quality. Compared with traditional manual sampling and laboratory analysis methods, the system significantly improves the efficiency of data acquisition and processing, reduces manpower and time costs, and improves data accuracy and integrity. Through comprehensive analysis of water quality parameters, spatiotemporal distribution analysis, parameter correlation analysis, water quality change trend prediction, and pollution source identification, the system can quickly and accurately reflect the spatiotemporal changes in water quality and the distribution of pollution sources, provide reliable data support, provide a scientific basis for the formulation of environmental protection policies and measures, promote the sustainable development of the urban ecological environment, improve the quality of life of residents, ensure the timeliness and comprehensive coverage of water quality monitoring, enhance the effectiveness and scientificity of environmental protection, and provide a scientific data basis for the operation and regulation of urban river pollution prevention and control equipment.
[0029] The display warning module displays real-time water quality monitoring data and warning information, discovers abnormal situations in time, and adjusts the prevention and control equipment for immediate treatment based on the warning information (activates water purification equipment, increases the amount of chemicals, and adjusts the operation of sewage treatment facilities). According to the spatiotemporal distribution map, the pollution prevention and control equipment is deployed in areas with severe pollution, and the equipment operation strategy is dynamically adjusted according to the changes in water quality in different time periods (strengthen prevention and control measures at night or during peak periods after rain). Through parameter correlation analysis, the main pollution factors are identified and the pollution treatment strategy is optimized (it is found that dissolved oxygen has a strong correlation with turbidity, and turbidity pollution can be reduced by oxygenation equipment). For specific pollution sources or pollution types, corresponding treatment equipment and methods are adopted to improve treatment efficiency. According to the prediction of water quality change trends, the pollution prevention and control equipment is adjusted in advance (increase the amount of treatment equipment and chemicals before the pollution peak is predicted to prevent water quality from deteriorating). According to the long-term trend prediction, the equipment maintenance and maintenance plan is arranged to ensure that the equipment is always in the best operating state. According to the pollution source identification results, the pollution source is accurately located and the pollution source is traced back to the source (close the pollution source discharge and strengthen the pollution source management). Control the identified pollution sources and reduce pollutant emissions at the source (implement clean production and improve wastewater treatment facilities).
[0030] It should be noted that the data acquisition module includes a pH sensor, a dissolved oxygen sensor, a turbidity sensor, a temperature sensor, a conductivity sensor, a local storage module, a wireless communication module and a cloud platform. The pH sensor, the dissolved oxygen sensor, the turbidity sensor, the temperature sensor and the conductivity sensor collect the pH, dissolved oxygen, turbidity, temperature and conductivity of the deployment points in the urban river in real time within a preset time interval, and store the real-time data in the local storage module. At the same time, the data is transmitted to the cloud platform for cloud backup through the wireless communication module, and the data is transmitted to the data processing module for data processing.
[0031] This data acquisition module includes a pH sensor, a dissolved oxygen sensor, a turbidity sensor, a temperature sensor and a conductivity sensor. It collects water quality parameters of points in urban rivers in real time within a preset time interval, and stores the data in a local storage module. At the same time, it transmits the data to a cloud platform for cloud backup through a wireless communication module, and transmits it to a data processing module for processing. It can realize real-time monitoring of water quality parameters and timely transmission of data, ensure data security and reliability, and improve data storage and processing efficiency. Backing up data through a cloud platform can prevent data loss and facilitate remote access and analysis, which helps to timely discover and deal with abnormal water quality conditions and provide scientific and accurate data support for pollution prevention and management of urban rivers.
[0032] It should be noted that the data processing module uses the box plot method to detect outliers in water quality data. For outliers, the interpolation method is used to interpolate, and the sum of water quality parameters in all data points in a preset time window is calculated. The maximum and minimum values of each water quality parameter in the time window are counted, and the values of each water quality parameter are divided into several amplitude ranges. The number of occurrences of each water quality parameter data point in each range is counted, and the ratio of the number of occurrences of each water quality parameter data point in each amplitude range to the total number of data points is used as the distribution function value of the amplitude range to form the distribution function of each water quality parameter data. The obtained water quality data change sum, maximum value, minimum value and distribution function are combined to form a water quality time series data stream, and the data that needs to be amplified in the time series data stream is manually marked. The standard for manual marking is that the scale of the corresponding water quality parameter in the water quality time series data stream is smaller than the preset scale, and then the processed water quality data stream is transmitted to the feature extraction module.
[0033] This data processing module uses the box plot method to detect outliers in water quality data. For outliers, the interpolation method is used to fill in the gaps, which can ensure the integrity and accuracy of the data. By calculating the sum of water quality parameters of all data points in the preset time window and counting the maximum and minimum values of each parameter, the system can fully understand the changes in water quality. Each water quality parameter is divided into several amplitude ranges, the number of occurrences of data points in each range is counted, and the ratio is used as the distribution function value, which can accurately describe the distribution characteristics of water quality parameters. The formed water quality time series data stream, after manual labeling and processing, ensures the diversity and representativeness of the data set, can systematically analyze water quality data, identify outliers and trend changes, improve the accuracy and efficiency of data analysis, and provide a high-quality data foundation for subsequent feature extraction and analysis, thereby supporting more accurate water quality prediction and pollution source identification.
[0034] It should be noted that the feature extraction module includes an encoder network and a decoder network, and the encoder network and the decoder network both include an input layer, a hidden layer 1, a hidden layer 2, a hidden layer 3, a potential feature layer and an output layer.
[0035] At the input layer of the encoder, we accept Time series data , represents a matrix, where is the length of the time window, is the feature dimension for each time point.
[0036] As a further solution of the present invention, in the encoder network of the feature extraction module, the activation function of the hidden layer 1 is: ; Where: is the output of hidden layer 1, is the weight matrix of hidden layer 1, is the input vector of the input layer, is the bias vector of hidden layer 1, , , ; At this layer, using The input data are linearly combined and offset to retain the linear characteristics of the original water quality parameters, effectively capture the water quality parameters that are linearly related in the original feature space, and then use The input data is smoothly compressed to between (0,1). The extreme values in the data can be compressed to reduce their impact on subsequent layers. The combination of the two can capture both linear and nonlinear relationships in the data at this layer, which helps to process those parts of the data that show linear trends and subtle linear changes. It can amplify small changes and compress large changes, and is suitable for capturing subtle changes and trends in water quality parameters.
[0037] The activation function of hidden layer 2 is: ; Where: is the output of hidden layer 2, is the weight matrix of hidden layer 2, is the bias matrix of hidden layer 2, , , ; The output of the previous layer is further linearly combined and offset to enhance the capture of the linear relationship of water quality parameters. The function can compress data in both directions, handling both positive and negative values, and The symmetry of the function makes it very effective in capturing symmetry and bidirectional variations in the data. It can smoothly capture nonlinear changes in water quality parameter data, avoid the problem of "dead zone", and adapt to the dynamic changes of water quality parameters under different times and conditions.
[0038] The activation function of hidden layer 3 is: ; Where: is the output of hidden layer 3, is the weight matrix of hidden layer 3, is the bias matrix of hidden layer 3, , , ; Some of them can continue to perform linear transformation to further extract the linear relationship in the water quality parameter data. It avoids the "dead zone" problem of zero output in the negative area, ensures the gradient flow in the negative area, can smoothly capture the non-negative characteristics of water quality parameters, and is suitable for processing essentially positive water quality parameters (turbidity and conductivity).
[0039] The nonlinear mapping function of the potential feature layer is: ; Where: is the potential feature representation of the water quality time series data stream, is the weight matrix of the potential feature layer, is the bias matrix of the latent feature layer, , , .
[0040] The linear transformation of the latent feature layer compresses high-dimensional features into a low-dimensional latent space, extracts the main features in the data, and maintains the linear properties of the latent feature space, which facilitates subsequent decoding and reconstruction. Through compression and offset, the latent feature layer can effectively remove redundant information in the input data and retain only the most important feature information in the water quality parameters.
[0041] As a further solution of the present invention, in the decoder network of the feature extraction module, the activation function of the hidden layer 1 is: ; Where: is the output of hidden layer 1, is the weight matrix of hidden layer 1, is the bias vector of hidden layer 1, , , ; The output range of this function is The exponential decay characteristic can smooth the potential features of the encoder, making the output data gradually decrease, which is convenient for processing features that gradually decrease over time. It is suitable for processing non-negative water quality parameters such as conductivity and turbidity. The trend of water quality parameters gradually decaying under certain conditions (dissolved oxygen, turbidity), this exponential decay function can capture this natural change trend, which helps to reduce the impact of noise and make the reconstructed data smoother and more natural.
[0042] The activation function of hidden layer 2 is: ; Where: is the output of hidden layer 2, is the weight matrix of hidden layer 2, is the bias matrix of hidden layer 2, , , ; The sine function is a periodic function that can capture and process periodic changes in water quality parameters (temperature). The temperature varies periodically between day and night and between seasons. The sine function can well capture and describe such oscillations and fluctuations, allowing the reconstructed data to reflect these natural phenomena.
[0043] The activation function of hidden layer 3 is: ; Where: is the output of hidden layer 3, is the weight matrix of hidden layer 3, is the bias matrix of hidden layer 3, , , ; It is a smooth mathematical function that can handle non-negative data and avoid the problem of gradient vanishing. It not only retains the nonlinear characteristics, but also avoids the "dead zone" problem through smoothing. It can handle and capture the non-negative values of conductivity and turbidity well, ensuring that the gradient will not disappear during the training process, thereby enhancing the stability of the model and the training effect.
[0044] The nonlinear mapping function of the potential feature layer is: ; Where: is the reconstructed water quality time series data stream, is the weight matrix of the potential feature layer, is the bias matrix of the latent feature layer, , .
[0045] The linear transformation of the output layer maps the output of the upper layer back to the original data space, which can effectively reconstruct the original data and ensure that the potential features can be correctly decoded and restored.
[0046] The present invention realizes efficient extraction and reconstruction of water quality data by designing a feature extraction module and a decoder network and utilizing a variety of nonlinear mapping functions. The hidden layer 1 in the feature extraction module can simultaneously capture the linear and nonlinear features in the water quality data by combining linear transformation and Sigmoid activation function, and adapt to subtle changes and trends. The hidden layer 2 utilizes the combination of Tanh function and Log-Sigmoid to effectively process bidirectional changes and nonlinear features and avoid the "dead zone" problem. The hidden layer 3 smoothes non-negative features through the Softplus function to ensure stable gradient flow. The potential feature layer compresses high-dimensional features into low-dimensional space through linear transformation to extract the main features in the data. The decoder network processes the gradually decreasing features through the exponential decay function, the sine function captures the periodic changes, and the smoothing function avoids the disappearance of the gradient. Finally, the original data is reconstructed through linear transformation, which not only improves the accuracy and integrity of the data, but also effectively copes with the diversity and dynamic changes of water quality parameters, enhances the accuracy and reliability of data analysis, and provides strong technical support for water quality monitoring and pollution prevention.
[0047] It should be noted that in the data analysis module, the weighted sum of the standardized water quality parameters is used as the output result of the comprehensive water quality analysis, the potential characteristic representation of each water quality parameter is standardized, the statistics of each water quality parameter in each time window are calculated, the monitored urban river area is divided into several grids, each grid is a spatial unit, the statistics of each water quality parameter in each network are obtained, the time distribution and spatial distribution data are fused into spatiotemporal data to form a spatiotemporal data set, and the statistics of each spatiotemporal unit are obtained as the result of spatiotemporal distribution analysis.
[0048] In the data analysis module, the weighted sum of standardized water quality parameters is used as the output result of comprehensive water quality analysis. Statistical data are obtained by standardizing potential feature representation, counting statistics within the time window, and dividing the spatial grid. Then, spatiotemporal data fusion is performed to form a spatiotemporal data set, thereby obtaining statistics for each spatiotemporal unit. This improves the accuracy and comparability of the data, ensures the equal contribution of each water quality parameter in the comprehensive analysis, enhances the multi-dimensional analysis capability of the data, realizes accurate monitoring and comprehensive evaluation of urban river water quality, and provides a scientific basis for water quality management and pollution prevention.
[0049] It should be noted that the key indicator expansion module includes a generator network and a discriminator network. The manually marked water quality parameters among all water quality parameters are obtained and normalized. The encoder network in the feature extraction module is used as the generator network of the adversarial generation network. Random noise data in the same data range as the manually marked water quality parameters are added and imported into the generator network to obtain the potential feature distribution of this set of data. The reconstructed data of this set of data is obtained and mapped to the same position. The discriminator network is added to the potential feature layer of the encoder network to punish the reconstructed data whose potential feature space position distribution deviation exceeds the set threshold. The generator network and the discriminator network are combined to construct an adversarial generation network. Through the adversarial training of the generator network and the discriminator network, the generator network is continuously optimized to generate high-quality expanded water quality parameters. When the scale of the generated water quality parameters reaches the preset scale, the iteration is stopped, and the potential feature representation of the expanded water quality parameters is output as the input of the decoder network of the feature extraction module.
[0050] New water quality parameter data is generated through the generator network, which increases the diversity and scale of the data set and helps to improve the generalization ability of the model. The discriminator network in the adversarial training process continuously evaluates and optimizes the generator network, making the generated data closer to the real data and improving the data quality. The encoder network obtains the potential feature distribution of the data and generates new feature data through the generator network, which can capture the complex nonlinear relationships and dynamic changes in water quality parameters. The discriminator network is used to punish the reconstructed data with large deviations in the spatial position distribution of the potential features to ensure that the generated data maintains the diversity and consistency of the original features. In data collection, some water quality parameters may have scarce data. Through the adversarial generative network, additional data of these scarce parameters can be generated to supplement the data set. The data generated by random noise and the generator network can balance the distribution of different categories and ranges in the data set, making the model training more stable and reliable. The expanded data set is richer and more representative, which helps to improve the generalization ability of the model and enhance the prediction accuracy of the model in different scenarios. By increasing the diversity of training data, the risk of model overfitting can be effectively reduced, making the model perform better in practical applications. Through the continuous optimization of the adversarial generative network, the generated water quality parameter data is of high quality and closer to the data in the real environment, providing a high-quality data foundation. The generated data maintains consistency in the feature space and has good interpretability, which is helpful for subsequent analysis and decision-making.
[0051] It should be noted that in the data analysis module, the Pearson correlation coefficient method is used to calculate the correlation between various water quality parameters, generate a correlation matrix, screen out parameters with absolute values of correlation coefficients higher than the set threshold, and perform weak correlation analysis and negative correlation analysis on parameters with correlation coefficients lower than the set threshold and negative correlation coefficients, respectively.
[0052] By calculating the Pearson correlation coefficient, the linear relationship between various water quality parameters can be quantified and a correlation matrix can be generated, which helps to identify which parameter pairs have significant correlations, helps to understand the mutual influence and association between different water quality parameters, and provides a scientific basis for further water quality management. In-depth analysis of strongly correlated parameters can help identify and understand the close relationship between water quality parameters, and facilitate the discovery of potential pollution sources or pollution paths. The strong correlation between dissolved oxygen and turbidity reveals the presence of a specific pollutant. Weakly correlated parameter analysis can help exclude irrelevant or weakly correlated factors, simplify models and analysis processes, and improve analysis efficiency. Negatively correlated parameter analysis helps to find parameter pairs with inverse relationships and reveal opposing factors or mutually inhibiting processes. By identifying and analyzing weakly and negatively correlated water quality parameters, monitoring strategies can be optimized, resources can be concentrated on monitoring key parameters, and monitoring efficiency can be improved. At the same time, understanding the correlation between various parameters can help to formulate more targeted pollution prevention and control measures. If some parameter pairs show strong negative correlation, the governance measures can consider how to improve the status of these two parameters at the same time. Introducing correlation analysis results into water quality models can significantly improve the accuracy and reliability of the models. By understanding the relationship between parameters, we can more accurately simulate and predict water quality changes, optimize model parameters, reduce noise and errors, and improve prediction results.
[0053] It should be noted that the trained long short-term memory network model is used to predict the trend of water quality changes, the Z-score method is used to detect outliers in the tracking parameters and identify potential pollution times, the clustering algorithm is used to cluster abnormal data and identify the potential location of pollution sources, and the reverse flow model is used to reversely track the source of pollutants based on the water flow direction and speed data.
[0054] The LSTM model is good at processing time series data, can capture the long-term dependencies and complex change trends of water quality parameters, provide high-precision water quality change predictions, help to warn of water quality deterioration in advance, and enable managers to take preventive measures in time. The Z-score method can quickly and accurately detect outliers in water quality parameters and help identify potential pollution events. By marking and processing abnormal data, the reliability and consistency of the data can be ensured, providing a clean data basis for subsequent analysis. Using clustering algorithms to perform cluster analysis on the detected abnormal data can effectively identify the concentrated areas of abnormal data and infer the potential location of the pollution source, which can help to quickly locate the pollution source and improve the pertinence and efficiency of pollution control. The reverse flow model combines water flow direction and speed data to reversely track the source of pollutants, further determine the source of pollution, accurately locate the pollution source, provide a direct basis for pollution source control, and help control pollution from the source. Combining trend prediction, anomaly detection, cluster analysis and reverse tracking, it can comprehensively and systematically analyze water quality changes and pollution. Through multi-level and multi-angle analysis, managers can formulate more scientific and effective pollution prevention and control strategies and improve the management level of urban river ecological environment. Through real-time monitoring and efficient analysis, pollution incidents can be quickly discovered and responded to, reducing the impact of pollution on the environment and residents' health. Systematic analysis methods ensure the scientific nature of data processing and decision-making, and improve the timeliness and accuracy of water quality management.
[0055] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
[0056] Finally: The above description is only the technical solution of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. An intelligent environmental monitoring system for water quality sampling, It is characterized in that The system includes a data acquisition module, a data processing module, a feature extraction module, a key indicator amplification module, a data analysis module and a display warning module. The data processing module cleans the water quality data collected by the data acquisition module, calculates the total change of pH, dissolved oxygen, turbidity, temperature and conductivity within a preset observation time window, determines the maximum and minimum values of each water quality data within the observation time window, counts the number of times each water quality data appears within different amplitude ranges, forms the distribution function of each data, and forms a water quality time series data stream with the processed data, manually marks the data that needs to be amplified in the water quality time series data stream, and then transmits the water quality time series data stream to the feature extraction module. The feature extraction module receives the pre-processed water quality time series data. The encoder in the autoencoder compresses the input data into a low-dimensional potential feature space, and then uses the decoder to reconstruct the low-dimensional feature representation of the potential feature space back to the original data dimension. By training the autoencoder, the potential features of the water quality time series data stream are extracted. The key indicator amplification module is iteratively trained through an adversarial mechanism to expand the corresponding parameters in the water quality data stream manually marked by the encoder part in the feature extraction module. The data analysis module receives the potential feature representation and performs data standardization. Then, the standardized parameters are subjected to comprehensive water quality analysis, spatiotemporal distribution analysis, parameter correlation analysis, water quality change trend prediction and pollution source identification analysis to generate analysis data charts, time series diagrams, spatial distribution diagrams and water quality parameter correlation diagrams.
2. An intelligent environmental monitoring system for water quality sampling according to claim 1, It is characterized in that The data acquisition module includes a pH sensor, a dissolved oxygen sensor, a turbidity sensor, a temperature sensor, a conductivity sensor, a local storage module, a wireless communication module and a cloud platform. The pH sensor, the dissolved oxygen sensor, the turbidity sensor, the temperature sensor and the conductivity sensor collect the pH, dissolved oxygen, turbidity, temperature and conductivity of the deployment points in the urban river in real time within a preset time interval, and store the real-time data in the local storage module. At the same time, the data is transmitted to the cloud platform for cloud backup through the wireless communication module, and the data is transmitted to the data processing module for data processing.
3. The intelligent environmental monitoring system for water quality sampling according to claim 1, It is characterized in that The data processing module uses the box plot method to detect outliers in water quality data. For outliers, the interpolation method is used to interpolate and calculate the sum of water quality parameters in all data points in a preset time window. The maximum and minimum values of each water quality parameter in the time window are counted, and the values of each water quality parameter are divided into several amplitude ranges. The number of pH data points in each range is counted, and the ratio of the number of pH data points in each amplitude range to the total number of data points is used as the distribution function value of the amplitude range to form the distribution function of the pH data. The total change sum, maximum value, minimum value and distribution function of the obtained water quality data are combined to form a water quality time series data stream. The data that needs to be amplified in the time series data stream is manually marked. The standard for manual marking is that the scale of the corresponding water quality parameter in the water quality time series data stream is smaller than the preset scale, and then the processed water quality data stream is transmitted to the feature extraction module.
4. An intelligent environmental monitoring system for water quality sampling according to claim 3, It is characterized in that The feature extraction module includes an encoder network and a decoder network. Both the encoder network and the decoder network include an input layer, a hidden layer 1, a hidden layer 2, a hidden layer 3, a potential feature layer and an output layer.
5. An intelligent environmental monitoring system for water quality sampling according to claim 4, It is characterized in that In the encoder network of the feature extraction module, the activation function of hidden layer 1 is: ; Where: is the output of hidden layer 1, is the weight matrix of hidden layer 1, is the input vector of the input layer, is the bias vector of hidden layer 1; The activation function of hidden layer 2 is: ; Where: is the output of hidden layer 2, is the weight matrix of hidden layer 2, is the bias matrix of hidden layer 2; The activation function of hidden layer 3 is: ; Where: is the output of hidden layer 3, is the weight matrix of hidden layer 3, is the bias matrix of hidden layer 3; The nonlinear mapping function of the potential feature layer is: ; Where: is the potential feature representation of the water quality time series data stream, is the weight matrix of the potential feature layer, is the bias matrix of the latent feature layer.
6. An intelligent environmental monitoring system for water quality sampling according to claim 5, It is characterized in that In the decoder network of the feature extraction module, the activation function of hidden layer 1 is: ; Where: is the output of hidden layer 1, is the weight matrix of hidden layer 1, is the bias vector of hidden layer 1; The activation function of hidden layer 2 is: ; Where: is the output of hidden layer 2, is the weight matrix of hidden layer 2, is the bias matrix of hidden layer 2; The activation function of hidden layer 3 is: ; Where: is the output of hidden layer 3, is the weight matrix of hidden layer 3, is the bias matrix of hidden layer 3; The nonlinear mapping function of the potential feature layer is: ; Where: is the reconstructed water quality time series data stream, is the weight matrix of the potential feature layer, is the bias matrix of the latent feature layer.
7. The intelligent environmental monitoring system for water quality sampling according to claim 3, It is characterized in that In the data analysis module, the weighted sum of standardized water quality parameters is used as the output result of comprehensive water quality analysis, the potential characteristic representation of each water quality parameter is standardized, the statistics of each water quality parameter in each time window are calculated, the monitored urban river area is divided into several grids, each grid is a spatial unit, and the statistics of each water quality parameter in each grid are obtained. The time distribution and spatial distribution data are fused into spatiotemporal data to form a spatiotemporal data set, and the statistics of each spatiotemporal unit are obtained as the result of spatiotemporal distribution analysis.
8. An intelligent environmental monitoring system for water quality sampling according to claim 7, It is characterized in that The key indicator expansion module includes a generator network and a discriminator network. It obtains the manually marked water quality parameters from all water quality parameters and performs normalization operations. The encoder network in the feature extraction module is used as the generator network of the adversarial generation network. Random noise data in the same data range as the manually marked water quality parameters is added and imported into the generator network to obtain the potential feature distribution of this set of data. The reconstructed data of this set of data is obtained and mapped to the same position. A discriminator network is added to the potential feature layer of the encoder network to penalize the reconstructed data whose potential feature space position distribution deviation exceeds a set threshold. The generator network and the discriminator network are combined to construct an adversarial generation network. Through adversarial training of the generator network and the discriminator network, the generator network is continuously optimized to generate high-quality expanded water quality parameters. When the scale of the generated water quality parameters reaches a preset scale, the iteration is stopped, and the potential feature representation of the expanded water quality parameters is output as the input of the decoder network of the feature extraction module.
9. The intelligent environmental monitoring system for water quality sampling according to claim 1, It is characterized in that In the data analysis module, the Pearson correlation coefficient method is used to calculate the correlation between various water quality parameters, generate a correlation matrix, and screen out parameters with absolute values of correlation coefficients higher than the set threshold. Weak correlation analysis and negative correlation analysis are performed on parameters with correlation coefficients lower than the set threshold and negative correlation coefficients, respectively.
10. An intelligent environmental monitoring system for water quality sampling according to claim 9, It is characterized in that The trained long short-term memory network model is used to predict the trend of water quality changes. The Z-score method is used to detect outliers in the tracking parameters and identify potential pollution times. The clustering algorithm is used to cluster abnormal data and identify the potential location of pollution sources. The reverse flow model is used to reversely track the source of pollutants based on water flow direction and speed data.
Citation Information
Patent Citations
Virtual water quality monitoring method based on improved depth limit learning machine
CN109521176A
Water environment dynamic monitoring system and method based on Internet of Things
CN116796907A
Sewage treatment effluent prediction method and system based on deep neural network
CN116934167A
Water environment monitoring and intelligent early warning system
CN117973613A
River water quality real-time monitoring platform
CN118052450A
Cited By
Electromagnetic compatibility test data automatic management method and system
CN118820738A
Water drainage monitoring and analyzing system based on artificial intelligence
CN119066434A
Sewage treatment intelligent monitoring system and method based on big data
CN119290071A
Fishery water body environment monitoring equipment control method
CN119474157A
A control method for fishery water environment monitoring equipment
CN119474157B
