Water quality monitoring analysis method and system based on unmanned aerial vehicle and deep learning
Through the UAV collecting multispectral data in waters and combining with deep learning networks for feature extraction and joint optimization, the problem of insufficient monitoring range and accuracy in the existing water quality monitoring methods is solved, and high-precision water quality monitoring and dynamic monitoring capabilities are achieved.
Patent Information
- Application Number
- CN202510386754.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-31
- Publication Date
- 2025-04-29
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing water quality monitoring methods are difficult to meet the needs of large-scale water area monitoring and high-precision water quality analysis at the same time, and there are problems such as limited monitoring range, insufficient accuracy and insufficient dynamic monitoring capabilities.
The water quality monitoring and analysis method based on drones and deep learning is adopted, and the water area multi-spectral data is collected through drones, multi-scale spatial features and spectral weighted features are extracted in combination with deep learning networks, and space and spectral joint optimization is carried out, a dual-path feature extraction architecture is constructed for multi-parameter joint regression, and the water quality index quantification results are generated and binary segmentation is performed, and the pollution threshold and core pollution source coordinates are calculated.
The balance between global law extraction and local abnormality capture of the monitored waters is achieved, and high-reliability segmentation results are generated, which improves the accuracy and dynamic monitoring capabilities of water quality monitoring, and solves the problem of insufficient monitoring range and accuracy in traditional methods.
Smart Images

