A municipal garden water pollution monitoring system and method based on big data analysis
By combining the water quality pollution prediction model of CNN and LSTM, the sampling frequency and alarm threshold of the garden water body monitoring system are automatically adjusted, which solves the problem of timely feedback based on the differences in water body quality changes in different locations in the existing technology, and improves the monitoring of garden water body Responsiveness and system efficiency.
Patent Information
- Application Number
- CN202411247026.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-06
- Publication Date
- 2024-12-17
- Estimated Expiration
- 2044-09-06
AI Technical Summary
The existing single and general garden water pollution monitoring and early warning strategies cannot provide timely feedback based on the differences in water quality changes at different locations, resulting in insufficient response to the monitoring system when facing complex garden environments.
A water quality pollution prediction model combined with a convolutional neural network (CNN) and a long and short-term memory network (LSTM) is used to extract features and automatically adjust the sampling frequency and alarm threshold of the data acquisition equipment to ensure efficient operation and timely response of the system.
It realizes automatic adjustment of monitoring and early warning strategies based on the characteristics of the landscape structure, improves the accuracy and response speed of water quality pollution monitoring, and ensures efficient operation and timely feedback of the system.
Smart Images

Figure CN118886718B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of water pollution monitoring, and in particular to a municipal garden water pollution monitoring system and method based on big data analysis. Background Art
[0002] As the urbanization rate increases, people have higher and higher requirements for the ecological environment. While cities are expanding, many new gardens with landscape water bodies will be built. Because garden landscape water has unique characteristics, that is, landscape water is mostly closed and non-flowing dead water, the fluidity and repairability are not high compared to natural water bodies, and the water quality is more likely to rot and stink. At the same time, after garden water is polluted, whether it is physical, chemical or ecological methods, it is difficult to treat and restore, the cost is high, the time is long, and it will cause irreversible damage to the image of the garden. Among them, there are many reasons for the deterioration of garden water quality pollution, and the development trends of water pollution caused by different reasons are different. By using water pollution monitoring technology, the pollution of garden water can be effectively monitored, and timely discovered and treated.
[0003] The document with the prior art publication number CN118037057A provides a municipal garden water pollution monitoring system based on big data analysis, which collects environmental data outside the garden water body and the corresponding water pollution data, divides the risk level, helps identify potential pollution threats, and predicts the pollution risk level of the garden water body by training a linear regression model. When the predicted pollution risk level exceeds the preset threshold, the system will trigger an alarm to notify relevant departments or personnel to take action, effectively predict the pollution status of the garden water body, and issue timely warnings, thereby helping to prevent the occurrence of water pollution incidents and ensure the cleanliness and ecological balance of the garden water body. However, with the continuous advancement of technology and the increasing complexity of garden water pollution, the existing system still has some shortcomings and limitations. For example, the sampling frequencies of multiple sensors used to collect garden water external environment data and garden water pollution data in the data acquisition module are generally the same, and the alarm thresholds of multiple sensors at different locations are generally the same. However, due to the variable structure of garden landscapes, the water quality at different locations in the garden and its changing trend when facing environmental risks are likely to be different. In order to ensure timely feedback and response to water pollution at different locations in the garden, we proposed a municipal garden water pollution monitoring system and method based on big data analysis, which can automatically adjust the water pollution monitoring and early warning strategy according to the characteristics of the garden landscape structure, thereby ensuring the efficient operation and timely response of the monitoring system. Summary of the invention
[0004] The present invention provides a municipal garden water pollution monitoring system and method based on big data analysis, aiming to solve the technical problem that the existing single and universal garden water pollution monitoring and early warning strategy cannot provide timely feedback based on the difference in water quality changes at any position in the garden. Through a water quality pollution prediction model combining a convolutional neural network and a long short-term memory network, the features extracted by water quality pollution prediction and the prediction of the water quality pollution degree in the monitoring sub-area are realized, and based on the features extracted by water quality pollution prediction, the sampling frequency and alarm threshold of the data acquisition equipment are automatically adjusted to ensure efficient operation and timely response of the system.
[0005] The present application provides a municipal garden water pollution monitoring system based on big data analysis, and the system includes.
[0006] The multi-source data acquisition and processing module deploys multi-parameter sensors to collect water quality data in real time, obtains the density of floating objects on the water surface through a video surveillance system combined with target monitoring technology, and the sensor nodes send the data to the data center, which uses data cleaning and preprocessing algorithms to ensure the accuracy and consistency of the data.
[0007] The data fusion feature extraction module splices the data collected by the multi-source data acquisition and processing module, and integrates the spliced data into a spatiotemporal data set. Each data point includes multi-dimensional data collected by different sensor nodes at different time points. The convolutional neural network (CNN) and the long short-term memory network (LSTM) are combined to construct a water pollution prediction model.
[0008] The water pollution prediction module trains the water pollution prediction model based on the spatiotemporal data set and optimizes the model parameters so that it can accurately predict the future water pollution situation. The currently collected and integrated processed data is input into the trained water pollution prediction model to make real-time pollution degree predictions.
[0009] The real-time monitoring dynamic adjustment module introduces a reinforcement learning algorithm, based on the spatiotemporal features extracted by CNN-LSTM in the water pollution prediction model, and continuously optimizes the system's prediction and decision-making capabilities through environmental feedback. When changes in the degree of pollution are monitored, the sampling frequency and alarm threshold of the multi-source data acquisition and processing module are automatically adjusted to ensure efficient monitoring and early warning.
[0010] The risk assessment and early warning module assesses the water pollution risk based on the prediction results of the water pollution prediction module. When the predicted pollution risk level exceeds the alarm threshold determined by the real-time monitoring dynamic adjustment module, the early warning mechanism is triggered and the early warning system sends alarm information to relevant management departments through multiple channels.
[0011] In the data storage and analysis module, all monitoring data, prediction results and warning records will be automatically stored in the cloud database, and multi-level security protection measures will be adopted to ensure the integrity and security of the data.
[0012] Preferably, the multi-source data acquisition and processing module includes a data acquisition unit, a data transmission unit and a data center unit. The data acquisition unit divides the water body of the municipal garden into different monitoring sub-areas, uses a multi-parameter sensor to monitor water quality parameters at different positions of the water body, and uses a video monitoring system combined with target monitoring technology to identify the density of floating objects on the water surface of each monitoring sub-area. The data transmission unit sends the collected data to the data center unit through wireless transmission technology. The data center unit receives real-time data from each sensor node, uses a data cleaning algorithm to remove noise, outliers and duplicate data to ensure data accuracy, pre-processes the cleaned data, stores the processed data in local and cloud databases, and performs data backup regularly.
[0013] Further preferably, the data fusion feature extraction module includes an integrated data set unit and a feature extraction unit. The integrated data set unit takes each monitoring sub-area as a pixel to make a two-dimensional water quality image, splices the water quality parameters and the density of floating objects on the water surface collected by the multi-parameter sensor data to form a multi-dimensional feature vector, and integrates the two-dimensional water quality image and the multi-dimensional feature vector to form a spatiotemporal data set. The feature extraction unit is equipped with a water quality pollution prediction model, which includes a convolutional neural network layer, an LSTM layer and a deconvolution layer connected in sequence. A convolutional neural network is used to extract the spatial features of the two-dimensional water quality image. The input layer inputs the processed two-dimensional image data. The convolution layer uses a convolution kernel to perform a convolution operation on the input data to extract spatial features. The output of the convolution layer is downsampled using a pooling operation to reduce the dimension of the feature map. The output of the pooling layer is flattened and input into the fully connected layer to further extract high-level features. The high-level features extracted by the convolutional neural network are used as the input of the LSTM. The LSTM is used to capture time series features. The spatiotemporal features of the two-dimensional water quality image are extracted through the CNN-LSTM structure.
[0014] Further preferably, the water pollution prediction module uses the output of the LSTM layer as the input of the deconvolution layer, uses the deconvolution operation to map the output of the LSTM layer back to the original two-dimensional space, the deconvolution layer upsamples the input data and restores it to the original two-dimensional image size, and finally outputs the predicted two-dimensional water pollution degree image in real time and in the future. Specifically, the LSTM output of each time step is deconvolved to obtain a two-dimensional image of each time step. The activation function of the output layer uses a linear activation function, and the loss function uses the mean square error (MSE). When the model is trained, different monitoring sub-areas are marked with a specific value to represent the pollution degree of the monitoring sub-area, and supervised learning is used to minimize the difference between the predicted value and the true value.
[0015] Preferably, the real-time monitoring dynamic adjustment module uses the spatiotemporal features extracted by CNN-LSTM and combines reinforcement learning to determine the monitoring frequency and alarm threshold scheme of each sensor and camera, wherein the spatiotemporal features extracted by the CNN-LSTM model are used as the state of reinforcement learning, and the action is the change of the monitoring frequency and alarm threshold of each sensor and camera. The reward function comprehensively considers the monitoring accuracy, energy consumption and response speed, and uses the deep Q network (DQN) algorithm to train the intelligent agent. The Q function is approximated by the neural network. The input layer of the deep Q network receives the current state, the hidden layer is used to extract the high-order features of the state, and the output layer outputs the Q value of all possible actions, indicating the expected reward of each action in the current state. The action is selected according to the ε-greedy strategy, the action is executed, the next state and the immediate reward are observed, the loss is calculated based on the loss function and the Q network parameters are updated. Through continuous interaction with the environment and experience playback, the intelligent agent gradually learns the optimal action to be taken in different states, thereby optimizing the sampling frequency and alarm threshold.
[0016] Preferably, the risk assessment and early warning module uses the real-time two-dimensional water pollution degree image predicted by the water pollution prediction model, combined with the optimal sensor provided by the real-time monitoring dynamic adjustment module, the monitoring frequency and alarm threshold of the camera, to conduct a real-time assessment of the pollution degree of each monitoring sub-area, and issue an early warning according to the preset risk level. Specifically, the risk assessment and early warning module receives the real-time two-dimensional water pollution degree image predicted by the CNN-LSTM model, and combines the monitoring frequency and alarm threshold determined by the real-time monitoring dynamic adjustment module to compare the pollution degree of each monitoring sub-area with the alarm threshold. When the risk score of a monitoring sub-area exceeds the set threshold, the early warning mechanism is triggered. The early warning information may include the geographical location of the monitoring sub-area, the pollution degree, the risk level, and the recommended response measures, etc., which are pushed to relevant managers and emergency response teams in real time through various methods such as the system interface, text messages, and emails.
[0017] Preferably, the data storage and analysis module is responsible for collecting and storing real-time monitoring data, prediction results, alarm records, user feedback and other information to support subsequent data analysis and decision making. It adopts a distributed storage architecture to ensure the high availability, scalability and fault tolerance of data. The data storage adopts a time series database to support fast reading, writing and query operations on large amounts of time series data. The data storage and analysis module adopts multi-level security protection measures to ensure the integrity and security of the data, and supports data backup and recovery functions to deal with possible risks of data loss or damage.
[0018] The present application also provides a municipal garden water pollution monitoring method based on big data analysis, which includes the following steps.
[0019] S1. Arrange multi-source data acquisition equipment around garden water bodies to comprehensively monitor changes in the environment and water quality.
[0020] S2. The real-time collected data is sent to the data center through wireless transmission technology. The data center cleans and preprocesses the received raw data to remove noise, outliers and duplicate data.
[0021] S3. In the data fusion feature extraction module, the cleaned and preprocessed data are integrated according to the time and space dimensions to form a spatiotemporal data set of multi-source data fusion, and the water pollution prediction combining convolutional neural network (CNN) and long short-term memory network (LSTM) is used for feature extraction.
[0022] S4. In the water pollution prediction module, deconvolution operation is performed on the features extracted by water pollution prediction to predict the image data of water pollution degree in each monitoring sub-area in real time and in the future.
[0023] S5. The real-time monitoring dynamic adjustment module introduces a reinforcement learning algorithm, uses the features extracted from water pollution prediction, and continuously optimizes the system's prediction and decision-making capabilities based on environmental feedback. When changes in pollution risks are monitored, the sampling frequency and alarm threshold are automatically adjusted.
[0024] S6. The risk assessment and early warning module assesses the water pollution risk based on the prediction results of the water pollution prediction module, combined with the automatically adjusted sampling frequency and alarm threshold. When the predicted pollution risk level exceeds the threshold, the early warning mechanism is triggered, and the early warning system will send alarm information to relevant management departments through multiple channels.
[0025] S7. The data storage and analysis module automatically stores all monitoring data, prediction results and warning records in the cloud database to facilitate subsequent analysis and research.
[0026] The municipal garden water pollution monitoring system and method based on big data analysis described in this application have the following advantages.
[0027] 1. Through multi-source data acquisition equipment and wireless transmission technology, the system can obtain various water quality parameters of garden water bodies in real time to ensure the real-time and accuracy of the data.
[0028] 2. Using the CNN-LSTM architecture in the data fusion feature extraction module, the system can automatically extract valuable spatiotemporal features from massive multi-source data. The water pollution prediction module uses deconvolution operations to map the LSTM output back to the original two-dimensional space, which can intuitively display the degree of water pollution in each monitoring sub-area and predict the water quality change trend in the future, providing timely and effective decision-making basis for management departments.
[0029] 3. The real-time monitoring dynamic adjustment module combined with the reinforcement learning algorithm can continuously optimize the system's prediction and decision-making capabilities based on environmental feedback, automatically adjust the sampling frequency and alarm threshold, and ensure efficient operation and timely response of the system.
[0030] 4. The risk assessment and early warning module conducts a comprehensive assessment of water pollution risks based on the prediction results of the water pollution prediction module and the automatically adjusted alarm threshold, and sends alarm information to relevant management departments through multiple channels to ensure that water quality safety is protected in a timely and effective manner.
[0031] 5. The data storage and analysis module automatically stores all monitoring data, prediction results and warning records in the cloud database, which is convenient for subsequent analysis and research. The regularly generated data analysis reports can help management departments fully understand water quality changes and system performance, and provide strong support for future decision-making. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] Figure 1 Structural diagram of the municipal garden water pollution monitoring system based on big data analysis provided for this application.
[0033] Figure 2 This is a structural diagram of the multi-source data acquisition and processing module in the municipal garden water pollution monitoring system based on big data analysis provided in this application.
[0034] Figure 3 This is a structural diagram of the data fusion feature extraction module in the municipal garden water pollution monitoring system based on big data analysis provided in this application.
[0035] Figure 4 A flow chart of the municipal garden water pollution monitoring method based on big data analysis provided for this application. DETAILED DESCRIPTION
[0036] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below in conjunction with the accompanying drawings.
[0037] Please refer to Figure 1 , which shows a structural diagram of a municipal garden water pollution monitoring system based on big data analysis provided by an embodiment of the present application. The municipal garden water pollution monitoring system based on big data analysis includes the following modules.
[0038] The multi-source data acquisition and processing module deploys multi-parameter sensors to collect water quality data in real time, obtains the density of floating objects on the water surface through the camera system, and the sensor nodes send the data to the data center, which uses data cleaning and preprocessing algorithms to ensure the accuracy and consistency of the data.
[0039] The data fusion feature extraction module integrates the cleaned and preprocessed data into a spatiotemporal data set. Each data point includes multi-dimensional data collected by different sensor nodes at different time points. A convolutional neural network (CNN) and a long short-term memory network (LSTM) are combined to build a model for water pollution prediction.
[0040] The water pollution prediction module uses the historical data collected in the spatiotemporal dataset to train the water pollution prediction model and optimize the model parameters so that it can accurately predict future water pollution conditions. The latest data currently collected and integrated is input into the trained water pollution prediction model to perform real-time pollution degree prediction.
[0041] The real-time monitoring dynamic adjustment module introduces a reinforcement learning algorithm. Based on the spatiotemporal features extracted by CNN-LSTM in the water pollution prediction model, it continuously optimizes the system's prediction and decision-making capabilities through environmental feedback. When changes in the degree of pollution are detected, the sampling frequency and alarm threshold are automatically adjusted to ensure efficient monitoring and early warning.
[0042] The risk assessment and early warning module assesses the water pollution risk based on the prediction results of the water pollution prediction module. When the predicted pollution risk level exceeds the threshold, the early warning mechanism is triggered. The early warning system sends alarm information to relevant management departments through multiple channels.
[0043] In the data storage and analysis module, all monitoring data, prediction results and warning records will be automatically stored in the cloud database, and multi-level security protection measures will be adopted to ensure the integrity and security of the data.
[0044] Please refer to Figure 2, which shows a structural diagram of a multi-source data acquisition and processing module in a municipal garden water pollution monitoring system based on big data analysis provided by an embodiment of the present application. The multi-source data acquisition and processing module includes a data acquisition unit, a data transmission unit and a data center unit, wherein the data acquisition unit divides the water body of the municipal garden into different monitoring sub-areas, and uses a multi-parameter sensor to monitor water quality parameters at different positions of the water body. The water quality parameters include nitrogen (N), phosphorus (P), chlorophyll (Chlorophyll), oxygen concentration (Oxygen concentration), transparency (Transparency), organic matter (COD, BOD), heavy metals (lead, cadmium, mercury, etc.), and uses a video monitoring system combined with target monitoring technology to identify the density of floating objects on the water surface of each monitoring sub-area. The target monitoring model YOLOv3 is used to identify floating objects on the water surface captured by video monitoring as rectangular frames, and the number of rectangular frames in a monitoring sub-area is counted to obtain the density of floating objects in the sub-area. The data transmission unit sends the collected data to the data center unit through wireless transmission technologies such as LoRa, NB-IoT, Wi-Fi, etc. The data center unit receives real-time data from each sensor node, and uses data cleaning algorithms to remove noise, outliers and duplicate data to ensure data accuracy. The cleaned data is pre-processed, including data standardization and normalization, to ensure data consistency and availability. The processed data is stored in local and cloud databases, and data backup is performed regularly.
[0045] In the above technical solution, through multi-source data acquisition equipment and wireless transmission technology, the system can acquire and process various water quality parameters of garden water bodies in real time, store the processed data in local and cloud databases, and ensure the real-time and accuracy of the data through regular data backup.
[0046] Please refer to Figure 3 , which shows a data fusion feature extraction module structure diagram of a municipal garden water pollution monitoring system based on big data analysis provided by an embodiment of the present application. The data fusion feature extraction module includes a data set integration unit and a feature extraction unit. The data set integration unit treats each monitoring sub-area as a pixel S ij , and make a two-dimensional water quality image. For the water quality parameter Z collected by the multi-parameter sensor and after cleaning and pre-processing ij and the density of floating objects on the water surface P ij , directly concatenate to form a multi-dimensional feature vector, F ij =[Z ij ,P ij ] to retain the original information of each data and integrate the two-dimensional water quality images and multi-dimensional feature vectors to form a spatiotemporal dataset.
[0047] The feature extraction unit uses a convolutional neural network to extract the spatial features of the two-dimensional water quality image. The input layer inputs the processed two-dimensional image data with a shape of (H, W, C), where H is the height, W is the width, and C is the number of channels. In this embodiment, each channel corresponds to different data from a multi-parameter sensor. The convolution layer uses a convolution kernel to perform a convolution operation on the input data to extract the spatial features, y i,j l =σ(∑ m=0 M-1 ∑ n=0 N-1 w m,n l x i+m,j+n l-1 +b l ), where y i,j l is the output of the lth convolutional layer, w m,n l is the convolution kernel weight, x i+m,j+n l-1 is the input of the l-1th layer, b l is the bias, σ is the activation function. This embodiment uses the ReLU activation function and uses pooling operations, such as maximum pooling, to downsample the output of the convolutional layer to reduce the dimension of the feature map. i,j pool =max m,n (x i+m,j+n conv ), flatten the output of the pooling layer and input it into the fully connected layer to further extract high-level features, y l =σ(W l ·x l-1 +b l ), where W l is the weight matrix, x l-1 is the flattened input, b l is bias.
[0048] The high-level features extracted by the convolutional neural network CNN are used as the input of LSTM, with a shape of (T, F), where T is the number of time steps and F is the number of features. LSTM is used to capture time series features and has an input gate, a forget gate, an output gate, and a cell state. Specifically, the input gate, i t =σ(W i ·[h t-1 ,x t ]+b i ), forget gate, f t =σ(W f ·[h t-1 ,x t ]+b f ), cell state update, C~t =tanh(W C ·[h t-1 ,x t ]+b C ), C t =f t ⊙C t-1 +i t ⊙C~ t , output gate, o t =σ(W o ·[h t-1 ,x t ]+b o ), hidden state, h t =o t ⊙tanh(C t ), where x t is the input of the current time step, h t-1 is the hidden state of the previous time step, C t is the cell state at the current time step, σ is the sigmoid activation function, tanh is the hyperbolic tangent function, W i , W f , W C , W o and b i 、b f 、b C 、b o is the weight and bias of the model, ⊙ represents the element product, and the spatiotemporal features h of the two-dimensional water quality image are extracted through the CNN-LSTM structure. t .
[0049] As an optional solution of the present application, the water pollution prediction module converts the output h of the LSTM layer into t As the input of the deconvolution layer, the shape is (T, F), and the deconvolution operation is used to map the output of the LSTM layer back to the original two-dimensional space, y i,j l =σ(∑ m=0 M-1 ∑ n=0 N-1 w m,n l ·x i-m,j-n l-1 +b l ), where y i,j l is the output of the lth deconvolution layer, w m,n l is the deconvolution kernel weight, x i-m,j-n l-1 is the input of the l-1th layer, b lis the bias, σ is the activation function. In this embodiment, the ReLU activation function is used. The deconvolution layer upsamples the input data to restore it to the original two-dimensional image size. i,j up =∑ m=0 M-1 ∑ n=0 N-1 w m,n ·x i-m,j-n The final output is a two-dimensional water pollution degree image of the predicted real-time and future period, with a shape of (D,H,W,1), where D is the depth, H is the height, W is the width, and the number of channels is 1, indicating the predicted pollution degree. Specifically, for each time step, the LSTM output h t Perform deconvolution operation to obtain a two-dimensional image Y at each time step i,j , the activation function of the output layer uses a linear activation function, and the loss function uses the mean square error (MSE), the formula is, MSE=1 / N∑ i=1 N (y i -y^ i ) 2 , where N is the number of samples and y i is the true value of the i-th sample, y^ i is the predicted value of the i-th sample. When the model is trained, different monitoring sub-areas are labeled with a specific value, representing the pollution level of the monitoring sub-area, and supervised learning is used to minimize the difference between the predicted value and the true value.
[0050] It should be noted that the convolutional neural network layer, LSTM layer and deconvolution layer used for spatiotemporal feature extraction and prediction are connected in sequence to form a water pollution prediction model. The CNN-LSTM in the water pollution prediction model is used to extract spatiotemporal features, and the deconvolution layer is used to realize short-term prediction of two-dimensional water quality images.
[0051] In the above technical solution, by utilizing the CNN-LSTM architecture in the data fusion feature extraction module, the system can automatically extract valuable spatiotemporal features from massive multi-source data. The water pollution prediction module uses deconvolution operation to map the LSTM output back to the original two-dimensional space, which can intuitively display the degree of water pollution in each monitoring sub-area and predict the water quality change trend in the future, providing timely and effective decision-making basis for management departments.
[0052] As an optional solution of this application, the real-time monitoring dynamic adjustment module uses the spatiotemporal features extracted by CNN-LSTM and combines reinforcement learning to determine the monitoring frequency and alarm threshold scheme of each sensor and camera, where the spatiotemporal features extracted by the CNN-LSTM model are used as the state of reinforcement learning, and the state is represented by a state vector st =h t , where h t is the hidden state of LSTM, which contains the spatiotemporal features of the current moment. The action is the monitoring frequency and alarm threshold change of each sensor and camera. The action can be represented by a vector a t , is a multidimensional vector. Each dimension corresponds to the adjustment of the monitoring frequency or alarm threshold of a sensor or camera. The adjustment range can be designed according to the landscape structure. The reward function comprehensively considers monitoring accuracy, energy consumption and response speed. The reward function can be expressed as R=αR accuracy +βR energy +γR response , where α, β, and γ are coefficients for adjusting the weights of each part, and the monitoring accuracy reward R accuracy The error between the predicted pollution level and the actual pollution level is measured using the mean square error (MSE) as the metric, R accuracy =-MSE(y true ,y pred ), where MSE is the mean square error, y true is the true value, y pred is the predicted value, and the energy penalty R energy Measure the impact of monitoring frequency on energy consumption. The higher the monitoring frequency, the greater the energy consumption. energy =-∑ i=1 N Energy(f i ), where Energy(f i ) represents the energy consumption of the i-th sensor or camera, and its monitoring frequency f i Relevant, response speed reward R response Measures the system's response speed to pollution events. The higher the monitoring frequency, the faster the system responds. response =-Delay, where Delay represents the system response delay.
[0053] The Deep Q Network (DQN) algorithm is used to train the agent. The Q function is approximated by a neural network. The Q function Q(s,a) represents the expected reward after taking action a in state s. The input layer of the deep Q network receives the current state s. t The hidden layer consists of multiple fully connected layers or convolutional layers to extract high-order features of the state. The output layer outputs the Q value of all possible actions, which represents the expected reward of each action in the current state. The loss function is, L(θ)=E (st,at,rt,st+1) [(r t +γmax a′ Q(s t+1 ,a′;θ - )-Q(s t ,a t;θ)) 2 ], where θ is the parameter of the current Q network, θ - It is the parameter of the target Q network, which is regularly updated to the value of θ. E represents the expected value. When the reinforcement learning model is trained, the Q network parameters θ and the target Q network parameters θ are initialized. - , initialize the experience replay buffer to store experience data (s t ,a t ,r t ,s t+1 ), in the current state s t Next, select action a according to the ε-greedy strategy t , perform action a t , observe the next state s t+1 and instant rewards t , will (s t ,a t ,r t ,s t+1 ) is stored in the experience replay buffer, a small batch of experience samples are randomly extracted from the experience replay buffer, the loss is calculated using the above loss function L(θ) and the Q network parameter θ is updated. Every fixed number of steps, the target Q network parameter θ is updated. - Updated to the current Q network parameter θ, through continuous interaction with the environment and experience playback, the agent gradually learns the optimal actions to take under different states, thereby optimizing the sampling frequency and alarm threshold.
[0054] In the above technical solution, the real-time monitoring dynamic adjustment module is combined with the reinforcement learning algorithm, which can continuously optimize the system's prediction and decision-making capabilities based on environmental feedback, automatically adjust the sampling frequency and alarm threshold, and ensure efficient operation and timely response of the system.
[0055] As an optional solution of the present application, the risk assessment and early warning module utilizes the optimal sensors and camera monitoring frequencies and alarm thresholds provided by the real-time monitoring dynamic adjustment module to conduct real-time assessments of the pollution levels of each monitoring sub-area, and issues early warnings based on preset risk levels. It receives real-time two-dimensional water pollution level images predicted by the water pollution prediction model, and compares the pollution levels of each monitoring sub-area with the alarm thresholds in combination with the monitoring frequency and alarm thresholds determined by the real-time monitoring dynamic adjustment module. When the risk score of a monitoring sub-area exceeds the set threshold, the early warning mechanism is triggered. The early warning information may include the geographical location of the monitoring sub-area, the pollution level, the risk level, and recommended response measures, etc., and is pushed to relevant managers and emergency response teams in real time through various means such as the system interface, text messages, and emails.
[0056] In the above technical solution, the risk assessment and early warning module conducts a comprehensive assessment of the water pollution risk based on the prediction results of the water pollution prediction module and the automatically adjusted alarm threshold, and sends alarm information to relevant management departments through multiple channels to ensure that water quality safety is promptly and effectively protected.
[0057] As an optional solution of this application, the data storage and analysis module is responsible for collecting and storing real-time monitoring data, prediction results, alarm records, user feedback and other information to support subsequent data analysis and decision-making. It adopts a distributed storage architecture to ensure high availability, scalability and fault tolerance of data. The data storage adopts a time series database (TSDB) to support fast reading, writing and query operations on a large amount of time series data. The data storage and analysis module adopts multi-level security protection measures, including data encryption, access control, audit logs, etc., to ensure the integrity and security of the data, and supports data backup and recovery functions to cope with possible data loss or damage risks. The data analysis reports that can be generated regularly help management departments fully understand water quality changes and system performance, and provide strong support for future decision-making.
[0058] Please refer to Figure 4 , which shows a flow chart of a municipal garden water pollution monitoring method based on big data analysis provided by an embodiment of the present application. The municipal garden water pollution monitoring method based on big data analysis includes the following steps.
[0059] S1. Arrange multi-source data acquisition equipment around garden water bodies to comprehensively monitor changes in the environment and water quality.
[0060] S2. The real-time collected data is sent to the data center through wireless transmission technology. The data center cleans and preprocesses the received raw data to remove noise, outliers and duplicate data.
[0061] S3. In the data fusion feature extraction module, the cleaned and preprocessed data are integrated according to the time and space dimensions to form a spatiotemporal data set of multi-source data fusion, and the water pollution prediction combining convolutional neural network (CNN) and long short-term memory network (LSTM) is used for feature extraction.
[0062] S4. In the water pollution prediction module, deconvolution operation is performed on the features extracted by water pollution prediction to predict the image data of water pollution degree in each monitoring sub-area in real time and in the future.
[0063] S5. The real-time monitoring dynamic adjustment module introduces a reinforcement learning algorithm, uses the features extracted from water pollution prediction, and continuously optimizes the system's prediction and decision-making capabilities based on environmental feedback. When changes in pollution risks are detected, the system will automatically adjust the sampling frequency and alarm threshold.
[0064] S6. The risk assessment and early warning module assesses the water pollution risk based on the prediction results of the water pollution prediction module, combined with the automatically adjusted sampling frequency and alarm threshold. When the predicted pollution risk level exceeds the threshold, the early warning mechanism is triggered, and the early warning system will send alarm information to relevant management departments through multiple channels.
[0065] S7. The data storage and analysis module automatically stores all monitoring data, prediction results and warning records in the cloud database.
Claims
1. A municipal garden water pollution monitoring system based on big data analysis, characterized in that: The system comprises: Multi-source data acquisition and processing module deploys multi-parameter sensors to collect water quality data in real time, and uses a video monitoring system combined with target monitoring technology to obtain the density of floating objects on the water surface; The data fusion feature extraction module splices the data collected by the multi-source data collection and processing module, integrates the spliced data into a spatiotemporal data set, and uses a convolutional neural network and a long short-term memory network to build a water pollution prediction model; The water pollution prediction module trains a water pollution prediction model based on the spatiotemporal data set, inputs the currently collected and integrated processed data into the trained water pollution prediction model, and performs real-time pollution degree prediction; The real-time monitoring dynamic adjustment module introduces a reinforcement learning algorithm to automatically adjust the sampling frequency and alarm threshold of the multi-source data acquisition and processing module based on the spatiotemporal features extracted by CNN-LSTM in the water pollution prediction model; The spatiotemporal features extracted by the CNN-LSTM model are used as the state of reinforcement learning. The action is the monitoring frequency and alarm threshold change of each sensor and camera. The reward function comprehensively considers monitoring accuracy, energy consumption and response speed. Use the deep Q network algorithm to train the agent, and use a neural network to approximate the Q function. The input layer of the deep Q network receives the current state, the hidden layer is used to extract the high-order features of the state, and the output layer outputs the Q value of all possible actions, indicating the expected reward of each action in the current state; Select actions according to the ε-greedy strategy, execute actions, observe the next state and immediate reward, calculate the loss based on the loss function and update the Q network parameters to obtain the optimal actions taken under different states, thereby optimizing the sampling frequency and alarm threshold; The reward function is: R=αR accuracy +βR energy +γR response Among them, R accuracy , R energy , R response They are monitoring accuracy reward, energy consumption penalty and response speed reward, and α, β, and γ are coefficients for adjusting the weights of each part; Monitoring accuracy reward R accuracy =-MSE(y true ,y pred ), which is used to measure the error between the predicted pollution level and the actual pollution level, where MSE is the mean square error, y true is the true value, y pred is the predicted value; Energy consumption penalty R energy =-∑ i=1 N Energy(f i ), which is used to measure the impact of monitoring frequency on energy consumption. The higher the monitoring frequency, the greater the energy consumption. N is the number of samples, Energy(f i ) represents the energy consumption of the i-th sensor or camera, and its monitoring frequency f i Related; Response speed reward R response =-Delay is used to measure the system's response speed to pollution events. The higher the monitoring frequency, the faster the system responds. Delay represents the system response delay.
2. The municipal garden water pollution monitoring system based on big data analysis according to claim 1 is characterized in that: The system further comprises: The risk assessment and early warning module assesses the water pollution risk based on the prediction results of the water pollution prediction module. When the predicted pollution risk level exceeds the alarm threshold determined by the real-time monitoring dynamic adjustment module, the early warning mechanism is triggered; Data storage and analysis module: all monitoring data, prediction results and warning records will be automatically stored in the cloud database.
3. The municipal garden water pollution monitoring system based on big data analysis according to claim 1 is characterized in that: The multi-source data acquisition and processing module includes a data acquisition unit, a data transmission unit and a data center unit. The data acquisition unit divides the water body of the municipal garden into different monitoring sub-areas, uses multi-parameter sensors to monitor water quality parameters at different locations of the water body, and uses a video monitoring system combined with target monitoring technology to identify the density of floating objects on the water surface in each monitoring sub-area. The data transmission unit sends the collected data to the data center unit through wireless transmission technology; The data center unit receives real-time data from various sensor nodes and processes the data using data cleaning and preprocessing algorithms.
4. According to the municipal garden water pollution monitoring system based on big data analysis according to claim 3, the density of floating objects on the water surface of each monitoring sub-area is identified by using a video monitoring system combined with target monitoring technology, specifically: The target monitoring model YOLOv3 is used to identify floating objects on the water surface captured by video surveillance as rectangular frames, and the number of rectangular frames in a monitoring sub-area is counted to obtain the density of floating objects in the sub-area.
5. The municipal garden water pollution monitoring system based on big data analysis according to claim 1 is characterized in that: The data fusion feature extraction module includes an integrated data set unit, which uses each monitoring sub-area as a pixel to produce a two-dimensional water quality image, splices the water quality parameters collected by the multi-parameter sensor with the density of floating objects on the water surface to form a multi-dimensional feature vector, and integrates the two-dimensional water quality image and the multi-dimensional feature vector to form a spatiotemporal data set.
6. The municipal garden water pollution monitoring system based on big data analysis according to claim 5 is characterized in that: The data fusion feature extraction module also includes a feature extraction unit, in which a water quality pollution prediction model is built. The water quality pollution prediction model includes a convolutional neural network layer, an LSTM layer and a deconvolution layer connected in sequence. The CNN-LSTM in the water quality pollution prediction model is used to extract spatiotemporal features, and the short-term prediction of the two-dimensional water quality image is achieved through the deconvolution layer.
7. The municipal garden water pollution monitoring system based on big data analysis according to claim 6 is characterized in that: The feature extraction unit uses a convolutional neural network to extract the spatial features of the two-dimensional water quality image. The input layer inputs the preprocessed two-dimensional image data. The convolution layer uses a convolution kernel to perform a convolution operation on the input data to extract spatial features. The output of the convolution layer is downsampled using a pooling operation to reduce the dimension of the feature map. The output of the pooling layer is flattened and input into the fully connected layer to further extract high-level features. The high-level features extracted by the convolutional neural network are used as the input of the long short-term memory network. The long short-term memory network is used to capture time series features and extract the spatiotemporal characteristics of the two-dimensional water quality image through the CNN-LSTM structure.
8. The municipal garden water pollution monitoring system based on big data analysis according to claim 6 or 7 is characterized in that: The water pollution prediction module uses the output of the LSTM layer as the input of the deconvolution layer, and uses the deconvolution operation to map the LSTM output back to the original two-dimensional space. The deconvolution layer upsamples the input data and restores it to the original two-dimensional image size. The final output is the predicted two-dimensional water pollution degree image in real time and in the future.
9. The municipal garden water pollution monitoring system based on big data analysis according to claim 1 or 6 is characterized in that: The real-time monitoring dynamic adjustment module uses the spatiotemporal features extracted by CNN-LSTM and combines reinforcement learning to determine the monitoring frequency and alarm threshold scheme of each multi-parameter sensor and camera in the video surveillance system.
10. The municipal garden water pollution monitoring system based on big data analysis according to claim 2 is characterized in that: The risk assessment and early warning module uses the real-time two-dimensional water pollution degree image predicted by the water pollution prediction model, combined with the optimal monitoring frequency and alarm threshold determined by the real-time monitoring dynamic adjustment module, to conduct real-time assessment of the pollution degree of each monitoring sub-area and issue early warnings based on the preset risk level.
11. The municipal garden water pollution monitoring system based on big data analysis according to claim 2 is characterized in that: The data storage and analysis module is responsible for collecting and storing real-time monitoring data, prediction results, alarm records and user feedback information. The data storage uses a time series database.
12. A municipal garden water pollution monitoring method based on big data analysis, applied to the municipal garden water pollution monitoring system based on big data analysis as claimed in any one of claims 2 to 11, characterized in that: The method comprises: S1. Arrange multi-source data acquisition equipment around the garden water bodies to comprehensively monitor changes in the environment and water quality; S2, sending the real-time collected data to the data center through wireless transmission technology, and the data center cleans and preprocesses the received raw data to remove noise, outliers and duplicate data; S3, the cleaned and preprocessed data are integrated according to the time and space dimensions to form a spatiotemporal data set of multi-source data fusion, and the water pollution prediction combined with convolutional neural network and long short-term memory network is used for feature extraction; S4, performing a deconvolution operation on the features extracted for water pollution prediction, and predicting the image data of water pollution degree in each monitoring sub-area in real time and in the future; S5, introducing a reinforcement learning algorithm, based on the features extracted by the water pollution prediction in step S3, automatically adjusting the sampling frequency and alarm threshold of the multi-source data acquisition device; S6. Based on the water pollution prediction result obtained in step S4, combined with the sampling frequency and alarm threshold automatically adjusted in step S5, the water pollution risk is evaluated. When the predicted pollution risk level exceeds the threshold, the early warning mechanism is triggered; S7. The data storage and analysis module automatically stores all monitoring data, prediction results and warning records in the cloud database.
Citation Information
Patent Citations
Municipal garden water pollution monitoring system based on big data analysis
CN118037057A
Marine ranch disaster decision-making method based on reinforcement learning
CN115587713A
Water eutrophication prediction method based on improved MIMO depth dual 3Q learning
CN116307255A
Landscaping engineering project intelligent management system
CN118261401A
Autonomous driving methods and apparatuses
US20200192392A1
