A water quality anomaly detection and analysis method and system based on deep learning
Through deep learning technology, the features in the water quality image are extracted and abnormal detection is carried out, which solves the accuracy and efficiency problems of traditional water quality monitoring methods, real-time and accurate monitoring and analysis of water quality status is achieved, and scientific decision-making support is provided.
Patent Information
- Application Number
- CN202411059592.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-05
- Publication Date
- 2024-11-08
- Estimated Expiration
- 2044-08-05
AI Technical Summary
Traditional water quality monitoring methods rely on manual observation and manual analysis, resulting in inaccurate and low efficiency of analysis results, and are easily affected by subjective factors, and cannot monitor water quality changes in real time.
Using deep learning-based water quality anomaly detection and analysis method, sub-pixel interpolation expansion, multi-layer convolution learning, multi-scale decomposition and deep characterization stacking, extract water quality characteristics, and perform deep image differential mining and Local abnormal characteristics are localized, predict the evolutionary trend of water quality, and generate the results of water quality abnormality detection and evaluation.
It realizes accurate and rapid judgment of water quality status, reduces artificial misjudgment, improves the credibility and efficiency of monitoring results, can capture water quality changes in real time, and provides scientific basis for water quality management decisions.
Smart Images

Figure CN118570211B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of water quality detection, and in particular to a water quality anomaly detection and analysis method and system based on deep learning. Background Art
[0002] In today's society, water quality monitoring and management are crucial to environmental protection and human health. However, traditional water quality monitoring methods have the limitation of relying on manual observation and manual analysis, which often leads to inaccurate analysis results and low efficiency. With the rapid development and application of deep learning technology, water quality anomaly detection and analysis methods based on deep learning have become a cutting-edge technology, providing new technologies for solving challenges in the field of water quality monitoring.
[0003] Water quality anomaly detection has great potential under the framework of deep learning. Through deep learning algorithms, the system automatically learns and extracts features in water quality images, including color, texture, shape, etc., to achieve accurate judgment of water quality status. This method not only improves the accuracy and reliability of water quality monitoring, but also realizes real-time monitoring and rapid response, providing important decision-making support for water quality management departments. In traditional methods, water quality anomaly detection usually requires professional analysis and judgment, which is not only time-consuming and labor-intensive, but also easily affected by subjective factors. The water quality anomaly detection method based on deep learning can judge the water quality status more objectively and accurately, reduce the possibility of human misjudgment, and improve the credibility of monitoring results. Summary of the invention
[0004] In order to solve the above-mentioned technical problems, the present invention proposes a water quality anomaly detection and analysis method and system based on deep learning to solve at least one of the above-mentioned technical problems.
[0005] To achieve the above object, the present invention provides a water quality anomaly detection and analysis method based on deep learning, comprising the following steps:
[0006] Step S1: obtaining a real-time regional water quality image and a historical normal water quality state image; performing sub-pixel interpolation and expansion processing on the real-time regional water quality image to construct a super-resolution water quality image;
[0007] Step S2: Perform multi-layer convolution learning on the historical normal water quality state image to generate a multi-layer feature dimension map; construct a feature map on the multi-layer feature dimension map to obtain a deep water quality feature map;
[0008] Step S3: performing multi-scale decomposition on the super-resolution water quality image and calculating the frequency components to generate spatial frequency band frequency components; performing depth representation stacking on the spatial frequency band frequency components to generate an image depth representation tensor;
[0009] Step S4: performing deep image difference mining on the deep water quality characteristic map based on the image depth representation tensor to obtain water quality abnormality characteristic data;
[0010] Step S5: localizing the abnormal features of the super-resolution water quality image based on the abnormal water quality feature data to obtain an abnormal region with optimized boundaries;
[0011] Step S6: Predict the water quality evolution trend of the abnormal area with optimized boundaries based on the super-resolution water quality image, and conduct a comprehensive assessment of the global water quality trend to generate a water quality anomaly detection assessment result.
[0012] Preferably, step S1 comprises the following steps:
[0013] Step S11: Acquire real-time regional water quality image stream and historical normal water quality status image;
[0014] Step S12: Calculating the color components of the real-time regional water quality image to generate an image color component range;
[0015] Step S13: performing image color temperature distribution analysis on the real-time regional water quality image based on the image color component range to identify image color temperature distribution data;
[0016] Step S14: Calculating the light source error on the water surface according to the image color temperature distribution data, thereby obtaining the light source color temperature error parameter on the water surface;
[0017] Step S15: performing color temperature correction processing on the real-time regional water quality image based on the light source color temperature error parameter of the water surface to generate a color temperature corrected water quality image;
[0018] Step S16: Perform sub-pixel interpolation and expansion processing on the color temperature corrected water quality image to construct a super-resolution water quality image.
[0019] The present invention obtains water quality image streams and historical normal water quality status images in real time to compare the current water quality status with the normal status, provides basic data support for abnormality detection, conducts real-time monitoring and timely captures water quality changes, and is conducive to rapid response and management of water quality problems.
[0020] Color component calculation helps understand the color characteristics of water quality images, distinguish the color characteristics of different water areas, generate image color component ranges to provide basic data for subsequent color temperature distribution analysis, and help identify color information in images. Image color temperature distribution analysis helps understand the color temperature characteristics of different areas in water quality images, discover abnormal color temperature distribution, identify image color temperature distribution data, improve sensitivity to water color temperature changes, and provide more information for subsequent anomaly detection.
[0021] The water surface light source error calculation helps analyze the light source conditions on the water surface, discovers any abnormal light sources, and obtains the water surface light source color temperature error parameter to quantify the abnormality of the light source, providing a basis for subsequent correction processing. The color temperature correction processing eliminates the image color deviation caused by the light source color temperature error, improves the image accuracy and consistency, and generates a color temperature corrected water quality image to accurately analyze the true color of the water area, providing a more accurate basis for subsequent anomaly detection.
[0022] Sub-pixel interpolation and expansion processing improves the resolution and detail of water quality images, making the images clearer. Super-resolution water quality images are constructed to provide more detailed information and provide richer data support for water quality anomaly detection and analysis.
[0023] Preferably, the specific steps of step S16 are:
[0024] Perform sub-pixel fine-grained analysis based on the color temperature corrected water quality image and define the sub-pixel floating point translation offset value;
[0025] Perform pixel translation transformation on the color temperature corrected water quality image based on the sub-pixel floating point translation offset value to obtain a sub-pixel translation image;
[0026] Calculating pixel positions of the sub-pixel shifted image to obtain pixel positions of the output image;
[0027] Calculate the original image pixel position of the color temperature corrected water quality image to generate the original pixel position;
[0028] Performing sub-pixel coordinate analysis on the output image pixel position based on the original pixel position, and when the output image pixel is a sub-pixel coordinate, performing interpolation calculation to obtain an output pixel value of the sub-pixel;
[0029] When the pixel point of the output image is an integer coordinate point, sampling is performed to obtain the output pixel value;
[0030] Repeat the above operation until all output image pixels are traversed and all sub-pixel translation image output pixel values are extracted;
[0031] The pixel values output by the sub-pixel translation image are reconstructed into a super-resolution image to construct a super-resolution water quality image.
[0032] The present invention achieves more sophisticated image processing by carefully adjusting the position of pixels by defining sub-pixel floating-point translation offset values. Image adjustment is performed at the sub-pixel level through pixel translation transformation to improve the precision and accuracy of the image. Calculating the pixel position ensures that each pixel is accurately processed to avoid information loss or distortion. Super-resolution image reconstruction is performed on the sub-pixel translation image output pixel value to improve the clarity and detail of the image, and to construct a more sophisticated super-resolution water quality image.
[0033] Preferably, the specific steps of step S2 are:
[0034] Step S21: performing multi-layer convolution learning on the historical normal water quality state image to generate a multi-layer image convolution feature vector;
[0035] Step S22: performing statistical analysis of distinguishing features on the convolution feature vectors of the multi-layer image to extract the distinguishing feature vectors of each layer;
[0036] Step S23: Perform dimensionality reduction and compression processing on the distinguishing feature vectors of each layer to generate a multi-layer feature dimension graph;
[0037] Step S24: performing feature point distribution analysis on the multi-layer feature dimension graph to obtain layer-by-layer dimensional feature distribution data;
[0038] Step S25: construct a characteristic map of the layer-by-layer dimensional characteristic distribution data to obtain a deep water quality characteristic map.
[0039] The present invention extracts high-level features in images through multi-layer convolution learning, can capture the complex features and structures in water quality images, generate multi-layer image convolution feature vectors to convert image information into more representative feature vectors, and provide more meaningful data for subsequent analysis.
[0040] The statistical analysis of distinguishing features can help understand the importance and differences of each layer of feature vectors, help screen out the most representative features, and extract the distinguishing feature vectors of each layer to help understand the contribution of different levels of features to water quality anomaly detection, provide guidance for subsequent processing, and reduce the complexity and redundancy of data through dimensionality reduction and compression processing, thereby improving computational efficiency and the generalization ability of the model.
[0041] Generate a multi-layer feature dimension graph to display the information of multi-layer features in a more concise way, providing a clearer perspective for subsequent analysis. Feature point distribution analysis understands the distribution of different features in each dimension, helps to find abnormal feature points, and obtains layer-by-layer dimensional feature distribution data to help further understand the structure and differences of multi-layer features, providing more in-depth information for anomaly detection.
[0042] The characteristic map construction integrates multiple layers of features to form a more comprehensive water quality characteristic map, which improves the comprehensive understanding of water quality anomalies and obtains deep water quality characteristic maps to discover the deep-level characteristics and laws of water quality anomalies.
[0043] Preferably, step S3 specifically comprises the following steps:
[0044] Step S31: performing multi-scale decomposition on the super-resolution water quality image to obtain a multi-scale water quality image frequency domain;
[0045] Step S32: performing spatial frequency distribution identification on the frequency domain of the multi-scale water quality image to obtain the spatial frequency band of each level;
[0046] Step S33: Calculate the frequency components of the spatial frequency bands of each level to generate frequency components of the spatial frequency bands;
[0047] Step S34: extracting time domain features from the super-resolution water quality image to generate image time domain features;
[0048] Step S35: Perform depth characterization stacking on the frequency components of the spatial frequency band based on the image time domain features to generate an image depth characterization tensor.
[0049] The present invention captures water quality image information at different scales through multi-scale decomposition, so that subsequent analysis can more comprehensively consider the details and overall characteristics of the water quality image, and obtain multi-scale water quality image frequency domain to provide frequency domain information, which provides a basis for subsequent frequency domain analysis and processing.
[0050] Spatial frequency distribution recognition understands the changes in water quality images at different frequencies, helps distinguish the characteristic information at different frequencies, and obtains the spatial frequency bands at each level to provide the target frequency range for subsequent frequency component calculations, extract information at specific frequencies, and calculate frequency components to quantitatively describe the characteristic information at different frequency bands, helping to understand the degree of influence of different frequencies on water quality images.
[0051] Generating spatial frequency band frequency components provides more specific frequency information for subsequent feature fusion and depth characterization. Time domain feature extraction can capture the changing patterns and laws of water quality images in the time domain, providing a basis for dynamic feature extraction of images. Generating image time domain features helps understand the overall characteristics of water quality images and provides multi-dimensional information for subsequent feature fusion and analysis.
[0052] Deep representation stacking can effectively fuse time domain features and frequency component information to generate a more representative image depth representation tensor. The generated image depth representation tensor comprehensively considers time domain and frequency information, providing a more comprehensive and multi-dimensional feature representation for water quality anomaly detection.
[0053] Preferably, the specific steps of step S4 are:
[0054] Step S41: performing difference comparison processing on the deep water quality characteristic map based on the image depth representation tensor to extract image difference features;
[0055] Step S42: performing deep image difference mining on the image difference features to obtain deep water quality difference features;
[0056] Step S43: performing water quality anomaly characteristic analysis on the deep water quality difference characteristics based on a preset water quality anomaly characteristic standard database to obtain water quality anomaly characteristic data.
[0057] The present invention can highlight the differences in deep water quality feature maps through difference contrast processing, help find significant differences between water quality images, extract image difference features to focus on distinguishing features, and provide more targeted feature data for subsequent water quality anomaly detection. Deep-level image difference mining further explores the tiny but important differences between images, understands the subtle characteristics of water quality image changes, and obtains deep water quality difference features to gain a deeper understanding of the sources and characteristics of water quality anomalies, providing more detailed and comprehensive data support for anomaly detection.
[0058] The water quality anomaly feature analysis compares the deep water quality difference features with the known anomaly feature standards to help identify the type and degree of water quality anomalies. The water quality anomaly feature data obtained provides specific anomaly feature indicators for anomaly detection and formulates targeted anomaly detection strategies and measures.
[0059] Preferably, the specific steps of step S5 are:
[0060] Step S51: performing unit segmentation processing on the super-resolution water quality image to obtain a unit water quality image;
[0061] Step S52: local abnormal feature positioning of the unit water quality image based on the water quality abnormal feature data, and marking the local abnormal feature water quality area;
[0062] Step S53: finely optimize the residual network boundary of the local abnormal characteristic water quality area to obtain a boundary optimized abnormal area.
[0063] The present invention divides the water quality image into units with independent characteristics through unit segmentation processing, so that the analysis of each unit is more effective. The unit water quality image obtained makes the positioning and analysis of the abnormal area more precise and accurate. The local abnormal feature positioning can be guided by the water quality abnormal feature data to accurately mark the abnormal area in the unit water quality image, thereby improving the detection accuracy of the abnormal area.
[0064] Marking local abnormal characteristic water quality areas accurately locates abnormal areas in unit water quality images, providing a basis for subsequent abnormal area processing. Fine optimization of the residual network boundary further improves the boundary accuracy of the abnormal area, making the boundary of the abnormal area clearer and more accurate. The boundary-optimized abnormal area provides more refined boundary information for subsequent analysis and processing of the abnormal area, and a deeper understanding and processing of the abnormal area.
[0065] Preferably, the specific steps of step S6 are:
[0066] Step S61: performing time series change analysis on the super-resolution water quality image to generate water quality image time series change data;
[0067] Step S62: Performing dynamic evolution quantitative analysis on the water quality image time series change data to obtain the dynamic evolution law of water quality;
[0068] Step S63: predicting the water quality evolution trend of the boundary optimized abnormal area according to the dynamic evolution law of water quality, thereby generating abnormal water quality trend prediction data;
[0069] Step S64: Perform a comprehensive global water quality situation assessment on the abnormal water quality situation prediction data to generate a water quality anomaly detection assessment result.
[0070] The present invention reveals the evolution trend and law of water quality images over time through time series change analysis, helps to understand the dynamic characteristics of water quality changes, generates water quality image time series change data to capture the key characteristics of water quality changes, and provides a data basis for subsequent analysis and prediction. Dynamic evolution quantitative analysis can quantify the time series change characteristics of water quality images, reveal the dynamic evolution law of water quality, help identify the regularity of water quality changes, obtain the dynamic evolution law of water quality, and deeply understand the changing mechanism and trend of water quality, providing a basis for subsequent prediction and situation analysis.
[0071] The water quality evolution trend prediction can predict the future evolution trend and status of abnormal water quality areas based on dynamic evolution laws, discover abnormal situations in advance, generate abnormal water quality trend prediction data, take preventive measures in time, ensure water quality safety, and reduce potential risks. The overall water quality situation comprehensive assessment compares and analyzes the abnormal water quality trend prediction data with the actual situation, evaluates the nature and impact of water quality anomalies, generates water quality anomaly detection and evaluation results, and promptly discovers and handles water quality anomalies to ensure water quality safety and environmental health.
[0072] Preferably, the specific steps of step S64 are:
[0073] Carry out abnormal water quality propagation evolution simulation on abnormal water quality characteristic data to obtain abnormal water quality propagation simulation data;
[0074] Based on the abnormal water quality propagation simulation data, the abnormal water quality diffusion trend is predicted to generate water quality diffusion trend prediction data;
[0075] According to the water quality diffusion trend prediction data, the potential range of abnormal water quality is calculated for the abnormal area with optimized boundaries to obtain the potential abnormal water quality area;
[0076] Based on the abnormal water quality situation prediction data, the global water quality situation of the potential abnormal water quality area is fitted to obtain the global abnormal area situation prediction map;
[0077] Conduct a comprehensive assessment of water quality detection on the global abnormal area situation prediction map to generate water quality anomaly detection and assessment results.
[0078] The present invention simulates the evolution of abnormal water quality propagation to understand the propagation laws and trends of abnormal water quality in water bodies, providing a basis for further prediction and control of abnormal water quality. The abnormal water quality propagation simulation data obtained helps identify the key factors and paths of abnormal water quality propagation, providing data support for subsequent analysis and prediction.
[0079] Predict the diffusion trend of abnormal water quality and promptly identify areas affected by abnormal water quality, take necessary control and preventive measures in advance, and generate water quality diffusion trend prediction data to help decision makers better understand the diffusion range and speed of abnormal water quality and take targeted measures.
[0080] Calculate the potential range of abnormal water quality to determine the area affected by abnormal water quality, provide a basis for emergency response and formulation of protective measures, obtain potential abnormal water quality areas to help identify potential risk areas, conduct targeted monitoring and management, perform global water quality situation fitting for potential abnormal water quality areas, comprehensively consider the impact of various factors on water quality, improve the prediction accuracy of abnormal water quality situation, obtain a global abnormal area situation prediction map to intuitively display the distribution of abnormal water quality, and provide an intuitive reference for decision makers.
[0081] Conducting comprehensive assessment of water quality testing comprehensively considers various factors and impacts of abnormal water quality, assesses the severity and urgency of the abnormal situation, provides support for the formulation of response measures, and generates water quality anomaly detection and assessment results to help decision makers fully understand the abnormal water quality situation and adjust and improve water quality protection measures in a timely manner.
[0082] In this specification, a water quality anomaly detection and analysis system based on deep learning is provided, which is used to execute the water quality anomaly detection and analysis method based on deep learning as described above, including:
[0083] Image enhancement module, used to obtain real-time regional water quality images and historical normal water quality status images; perform sub-pixel interpolation and expansion processing on real-time regional water quality images to construct super-resolution water quality images;
[0084] The feature map module is used to perform multi-layer convolution learning on the historical normal water quality state image to generate a multi-layer feature dimension map; construct a feature map on the multi-layer feature dimension map to obtain a deep water quality feature map;
[0085] The multi-scale decomposition module is used to perform multi-scale decomposition of the super-resolution water quality image and perform frequency component calculation to generate spatial frequency band frequency components; perform depth representation stacking on the spatial frequency band frequency components to generate an image depth representation tensor;
[0086] The deep difference mining module is used to perform deep image difference mining on the deep water quality feature map based on the image depth representation tensor to obtain water quality abnormality feature data;
[0087] An abnormal feature positioning module is used to locate local abnormal features of the super-resolution water quality image based on the water quality abnormal feature data to obtain an abnormal area with optimized boundaries;
[0088] The water quality situation assessment module is used to predict the water quality evolution situation of the boundary optimized abnormal area based on the super-resolution water quality image, and conduct a comprehensive assessment of the global water quality situation to generate water quality anomaly detection and assessment results.
[0089] The beneficial effects of the present invention are:
[0090] The present invention processes real-time regional water quality images through sub-pixel interpolation expansion to improve the resolution and clarity of images, more accurately capture subtle changes in water quality, and construct super-resolution water quality images to provide more details and information. The subsequent feature extraction and analysis process generates a deep water quality feature map to extract multi-layer features from historical normal water quality status images to help capture the diversity and complexity of water quality states. The construction of the feature map extracts high-level features of water quality data to provide richer information for subsequent anomaly detection and analysis. Multi-scale decomposition helps extract features of different scales from super-resolution water quality images, more comprehensively characterizes the spatial structure of water quality images, and generates image depth representation tensors to convert water quality image information into a data form that can be used for deep learning, providing a basis for subsequent analysis and mining.
[0091] The present invention further captures water quality anomaly feature data more accurately through deep image difference mining, helps identify anomalies in water quality, and obtains water quality anomaly feature data to provide an important basis for subsequent anomaly positioning and situation assessment, helping to respond to water quality problems in a timely manner. By locating local anomaly features, the abnormal area in the water quality image is accurately located, the anomaly is further analyzed and necessary control measures are taken. The determination of the boundary-optimized abnormal area more accurately describes the distribution of abnormal water quality, providing a basis for subsequent evaluation and prediction. Water quality evolution situation prediction and global water quality situation comprehensive evaluation help understand the trend and influencing factors of water quality changes, provide an important reference for water quality management and protection, generate water quality anomaly detection evaluation results to comprehensively evaluate water quality anomalies, provide a scientific basis for decision makers, and help formulate effective response measures. BRIEF DESCRIPTION OF THE DRAWINGS
[0092] Figure 1 A schematic diagram of the steps of a method for detecting and analyzing water quality anomalies based on deep learning according to the present invention;
[0093] Figure 2 Detailed implementation flow chart of step S1;
[0094] Figure 3 Detailed implementation flow chart of step S2;
[0095] Figure 4 Detailed implementation flow chart of step S3. DETAILED DESCRIPTION
[0096] The technical method of the present invention is clearly and completely described below in conjunction with the accompanying drawings.
[0097] The present application example provides a method and system for water quality anomaly detection and analysis based on deep learning. The execution subject of the method and system for water quality anomaly detection and analysis based on deep learning includes but is not limited to: mechanical equipment, data processing platform, cloud server node, network upload device, etc. equipped with the system can be regarded as the general computing node of the present application, and the data processing platform includes but is not limited to: at least one of an audio and image management system, an information management system, and a cloud data management system.
[0098] Example 1, please refer to Figures 1 to 4 , this embodiment 1 provides a water quality anomaly detection and analysis method based on deep learning, comprising the following steps:
[0099] Step S1: obtaining a real-time regional water quality image and a historical normal water quality state image; performing sub-pixel interpolation and expansion processing on the real-time regional water quality image to construct a super-resolution water quality image;
[0100] Step S2: Perform multi-layer convolution learning on the historical normal water quality state image to generate a multi-layer feature dimension map; construct a feature map on the multi-layer feature dimension map to obtain a deep water quality feature map;
[0101] Step S3: performing multi-scale decomposition on the super-resolution water quality image and calculating the frequency components to generate spatial frequency band frequency components; performing depth representation stacking on the spatial frequency band frequency components to generate an image depth representation tensor;
[0102] Step S4: performing deep image difference mining on the deep water quality characteristic map based on the image depth representation tensor to obtain water quality abnormality characteristic data;
[0103] Step S5: localizing the abnormal features of the super-resolution water quality image based on the abnormal water quality feature data to obtain an abnormal region with optimized boundaries;
[0104] Step S6: Predict the water quality evolution trend of the abnormal area with optimized boundaries based on the super-resolution water quality image, and conduct a comprehensive assessment of the global water quality trend to generate a water quality anomaly detection assessment result.
[0105] The above process improves the resolution of water quality images through sub-pixel interpolation and expansion processing, making the images clearer, capturing subtle water quality characteristics, constructing super-resolution water quality images to provide more details, accurately analyzing water quality conditions, and providing more reliable information for subsequent anomaly detection.
[0106] The multi-layer convolution learning in the above steps extracts abstract features from the image, helps identify patterns and regularities in water quality status, generates a deep water quality feature map that integrates historical water quality information, provides deep feature representation for subsequent anomaly detection, and improves detection accuracy.
[0107] Multi-scale decomposition and frequency component calculation can help analyze the structural characteristics of water quality images, capture information at different frequencies, and generate image depth representation tensors to combine spatial frequency information and depth features, providing a more comprehensive data basis for subsequent anomaly detection.
[0108] Deep image difference mining helps discover subtle changes and features of water quality anomalies, which can improve the sensitivity of anomaly detection. The water quality anomaly feature data obtained provides important clues for subsequent anomaly location and analysis, and enables accurate assessment of abnormal water quality conditions.
[0109] Local abnormal feature positioning can help accurately locate abnormal areas in water quality images and further analyze abnormal situations. The extraction of abnormal areas with boundary optimization helps highlight abnormal areas and provides an important basis for subsequent situation prediction and comprehensive evaluation. Water quality evolution situation prediction can help predict the development trend of abnormal situations and take timely measures to intervene and repair.
[0110] The comprehensive assessment of the global water quality situation combines local abnormal conditions with the overall water quality situation, provides a comprehensive assessment of the overall water quality situation, and generates water quality anomaly detection and assessment results to provide accurate data support for relevant departments and decision makers, guiding the implementation of water quality management and protection work.
[0111] Figure 1 The following is a schematic flow chart of a method for detecting and analyzing water quality anomalies based on deep learning according to the present invention. In this example, the method for detecting and analyzing water quality anomalies based on deep learning includes the following steps:
[0112] Step S1: obtaining a real-time regional water quality image and a historical normal water quality state image; performing sub-pixel interpolation and expansion processing on the real-time regional water quality image to construct a super-resolution water quality image;
[0113] In this embodiment, a camera or image sensor device with high-definition imaging capabilities, such as a high-definition digital camera, an industrial camera, etc., is selected, and the device is installed in the water area that needs to be monitored to ensure that the water quality conditions in the area can be clearly captured. The real-time water quality image of the current water area is obtained through the real-time image acquisition function of the device, and the resolution of the acquired image is ensured to be high enough to reflect the detailed characteristics of the water quality, such as particulate matter and plankton in the water. After obtaining authorization, relevant water quality image data of the water area in the past period of good water quality is obtained from the database of the water quality management department. These images come from previous water quality monitoring records, or are water quality status surveys conducted specifically for the water area, to ensure that these historical images can truly reflect the water quality characteristics of the water area under normal conditions.
[0114] Sub-pixel interpolation algorithms in digital image processing technology, such as bilinear interpolation and bicubic interpolation, are used to amplify the original low-resolution water quality images to increase the resolution and detail information of the images. The interpolation algorithm is used to calculate the values of the newly added intermediate pixels based on the values of the adjacent pixels in the image, thereby generating an image with a higher resolution, ensuring that the interpolation process does not introduce too many artifacts or distortions and maintains image quality.
[0115] The real-time water quality images that have undergone sub-pixel interpolation and expansion processing are compared and analyzed with the historical normal water quality images collected previously to check whether the super-resolution water quality images can accurately reflect the actual water quality status and detailed characteristics of the current water area. Based on the comparison results, the image processing parameters are further optimized and adjusted to ensure that the super-resolution image quality meets the requirements, and finally a high-quality super-resolution water quality image is generated that can be used for subsequent water quality anomaly detection and analysis.
[0116] Step S2: Perform multi-layer convolution learning on the historical normal water quality state image to generate a multi-layer feature dimension map; construct a feature map on the multi-layer feature dimension map to obtain a deep water quality feature map;
[0117] In this embodiment, a historical normal water quality status image data set obtained previously is collected, and a suitable deep learning convolutional neural network model, such as VGGNet, ResNet, etc., is selected, and the historical water quality images are input into the convolutional neural network model for training. In multiple hidden layers of the network, multi-layer feature representations of the water quality images are extracted, including features at different levels such as edges, textures, and shapes. The network parameters are optimized through a back propagation algorithm so that the extracted features can express the information of the water quality status to the maximum extent, and a set of multi-layer feature dimensional graphs representing the water quality status are obtained. The multi-layer feature dimensional graphs obtained in the previous step are integrated and processed, and a feature map generation module is designed to map the multi-layer feature dimensional graphs to a high-dimensional feature space. In the high-dimensional feature space, clustering or dimensionality reduction techniques, such as t-SNE, UMAP, etc., are used to construct a two-dimensional or three-dimensional feature map.
[0118] On the characteristic map, similar water quality characteristics will gather together to form obvious clusters. Different clusters represent differences in water quality status, while the similarities of water quality are reflected within the clusters. Through the above steps, a two-dimensional or three-dimensional characteristic map that can deeply reflect the characteristics of water quality status is finally generated. This characteristic map contains multi-level information of water quality status and can be used for subsequent water quality anomaly detection and analysis. Each cluster in the characteristic map represents different water quality status characteristics, which can be further visualized and interpreted. By analyzing the changes in the characteristic map, the dynamic change trend of the water quality status can be monitored.
[0119] Step S3: performing multi-scale decomposition on the super-resolution water quality image and calculating the frequency components to generate spatial frequency band frequency components; performing depth representation stacking on the spatial frequency band frequency components to generate an image depth representation tensor;
[0120] In this embodiment, a multi-scale decomposition technique, such as a Laplace pyramid and a discrete wavelet transform, is used to decompose the image into frequency components of different scales. Through the multi-scale decomposition, a feature representation of the image in different spatial frequency bands is obtained, including low-frequency components, medium-frequency components and high-frequency components. The low-frequency components reflect the overall structure and large-scale features of the image, while the medium- and high-frequency components contain detailed texture and edge information.
[0121] The frequency components of different scales are organized into a multi-scale feature representation to prepare for the subsequent frequency component calculation. For each scale of frequency components, its frequency characteristics in the horizontal, vertical and diagonal directions are calculated. The frequency domain analysis techniques such as discrete Fourier transform and discrete cosine transform are used to obtain the frequency components in each direction. These frequency components describe the energy distribution characteristics of the image in different spatial directions and reflect the detailed information of the water quality status.
[0122] The calculated frequency components are organized into a multi-dimensional spatial frequency band frequency component matrix, and the spatial frequency band frequency component matrix is input into a deep neural network model for feature learning. Model architectures such as convolutional neural networks and recurrent neural networks are used to extract deeper feature representations from the frequency components. By stacking multiple layers of networks, the complex correlations between frequency components are captured to obtain richer image representations. Finally, a high-dimensional image depth representation tensor is output, which contains the deep features of water quality images in multi-scale spatial frequency bands.
[0123] Step S4: performing deep image difference mining on the deep water quality characteristic map based on the image depth representation tensor to obtain water quality abnormality characteristic data;
[0124] In this embodiment, the depth representation tensor and the deep water quality feature map are input into a deep learning model, such as a convolutional neural network or an autoencoder. The deep learning model is used to compare and analyze the input depth representation tensor and feature map to mine the deep differences between them. This difference mining process helps to identify the abnormal water quality features in the image. After analysis by the difference mining model, abnormal water quality images are identified. For these abnormal images, their feature representations on the image depth representation tensor and feature map are extracted. These feature representations constitute the feature data of abnormal water quality, which includes the key factors that cause abnormal water quality. These abnormal feature data are used for subsequent water quality warnings and fault diagnosis.
[0125] Step S5: localizing the abnormal features of the super-resolution water quality image based on the abnormal water quality feature data to obtain an abnormal region with optimized boundaries;
[0126] In this embodiment, these abnormal feature data are associated with the high-resolution water quality image generated previously, and computer vision technologies such as target detection or semantic segmentation are used to locate the area corresponding to the abnormal feature on the image. This process accurately finds the local area with water quality abnormality in the image, and prepares for the subsequent boundary optimization. Edge detection, region growing and other technologies are used to optimize and refine the boundaries of the abnormal area. The purpose is to obtain a more accurate range of the abnormal area and avoid missed detection or false detection. Boundary optimization ensures that subsequent water quality diagnosis and early warning are targeted at areas where there are real problems. Finally, a high-resolution image that highlights the abnormal water quality area is obtained. The boundaries of the abnormal area are finely outlined, highlighting the location and range of the problem area. This result intuitively shows the specific location and degree of the water quality abnormality, providing a basis for subsequent water quality diagnosis and early warning.
[0127] Step S6: Predict the water quality evolution trend of the abnormal area with optimized boundaries based on the super-resolution water quality image, and conduct a comprehensive assessment of the global water quality trend to generate a water quality anomaly detection assessment result.
[0128] In this step, based on the boundary optimization of abnormal area information and combined with super-resolution water quality images, a time series prediction model is used to predict the water quality evolution trend in the abnormal area. This prediction model is a time series model based on machine learning or deep learning, such as LSTM, GRU, etc., which can capture the temporal dynamic characteristics of water quality data in abnormal areas.
[0129] Through model training and prediction, the water quality evolution trend of the abnormal area in a certain period of time in the future is obtained, including the changing trend of water quality indicators and the change of abnormal degree. The predicted results of water quality evolution in the abnormal area are comprehensively evaluated with the global water quality trend of the entire water area. This global evaluation takes into account multiple factors, such as the area proportion of the abnormal area, the degree of abnormality, the impact on the overall water quality, etc. Combining the above factors, an overall water quality anomaly detection evaluation result is generated to describe the current water quality status and future evolution trend.
[0130] Figure 2 The detailed implementation steps of step S1 are shown in the flowchart. The detailed implementation steps of step S1 include:
[0131] Step S11: Acquire real-time regional water quality image stream and historical normal water quality status image;
[0132] Step S12: Calculating the color components of the real-time regional water quality image to generate an image color component range;
[0133] Step S13: performing image color temperature distribution analysis on the real-time regional water quality image based on the image color component range to identify image color temperature distribution data;
[0134] Step S14: Calculating the light source error on the water surface according to the image color temperature distribution data, thereby obtaining the light source color temperature error parameter on the water surface;
[0135] Step S15: performing color temperature correction processing on the real-time regional water quality image based on the light source color temperature error parameter of the water surface to generate a color temperature corrected water quality image;
[0136] Step S16: Perform sub-pixel interpolation and expansion processing on the color temperature corrected water quality image to construct a super-resolution water quality image.
[0137] In this step, real-time regional water quality image stream data is obtained from water quality monitoring equipment or cameras, and representative images taken in the past under normal water quality conditions of the water area are collected as benchmark references. The real-time water quality images are converted into color space, such as from RGB space to HSV or Lab space, and the color component values of each pixel in the image, such as saturation (S), lightness (V), brightness (L), etc., are calculated respectively. The distribution range of these color component values is counted to obtain the color component range of the image.
[0138] Using the color component range information and the color temperature calculation formula, the color temperature of each pixel in the image is estimated, and the color temperature distribution of the pixels in the image is statistically analyzed to obtain a color temperature distribution histogram or other statistical indicators. The color temperature distribution data of the real-time water quality image is compared with the color temperature distribution data of the historical normal water quality image, and the difference between the two is calculated to obtain the deviation or error parameter of the color temperature of the water surface light source.
[0139] According to the color temperature error parameters of the light source, the real-time water quality image is corrected for color temperature. The correction method is a simple white balance adjustment, which is also a color temperature compensation based on the physical model. The corrected water quality image is obtained, and the color distortion is effectively corrected. The bilinear, bicubic and other sub-pixel interpolation algorithms are used to amplify the resolution of the water quality image after color temperature correction. Through interpolation expansion, a super-resolution water quality image with higher resolution and richer details is obtained. This high-resolution water quality image provides better input for subsequent water quality analysis.
[0140] In this embodiment, the specific steps of step S16 are:
[0141] Perform sub-pixel fine-grained analysis based on the color temperature corrected water quality image and define the sub-pixel floating point translation offset value;
[0142] Perform pixel translation transformation on the color temperature corrected water quality image based on the sub-pixel floating point translation offset value to obtain a sub-pixel translation image;
[0143] Calculating pixel positions of the sub-pixel shifted image to obtain pixel positions of the output image;
[0144] Calculate the original image pixel position of the color temperature corrected water quality image to generate the original pixel position;
[0145] Performing sub-pixel coordinate analysis on the output image pixel position based on the original pixel position, and when the output image pixel is a sub-pixel coordinate, performing interpolation calculation to obtain an output pixel value of the sub-pixel;
[0146] When the pixel point of the output image is an integer coordinate point, sampling is performed to obtain the output pixel value;
[0147] Repeat the above operation until all output image pixels are traversed and all sub-pixel translation image output pixel values are extracted;
[0148] The pixel values output by the sub-pixel translation image are reconstructed into a super-resolution image to construct a super-resolution water quality image.
[0149] In this embodiment, a fine-grained sub-pixel level analysis is performed on the water quality image after color temperature correction, and subtle changes in pixel values in the sub-pixel area around each pixel are calculated. Based on these subtle changes, the sub-pixel floating-point translation offset value of each pixel is defined, and the calculated sub-pixel floating-point translation offset value is used to perform a translation transformation on the water quality image after color temperature correction.
[0150] According to the offset value of each pixel point, it is translated to a new position to form a sub-pixel translated image. For each pixel point in the sub-pixel translated image, its coordinate position in the output image is calculated. Due to sub-pixel translation, the pixel point falls on an integer coordinate point or a floating point coordinate point. The position information of these output image pixels is recorded, and the coordinate position of each pixel point in the color temperature corrected water quality image in the original image is calculated. These original image pixel point position information will be used for subsequent sub-pixel coordinate analysis to determine whether each output image pixel point falls within the sub-pixel area of the original image. If it is a sub-pixel coordinate, interpolation calculation is required to obtain the output value. If it is an integer coordinate, the output value is directly sampled and determined as the output image pixel point of the sub-pixel coordinate.
[0151] Using bilinear, bicubic and other interpolation algorithms, the output value of the sub-pixel point is calculated according to the values of the surrounding original pixels. For the output image pixel points determined as integer coordinates, the pixel values of the corresponding positions in the original image are directly sampled as the output values. Each pixel point of the output image is processed, and the corresponding output pixel value is calculated regardless of sub-pixel coordinates or integer coordinates. The output values of all pixels are combined to construct the final sub-pixel shifted image. The pixel values of the sub-pixel shifted image are output, and super-resolution reconstruction algorithms such as SRGAN are applied. Through this super-resolution reconstruction, the resolution and detail expression ability of the water quality image are further improved, and finally a high-resolution super-resolution water quality image is obtained.
[0152] Figure 3 Detailed implementation steps of step S2 are shown in FIG. 1 . In this embodiment, the detailed implementation steps of step S2 include:
[0153] Step S21: performing multi-layer convolution learning on the historical normal water quality state image to generate a multi-layer image convolution feature vector;
[0154] Step S22: performing statistical analysis of distinguishing features on the convolution feature vectors of the multi-layer image to extract the distinguishing feature vectors of each layer;
[0155] Step S23: Perform dimensionality reduction and compression processing on the distinguishing feature vectors of each layer to generate a multi-layer feature dimension graph;
[0156] Step S24: performing feature point distribution analysis on the multi-layer feature dimension graph to obtain layer-by-layer dimensional feature distribution data;
[0157] Step S25: construct a characteristic map of the layer-by-layer dimensional characteristic distribution data to obtain a deep water quality characteristic map.
[0158] In this step, a certain number of historical normal water quality status images are collected as training data, a multi-layer convolutional neural network model is designed, and these normal water quality images are input. In each convolution layer of the model, multi-layer feature vectors of the image are extracted, including low-layer edge features, middle-layer texture features, high-layer semantic features, etc. These feature vectors at different levels are used as output to form a multi-layer image convolution feature vector. The multi-layer image convolution feature vector is statistically analyzed to calculate the degree of difference between the normal water quality image and the abnormal water quality image in the features of each layer of the feature vector.
[0159] The feature vector that is most capable of distinguishing normal water quality from abnormal water quality, namely, the distinguishing feature vector, is extracted. For each layer of distinguishing feature vectors, a dimensionality reduction algorithm such as principal component analysis (PCA) is applied to compress the dimension of the feature vector and generate a feature vector of lower dimension. These compressed feature vectors are visualized to form a multi-layer feature dimension graph. The multi-layer feature dimension graph is analyzed, and the distribution of feature vectors of each layer is analyzed. The statistical characteristics of the feature vector distribution, such as mean, variance, skewness, kurtosis, etc., are extracted to form layer-by-layer dimensional feature distribution data. The obtained feature distribution data of each layer are integrated into a complete feature map. This feature map describes the changes in water quality characteristics from low to high layers, and reflects the deep characteristics of the water quality state. This deep water quality feature map can be used for water quality state analysis and anomaly detection.
[0160] In this embodiment, reference Figure 4 The above is a schematic flow chart of the detailed implementation steps of step S3. In this embodiment, the detailed implementation steps of step S3 include:
[0161] Step S31: performing multi-scale decomposition on the super-resolution water quality image to obtain a multi-scale water quality image frequency domain;
[0162] Step S32: performing spatial frequency distribution identification on the frequency domain of the multi-scale water quality image to obtain the spatial frequency band of each level;
[0163] Step S33: Calculate the frequency components of the spatial frequency bands of each level to generate frequency components of the spatial frequency bands;
[0164] Step S34: extracting time domain features from the super-resolution water quality image to generate image time domain features;
[0165] Step S35: Perform depth characterization stacking on the frequency components of the spatial frequency band based on the image time domain features to generate an image depth characterization tensor.
[0166] In this embodiment, a multi-scale decomposition technology, such as wavelet transform, is used to decompose the high-resolution image into frequency domain representations of different scales to obtain a multi-scale water quality image frequency domain containing different spatial frequency components, identify the main spatial frequency distributions at each scale of the multi-scale water quality image frequency domain, divide the spatial frequency distributions at these different scales into several frequency bands, determine the corresponding spatial frequency band for each scale, calculate the frequency components of each determined spatial frequency band, including the statistical characteristics of the frequency band such as the mean, variance, and peak value, organize the frequency components of these frequency bands into vectors to form spatial frequency band frequency components, and in addition to frequency domain features, it is also necessary to extract the features of the water quality image in the time domain, calculate the time domain features of the image such as texture features, color features, and shape features, organize these time domain features into vectors to form image time domain features, fuse the obtained spatial frequency band frequency components and the obtained time domain features, and use a deep learning model, such as a neural network, to perform deep representation learning on these two types of features, and finally output a deep representation tensor containing frequency domain and time domain features as a comprehensive feature representation of the water quality image.
[0167] In this embodiment, step S4 includes the following steps:
[0168] Step S41: performing difference comparison processing on the deep water quality characteristic map based on the image depth representation tensor to extract image difference features;
[0169] Step S42: performing deep image difference mining on the image difference features to obtain deep water quality difference features;
[0170] Step S43: performing water quality anomaly characteristic analysis on the deep water quality difference characteristics based on a preset water quality anomaly characteristic standard database to obtain water quality anomaly characteristic data.
[0171] In this step, the depth representation tensors of multiple water quality images are compared pairwise to analyze the differences between them. Various difference measurement methods, such as Euclidean distance and cosine similarity, are used to quantify the differences between image depth features. These difference features are extracted to form an image difference feature vector. The obtained image difference features are analyzed to explore the deep-level water quality differences contained therein. An unsupervised clustering algorithm is used to identify the potential patterns and clustering structures in the image difference features, revealing the key differences between water quality images.
[0172] Extract the deep water quality difference features, prepare a predefined water quality anomaly feature standard database, which contains various known water quality anomaly feature patterns, compare and analyze the obtained deep water quality difference features with the anomaly features in the standard database, identify the parts that match the standard anomaly features as potential anomaly features in the current water quality image, and output these anomaly feature data to provide a basis for subsequent water quality anomaly detection.
[0173] In this embodiment, the specific steps of step S5 are:
[0174] Step S51: performing unit segmentation processing on the super-resolution water quality image to obtain a unit water quality image;
[0175] Step S52: local abnormal feature positioning of the unit water quality image based on the water quality abnormal feature data, and marking the local abnormal feature water quality area;
[0176] Step S53: finely optimize the residual network boundary of the local abnormal characteristic water quality area to obtain a boundary optimized abnormal area.
[0177] In this step, an image segmentation algorithm is used, such as region growing, watershed, K-means clustering and other methods, to divide the input image into multiple non-overlapping unit areas. These unit areas are squares, rectangles or other regular geometric shapes, and the size can be set according to actual needs. The corresponding water quality image block is extracted from each unit area as input for subsequent processing.
[0178] For each unit water quality image, anomaly detection is performed using a pre-trained water quality anomaly feature detection model. The model is a classifier based on machine learning, or an anomaly detection network based on deep learning. The output of the model identifies the abnormal feature area in each unit water quality image. The detected abnormal area is marked on the original unit water quality image, and the residual learning network is used to optimize the boundaries of these abnormal areas. The residual network uses mainstream image segmentation network architectures such as U-Net and FPN. Through residual learning, the network learns more refined boundary features from the boundaries of the original abnormal area. After optimization, a more accurate abnormal area boundary is obtained, that is, a boundary-optimized abnormal area. These optimized abnormal areas can be used for subsequent water quality analysis and processing.
[0179] In this embodiment, the specific steps of step S6 are:
[0180] Step S61: performing time series change analysis on the super-resolution water quality image to generate water quality image time series change data;
[0181] Step S62: Performing dynamic evolution quantitative analysis on the water quality image time series change data to obtain the dynamic evolution law of water quality;
[0182] Step S63: predicting the water quality evolution trend of the boundary optimized abnormal area according to the dynamic evolution law of water quality, thereby generating abnormal water quality trend prediction data;
[0183] Step S64: Perform a comprehensive global water quality situation assessment on the abnormal water quality situation prediction data to generate a water quality anomaly detection assessment result.
[0184] In this embodiment, the water quality images within a continuous time period are arranged in chronological order, and image registration and other techniques are used to align the water quality images in time series. The change between the water quality images at adjacent time points, such as pixel difference, SSIM and other indicators, is calculated, and these time series change data are integrated into water quality image time series change data. Time series analysis methods, such as Fourier analysis, ARIMA model, etc., are used to model the time series change data, and the periodicity, trend and other characteristics of the dynamic changes in water quality are analyzed from the model parameters and fitting results.
[0185] According to the analysis results, the quantitative laws of the dynamic evolution of water quality are summarized. Based on the obtained laws of the dynamic evolution of water quality, the water quality evolution trend in the abnormal area in the future is predicted. Time series prediction, dynamic system modeling and other methods can be used for prediction. The prediction results include the changing trend and peak time of water quality indicators in the abnormal area. These prediction results are organized into abnormal water quality trend prediction data. Combined with the global water quality status data, the abnormal water quality trend prediction results are evaluated as a whole. The evaluation indicators may include the severity and duration of water quality indicators in the abnormal area, as well as the degree of impact on the overall water quality. Combining the above evaluation indicators, the overall evaluation result of water quality anomaly detection is given, which can provide a basis for subsequent water quality management and governance.
[0186] In this embodiment, the specific steps of step S64 are:
[0187] Carry out abnormal water quality propagation evolution simulation on abnormal water quality characteristic data to obtain abnormal water quality propagation simulation data;
[0188] Based on the abnormal water quality propagation simulation data, the abnormal water quality diffusion trend is predicted to generate water quality diffusion trend prediction data;
[0189] According to the water quality diffusion trend prediction data, the potential range of abnormal water quality is calculated for the abnormal area with optimized boundaries to obtain the potential abnormal water quality area;
[0190] Based on the abnormal water quality situation prediction data, the global water quality situation of the potential abnormal water quality area is fitted to obtain the global abnormal area situation prediction map;
[0191] Conduct a comprehensive assessment of water quality detection on the global abnormal area situation prediction map to generate water quality anomaly detection and assessment results.
[0192] In this step, the water quality anomaly characteristic data, including location, degree and other information, is input, and a water quality anomaly propagation model based on physical transmission laws is constructed to simulate the diffusion process of abnormal water quality in the water body. Considering factors such as water flow and diffusion, a numerical simulation model is established to simulate the propagation evolution of abnormal water quality in time and space, and a series of time series abnormal water quality propagation simulation data are obtained to reflect the diffusion of abnormal water quality over time. The abnormal water quality propagation simulation data are analyzed to explore the water quality diffusion trend contained therein. The mathematical model of the water quality diffusion process is fitted using time series analysis, dynamic modeling and other methods. These models are used to predict the potential diffusion range and trend of abnormal water quality in a certain period of time in the future. These prediction results are summarized to form water quality diffusion trend prediction data.
[0193] Combined with the diffusion trend prediction, the potential range of abnormal water quality diffusion is estimated, and this potential range is superimposed and analyzed with the boundary optimized abnormal area. The abnormal water quality situation prediction data is corresponded to the determined potential abnormal water quality area. The water quality situation of the global potential abnormal area is predicted by spatial interpolation, time series analysis and other methods. A global abnormal area situation prediction map including spatiotemporal changes is obtained. Combined with the global water quality monitoring data, a comprehensive evaluation is conducted on the water quality situation prediction results of the abnormal area. The evaluation indicators may include the duration of the anomaly, the speed of the range diffusion, the degree of impact on the overall water quality, etc. The comprehensive evaluation results are used to obtain the overall results of water quality anomaly detection, which can provide a basis for subsequent water quality management and emergency response.
[0194] Embodiment 2: This embodiment 2 provides a water quality anomaly detection and analysis system based on deep learning, which is used to execute the water quality anomaly detection and analysis method based on deep learning as described in embodiment 1, including:
[0195] Image enhancement module, used to obtain real-time regional water quality images and historical normal water quality status images; perform sub-pixel interpolation and expansion processing on real-time regional water quality images to construct super-resolution water quality images;
[0196] The feature map module is used to perform multi-layer convolution learning on the historical normal water quality state image to generate a multi-layer feature dimension map; construct a feature map on the multi-layer feature dimension map to obtain a deep water quality feature map;
[0197] The multi-scale decomposition module is used to perform multi-scale decomposition of the super-resolution water quality image and perform frequency component calculation to generate spatial frequency band frequency components; perform depth representation stacking on the spatial frequency band frequency components to generate an image depth representation tensor;
[0198] The deep difference mining module is used to perform deep image difference mining on the deep water quality feature map based on the image depth representation tensor to obtain water quality abnormality feature data;
[0199] An abnormal feature positioning module is used to locate local abnormal features of the super-resolution water quality image based on the water quality abnormal feature data to obtain an abnormal area with optimized boundaries;
[0200] The water quality situation assessment module is used to predict the water quality evolution situation of the boundary optimized abnormal area based on the super-resolution water quality image, and conduct a comprehensive assessment of the global water quality situation to generate water quality anomaly detection and assessment results.
[0201] In summary, the present invention expands and processes real-time regional water quality images through sub-pixel interpolation, improves the resolution and clarity of the images, more accurately captures subtle changes in water quality, and constructs super-resolution water quality images to provide more details and information. The subsequent feature extraction and analysis process generates a deep water quality feature map to extract multi-layer features from historical normal water quality status images, helping to capture the diversity and complexity of water quality status. The construction of the feature map extracts high-level features of water quality data to provide richer information for subsequent anomaly detection and analysis.
[0202] Multi-scale decomposition helps extract features of different scales from super-resolution water quality images, more comprehensively characterizes the spatial structure of water quality images, generates image depth representation tensors to convert water quality image information into data forms that can be used for deep learning, and provides a basis for subsequent analysis and mining. Through deep image difference mining, it can more accurately capture water quality abnormality feature data, help identify abnormal conditions in water quality, and obtain water quality abnormality feature data. It provides an important basis for subsequent abnormality positioning and situation assessment, helps to respond to water quality problems in a timely manner, and accurately locates abnormal areas in water quality images through local abnormal feature positioning, further analyzes abnormal conditions and takes necessary control measures.
[0203] The determination of abnormal areas through boundary optimization can more accurately describe the distribution of abnormal water quality, provide a basis for subsequent evaluation and prediction, conduct water quality evolution trend prediction and comprehensive evaluation of the global water quality situation to help understand the trend and influencing factors of water quality changes, and provide an important reference for water quality management and protection. The generation of water quality anomaly detection and evaluation results can comprehensively evaluate water quality anomalies, provide a scientific basis for decision makers, and help formulate effective response measures.
[0204] As described above, only preferred embodiments are disclosed in the present invention, but it is not limited thereto. A person skilled in the art can easily understand the spirit of the present invention based on the above embodiments and make different extensions and changes. However, as long as they do not deviate from the spirit of the present invention, they are all within the protection scope of the present invention.
Claims
1. A water quality anomaly detection and analysis method based on deep learning, characterized in that: The following steps are involved: Step S1: obtaining a real-time regional water quality image and a historical normal water quality state image; performing sub-pixel interpolation and expansion processing on the real-time regional water quality image to construct a super-resolution water quality image; The specific steps of step S1 are: Step S11: Acquire real-time regional water quality image stream and historical normal water quality status image; Step S12: Calculating the color components of the real-time regional water quality image to generate an image color component range; Step S13: performing image color temperature distribution analysis on the real-time regional water quality image based on the image color component range to identify image color temperature distribution data; Step S14: Calculating the light source error on the water surface according to the image color temperature distribution data, thereby obtaining the light source color temperature error parameter on the water surface; Step S15: performing color temperature correction processing on the real-time regional water quality image based on the light source color temperature error parameter of the water surface to generate a color temperature corrected water quality image; Step S16: performing sub-pixel interpolation and expansion processing on the color temperature corrected water quality image to construct a super-resolution water quality image; Step S2: Perform multi-layer convolution learning on the historical normal water quality state image to generate a multi-layer feature dimension map; construct a feature map on the multi-layer feature dimension map to obtain a deep water quality feature map; Step S3: performing multi-scale decomposition on the super-resolution water quality image and calculating the frequency components to generate spatial frequency band frequency components; Performing depth representation stacking on the frequency components of the spatial frequency band to generate an image depth representation tensor; Step S4: performing deep image difference mining on the deep water quality characteristic map based on the image depth representation tensor to obtain water quality abnormality characteristic data; Step S5: localizing the abnormal features of the super-resolution water quality image based on the abnormal water quality feature data to obtain an abnormal region with optimized boundaries; Step S6: Predict the water quality evolution trend of the abnormal area with optimized boundaries based on the super-resolution water quality image, and conduct a comprehensive assessment of the global water quality trend to generate a water quality anomaly detection assessment result.
2. According to the method for water quality anomaly detection and analysis based on deep learning in claim 1, it is characterized in that: The specific steps of step S16 are: Perform sub-pixel fine-grained analysis based on the color temperature corrected water quality image and define the sub-pixel floating point translation offset value; Perform pixel translation transformation on the color temperature corrected water quality image based on the sub-pixel floating point translation offset value to obtain a sub-pixel translation image; Calculating pixel positions of the sub-pixel shifted image to obtain pixel positions of the output image; Calculate the original image pixel position of the color temperature corrected water quality image to generate the original pixel position; Performing sub-pixel coordinate analysis on the output image pixel position based on the original pixel position, and when the output image pixel is a sub-pixel coordinate, performing interpolation calculation to obtain an output pixel value of the sub-pixel; When the pixel point of the output image is an integer coordinate point, sampling is performed to obtain the output pixel value; Repeat the above operation until all output image pixels are traversed and all sub-pixel translation image output pixel values are extracted; The pixel values output by the sub-pixel translation image are reconstructed into a super-resolution image to construct a super-resolution water quality image.
3. The water quality anomaly detection and analysis method based on deep learning according to claim 1 is characterized in that: The specific steps of step S2 are: Step S21: performing multi-layer convolution learning on the historical normal water quality state image to generate a multi-layer image convolution feature vector; Step S22: performing statistical analysis of distinguishing features on the convolution feature vectors of the multi-layer image to extract the distinguishing feature vectors of each layer; Step S23: Perform dimensionality reduction and compression processing on the distinguishing feature vectors of each layer to generate a multi-layer feature dimension graph; Step S24: performing feature point distribution analysis on the multi-layer feature dimension graph to obtain layer-by-layer dimensional feature distribution data; Step S25: construct a characteristic map of the layer-by-layer dimensional characteristic distribution data to obtain a deep water quality characteristic map.
4. The method for detecting and analyzing water quality anomalies based on deep learning according to claim 1, characterized in that: The specific steps of step S3 are: Step S31: performing multi-scale decomposition on the super-resolution water quality image to obtain a multi-scale water quality image frequency domain; Step S32: performing spatial frequency distribution identification on the frequency domain of the multi-scale water quality image to obtain the spatial frequency band of each level; Step S33: Calculate the frequency components of the spatial frequency bands of each level to generate frequency components of the spatial frequency bands; Step S34: extracting time domain features from the super-resolution water quality image to generate image time domain features; Step S35: Perform depth characterization stacking on the frequency components of the spatial frequency band based on the image time domain features to generate an image depth characterization tensor.
5. The water quality anomaly detection and analysis method based on deep learning according to claim 1 is characterized in that: The specific steps of step S4 are: Step S41: performing difference comparison processing on the deep water quality characteristic map based on the image depth representation tensor to extract image difference features; Step S42: performing deep image difference mining on the image difference features to obtain deep water quality difference features; Step S43: performing water quality anomaly characteristic analysis on the deep water quality difference characteristics based on a preset water quality anomaly characteristic standard database to obtain water quality anomaly characteristic data.
6. The method for water quality anomaly detection and analysis based on deep learning according to claim 1 is characterized in that: The specific steps of step S5 are: Step S51: performing unit segmentation processing on the super-resolution water quality image to obtain a unit water quality image; Step S52: local abnormal feature positioning of the unit water quality image based on the water quality abnormal feature data, and marking the local abnormal feature water quality area; Step S53: finely optimize the residual network boundary of the local abnormal characteristic water quality area to obtain a boundary optimized abnormal area.
7. The method for water quality anomaly detection and analysis based on deep learning according to claim 1 is characterized in that: The specific steps of step S6 are: Step S61: performing time series change analysis on the super-resolution water quality image to generate water quality image time series change data; Step S62: Performing dynamic evolution quantitative analysis on the water quality image time series change data to obtain the dynamic evolution law of water quality; Step S63: predicting the water quality evolution trend of the boundary optimized abnormal area according to the dynamic evolution law of water quality, thereby generating abnormal water quality trend prediction data; Step S64: Perform a comprehensive global water quality situation assessment on the abnormal water quality situation prediction data to generate a water quality anomaly detection assessment result.
8. The method for water quality anomaly detection and analysis based on deep learning according to claim 7 is characterized in that: The specific steps of step S64 are: Carry out abnormal water quality propagation evolution simulation on abnormal water quality characteristic data to obtain abnormal water quality propagation simulation data; Based on the abnormal water quality propagation simulation data, the abnormal water quality diffusion trend is predicted to generate water quality diffusion trend prediction data; According to the water quality diffusion trend prediction data, the potential range of abnormal water quality is calculated for the abnormal area with optimized boundaries to obtain the potential abnormal water quality area; Based on the abnormal water quality situation prediction data, the global water quality situation of the potential abnormal water quality area is fitted to obtain the global abnormal area situation prediction map; Conduct a comprehensive assessment of water quality detection on the global abnormal area situation prediction map to generate water quality anomaly detection and assessment results.
9. A water quality anomaly detection and analysis system based on deep learning, characterized in that: The method for detecting and analyzing water quality anomalies based on deep learning as claimed in claim 1 comprises: Image enhancement module, used to obtain real-time regional water quality images and historical normal water quality status images; perform sub-pixel interpolation and expansion processing on real-time regional water quality images to construct super-resolution water quality images; The feature map module is used to perform multi-layer convolution learning on the historical normal water quality state image to generate a multi-layer feature dimension map; construct a feature map on the multi-layer feature dimension map to obtain a deep water quality feature map; The multi-scale decomposition module is used to perform multi-scale decomposition of the super-resolution water quality image and perform frequency component calculation to generate spatial frequency band frequency components; perform depth representation stacking on the spatial frequency band frequency components to generate an image depth representation tensor; The deep difference mining module is used to perform deep image difference mining on the deep water quality feature map based on the image depth representation tensor to obtain water quality abnormality feature data; An abnormal feature positioning module is used to locate local abnormal features of the super-resolution water quality image based on the water quality abnormal feature data to obtain an abnormal area with optimized boundaries; The water quality situation assessment module is used to predict the water quality evolution situation of the boundary optimized abnormal area based on the super-resolution water quality image, and conduct a comprehensive assessment of the global water quality situation to generate water quality anomaly detection and assessment results.