Figure CN119904755A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of water quality monitoring, and in particular, to a water quality monitoring and analysis method and system based on unmanned aerial vehicle and deep learning. Background Art
[0002] As an important support for water environment management, water quality monitoring technology has a direct relationship with the scientificity and accuracy of pollution prevention and control decisions due to its monitoring efficiency and accuracy. The current mainstream water quality monitoring methods have many limitations: 1. The traditional fixed-point sampling method mainly relies on manual operation, which has the defects of insufficient temporal and spatial coverage and large fluctuations in sampling levels, making it difficult to accurately capture the dynamic diffusion characteristics of pollutants; 2. Although satellite remote sensing monitoring is conducive to expanding the monitoring range, it is subject to atmospheric interference and resolution limitations and cannot meet the needs of fine identification of sudden water pollution events; 3. Conventional data analysis models are not adaptable enough to the complex optical properties of water bodies, especially when multiple types of pollutants coexist, and feature misjudgment is prone to occur.
[0003] The above-mentioned technical shortcomings make it difficult for existing water quality monitoring solutions to simultaneously meet the needs of larger water area monitoring and high-precision water quality analysis. There are technical bottlenecks in data acquisition efficiency, multi-parameter analysis accuracy and dynamic monitoring capabilities, which restrict the ability to warn of water environment risks and respond to emergencies. Summary of the invention
[0004] In view of this, the present invention aims to provide a new water quality monitoring and analysis solution, which solves the problems of limited monitoring range and insufficient accuracy in traditional water quality monitoring methods by combining drone data acquisition technology and deep learning network technology.
[0005] In order to achieve the above object, the present invention discloses a water quality monitoring and analysis method based on drone and deep learning, comprising the following steps: S1: Use drones to collect original water multispectral data, eliminate illumination differences, and perform multispectral alignment to obtain preprocessed water multispectral data; S2: Extract multi-scale spatial feature maps and spectral weighted feature maps based on the pre-processed water multispectral data, and then perform spatial and spectral joint optimization to obtain feature enhancement maps; S3: Construct a dual-path feature extraction architecture, extract deep spectral feature maps through the main path, extract purification feature maps through the auxiliary path, perform multi-parameter joint regression based on the two feature maps, and obtain the quantitative result map of water quality indicators; The extracting of the deep spectral feature map comprises: performing feature optimization on the feature enhancement map through iterative calculation of multiple cascaded dilated residual blocks, wherein the dilation rate of each residual block is calculated according to the global average pooling result of the input feature map of the residual block; The extracting and purifying feature map comprises: performing global average pooling on the deep spectral feature map, performing global maximum pooling on the feature enhancement map, calculating a dynamic feature gate according to the two pooling results, and performing gated screening on the feature enhancement map after bilinear interpolation upsampling according to the dynamic feature gate; S4: Based on the water quality index quantification result map and feature enhancement map, a dynamic convolution kernel is generated through the fully connected layer, and combined with the deep spectral feature map, a preliminary segmentation feature map is extracted, and then edge gradient enhancement and threshold segmentation are performed to obtain a binary monitoring map; S5: Based on the binary monitoring map and the water quality index quantification result map, calculate the pollution threshold and core pollution source coordinates, and output the recommended sampling point set.
[0006] Furthermore, the step S1 includes: S11: The multispectral sensor carried by the UAV collects the water area reflectance spectral signal, and then unpacks and converts the original data format to obtain the original water area multispectral data; S12: According to the radiation transfer model, the original water area multispectral data is subjected to illumination normalization calculation to eliminate radiation distortion, thereby obtaining the water area multispectral data after illumination normalization; S13: According to the geometric correction algorithm, multispectral spatial registration and resampling are performed on the water area multispectral data after illumination normalization to obtain preprocessed water area multispectral data.
[0007] Furthermore, the step S2 includes: S21: Three different-sized depth-separable convolution operations are performed in parallel on the preprocessed water multispectral data, and a multi-scale spatial feature map is obtained after channel splicing, specifically: ; in, is a multi-scale spatial feature map, For channel splicing operations, , They are depth-wise separable convolution operations of size 3, 5, and 7, respectively. is the preprocessed water multispectral data; S22: Calculate the band importance coefficient according to the preprocessed water area multispectral data, and multiply it with the preprocessed water area multispectral data channel by channel to obtain a spectral weighted feature map, specifically: ; in, is the band importance coefficient, is the sigmoid function, is the fully connected layer, is the ReLU function, is the global average pooling, is the spectral weighted feature map, is channel-by-channel multiplication; S23: According to the multi-scale spatial feature map and the spectral weighted feature map, spatial and spectral joint optimization is performed to obtain a feature enhancement map, specifically: ; in, is the feature enhancement graph, is a convolution operation of size 1×1, It is an element-by-element addition operation.
[0008] It should be further explained that, in the spatial feature extraction stage, the present invention constructs a gradient complementary texture expression system by stacking lightweight convolution kernels with different receptive fields in parallel. This hierarchical and progressive feature fusion strategy overcomes the defect of traditional single-scale convolution in blurred water edge recognition, so that the fine ripples and macroscopic fluid morphology of the water body can be captured synchronously; in view of the characteristics of nonlinear coupling of reflectivity between bands in multispectral data, the present invention also innovatively introduces a spectral weighting mechanism based on channel attention guidance, and maps high-dimensional spectral responses to low-dimensional feature space through adaptive weight allocation. Compared with the more traditional fixed threshold band selection method, the present invention combines sigmoid function, global average pooling, ReLU function and fully connected layer to calculate the band importance coefficient, and then multiplies it channel by channel with the preprocessed water multispectral data to achieve dynamic band selection. Therefore, it has significant advantages in retaining weak reflection features and eliminating light interference, while improving feature expressiveness, it ensures the generalization adaptability of the model to dynamic water environment.
[0009] Furthermore, the step S3 includes: S31: feature optimization is performed on the feature enhancement map through the main path to obtain a deep spectral feature map, wherein the feature optimization is implemented by iterative calculation of n cascaded dilated residual blocks, specifically: For each , execute in sequence: ; in, is the expansion rate of the ith residual block, i is the residual block index, , is the softplus function, is the dilation weight matrix of the residual block, is the input feature map of the i-th residual block, is the intermediate feature map of the i-th residual block, The size is 3×3 and the expansion rate is The convolution operation, is a convolution operation of size 3×3 and dilation rate 2, is the feature map after feature optimization in the i-th residual block, Optimize the weight matrix for the features, is the input feature map of the i+1th residual block; Initial conditions , the final output As the deep spectral feature map, denoted as ; S32: According to the deep spectral feature map and the feature enhancement map, the dynamic feature gate is calculated through the auxiliary path, and combined with bilinear interpolation upsampling, the purified feature map is obtained, specifically: ; in, is the dynamic feature gate, is the global maximum pooling, To purify the feature map, is element-wise multiplication, It is a bilinear interpolation upsampling operation; S33: Based on the deep spectral characteristic graph and the purification characteristic graph, multi-parameter joint regression is performed to obtain a quantitative result graph of water quality indicators, specifically: ; in, is the chlorophyll concentration diagram, is the chlorophyll concentration weight matrix, is the turbidity diagram, is the turbidity weight matrix, is the total phosphorus content diagram, is the total phosphorus content weight matrix, This is a quantitative result diagram of water quality indicators.
[0010] It should be further explained that, in the deep feature extraction stage, the present invention constructs an expanded convolution kernel that can be adaptively adjusted with the feature response intensity through the joint constraints of nonlinear activation functions and global statistics; its mathematical essence is to dynamically adjust the receptive field range of the convolution operation through implicit modeling of the local feature distribution density. Compared with the traditional fixed expansion rate residual network, the present invention can effectively alleviate the problem of overfitting or underfitting of feature extraction caused by uneven distribution of suspended matter in water bodies; in addition, the present invention extracts the reflectance distribution law of the entire water body through global average pooling for the deep spectral features output by the main path, and the auxiliary path captures the spectral abnormal response of the local area based on the global maximum pooling. After splicing, the two are nonlinearly mapped to generate a spatially adaptive weight matrix; the feature map after sampling on the auxiliary path is then multiplied element by element. Spectral recalibration is performed to achieve low-confidence suppression of suspended matter scattering noise and edge blurred areas, while weighting of high-spectral sensitive areas is enhanced. Compared with the traditional fixed-ratio residual connection method, it can autonomously adjust the fusion coefficient according to the coupling strength of spectral-spatial characteristics in different water scenes, and effectively avoid the texture distortion and noise diffusion problems caused by interpolation upsampling at the edge of algae patches; finally, the present invention embeds the spectral sensitivity and spatial correlation of different water quality parameters into a unified mathematical framework through multi-target joint regression, and utilizes the implicit constraints between parameters to synchronously optimize the inversion results of chlorophyll, turbidity and total phosphorus content; compared with the independent regression model, the present invention can effectively solve the cross-interference problem caused by the overlapping of multi-parameter spectral absorption peaks, and ensures the spatial consistency of multi-dimensional water quality indicators while improving the inversion accuracy of single parameter.
[0011] Further, the step S4 includes: S41: Based on the water quality index quantification result map and feature enhancement map, a dynamic convolution kernel is generated through a fully connected layer, specifically: ; in, is the dynamic convolution kernel, Reshape operations for parameters that convert vectors to matrices; S42: Perform convolution calculation on the deep spectral feature map according to the dynamic convolution kernel to obtain a preliminary segmentation feature map, specifically: ; in, is the initial segmentation feature map, is the convolution operation; S43: Perform edge gradient enhancement on the preliminary segmentation feature map, and obtain a segmentation feature map after boundary enhancement according to the edge gradient feature and the edge attention weight, specifically: ; in, is the edge gradient feature map, is the L1 norm, is a convolution operation of size 3×3, is the edge attention weight map, It is the segmentation feature map after boundary enhancement; S44: Perform threshold segmentation on the segmentation feature map after boundary enhancement to obtain a binary monitoring map, specifically: ; in, is a binary monitoring map, is the threshold function, is the segmentation threshold.
[0012] It should be further explained that the present invention realizes the precise segmentation of water pollution areas through the collaborative calculation of dynamic convolution kernel generation and edge gradient enhancement strategy; at the level of mathematical principles, the dynamic convolution kernel performs nonlinear mapping between the quantified results of water quality indicators and the feature enhancement map, and performs high-dimensional feature fusion of the spatial distribution characteristics of water quality parameters and the statistical laws of spectral characteristics, while the parameter reshaping operation maps the feature vector to the convolution kernel parameter space through matrix transformation, so that the convolution kernel can adapt to the spatial distribution patterns of different water quality parameters; compared with the traditional fixed parameter convolution kernel, this dynamic generation mechanism has stronger feature discrimination ability through adaptive adjustment of the parameter space; in terms of edge enhancement, the dynamic generation mechanism can enhance the accuracy of water pollution areas ... In the process of edge detection, the present invention adopts a gradient feature extraction method with L1 norm constraint, and calculates the gradient amplitude of the feature map through a sliding window of a 3×3 convolution kernel. Its mathematical essence is to use the gradient amplitude to constrain the sparsity of the edge area, and then fuse the original features with the gradient features through 1×1 convolution to generate an edge attention weight map. This feature fusion strategy achieves a balance between edge details and noise suppression through the synergy of residual connection and gating mechanism. Compared with traditional edge detection algorithms, the present invention has stronger feature expression capabilities through the L1 norm constraint of the gradient amplitude and adaptive weight adjustment, targeting scenes in water area monitoring where spectral features are easily disturbed by suspended matter and pollution boundaries are blurred.
[0013] Furthermore, the step S5 comprises: S51: Calculate the pollution threshold according to the binary monitoring map and the water quality index quantification result map, specifically: ; in, is the pollution threshold, To obtain the maximum value, To take the average value; S52: Calculate the core pollution source coordinates based on the binary monitoring map and the water quality index quantification result map, specifically: ; in, is the coordinate heat map, are the horizontal and vertical coordinates of the core pollution sources, To obtain the maximum value of the coordinate heat map, is the indicator function, when hour, Take 1, otherwise take 0; S53: Based on the coordinates of the core pollution source, a set of recommended sampling points is generated through the coordinate diffusion network, specifically: ; in, is the set of recommended sampling points, is the coordinate diffusion network.
[0014] The present invention also discloses a water quality monitoring and analysis system based on drone and deep learning, comprising: Water area data collection and preprocessing module: Use drones to collect original water area multispectral data, eliminate illumination differences, and perform multispectral alignment to obtain preprocessed water area multispectral data; Feature enhancement module: extracts multi-scale spatial feature maps and spectral weighted feature maps based on the pre-processed water multispectral data, and then performs spatial and spectral joint optimization to obtain feature enhancement maps; Water quality index quantification module: build a dual-path feature extraction architecture, extract deep spectral feature maps through the main path, extract purification feature maps through the auxiliary path, perform multi-parameter joint regression based on the two feature maps, and obtain the water quality index quantification result map; Binarization segmentation module: Based on the water quality index quantification result map and feature enhancement map, a dynamic convolution kernel is generated through the fully connected layer, and combined with the deep spectral feature map, a preliminary segmentation feature map is extracted, and then edge gradient enhancement and threshold segmentation are performed to obtain a binary monitoring map; Pollution diffusion calculation module: Based on the binary monitoring map and the water quality index quantification result map, calculate the pollution threshold and core pollution source coordinates, and output the recommended sampling point set.
[0015] Compared with the prior art, the present invention has at least the following beneficial effects: (1) The present invention uses the collaborative design of the UAV platform and the deep learning model, takes multispectral data as input, and adopts the progressive processing flow of "feature joint optimization-dual-path deep analysis-dynamic convolution edge enhancement", which breaks through the limitations of single features, achieves a balance between the global law extraction and local anomaly capture of the monitored waters, and generates highly reliable segmentation results; compared with traditional remote sensing inversion methods, the present invention deeply integrates the spectral physical characteristics with the generalization ability of deep learning, and can still ensure the spatial continuity of water quality parameters and the integrity of the edges of abnormal areas under complex conditions such as light interference, thus solving the bottleneck problems of long monitoring cycles and insufficient spatial coverage caused by reliance on manual sampling in traditional water quality monitoring methods.
[0016] (2) The present invention combines multi-scale feature extraction, deep separable convolution and channel attention mechanism, and solves the technical problems of blurred water edge and easy loss of weak reflection features through gradient complementary texture expression and spectral recalibration. At the same time, the present invention constructs a residual block and feature gating mechanism with dynamic expansion rate, and uses global statistics to adaptively adjust the receptive field size of the convolution kernel, thus overcoming the defect of insufficient robustness of traditional convolutional neural networks.
[0017] (3) The present invention designs a multi-parameter joint regression and dynamic convolution kernel generation algorithm. Through implicit constraints between parameters and edge gradient enhancement operations, the cross-interference caused by the overlap of spectral absorption peaks is suppressed, thereby improving the boundary identification accuracy of small pollution sources. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 This is a flow chart of a water quality monitoring and analysis method based on drone and deep learning in Example 1 of the present invention; Figure 2 for Figure 1 Flowchart of extracting deep spectral feature map in step S3. DETAILED DESCRIPTION
[0019] The present invention is further described below in conjunction with the accompanying drawings, but the present invention is not limited in any way. Any changes or substitutions made based on the teachings of the present invention belong to the protection scope of the present invention.
[0020] Embodiment 1: This embodiment provides a water quality monitoring and analysis method based on drones and deep learning. Figure 1 As shown, the following steps are included: S1: Use drones to collect original water multispectral data, eliminate illumination differences and perform multispectral alignment to obtain pre-processed water multispectral data, including: S11: The multispectral sensor carried by the UAV collects the water area reflectance spectral signal, and then unpacks and converts the original data format to obtain the original water area multispectral data; S12: According to the radiation transfer model, the original water area multispectral data is subjected to illumination normalization calculation to eliminate radiation distortion, thereby obtaining the water area multispectral data after illumination normalization; S13: According to the geometric correction algorithm, multispectral spatial registration and resampling are performed on the water area multispectral data after illumination normalization to obtain preprocessed water area multispectral data.
[0021] S2: Based on the pre-processed water area multispectral data, extract the multi-scale spatial feature map and spectral weighted feature map, and then perform spatial and spectral joint optimization to obtain the feature enhancement map, including: S21: Three different-sized depth-separable convolution operations are performed in parallel on the preprocessed water multispectral data, and a multi-scale spatial feature map is obtained after channel splicing, specifically: ; in, is a multi-scale spatial feature map, For channel splicing operations, , They are depth-wise separable convolution operations of size 3, 5, and 7, respectively. is the preprocessed water multispectral data; S22: Calculate the band importance coefficient according to the preprocessed water area multispectral data, and multiply it with the preprocessed water area multispectral data channel by channel to obtain a spectral weighted feature map, specifically: ; in, is the band importance coefficient, is the sigmoid function, is the fully connected layer, is the ReLU function, is the global average pooling, is the spectral weighted feature map, It is a channel-by-channel multiplication operation; S23: According to the multi-scale spatial feature map and the spectral weighted feature map, spatial and spectral joint optimization is performed to obtain a feature enhancement map, specifically: ; in, is the feature enhancement graph, is a convolution operation of size 1×1, It is an element-by-element addition operation.
[0022] S3: Construct a dual-path feature extraction architecture, extract deep spectral feature maps through the main path, extract purification feature maps through the auxiliary path, perform multi-parameter joint regression based on the two feature maps, and obtain the quantitative result map of water quality indicators, including: S31: feature optimization is performed on the feature enhancement map through the main path to obtain a deep spectral feature map, wherein the feature optimization is implemented by iterative calculation of n cascaded dilated residual blocks, specifically: like Figure 2 As shown, for each , execute in sequence: ; in, is the expansion rate of the ith residual block, i is the residual block index, , is the softplus function, is the dilation weight matrix of the residual block, is the input feature map of the i-th residual block, is the intermediate feature map of the i-th residual block, The size is 3×3 and the expansion rate is The convolution operation, is a convolution operation of size 3×3 and dilation rate 2, is the feature map after feature optimization in the i-th residual block, Optimize the weight matrix for the features, is the input feature map of the i+1th residual block; Initial conditions , the final output As the deep spectral feature map, denoted as ; S32: According to the deep spectral feature map and the feature enhancement map, the dynamic feature gate is calculated through the auxiliary path, and combined with bilinear interpolation upsampling, the purified feature map is obtained, specifically: ; in, is the dynamic feature gate, is the global maximum pooling, To purify the feature map, is element-wise multiplication, It is a bilinear interpolation upsampling operation; S33: Based on the deep spectral characteristic graph and the purification characteristic graph, multi-parameter joint regression is performed to obtain a quantitative result graph of water quality indicators, specifically: ; in, is the chlorophyll concentration diagram, is the chlorophyll concentration weight matrix, is the turbidity diagram, is the turbidity weight matrix, is the total phosphorus content diagram, is the total phosphorus content weight matrix, This is a quantitative result diagram of water quality indicators.
[0023] S4: Based on the water quality index quantification result map and feature enhancement map, a dynamic convolution kernel is generated through the fully connected layer, and combined with the deep spectral feature map, a preliminary segmentation feature map is extracted, and then edge gradient enhancement and threshold segmentation are performed to obtain a binary monitoring map, including: S41: Based on the water quality index quantification result map and feature enhancement map, a dynamic convolution kernel is generated through a fully connected layer, specifically: ; in, is the dynamic convolution kernel, Reshape operations for parameters that convert vectors to matrices; S42: Perform convolution calculation on the deep spectral feature map according to the dynamic convolution kernel to obtain a preliminary segmentation feature map, specifically: ; in, is the initial segmentation feature map, is the convolution operation; S43: Perform edge gradient enhancement on the preliminary segmentation feature map, and obtain a segmentation feature map after boundary enhancement according to the edge gradient feature and the edge attention weight, specifically: ; in, is the edge gradient feature map, is the L1 norm, is a convolution operation of size 3×3, is the edge attention weight map, It is the segmentation feature map after boundary enhancement; S44: Perform threshold segmentation on the segmentation feature map after boundary enhancement to obtain a binary monitoring map, specifically: ; in, is a binary monitoring map, is the threshold function, is the segmentation threshold.
[0024] S5: Based on the binary monitoring map and the water quality index quantification result map, calculate the pollution threshold and core pollution source coordinates, and output the recommended sampling point set, including: S51: Calculate the pollution threshold according to the binary monitoring map and the water quality index quantification result map, specifically: ; in, is the pollution threshold, To obtain the maximum value, To take the average value; S52: Calculate the core pollution source coordinates based on the binary monitoring map and the water quality index quantification result map, specifically:
[0025] in, is the coordinate heat map, are the horizontal and vertical coordinates of the core pollution sources, To obtain the maximum value of the coordinate heat map, is the indicator function, when hour, Take 1, otherwise take 0; S53: Based on the coordinates of the core pollution source, a set of recommended sampling points is generated through the coordinate diffusion network, specifically: ; in, is the set of recommended sampling points, is the coordinate diffusion network.
[0026] To further explain the above step S5, take the water quality monitoring and analysis of an inland lake as an example. When executing step S5, the input binary monitoring map is a binary matrix with a resolution of 512×512 (the polluted area is marked as 1, and the non-polluted area is marked as 0). The water quality index quantification result map contains floating-point data of three channels: chlorophyll concentration (0.2~3.5 μg / L), turbidity (5~50 NTU), and total phosphorus content (0.05~0.8 mg / L); In step S51, after taking the element-by-element product of the binary monitoring map and the water quality index quantification result map, the maximum value of the chlorophyll concentration is 3.2 μg / L and the average value is 1.8 μg / L. After mapping through the fully connected layer, the output pollution threshold T=0.68; In step S52, a coordinate heat map is generated, and its maximum response value of 0.78 is located at the coordinate (120, 75). After threshold screening, it is confirmed to be the coordinate of the core pollution source. Finally, a hexagonal sampling grid with (120, 75) as the center and a radius of 200 meters is generated through the coordinate diffusion network, and a set of recommended sampling points is output. , covering the cyanobacteria aggregation area and turbidity mutation zone, providing high-value positioning data for manual verification.
[0027] In addition, for the special scenario of multi-center diffusion of lake non-point source pollution, the present invention also provides another method for generating a set of recommended sampling points, specifically: ;
[0028] in, For graph attention network.
[0029] Embodiment 2: This embodiment provides a water quality monitoring and analysis system based on drones and deep learning, which mainly includes the following four modules: Water area data collection and preprocessing module: Use drones to collect original water area multispectral data, eliminate illumination differences, and perform multispectral alignment to obtain preprocessed water area multispectral data; Feature enhancement module: extracts multi-scale spatial feature maps and spectral weighted feature maps based on the pre-processed water multispectral data, and then performs spatial and spectral joint optimization to obtain feature enhancement maps; Water quality index quantification module: build a dual-path feature extraction architecture, extract deep spectral feature maps through the main path, extract purification feature maps through the auxiliary path, perform multi-parameter joint regression based on the two feature maps, and obtain the water quality index quantification result map; Binarization segmentation module: Based on the water quality index quantification result map and feature enhancement map, a dynamic convolution kernel is generated through the fully connected layer, and combined with the deep spectral feature map, a preliminary segmentation feature map is extracted, and then edge gradient enhancement and threshold segmentation are performed to obtain a binary monitoring map; Pollution diffusion calculation module: Based on the binary monitoring map and the water quality index quantification result map, calculate the pollution threshold and core pollution source coordinates, and output the recommended sampling point set.
[0030] The water quality monitoring and analysis system provided in this embodiment is used to implement the water quality monitoring and analysis method in the above-mentioned embodiment 1, wherein the functions implemented by each functional module of the water quality monitoring and analysis system correspond one-to-one to each step of the water quality monitoring and analysis method; therefore, they will not be repeated here.
[0031] It should be noted that the serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages and disadvantages of the embodiments. And the terms "including", "comprising" or any other variants thereof in this article are intended to cover non-exclusive inclusion, so that a process, device, article or method including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, device, article or method. In the absence of further restrictions, an element defined by the sentence "including a ..." does not exclude the presence of other identical elements in the process, device, article or method including the element.
[0032] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes a number of instructions for a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in multiple embodiments of the present invention.
[0033] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A water quality monitoring and analysis method based on drones and deep learning, characterized in that: The following steps are involved: S1: Use drones to collect original water multispectral data, eliminate illumination differences, and perform multispectral alignment to obtain preprocessed water multispectral data; S2: Extract multi-scale spatial feature maps and spectral weighted feature maps based on the pre-processed water multispectral data, and then perform spatial and spectral joint optimization to obtain feature enhancement maps; S3: Construct a dual-path feature extraction architecture, extract deep spectral feature maps through the main path, extract purification feature maps through the auxiliary path, perform multi-parameter joint regression based on the two feature maps, and obtain the quantitative result map of water quality indicators; The extracting of the deep spectral feature map comprises: performing feature optimization on the feature enhancement map through iterative calculation of multiple cascaded dilated residual blocks, wherein the dilation rate of each residual block is calculated based on the global average pooling result of the input feature map of the residual block; The extracting and purifying feature map comprises: performing global average pooling on the deep spectral feature map, performing global maximum pooling on the feature enhancement map, calculating a dynamic feature gate according to the two pooling results, and performing gated screening on the feature enhancement map after bilinear interpolation upsampling according to the dynamic feature gate; S4: Based on the water quality index quantification result map and feature enhancement map, a dynamic convolution kernel is generated through the fully connected layer, and combined with the deep spectral feature map, a preliminary segmentation feature map is extracted, and then edge gradient enhancement and threshold segmentation are performed to obtain a binary monitoring map; S5: Based on the binary monitoring map and the water quality index quantification result map, calculate the pollution threshold and core pollution source coordinates, and output the recommended sampling point set.
2. The water quality monitoring and analysis method based on drone and deep learning according to claim 1 is characterized in that: The step S1 comprises: S11: The multispectral sensor carried by the UAV collects the water area reflectance spectral signal, and then unpacks and converts the original data format to obtain the original water area multispectral data; S12: According to the radiation transfer model, the original water area multispectral data is subjected to illumination normalization calculation to eliminate radiation distortion, thereby obtaining the water area multispectral data after illumination normalization; S13: According to the geometric correction algorithm, multispectral spatial registration and resampling are performed on the water area multispectral data after illumination normalization to obtain preprocessed water area multispectral data.
3. The water quality monitoring and analysis method based on drone and deep learning according to claim 1 is characterized in that: The step S2 comprises: S21: Three different-sized depth-separable convolution operations are performed in parallel on the preprocessed water multispectral data, and a multi-scale spatial feature map is obtained after channel splicing, specifically: ; in, is a multi-scale spatial feature map, For channel splicing operations, , They are depth-wise separable convolution operations of size 3, 5, and 7, respectively. is the preprocessed water multispectral data; S22: Calculate the band importance coefficient according to the preprocessed water area multispectral data, and multiply it with the preprocessed water area multispectral data channel by channel to obtain a spectral weighted feature map, specifically: ; in, is the band importance coefficient, is the sigmoid function, is the fully connected layer, is the ReLU function, is the global average pooling, is the spectral weighted feature map, It is a channel-by-channel multiplication operation; S23: According to the multi-scale spatial feature map and the spectral weighted feature map, spatial and spectral joint optimization is performed to obtain a feature enhancement map, specifically: ; in, is the feature enhancement graph, is a convolution operation of size 1×1, It is an element-by-element addition operation.
4. The water quality monitoring and analysis method based on drone and deep learning according to claim 3 is characterized in that: The step S3 comprises: S31: feature optimization is performed on the feature enhancement map through the main path to obtain a deep spectral feature map, wherein the feature optimization is implemented by iterative calculation of n cascaded dilated residual blocks, specifically: For each , execute in sequence: ; in, is the expansion rate of the ith residual block, i is the residual block index, , is the softplus function, is the dilation weight matrix of the residual block, is the input feature map of the i-th residual block, is the intermediate feature map of the i-th residual block, The size is 3×3 and the expansion rate is The convolution operation, is a convolution operation of size 3×3 and dilation rate 2, is the feature map after feature optimization in the i-th residual block, Optimize the weight matrix for the features, is the input feature map of the i+1th residual block; Initial conditions , the final output As the deep spectral feature map, denoted as ; S32: According to the deep spectral feature map and the feature enhancement map, the dynamic feature gate is calculated through the auxiliary path, and combined with bilinear interpolation upsampling, the purified feature map is obtained, specifically: ; in, is the dynamic feature gate, is the global maximum pooling, To purify the feature map, is element-wise multiplication, It is a bilinear interpolation upsampling operation; S33: Based on the deep spectral characteristic graph and the purification characteristic graph, multi-parameter joint regression is performed to obtain the quantitative result graph of water quality indicators, specifically: ; in, is the chlorophyll concentration diagram, is the chlorophyll concentration weight matrix, is the turbidity diagram, is the turbidity weight matrix, is the total phosphorus content diagram, is the total phosphorus content weight matrix, This is a quantitative result diagram of water quality indicators.
5. The water quality monitoring and analysis method based on drone and deep learning according to claim 4 is characterized in that: The step S4 comprises: S41: Based on the water quality index quantification result map and feature enhancement map, a dynamic convolution kernel is generated through a fully connected layer, specifically: ; in, is the dynamic convolution kernel, Reshape operations for parameters that convert vectors to matrices; S42: Perform convolution calculation on the deep spectral feature map according to the dynamic convolution kernel to obtain a preliminary segmentation feature map, specifically: ; in, is the initial segmentation feature map, is the convolution operation; S43: Perform edge gradient enhancement on the preliminary segmentation feature map, and obtain a segmentation feature map after boundary enhancement according to the edge gradient feature and the edge attention weight, specifically: ; in, is the edge gradient feature map, is the L1 norm, is a convolution operation of size 3×3, is the edge attention weight map, It is the segmentation feature map after boundary enhancement; S44: Perform threshold segmentation on the segmentation feature map after boundary enhancement to obtain a binary monitoring map, specifically: ; in, is a binary monitoring map, is the threshold function, is the segmentation threshold.
6. The water quality monitoring and analysis method based on drone and deep learning according to claim 5 is characterized in that: The step S5 comprises: S51: Calculate the pollution threshold according to the binary monitoring map and the water quality index quantification result map, specifically: ; in, is the pollution threshold, To obtain the maximum value, To take the average value; S52: Calculate the core pollution source coordinates based on the binary monitoring map and the water quality index quantification result map, specifically: ; in, is the coordinate heat map, are the horizontal and vertical coordinates of the core pollution sources, To obtain the maximum value of the coordinate heat map, is the indicator function, when hour, Take 1, otherwise take 0; S53: Based on the coordinates of the core pollution source, a set of recommended sampling points is generated through the coordinate diffusion network, specifically: ; in, is the set of recommended sampling points, is the coordinate diffusion network.
7. A water quality monitoring and analysis system based on drones and deep learning, characterized in that: include: Water area data collection and preprocessing module: Use drones to collect original water area multispectral data, eliminate illumination differences, and perform multispectral alignment to obtain preprocessed water area multispectral data; Feature enhancement module: extracts multi-scale spatial feature maps and spectral weighted feature maps based on the pre-processed water multispectral data, and then performs spatial and spectral joint optimization to obtain feature enhancement maps; Water quality index quantification module: build a dual-path feature extraction architecture, extract deep spectral feature maps through the main path, extract purification feature maps through the auxiliary path, perform multi-parameter joint regression based on the two feature maps, and obtain the water quality index quantification result map; Binarization segmentation module: Based on the water quality index quantification result map and feature enhancement map, a dynamic convolution kernel is generated through the fully connected layer, and combined with the deep spectral feature map, a preliminary segmentation feature map is extracted, and then edge gradient enhancement and threshold segmentation are performed to obtain a binary monitoring map; Pollution diffusion calculation module: Calculate the pollution threshold and core pollution source coordinates based on the binary monitoring map and water quality index quantification result map, and output the recommended sampling point set; To realize the water quality monitoring and analysis method based on drone and deep learning as described in any one of claims 1-6.
Citation Information
Cited By
Region change detection method and device and electronic equipment
CN120544028A
Water quality index fusion data anomaly detection method, system, equipment and medium
CN120930040A